summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/Makefile4
-rw-r--r--src/mesa/SConscript632
-rw-r--r--src/mesa/drivers/common/meta.c108
-rw-r--r--src/mesa/drivers/dri/Makefile.template5
-rw-r--r--src/mesa/drivers/dri/common/utils.c24
-rw-r--r--src/mesa/drivers/dri/common/xmlpool/Makefile2
-rw-r--r--src/mesa/drivers/dri/i915/intel_structs.h132
-rw-r--r--src/mesa/drivers/dri/i965/brw_cc.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h44
-rw-r--r--src/mesa/drivers/dri/i965/brw_curbe.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_defines.h8
-rw-r--r--src/mesa/drivers/dri/i965/brw_disasm.c13
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.h29
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c208
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp612
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h76
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp29
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp3
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_cache.c17
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_dump.c52
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_urb.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c163
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.h3
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_emit.c14
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_fp.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_glsl.c50
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass0.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass1.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass2.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_state.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c19
-rw-r--r--src/mesa/drivers/dri/i965/gen6_cc.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_clip_state.c7
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sf_state.c13
-rw-r--r--src/mesa/drivers/dri/i965/gen6_urb.c2
-rw-r--r--src/mesa/drivers/dri/i965/gen6_vs_state.c62
-rw-r--r--src/mesa/drivers/dri/i965/gen6_wm_state.c9
-rw-r--r--src/mesa/drivers/dri/i965/intel_structs.h132
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.c26
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c8
-rw-r--r--src/mesa/drivers/dri/intel/intel_chipset.h4
-rw-r--r--src/mesa/drivers/dri/intel/intel_clear.c44
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c7
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h20
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel.c7
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_bitmap.c8
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_copy.c6
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_read.c26
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c92
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c20
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c40
-rw-r--r--src/mesa/drivers/dri/nouveau/Makefile2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_array.c136
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_array.h58
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bo_state.c10
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bo_state.h2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c95
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h7
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_class.h4959
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c13
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.h2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_render.h44
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_render_t.c197
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_scratch.c98
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_scratch.h51
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_state.c7
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c50
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.c93
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.h4
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_util.h6
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c308
-rw-r--r--src/mesa/drivers/dri/nouveau/nv01_2d.xml.h1343
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_3d.xml.h738
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_context.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_context.h1
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_render.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_fb.c8
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_frag.c7
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_raster.c7
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_state_tex.c3
-rw-r--r--src/mesa/drivers/dri/nouveau/nv04_surface.c16
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_3d.xml.h1619
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_context.c137
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_driver.h10
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_render.c76
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_fb.c51
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_frag.c36
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_polygon.c47
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_raster.c53
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tex.c64
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_tnl.c90
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_3d.xml.h2076
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_context.c277
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_driver.h10
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_render.c82
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_fb.c54
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_frag.c16
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_polygon.c4
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_raster.c7
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_tex.c81
-rw-r--r--src/mesa/drivers/dri/nouveau/nv20_state_tnl.c102
-rw-r--r--src/mesa/drivers/dri/nouveau/nv_m2mf.xml.h155
-rw-r--r--src/mesa/drivers/dri/nouveau/nv_object.xml.h268
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c5
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c7
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.c5
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_texstate.c22
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c3
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c6
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c8
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_code.h2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c122
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h15
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c370
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h18
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_optimize.c331
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c31
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c369
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c5
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program.c115
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program.h26
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_constants.h5
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c50
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h10
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_print.c1
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c103
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_draw.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c21
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_render.c4
-rw-r--r--src/mesa/drivers/dri/r600/evergreen_tex.c22
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.c4
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.c4
-rw-r--r--src/mesa/drivers/dri/r600/r600_texstate.c14
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c104
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c46
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c200
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.h11
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tcl.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c20
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c64
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.h7
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c1
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c12
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_tex.c4
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c10
-rw-r--r--src/mesa/drivers/x11/fakeglx.c1
-rw-r--r--src/mesa/drivers/x11/glxapi.c5
-rw-r--r--src/mesa/main/accum.h5
-rw-r--r--src/mesa/main/api_arrayelt.c746
-rw-r--r--src/mesa/main/api_exec.c63
-rw-r--r--src/mesa/main/api_loopback.c175
-rw-r--r--src/mesa/main/api_loopback.h5
-rw-r--r--src/mesa/main/api_validate.c1
-rw-r--r--src/mesa/main/api_validate.h5
-rw-r--r--src/mesa/main/arrayobj.h4
-rw-r--r--src/mesa/main/atifragshader.h7
-rw-r--r--src/mesa/main/attrib.h8
-rw-r--r--src/mesa/main/blend.h4
-rw-r--r--src/mesa/main/bufferobj.c39
-rw-r--r--src/mesa/main/buffers.h3
-rw-r--r--src/mesa/main/clear.c64
-rw-r--r--src/mesa/main/clear.h7
-rw-r--r--src/mesa/main/colortab.c1
-rw-r--r--src/mesa/main/colortab.h9
-rw-r--r--src/mesa/main/context.c253
-rw-r--r--src/mesa/main/convolve.h7
-rw-r--r--src/mesa/main/core.h2
-rw-r--r--src/mesa/main/dd.h32
-rw-r--r--src/mesa/main/debug.c4
-rw-r--r--src/mesa/main/debug.h5
-rw-r--r--src/mesa/main/depth.h5
-rw-r--r--src/mesa/main/depthstencil.h2
-rw-r--r--src/mesa/main/dispatch.h8
-rw-r--r--src/mesa/main/dlist.c199
-rw-r--r--src/mesa/main/drawpix.c70
-rw-r--r--src/mesa/main/drawpix.h5
-rw-r--r--src/mesa/main/drawtex.h3
-rw-r--r--src/mesa/main/enable.c1
-rw-r--r--src/mesa/main/enable.h4
-rw-r--r--src/mesa/main/enums.c7502
-rw-r--r--src/mesa/main/enums.h1
-rw-r--r--src/mesa/main/es_generator.py109
-rw-r--r--src/mesa/main/extensions.c3
-rw-r--r--src/mesa/main/extensions.h5
-rw-r--r--src/mesa/main/fbobject.c69
-rw-r--r--src/mesa/main/fbobject.h5
-rw-r--r--src/mesa/main/ffvertex_prog.h2
-rw-r--r--src/mesa/main/fog.h5
-rw-r--r--src/mesa/main/formats.c45
-rw-r--r--src/mesa/main/formats.h3
-rw-r--r--src/mesa/main/framebuffer.c20
-rw-r--r--src/mesa/main/framebuffer.h5
-rw-r--r--src/mesa/main/get.c30
-rw-r--r--src/mesa/main/glapidispatch.h4548
-rw-r--r--src/mesa/main/hint.h4
-rw-r--r--src/mesa/main/histogram.h5
-rw-r--r--src/mesa/main/image.c4533
-rw-r--r--src/mesa/main/image.h165
-rw-r--r--src/mesa/main/imports.h6
-rw-r--r--src/mesa/main/light.h7
-rw-r--r--src/mesa/main/lines.c5
-rw-r--r--src/mesa/main/lines.h3
-rw-r--r--src/mesa/main/matrix.h3
-rw-r--r--src/mesa/main/mfeatures.h4
-rw-r--r--src/mesa/main/mipmap.c170
-rw-r--r--src/mesa/main/mtypes.h152
-rw-r--r--src/mesa/main/multisample.h4
-rw-r--r--src/mesa/main/nvprogram.c8
-rw-r--r--src/mesa/main/nvprogram.h10
-rw-r--r--src/mesa/main/pack.c4960
-rw-r--r--src/mesa/main/pack.h147
-rw-r--r--src/mesa/main/pixel.h7
-rw-r--r--src/mesa/main/pixelstore.h3
-rw-r--r--src/mesa/main/pixeltransfer.c566
-rw-r--r--src/mesa/main/pixeltransfer.h90
-rw-r--r--src/mesa/main/points.h4
-rw-r--r--src/mesa/main/polygon.c1
-rw-r--r--src/mesa/main/polygon.h3
-rw-r--r--src/mesa/main/rastpos.h5
-rw-r--r--src/mesa/main/readpix.c25
-rw-r--r--src/mesa/main/readpix.h3
-rw-r--r--src/mesa/main/remap.c46
-rw-r--r--src/mesa/main/remap.h44
-rw-r--r--src/mesa/main/remap_helper.h4048
-rw-r--r--src/mesa/main/renderbuffer.c4
-rw-r--r--src/mesa/main/renderbuffer.h2
-rw-r--r--src/mesa/main/scissor.h3
-rw-r--r--src/mesa/main/shaderapi.c283
-rw-r--r--src/mesa/main/shaderapi.h28
-rw-r--r--src/mesa/main/shaderobj.h18
-rw-r--r--src/mesa/main/shared.h2
-rw-r--r--src/mesa/main/state.c20
-rw-r--r--src/mesa/main/stencil.h3
-rw-r--r--src/mesa/main/texenvprogram.c9
-rw-r--r--src/mesa/main/texfetch.c12
-rw-r--r--src/mesa/main/texgetimage.c1
-rw-r--r--src/mesa/main/teximage.c373
-rw-r--r--src/mesa/main/teximage.h7
-rw-r--r--src/mesa/main/texobj.c105
-rw-r--r--src/mesa/main/texstate.c33
-rw-r--r--src/mesa/main/texstore.c246
-rw-r--r--src/mesa/main/uniforms.c129
-rw-r--r--src/mesa/main/uniforms.h3
-rw-r--r--src/mesa/main/varray.c722
-rw-r--r--src/mesa/main/varray.h1
-rw-r--r--src/mesa/main/version.h2
-rw-r--r--src/mesa/main/vtxfmt.c38
-rw-r--r--src/mesa/program/ir_to_mesa.cpp476
-rw-r--r--src/mesa/program/program.c2
-rw-r--r--src/mesa/program/sampler.cpp8
-rw-r--r--src/mesa/sources.mak2
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c5
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c5
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c103
-rw-r--r--src/mesa/state_tracker/st_cb_eglimage.c9
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.c1
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c1
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c14
-rw-r--r--src/mesa/state_tracker/st_context.c7
-rw-r--r--src/mesa/state_tracker/st_draw.c20
-rw-r--r--src/mesa/state_tracker/st_extensions.c11
-rw-r--r--src/mesa/state_tracker/st_format.c131
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c6
-rw-r--r--src/mesa/state_tracker/st_manager.c37
-rw-r--r--src/mesa/state_tracker/st_program.c42
-rw-r--r--src/mesa/swrast/s_copypix.c2
-rw-r--r--src/mesa/swrast/s_drawpix.c4
-rw-r--r--src/mesa/swrast/s_fragprog.c2
-rw-r--r--src/mesa/swrast/s_readpix.c5
-rw-r--r--src/mesa/swrast/s_texcombine.c2
-rw-r--r--src/mesa/vbo/vbo_attrib_tmp.h616
-rw-r--r--src/mesa/vbo/vbo_exec_api.c116
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c13
-rw-r--r--src/mesa/vbo/vbo_save_api.c34
298 files changed, 31825 insertions, 19692 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 7a6936e210..8b0756b84e 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -35,8 +35,8 @@ ES2_CPPFLAGS := -DFEATURE_ES2=1 $(DEFINES)
# append include dirs
MESA_CPPFLAGS += $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
-ES1_CPPFLAGS += -I$(TOP)/src/mapi/es1api $(INCLUDE_DIRS)
-ES2_CPPFLAGS += -I$(TOP)/src/mapi/es2api $(INCLUDE_DIRS)
+ES1_CPPFLAGS += -I$(TOP)/src/mapi/es1api $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
+ES2_CPPFLAGS += -I$(TOP)/src/mapi/es2api $(INCLUDE_DIRS) $(TALLOC_CFLAGS)
# tidy compiler flags
CFLAGS := $(filter-out $(DEFINES), $(CFLAGS))
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index c89e635aab..08d731de2d 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -4,320 +4,328 @@
Import('*')
-if env['platform'] != 'winddk':
+env = env.Clone()
- env = env.Clone()
-
- env.Append(CPPPATH = [
- '#/src/mapi',
- '#/src/glsl',
- '#/src/mesa',
- ])
-
- if env['platform'] == 'windows':
- env.Append(CPPDEFINES = [
- '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
- 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
- 'WIN32_THREADS', # use Win32 thread API
- ])
- env.Prepend(CPPPATH = ['#src/talloc'])
+env.Append(CPPPATH = [
+ '#/src/mapi',
+ '#/src/glsl',
+ '#/src/mesa',
+])
- #
- # Source files
- #
-
- main_sources = [
- 'main/api_arrayelt.c',
- 'main/api_exec.c',
- 'main/api_loopback.c',
- 'main/api_noop.c',
- 'main/api_validate.c',
- 'main/accum.c',
- 'main/arbprogram.c',
- 'main/atifragshader.c',
- 'main/attrib.c',
- 'main/arrayobj.c',
- 'main/blend.c',
- 'main/bufferobj.c',
- 'main/buffers.c',
- 'main/clear.c',
- 'main/clip.c',
- 'main/colortab.c',
- 'main/condrender.c',
- 'main/context.c',
- 'main/convolve.c',
- 'main/cpuinfo.c',
- 'main/debug.c',
- 'main/depth.c',
- 'main/depthstencil.c',
- 'main/dlist.c',
- 'main/dlopen.c',
- 'main/drawpix.c',
- 'main/drawtex.c',
- 'main/enable.c',
- 'main/enums.c',
- 'main/eval.c',
- 'main/execmem.c',
- 'main/extensions.c',
- 'main/fbobject.c',
- 'main/feedback.c',
- 'main/ffvertex_prog.c',
- 'main/fog.c',
- 'main/formats.c',
- 'main/framebuffer.c',
- 'main/get.c',
- 'main/getstring.c',
- 'main/hash.c',
- 'main/hint.c',
- 'main/histogram.c',
- 'main/image.c',
- 'main/imports.c',
- 'main/light.c',
- 'main/lines.c',
- 'main/matrix.c',
- 'main/mipmap.c',
- 'main/mm.c',
- 'main/multisample.c',
- 'main/nvprogram.c',
- 'main/pixel.c',
- 'main/pixelstore.c',
- 'main/points.c',
- 'main/polygon.c',
- 'main/querymatrix.c',
- 'main/queryobj.c',
- 'main/rastpos.c',
- 'main/readpix.c',
- 'main/remap.c',
- 'main/renderbuffer.c',
- 'main/scissor.c',
- 'main/shaderapi.c',
- 'main/shaderobj.c',
- 'main/shared.c',
- 'main/state.c',
- 'main/stencil.c',
- 'main/syncobj.c',
- 'main/texcompress.c',
- 'main/texcompress_s3tc.c',
- 'main/texcompress_fxt1.c',
- 'main/texenv.c',
- 'main/texenvprogram.c',
- 'main/texfetch.c',
- 'main/texformat.c',
- 'main/texgen.c',
- 'main/texgetimage.c',
- 'main/teximage.c',
- 'main/texobj.c',
- 'main/texpal.c',
- 'main/texparam.c',
- 'main/texrender.c',
- 'main/texstate.c',
- 'main/texstore.c',
- 'main/transformfeedback.c',
- 'main/uniforms.c',
- 'main/varray.c',
- 'main/version.c',
- 'main/viewport.c',
- 'main/vtxfmt.c',
- ]
-
- math_sources = [
- 'math/m_debug_clip.c',
- 'math/m_debug_norm.c',
- 'math/m_debug_xform.c',
- 'math/m_eval.c',
- 'math/m_matrix.c',
- 'math/m_translate.c',
- 'math/m_vector.c',
- 'math/m_xform.c',
- ]
-
- vbo_sources = [
- 'vbo/vbo_context.c',
- 'vbo/vbo_exec.c',
- 'vbo/vbo_exec_api.c',
- 'vbo/vbo_exec_array.c',
- 'vbo/vbo_exec_draw.c',
- 'vbo/vbo_exec_eval.c',
- 'vbo/vbo_rebase.c',
- 'vbo/vbo_split.c',
- 'vbo/vbo_split_copy.c',
- 'vbo/vbo_split_inplace.c',
- 'vbo/vbo_save.c',
- 'vbo/vbo_save_api.c',
- 'vbo/vbo_save_draw.c',
- 'vbo/vbo_save_loopback.c',
- ]
-
- vf_sources = [
- 'vf/vf.c',
- 'vf/vf_generic.c',
- 'vf/vf_sse.c',
- ]
-
- statetracker_sources = [
- 'state_tracker/st_atom.c',
- 'state_tracker/st_atom_blend.c',
- 'state_tracker/st_atom_clip.c',
- 'state_tracker/st_atom_constbuf.c',
- 'state_tracker/st_atom_depth.c',
- 'state_tracker/st_atom_framebuffer.c',
- 'state_tracker/st_atom_msaa.c',
- 'state_tracker/st_atom_pixeltransfer.c',
- 'state_tracker/st_atom_sampler.c',
- 'state_tracker/st_atom_scissor.c',
- 'state_tracker/st_atom_shader.c',
- 'state_tracker/st_atom_rasterizer.c',
- 'state_tracker/st_atom_stipple.c',
- 'state_tracker/st_atom_texture.c',
- 'state_tracker/st_atom_viewport.c',
- 'state_tracker/st_cb_accum.c',
- 'state_tracker/st_cb_bitmap.c',
- 'state_tracker/st_cb_blit.c',
- 'state_tracker/st_cb_bufferobjects.c',
- 'state_tracker/st_cb_clear.c',
- 'state_tracker/st_cb_condrender.c',
- 'state_tracker/st_cb_flush.c',
- 'state_tracker/st_cb_drawpixels.c',
- 'state_tracker/st_cb_drawtex.c',
- 'state_tracker/st_cb_eglimage.c',
- 'state_tracker/st_cb_fbo.c',
- 'state_tracker/st_cb_feedback.c',
- 'state_tracker/st_cb_program.c',
- 'state_tracker/st_cb_queryobj.c',
- 'state_tracker/st_cb_rasterpos.c',
- 'state_tracker/st_cb_readpixels.c',
- 'state_tracker/st_cb_strings.c',
- 'state_tracker/st_cb_texture.c',
- 'state_tracker/st_cb_viewport.c',
- 'state_tracker/st_cb_xformfb.c',
- 'state_tracker/st_context.c',
- 'state_tracker/st_debug.c',
- 'state_tracker/st_draw.c',
- 'state_tracker/st_draw_feedback.c',
- 'state_tracker/st_extensions.c',
- 'state_tracker/st_format.c',
- 'state_tracker/st_gen_mipmap.c',
- 'state_tracker/st_manager.c',
- 'state_tracker/st_mesa_to_tgsi.c',
- 'state_tracker/st_program.c',
- 'state_tracker/st_texture.c',
- ]
-
- program_sources = [
- 'program/arbprogparse.c',
- 'program/hash_table.c',
- 'program/ir_to_mesa.cpp',
- 'program/lex.yy.c',
- 'program/nvfragparse.c',
- 'program/nvvertparse.c',
- 'program/program.c',
- 'program/program_parse.tab.c',
- 'program/program_parse_extra.c',
- 'program/prog_cache.c',
- 'program/prog_execute.c',
- 'program/prog_instruction.c',
- 'program/prog_noise.c',
- 'program/prog_optimize.c',
- 'program/prog_parameter.c',
- 'program/prog_parameter_layout.c',
- 'program/prog_print.c',
- 'program/prog_statevars.c',
- 'program/prog_uniform.c',
- 'program/programopt.c',
- 'program/sampler.cpp',
- 'program/symbol_table.c',
- ]
-
- mesa_sources = (
- main_sources +
- math_sources +
- program_sources +
- vbo_sources +
- vf_sources +
- statetracker_sources
- )
+if env['platform'] == 'windows':
+ env.Append(CPPDEFINES = [
+ '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
+ 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
+ 'WIN32_THREADS', # use Win32 thread API
+ ])
+ env.Prepend(CPPPATH = ['#src/talloc'])
+else:
+ env.Append(CPPDEFINES = [
+ 'IN_DRI_DRIVER', # enable the remap table (for DRI drivers)
+ ])
- #
- # Assembly sources
- #
- if gcc and env['machine'] == 'x86':
- env.Append(CPPDEFINES = [
- 'USE_X86_ASM',
- 'USE_MMX_ASM',
- 'USE_3DNOW_ASM',
- 'USE_SSE_ASM',
- ])
- mesa_sources += [
- 'x86/common_x86.c',
- 'x86/x86_xform.c',
- 'x86/3dnow.c',
- 'x86/sse.c',
- 'x86/common_x86_asm.S',
- 'x86/x86_xform2.S',
- 'x86/x86_xform3.S',
- 'x86/x86_xform4.S',
- 'x86/x86_cliptest.S',
- 'x86/mmx_blend.S',
- 'x86/3dnow_xform1.S',
- 'x86/3dnow_xform2.S',
- 'x86/3dnow_xform3.S',
- 'x86/3dnow_xform4.S',
- 'x86/3dnow_normal.S',
- 'x86/sse_xform1.S',
- 'x86/sse_xform2.S',
- 'x86/sse_xform3.S',
- 'x86/sse_xform4.S',
- 'x86/sse_normal.S',
- 'x86/read_rgba_span_x86.S',
- ]
- elif gcc and env['machine'] == 'x86_64':
- env.Append(CPPDEFINES = [
- 'USE_X86_64_ASM',
- ])
- mesa_sources += [
- 'x86-64/x86-64.c',
- 'x86-64/xform4.S',
- ]
- elif gcc and env['machine'] == 'ppc':
- env.Append(CPPDEFINES = [
- 'USE_PPC_ASM',
- 'USE_VMX_ASM',
- ])
- mesa_sources += [
- 'ppc/common_ppc.c',
- ]
- elif gcc and env['machine'] == 'sparc':
- mesa_sources += [
- 'sparc/sparc.c',
- 'sparc/clip.S',
- 'sparc/norm.S',
- 'sparc/xform.S',
- ]
- else:
- pass
-
- # Generate matypes.h
- if gcc and env['machine'] in ('x86', 'x86_64'):
- # See http://www.scons.org/wiki/UsingCodeGenerators
- gen_matypes = env.Program(
- target = 'gen_matypes',
- source = 'x86/gen_matypes.c',
- )
- matypes = env.Command(
- 'matypes.h',
- gen_matypes,
- gen_matypes[0].abspath + ' > $TARGET',
- )
- # Add the dir containing the generated header (somewhere inside the
- # build dir) to the include path
- env.Append(CPPPATH = [matypes[0].dir])
+#
+# Source files
+#
- #
- # Libraries
- #
+main_sources = [
+ 'main/api_arrayelt.c',
+ 'main/api_exec.c',
+ 'main/api_loopback.c',
+ 'main/api_noop.c',
+ 'main/api_validate.c',
+ 'main/accum.c',
+ 'main/arbprogram.c',
+ 'main/atifragshader.c',
+ 'main/attrib.c',
+ 'main/arrayobj.c',
+ 'main/blend.c',
+ 'main/bufferobj.c',
+ 'main/buffers.c',
+ 'main/clear.c',
+ 'main/clip.c',
+ 'main/colortab.c',
+ 'main/condrender.c',
+ 'main/context.c',
+ 'main/convolve.c',
+ 'main/cpuinfo.c',
+ 'main/debug.c',
+ 'main/depth.c',
+ 'main/depthstencil.c',
+ 'main/dlist.c',
+ 'main/dlopen.c',
+ 'main/drawpix.c',
+ 'main/drawtex.c',
+ 'main/enable.c',
+ 'main/enums.c',
+ 'main/eval.c',
+ 'main/execmem.c',
+ 'main/extensions.c',
+ 'main/fbobject.c',
+ 'main/feedback.c',
+ 'main/ffvertex_prog.c',
+ 'main/fog.c',
+ 'main/formats.c',
+ 'main/framebuffer.c',
+ 'main/get.c',
+ 'main/getstring.c',
+ 'main/hash.c',
+ 'main/hint.c',
+ 'main/histogram.c',
+ 'main/image.c',
+ 'main/imports.c',
+ 'main/light.c',
+ 'main/lines.c',
+ 'main/matrix.c',
+ 'main/mipmap.c',
+ 'main/mm.c',
+ 'main/multisample.c',
+ 'main/nvprogram.c',
+ 'main/pack.c',
+ 'main/pixel.c',
+ 'main/pixelstore.c',
+ 'main/pixeltransfer.c',
+ 'main/points.c',
+ 'main/polygon.c',
+ 'main/querymatrix.c',
+ 'main/queryobj.c',
+ 'main/rastpos.c',
+ 'main/readpix.c',
+ 'main/remap.c',
+ 'main/renderbuffer.c',
+ 'main/scissor.c',
+ 'main/shaderapi.c',
+ 'main/shaderobj.c',
+ 'main/shared.c',
+ 'main/state.c',
+ 'main/stencil.c',
+ 'main/syncobj.c',
+ 'main/texcompress.c',
+ 'main/texcompress_s3tc.c',
+ 'main/texcompress_fxt1.c',
+ 'main/texenv.c',
+ 'main/texenvprogram.c',
+ 'main/texfetch.c',
+ 'main/texformat.c',
+ 'main/texgen.c',
+ 'main/texgetimage.c',
+ 'main/teximage.c',
+ 'main/texobj.c',
+ 'main/texpal.c',
+ 'main/texparam.c',
+ 'main/texrender.c',
+ 'main/texstate.c',
+ 'main/texstore.c',
+ 'main/transformfeedback.c',
+ 'main/uniforms.c',
+ 'main/varray.c',
+ 'main/version.c',
+ 'main/viewport.c',
+ 'main/vtxfmt.c',
+]
- mesa = env.ConvenienceLibrary(
- target = 'mesa',
- source = mesa_sources,
- )
- Export('mesa')
+math_sources = [
+ 'math/m_debug_clip.c',
+ 'math/m_debug_norm.c',
+ 'math/m_debug_xform.c',
+ 'math/m_eval.c',
+ 'math/m_matrix.c',
+ 'math/m_translate.c',
+ 'math/m_vector.c',
+ 'math/m_xform.c',
+]
+
+vbo_sources = [
+ 'vbo/vbo_context.c',
+ 'vbo/vbo_exec.c',
+ 'vbo/vbo_exec_api.c',
+ 'vbo/vbo_exec_array.c',
+ 'vbo/vbo_exec_draw.c',
+ 'vbo/vbo_exec_eval.c',
+ 'vbo/vbo_rebase.c',
+ 'vbo/vbo_split.c',
+ 'vbo/vbo_split_copy.c',
+ 'vbo/vbo_split_inplace.c',
+ 'vbo/vbo_save.c',
+ 'vbo/vbo_save_api.c',
+ 'vbo/vbo_save_draw.c',
+ 'vbo/vbo_save_loopback.c',
+]
+
+vf_sources = [
+ 'vf/vf.c',
+ 'vf/vf_generic.c',
+ 'vf/vf_sse.c',
+]
+
+statetracker_sources = [
+ 'state_tracker/st_atom.c',
+ 'state_tracker/st_atom_blend.c',
+ 'state_tracker/st_atom_clip.c',
+ 'state_tracker/st_atom_constbuf.c',
+ 'state_tracker/st_atom_depth.c',
+ 'state_tracker/st_atom_framebuffer.c',
+ 'state_tracker/st_atom_msaa.c',
+ 'state_tracker/st_atom_pixeltransfer.c',
+ 'state_tracker/st_atom_sampler.c',
+ 'state_tracker/st_atom_scissor.c',
+ 'state_tracker/st_atom_shader.c',
+ 'state_tracker/st_atom_rasterizer.c',
+ 'state_tracker/st_atom_stipple.c',
+ 'state_tracker/st_atom_texture.c',
+ 'state_tracker/st_atom_viewport.c',
+ 'state_tracker/st_cb_accum.c',
+ 'state_tracker/st_cb_bitmap.c',
+ 'state_tracker/st_cb_blit.c',
+ 'state_tracker/st_cb_bufferobjects.c',
+ 'state_tracker/st_cb_clear.c',
+ 'state_tracker/st_cb_condrender.c',
+ 'state_tracker/st_cb_flush.c',
+ 'state_tracker/st_cb_drawpixels.c',
+ 'state_tracker/st_cb_drawtex.c',
+ 'state_tracker/st_cb_eglimage.c',
+ 'state_tracker/st_cb_fbo.c',
+ 'state_tracker/st_cb_feedback.c',
+ 'state_tracker/st_cb_program.c',
+ 'state_tracker/st_cb_queryobj.c',
+ 'state_tracker/st_cb_rasterpos.c',
+ 'state_tracker/st_cb_readpixels.c',
+ 'state_tracker/st_cb_strings.c',
+ 'state_tracker/st_cb_texture.c',
+ 'state_tracker/st_cb_viewport.c',
+ 'state_tracker/st_cb_xformfb.c',
+ 'state_tracker/st_context.c',
+ 'state_tracker/st_debug.c',
+ 'state_tracker/st_draw.c',
+ 'state_tracker/st_draw_feedback.c',
+ 'state_tracker/st_extensions.c',
+ 'state_tracker/st_format.c',
+ 'state_tracker/st_gen_mipmap.c',
+ 'state_tracker/st_manager.c',
+ 'state_tracker/st_mesa_to_tgsi.c',
+ 'state_tracker/st_program.c',
+ 'state_tracker/st_texture.c',
+]
+
+program_sources = [
+ 'program/arbprogparse.c',
+ 'program/hash_table.c',
+ 'program/ir_to_mesa.cpp',
+ 'program/lex.yy.c',
+ 'program/nvfragparse.c',
+ 'program/nvvertparse.c',
+ 'program/program.c',
+ 'program/program_parse.tab.c',
+ 'program/program_parse_extra.c',
+ 'program/prog_cache.c',
+ 'program/prog_execute.c',
+ 'program/prog_instruction.c',
+ 'program/prog_noise.c',
+ 'program/prog_optimize.c',
+ 'program/prog_parameter.c',
+ 'program/prog_parameter_layout.c',
+ 'program/prog_print.c',
+ 'program/prog_statevars.c',
+ 'program/prog_uniform.c',
+ 'program/programopt.c',
+ 'program/sampler.cpp',
+ 'program/symbol_table.c',
+]
+
+mesa_sources = (
+ main_sources +
+ math_sources +
+ program_sources +
+ vbo_sources +
+ vf_sources +
+ statetracker_sources
+)
+
+#
+# Assembly sources
+#
+if env['gcc'] and env['platform'] != 'windows':
+ if env['machine'] == 'x86':
+ env.Append(CPPDEFINES = [
+ 'USE_X86_ASM',
+ 'USE_MMX_ASM',
+ 'USE_3DNOW_ASM',
+ 'USE_SSE_ASM',
+ ])
+ mesa_sources += [
+ 'x86/common_x86.c',
+ 'x86/x86_xform.c',
+ 'x86/3dnow.c',
+ 'x86/sse.c',
+ 'x86/common_x86_asm.S',
+ 'x86/x86_xform2.S',
+ 'x86/x86_xform3.S',
+ 'x86/x86_xform4.S',
+ 'x86/x86_cliptest.S',
+ 'x86/mmx_blend.S',
+ 'x86/3dnow_xform1.S',
+ 'x86/3dnow_xform2.S',
+ 'x86/3dnow_xform3.S',
+ 'x86/3dnow_xform4.S',
+ 'x86/3dnow_normal.S',
+ 'x86/sse_xform1.S',
+ 'x86/sse_xform2.S',
+ 'x86/sse_xform3.S',
+ 'x86/sse_xform4.S',
+ 'x86/sse_normal.S',
+ 'x86/read_rgba_span_x86.S',
+ ]
+ elif env['machine'] == 'x86_64':
+ env.Append(CPPDEFINES = [
+ 'USE_X86_64_ASM',
+ ])
+ mesa_sources += [
+ 'x86-64/x86-64.c',
+ 'x86-64/xform4.S',
+ ]
+ elif env['machine'] == 'ppc':
+ env.Append(CPPDEFINES = [
+ 'USE_PPC_ASM',
+ 'USE_VMX_ASM',
+ ])
+ mesa_sources += [
+ 'ppc/common_ppc.c',
+ ]
+ elif env['machine'] == 'sparc':
+ mesa_sources += [
+ 'sparc/sparc.c',
+ 'sparc/clip.S',
+ 'sparc/norm.S',
+ 'sparc/xform.S',
+ ]
+ else:
+ pass
+
+ # Generate matypes.h
+ if env['machine'] in ('x86', 'x86_64'):
+ # See http://www.scons.org/wiki/UsingCodeGenerators
+ gen_matypes = env.Program(
+ target = 'gen_matypes',
+ source = 'x86/gen_matypes.c',
+ )
+ matypes = env.Command(
+ 'matypes.h',
+ gen_matypes,
+ gen_matypes[0].abspath + ' > $TARGET',
+ )
+ # Add the dir containing the generated header (somewhere inside the
+ # build dir) to the include path
+ env.Append(CPPPATH = [matypes[0].dir])
+
+#
+# Libraries
+#
+
+mesa = env.ConvenienceLibrary(
+ target = 'mesa',
+ source = mesa_sources,
+)
+
+env.Alias('mesa', mesa)
+
+Export('mesa')
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 9946bf1990..ba8be12571 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -52,6 +52,7 @@
#include "main/readpix.h"
#include "main/scissor.h"
#include "main/shaderapi.h"
+#include "main/shaderobj.h"
#include "main/state.h"
#include "main/stencil.h"
#include "main/texobj.h"
@@ -103,6 +104,8 @@ struct save_state
/** META_ALPHA_TEST */
GLboolean AlphaEnabled;
+ GLenum AlphaFunc;
+ GLclampf AlphaRef;
/** META_BLEND */
GLbitfield BlendEnabled;
@@ -143,7 +146,10 @@ struct save_state
struct gl_vertex_program *VertexProgram;
GLboolean FragmentProgramEnabled;
struct gl_fragment_program *FragmentProgram;
- GLuint Shader;
+ struct gl_shader_program *VertexShader;
+ struct gl_shader_program *GeometryShader;
+ struct gl_shader_program *FragmentShader;
+ struct gl_shader_program *ActiveShader;
/** META_STENCIL_TEST */
struct gl_stencil_attrib Stencil;
@@ -324,6 +330,8 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
if (state & META_ALPHA_TEST) {
save->AlphaEnabled = ctx->Color.AlphaEnabled;
+ save->AlphaFunc = ctx->Color.AlphaFunc;
+ save->AlphaRef = ctx->Color.AlphaRef;
if (ctx->Color.AlphaEnabled)
_mesa_set_enable(ctx, GL_ALPHA_TEST, GL_FALSE);
}
@@ -433,8 +441,15 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
}
if (ctx->Extensions.ARB_shader_objects) {
- save->Shader = ctx->Shader.CurrentProgram ?
- ctx->Shader.CurrentProgram->Name : 0;
+ _mesa_reference_shader_program(ctx, &save->VertexShader,
+ ctx->Shader.CurrentVertexProgram);
+ _mesa_reference_shader_program(ctx, &save->GeometryShader,
+ ctx->Shader.CurrentGeometryProgram);
+ _mesa_reference_shader_program(ctx, &save->FragmentShader,
+ ctx->Shader.CurrentFragmentProgram);
+ _mesa_reference_shader_program(ctx, &save->ActiveShader,
+ ctx->Shader.CurrentFragmentProgram);
+
_mesa_UseProgramObjectARB(0);
}
}
@@ -463,7 +478,8 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
_mesa_set_enable(ctx, GL_TEXTURE_1D, GL_FALSE);
_mesa_set_enable(ctx, GL_TEXTURE_2D, GL_FALSE);
_mesa_set_enable(ctx, GL_TEXTURE_3D, GL_FALSE);
- _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP, GL_FALSE);
+ if (ctx->Extensions.ARB_texture_cube_map)
+ _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP, GL_FALSE);
_mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE, GL_FALSE);
_mesa_set_enable(ctx, GL_TEXTURE_GEN_S, GL_FALSE);
_mesa_set_enable(ctx, GL_TEXTURE_GEN_T, GL_FALSE);
@@ -565,6 +581,7 @@ _mesa_meta_end(struct gl_context *ctx)
if (state & META_ALPHA_TEST) {
if (ctx->Color.AlphaEnabled != save->AlphaEnabled)
_mesa_set_enable(ctx, GL_ALPHA_TEST, save->AlphaEnabled);
+ _mesa_AlphaFunc(save->AlphaFunc, save->AlphaRef);
}
if (state & META_BLEND) {
@@ -664,9 +681,19 @@ _mesa_meta_end(struct gl_context *ctx)
_mesa_reference_fragprog(ctx, &save->FragmentProgram, NULL);
}
- if (ctx->Extensions.ARB_shader_objects) {
- _mesa_UseProgramObjectARB(save->Shader);
- }
+ if (ctx->Extensions.ARB_vertex_shader)
+ _mesa_use_shader_program(ctx, GL_VERTEX_SHADER, save->VertexShader);
+
+ if (ctx->Extensions.ARB_geometry_shader4)
+ _mesa_use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB,
+ save->GeometryShader);
+
+ if (ctx->Extensions.ARB_fragment_shader)
+ _mesa_use_shader_program(ctx, GL_FRAGMENT_SHADER,
+ save->FragmentShader);
+
+ _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram,
+ save->ActiveShader);
}
if (state & META_STENCIL_TEST) {
@@ -1953,13 +1980,39 @@ _mesa_meta_DrawPixels(struct gl_context *ctx,
_mesa_meta_end(ctx);
}
+static GLboolean
+alpha_test_raster_color(struct gl_context *ctx)
+{
+ GLfloat alpha = ctx->Current.RasterColor[ACOMP];
+ GLfloat ref = ctx->Color.AlphaRef;
+
+ switch (ctx->Color.AlphaFunc) {
+ case GL_NEVER:
+ return GL_FALSE;
+ case GL_LESS:
+ return alpha < ref;
+ case GL_EQUAL:
+ return alpha == ref;
+ case GL_LEQUAL:
+ return alpha <= ref;
+ case GL_GREATER:
+ return alpha > ref;
+ case GL_NOTEQUAL:
+ return alpha != ref;
+ case GL_GEQUAL:
+ return alpha >= ref;
+ case GL_ALWAYS:
+ return GL_TRUE;
+ default:
+ assert(0);
+ return GL_FALSE;
+ }
+}
/**
- * Do glBitmap with a alpha texture quad. Use the alpha test to
- * cull the 'off' bits. If alpha test is already enabled, fall back
- * to swrast (should be a rare case).
- * A bitmap cache as in the gallium/mesa state tracker would
- * improve performance a lot.
+ * Do glBitmap with a alpha texture quad. Use the alpha test to cull
+ * the 'off' bits. A bitmap cache as in the gallium/mesa state
+ * tracker would improve performance a lot.
*/
void
_mesa_meta_Bitmap(struct gl_context *ctx,
@@ -1971,6 +2024,7 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
struct temp_texture *tex = get_bitmap_temp_texture(ctx);
const GLenum texIntFormat = GL_ALPHA;
const struct gl_pixelstore_attrib unpackSave = *unpack;
+ GLubyte fg, bg;
struct vertex {
GLfloat x, y, z, s, t, r, g, b, a;
};
@@ -1982,7 +2036,7 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
* Check if swrast fallback is needed.
*/
if (ctx->_ImageTransferState ||
- ctx->Color.AlphaEnabled ||
+ ctx->FragmentProgram._Enabled ||
ctx->Fog.Enabled ||
ctx->Texture._EnabledUnits ||
width > tex->MaxSize ||
@@ -1991,6 +2045,9 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
return;
}
+ if (ctx->Color.AlphaEnabled && !alpha_test_raster_color(ctx))
+ return;
+
/* Most GL state applies to glBitmap (like blending, stencil, etc),
* but a there's a few things we need to override:
*/
@@ -2072,21 +2129,26 @@ _mesa_meta_Bitmap(struct gl_context *ctx,
_mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts);
}
+ /* choose different foreground/background alpha values */
+ CLAMPED_FLOAT_TO_UBYTE(fg, ctx->Current.RasterColor[ACOMP]);
+ bg = (fg > 127 ? 0 : 255);
+
bitmap1 = _mesa_map_pbo_source(ctx, &unpackSave, bitmap1);
if (!bitmap1) {
_mesa_meta_end(ctx);
return;
}
- bitmap8 = (GLubyte *) calloc(1, width * height);
+ bitmap8 = (GLubyte *) malloc(width * height);
if (bitmap8) {
+ memset(bitmap8, bg, width * height);
_mesa_expand_bitmap(width, height, &unpackSave, bitmap1,
- bitmap8, width, 0xff);
+ bitmap8, width, fg);
_mesa_set_enable(ctx, tex->Target, GL_TRUE);
_mesa_set_enable(ctx, GL_ALPHA_TEST, GL_TRUE);
- _mesa_AlphaFunc(GL_GREATER, 0.0);
+ _mesa_AlphaFunc(GL_NOTEQUAL, UBYTE_TO_FLOAT(bg));
setup_drawpix_texture(ctx, tex, newTex, texIntFormat, width, height,
GL_ALPHA, GL_UNSIGNED_BYTE, bitmap8);
@@ -2531,7 +2593,6 @@ copy_tex_image(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- GLsizei postConvWidth = width, postConvHeight = height;
GLenum format, type;
GLint bpp;
void *buf;
@@ -2539,6 +2600,7 @@ copy_tex_image(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
texObj = _mesa_get_current_tex_object(ctx, target);
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+ /* Choose format/type for temporary image buffer */
format = _mesa_base_tex_format(ctx, internalFormat);
type = get_temp_image_type(ctx, format);
bpp = _mesa_bytes_per_pixel(format, type);
@@ -2570,12 +2632,8 @@ copy_tex_image(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
ctx->Driver.FreeTexImageData(ctx, texImage);
}
- _mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, postConvHeight, 1,
- border, internalFormat);
-
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, GL_NONE, GL_NONE);
+ /* The texture's format was already chosen in _mesa_CopyTexImage() */
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
/*
* Store texture data (with pixel transfer ops)
@@ -2628,7 +2686,8 @@ _mesa_meta_CopyTexImage2D(struct gl_context *ctx, GLenum target, GLint level,
* Have to be careful with locking and meta state for pixel transfer.
*/
static void
-copy_tex_sub_image(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
+copy_tex_sub_image(struct gl_context *ctx,
+ GLuint dims, GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint x, GLint y,
GLsizei width, GLsizei height)
@@ -2642,6 +2701,7 @@ copy_tex_sub_image(struct gl_context *ctx, GLuint dims, GLenum target, GLint lev
texObj = _mesa_get_current_tex_object(ctx, target);
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ /* Choose format/type for temporary image buffer */
format = _mesa_get_format_base_format(texImage->TexFormat);
type = get_temp_image_type(ctx, format);
bpp = _mesa_bytes_per_pixel(format, type);
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index a00018cafa..4ecddbc048 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -86,11 +86,12 @@ subdirs:
symlinks:
-depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
+depend: $(C_SOURCES) $(CXX_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
@ echo "running $(MKDEP)"
@ rm -f depend
@ touch depend
- @ $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
+ @ $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) \
+ $(C_SOURCES) $(CXX_SOURCES) \
$(ASM_SOURCES) > /dev/null 2>/dev/null
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index c195c4fd8f..42be77fd7c 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -738,12 +738,18 @@ static const struct { unsigned int attrib, offset; } attribMap[] = {
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+
+/**
+ * Return the value of a configuration attribute. The attribute is
+ * indicated by the index.
+ */
static int
driGetConfigAttribIndex(const __DRIconfig *config,
unsigned int index, unsigned int *value)
{
switch (attribMap[index].attrib) {
case __DRI_ATTRIB_RENDER_TYPE:
+ /* no support for color index mode */
*value = __DRI_ATTRIB_RGBA_BIT;
break;
case __DRI_ATTRIB_CONFIG_CAVEAT:
@@ -755,13 +761,16 @@ driGetConfigAttribIndex(const __DRIconfig *config,
*value = 0;
break;
case __DRI_ATTRIB_SWAP_METHOD:
+ /* XXX no return value??? */
break;
case __DRI_ATTRIB_FLOAT_MODE:
+ /* this field is not int-sized */
*value = config->modes.floatMode;
break;
default:
+ /* any other int-sized field */
*value = *(unsigned int *)
((char *) &config->modes + attribMap[index].offset);
@@ -771,6 +780,13 @@ driGetConfigAttribIndex(const __DRIconfig *config,
return GL_TRUE;
}
+
+/**
+ * Get the value of a configuration attribute.
+ * \param attrib the attribute (one of the _DRI_ATTRIB_x tokens)
+ * \param value returns the attribute's value
+ * \return 1 for success, 0 for failure
+ */
int
driGetConfigAttrib(const __DRIconfig *config,
unsigned int attrib, unsigned int *value)
@@ -784,6 +800,14 @@ driGetConfigAttrib(const __DRIconfig *config,
return GL_FALSE;
}
+
+/**
+ * Get a configuration attribute name and value, given an index.
+ * \param index which field of the __DRIconfig to query
+ * \param attrib returns the attribute name (one of the _DRI_ATTRIB_x tokens)
+ * \param value returns the attribute's value
+ * \return 1 for success, 0 for failure
+ */
int
driIndexConfigAttrib(const __DRIconfig *config, int index,
unsigned int *attrib, unsigned int *value)
diff --git a/src/mesa/drivers/dri/common/xmlpool/Makefile b/src/mesa/drivers/dri/common/xmlpool/Makefile
index 62ec919ea6..b71629e9f1 100644
--- a/src/mesa/drivers/dri/common/xmlpool/Makefile
+++ b/src/mesa/drivers/dri/common/xmlpool/Makefile
@@ -62,7 +62,7 @@ clean:
# Default target options.h
options.h: t_options.h mo
- python gen_xmlpool.py $(LANGS) > options.h
+ $(PYTHON2) $(PYTHON_FLAGS) gen_xmlpool.py $(LANGS) > options.h
# Update .mo files from the corresponding .po files.
mo:
diff --git a/src/mesa/drivers/dri/i915/intel_structs.h b/src/mesa/drivers/dri/i915/intel_structs.h
deleted file mode 100644
index 522e3bd92c..0000000000
--- a/src/mesa/drivers/dri/i915/intel_structs.h
+++ /dev/null
@@ -1,132 +0,0 @@
-#ifndef INTEL_STRUCTS_H
-#define INTEL_STRUCTS_H
-
-struct br0 {
- GLuint length:8;
- GLuint pad0:3;
- GLuint dst_tiled:1;
- GLuint pad1:8;
- GLuint write_rgb:1;
- GLuint write_alpha:1;
- GLuint opcode:7;
- GLuint client:3;
-};
-
-
-struct br13 {
- GLint dest_pitch:16;
- GLuint rop:8;
- GLuint color_depth:2;
- GLuint pad1:3;
- GLuint mono_source_transparency:1;
- GLuint clipping_enable:1;
- GLuint pad0:1;
-};
-
-
-
-/* This is an attempt to move some of the 2D interaction in this
- * driver to using structs for packets rather than a bunch of #defines
- * and dwords.
- */
-struct xy_color_blit {
- struct br0 br0;
- struct br13 br13;
-
- struct {
- GLuint dest_x1:16;
- GLuint dest_y1:16;
- } dw2;
-
- struct {
- GLuint dest_x2:16;
- GLuint dest_y2:16;
- } dw3;
-
- GLuint dest_base_addr;
- GLuint color;
-};
-
-struct xy_src_copy_blit {
- struct br0 br0;
- struct br13 br13;
-
- struct {
- GLuint dest_x1:16;
- GLuint dest_y1:16;
- } dw2;
-
- struct {
- GLuint dest_x2:16;
- GLuint dest_y2:16;
- } dw3;
-
- GLuint dest_base_addr;
-
- struct {
- GLuint src_x1:16;
- GLuint src_y1:16;
- } dw5;
-
- struct {
- GLint src_pitch:16;
- GLuint pad:16;
- } dw6;
-
- GLuint src_base_addr;
-};
-
-struct xy_setup_blit {
- struct br0 br0;
- struct br13 br13;
-
- struct {
- GLuint clip_x1:16;
- GLuint clip_y1:16;
- } dw2;
-
- struct {
- GLuint clip_x2:16;
- GLuint clip_y2:16;
- } dw3;
-
- GLuint dest_base_addr;
- GLuint background_color;
- GLuint foreground_color;
- GLuint pattern_base_addr;
-};
-
-
-struct xy_text_immediate_blit {
- struct {
- GLuint length:8;
- GLuint pad2:3;
- GLuint dst_tiled:1;
- GLuint pad1:4;
- GLuint byte_packed:1;
- GLuint pad0:5;
- GLuint opcode:7;
- GLuint client:3;
- } dw0;
-
- struct {
- GLuint dest_x1:16;
- GLuint dest_y1:16;
- } dw1;
-
- struct {
- GLuint dest_x2:16;
- GLuint dest_y2:16;
- } dw2;
-
- /* Src bitmap data follows as inline dwords.
- */
-};
-
-
-#define CLIENT_2D 0x2
-#define OPCODE_XY_SETUP_BLT 0x1
-#define OPCODE_XY_COLOR_BLT 0x50
-#define OPCODE_XY_TEXT_IMMEDIATE_BLT 0x31
-
-#endif
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index 00418760da..a8369b07c3 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -204,7 +204,7 @@ static void upload_cc_unit(struct brw_context *brw)
cc.cc2.depth_write_enable = ctx->Depth.Mask;
}
- if (intel->stats_wm || (INTEL_DEBUG & DEBUG_STATS))
+ if (intel->stats_wm || unlikely(INTEL_DEBUG & DEBUG_STATS))
cc.cc5.statistics_enable = 1;
/* CACHE_NEW_CC_VP */
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index 15e60bf3ce..1be165cc9a 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -133,13 +133,13 @@ static void compile_clip_prog( struct brw_context *brw,
*/
program = brw_get_program(&c.func, &program_size);
- if (INTEL_DEBUG & DEBUG_CLIP) {
+ if (unlikely(INTEL_DEBUG & DEBUG_CLIP)) {
printf("clip:\n");
for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
brw_disasm(stdout, &((struct brw_instruction *)program)[i],
intel->gen);
printf("\n");
- }
+ }
/* Upload
*/
diff --git a/src/mesa/drivers/dri/i965/brw_clip_state.c b/src/mesa/drivers/dri/i965/brw_clip_state.c
index 885167da90..60fd5fa7d9 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_state.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_state.c
@@ -114,10 +114,10 @@ clip_unit_create_from_key(struct brw_context *brw,
clip.thread4.max_threads = 1 - 1;
}
- if (INTEL_DEBUG & DEBUG_SINGLE_THREAD)
+ if (unlikely(INTEL_DEBUG & DEBUG_SINGLE_THREAD))
clip.thread4.max_threads = 0;
- if (INTEL_DEBUG & DEBUG_STATS)
+ if (unlikely(INTEL_DEBUG & DEBUG_STATS))
clip.thread4.stats_enable = 1;
clip.clip5.userclip_enable_flags = 0x7f;
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 3c4ae8a7a4..cb0a8b96c9 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -124,7 +124,7 @@ GLboolean brwCreateContext( int api,
(i == MESA_SHADER_FRAGMENT);
if (intel->gen == 6)
- ctx->ShaderCompilerOptions[i].EmitNoIfs = GL_TRUE;
+ ctx->ShaderCompilerOptions[i].EmitNoIfs = (i == MESA_SHADER_VERTEX);
}
ctx->Const.VertexProgram.MaxNativeInstructions = (16 * 1024);
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index f205c07a72..335339515a 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -173,8 +173,6 @@ struct brw_fragment_program {
GLuint id; /**< serial no. to identify frag progs, never re-used */
GLboolean isGLSL; /**< really, any IF/LOOP/CONT/BREAK instructions */
- GLboolean use_const_buffer;
-
/** for debugging, which texture units are referenced */
GLbitfield tex_units_used;
};
@@ -190,6 +188,13 @@ struct brw_shader_program {
struct gl_shader_program base;
};
+enum param_conversion {
+ PARAM_NO_CONVERT,
+ PARAM_CONVERT_F2I,
+ PARAM_CONVERT_F2U,
+ PARAM_CONVERT_F2B,
+};
+
/* Data about a particular attempt to compile a program. Note that
* there can be many of these, each in a different GL state
* corresponding to a different brw_wm_prog_key struct, with different
@@ -204,12 +209,16 @@ struct brw_wm_prog_data {
GLuint total_scratch;
GLuint nr_params; /**< number of float params/constants */
+ GLuint nr_pull_params;
GLboolean error;
/* Pointer to tracked values (only valid once
* _mesa_load_state_parameters has been called at runtime).
*/
- const GLfloat *param[BRW_MAX_CURBE];
+ const float *param[MAX_UNIFORMS * 4]; /* should be: BRW_MAX_CURBE */
+ enum param_conversion param_convert[MAX_UNIFORMS * 4];
+ const float *pull_param[MAX_UNIFORMS * 4];
+ enum param_conversion pull_param_convert[MAX_UNIFORMS * 4];
};
struct brw_sf_prog_data {
@@ -800,6 +809,35 @@ brw_fragment_program_const(const struct gl_fragment_program *p)
return (const struct brw_fragment_program *) p;
}
+static inline
+float convert_param(enum param_conversion conversion, float param)
+{
+ union {
+ float f;
+ uint32_t u;
+ int32_t i;
+ } fi;
+
+ switch (conversion) {
+ case PARAM_NO_CONVERT:
+ return param;
+ case PARAM_CONVERT_F2I:
+ fi.i = param;
+ return fi.f;
+ case PARAM_CONVERT_F2U:
+ fi.u = param;
+ return fi.f;
+ case PARAM_CONVERT_F2B:
+ if (param != 0.0)
+ fi.i = 1;
+ else
+ fi.i = 0;
+ return fi.f;
+ default:
+ return param;
+ }
+}
+
GLboolean brw_do_cubemap_normalize(struct exec_list *instructions);
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 9ce0d8decd..7b823eb201 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -199,8 +199,10 @@ static void prepare_constant_buffer(struct brw_context *brw)
GLuint offset = brw->curbe.wm_start * 16;
/* copy float constants */
- for (i = 0; i < brw->wm.prog_data->nr_params; i++)
- buf[offset + i] = *brw->wm.prog_data->param[i];
+ for (i = 0; i < brw->wm.prog_data->nr_params; i++) {
+ buf[offset + i] = convert_param(brw->wm.prog_data->param_convert[i],
+ *brw->wm.prog_data->param[i]);
+ }
}
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 9633c95ff5..239586a036 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -551,6 +551,7 @@
#define BRW_OPCODE_POP 47
#define BRW_OPCODE_WAIT 48
#define BRW_OPCODE_SEND 49
+#define BRW_OPCODE_SENDC 50
#define BRW_OPCODE_MATH 56
#define BRW_OPCODE_ADD 64
#define BRW_OPCODE_MUL 65
@@ -929,6 +930,11 @@
#define CMD_3D_CLIP_STATE 0x7812 /* GEN6+ */
/* DW1 */
# define GEN6_CLIP_STATISTICS_ENABLE (1 << 10)
+/**
+ * Just does cheap culling based on the clip distance. Bits must be
+ * disjoint with USER_CLIP_CLIP_DISTANCE bits.
+ */
+# define GEN6_USER_CLIP_CULL_DISTANCES_SHIFT 0
/* DW2 */
# define GEN6_CLIP_ENABLE (1 << 31)
# define GEN6_CLIP_API_OGL (0 << 30)
@@ -936,6 +942,8 @@
# define GEN6_CLIP_XY_TEST (1 << 28)
# define GEN6_CLIP_Z_TEST (1 << 27)
# define GEN6_CLIP_GB_TEST (1 << 26)
+/** 8-bit field of which user clip distances to clip aganist. */
+# define GEN6_USER_CLIP_CLIP_DISTANCES_SHIFT 16
# define GEN6_CLIP_MODE_NORMAL (0 << 13)
# define GEN6_CLIP_MODE_REJECT_ALL (3 << 13)
# define GEN6_CLIP_MODE_ACCEPT_ALL (4 << 13)
diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index 12b8f2e467..962c04128b 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -72,6 +72,7 @@ struct {
[BRW_OPCODE_CMPN] = { .name = "cmpn", .nsrc = 2, .ndst = 1 },
[BRW_OPCODE_SEND] = { .name = "send", .nsrc = 1, .ndst = 1 },
+ [BRW_OPCODE_SENDC] = { .name = "sendc", .nsrc = 1, .ndst = 1 },
[BRW_OPCODE_NOP] = { .name = "nop", .nsrc = 0, .ndst = 0 },
[BRW_OPCODE_JMPI] = { .name = "jmpi", .nsrc = 1, .ndst = 0 },
[BRW_OPCODE_IF] = { .name = "if", .nsrc = 2, .ndst = 0 },
@@ -460,6 +461,9 @@ static int reg (FILE *file, GLuint _reg_file, GLuint _reg_nr)
case BRW_ARF_ACCUMULATOR:
format (file, "acc%d", _reg_nr & 0x0f);
break;
+ case BRW_ARF_FLAG:
+ format (file, "f%d", _reg_nr & 0x0f);
+ break;
case BRW_ARF_MASK:
format (file, "mask%d", _reg_nr & 0x0f);
break;
@@ -876,7 +880,8 @@ int brw_disasm (FILE *file, struct brw_instruction *inst, int gen)
string (file, " ");
err |= control (file, "function", math_function,
inst->header.destreg__conditionalmod, NULL);
- } else if (inst->header.opcode != BRW_OPCODE_SEND)
+ } else if (inst->header.opcode != BRW_OPCODE_SEND &&
+ inst->header.opcode != BRW_OPCODE_SENDC)
err |= control (file, "conditional modifier", conditional_modifier,
inst->header.destreg__conditionalmod, NULL);
@@ -907,7 +912,8 @@ int brw_disasm (FILE *file, struct brw_instruction *inst, int gen)
err |= src1 (file, inst);
}
- if (inst->header.opcode == BRW_OPCODE_SEND) {
+ if (inst->header.opcode == BRW_OPCODE_SEND ||
+ inst->header.opcode == BRW_OPCODE_SENDC) {
int target;
if (gen >= 6)
@@ -1070,7 +1076,8 @@ int brw_disasm (FILE *file, struct brw_instruction *inst, int gen)
err |= control (file, "thread control", thread_ctrl, inst->header.thread_control, &space);
if (gen >= 6)
err |= control (file, "acc write control", accwr, inst->header.acc_wr_control, &space);
- if (inst->header.opcode == BRW_OPCODE_SEND)
+ if (inst->header.opcode == BRW_OPCODE_SEND ||
+ inst->header.opcode == BRW_OPCODE_SENDC)
err |= control (file, "end of thread", end_of_thread,
inst->bits3.generic.end_of_thread, &space);
if (space)
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 04bc8cb2db..a1f403ca4e 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -42,7 +42,7 @@
#include "intel_batchbuffer.h"
-#define FILE_DEBUG_FLAG DEBUG_BATCH
+#define FILE_DEBUG_FLAG DEBUG_PRIMS
static GLuint prim_to_hw_prim[GL_POLYGON+1] = {
_3DPRIM_POINTLIST,
@@ -83,8 +83,7 @@ static GLuint brw_set_prim(struct brw_context *brw,
struct gl_context *ctx = &brw->intel.ctx;
GLenum mode = prim->mode;
- if (INTEL_DEBUG & DEBUG_PRIMS)
- printf("PRIM: %s\n", _mesa_lookup_enum_by_nr(prim->mode));
+ DBG("PRIM: %s\n", _mesa_lookup_enum_by_nr(prim->mode));
/* Slight optimization to avoid the GS program when not needed:
*/
@@ -133,9 +132,8 @@ static void brw_emit_prim(struct brw_context *brw,
struct brw_3d_primitive prim_packet;
struct intel_context *intel = &brw->intel;
- if (INTEL_DEBUG & DEBUG_PRIMS)
- printf("PRIM: %s %d %d\n", _mesa_lookup_enum_by_nr(prim->mode),
- prim->start, prim->count);
+ DBG("PRIM: %s %d %d\n", _mesa_lookup_enum_by_nr(prim->mode),
+ prim->start, prim->count);
prim_packet.header.opcode = CMD_3D_PRIM;
prim_packet.header.length = sizeof(prim_packet)/4 - 2;
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index c4654360d4..2cefe614dd 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -168,7 +168,7 @@ static GLuint byte_types_scale[5] = {
static GLuint get_surface_type( GLenum type, GLuint size,
GLenum format, GLboolean normalized )
{
- if (INTEL_DEBUG & DEBUG_VERTS)
+ if (unlikely(INTEL_DEBUG & DEBUG_VERTS))
printf("type %s size %d normalized %d\n",
_mesa_lookup_enum_by_nr(type), size, normalized);
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 0e3ccfa46c..b4538e6e8a 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -900,14 +900,24 @@ void brw_math2(struct brw_compile *p,
void brw_oword_block_read(struct brw_compile *p,
struct brw_reg dest,
struct brw_reg mrf,
- int num_regs,
- GLuint offset);
+ uint32_t offset,
+ uint32_t bind_table_index);
-void brw_dp_READ_4( struct brw_compile *p,
- struct brw_reg dest,
- GLboolean relAddr,
- GLuint location,
- GLuint bind_table_index );
+void brw_oword_block_read_scratch(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ int num_regs,
+ GLuint offset);
+
+void brw_oword_block_write_scratch(struct brw_compile *p,
+ struct brw_reg mrf,
+ int num_regs,
+ GLuint offset);
+
+void brw_dword_scattered_read(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ uint32_t bind_table_index);
void brw_dp_READ_4_vs( struct brw_compile *p,
struct brw_reg dest,
@@ -920,11 +930,6 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p,
GLuint offset,
GLuint bind_table_index);
-void brw_oword_block_write(struct brw_compile *p,
- struct brw_reg mrf,
- int num_regs,
- GLuint offset);
-
/* If/else/endif. Works by manipulating the execution flags on each
* channel.
*/
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 6fbc39672f..9cb941dacf 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -496,20 +496,34 @@ static void brw_set_dp_write_message( struct brw_context *brw,
}
}
-static void brw_set_dp_read_message( struct brw_context *brw,
- struct brw_instruction *insn,
- GLuint binding_table_index,
- GLuint msg_control,
- GLuint msg_type,
- GLuint target_cache,
- GLuint msg_length,
- GLuint response_length,
- GLuint end_of_thread )
+static void
+brw_set_dp_read_message(struct brw_context *brw,
+ struct brw_instruction *insn,
+ GLuint binding_table_index,
+ GLuint msg_control,
+ GLuint msg_type,
+ GLuint target_cache,
+ GLuint msg_length,
+ GLuint response_length)
{
struct intel_context *intel = &brw->intel;
brw_set_src1(insn, brw_imm_d(0));
- if (intel->gen == 5) {
+ if (intel->gen >= 6) {
+ insn->bits3.dp_render_cache.binding_table_index = binding_table_index;
+ insn->bits3.dp_render_cache.msg_control = msg_control;
+ insn->bits3.dp_render_cache.pixel_scoreboard_clear = 0;
+ insn->bits3.dp_render_cache.msg_type = msg_type;
+ insn->bits3.dp_render_cache.send_commit_msg = 0;
+ insn->bits3.dp_render_cache.header_present = 1;
+ insn->bits3.dp_render_cache.response_length = response_length;
+ insn->bits3.dp_render_cache.msg_length = msg_length;
+ insn->bits3.dp_render_cache.end_of_thread = 0;
+ insn->header.destreg__conditionalmod = BRW_MESSAGE_TARGET_DATAPORT_READ;
+ /* XXX really need below? */
+ insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_DATAPORT_READ;
+ insn->bits2.send_gen5.end_of_thread = 0;
+ } else if (intel->gen == 5) {
insn->bits3.dp_read_gen5.binding_table_index = binding_table_index;
insn->bits3.dp_read_gen5.msg_control = msg_control;
insn->bits3.dp_read_gen5.msg_type = msg_type;
@@ -518,9 +532,9 @@ static void brw_set_dp_read_message( struct brw_context *brw,
insn->bits3.dp_read_gen5.response_length = response_length;
insn->bits3.dp_read_gen5.msg_length = msg_length;
insn->bits3.dp_read_gen5.pad1 = 0;
- insn->bits3.dp_read_gen5.end_of_thread = end_of_thread;
+ insn->bits3.dp_read_gen5.end_of_thread = 0;
insn->bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_DATAPORT_READ;
- insn->bits2.send_gen5.end_of_thread = end_of_thread;
+ insn->bits2.send_gen5.end_of_thread = 0;
} else {
insn->bits3.dp_read.binding_table_index = binding_table_index; /*0:7*/
insn->bits3.dp_read.msg_control = msg_control; /*8:11*/
@@ -530,7 +544,7 @@ static void brw_set_dp_read_message( struct brw_context *brw,
insn->bits3.dp_read.msg_length = msg_length; /*20:23*/
insn->bits3.dp_read.msg_target = BRW_MESSAGE_TARGET_DATAPORT_READ; /*24:27*/
insn->bits3.dp_read.pad1 = 0; /*28:30*/
- insn->bits3.dp_read.end_of_thread = end_of_thread; /*31*/
+ insn->bits3.dp_read.end_of_thread = 0; /*31*/
}
}
@@ -955,7 +969,7 @@ void brw_ENDIF(struct brw_compile *p,
brw_set_src0(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_UD));
brw_set_src1(insn, brw_imm_d(0x0));
} else {
- brw_set_dest(insn, retype(brw_vec4_grf(0,0), BRW_REGISTER_TYPE_W));
+ brw_set_dest(insn, brw_imm_w(0));
brw_set_src0(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D));
brw_set_src1(insn, retype(brw_null_reg(), BRW_REGISTER_TYPE_D));
}
@@ -1359,10 +1373,10 @@ void brw_math_16( struct brw_compile *p,
* The offset must be aligned to oword size (16 bytes). Used for
* register spilling.
*/
-void brw_oword_block_write(struct brw_compile *p,
- struct brw_reg mrf,
- int num_regs,
- GLuint offset)
+void brw_oword_block_write_scratch(struct brw_compile *p,
+ struct brw_reg mrf,
+ int num_regs,
+ GLuint offset)
{
struct intel_context *intel = &p->brw->intel;
uint32_t msg_control;
@@ -1458,11 +1472,11 @@ void brw_oword_block_write(struct brw_compile *p,
* spilling.
*/
void
-brw_oword_block_read(struct brw_compile *p,
- struct brw_reg dest,
- struct brw_reg mrf,
- int num_regs,
- GLuint offset)
+brw_oword_block_read_scratch(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ int num_regs,
+ GLuint offset)
{
uint32_t msg_control;
int rlen;
@@ -1512,69 +1526,108 @@ brw_oword_block_read(struct brw_compile *p,
BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ, /* msg_type */
1, /* target cache (render/scratch) */
1, /* msg_length */
- rlen,
- 0); /* eot */
+ rlen);
}
}
-
/**
* Read a float[4] vector from the data port Data Cache (const buffer).
* Location (in buffer) should be a multiple of 16.
* Used for fetching shader constants.
- * If relAddr is true, we'll do an indirect fetch using the address register.
*/
-void brw_dp_READ_4( struct brw_compile *p,
- struct brw_reg dest,
- GLboolean relAddr,
- GLuint location,
- GLuint bind_table_index )
+void brw_oword_block_read(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ uint32_t offset,
+ uint32_t bind_table_index)
{
- /* XXX: relAddr not implemented */
- GLuint msg_reg_nr = 1;
- {
- struct brw_reg b;
- brw_push_insn_state(p);
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- brw_set_compression_control(p, BRW_COMPRESSION_NONE);
- brw_set_mask_control(p, BRW_MASK_DISABLE);
+ struct intel_context *intel = &p->brw->intel;
- /* Setup MRF[1] with location/offset into const buffer */
- b = brw_message_reg(msg_reg_nr);
- b = retype(b, BRW_REGISTER_TYPE_UD);
- /* XXX I think we're setting all the dwords of MRF[1] to 'location'.
- * when the docs say only dword[2] should be set. Hmmm. But it works.
- */
- brw_MOV(p, b, brw_imm_ud(location));
- brw_pop_insn_state(p);
- }
+ /* On newer hardware, offset is in units of owords. */
+ if (intel->gen >= 6)
+ offset /= 16;
- {
- struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
-
- insn->header.predicate_control = BRW_PREDICATE_NONE;
- insn->header.compression_control = BRW_COMPRESSION_NONE;
- insn->header.destreg__conditionalmod = msg_reg_nr;
- insn->header.mask_control = BRW_MASK_DISABLE;
-
- /* cast dest to a uword[8] vector */
- dest = retype(vec8(dest), BRW_REGISTER_TYPE_UW);
+ mrf = retype(mrf, BRW_REGISTER_TYPE_UD);
- brw_set_dest(insn, dest);
- brw_set_src0(insn, brw_null_reg());
+ brw_push_insn_state(p);
+ brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ brw_set_compression_control(p, BRW_COMPRESSION_NONE);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
- brw_set_dp_read_message(p->brw,
- insn,
- bind_table_index,
- 0, /* msg_control (0 means 1 Oword) */
- BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ, /* msg_type */
- 0, /* source cache = data cache */
- 1, /* msg_length */
- 1, /* response_length (1 Oword) */
- 0); /* eot */
+ brw_MOV(p, mrf, retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
+
+ /* set message header global offset field (reg 0, element 2) */
+ brw_MOV(p,
+ retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE,
+ mrf.nr,
+ 2), BRW_REGISTER_TYPE_UD),
+ brw_imm_ud(offset));
+
+ struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
+ insn->header.destreg__conditionalmod = mrf.nr;
+
+ /* cast dest to a uword[8] vector */
+ dest = retype(vec8(dest), BRW_REGISTER_TYPE_UW);
+
+ brw_set_dest(insn, dest);
+ if (intel->gen >= 6) {
+ brw_set_src0(insn, mrf);
+ } else {
+ brw_set_src0(insn, brw_null_reg());
}
+
+ brw_set_dp_read_message(p->brw,
+ insn,
+ bind_table_index,
+ BRW_DATAPORT_OWORD_BLOCK_1_OWORDLOW,
+ BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ,
+ 0, /* source cache = data cache */
+ 1, /* msg_length */
+ 1); /* response_length (1 reg, 2 owords!) */
+
+ brw_pop_insn_state(p);
}
+/**
+ * Read a set of dwords from the data port Data Cache (const buffer).
+ *
+ * Location (in buffer) appears as UD offsets in the register after
+ * the provided mrf header reg.
+ */
+void brw_dword_scattered_read(struct brw_compile *p,
+ struct brw_reg dest,
+ struct brw_reg mrf,
+ uint32_t bind_table_index)
+{
+ mrf = retype(mrf, BRW_REGISTER_TYPE_UD);
+
+ brw_push_insn_state(p);
+ brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ brw_set_compression_control(p, BRW_COMPRESSION_NONE);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_MOV(p, mrf, retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
+ brw_pop_insn_state(p);
+
+ struct brw_instruction *insn = next_insn(p, BRW_OPCODE_SEND);
+ insn->header.destreg__conditionalmod = mrf.nr;
+
+ /* cast dest to a uword[8] vector */
+ dest = retype(vec8(dest), BRW_REGISTER_TYPE_UW);
+
+ brw_set_dest(insn, dest);
+ brw_set_src0(insn, brw_null_reg());
+
+ brw_set_dp_read_message(p->brw,
+ insn,
+ bind_table_index,
+ BRW_DATAPORT_DWORD_SCATTERED_BLOCK_8DWORDS,
+ BRW_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ,
+ 0, /* source cache = data cache */
+ 2, /* msg_length */
+ 1); /* response_length */
+}
+
+
/**
* Read float[4] constant(s) from VS constant buffer.
@@ -1628,8 +1681,7 @@ void brw_dp_READ_4_vs(struct brw_compile *p,
BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ, /* msg_type */
0, /* source cache = data cache */
1, /* msg_length */
- 1, /* response_length (1 Oword) */
- 0); /* eot */
+ 1); /* response_length (1 Oword) */
}
/**
@@ -1682,8 +1734,7 @@ void brw_dp_READ_4_vs_relative(struct brw_compile *p,
msg_type,
0, /* source cache = data cache */
2, /* msg_length */
- 1, /* response_length */
- 0); /* eot */
+ 1); /* response_length */
}
@@ -1703,8 +1754,13 @@ void brw_fb_WRITE(struct brw_compile *p,
GLuint msg_control, msg_type;
GLboolean header_present = GL_TRUE;
- insn = next_insn(p, BRW_OPCODE_SEND);
- insn->header.predicate_control = 0; /* XXX */
+ if (intel->gen >= 6 && binding_table_index == 0) {
+ insn = next_insn(p, BRW_OPCODE_SENDC);
+ } else {
+ insn = next_insn(p, BRW_OPCODE_SEND);
+ }
+ /* The execution mask is ignored for render target writes. */
+ insn->header.predicate_control = 0;
insn->header.compression_control = BRW_COMPRESSION_NONE;
if (intel->gen >= 6) {
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 174f622d59..edb02fabb2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -89,8 +89,6 @@ brw_compile_shader(struct gl_context *ctx, struct gl_shader *shader)
GLboolean
brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
{
- struct intel_context *intel = intel_context(ctx);
-
struct brw_shader *shader =
(struct brw_shader *)prog->_LinkedShaders[MESA_SHADER_FRAGMENT];
if (shader != NULL) {
@@ -103,10 +101,12 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
clone_ir_list(mem_ctx, shader->ir, shader->base.ir);
do_mat_op_to_vec(shader->ir);
- do_mod_to_fract(shader->ir);
- do_div_to_mul_rcp(shader->ir);
- do_sub_to_add_neg(shader->ir);
- do_explog_to_explog2(shader->ir);
+ lower_instructions(shader->ir,
+ MOD_TO_FRACT |
+ DIV_TO_MUL_RCP |
+ SUB_TO_ADD_NEG |
+ EXP_TO_EXP2 |
+ LOG_TO_LOG2);
do_lower_texture_projection(shader->ir);
brw_do_cubemap_normalize(shader->ir);
@@ -132,9 +132,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
GL_TRUE, /* temp */
GL_TRUE /* uniform */
) || progress;
- if (intel->gen == 6) {
- progress = do_if_to_cond_assign(shader->ir) || progress;
- }
+ progress = lower_quadop_vector(shader->ir, false) || progress;
} while (progress);
validate_ir_tree(shader->ir);
@@ -179,6 +177,46 @@ type_size(const struct glsl_type *type)
}
}
+/**
+ * Returns how many MRFs an FS opcode will write over.
+ *
+ * Note that this is not the 0 or 1 implied writes in an actual gen
+ * instruction -- the FS opcodes often generate MOVs in addition.
+ */
+int
+fs_visitor::implied_mrf_writes(fs_inst *inst)
+{
+ if (inst->mlen == 0)
+ return 0;
+
+ switch (inst->opcode) {
+ case FS_OPCODE_RCP:
+ case FS_OPCODE_RSQ:
+ case FS_OPCODE_SQRT:
+ case FS_OPCODE_EXP2:
+ case FS_OPCODE_LOG2:
+ case FS_OPCODE_SIN:
+ case FS_OPCODE_COS:
+ return 1;
+ case FS_OPCODE_POW:
+ return 2;
+ case FS_OPCODE_TEX:
+ case FS_OPCODE_TXB:
+ case FS_OPCODE_TXL:
+ return 1;
+ case FS_OPCODE_FB_WRITE:
+ return 2;
+ case FS_OPCODE_PULL_CONSTANT_LOAD:
+ case FS_OPCODE_UNSPILL:
+ return 1;
+ case FS_OPCODE_SPILL:
+ return 2;
+ default:
+ assert(!"not reached");
+ return inst->mlen;
+ }
+}
+
int
fs_visitor::virtual_grf_alloc(int size)
{
@@ -228,6 +266,7 @@ brw_type_for_base_type(const struct glsl_type *type)
return BRW_REGISTER_TYPE_UD;
case GLSL_TYPE_ARRAY:
case GLSL_TYPE_STRUCT:
+ case GLSL_TYPE_SAMPLER:
/* These should be overridden with the type of the member when
* dereferenced into. BRW_REGISTER_TYPE_UD seems like a likely
* way to trip up if we don't.
@@ -286,7 +325,30 @@ fs_visitor::setup_uniform_values(int loc, const glsl_type *type)
case GLSL_TYPE_BOOL:
vec_values = fp->Base.Parameters->ParameterValues[loc];
for (unsigned int i = 0; i < type->vector_elements; i++) {
- c->prog_data.param[c->prog_data.nr_params++] = &vec_values[i];
+ unsigned int param = c->prog_data.nr_params++;
+
+ assert(param < ARRAY_SIZE(c->prog_data.param));
+
+ switch (type->base_type) {
+ case GLSL_TYPE_FLOAT:
+ c->prog_data.param_convert[param] = PARAM_NO_CONVERT;
+ break;
+ case GLSL_TYPE_UINT:
+ c->prog_data.param_convert[param] = PARAM_CONVERT_F2U;
+ break;
+ case GLSL_TYPE_INT:
+ c->prog_data.param_convert[param] = PARAM_CONVERT_F2I;
+ break;
+ case GLSL_TYPE_BOOL:
+ c->prog_data.param_convert[param] = PARAM_CONVERT_F2B;
+ break;
+ default:
+ assert(!"not reached");
+ c->prog_data.param_convert[param] = PARAM_NO_CONVERT;
+ break;
+ }
+
+ c->prog_data.param[param] = &vec_values[i];
}
return 1;
@@ -370,6 +432,8 @@ fs_visitor::setup_builtin_uniform_values(ir_variable *ir)
break;
last_swiz = swiz;
+ c->prog_data.param_convert[c->prog_data.nr_params] =
+ PARAM_NO_CONVERT;
c->prog_data.param[c->prog_data.nr_params++] = &vec_values[swiz];
}
}
@@ -383,6 +447,7 @@ fs_visitor::emit_fragcoord_interpolation(ir_variable *ir)
fs_reg wpos = *reg;
fs_reg neg_y = this->pixel_y;
neg_y.negate = true;
+ bool flip = !ir->origin_upper_left ^ c->key.render_to_fbo;
/* gl_FragCoord.x */
if (ir->pixel_center_integer) {
@@ -393,13 +458,13 @@ fs_visitor::emit_fragcoord_interpolation(ir_variable *ir)
wpos.reg_offset++;
/* gl_FragCoord.y */
- if (ir->origin_upper_left && ir->pixel_center_integer) {
+ if (!flip && ir->pixel_center_integer) {
emit(fs_inst(BRW_OPCODE_MOV, wpos, this->pixel_y));
} else {
fs_reg pixel_y = this->pixel_y;
float offset = (ir->pixel_center_integer ? 0.0 : 0.5);
- if (!ir->origin_upper_left) {
+ if (flip) {
pixel_y.negate = true;
offset += c->key.drawable_height - 1.0;
}
@@ -624,6 +689,7 @@ fs_visitor::visit(ir_variable *ir)
}
reg = new(this->mem_ctx) fs_reg(UNIFORM, param_index);
+ reg->type = brw_type_for_base_type(ir->type);
}
if (!reg)
@@ -678,6 +744,27 @@ fs_visitor::visit(ir_dereference_array *ir)
}
}
+/* Instruction selection: Produce a MOV.sat instead of
+ * MIN(MAX(val, 0), 1) when possible.
+ */
+bool
+fs_visitor::try_emit_saturate(ir_expression *ir)
+{
+ ir_rvalue *sat_val = ir->as_rvalue_to_saturate();
+
+ if (!sat_val)
+ return false;
+
+ sat_val->accept(this);
+ fs_reg src = this->result;
+
+ this->result = fs_reg(this, ir->type);
+ fs_inst *inst = emit(fs_inst(BRW_OPCODE_MOV, this->result, src));
+ inst->saturate = true;
+
+ return true;
+}
+
void
fs_visitor::visit(ir_expression *ir)
{
@@ -685,6 +772,11 @@ fs_visitor::visit(ir_expression *ir)
fs_reg op[2], temp;
fs_inst *inst;
+ assert(ir->get_num_operands() <= 2);
+
+ if (try_emit_saturate(ir))
+ return;
+
for (operand = 0; operand < ir->get_num_operands(); operand++) {
ir->operands[operand]->accept(this);
if (this->result.file == BAD_FILE) {
@@ -755,9 +847,11 @@ fs_visitor::visit(ir_expression *ir)
assert(!"not reached: should be handled by ir_explog_to_explog2");
break;
case ir_unop_sin:
+ case ir_unop_sin_reduced:
emit_math(FS_OPCODE_SIN, this->result, op[0]);
break;
case ir_unop_cos:
+ case ir_unop_cos_reduced:
emit_math(FS_OPCODE_COS, this->result, op[0]);
break;
@@ -831,7 +925,6 @@ fs_visitor::visit(ir_expression *ir)
break;
case ir_binop_dot:
- case ir_binop_cross:
case ir_unop_any:
assert(!"not reached: should be handled by brw_fs_channel_expressions");
break;
@@ -900,12 +993,21 @@ fs_visitor::visit(ir_expression *ir)
break;
case ir_unop_bit_not:
- case ir_unop_u2f:
- case ir_binop_lshift:
- case ir_binop_rshift:
+ inst = emit(fs_inst(BRW_OPCODE_NOT, this->result, op[0]));
+ break;
case ir_binop_bit_and:
+ inst = emit(fs_inst(BRW_OPCODE_AND, this->result, op[0], op[1]));
+ break;
case ir_binop_bit_xor:
+ inst = emit(fs_inst(BRW_OPCODE_XOR, this->result, op[0], op[1]));
+ break;
case ir_binop_bit_or:
+ inst = emit(fs_inst(BRW_OPCODE_OR, this->result, op[0], op[1]));
+ break;
+
+ case ir_unop_u2f:
+ case ir_binop_lshift:
+ case ir_binop_rshift:
assert(!"GLSL 1.30 features unsupported");
break;
}
@@ -1185,7 +1287,7 @@ fs_visitor::visit(ir_texture *ir)
assert(!ir->projector);
sampler = _mesa_get_sampler_uniform_value(ir->sampler,
- ctx->Shader.CurrentProgram,
+ ctx->Shader.CurrentFragmentProgram,
&brw->fragment_program->Base);
sampler = c->fp->program.Base.SamplerUnits[sampler];
@@ -1203,6 +1305,11 @@ fs_visitor::visit(ir_texture *ir)
0
};
+ c->prog_data.param_convert[c->prog_data.nr_params] =
+ PARAM_NO_CONVERT;
+ c->prog_data.param_convert[c->prog_data.nr_params + 1] =
+ PARAM_NO_CONVERT;
+
fs_reg scale_x = fs_reg(UNIFORM, c->prog_data.nr_params);
fs_reg scale_y = fs_reg(UNIFORM, c->prog_data.nr_params + 1);
GLuint index = _mesa_add_state_reference(params,
@@ -1349,6 +1456,7 @@ fs_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
fs_reg op[2];
fs_inst *inst;
+ assert(expr->get_num_operands() <= 2);
for (unsigned int i = 0; i < expr->get_num_operands(); i++) {
assert(expr->operands[i]->type->is_scalar());
@@ -1456,6 +1564,7 @@ fs_visitor::emit_if_gen6(ir_if *ir)
fs_inst *inst;
fs_reg temp;
+ assert(expr->get_num_operands() <= 2);
for (unsigned int i = 0; i < expr->get_num_operands(); i++) {
assert(expr->operands[i]->type->is_scalar());
@@ -1960,6 +2069,20 @@ fs_visitor::generate_fb_write(fs_inst *inst)
brw_MOV(p,
brw_message_reg(inst->base_mrf),
brw_vec8_grf(0, 0));
+
+ if (inst->target > 0) {
+ /* Set the render target index for choosing BLEND_STATE. */
+ brw_MOV(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, 0, 2),
+ BRW_REGISTER_TYPE_UD),
+ brw_imm_ud(inst->target));
+ }
+
+ /* Clear viewport index, render target array index. */
+ brw_AND(p, retype(brw_vec1_reg(BRW_MESSAGE_REGISTER_FILE, 0, 0),
+ BRW_REGISTER_TYPE_UD),
+ retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UD),
+ brw_imm_ud(0xf7ff));
+
implied_header = brw_null_reg();
} else {
implied_header = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW);
@@ -2204,22 +2327,53 @@ fs_visitor::generate_ddy(fs_inst *inst, struct brw_reg dst, struct brw_reg src)
void
fs_visitor::generate_discard_not(fs_inst *inst, struct brw_reg mask)
{
- brw_push_insn_state(p);
- brw_set_mask_control(p, BRW_MASK_DISABLE);
- brw_NOT(p, mask, brw_mask_reg(1)); /* IMASK */
- brw_pop_insn_state(p);
+ if (intel->gen >= 6) {
+ /* Gen6 no longer has the mask reg for us to just read the
+ * active channels from. However, cmp updates just the channels
+ * of the flag reg that are enabled, so we can get at the
+ * channel enables that way. In this step, make a reg of ones
+ * we'll compare to.
+ */
+ brw_MOV(p, mask, brw_imm_ud(1));
+ } else {
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_NOT(p, mask, brw_mask_reg(1)); /* IMASK */
+ brw_pop_insn_state(p);
+ }
}
void
fs_visitor::generate_discard_and(fs_inst *inst, struct brw_reg mask)
{
- struct brw_reg g0 = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW);
- mask = brw_uw1_reg(mask.file, mask.nr, 0);
+ if (intel->gen >= 6) {
+ struct brw_reg f0 = brw_flag_reg();
+ struct brw_reg g1 = retype(brw_vec1_grf(1, 7), BRW_REGISTER_TYPE_UW);
+
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_MOV(p, f0, brw_imm_uw(0xffff)); /* inactive channels undiscarded */
+ brw_pop_insn_state(p);
+
+ brw_CMP(p, retype(brw_null_reg(), BRW_REGISTER_TYPE_UD),
+ BRW_CONDITIONAL_Z, mask, brw_imm_ud(0)); /* active channels fail test */
+ /* Undo CMP's whacking of predication*/
+ brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_AND(p, g1, f0, g1);
+ brw_pop_insn_state(p);
+ } else {
+ struct brw_reg g0 = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW);
- brw_push_insn_state(p);
- brw_set_mask_control(p, BRW_MASK_DISABLE);
- brw_AND(p, g0, mask, g0);
- brw_pop_insn_state(p);
+ mask = brw_uw1_reg(mask.file, mask.nr, 0);
+
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_AND(p, g0, mask, g0);
+ brw_pop_insn_state(p);
+ }
}
void
@@ -2230,7 +2384,8 @@ fs_visitor::generate_spill(fs_inst *inst, struct brw_reg src)
brw_MOV(p,
retype(brw_message_reg(inst->base_mrf + 1), BRW_REGISTER_TYPE_UD),
retype(src, BRW_REGISTER_TYPE_UD));
- brw_oword_block_write(p, brw_message_reg(inst->base_mrf), 1, inst->offset);
+ brw_oword_block_write_scratch(p, brw_message_reg(inst->base_mrf), 1,
+ inst->offset);
}
void
@@ -2251,8 +2406,39 @@ fs_visitor::generate_unspill(fs_inst *inst, struct brw_reg dst)
if (intel->gen == 4 && !intel->is_g4x)
brw_MOV(p, brw_null_reg(), dst);
- brw_oword_block_read(p, dst, brw_message_reg(inst->base_mrf), 1,
- inst->offset);
+ brw_oword_block_read_scratch(p, dst, brw_message_reg(inst->base_mrf), 1,
+ inst->offset);
+
+ if (intel->gen == 4 && !intel->is_g4x) {
+ /* gen4 errata: destination from a send can't be used as a
+ * destination until it's been read. Just read it so we don't
+ * have to worry.
+ */
+ brw_MOV(p, brw_null_reg(), dst);
+ }
+}
+
+
+void
+fs_visitor::generate_pull_constant_load(fs_inst *inst, struct brw_reg dst)
+{
+ assert(inst->mlen != 0);
+
+ /* Clear any post destination dependencies that would be ignored by
+ * the block read. See the B-Spec for pre-gen5 send instruction.
+ *
+ * This could use a better solution, since texture sampling and
+ * math reads could potentially run into it as well -- anywhere
+ * that we have a SEND with a destination that is a register that
+ * was written but not read within the last N instructions (what's
+ * N? unsure). This is rare because of dead code elimination, but
+ * not impossible.
+ */
+ if (intel->gen == 4 && !intel->is_g4x)
+ brw_MOV(p, brw_null_reg(), dst);
+
+ brw_oword_block_read(p, dst, brw_message_reg(inst->base_mrf),
+ inst->offset, SURF_INDEX_FRAG_CONST_BUFFER);
if (intel->gen == 4 && !intel->is_g4x) {
/* gen4 errata: destination from a send can't be used as a
@@ -2281,7 +2467,7 @@ fs_visitor::assign_curb_setup()
constant_nr % 8);
inst->src[i].file = FIXED_HW_REG;
- inst->src[i].fixed_hw_reg = brw_reg;
+ inst->src[i].fixed_hw_reg = retype(brw_reg, inst->src[i].type);
}
}
}
@@ -2406,6 +2592,7 @@ fs_visitor::split_virtual_grfs()
for (int j = 2; j < this->virtual_grf_sizes[i]; j++) {
int reg = virtual_grf_alloc(1);
assert(reg == new_virtual_grf[i] + j - 1);
+ (void) reg;
}
this->virtual_grf_sizes[i] = 1;
}
@@ -2433,6 +2620,68 @@ fs_visitor::split_virtual_grfs()
}
}
+/**
+ * Choose accesses from the UNIFORM file to demote to using the pull
+ * constant buffer.
+ *
+ * We allow a fragment shader to have more than the specified minimum
+ * maximum number of fragment shader uniform components (64). If
+ * there are too many of these, they'd fill up all of register space.
+ * So, this will push some of them out to the pull constant buffer and
+ * update the program to load them.
+ */
+void
+fs_visitor::setup_pull_constants()
+{
+ /* Only allow 16 registers (128 uniform components) as push constants. */
+ unsigned int max_uniform_components = 16 * 8;
+ if (c->prog_data.nr_params <= max_uniform_components)
+ return;
+
+ /* Just demote the end of the list. We could probably do better
+ * here, demoting things that are rarely used in the program first.
+ */
+ int pull_uniform_base = max_uniform_components;
+ int pull_uniform_count = c->prog_data.nr_params - pull_uniform_base;
+
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ fs_inst *inst = (fs_inst *)iter.get();
+
+ for (int i = 0; i < 3; i++) {
+ if (inst->src[i].file != UNIFORM)
+ continue;
+
+ int uniform_nr = inst->src[i].hw_reg + inst->src[i].reg_offset;
+ if (uniform_nr < pull_uniform_base)
+ continue;
+
+ fs_reg dst = fs_reg(this, glsl_type::float_type);
+ fs_inst *pull = new(mem_ctx) fs_inst(FS_OPCODE_PULL_CONSTANT_LOAD,
+ dst);
+ pull->offset = ((uniform_nr - pull_uniform_base) * 4) & ~15;
+ pull->ir = inst->ir;
+ pull->annotation = inst->annotation;
+ pull->base_mrf = 14;
+ pull->mlen = 1;
+
+ inst->insert_before(pull);
+
+ inst->src[i].file = GRF;
+ inst->src[i].reg = dst.reg;
+ inst->src[i].reg_offset = 0;
+ inst->src[i].smear = (uniform_nr - pull_uniform_base) & 3;
+ }
+ }
+
+ for (int i = 0; i < pull_uniform_count; i++) {
+ c->prog_data.pull_param[i] = c->prog_data.param[pull_uniform_base + i];
+ c->prog_data.pull_param_convert[i] =
+ c->prog_data.param_convert[pull_uniform_base + i];
+ }
+ c->prog_data.nr_params -= pull_uniform_count;
+ c->prog_data.nr_pull_params = pull_uniform_count;
+}
+
void
fs_visitor::calculate_live_intervals()
{
@@ -2597,6 +2846,7 @@ fs_visitor::propagate_constants()
}
break;
case BRW_OPCODE_CMP:
+ case BRW_OPCODE_SEL:
if (i == 1) {
scan_inst->src[i] = inst->src[0];
progress = true;
@@ -2625,26 +2875,17 @@ bool
fs_visitor::dead_code_eliminate()
{
bool progress = false;
- int num_vars = this->virtual_grf_next;
- bool dead[num_vars];
-
- for (int i = 0; i < num_vars; i++) {
- dead[i] = this->virtual_grf_def[i] >= this->virtual_grf_use[i];
-
- if (dead[i]) {
- /* Mark off its interval so it won't interfere with anything. */
- this->virtual_grf_def[i] = -1;
- this->virtual_grf_use[i] = -1;
- }
- }
+ int pc = 0;
foreach_iter(exec_list_iterator, iter, this->instructions) {
fs_inst *inst = (fs_inst *)iter.get();
- if (inst->dst.file == GRF && dead[inst->dst.reg]) {
+ if (inst->dst.file == GRF && this->virtual_grf_use[inst->dst.reg] <= pc) {
inst->remove();
progress = true;
}
+
+ pc++;
}
return progress;
@@ -2721,6 +2962,7 @@ fs_visitor::register_coalesce()
scan_inst->src[i].reg_offset = inst->src[0].reg_offset;
scan_inst->src[i].abs |= inst->src[0].abs;
scan_inst->src[i].negate ^= inst->src[0].negate;
+ scan_inst->src[i].smear = inst->src[0].smear;
}
}
}
@@ -2749,7 +2991,7 @@ fs_visitor::compute_to_mrf()
inst->predicated ||
inst->dst.file != MRF || inst->src[0].file != GRF ||
inst->dst.type != inst->src[0].type ||
- inst->src[0].abs || inst->src[0].negate)
+ inst->src[0].abs || inst->src[0].negate || inst->src[0].smear != -1)
continue;
/* Can't compute-to-MRF this GRF if someone else was going to
@@ -2761,11 +3003,60 @@ fs_visitor::compute_to_mrf()
/* Found a move of a GRF to a MRF. Let's see if we can go
* rewrite the thing that made this GRF to write into the MRF.
*/
- bool found = false;
fs_inst *scan_inst;
for (scan_inst = (fs_inst *)inst->prev;
scan_inst->prev != NULL;
scan_inst = (fs_inst *)scan_inst->prev) {
+ if (scan_inst->dst.file == GRF &&
+ scan_inst->dst.reg == inst->src[0].reg) {
+ /* Found the last thing to write our reg we want to turn
+ * into a compute-to-MRF.
+ */
+
+ if (scan_inst->opcode == FS_OPCODE_TEX) {
+ /* texturing writes several continuous regs, so we can't
+ * compute-to-mrf that.
+ */
+ break;
+ }
+
+ /* If it's predicated, it (probably) didn't populate all
+ * the channels.
+ */
+ if (scan_inst->predicated)
+ break;
+
+ /* SEND instructions can't have MRF as a destination. */
+ if (scan_inst->mlen)
+ break;
+
+ if (intel->gen >= 6) {
+ /* gen6 math instructions must have the destination be
+ * GRF, so no compute-to-MRF for them.
+ */
+ if (scan_inst->opcode == FS_OPCODE_RCP ||
+ scan_inst->opcode == FS_OPCODE_RSQ ||
+ scan_inst->opcode == FS_OPCODE_SQRT ||
+ scan_inst->opcode == FS_OPCODE_EXP2 ||
+ scan_inst->opcode == FS_OPCODE_LOG2 ||
+ scan_inst->opcode == FS_OPCODE_SIN ||
+ scan_inst->opcode == FS_OPCODE_COS ||
+ scan_inst->opcode == FS_OPCODE_POW) {
+ break;
+ }
+ }
+
+ if (scan_inst->dst.reg_offset == inst->src[0].reg_offset) {
+ /* Found the creator of our MRF's source value. */
+ scan_inst->dst.file = MRF;
+ scan_inst->dst.hw_reg = inst->dst.hw_reg;
+ scan_inst->saturate |= inst->saturate;
+ inst->remove();
+ progress = true;
+ }
+ break;
+ }
+
/* We don't handle flow control here. Most computation of
* values that end up in MRFs are shortly before the MRF
* write anyway.
@@ -2799,71 +3090,88 @@ fs_visitor::compute_to_mrf()
}
if (scan_inst->mlen > 0) {
- /* Found a SEND instruction, which will do some amount of
- * implied write that may overwrite our MRF that we were
- * hoping to compute-to-MRF somewhere above it. Nothing
- * we have implied-writes more than 2 MRFs from base_mrf,
- * though.
+ /* Found a SEND instruction, which means that there are
+ * live values in MRFs from base_mrf to base_mrf +
+ * scan_inst->mlen - 1. Don't go pushing our MRF write up
+ * above it.
*/
- int implied_write_len = MIN2(scan_inst->mlen, 2);
if (inst->dst.hw_reg >= scan_inst->base_mrf &&
- inst->dst.hw_reg < scan_inst->base_mrf + implied_write_len) {
+ inst->dst.hw_reg < scan_inst->base_mrf + scan_inst->mlen) {
break;
}
}
+ }
+ }
- if (scan_inst->dst.file == GRF &&
- scan_inst->dst.reg == inst->src[0].reg) {
- /* Found the last thing to write our reg we want to turn
- * into a compute-to-MRF.
- */
+ return progress;
+}
- if (scan_inst->opcode == FS_OPCODE_TEX) {
- /* texturing writes several continuous regs, so we can't
- * compute-to-mrf that.
- */
- break;
- }
+/**
+ * Walks through basic blocks, locking for repeated MRF writes and
+ * removing the later ones.
+ */
+bool
+fs_visitor::remove_duplicate_mrf_writes()
+{
+ fs_inst *last_mrf_move[16];
+ bool progress = false;
- /* If it's predicated, it (probably) didn't populate all
- * the channels.
- */
- if (scan_inst->predicated)
- break;
+ memset(last_mrf_move, 0, sizeof(last_mrf_move));
- /* SEND instructions can't have MRF as a destination. */
- if (scan_inst->mlen)
- break;
+ foreach_iter(exec_list_iterator, iter, this->instructions) {
+ fs_inst *inst = (fs_inst *)iter.get();
- if (intel->gen >= 6) {
- /* gen6 math instructions must have the destination be
- * GRF, so no compute-to-MRF for them.
- */
- if (scan_inst->opcode == FS_OPCODE_RCP ||
- scan_inst->opcode == FS_OPCODE_RSQ ||
- scan_inst->opcode == FS_OPCODE_SQRT ||
- scan_inst->opcode == FS_OPCODE_EXP2 ||
- scan_inst->opcode == FS_OPCODE_LOG2 ||
- scan_inst->opcode == FS_OPCODE_SIN ||
- scan_inst->opcode == FS_OPCODE_COS ||
- scan_inst->opcode == FS_OPCODE_POW) {
- break;
- }
- }
+ switch (inst->opcode) {
+ case BRW_OPCODE_DO:
+ case BRW_OPCODE_WHILE:
+ case BRW_OPCODE_IF:
+ case BRW_OPCODE_ELSE:
+ case BRW_OPCODE_ENDIF:
+ memset(last_mrf_move, 0, sizeof(last_mrf_move));
+ continue;
+ default:
+ break;
+ }
- if (scan_inst->dst.reg_offset == inst->src[0].reg_offset) {
- /* Found the creator of our MRF's source value. */
- found = true;
- break;
+ if (inst->opcode == BRW_OPCODE_MOV &&
+ inst->dst.file == MRF) {
+ fs_inst *prev_inst = last_mrf_move[inst->dst.hw_reg];
+ if (prev_inst && inst->equals(prev_inst)) {
+ inst->remove();
+ progress = true;
+ continue;
+ }
+ }
+
+ /* Clear out the last-write records for MRFs that were overwritten. */
+ if (inst->dst.file == MRF) {
+ last_mrf_move[inst->dst.hw_reg] = NULL;
+ }
+
+ if (inst->mlen > 0) {
+ /* Found a SEND instruction, which will include two of fewer
+ * implied MRF writes. We could do better here.
+ */
+ for (int i = 0; i < implied_mrf_writes(inst); i++) {
+ last_mrf_move[inst->base_mrf + i] = NULL;
+ }
+ }
+
+ /* Clear out any MRF move records whose sources got overwritten. */
+ if (inst->dst.file == GRF) {
+ for (unsigned int i = 0; i < Elements(last_mrf_move); i++) {
+ if (last_mrf_move[i] &&
+ last_mrf_move[i]->src[0].reg == inst->dst.reg) {
+ last_mrf_move[i] = NULL;
}
}
}
- if (found) {
- scan_inst->dst.file = MRF;
- scan_inst->dst.hw_reg = inst->dst.hw_reg;
- scan_inst->saturate |= inst->saturate;
- inst->remove();
- progress = true;
+
+ if (inst->opcode == BRW_OPCODE_MOV &&
+ inst->dst.file == MRF &&
+ inst->src[0].file == GRF &&
+ !inst->predicated) {
+ last_mrf_move[inst->dst.hw_reg] = inst;
}
}
@@ -2897,8 +3205,13 @@ static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg)
case GRF:
case ARF:
case MRF:
- brw_reg = brw_vec8_reg(reg->file,
- reg->hw_reg, 0);
+ if (reg->smear == -1) {
+ brw_reg = brw_vec8_reg(reg->file,
+ reg->hw_reg, 0);
+ } else {
+ brw_reg = brw_vec1_reg(reg->file,
+ reg->hw_reg, reg->smear);
+ }
brw_reg = retype(brw_reg, reg->type);
break;
case IMM:
@@ -2940,11 +3253,17 @@ static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg)
void
fs_visitor::generate_code()
{
- unsigned int annotation_len = 0;
int last_native_inst = 0;
struct brw_instruction *if_stack[16], *loop_stack[16];
int if_stack_depth = 0, loop_stack_depth = 0;
int if_depth_in_loop[16];
+ const char *last_annotation_string = NULL;
+ ir_instruction *last_annotation_ir = NULL;
+
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
+ printf("Native code for fragment shader %d:\n",
+ ctx->Shader.CurrentFragmentProgram->Name);
+ }
if_depth_in_loop[loop_stack_depth] = 0;
@@ -2953,6 +3272,22 @@ fs_visitor::generate_code()
fs_inst *inst = (fs_inst *)iter.get();
struct brw_reg src[3], dst;
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
+ if (last_annotation_ir != inst->ir) {
+ last_annotation_ir = inst->ir;
+ if (last_annotation_ir) {
+ printf(" ");
+ last_annotation_ir->print();
+ printf("\n");
+ }
+ }
+ if (last_annotation_string != inst->annotation) {
+ last_annotation_string = inst->annotation;
+ if (last_annotation_string)
+ printf(" %s\n", last_annotation_string);
+ }
+ }
+
for (unsigned int i = 0; i < 3; i++) {
src[i] = brw_reg_from_fs_reg(&inst->src[i]);
}
@@ -2960,6 +3295,7 @@ fs_visitor::generate_code()
brw_set_conditionalmod(p, inst->conditional_mod);
brw_set_predicate_control(p, inst->predicated);
+ brw_set_saturate(p, inst->saturate);
switch (inst->opcode) {
case BRW_OPCODE_MOV:
@@ -3037,6 +3373,10 @@ fs_visitor::generate_code()
break;
case BRW_OPCODE_DO:
+ /* FINISHME: We need to write the loop instruction support still. */
+ if (intel->gen >= 6)
+ this->fail = true;
+
loop_stack[loop_stack_depth++] = brw_DO(p, BRW_EXECUTE_8);
if_depth_in_loop[loop_stack_depth] = 0;
break;
@@ -3114,6 +3454,10 @@ fs_visitor::generate_code()
generate_unspill(inst, dst);
break;
+ case FS_OPCODE_PULL_CONSTANT_LOAD:
+ generate_pull_constant_load(inst, dst);
+ break;
+
case FS_OPCODE_FB_WRITE:
generate_fb_write(inst);
break;
@@ -3127,25 +3471,19 @@ fs_visitor::generate_code()
this->fail = true;
}
- if (annotation_len < p->nr_insn) {
- annotation_len *= 2;
- if (annotation_len < 16)
- annotation_len = 16;
-
- this->annotation_string = talloc_realloc(this->mem_ctx,
- annotation_string,
- const char *,
- annotation_len);
- this->annotation_ir = talloc_realloc(this->mem_ctx,
- annotation_ir,
- ir_instruction *,
- annotation_len);
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
+ for (unsigned int i = last_native_inst; i < p->nr_insn; i++) {
+ if (0) {
+ printf("0x%08x 0x%08x 0x%08x 0x%08x ",
+ ((uint32_t *)&p->store[i])[3],
+ ((uint32_t *)&p->store[i])[2],
+ ((uint32_t *)&p->store[i])[1],
+ ((uint32_t *)&p->store[i])[0]);
+ }
+ brw_disasm(stdout, &p->store[i], intel->gen);
+ }
}
- for (unsigned int i = last_native_inst; i < p->nr_insn; i++) {
- this->annotation_string[i] = inst->annotation;
- this->annotation_ir[i] = inst->ir;
- }
last_native_inst = p->nr_insn;
}
}
@@ -3153,10 +3491,9 @@ fs_visitor::generate_code()
GLboolean
brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
{
- struct brw_compile *p = &c->func;
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
- struct gl_shader_program *prog = ctx->Shader.CurrentProgram;
+ struct gl_shader_program *prog = ctx->Shader.CurrentFragmentProgram;
if (!prog)
return GL_FALSE;
@@ -3174,7 +3511,7 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
*/
c->dispatch_width = 8;
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
printf("GLSL IR for native fragment shader %d:\n", prog->Name);
_mesa_print_ir(shader->ir, NULL);
printf("\n");
@@ -3205,6 +3542,7 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
v.emit_fb_writes();
v.split_virtual_grfs();
+ v.setup_pull_constants();
v.assign_curb_setup();
v.assign_urb_setup();
@@ -3212,6 +3550,9 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
bool progress;
do {
progress = false;
+
+ progress = v.remove_duplicate_mrf_writes() || progress;
+
v.calculate_live_intervals();
progress = v.propagate_constants() || progress;
progress = v.register_coalesce() || progress;
@@ -3248,37 +3589,6 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c)
if (v.fail)
return GL_FALSE;
- if (INTEL_DEBUG & DEBUG_WM) {
- const char *last_annotation_string = NULL;
- ir_instruction *last_annotation_ir = NULL;
-
- printf("Native code for fragment shader %d:\n", prog->Name);
- for (unsigned int i = 0; i < p->nr_insn; i++) {
- if (last_annotation_ir != v.annotation_ir[i]) {
- last_annotation_ir = v.annotation_ir[i];
- if (last_annotation_ir) {
- printf(" ");
- last_annotation_ir->print();
- printf("\n");
- }
- }
- if (last_annotation_string != v.annotation_string[i]) {
- last_annotation_string = v.annotation_string[i];
- if (last_annotation_string)
- printf(" %s\n", last_annotation_string);
- }
- if (0) {
- printf("0x%08x 0x%08x 0x%08x 0x%08x ",
- ((uint32_t *)&p->store[i])[3],
- ((uint32_t *)&p->store[i])[2],
- ((uint32_t *)&p->store[i])[1],
- ((uint32_t *)&p->store[i])[0]);
- }
- brw_disasm(stdout, &p->store[i], intel->gen);
- }
- printf("\n");
- }
-
c->prog_data.total_grf = v.grf_used;
return GL_TRUE;
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index de7137a7db..de7b15312a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -76,6 +76,7 @@ enum fs_opcodes {
FS_OPCODE_DISCARD_AND,
FS_OPCODE_SPILL,
FS_OPCODE_UNSPILL,
+ FS_OPCODE_PULL_CONSTANT_LOAD,
};
@@ -95,11 +96,9 @@ public:
void init()
{
- this->reg = 0;
- this->reg_offset = 0;
- this->negate = 0;
- this->abs = 0;
+ memset(this, 0, sizeof(*this));
this->hw_reg = -1;
+ this->smear = -1;
}
/** Generic unset register constructor. */
@@ -149,6 +148,21 @@ public:
fs_reg(enum register_file file, int hw_reg, uint32_t type);
fs_reg(class fs_visitor *v, const struct glsl_type *type);
+ bool equals(fs_reg *r)
+ {
+ return (file == r->file &&
+ reg == r->reg &&
+ reg_offset == r->reg_offset &&
+ hw_reg == r->hw_reg &&
+ type == r->type &&
+ negate == r->negate &&
+ abs == r->abs &&
+ memcmp(&fixed_hw_reg, &r->fixed_hw_reg,
+ sizeof(fixed_hw_reg)) == 0 &&
+ smear == r->smear &&
+ imm.u == r->imm.u);
+ }
+
/** Register file: ARF, GRF, MRF, IMM. */
enum register_file file;
/** virtual register number. 0 = fixed hw reg */
@@ -162,6 +176,7 @@ public:
bool negate;
bool abs;
struct brw_reg fixed_hw_reg;
+ int smear; /* -1, or a channel of the reg to smear to all channels. */
/** Value for file == BRW_IMMMEDIATE_FILE */
union {
@@ -171,6 +186,10 @@ public:
} imm;
};
+static const fs_reg reg_undef;
+static const fs_reg reg_null_f(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_F);
+static const fs_reg reg_null_d(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_D);
+
class fs_inst : public exec_node {
public:
/* Callers of this talloc-based new need not call delete. It's
@@ -187,18 +206,14 @@ public:
void init()
{
+ memset(this, 0, sizeof(*this));
this->opcode = BRW_OPCODE_NOP;
- this->saturate = false;
this->conditional_mod = BRW_CONDITIONAL_NONE;
- this->predicated = false;
- this->sampler = 0;
- this->target = 0;
- this->eot = false;
- this->header_present = false;
- this->shadow_compare = false;
- this->mlen = 0;
- this->base_mrf = 0;
- this->offset = 0;
+
+ this->dst = reg_undef;
+ this->src[0] = reg_undef;
+ this->src[1] = reg_undef;
+ this->src[2] = reg_undef;
}
fs_inst()
@@ -270,6 +285,26 @@ public:
assert(src[2].reg_offset >= 0);
}
+ bool equals(fs_inst *inst)
+ {
+ return (opcode == inst->opcode &&
+ dst.equals(&inst->dst) &&
+ src[0].equals(&inst->src[0]) &&
+ src[1].equals(&inst->src[1]) &&
+ src[2].equals(&inst->src[2]) &&
+ saturate == inst->saturate &&
+ predicated == inst->predicated &&
+ conditional_mod == inst->conditional_mod &&
+ mlen == inst->mlen &&
+ base_mrf == inst->base_mrf &&
+ sampler == inst->sampler &&
+ target == inst->target &&
+ eot == inst->eot &&
+ header_present == inst->header_present &&
+ shadow_compare == inst->shadow_compare &&
+ offset == inst->offset);
+ }
+
int opcode; /* BRW_OPCODE_* or FS_OPCODE_* */
fs_reg dst;
fs_reg src[3];
@@ -319,8 +354,6 @@ public:
this->first_non_payload_grf = 0;
this->current_annotation = NULL;
- this->annotation_string = NULL;
- this->annotation_ir = NULL;
this->base_ir = NULL;
this->virtual_grf_sizes = NULL;
@@ -368,11 +401,13 @@ public:
int choose_spill_reg(struct ra_graph *g);
void spill_reg(int spill_reg);
void split_virtual_grfs();
+ void setup_pull_constants();
void calculate_live_intervals();
bool propagate_constants();
bool register_coalesce();
bool compute_to_mrf();
bool dead_code_eliminate();
+ bool remove_duplicate_mrf_writes();
bool virtual_grf_interferes(int a, int b);
void generate_code();
void generate_fb_write(fs_inst *inst);
@@ -386,6 +421,7 @@ public:
void generate_ddy(fs_inst *inst, struct brw_reg dst, struct brw_reg src);
void generate_spill(fs_inst *inst, struct brw_reg src);
void generate_unspill(fs_inst *inst, struct brw_reg dst);
+ void generate_pull_constant_load(fs_inst *inst, struct brw_reg dst);
void emit_dummy_fs();
fs_reg *emit_fragcoord_interpolation(ir_variable *ir);
@@ -397,6 +433,7 @@ public:
fs_inst *emit_texture_gen5(ir_texture *ir, fs_reg dst, fs_reg coordinate);
fs_inst *emit_math(fs_opcodes op, fs_reg dst, fs_reg src0);
fs_inst *emit_math(fs_opcodes op, fs_reg dst, fs_reg src0, fs_reg src1);
+ bool try_emit_saturate(ir_expression *ir);
void emit_bool_to_cond_code(ir_rvalue *condition);
void emit_if_gen6(ir_if *ir);
void emit_unspill(fs_inst *inst, fs_reg reg, uint32_t spill_offset);
@@ -408,6 +445,7 @@ public:
struct brw_reg interp_reg(int location, int channel);
int setup_uniform_values(int loc, const glsl_type *type);
void setup_builtin_uniform_values(ir_variable *ir);
+ int implied_mrf_writes(fs_inst *inst);
struct brw_context *brw;
const struct gl_fragment_program *fp;
@@ -434,8 +472,6 @@ public:
/** @{ debug annotation info */
const char *current_annotation;
ir_instruction *base_ir;
- const char **annotation_string;
- ir_instruction **annotation_ir;
/** @} */
bool fail;
@@ -453,9 +489,5 @@ public:
int grf_used;
};
-static const fs_reg reg_undef;
-static const fs_reg reg_null_f(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_F);
-static const fs_reg reg_null_d(ARF, BRW_ARF_NULL, BRW_REGISTER_TYPE_D);
-
GLboolean brw_do_channel_expressions(struct exec_list *instructions);
GLboolean brw_do_vector_splitting(struct exec_list *instructions);
diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
index 4aac1b5a05..3b7b03a05b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
@@ -202,6 +202,7 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
case ir_unop_ceil:
case ir_unop_floor:
case ir_unop_fract:
+ case ir_unop_round_even:
case ir_unop_sin:
case ir_unop_cos:
case ir_unop_dFdx:
@@ -287,34 +288,6 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir)
break;
}
- case ir_binop_cross: {
- for (i = 0; i < vector_elements; i++) {
- int swiz0 = (i + 1) % 3;
- int swiz1 = (i + 2) % 3;
- ir_expression *temp1, *temp2;
-
- temp1 = new(mem_ctx) ir_expression(ir_binop_mul,
- element_type,
- get_element(op_var[0], swiz0),
- get_element(op_var[1], swiz1));
-
- temp2 = new(mem_ctx) ir_expression(ir_binop_mul,
- element_type,
- get_element(op_var[1], swiz0),
- get_element(op_var[0], swiz1));
-
- temp2 = new(mem_ctx) ir_expression(ir_unop_neg,
- element_type,
- temp2,
- NULL);
-
- assign(ir, i, new(mem_ctx) ir_expression(ir_binop_add,
- element_type,
- temp1, temp2));
- }
- break;
- }
-
case ir_binop_logic_and:
case ir_binop_logic_xor:
case ir_binop_logic_or:
diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
index b5bfd00d5f..bbb210cd44 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
@@ -225,7 +225,7 @@ fs_visitor::assign_regs()
* loop back into here to try again.
*/
int reg = choose_spill_reg(g);
- if (reg == -1) {
+ if (reg == -1 || intel->gen >= 6) {
this->fail = true;
} else {
spill_reg(reg);
@@ -401,6 +401,7 @@ fs_visitor::spill_reg(int spill_reg)
spill_src.reg_offset = 0;
spill_src.abs = false;
spill_src.negate = false;
+ spill_src.smear = -1;
for (int chan = 0; chan < size; chan++) {
fs_inst *spill_inst = new(mem_ctx) fs_inst(FS_OPCODE_SPILL,
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index cfcc8ea4d6..b0c76f4094 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -127,8 +127,8 @@ static void compile_gs_prog( struct brw_context *brw,
*/
program = brw_get_program(&c.func, &program_size);
- if (INTEL_DEBUG & DEBUG_GS) {
- int i;
+ if (unlikely(INTEL_DEBUG & DEBUG_GS)) {
+ int i;
printf("gs:\n");
for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
diff --git a/src/mesa/drivers/dri/i965/brw_gs_state.c b/src/mesa/drivers/dri/i965/brw_gs_state.c
index 63562ebcfc..69a5f7a666 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_state.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_state.c
@@ -101,7 +101,7 @@ gs_unit_create_from_key(struct brw_context *brw, struct brw_gs_unit_key *key)
if (intel->gen == 5)
gs.thread4.rendering_enable = 1;
- if (INTEL_DEBUG & DEBUG_STATS)
+ if (unlikely(INTEL_DEBUG & DEBUG_STATS))
gs.thread4.stats_enable = 1;
bo = brw_upload_cache(&brw->cache, BRW_GS_UNIT,
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 24041e57b0..1d350bc041 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -555,7 +555,7 @@ static void upload_invarient_state( struct brw_context *brw )
memset(&vfs, 0, sizeof(vfs));
vfs.opcode = brw->CMD_VF_STATISTICS;
- if (INTEL_DEBUG & DEBUG_STATS)
+ if (unlikely(INTEL_DEBUG & DEBUG_STATS))
vfs.statistics_enable = 1;
BRW_BATCH_STRUCT(brw, &vfs);
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 7dbd70daae..6da155b1a9 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -108,7 +108,7 @@ static void compile_sf_prog( struct brw_context *brw,
*/
program = brw_get_program(&c.func, &program_size);
- if (INTEL_DEBUG & DEBUG_SF) {
+ if (unlikely(INTEL_DEBUG & DEBUG_SF)) {
printf("sf:\n");
for (i = 0; i < program_size / sizeof(struct brw_instruction); i++)
brw_disasm(stdout, &((struct brw_instruction *)program)[i],
diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c
index 6ad9e1b48a..bd3a21ed9e 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
@@ -210,10 +210,10 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
sf.thread4.max_threads = MIN2(chipset_max_threads, key->nr_urb_entries) - 1;
- if (INTEL_DEBUG & DEBUG_SINGLE_THREAD)
+ if (unlikely(INTEL_DEBUG & DEBUG_SINGLE_THREAD))
sf.thread4.max_threads = 0;
- if (INTEL_DEBUG & DEBUG_STATS)
+ if (unlikely(INTEL_DEBUG & DEBUG_STATS))
sf.thread4.stats_enable = 1;
/* CACHE_NEW_SF_VP */
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index b31d84953a..58ff528d44 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -61,6 +61,7 @@
#include "intel_batchbuffer.h"
#include "brw_wm.h"
+#define FILE_DEBUG_FLAG DEBUG_STATE
static GLuint
hash_key(struct brw_cache_item *item)
@@ -265,10 +266,9 @@ brw_upload_cache_with_auxdata(struct brw_cache *cache,
*(void **)aux_return = (void *)((char *)item->key + item->key_size);
}
- if (INTEL_DEBUG & DEBUG_STATE)
- printf("upload %s: %d bytes to cache id %d\n",
- cache->name[cache_id],
- data_size, cache_id);
+ DBG("upload %s: %d bytes to cache id %d\n",
+ cache->name[cache_id],
+ data_size, cache_id);
/* Copy data to the buffer */
drm_intel_bo_subdata(bo, 0, data_size, data);
@@ -407,8 +407,7 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache)
struct brw_cache_item *c, *next;
GLuint i;
- if (INTEL_DEBUG & DEBUG_STATE)
- printf("%s\n", __FUNCTION__);
+ DBG("%s\n", __FUNCTION__);
for (i = 0; i < cache->size; i++) {
for (c = cache->items[i]; c; c = next) {
@@ -434,8 +433,7 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache)
void
brw_state_cache_check_size(struct brw_context *brw)
{
- if (INTEL_DEBUG & DEBUG_STATE)
- printf("%s (n_items=%d)\n", __FUNCTION__, brw->cache.n_items);
+ DBG("%s (n_items=%d)\n", __FUNCTION__, brw->cache.n_items);
/* un-tuned guess. Each object is generally a page, so 1000 of them is 4 MB of
* state cache.
@@ -450,8 +448,7 @@ brw_destroy_cache(struct brw_context *brw, struct brw_cache *cache)
{
GLuint i;
- if (INTEL_DEBUG & DEBUG_STATE)
- printf("%s\n", __FUNCTION__);
+ DBG("%s\n", __FUNCTION__);
brw_clear_cache(brw, cache);
for (i = 0; i < BRW_MAX_CACHE; i++) {
diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c
index b79b33c2e3..e262887471 100644
--- a/src/mesa/drivers/dri/i965/brw_state_dump.c
+++ b/src/mesa/drivers/dri/i965/brw_state_dump.c
@@ -107,14 +107,14 @@ static void dump_wm_surface_state(struct brw_context *brw)
char name[20];
if (surf_bo == NULL) {
- fprintf(stderr, " WM SS%d: NULL\n", i);
+ fprintf(stderr, "WM SURF%d: NULL\n", i);
continue;
}
drm_intel_bo_map(surf_bo, GL_FALSE);
surfoff = surf_bo->offset + brw->wm.surf_offset[i];
surf = (struct brw_surface_state *)(surf_bo->virtual + brw->wm.surf_offset[i]);
- sprintf(name, "WM SS%d", i);
+ sprintf(name, "WM SURF%d", i);
state_out(name, surf, surfoff, 0, "%s %s\n",
get_965_surfacetype(surf->ss0.surface_type),
get_965_surface_format(surf->ss0.surface_format));
@@ -132,6 +132,53 @@ static void dump_wm_surface_state(struct brw_context *brw)
}
}
+
+static void dump_wm_sampler_state(struct brw_context *brw)
+{
+ struct gl_context *ctx = &brw->intel.ctx;
+ int i;
+
+ if (!brw->wm.sampler_bo) {
+ fprintf(stderr, "WM_SAMPLER: NULL\n");
+ return;
+ }
+
+ drm_intel_bo_map(brw->wm.sampler_bo, GL_FALSE);
+ for (i = 0; i < BRW_MAX_TEX_UNIT; i++) {
+ unsigned int offset;
+ struct brw_sampler_state *samp;
+ struct brw_sampler_default_color *sdc;
+ char name[20];
+
+ if (!ctx->Texture.Unit[i]._ReallyEnabled) {
+ fprintf(stderr, "WM SAMP%d: disabled\n", i);
+ continue;
+ }
+
+ offset = brw->wm.sampler_bo->offset +
+ i * sizeof(struct brw_sampler_state);
+ samp = (struct brw_sampler_state *)(brw->wm.sampler_bo->virtual +
+ i * sizeof(struct brw_sampler_state));
+
+ sprintf(name, "WM SAMP%d", i);
+ state_out(name, samp, offset, 0, "filtering\n");
+ state_out(name, samp, offset, 1, "wrapping, lod\n");
+ state_out(name, samp, offset, 2, "default color pointer\n");
+ state_out(name, samp, offset, 3, "chroma key, aniso\n");
+
+ sprintf(name, " WM SDC%d", i);
+
+ drm_intel_bo_map(brw->wm.sdc_bo[i], GL_FALSE);
+ sdc = (struct brw_sampler_default_color *)(brw->wm.sdc_bo[i]->virtual);
+ state_out(name, sdc, brw->wm.sdc_bo[i]->offset, 0, "r\n");
+ state_out(name, sdc, brw->wm.sdc_bo[i]->offset, 1, "g\n");
+ state_out(name, sdc, brw->wm.sdc_bo[i]->offset, 2, "b\n");
+ state_out(name, sdc, brw->wm.sdc_bo[i]->offset, 3, "a\n");
+ drm_intel_bo_unmap(brw->wm.sdc_bo[i]);
+ }
+ drm_intel_bo_unmap(brw->wm.sampler_bo);
+}
+
static void dump_sf_viewport_state(struct brw_context *brw)
{
const char *name = "SF VP";
@@ -324,6 +371,7 @@ void brw_debug_batch(struct intel_context *intel)
state_struct_out("WM bind", brw->wm.bind_bo, 4 * brw->wm.nr_surfaces);
dump_wm_surface_state(brw);
+ dump_wm_sampler_state(brw);
if (intel->gen < 6)
state_struct_out("VS", brw->vs.state_bo, sizeof(struct brw_vs_unit_state));
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index 73940a5156..338f3876b3 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -128,6 +128,7 @@ const struct brw_tracked_state *gen6_atoms[] =
&gen6_cc_state_pointers,
&brw_vs_constants, /* Before vs_surfaces and constant_buffer */
+ &brw_wm_constants, /* Before wm_surfaces and constant_buffer */
&gen6_wm_constants, /* Before wm_surfaces and constant_buffer */
&brw_vs_surfaces, /* must do before unit */
@@ -434,7 +435,7 @@ void brw_upload_state(struct brw_context *brw)
brw_clear_validated_bos(brw);
- if (INTEL_DEBUG) {
+ if (unlikely(INTEL_DEBUG)) {
/* Debug version which enforces various sanity checks on the
* state flags which are generated and checked to help ensure
* state atoms are ordered correctly in the list.
@@ -486,7 +487,7 @@ void brw_upload_state(struct brw_context *brw)
}
}
- if (INTEL_DEBUG & DEBUG_STATE) {
+ if (unlikely(INTEL_DEBUG & DEBUG_STATE)) {
brw_update_dirty_count(mesa_bits, state->mesa);
brw_update_dirty_count(brw_bits, state->brw);
brw_update_dirty_count(cache_bits, state->cache);
diff --git a/src/mesa/drivers/dri/i965/brw_urb.c b/src/mesa/drivers/dri/i965/brw_urb.c
index 0f597184b4..dfc1551aca 100644
--- a/src/mesa/drivers/dri/i965/brw_urb.c
+++ b/src/mesa/drivers/dri/i965/brw_urb.c
@@ -190,12 +190,12 @@ static void recalculate_urb_fence( struct brw_context *brw )
exit(1);
}
- if (INTEL_DEBUG & (DEBUG_URB|DEBUG_FALLBACKS))
+ if (unlikely(INTEL_DEBUG & (DEBUG_URB|DEBUG_FALLBACKS)))
printf("URB CONSTRAINED\n");
}
done:
- if (INTEL_DEBUG & DEBUG_URB)
+ if (unlikely(INTEL_DEBUG & DEBUG_URB))
printf("URB fence: %d ..VS.. %d ..GS.. %d ..CLP.. %d ..SF.. %d ..CS.. %d\n",
brw->urb.vs_start,
brw->urb.gs_start,
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index ce33479996..7e43324a1f 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -165,13 +165,20 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
/* User clip planes from curbe:
*/
if (c->key.nr_userclip) {
- for (i = 0; i < c->key.nr_userclip; i++) {
- c->userplane[i] = stride( brw_vec4_grf(reg+3+i/2, (i%2) * 4), 0, 4, 1);
- }
+ if (intel->gen >= 6) {
+ for (i = 0; i < c->key.nr_userclip; i++) {
+ c->userplane[i] = stride(brw_vec4_grf(reg + i / 2,
+ (i % 2) * 4), 0, 4, 1);
+ }
+ reg += ALIGN(c->key.nr_userclip, 2) / 2;
+ } else {
+ for (i = 0; i < c->key.nr_userclip; i++) {
+ c->userplane[i] = stride(brw_vec4_grf(reg + (6 + i) / 2,
+ (i % 2) * 4), 0, 4, 1);
+ }
+ reg += (ALIGN(6 + c->key.nr_userclip, 4) / 4) * 2;
+ }
- /* Deal with curbe alignment:
- */
- reg += ((6 + c->key.nr_userclip + 3) / 4) * 2;
}
/* Vertex program parameters from curbe:
@@ -253,9 +260,11 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
c->first_output = reg;
c->first_overflow_output = 0;
- if (intel->gen >= 6)
- mrf = 3; /* no more pos store in attribute */
- else if (intel->gen == 5)
+ if (intel->gen >= 6) {
+ mrf = 3;
+ if (c->key.nr_userclip)
+ mrf += 2;
+ } else if (intel->gen == 5)
mrf = 8;
else
mrf = 4;
@@ -372,16 +381,20 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
/* See emit_vertex_write() for where the VUE's overhead on top of the
* attributes comes from.
*/
- if (intel->gen >= 6)
- c->prog_data.urb_entry_size = (attributes_in_vue + 2 + 7) / 8;
- else if (intel->gen == 5)
+ if (intel->gen >= 6) {
+ int header_regs = 2;
+ if (c->key.nr_userclip)
+ header_regs += 2;
+
+ c->prog_data.urb_entry_size = (attributes_in_vue + header_regs + 7) / 8;
+ } else if (intel->gen == 5)
c->prog_data.urb_entry_size = (attributes_in_vue + 6 + 3) / 4;
else
c->prog_data.urb_entry_size = (attributes_in_vue + 2 + 3) / 4;
c->prog_data.total_grf = reg;
- if (INTEL_DEBUG & DEBUG_VS) {
+ if (unlikely(INTEL_DEBUG & DEBUG_VS)) {
printf("%s NumAddrRegs %d\n", __FUNCTION__, c->vp->program.Base.NumAddressRegs);
printf("%s NumTemps %d\n", __FUNCTION__, c->vp->program.Base.NumTemporaries);
printf("%s reg = %d\n", __FUNCTION__, reg);
@@ -576,12 +589,11 @@ static void emit_min( struct brw_compile *p,
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
}
-
-static void emit_math1( struct brw_vs_compile *c,
- GLuint function,
- struct brw_reg dst,
- struct brw_reg arg0,
- GLuint precision)
+static void emit_math1_gen4(struct brw_vs_compile *c,
+ GLuint function,
+ struct brw_reg dst,
+ struct brw_reg arg0,
+ GLuint precision)
{
/* There are various odd behaviours with SEND on the simulator. In
* addition there are documented issues with the fact that the GEN4
@@ -591,14 +603,11 @@ static void emit_math1( struct brw_vs_compile *c,
* whether that turns out to be a simulator bug or not:
*/
struct brw_compile *p = &c->func;
- struct intel_context *intel = &p->brw->intel;
struct brw_reg tmp = dst;
GLboolean need_tmp = GL_FALSE;
- if (dst.file != BRW_GENERAL_REGISTER_FILE)
- need_tmp = GL_TRUE;
-
- if (intel->gen < 6 && dst.dw1.bits.writemask != 0xf)
+ if (dst.file != BRW_GENERAL_REGISTER_FILE ||
+ dst.dw1.bits.writemask != 0xf)
need_tmp = GL_TRUE;
if (need_tmp)
@@ -619,6 +628,57 @@ static void emit_math1( struct brw_vs_compile *c,
}
}
+static void
+emit_math1_gen6(struct brw_vs_compile *c,
+ GLuint function,
+ struct brw_reg dst,
+ struct brw_reg arg0,
+ GLuint precision)
+{
+ struct brw_compile *p = &c->func;
+ struct brw_reg tmp_src, tmp_dst;
+
+ /* Something is strange on gen6 math in 16-wide mode, though the
+ * docs say it's supposed to work. Punt to using align1 mode,
+ * which doesn't do writemasking and swizzles.
+ */
+ tmp_src = get_tmp(c);
+ tmp_dst = get_tmp(c);
+
+ brw_MOV(p, tmp_src, arg0);
+
+ brw_set_access_mode(p, BRW_ALIGN_1);
+ brw_math(p,
+ tmp_dst,
+ function,
+ BRW_MATH_SATURATE_NONE,
+ 2,
+ tmp_src,
+ BRW_MATH_DATA_SCALAR,
+ precision);
+ brw_set_access_mode(p, BRW_ALIGN_16);
+
+ brw_MOV(p, dst, tmp_dst);
+
+ release_tmp(c, tmp_src);
+ release_tmp(c, tmp_dst);
+}
+
+static void
+emit_math1(struct brw_vs_compile *c,
+ GLuint function,
+ struct brw_reg dst,
+ struct brw_reg arg0,
+ GLuint precision)
+{
+ struct brw_compile *p = &c->func;
+ struct intel_context *intel = &p->brw->intel;
+
+ if (intel->gen >= 6)
+ emit_math1_gen6(c, function, dst, arg0, precision);
+ else
+ emit_math1_gen4(c, function, dst, arg0, precision);
+}
static void emit_math2( struct brw_vs_compile *c,
GLuint function,
@@ -1392,9 +1452,33 @@ static void emit_vertex_write( struct brw_vs_compile *c)
/* Update the header for point size, user clipping flags, and -ve rhw
* workaround.
*/
- if ((c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_PSIZ)) ||
- c->key.nr_userclip || brw->has_negative_rhw_bug)
- {
+ if (intel->gen >= 6) {
+ struct brw_reg m1 = brw_message_reg(1);
+
+ /* On gen6, m1 has each value in a separate dword, so we never
+ * need to mess with a temporary for computing the m1 value.
+ */
+ brw_MOV(p, retype(m1, BRW_REGISTER_TYPE_UD), brw_imm_ud(0));
+ if (c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_PSIZ)) {
+ brw_MOV(p, brw_writemask(m1, WRITEMASK_W),
+ brw_swizzle1(c->regs[PROGRAM_OUTPUT][VERT_RESULT_PSIZ], 0));
+ }
+
+ /* Set the user clip distances in dword 8-15. (m3-4)*/
+ if (c->key.nr_userclip) {
+ for (i = 0; i < c->key.nr_userclip; i++) {
+ struct brw_reg m;
+ if (i < 4)
+ m = brw_message_reg(3);
+ else
+ m = brw_message_reg(4);
+
+ brw_DP4(p, brw_writemask(m, (1 << (i & 7))),pos, c->userplane[i]);
+ }
+ }
+ } else if ((c->prog_data.outputs_written &
+ BITFIELD64_BIT(VERT_RESULT_PSIZ)) ||
+ c->key.nr_userclip || brw->has_negative_rhw_bug) {
struct brw_reg header1 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
GLuint i;
@@ -1404,11 +1488,10 @@ static void emit_vertex_write( struct brw_vs_compile *c)
if (c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_PSIZ)) {
struct brw_reg psiz = c->regs[PROGRAM_OUTPUT][VERT_RESULT_PSIZ];
- if (intel->gen < 6) {
- brw_MUL(p, brw_writemask(header1, WRITEMASK_W), brw_swizzle1(psiz, 0), brw_imm_f(1<<11));
- brw_AND(p, brw_writemask(header1, WRITEMASK_W), header1, brw_imm_ud(0x7ff<<8));
- } else
- brw_MOV(p, brw_writemask(header1, WRITEMASK_W), brw_swizzle1(psiz, 0));
+ brw_MUL(p, brw_writemask(header1, WRITEMASK_W),
+ brw_swizzle1(psiz, 0), brw_imm_f(1<<11));
+ brw_AND(p, brw_writemask(header1, WRITEMASK_W),
+ header1, brw_imm_ud(0x7ff<<8));
}
for (i = 0; i < c->key.nr_userclip; i++) {
@@ -1461,12 +1544,14 @@ static void emit_vertex_write( struct brw_vs_compile *c)
* dword 0-3 (m1) of the header is indices, point width, clip flags.
* dword 4-7 (m2) is the 4D space position
* dword 8-15 (m3,m4) of the vertex header is the user clip distance if
- * enabled. We don't use it, so skip it.
- * m3 is the first vertex element data we fill, which is the vertex
- * position.
+ * enabled.
+ * m3 or 5 is the first vertex element data we fill, which is
+ * the vertex position.
*/
brw_MOV(p, brw_message_reg(2), pos);
len_vertex_header = 1;
+ if (c->key.nr_userclip > 0)
+ len_vertex_header += 2;
} else if (intel->gen == 5) {
/* There are 20 DWs (D0-D19) in VUE header on Ironlake:
* dword 0-3 (m1) of the header is indices, point width, clip flags.
@@ -1640,17 +1725,13 @@ void brw_vs_emit(struct brw_vs_compile *c )
GLuint index;
GLuint file;
- if (INTEL_DEBUG & DEBUG_VS) {
+ if (unlikely(INTEL_DEBUG & DEBUG_VS)) {
printf("vs-mesa:\n");
_mesa_fprint_program_opt(stdout, &c->vp->program.Base, PROG_PRINT_DEBUG,
GL_TRUE);
printf("\n");
}
- /* FIXME Need to fix conditional instruction to remove this */
- if (intel->gen >= 6)
- p->single_program_flow = GL_TRUE;
-
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_set_access_mode(p, BRW_ALIGN_16);
if_depth_in_loop[loop_depth] = 0;
@@ -2010,7 +2091,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
brw_optimize(p);
- if (INTEL_DEBUG & DEBUG_VS) {
+ if (unlikely(INTEL_DEBUG & DEBUG_VS)) {
int i;
printf("vs-native:\n");
diff --git a/src/mesa/drivers/dri/i965/brw_vs_state.c b/src/mesa/drivers/dri/i965/brw_vs_state.c
index ebae94269f..be92313861 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_state.c
@@ -154,7 +154,7 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
*/
vs.vs5.sampler_count = 0;
- if (INTEL_DEBUG & DEBUG_STATS)
+ if (unlikely(INTEL_DEBUG & DEBUG_STATS))
vs.thread4.stats_enable = 1;
/* Vertex program always enabled:
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 7f3ba5f058..ccdc18e0b8 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -198,7 +198,7 @@ static void do_wm_prog( struct brw_context *brw,
c->prog_data.total_scratch = 0;
}
- if (INTEL_DEBUG & DEBUG_WM)
+ if (unlikely(INTEL_DEBUG & DEBUG_WM))
fprintf(stderr, "\n");
/* get the program
@@ -423,6 +423,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
*/
if (fp->program.Base.InputsRead & FRAG_BIT_WPOS) {
key->drawable_height = ctx->DrawBuffer->Height;
+ key->render_to_fbo = ctx->DrawBuffer->Name != 0;
}
key->nr_color_regions = brw->state.nr_color_regions;
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index 99bd15c187..2ca685784f 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -70,7 +70,8 @@ struct brw_wm_prog_key {
GLuint linear_color:1; /**< linear interpolation vs perspective interp */
GLuint runtime_check_aads_emit:1;
GLuint nr_color_regions:5;
-
+ GLuint render_to_fbo:1;
+
GLbitfield proj_attrib_mask; /**< one bit per fragment program attribute */
GLuint shadowtex_mask:16;
GLuint yuvtex_mask:16;
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index 88bc64e5dd..96fecc97ee 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -83,6 +83,7 @@ brw_wm_arg_can_be_immediate(enum prog_opcode opcode, int arg)
[OPCODE_SLE] = 2,
[OPCODE_SLT] = 2,
[OPCODE_SNE] = 2,
+ [OPCODE_SWZ] = 1,
[OPCODE_XPD] = 2,
};
@@ -895,11 +896,12 @@ void emit_math1(struct brw_wm_compile *c,
BRW_MATH_SATURATE_NONE);
struct brw_reg src;
- if (intel->gen >= 6 && arg0[0].hstride == BRW_HORIZONTAL_STRIDE_0) {
- /* Gen6 math requires that source and dst horizontal stride be 1.
- *
+ if (intel->gen >= 6 && (arg0[0].hstride == BRW_HORIZONTAL_STRIDE_0 ||
+ arg0[0].file != BRW_GENERAL_REGISTER_FILE)) {
+ /* Gen6 math requires that source and dst horizontal stride be 1,
+ * and that the argument be in the GRF.
*/
- src = *dst;
+ src = dst[dst_chan];
brw_MOV(p, src, arg0[0]);
} else {
src = arg0[0];
@@ -1576,7 +1578,7 @@ static void emit_spill( struct brw_wm_compile *c,
mov (1) r0.2<1>:d 0x00000080:d { Align1 NoMask }
send (16) null.0<1>:uw m1 r0.0<8;8,1>:uw 0x053003ff:ud { Align1 }
*/
- brw_oword_block_write(p, brw_message_reg(1), 2, slot);
+ brw_oword_block_write_scratch(p, brw_message_reg(1), 2, slot);
}
@@ -1920,7 +1922,7 @@ void brw_wm_emit( struct brw_wm_compile *c )
brw_remove_grf_to_mrf_moves(p);
}
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
int i;
printf("wm-native:\n");
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index 15a238cda6..2cae698880 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
@@ -663,7 +663,7 @@ static void precalc_tex( struct brw_wm_compile *c,
const struct prog_instruction *inst )
{
struct prog_src_register coord;
- struct prog_dst_register tmpcoord;
+ struct prog_dst_register tmpcoord = { 0 };
const GLuint unit = c->fp->program.Base.SamplerUnits[inst->TexSrcUnit];
assert(unit < BRW_MAX_TEX_UNIT);
@@ -963,7 +963,7 @@ static void emit_render_target_writes( struct brw_wm_compile *c )
struct prog_src_register outcolor;
GLuint i;
- struct prog_instruction *inst, *last_inst;
+ struct prog_instruction *inst, *last_inst = NULL;
/* The inst->Aux field is used for FB write target and the EOT marker */
@@ -1058,7 +1058,7 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
struct brw_fragment_program *fp = c->fp;
GLuint insn;
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
printf("pre-fp:\n");
_mesa_fprint_program_opt(stdout, &fp->program.Base, PROG_PRINT_DEBUG,
GL_TRUE);
@@ -1174,7 +1174,7 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
}
}
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
printf("pass_fp:\n");
print_insns( c->prog_instructions, c->nr_fp_insns );
printf("\n");
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 55aceea9b5..7fe8ab1f33 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -19,7 +19,7 @@ GLboolean brw_wm_is_glsl(const struct gl_fragment_program *fp)
{
int i;
- if (INTEL_DEBUG & DEBUG_GLSL_FORCE)
+ if (unlikely(INTEL_DEBUG & DEBUG_GLSL_FORCE))
return GL_TRUE;
for (i = 0; i < fp->Base.NumInstructions; i++) {
@@ -307,21 +307,20 @@ static void prealloc_reg(struct brw_wm_compile *c)
/* use a real constant buffer, or just use a section of the GRF? */
/* XXX this heuristic may need adjustment... */
- if ((nr_params + nr_temps) * 4 + reg_index > 80)
- c->fp->use_const_buffer = GL_TRUE;
- else
- c->fp->use_const_buffer = GL_FALSE;
- /*printf("WM use_const_buffer = %d\n", c->fp->use_const_buffer);*/
+ if ((nr_params + nr_temps) * 4 + reg_index > 80) {
+ for (i = 0; i < nr_params; i++) {
+ float *pv = c->fp->program.Base.Parameters->ParameterValues[i];
+ for (j = 0; j < 4; j++) {
+ c->prog_data.pull_param[c->prog_data.nr_pull_params] = &pv[j];
+ c->prog_data.nr_pull_params++;
+ }
+ }
- if (c->fp->use_const_buffer) {
- /* We'll use a real constant buffer and fetch constants from
- * it with a dataport read message.
- */
+ c->prog_data.nr_params = 0;
+ }
+ /*printf("WM use_const_buffer = %d\n", c->fp->use_const_buffer);*/
- /* number of float constants in CURBE */
- c->prog_data.nr_params = 0;
- }
- else {
+ if (!c->prog_data.nr_pull_params) {
const struct gl_program_parameter_list *plist =
c->fp->program.Base.Parameters;
int index = 0;
@@ -463,7 +462,7 @@ static void prealloc_reg(struct brw_wm_compile *c)
* They'll be found in these registers.
* XXX alloc these on demand!
*/
- if (c->fp->use_const_buffer) {
+ if (c->prog_data.nr_pull_params) {
for (i = 0; i < 3; i++) {
c->current_const[i].index = -1;
c->current_const[i].reg = brw_vec8_grf(alloc_grf(c), 0);
@@ -501,12 +500,11 @@ static void fetch_constants(struct brw_wm_compile *c,
#endif
/* need to fetch the constant now */
- brw_dp_READ_4(p,
- c->current_const[i].reg, /* writeback dest */
- src->RelAddr, /* relative indexing? */
- 16 * src->Index, /* byte offset */
- SURF_INDEX_FRAG_CONST_BUFFER/* binding table index */
- );
+ brw_oword_block_read(p,
+ c->current_const[i].reg,
+ brw_message_reg(1),
+ 16 * src->Index,
+ SURF_INDEX_FRAG_CONST_BUFFER);
}
}
}
@@ -606,7 +604,7 @@ static struct brw_reg get_src_reg(struct brw_wm_compile *c,
}
}
- if (c->fp->use_const_buffer &&
+ if (c->prog_data.nr_pull_params &&
(src->File == PROGRAM_STATE_VAR ||
src->File == PROGRAM_CONSTANT ||
src->File == PROGRAM_UNIFORM)) {
@@ -729,7 +727,7 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
#endif
/* fetch any constants that this instruction needs */
- if (c->fp->use_const_buffer)
+ if (c->prog_data.nr_pull_params)
fetch_constants(c, inst);
if (inst->Opcode != OPCODE_ARL) {
@@ -1004,7 +1002,7 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
}
post_wm_emit(c);
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
printf("wm-native:\n");
for (i = 0; i < p->nr_insn; i++)
brw_disasm(stdout, &p->store[i], intel->gen);
@@ -1018,7 +1016,7 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
*/
void brw_wm_glsl_emit(struct brw_context *brw, struct brw_wm_compile *c)
{
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
printf("brw_wm_glsl_emit:\n");
}
@@ -1028,7 +1026,7 @@ void brw_wm_glsl_emit(struct brw_context *brw, struct brw_wm_compile *c)
/* actual code generation */
brw_wm_emit_glsl(brw, c);
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
brw_wm_print_program(c, "brw_wm_glsl_emit done");
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass0.c b/src/mesa/drivers/dri/i965/brw_wm_pass0.c
index 8fc960b445..83152526b3 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass0.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass0.c
@@ -113,6 +113,7 @@ static const struct brw_wm_ref *get_param_ref( struct brw_wm_compile *c,
struct brw_wm_ref *ref = get_ref(c);
c->prog_data.param[i] = param_ptr;
+ c->prog_data.param_convert[i] = PARAM_NO_CONVERT;
c->nr_creg = (i+16)/16;
/* Push the offsets into hw_reg. These will be added to the
@@ -439,7 +440,7 @@ void brw_wm_pass0( struct brw_wm_compile *c )
}
}
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
brw_wm_print_program(c, "pass0");
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass1.c b/src/mesa/drivers/dri/i965/brw_wm_pass1.c
index 962515a99e..3a2874b6dd 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass1.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass1.c
@@ -291,7 +291,7 @@ void brw_wm_pass1( struct brw_wm_compile *c )
track_arg(c, inst, 2, read2);
}
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
brw_wm_print_program(c, "pass1");
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass2.c b/src/mesa/drivers/dri/i965/brw_wm_pass2.c
index 54acb3038b..44e3953814 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass2.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass2.c
@@ -331,13 +331,13 @@ void brw_wm_pass2( struct brw_wm_compile *c )
}
}
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
brw_wm_print_program(c, "pass2");
}
c->state = PASS2_DONE;
- if (INTEL_DEBUG & DEBUG_WM) {
+ if (unlikely(INTEL_DEBUG & DEBUG_WM)) {
brw_wm_print_program(c, "pass2/done");
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 433ccc66f0..76de7b7b6f 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -137,9 +137,9 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
/* If using the fragment shader backend, the program is always
* 8-wide.
*/
- if (ctx->Shader.CurrentProgram) {
+ if (ctx->Shader.CurrentFragmentProgram) {
struct brw_shader *shader = (struct brw_shader *)
- ctx->Shader.CurrentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT];
+ ctx->Shader.CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT];
if (shader != NULL && shader->ir != NULL) {
key->is_glsl = GL_TRUE;
@@ -249,7 +249,7 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
wm.wm5.line_stipple = key->line_stipple;
- if (INTEL_DEBUG & DEBUG_STATS || key->stats_wm)
+ if (unlikely(INTEL_DEBUG & DEBUG_STATS) || key->stats_wm)
wm.wm4.stats_enable = 1;
bo = brw_upload_cache(&brw->cache, BRW_WM_UNIT,
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 5588702afc..76fc94df1f 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -319,13 +319,14 @@ prepare_wm_constants(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
struct brw_fragment_program *fp =
(struct brw_fragment_program *) brw->fragment_program;
- const struct gl_program_parameter_list *params = fp->program.Base.Parameters;
- const int size = params->NumParameters * 4 * sizeof(GLfloat);
+ const int size = brw->wm.prog_data->nr_pull_params * sizeof(float);
+ float *constants;
+ unsigned int i;
_mesa_load_state_parameters(ctx, fp->program.Base.Parameters);
/* BRW_NEW_FRAGMENT_PROGRAM */
- if (!fp->use_const_buffer) {
+ if (brw->wm.prog_data->nr_pull_params == 0) {
if (brw->wm.const_bo) {
drm_intel_bo_unreference(brw->wm.const_bo);
brw->wm.const_bo = NULL;
@@ -335,11 +336,19 @@ prepare_wm_constants(struct brw_context *brw)
}
drm_intel_bo_unreference(brw->wm.const_bo);
- brw->wm.const_bo = drm_intel_bo_alloc(intel->bufmgr, "vp_const_buffer",
+ brw->wm.const_bo = drm_intel_bo_alloc(intel->bufmgr, "WM const bo",
size, 64);
/* _NEW_PROGRAM_CONSTANTS */
- drm_intel_bo_subdata(brw->wm.const_bo, 0, size, params->ParameterValues);
+ drm_intel_gem_bo_map_gtt(brw->wm.const_bo);
+ constants = brw->wm.const_bo->virtual;
+ for (i = 0; i < brw->wm.prog_data->nr_pull_params; i++) {
+ constants[i] = convert_param(brw->wm.prog_data->pull_param_convert[i],
+ *brw->wm.prog_data->pull_param[i]);
+ }
+ drm_intel_gem_bo_unmap_gtt(brw->wm.const_bo);
+
+ brw->state.dirty.brw |= BRW_NEW_WM_CONSTBUF;
}
const struct brw_tracked_state brw_wm_constants = {
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c
index 0d6e923f73..800a255521 100644
--- a/src/mesa/drivers/dri/i965/gen6_cc.c
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c
@@ -254,7 +254,7 @@ prepare_color_calc_state(struct brw_context *brw)
const struct brw_tracked_state gen6_color_calc_state = {
.dirty = {
- .mesa = _NEW_COLOR,
+ .mesa = _NEW_COLOR | _NEW_STENCIL,
.brw = 0,
.cache = 0,
},
diff --git a/src/mesa/drivers/dri/i965/gen6_clip_state.c b/src/mesa/drivers/dri/i965/gen6_clip_state.c
index cd2ac9d92f..c65b41e2b6 100644
--- a/src/mesa/drivers/dri/i965/gen6_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_clip_state.c
@@ -28,6 +28,7 @@
#include "brw_context.h"
#include "brw_state.h"
#include "brw_defines.h"
+#include "brw_util.h"
#include "intel_batchbuffer.h"
static void
@@ -36,7 +37,7 @@ upload_clip_state(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
struct gl_context *ctx = &intel->ctx;
uint32_t depth_clamp = 0;
- uint32_t provoking;
+ uint32_t provoking, userclip;
if (!ctx->Transform.DepthClamp)
depth_clamp = GEN6_CLIP_Z_TEST;
@@ -50,6 +51,9 @@ upload_clip_state(struct brw_context *brw)
(1 << GEN6_CLIP_LINE_PROVOKE_SHIFT);
}
+ /* _NEW_TRANSFORM */
+ userclip = (1 << brw_count_bits(ctx->Transform.ClipPlanesEnabled)) - 1;
+
BEGIN_BATCH(4);
OUT_BATCH(CMD_3D_CLIP_STATE << 16 | (4 - 2));
OUT_BATCH(GEN6_CLIP_STATISTICS_ENABLE);
@@ -57,6 +61,7 @@ upload_clip_state(struct brw_context *brw)
GEN6_CLIP_API_OGL |
GEN6_CLIP_MODE_NORMAL |
GEN6_CLIP_XY_TEST |
+ userclip << GEN6_USER_CLIP_CLIP_DISTANCES_SHIFT |
depth_clamp |
provoking);
OUT_BATCH(GEN6_CLIP_FORCE_ZERO_RTAINDEX);
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index 55a70bea62..471067e8f0 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -73,12 +73,19 @@ upload_sf_state(struct brw_context *brw)
/* _NEW_BUFFER */
GLboolean render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0;
int attr = 0;
+ int urb_start;
+
+ /* _NEW_TRANSFORM */
+ if (ctx->Transform.ClipPlanesEnabled)
+ urb_start = 2;
+ else
+ urb_start = 1;
dw1 =
GEN6_SF_SWIZZLE_ENABLE |
num_outputs << GEN6_SF_NUM_OUTPUTS_SHIFT |
(num_inputs + 1) / 2 << GEN6_SF_URB_ENTRY_READ_LENGTH_SHIFT |
- 1 << GEN6_SF_URB_ENTRY_READ_OFFSET_SHIFT;
+ urb_start << GEN6_SF_URB_ENTRY_READ_OFFSET_SHIFT;
dw2 = GEN6_SF_VIEWPORT_TRANSFORM_ENABLE |
GEN6_SF_STATISTICS_ENABLE;
dw3 = 0;
@@ -195,7 +202,9 @@ const struct brw_tracked_state gen6_sf_state = {
_NEW_POLYGON |
_NEW_LINE |
_NEW_SCISSOR |
- _NEW_BUFFERS),
+ _NEW_BUFFERS |
+ _NEW_POINT |
+ _NEW_TRANSFORM),
.brw = BRW_NEW_CONTEXT,
.cache = CACHE_NEW_VS_PROG
},
diff --git a/src/mesa/drivers/dri/i965/gen6_urb.c b/src/mesa/drivers/dri/i965/gen6_urb.c
index 0a264fcd90..a34123478f 100644
--- a/src/mesa/drivers/dri/i965/gen6_urb.c
+++ b/src/mesa/drivers/dri/i965/gen6_urb.c
@@ -40,7 +40,7 @@ prepare_urb( struct brw_context *brw )
else
brw->urb.nr_gs_entries = 0;
/* CACHE_NEW_VS_PROG */
- brw->urb.vs_size = MIN2(brw->vs.prog_data->urb_entry_size, 1);
+ brw->urb.vs_size = MAX2(brw->vs.prog_data->urb_entry_size, 1);
/* Check that the number of URB rows (8 floats each) allocated is less
* than the URB space.
diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c
index 304eaddf40..e94d0c0ddb 100644
--- a/src/mesa/drivers/dri/i965/gen6_vs_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c
@@ -40,11 +40,11 @@ upload_vs_state(struct brw_context *brw)
struct gl_context *ctx = &intel->ctx;
const struct brw_vertex_program *vp =
brw_vertex_program_const(brw->vertex_program);
- unsigned int nr_params = vp->program.Base.Parameters->NumParameters;
+ unsigned int nr_params = brw->vs.prog_data->nr_params / 4;
drm_intel_bo *constant_bo;
int i;
- if (vp->use_const_buffer || nr_params == 0) {
+ if (brw->vs.prog_data->nr_params == 0 && !ctx->Transform.ClipPlanesEnabled) {
/* Disable the push constant buffers. */
BEGIN_BATCH(5);
OUT_BATCH(CMD_3D_CONSTANT_VS_STATE << 16 | (5 - 2));
@@ -54,6 +54,9 @@ upload_vs_state(struct brw_context *brw)
OUT_BATCH(0);
ADVANCE_BATCH();
} else {
+ int params_uploaded = 0;
+ float *param;
+
if (brw->vertex_program->IsNVProgram)
_mesa_load_tracked_matrices(ctx);
@@ -63,14 +66,55 @@ upload_vs_state(struct brw_context *brw)
_mesa_load_state_parameters(ctx, vp->program.Base.Parameters);
constant_bo = drm_intel_bo_alloc(intel->bufmgr, "VS constant_bo",
- nr_params * 4 * sizeof(float),
+ (MAX_CLIP_PLANES + nr_params) *
+ 4 * sizeof(float),
4096);
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));
+ param = constant_bo->virtual;
+
+ /* This should be loaded like any other param, but it's ad-hoc
+ * until we redo the VS backend.
+ */
+ for (i = 0; i < MAX_CLIP_PLANES; i++) {
+ if (ctx->Transform.ClipPlanesEnabled & (1 << i)) {
+ memcpy(param, ctx->Transform._ClipUserPlane[i], 4 * sizeof(float));
+ param += 4;
+ params_uploaded++;
+ }
}
+ /* Align to a reg for convenience for brw_vs_emit.c */
+ if (params_uploaded & 1) {
+ param += 4;
+ params_uploaded++;
+ }
+
+ if (vp->use_const_buffer) {
+ for (i = 0; i < vp->program.Base.Parameters->NumParameters; i++) {
+ if (brw->vs.constant_map[i] != -1) {
+ memcpy(param + brw->vs.constant_map[i] * 4,
+ vp->program.Base.Parameters->ParameterValues[i],
+ 4 * sizeof(float));
+ params_uploaded++;
+ }
+ }
+ } else {
+ for (i = 0; i < nr_params; i++) {
+ memcpy(param, vp->program.Base.Parameters->ParameterValues[i],
+ 4 * sizeof(float));
+ param += 4;
+ params_uploaded++;
+ }
+ }
+
+ if (0) {
+ printf("VS constant buffer:\n");
+ for (i = 0; i < params_uploaded; i++) {
+ float *buf = (float *)constant_bo->virtual + i * 4;
+ printf("%d: %f %f %f %f\n",
+ i, buf[0], buf[1], buf[2], buf[3]);
+ }
+ }
+
drm_intel_gem_bo_unmap_gtt(constant_bo);
BEGIN_BATCH(5);
@@ -79,7 +123,7 @@ upload_vs_state(struct brw_context *brw)
(5 - 2));
OUT_RELOC(constant_bo,
I915_GEM_DOMAIN_RENDER, 0, /* XXX: bad domain */
- ALIGN(nr_params, 2) / 2 - 1);
+ ALIGN(params_uploaded, 2) / 2 - 1);
OUT_BATCH(0);
OUT_BATCH(0);
OUT_BATCH(0);
@@ -91,7 +135,7 @@ upload_vs_state(struct brw_context *brw)
BEGIN_BATCH(6);
OUT_BATCH(CMD_3D_VS_STATE << 16 | (6 - 2));
OUT_RELOC(brw->vs.prog_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
- OUT_BATCH(GEN6_VS_SPF_MODE | (0 << GEN6_VS_SAMPLER_COUNT_SHIFT) |
+ OUT_BATCH((0 << GEN6_VS_SAMPLER_COUNT_SHIFT) |
(brw->vs.nr_surfaces << GEN6_VS_BINDING_TABLE_ENTRY_COUNT_SHIFT));
OUT_BATCH(0); /* scratch space base offset */
OUT_BATCH((1 << GEN6_VS_DISPATCH_START_GRF_SHIFT) |
diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
index 21059be965..ea5418bacf 100644
--- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
@@ -63,7 +63,8 @@ prepare_wm_constants(struct brw_context *brw)
drm_intel_gem_bo_map_gtt(brw->wm.push_const_bo);
constants = brw->wm.push_const_bo->virtual;
for (i = 0; i < brw->wm.prog_data->nr_params; i++) {
- constants[i] = *brw->wm.prog_data->param[i];
+ constants[i] = convert_param(brw->wm.prog_data->param_convert[i],
+ *brw->wm.prog_data->param[i]);
}
drm_intel_gem_bo_unmap_gtt(brw->wm.push_const_bo);
}
@@ -72,7 +73,7 @@ prepare_wm_constants(struct brw_context *brw)
const struct brw_tracked_state gen6_wm_constants = {
.dirty = {
.mesa = _NEW_PROGRAM_CONSTANTS,
- .brw = 0,
+ .brw = BRW_NEW_FRAGMENT_PROGRAM,
.cache = 0,
},
.prepare = prepare_wm_constants,
@@ -87,7 +88,7 @@ upload_wm_state(struct brw_context *brw)
brw_fragment_program_const(brw->fragment_program);
uint32_t dw2, dw4, dw5, dw6;
- if (fp->use_const_buffer || brw->wm.prog_data->nr_params == 0) {
+ if (brw->wm.prog_data->nr_params == 0) {
/* Disable the push constant buffers. */
BEGIN_BATCH(5);
OUT_BATCH(CMD_3D_CONSTANT_PS_STATE << 16 | (5 - 2));
@@ -115,7 +116,7 @@ upload_wm_state(struct brw_context *brw)
dw5 |= GEN6_WM_LINE_AA_WIDTH_1_0;
dw5 |= GEN6_WM_LINE_END_CAP_AA_WIDTH_0_5;
- /* BRW_NEW_NR_SURFACES */
+ /* BRW_NEW_NR_WM_SURFACES */
dw2 |= brw->wm.nr_surfaces << GEN6_WM_BINDING_TABLE_ENTRY_COUNT_SHIFT;
/* CACHE_NEW_SAMPLER */
diff --git a/src/mesa/drivers/dri/i965/intel_structs.h b/src/mesa/drivers/dri/i965/intel_structs.h
deleted file mode 100644
index 522e3bd92c..0000000000
--- a/src/mesa/drivers/dri/i965/intel_structs.h
+++ /dev/null
@@ -1,132 +0,0 @@
-#ifndef INTEL_STRUCTS_H
-#define INTEL_STRUCTS_H
-
-struct br0 {
- GLuint length:8;
- GLuint pad0:3;
- GLuint dst_tiled:1;
- GLuint pad1:8;
- GLuint write_rgb:1;
- GLuint write_alpha:1;
- GLuint opcode:7;
- GLuint client:3;
-};
-
-
-struct br13 {
- GLint dest_pitch:16;
- GLuint rop:8;
- GLuint color_depth:2;
- GLuint pad1:3;
- GLuint mono_source_transparency:1;
- GLuint clipping_enable:1;
- GLuint pad0:1;
-};
-
-
-
-/* This is an attempt to move some of the 2D interaction in this
- * driver to using structs for packets rather than a bunch of #defines
- * and dwords.
- */
-struct xy_color_blit {
- struct br0 br0;
- struct br13 br13;
-
- struct {
- GLuint dest_x1:16;
- GLuint dest_y1:16;
- } dw2;
-
- struct {
- GLuint dest_x2:16;
- GLuint dest_y2:16;
- } dw3;
-
- GLuint dest_base_addr;
- GLuint color;
-};
-
-struct xy_src_copy_blit {
- struct br0 br0;
- struct br13 br13;
-
- struct {
- GLuint dest_x1:16;
- GLuint dest_y1:16;
- } dw2;
-
- struct {
- GLuint dest_x2:16;
- GLuint dest_y2:16;
- } dw3;
-
- GLuint dest_base_addr;
-
- struct {
- GLuint src_x1:16;
- GLuint src_y1:16;
- } dw5;
-
- struct {
- GLint src_pitch:16;
- GLuint pad:16;
- } dw6;
-
- GLuint src_base_addr;
-};
-
-struct xy_setup_blit {
- struct br0 br0;
- struct br13 br13;
-
- struct {
- GLuint clip_x1:16;
- GLuint clip_y1:16;
- } dw2;
-
- struct {
- GLuint clip_x2:16;
- GLuint clip_y2:16;
- } dw3;
-
- GLuint dest_base_addr;
- GLuint background_color;
- GLuint foreground_color;
- GLuint pattern_base_addr;
-};
-
-
-struct xy_text_immediate_blit {
- struct {
- GLuint length:8;
- GLuint pad2:3;
- GLuint dst_tiled:1;
- GLuint pad1:4;
- GLuint byte_packed:1;
- GLuint pad0:5;
- GLuint opcode:7;
- GLuint client:3;
- } dw0;
-
- struct {
- GLuint dest_x1:16;
- GLuint dest_y1:16;
- } dw1;
-
- struct {
- GLuint dest_x2:16;
- GLuint dest_y2:16;
- } dw2;
-
- /* Src bitmap data follows as inline dwords.
- */
-};
-
-
-#define CLIENT_2D 0x2
-#define OPCODE_XY_SETUP_BLT 0x1
-#define OPCODE_XY_COLOR_BLT 0x50
-#define OPCODE_XY_TEXT_IMMEDIATE_BLT 0x31
-
-#endif
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
index 9b39823917..4b498f8c5b 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
@@ -44,7 +44,9 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch)
batch->buf = drm_intel_bo_alloc(intel->bufmgr, "batchbuffer",
intel->maxBatchSize, 4096);
- batch->map = batch->buffer;
+ drm_intel_gem_bo_map_gtt(batch->buf);
+ batch->map = batch->buf->virtual;
+
batch->size = intel->maxBatchSize;
batch->ptr = batch->map;
batch->reserved_space = BATCH_RESERVED;
@@ -58,7 +60,6 @@ intel_batchbuffer_alloc(struct intel_context *intel)
struct intel_batchbuffer *batch = calloc(sizeof(*batch), 1);
batch->intel = intel;
- batch->buffer = malloc(intel->maxBatchSize);
intel_batchbuffer_reset(batch);
return batch;
@@ -67,8 +68,11 @@ intel_batchbuffer_alloc(struct intel_context *intel)
void
intel_batchbuffer_free(struct intel_batchbuffer *batch)
{
- free (batch->buffer);
- drm_intel_bo_unreference(batch->buf);
+ if (batch->map) {
+ drm_intel_gem_bo_unmap_gtt(batch->buf);
+ batch->map = NULL;
+ }
+ dri_bo_unreference(batch->buf);
batch->buf = NULL;
free(batch);
}
@@ -84,13 +88,7 @@ do_flush_locked(struct intel_batchbuffer *batch, GLuint used)
int ret = 0;
int x_off = 0, y_off = 0;
- drm_intel_bo_subdata(batch->buf, 0, used, batch->buffer);
- if (batch->state_batch_offset != batch->size) {
- drm_intel_bo_subdata(batch->buf,
- batch->state_batch_offset,
- batch->size - batch->state_batch_offset,
- batch->buffer + batch->state_batch_offset);
- }
+ drm_intel_gem_bo_unmap_gtt(batch->buf);
batch->ptr = NULL;
@@ -99,7 +97,7 @@ do_flush_locked(struct intel_batchbuffer *batch, GLuint used)
(x_off & 0xffff) | (y_off << 16));
}
- if (INTEL_DEBUG & DEBUG_BATCH) {
+ if (unlikely(INTEL_DEBUG & DEBUG_BATCH)) {
drm_intel_bo_map(batch->buf, GL_FALSE);
intel_decode(batch->buf->virtual, used / 4, batch->buf->offset,
intel->intelScreen->deviceID, GL_TRUE);
@@ -130,7 +128,7 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
if (used == 0)
return;
- if (INTEL_DEBUG & DEBUG_BATCH)
+ if (unlikely(INTEL_DEBUG & DEBUG_BATCH))
fprintf(stderr, "%s:%d: Batchbuffer flush with %db used\n", file, line,
used);
@@ -174,7 +172,7 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
do_flush_locked(batch, used);
- if (INTEL_DEBUG & DEBUG_SYNC) {
+ if (unlikely(INTEL_DEBUG & DEBUG_SYNC)) {
fprintf(stderr, "waiting for idle\n");
drm_intel_bo_map(batch->buf, GL_TRUE);
drm_intel_bo_unmap(batch->buf);
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
index ae53f45511..428c027c2f 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
@@ -17,8 +17,6 @@ struct intel_batchbuffer
drm_intel_bo *buf;
- GLubyte *buffer;
-
GLubyte *map;
GLubyte *ptr;
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index a74e21720f..c2917e9b07 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -483,8 +483,11 @@ intel_emit_linear_blit(struct intel_context *intel,
/* Blits are in a different ringbuffer so we don't use them. */
assert(intel->gen < 6);
- /* The pitch is a signed value. */
- pitch = MIN2(size, (1 << 15) - 1);
+ /* The pitch given to the GPU must be DWORD aligned, and
+ * we want width to match pitch. Max width is (1 << 15 - 1),
+ * rounding that down to the nearest DWORD is 1 << 15 - 4
+ */
+ pitch = MIN2(size, (1 << 15) - 4);
height = size / pitch;
ok = intelEmitCopyBlit(intel, 1,
pitch, src_bo, src_offset, I915_TILING_NONE,
@@ -499,6 +502,7 @@ intel_emit_linear_blit(struct intel_context *intel,
dst_offset += pitch * height;
size -= pitch * height;
assert (size < (1 << 15));
+ assert ((size & 3) == 0); /* Pitch must be DWORD aligned */
if (size != 0) {
ok = intelEmitCopyBlit(intel, 1,
size, src_bo, src_offset, I915_TILING_NONE,
diff --git a/src/mesa/drivers/dri/intel/intel_chipset.h b/src/mesa/drivers/dri/intel/intel_chipset.h
index 1e7ceed32a..4fecdbed20 100644
--- a/src/mesa/drivers/dri/intel/intel_chipset.h
+++ b/src/mesa/drivers/dri/intel/intel_chipset.h
@@ -67,6 +67,7 @@
#define PCI_CHIP_G45_G 0x2E22
#define PCI_CHIP_G41_G 0x2E32
#define PCI_CHIP_B43_G 0x2E42
+#define PCI_CHIP_B43_G1 0x2E92
#define PCI_CHIP_ILD_G 0x0042
#define PCI_CHIP_ILM_G 0x0046
@@ -93,7 +94,8 @@
devid == PCI_CHIP_Q45_G || \
devid == PCI_CHIP_G45_G || \
devid == PCI_CHIP_G41_G || \
- devid == PCI_CHIP_B43_G)
+ devid == PCI_CHIP_B43_G || \
+ devid == PCI_CHIP_B43_G1)
#define IS_GM45(devid) (devid == PCI_CHIP_GM45_GM)
#define IS_G4X(devid) (IS_G45(devid) || IS_GM45(devid))
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index d7814635b7..fa451f0045 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -58,6 +58,21 @@ static const char *buffer_names[] = {
[BUFFER_COLOR7] = "color7",
};
+static void
+debug_mask(const char *name, GLbitfield mask)
+{
+ GLuint i;
+
+ if (unlikely(INTEL_DEBUG & DEBUG_BLIT)) {
+ DBG("%s clear:", name);
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ if (mask & (1 << i))
+ DBG(" %s", buffer_names[i]);
+ }
+ DBG("\n");
+ }
+}
+
/**
* Called by ctx->Driver.Clear.
*/
@@ -70,7 +85,6 @@ intelClear(struct gl_context *ctx, GLbitfield mask)
GLbitfield blit_mask = 0;
GLbitfield swrast_mask = 0;
struct gl_framebuffer *fb = ctx->DrawBuffer;
- GLuint i;
if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT)) {
intel->front_buffer_dirty = GL_TRUE;
@@ -162,39 +176,17 @@ intelClear(struct gl_context *ctx, GLbitfield mask)
}
if (blit_mask) {
- if (INTEL_DEBUG & DEBUG_BLIT) {
- DBG("blit clear:");
- for (i = 0; i < BUFFER_COUNT; i++) {
- if (blit_mask & (1 << i))
- DBG(" %s", buffer_names[i]);
- }
- DBG("\n");
- }
+ debug_mask("blit", blit_mask);
intelClearWithBlit(ctx, blit_mask);
}
if (tri_mask) {
- if (INTEL_DEBUG & DEBUG_BLIT) {
- DBG("tri clear:");
- for (i = 0; i < BUFFER_COUNT; i++) {
- if (tri_mask & (1 << i))
- DBG(" %s", buffer_names[i]);
- }
- DBG("\n");
- }
-
+ debug_mask("tri", tri_mask);
_mesa_meta_Clear(&intel->ctx, tri_mask);
}
if (swrast_mask) {
- if (INTEL_DEBUG & DEBUG_BLIT) {
- DBG("swrast clear:");
- for (i = 0; i < BUFFER_COUNT; i++) {
- if (swrast_mask & (1 << i))
- DBG(" %s", buffer_names[i]);
- }
- DBG("\n");
- }
+ debug_mask("swrast", swrast_mask);
_swrast_Clear(ctx, swrast_mask);
}
}
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 7ace50bde9..152cdcaf37 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -155,6 +155,7 @@ intelGetString(struct gl_context * ctx, GLenum name)
chipset = "Intel(R) G41";
break;
case PCI_CHIP_B43_G:
+ case PCI_CHIP_B43_G1:
chipset = "Intel(R) B43";
break;
case PCI_CHIP_ILD_G:
@@ -249,7 +250,7 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
* thus ignore the invalidate. */
drawable->lastStamp = drawable->dri2.stamp;
- if (INTEL_DEBUG & DEBUG_DRI)
+ if (unlikely(INTEL_DEBUG & DEBUG_DRI))
fprintf(stderr, "enter %s, drawable %p\n", __func__, drawable);
screen = intel->intelScreen->driScrnPriv;
@@ -378,14 +379,14 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
if (rb->region && rb->region->name == buffers[i].name)
continue;
- if (INTEL_DEBUG & DEBUG_DRI)
+ if (unlikely(INTEL_DEBUG & DEBUG_DRI))
fprintf(stderr,
"attaching buffer %d, at %d, cpp %d, pitch %d\n",
buffers[i].name, buffers[i].attachment,
buffers[i].cpp, buffers[i].pitch);
if (buffers[i].attachment == __DRI_BUFFER_STENCIL && depth_region) {
- if (INTEL_DEBUG & DEBUG_DRI)
+ if (unlikely(INTEL_DEBUG & DEBUG_DRI))
fprintf(stderr, "(reusing depth buffer as stencil)\n");
intel_region_reference(&region, depth_region);
}
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 46d10d74ba..9d5139c000 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -98,6 +98,16 @@ extern void intelFallback(struct intel_context *intel, GLbitfield bit,
#define INTEL_MAX_FIXUP 64
+#ifndef likely
+#ifdef __GNUC__
+#define likely(expr) (__builtin_expect(expr, 1))
+#define unlikely(expr) (__builtin_expect(expr, 0))
+#else
+#define likely(expr) (expr)
+#define unlikely(expr) (expr)
+#endif
+#endif
+
struct intel_sync_object {
struct gl_sync_object Base;
@@ -180,9 +190,6 @@ struct intel_context
} prim;
GLuint stats_wm;
- GLboolean locked;
- char *prevLockFile;
- int prevLockLine;
/* Offsets of fields within the current vertex:
*/
@@ -359,10 +366,15 @@ extern int INTEL_DEBUG;
#define DEBUG_CLIP 0x8000000
#define DBG(...) do { \
- if (INTEL_DEBUG & FILE_DEBUG_FLAG) \
+ if (unlikely(INTEL_DEBUG & FILE_DEBUG_FLAG)) \
printf(__VA_ARGS__); \
} while(0)
+#define fallback_debug(...) do { \
+ if (unlikely(INTEL_DEBUG & DEBUG_FALLBACKS)) \
+ printf(__VA_ARGS__); \
+} while(0)
+
#define PCI_CHIP_845_G 0x2562
#define PCI_CHIP_I830_M 0x3577
#define PCI_CHIP_I855_GM 0x3582
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 974045730b..556a4195bd 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -55,6 +55,7 @@
#define need_GL_EXT_point_parameters
#define need_GL_EXT_provoking_vertex
#define need_GL_EXT_secondary_color
+#define need_GL_EXT_separate_shader_objects
#define need_GL_EXT_stencil_two_side
#define need_GL_EXT_timer_query
#define need_GL_APPLE_vertex_array_object
@@ -114,6 +115,7 @@ static const struct dri_extension card_extensions[] = {
{ "GL_EXT_packed_depth_stencil", NULL },
{ "GL_EXT_provoking_vertex", GL_EXT_provoking_vertex_functions },
{ "GL_EXT_secondary_color", GL_EXT_secondary_color_functions },
+ { "GL_EXT_separate_shader_objects", GL_EXT_separate_shader_objects_functions },
{ "GL_EXT_stencil_wrap", NULL },
{ "GL_EXT_texture_edge_clamp", NULL },
{ "GL_EXT_texture_env_combine", NULL },
diff --git a/src/mesa/drivers/dri/intel/intel_pixel.c b/src/mesa/drivers/dri/intel/intel_pixel.c
index 60583ef4c0..d5c35775ce 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel.c
@@ -147,10 +147,9 @@ intel_check_blit_format(struct intel_region * region,
return GL_TRUE;
}
- if (INTEL_DEBUG & DEBUG_PIXEL)
- fprintf(stderr, "%s: bad format for blit (cpp %d, type %s format %s)\n",
- __FUNCTION__, region->cpp,
- _mesa_lookup_enum_by_nr(type), _mesa_lookup_enum_by_nr(format));
+ DBG("%s: bad format for blit (cpp %d, type %s format %s)\n",
+ __FUNCTION__, region->cpp,
+ _mesa_lookup_enum_by_nr(type), _mesa_lookup_enum_by_nr(format));
return GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
index 63fb4b37b1..e7356a6da0 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -113,9 +113,8 @@ static GLuint get_bitmap_rect(GLsizei width, GLsizei height,
GLint incr;
GLuint count = 0;
- if (INTEL_DEBUG & DEBUG_PIXEL)
- printf("%s %d,%d %dx%d bitmap %dx%d skip %d src_offset %d mask %d\n",
- __FUNCTION__, x,y,w,h,width,height,unpack->SkipPixels, src_offset, mask);
+ DBG("%s %d,%d %dx%d bitmap %dx%d skip %d src_offset %d mask %d\n",
+ __FUNCTION__, x,y,w,h,width,height,unpack->SkipPixels, src_offset, mask);
if (invert) {
first = h-1;
@@ -285,7 +284,7 @@ do_blit_bitmap( struct gl_context *ctx,
}
out:
- if (INTEL_DEBUG & DEBUG_SYNC)
+ if (unlikely(INTEL_DEBUG & DEBUG_SYNC))
intel_batchbuffer_flush(intel->batch);
if (_mesa_is_bufferobj(unpack->BufferObj)) {
@@ -299,6 +298,7 @@ out:
return GL_TRUE;
}
+
/* There are a large number of possible ways to implement bitmap on
* this hardware, most of them have some sort of drawback. Here are a
* few that spring to mind:
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
index c6b36ed429..a7ca780e94 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
@@ -119,8 +119,7 @@ do_blit_copypixels(struct gl_context * ctx,
GLboolean flip = GL_FALSE;
if (type == GL_DEPTH || type == GL_STENCIL) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "glCopyPixels() fallback: GL_DEPTH || GL_STENCIL\n");
+ fallback_debug("glCopyPixels() fallback: GL_DEPTH || GL_STENCIL\n");
return GL_FALSE;
}
@@ -203,8 +202,7 @@ intelCopyPixels(struct gl_context * ctx,
GLsizei width, GLsizei height,
GLint destx, GLint desty, GLenum type)
{
- if (INTEL_DEBUG & DEBUG_PIXEL)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ DBG("%s\n", __FUNCTION__);
if (do_blit_copypixels(ctx, srcx, srcy, width, height, destx, desty, type))
return;
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c
index b249f9a5a0..54da29236d 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c
@@ -42,6 +42,8 @@
#include "intel_pixel.h"
#include "intel_buffer_objects.h"
+#define FILE_DEBUG_FLAG DEBUG_PIXEL
+
/* For many applications, the new ability to pull the source buffers
* back out of the GTT and then do the packing/conversion operations
* in software will be as much of an improvement as trying to get the
@@ -79,8 +81,7 @@ do_blit_readpixels(struct gl_context * ctx,
GLboolean all;
GLint dst_x, dst_y;
- if (INTEL_DEBUG & DEBUG_PIXEL)
- printf("%s\n", __FUNCTION__);
+ DBG("%s\n", __FUNCTION__);
if (!src)
return GL_FALSE;
@@ -88,22 +89,19 @@ do_blit_readpixels(struct gl_context * ctx,
if (!_mesa_is_bufferobj(pack->BufferObj)) {
/* PBO only for now:
*/
- if (INTEL_DEBUG & DEBUG_PIXEL)
- printf("%s - not PBO\n", __FUNCTION__);
+ DBG("%s - not PBO\n", __FUNCTION__);
return GL_FALSE;
}
if (ctx->_ImageTransferState ||
!intel_check_blit_format(src, format, type)) {
- if (INTEL_DEBUG & DEBUG_PIXEL)
- printf("%s - bad format for blit\n", __FUNCTION__);
+ DBG("%s - bad format for blit\n", __FUNCTION__);
return GL_FALSE;
}
if (pack->Alignment != 1 || pack->SwapBytes || pack->LsbFirst) {
- if (INTEL_DEBUG & DEBUG_PIXEL)
- printf("%s: bad packing params\n", __FUNCTION__);
+ DBG("%s: bad packing params\n", __FUNCTION__);
return GL_FALSE;
}
@@ -113,8 +111,7 @@ do_blit_readpixels(struct gl_context * ctx,
rowLength = width;
if (pack->Invert) {
- if (INTEL_DEBUG & DEBUG_PIXEL)
- printf("%s: MESA_PACK_INVERT not done yet\n", __FUNCTION__);
+ DBG("%s: MESA_PACK_INVERT not done yet\n", __FUNCTION__);
return GL_FALSE;
}
else {
@@ -158,8 +155,7 @@ do_blit_readpixels(struct gl_context * ctx,
return GL_FALSE;
}
- if (INTEL_DEBUG & DEBUG_PIXEL)
- printf("%s - DONE\n", __FUNCTION__);
+ DBG("%s - DONE\n", __FUNCTION__);
return GL_TRUE;
}
@@ -173,8 +169,7 @@ intelReadPixels(struct gl_context * ctx,
struct intel_context *intel = intel_context(ctx);
GLboolean dirty;
- if (INTEL_DEBUG & DEBUG_PIXEL)
- fprintf(stderr, "%s\n", __FUNCTION__);
+ DBG("%s\n", __FUNCTION__);
intel_flush(ctx);
@@ -188,8 +183,7 @@ intelReadPixels(struct gl_context * ctx,
(ctx, x, y, width, height, format, type, pack, pixels))
return;
- if (INTEL_DEBUG & DEBUG_PIXEL)
- printf("%s: fallback to swrast\n", __FUNCTION__);
+ fallback_debug("%s: fallback to swrast\n", __FUNCTION__);
/* Update Mesa state before calling down into _swrast_ReadPixels, as
* the spans code requires the computed buffer states to be up to date,
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index 3d9a2549db..2c21ea0576 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -61,88 +61,6 @@ intelFreeTextureImageData(struct gl_context * ctx, struct gl_texture_image *texI
}
}
-
-/* The system memcpy (at least on ubuntu 5.10) has problems copying
- * to agp (writecombined) memory from a source which isn't 64-byte
- * aligned - there is a 4x performance falloff.
- *
- * The x86 __memcpy is immune to this but is slightly slower
- * (10%-ish) than the system memcpy.
- *
- * The sse_memcpy seems to have a slight cliff at 64/32 bytes, but
- * isn't much faster than x86_memcpy for agp copies.
- *
- * TODO: switch dynamically.
- */
-static void *
-do_memcpy(void *dest, const void *src, size_t n)
-{
- if ((((unsigned long) src) & 63) || (((unsigned long) dest) & 63)) {
- return __memcpy(dest, src, n);
- }
- else
- return memcpy(dest, src, n);
-}
-
-
-#if DO_DEBUG && !defined(__ia64__)
-
-#ifndef __x86_64__
-static unsigned
-fastrdtsc(void)
-{
- unsigned eax;
- __asm__ volatile ("\t"
- "pushl %%ebx\n\t"
- "cpuid\n\t" ".byte 0x0f, 0x31\n\t"
- "popl %%ebx\n":"=a" (eax)
- :"0"(0)
- :"ecx", "edx", "cc");
-
- return eax;
-}
-#else
-static unsigned
-fastrdtsc(void)
-{
- unsigned eax;
- __asm__ volatile ("\t" "cpuid\n\t" ".byte 0x0f, 0x31\n\t":"=a" (eax)
- :"0"(0)
- :"ecx", "edx", "ebx", "cc");
-
- return eax;
-}
-#endif
-
-static unsigned
-time_diff(unsigned t, unsigned t2)
-{
- return ((t < t2) ? t2 - t : 0xFFFFFFFFU - (t - t2 - 1));
-}
-
-
-static void *
-timed_memcpy(void *dest, const void *src, size_t n)
-{
- void *ret;
- unsigned t1, t2;
- double rate;
-
- if ((((unsigned) src) & 63) || (((unsigned) dest) & 63))
- printf("Warning - non-aligned texture copy!\n");
-
- t1 = fastrdtsc();
- ret = do_memcpy(dest, src, n);
- t2 = fastrdtsc();
-
- rate = time_diff(t1, t2);
- rate /= (double) n;
- printf("timed_memcpy: %u %u --> %f clocks/byte\n", t1, t2, rate);
- return ret;
-}
-#endif /* DO_DEBUG */
-
-
/**
* Called via ctx->Driver.GenerateMipmap()
* This is basically a wrapper for _mesa_meta_GenerateMipmap() which checks
@@ -158,8 +76,7 @@ intelGenerateMipmap(struct gl_context *ctx, GLenum target,
struct intel_context *intel = intel_context(ctx);
struct intel_texture_object *intelObj = intel_texture_object(texObj);
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "%s - fallback to swrast\n", __FUNCTION__);
+ fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
intel_tex_map_level_images(intel, intelObj, texObj->BaseLevel);
_mesa_generate_mipmap(ctx, target, texObj);
@@ -203,11 +120,4 @@ intelInitTextureFuncs(struct dd_function_table *functions)
functions->NewTextureImage = intelNewTextureImage;
functions->DeleteTexture = intelDeleteTextureObject;
functions->FreeTexImageData = intelFreeTextureImageData;
-
-#if DO_DEBUG && !defined(__ia64__)
- if (INTEL_DEBUG & DEBUG_BUFMGR)
- functions->TextureMemCpy = timed_memcpy;
- else
-#endif
- functions->TextureMemCpy = do_memcpy;
}
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 2d046fd52d..87b31bf078 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -30,7 +30,6 @@
#include "main/image.h"
#include "main/teximage.h"
#include "main/texstate.h"
-#include "main/mipmap.h"
#include "drivers/common/meta.h"
@@ -105,16 +104,15 @@ do_copy_texsubimage(struct intel_context *intel,
const struct intel_region *src = get_teximage_source(intel, internalFormat);
if (!intelImage->mt || !src || !src->buffer) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
+ if (unlikely(INTEL_DEBUG & DEBUG_FALLBACKS))
fprintf(stderr, "%s fail %p %p (0x%08x)\n",
__FUNCTION__, intelImage->mt, src, internalFormat);
return GL_FALSE;
}
if (intelImage->mt->cpp != src->cpp) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "%s fail %d vs %d cpp\n",
- __FUNCTION__, intelImage->mt->cpp, src->cpp);
+ fallback_debug("%s fail %d vs %d cpp\n",
+ __FUNCTION__, intelImage->mt->cpp, src->cpp);
return GL_FALSE;
}
@@ -212,8 +210,7 @@ intelCopyTexImage1D(struct gl_context * ctx, GLenum target, GLint level,
return;
fail:
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "%s - fallback to swrast\n", __FUNCTION__);
+ fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexImage1D(ctx, target, level, internalFormat, x, y,
width, border);
}
@@ -261,8 +258,7 @@ intelCopyTexImage2D(struct gl_context * ctx, GLenum target, GLint level,
return;
fail:
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "%s - fallback to swrast\n", __FUNCTION__);
+ fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexImage2D(ctx, target, level, internalFormat, x, y,
width, height, border);
}
@@ -287,8 +283,7 @@ intelCopyTexSubImage1D(struct gl_context * ctx, GLenum target, GLint level,
if (!do_copy_texsubimage(intel_context(ctx), target,
intel_texture_image(texImage),
internalFormat, xoffset, 0, x, y, width, 1)) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "%s - fallback to swrast\n", __FUNCTION__);
+ fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexSubImage1D(ctx, target, level, xoffset, x, y, width);
}
}
@@ -314,8 +309,7 @@ intelCopyTexSubImage2D(struct gl_context * ctx, GLenum target, GLint level,
internalFormat,
xoffset, yoffset, x, y, width, height)) {
- if (INTEL_DEBUG & DEBUG_FALLBACKS)
- fprintf(stderr, "%s - fallback to swrast\n", __FUNCTION__);
+ fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexSubImage2D(ctx, target, level,
xoffset, yoffset, x, y, width, height);
}
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 35f3d7d382..41cdbfd2cb 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -66,7 +66,6 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel,
GLuint width = intelImage->base.Width;
GLuint height = intelImage->base.Height;
GLuint depth = intelImage->base.Depth;
- GLuint l2width, l2height, l2depth;
GLuint i, comp_byte = 0;
GLuint texelBytes;
@@ -114,10 +113,7 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel,
lastLevel = firstLevel;
}
else {
- l2width = logbase2(width);
- l2height = logbase2(height);
- l2depth = logbase2(depth);
- lastLevel = firstLevel + MAX2(MAX2(l2width, l2height), l2depth);
+ lastLevel = firstLevel + logbase2(MAX2(MAX2(width, height), depth));
}
assert(!intelObj->mt);
@@ -347,21 +343,6 @@ intelTexImage(struct gl_context * ctx,
texImage->Data = NULL;
}
- /* If this is the only texture image in the tree, could call
- * bmBufferData with NULL data to free the old block and avoid
- * waiting on any outstanding fences.
- */
- if (intelObj->mt &&
- intelObj->mt->first_level == level &&
- intelObj->mt->last_level == level &&
- intelObj->mt->target != GL_TEXTURE_CUBE_MAP_ARB &&
- !intel_miptree_match_image(intelObj->mt, &intelImage->base)) {
-
- DBG("release it\n");
- intel_miptree_release(intel, &intelObj->mt);
- assert(!intelObj->mt);
- }
-
if (!intelObj->mt) {
guess_and_alloc_mipmap_tree(intel, intelObj, intelImage, pixels == NULL);
if (!intelObj->mt) {
@@ -701,6 +682,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
int level = 0, internalFormat;
+ gl_format texFormat;
texObj = _mesa_get_current_tex_object(ctx, target);
intelObj = intel_texture_object(texObj);
@@ -719,10 +701,14 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
if (rb->region == NULL)
return;
- if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
+ if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
internalFormat = GL_RGB;
- else
+ texFormat = MESA_FORMAT_XRGB8888;
+ }
+ else {
internalFormat = GL_RGBA;
+ texFormat = MESA_FORMAT_ARGB8888;
+ }
mt = intel_miptree_create_for_region(intel, target,
internalFormat,
@@ -743,16 +729,13 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
intel_miptree_release(intel, &intelObj->mt);
intelObj->mt = mt;
+
_mesa_init_teximage_fields(&intel->ctx, target, texImage,
rb->region->width, rb->region->height, 1,
- 0, internalFormat);
+ 0, internalFormat, texFormat);
intelImage->face = target_to_face(target);
intelImage->level = level;
- if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
- texImage->TexFormat = MESA_FORMAT_XRGB8888;
- else
- texImage->TexFormat = MESA_FORMAT_ARGB8888;
texImage->RowStride = rb->region->pitch;
intel_miptree_reference(&intelImage->mt, intelObj->mt);
@@ -808,11 +791,10 @@ intel_image_target_texture_2d(struct gl_context *ctx, GLenum target,
intelObj->mt = mt;
_mesa_init_teximage_fields(&intel->ctx, target, texImage,
image->region->width, image->region->height, 1,
- 0, image->internal_format);
+ 0, image->internal_format, image->format);
intelImage->face = target_to_face(target);
intelImage->level = 0;
- texImage->TexFormat = image->format;
texImage->RowStride = image->region->pitch;
intel_miptree_reference(&intelImage->mt, intelObj->mt);
diff --git a/src/mesa/drivers/dri/nouveau/Makefile b/src/mesa/drivers/dri/nouveau/Makefile
index 7be19b26fd..3b506a91ff 100644
--- a/src/mesa/drivers/dri/nouveau/Makefile
+++ b/src/mesa/drivers/dri/nouveau/Makefile
@@ -19,6 +19,8 @@ DRIVER_SOURCES = \
nouveau_bo_state.c \
nouveau_texture.c \
nouveau_surface.c \
+ nouveau_scratch.c \
+ nouveau_array.c \
nv04_context.c \
nv04_render.c \
nv04_state_fb.c \
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_array.c b/src/mesa/drivers/dri/nouveau/nouveau_array.c
new file mode 100644
index 0000000000..17e6d163a0
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nouveau_array.c
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2009-2010 Francisco Jerez.
+ * 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/bufferobj.h"
+#include "nouveau_driver.h"
+#include "nouveau_array.h"
+#include "nouveau_bufferobj.h"
+
+static void
+get_array_extract(struct nouveau_array *a, extract_u_t *extract_u,
+ extract_f_t *extract_f)
+{
+#define EXTRACT(in_t, out_t, k) \
+ ({ \
+ auto out_t f(struct nouveau_array *, int, int); \
+ out_t f(struct nouveau_array *a, int i, int j) { \
+ in_t x = ((in_t *)(a->buf + i * a->stride))[j]; \
+ \
+ return (out_t)x / (k); \
+ }; \
+ f; \
+ });
+
+ switch (a->type) {
+ case GL_BYTE:
+ *extract_u = EXTRACT(char, unsigned, 1);
+ *extract_f = EXTRACT(char, float, SCHAR_MAX);
+ break;
+ case GL_UNSIGNED_BYTE:
+ *extract_u = EXTRACT(unsigned char, unsigned, 1);
+ *extract_f = EXTRACT(unsigned char, float, UCHAR_MAX);
+ break;
+ case GL_SHORT:
+ *extract_u = EXTRACT(short, unsigned, 1);
+ *extract_f = EXTRACT(short, float, SHRT_MAX);
+ break;
+ case GL_UNSIGNED_SHORT:
+ *extract_u = EXTRACT(unsigned short, unsigned, 1);
+ *extract_f = EXTRACT(unsigned short, float, USHRT_MAX);
+ break;
+ case GL_INT:
+ *extract_u = EXTRACT(int, unsigned, 1);
+ *extract_f = EXTRACT(int, float, INT_MAX);
+ break;
+ case GL_UNSIGNED_INT:
+ *extract_u = EXTRACT(unsigned int, unsigned, 1);
+ *extract_f = EXTRACT(unsigned int, float, UINT_MAX);
+ break;
+ case GL_FLOAT:
+ *extract_u = EXTRACT(float, unsigned, 1.0 / UINT_MAX);
+ *extract_f = EXTRACT(float, float, 1);
+ break;
+ default:
+ assert(0);
+ }
+}
+
+void
+nouveau_init_array(struct nouveau_array *a, int attr, int stride,
+ int fields, int type, struct gl_buffer_object *obj,
+ const void *ptr, GLboolean map)
+{
+ a->attr = attr;
+ a->stride = stride;
+ a->fields = fields;
+ a->type = type;
+ a->buf = NULL;
+
+ if (obj) {
+ if (nouveau_bufferobj_hw(obj)) {
+ struct nouveau_bufferobj *nbo =
+ to_nouveau_bufferobj(obj);
+
+ nouveau_bo_ref(nbo->bo, &a->bo);
+ a->offset = (intptr_t)ptr;
+
+ if (map) {
+ nouveau_bo_map(a->bo, NOUVEAU_BO_RD);
+ a->buf = a->bo->map + a->offset;
+ }
+
+ } else {
+ nouveau_bo_ref(NULL, &a->bo);
+ a->offset = 0;
+
+ if (map)
+ a->buf = ADD_POINTERS(
+ nouveau_bufferobj_sys(obj), ptr);
+ }
+ }
+
+ if (a->buf)
+ get_array_extract(a, &a->extract_u, &a->extract_f);
+}
+
+void
+nouveau_deinit_array(struct nouveau_array *a)
+{
+ if (a->bo) {
+ if (a->bo->map)
+ nouveau_bo_unmap(a->bo);
+ }
+
+ a->buf = NULL;
+ a->fields = 0;
+}
+
+void
+nouveau_cleanup_array(struct nouveau_array *a)
+{
+ nouveau_deinit_array(a);
+ nouveau_bo_ref(NULL, &a->bo);
+}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_array.h b/src/mesa/drivers/dri/nouveau/nouveau_array.h
new file mode 100644
index 0000000000..ad3d69b33d
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nouveau_array.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2009-2010 Francisco Jerez.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __NOUVEAU_ARRAY_H__
+#define __NOUVEAU_ARRAY_H__
+
+struct nouveau_array;
+
+typedef unsigned (*extract_u_t)(struct nouveau_array *, int, int);
+typedef float (*extract_f_t)(struct nouveau_array *, int, int);
+
+struct nouveau_array {
+ int attr;
+ int stride, fields, type;
+
+ struct nouveau_bo *bo;
+ unsigned offset;
+ const void *buf;
+
+ extract_u_t extract_u;
+ extract_f_t extract_f;
+};
+
+void
+nouveau_init_array(struct nouveau_array *a, int attr, int stride,
+ int fields, int type, struct gl_buffer_object *obj,
+ const void *ptr, GLboolean map);
+
+void
+nouveau_deinit_array(struct nouveau_array *a);
+
+void
+nouveau_cleanup_array(struct nouveau_array *a);
+
+#endif
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bo_state.c b/src/mesa/drivers/dri/nouveau/nouveau_bo_state.c
index f31772fe1d..7eef8c1ee8 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_bo_state.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bo_state.c
@@ -126,13 +126,13 @@ void
nouveau_bo_context_reset(struct nouveau_bo_context *bctx)
{
struct nouveau_bo_state *s = &to_nouveau_context(bctx->ctx)->bo;
- int i;
-
- for (i = 0; i < bctx->count; i++)
- nouveau_bo_ref(NULL, &bctx->marker[i].bo);
+ int i, n = bctx->count;
- s->count -= bctx->count;
+ s->count -= n;
bctx->count = 0;
+
+ for (i = 0; i < n; i++)
+ nouveau_bo_ref(NULL, &bctx->marker[i].bo);
}
GLboolean
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bo_state.h b/src/mesa/drivers/dri/nouveau/nouveau_bo_state.h
index 6119a8336e..388a16a56e 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_bo_state.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bo_state.h
@@ -29,7 +29,7 @@
enum {
NOUVEAU_BO_CONTEXT_FRAMEBUFFER = 0,
- NOUVEAU_BO_CONTEXT_LMA_DEPTH,
+ NOUVEAU_BO_CONTEXT_HIERZ,
NOUVEAU_BO_CONTEXT_SURFACE,
NOUVEAU_BO_CONTEXT_TEXTURE0,
NOUVEAU_BO_CONTEXT_TEXTURE1,
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
index ad6e5bd805..e60b91f64b 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.c
@@ -30,6 +30,23 @@
#include "main/bufferobj.h"
+static inline char *
+get_bufferobj_map(struct gl_buffer_object *obj, unsigned flags)
+{
+ struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj);
+ void *map = NULL;
+
+ if (nbo->sys) {
+ map = nbo->sys;
+ } else if (nbo->bo) {
+ nouveau_bo_map(nbo->bo, flags);
+ map = nbo->bo->map;
+ nouveau_bo_unmap(nbo->bo);
+ }
+
+ return map;
+}
+
static struct gl_buffer_object *
nouveau_bufferobj_new(struct gl_context *ctx, GLuint buffer, GLenum target)
{
@@ -50,6 +67,7 @@ nouveau_bufferobj_del(struct gl_context *ctx, struct gl_buffer_object *obj)
struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj);
nouveau_bo_ref(NULL, &nbo->bo);
+ FREE(nbo->sys);
FREE(nbo);
}
@@ -64,18 +82,27 @@ nouveau_bufferobj_data(struct gl_context *ctx, GLenum target, GLsizeiptrARB size
obj->Size = size;
obj->Usage = usage;
+ /* Free previous storage */
nouveau_bo_ref(NULL, &nbo->bo);
- ret = nouveau_bo_new(context_dev(ctx),
- NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0,
- size, &nbo->bo);
- assert(!ret);
-
- if (data) {
- nouveau_bo_map(nbo->bo, NOUVEAU_BO_WR);
- memcpy(nbo->bo->map, data, size);
- nouveau_bo_unmap(nbo->bo);
+ FREE(nbo->sys);
+
+ if (target == GL_ELEMENT_ARRAY_BUFFER_ARB ||
+ (size < 512 && usage == GL_DYNAMIC_DRAW_ARB) ||
+ context_chipset(ctx) < 0x10) {
+ /* Heuristic: keep it in system ram */
+ nbo->sys = MALLOC(size);
+
+ } else {
+ /* Get a hardware BO */
+ ret = nouveau_bo_new(context_dev(ctx),
+ NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0,
+ size, &nbo->bo);
+ assert(!ret);
}
+ if (data)
+ memcpy(get_bufferobj_map(obj, NOUVEAU_BO_WR), data, size);
+
return GL_TRUE;
}
@@ -84,11 +111,7 @@ nouveau_bufferobj_subdata(struct gl_context *ctx, GLenum target, GLintptrARB off
GLsizeiptrARB size, const GLvoid *data,
struct gl_buffer_object *obj)
{
- struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj);
-
- nouveau_bo_map(nbo->bo, NOUVEAU_BO_WR);
- memcpy(nbo->bo->map + offset, data, size);
- nouveau_bo_unmap(nbo->bo);
+ memcpy(get_bufferobj_map(obj, NOUVEAU_BO_WR) + offset, data, size);
}
static void
@@ -96,44 +119,48 @@ nouveau_bufferobj_get_subdata(struct gl_context *ctx, GLenum target, GLintptrARB
GLsizeiptrARB size, GLvoid *data,
struct gl_buffer_object *obj)
{
- struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj);
-
- nouveau_bo_map(nbo->bo, NOUVEAU_BO_RD);
- memcpy(data, nbo->bo->map + offset, size);
- nouveau_bo_unmap(nbo->bo);
+ memcpy(data, get_bufferobj_map(obj, NOUVEAU_BO_RD) + offset, size);
}
static void *
nouveau_bufferobj_map(struct gl_context *ctx, GLenum target, GLenum access,
struct gl_buffer_object *obj)
{
- return ctx->Driver.MapBufferRange(ctx, target, 0, obj->Size, access,
+ unsigned flags = 0;
+
+ if (access == GL_READ_ONLY_ARB ||
+ access == GL_READ_WRITE_ARB)
+ flags |= GL_MAP_READ_BIT;
+ if (access == GL_WRITE_ONLY_ARB ||
+ access == GL_READ_WRITE_ARB)
+ flags |= GL_MAP_WRITE_BIT;
+
+ return ctx->Driver.MapBufferRange(ctx, target, 0, obj->Size, flags,
obj);
}
static void *
nouveau_bufferobj_map_range(struct gl_context *ctx, GLenum target, GLintptr offset,
- GLsizeiptr length, GLenum access,
+ GLsizeiptr length, GLbitfield access,
struct gl_buffer_object *obj)
{
- struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj);
- uint32_t flags = 0;
+ unsigned flags = 0;
+ char *map;
assert(!obj->Pointer);
- if (!nbo->bo)
- return NULL;
-
- if (access == GL_READ_ONLY_ARB ||
- access == GL_READ_WRITE_ARB)
+ if (access & GL_MAP_READ_BIT)
flags |= NOUVEAU_BO_RD;
- if (access == GL_WRITE_ONLY_ARB ||
- access == GL_READ_WRITE_ARB)
+ if (access & GL_MAP_WRITE_BIT)
flags |= NOUVEAU_BO_WR;
+ if (access & GL_MAP_UNSYNCHRONIZED_BIT)
+ flags |= NOUVEAU_BO_NOSYNC;
- nouveau_bo_map_range(nbo->bo, offset, length, flags);
+ map = get_bufferobj_map(obj, flags);
+ if (!map)
+ return NULL;
- obj->Pointer = nbo->bo->map;
+ obj->Pointer = map + offset;
obj->Offset = offset;
obj->Length = length;
obj->AccessFlags = access;
@@ -144,12 +171,8 @@ nouveau_bufferobj_map_range(struct gl_context *ctx, GLenum target, GLintptr offs
static GLboolean
nouveau_bufferobj_unmap(struct gl_context *ctx, GLenum target, struct gl_buffer_object *obj)
{
- struct nouveau_bufferobj *nbo = to_nouveau_bufferobj(obj);
-
assert(obj->Pointer);
- nouveau_bo_unmap(nbo->bo);
-
obj->Pointer = NULL;
obj->Offset = 0;
obj->Length = 0;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h
index acfc4cb9a9..01ef0bad0f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_bufferobj.h
@@ -30,9 +30,16 @@
struct nouveau_bufferobj {
struct gl_buffer_object base;
struct nouveau_bo *bo;
+ void *sys;
};
#define to_nouveau_bufferobj(x) ((struct nouveau_bufferobj *)(x))
+#define nouveau_bufferobj_hw(x) \
+ (_mesa_is_bufferobj(x) ? to_nouveau_bufferobj(x)->bo : NULL)
+
+#define nouveau_bufferobj_sys(x) \
+ (_mesa_is_bufferobj(x) ? to_nouveau_bufferobj(x)->sys : NULL)
+
void
nouveau_bufferobj_functions_init(struct dd_function_table *functions);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_class.h b/src/mesa/drivers/dri/nouveau/nouveau_class.h
deleted file mode 100644
index d41d431f79..0000000000
--- a/src/mesa/drivers/dri/nouveau/nouveau_class.h
+++ /dev/null
@@ -1,4959 +0,0 @@
-/*************************************************************************
-
- Autogenerated file, do not edit !
-
- This file was generated by renouveau-gen from renouveau.xml, the
- XML database of nvidia objects and methods. renouveau-gen and
- renouveau.xml can be found in CVS module renouveau of sourceforge.net
- project nouveau:
-
-cvs -z3 -d:pserver:anonymous@nouveau.cvs.sourceforge.net:/cvsroot/nouveau co -P renouveau
-
-**************************************************************************
-
- Copyright (C) 2006-2008 :
- Dmitry Baryshkov,
- Laurent Carlier,
- Matthieu Castet,
- Dawid Gajownik,
- Jeremy Kolb,
- Stephane Loeuillet,
- Patrice Mandin,
- Stephane Marchesin,
- Serge Martin,
- Sylvain Munaut,
- Simon Raffeiner,
- Ben Skeggs,
- Erik Waling,
- koala_br,
-
-All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-*************************************************************************/
-
-
-#ifndef NOUVEAU_REG_H
-#define NOUVEAU_REG_H 1
-
-
-#define NV01_ROOT 0x00000001
-
-
-
-#define NV01_CONTEXT_DMA 0x00000002
-
-
-
-#define NV01_DEVICE 0x00000003
-
-
-
-#define NV01_TIMER 0x00000004
-
-#define NV01_TIMER_SYNCHRONIZE 0x00000100
-#define NV01_TIMER_STOP_ALARM 0x00000104
-#define NV01_TIMER_DMA_NOTIFY 0x00000180
-#define NV01_TIMER_TIME(x) (0x00000300+((x)*4))
-#define NV01_TIMER_TIME__SIZE 0x00000002
-#define NV01_TIMER_ALARM_NOTIFY 0x00000308
-
-
-#define NV01_CONTEXT_BETA1 0x00000012
-
-#define NV01_CONTEXT_BETA1_NOP 0x00000100
-#define NV01_CONTEXT_BETA1_NOTIFY 0x00000104
-#define NV01_CONTEXT_BETA1_DMA_NOTIFY 0x00000180
-#define NV01_CONTEXT_BETA1_BETA_1D31 0x00000300
-
-
-#define NV01_CONTEXT_COLOR_KEY 0x00000017
-
-#define NV01_CONTEXT_COLOR_KEY_NOP 0x00000100
-#define NV01_CONTEXT_COLOR_KEY_NOTIFY 0x00000104
-#define NV01_CONTEXT_COLOR_KEY_DMA_NOTIFY 0x00000180
-#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT 0x00000300
-#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X16A8Y8 0x00000001
-#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X24Y8 0x00000002
-#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X16A1R5G5B5 0x00000003
-#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X17R5G5B5 0x00000004
-#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_A8R8G8B8 0x00000005
-#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X8R8G8B8 0x00000006
-#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_A16Y16 0x00000007
-#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X16Y16 0x00000008
-#define NV01_CONTEXT_COLOR_KEY_COLOR 0x00000304
-
-
-#define NV04_CONTEXT_COLOR_KEY 0x00000057
-
-
-
-#define NV01_CONTEXT_PATTERN 0x00000018
-
-#define NV01_CONTEXT_PATTERN_NOP 0x00000100
-#define NV01_CONTEXT_PATTERN_NOTIFY 0x00000104
-#define NV01_CONTEXT_PATTERN_DMA_NOTIFY 0x00000180
-#define NV01_CONTEXT_PATTERN_COLOR_FORMAT 0x00000300
-#define NV01_CONTEXT_PATTERN_MONOCHROME_FORMAT 0x00000304
-#define NV01_CONTEXT_PATTERN_SHAPE 0x00000308
-#define NV01_CONTEXT_PATTERN_COLOR(x) (0x00000310+((x)*4))
-#define NV01_CONTEXT_PATTERN_COLOR__SIZE 0x00000002
-#define NV01_CONTEXT_PATTERN_PATTERN(x) (0x00000318+((x)*4))
-#define NV01_CONTEXT_PATTERN_PATTERN__SIZE 0x00000002
-
-
-#define NV01_CONTEXT_CLIP_RECTANGLE 0x00000019
-
-#define NV01_CONTEXT_CLIP_RECTANGLE_NOP 0x00000100
-#define NV01_CONTEXT_CLIP_RECTANGLE_NOTIFY 0x00000104
-#define NV01_CONTEXT_CLIP_RECTANGLE_DMA_NOTIFY 0x00000180
-#define NV01_CONTEXT_CLIP_RECTANGLE_POINT 0x00000300
-#define NV01_CONTEXT_CLIP_RECTANGLE_POINT_X_SHIFT 0
-#define NV01_CONTEXT_CLIP_RECTANGLE_POINT_X_MASK 0x0000ffff
-#define NV01_CONTEXT_CLIP_RECTANGLE_POINT_Y_SHIFT 16
-#define NV01_CONTEXT_CLIP_RECTANGLE_POINT_Y_MASK 0xffff0000
-#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE 0x00000304
-#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE_W_SHIFT 0
-#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE_W_MASK 0x0000ffff
-#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE_H_SHIFT 16
-#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE_H_MASK 0xffff0000
-
-
-#define NV01_RENDER_SOLID_LINE 0x0000001c
-
-#define NV01_RENDER_SOLID_LINE_NOP 0x00000100
-#define NV01_RENDER_SOLID_LINE_NOTIFY 0x00000104
-#define NV01_RENDER_SOLID_LINE_PATCH 0x0000010c
-#define NV01_RENDER_SOLID_LINE_DMA_NOTIFY 0x00000180
-#define NV01_RENDER_SOLID_LINE_CLIP_RECTANGLE 0x00000184
-#define NV01_RENDER_SOLID_LINE_PATTERN 0x00000188
-#define NV01_RENDER_SOLID_LINE_ROP 0x0000018c
-#define NV01_RENDER_SOLID_LINE_BETA1 0x00000190
-#define NV01_RENDER_SOLID_LINE_SURFACE 0x00000194
-#define NV01_RENDER_SOLID_LINE_OPERATION 0x000002fc
-#define NV01_RENDER_SOLID_LINE_OPERATION_SRCCOPY_AND 0x00000000
-#define NV01_RENDER_SOLID_LINE_OPERATION_ROP_AND 0x00000001
-#define NV01_RENDER_SOLID_LINE_OPERATION_BLEND_AND 0x00000002
-#define NV01_RENDER_SOLID_LINE_OPERATION_SRCCOPY 0x00000003
-#define NV01_RENDER_SOLID_LINE_OPERATION_SRCCOPY_PREMULT 0x00000004
-#define NV01_RENDER_SOLID_LINE_OPERATION_BLEND_PREMULT 0x00000005
-#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT 0x00000300
-#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X16A8Y8 0x00000001
-#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X24Y8 0x00000002
-#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X16A1R5G5B5 0x00000003
-#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X17R5G5B5 0x00000004
-#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_A8R8G8B8 0x00000005
-#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X8R8G8B8 0x00000006
-#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_A16Y16 0x00000007
-#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X16Y16 0x00000008
-#define NV01_RENDER_SOLID_LINE_COLOR 0x00000304
-#define NV01_RENDER_SOLID_LINE_LINE_POINT0(x) (0x00000400+((x)*8))
-#define NV01_RENDER_SOLID_LINE_LINE_POINT0__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_LINE_POINT0_X_SHIFT 0
-#define NV01_RENDER_SOLID_LINE_LINE_POINT0_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_LINE_LINE_POINT0_Y_SHIFT 16
-#define NV01_RENDER_SOLID_LINE_LINE_POINT0_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_LINE_LINE_POINT1(x) (0x00000404+((x)*8))
-#define NV01_RENDER_SOLID_LINE_LINE_POINT1__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_LINE_POINT1_X_SHIFT 0
-#define NV01_RENDER_SOLID_LINE_LINE_POINT1_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_LINE_LINE_POINT1_Y_SHIFT 16
-#define NV01_RENDER_SOLID_LINE_LINE_POINT1_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_X(x) (0x00000480+((x)*16))
-#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_X__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_Y(x) (0x00000484+((x)*16))
-#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_Y__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_X(x) (0x00000488+((x)*16))
-#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_X__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_Y(x) (0x0000048c+((x)*16))
-#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_Y__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_POLYLINE(x) (0x00000500+((x)*4))
-#define NV01_RENDER_SOLID_LINE_POLYLINE__SIZE 0x00000020
-#define NV01_RENDER_SOLID_LINE_POLYLINE_X_SHIFT 0
-#define NV01_RENDER_SOLID_LINE_POLYLINE_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_LINE_POLYLINE_Y_SHIFT 16
-#define NV01_RENDER_SOLID_LINE_POLYLINE_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_X(x) (0x00000580+((x)*8))
-#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_X__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_Y(x) (0x00000584+((x)*8))
-#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_Y__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_CPOLYLINE_COLOR(x) (0x00000600+((x)*8))
-#define NV01_RENDER_SOLID_LINE_CPOLYLINE_COLOR__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT(x) (0x00000604+((x)*8))
-#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT__SIZE 0x00000010
-#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_X_SHIFT 0
-#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_Y_SHIFT 16
-#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_Y_MASK 0xffff0000
-
-
-#define NV04_RENDER_SOLID_LINE 0x0000005c
-
-#define NV04_RENDER_SOLID_LINE_BETA4 0x00000194
-#define NV04_RENDER_SOLID_LINE_SURFACE 0x00000198
-
-
-#define NV01_RENDER_SOLID_TRIANGLE 0x0000001d
-
-#define NV01_RENDER_SOLID_TRIANGLE_NOP 0x00000100
-#define NV01_RENDER_SOLID_TRIANGLE_NOTIFY 0x00000104
-#define NV01_RENDER_SOLID_TRIANGLE_PATCH 0x0000010c
-#define NV01_RENDER_SOLID_TRIANGLE_DMA_NOTIFY 0x00000180
-#define NV01_RENDER_SOLID_TRIANGLE_CLIP_RECTANGLE 0x00000184
-#define NV01_RENDER_SOLID_TRIANGLE_PATTERN 0x00000188
-#define NV01_RENDER_SOLID_TRIANGLE_ROP 0x0000018c
-#define NV01_RENDER_SOLID_TRIANGLE_BETA1 0x00000190
-#define NV01_RENDER_SOLID_TRIANGLE_SURFACE 0x00000194
-#define NV01_RENDER_SOLID_TRIANGLE_OPERATION 0x000002fc
-#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_SRCCOPY_AND 0x00000000
-#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_ROP_AND 0x00000001
-#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_BLEND_AND 0x00000002
-#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_SRCCOPY 0x00000003
-#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_SRCCOPY_PREMULT 0x00000004
-#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_BLEND_PREMULT 0x00000005
-#define NV01_RENDER_SOLID_TRIANGLE_COLOR_FORMAT 0x00000300
-#define NV01_RENDER_SOLID_TRIANGLE_COLOR 0x00000304
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0 0x00000310
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_X_SHIFT 0
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_Y_SHIFT 16
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1 0x00000314
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_X_SHIFT 0
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_Y_SHIFT 16
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2 0x00000318
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_X_SHIFT 0
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_Y_SHIFT 16
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT0_X 0x00000320
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT0_Y 0x00000324
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT1_X 0x00000328
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT1_Y 0x0000032c
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT2_X 0x00000330
-#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT2_Y 0x00000334
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH(x) (0x00000400+((x)*4))
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH__SIZE 0x00000020
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH_X_SHIFT 0
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH_Y_SHIFT 16
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_X(x) (0x00000480+((x)*8))
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_X__SIZE 0x00000010
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_Y(x) (0x00000484+((x)*8))
-#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_Y__SIZE 0x00000010
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_COLOR(x) (0x00000500+((x)*16))
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_COLOR__SIZE 0x00000008
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0(x) (0x00000504+((x)*16))
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0__SIZE 0x00000008
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0_X_SHIFT 0
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0_Y_SHIFT 16
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1(x) (0x00000508+((x)*16))
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1__SIZE 0x00000008
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1_X_SHIFT 0
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1_Y_SHIFT 16
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2(x) (0x0000050c+((x)*16))
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2__SIZE 0x00000008
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2_X_SHIFT 0
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2_Y_SHIFT 16
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_COLOR(x) (0x00000580+((x)*8))
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_COLOR__SIZE 0x00000010
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT(x) (0x00000584+((x)*8))
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT__SIZE 0x00000010
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT_X_SHIFT 0
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT_Y_SHIFT 16
-#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT_Y_MASK 0xffff0000
-
-
-#define NV04_RENDER_SOLID_TRIANGLE 0x0000005d
-
-#define NV04_RENDER_SOLID_TRIANGLE_BETA4 0x00000194
-#define NV04_RENDER_SOLID_TRIANGLE_SURFACE 0x00000198
-
-
-#define NV01_RENDER_SOLID_RECTANGLE 0x0000001e
-
-#define NV01_RENDER_SOLID_RECTANGLE_NOP 0x00000100
-#define NV01_RENDER_SOLID_RECTANGLE_NOTIFY 0x00000104
-#define NV01_RENDER_SOLID_RECTANGLE_PATCH 0x0000010c
-#define NV01_RENDER_SOLID_RECTANGLE_DMA_NOTIFY 0x00000180
-#define NV01_RENDER_SOLID_RECTANGLE_CLIP_RECTANGLE 0x00000184
-#define NV01_RENDER_SOLID_RECTANGLE_PATTERN 0x00000188
-#define NV01_RENDER_SOLID_RECTANGLE_ROP 0x0000018c
-#define NV01_RENDER_SOLID_RECTANGLE_BETA1 0x00000190
-#define NV01_RENDER_SOLID_RECTANGLE_SURFACE 0x00000194
-#define NV01_RENDER_SOLID_RECTANGLE_OPERATION 0x000002fc
-#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_SRCCOPY_AND 0x00000000
-#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_ROP_AND 0x00000001
-#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_BLEND_AND 0x00000002
-#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_SRCCOPY 0x00000003
-#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_SRCCOPY_PREMULT 0x00000004
-#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_BLEND_PREMULT 0x00000005
-#define NV01_RENDER_SOLID_RECTANGLE_COLOR_FORMAT 0x00000300
-#define NV01_RENDER_SOLID_RECTANGLE_COLOR 0x00000304
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT(x) (0x00000400+((x)*8))
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT__SIZE 0x00000010
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT_X_SHIFT 0
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT_X_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT_Y_SHIFT 16
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT_Y_MASK 0xffff0000
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE(x) (0x00000404+((x)*8))
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE__SIZE 0x00000010
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE_W_SHIFT 0
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE_W_MASK 0x0000ffff
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE_H_SHIFT 16
-#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE_H_MASK 0xffff0000
-
-
-#define NV04_RENDER_SOLID_RECTANGLE 0x0000005e
-
-#define NV04_RENDER_SOLID_RECTANGLE_BETA4 0x00000194
-#define NV04_RENDER_SOLID_RECTANGLE_SURFACE 0x00000198
-
-
-#define NV01_IMAGE_BLIT 0x0000001f
-
-#define NV01_IMAGE_BLIT_NOP 0x00000100
-#define NV01_IMAGE_BLIT_NOTIFY 0x00000104
-#define NV01_IMAGE_BLIT_PATCH 0x0000010c
-#define NV01_IMAGE_BLIT_DMA_NOTIFY 0x00000180
-#define NV01_IMAGE_BLIT_COLOR_KEY 0x00000184
-#define NV01_IMAGE_BLIT_CLIP_RECTANGLE 0x00000188
-#define NV01_IMAGE_BLIT_PATTERN 0x0000018c
-#define NV01_IMAGE_BLIT_ROP 0x00000190
-#define NV01_IMAGE_BLIT_BETA1 0x00000194
-#define NV01_IMAGE_BLIT_SURFACE 0x0000019c
-#define NV01_IMAGE_BLIT_OPERATION 0x000002fc
-#define NV01_IMAGE_BLIT_OPERATION_SRCCOPY_AND 0x00000000
-#define NV01_IMAGE_BLIT_OPERATION_ROP_AND 0x00000001
-#define NV01_IMAGE_BLIT_OPERATION_BLEND_AND 0x00000002
-#define NV01_IMAGE_BLIT_OPERATION_SRCCOPY 0x00000003
-#define NV01_IMAGE_BLIT_OPERATION_SRCCOPY_PREMULT 0x00000004
-#define NV01_IMAGE_BLIT_OPERATION_BLEND_PREMULT 0x00000005
-#define NV01_IMAGE_BLIT_IMAGE_INPUT 0x00000204
-#define NV01_IMAGE_BLIT_POINT_IN 0x00000300
-#define NV01_IMAGE_BLIT_POINT_IN_X_SHIFT 0
-#define NV01_IMAGE_BLIT_POINT_IN_X_MASK 0x0000ffff
-#define NV01_IMAGE_BLIT_POINT_IN_Y_SHIFT 16
-#define NV01_IMAGE_BLIT_POINT_IN_Y_MASK 0xffff0000
-#define NV01_IMAGE_BLIT_POINT_OUT 0x00000304
-#define NV01_IMAGE_BLIT_POINT_OUT_X_SHIFT 0
-#define NV01_IMAGE_BLIT_POINT_OUT_X_MASK 0x0000ffff
-#define NV01_IMAGE_BLIT_POINT_OUT_Y_SHIFT 16
-#define NV01_IMAGE_BLIT_POINT_OUT_Y_MASK 0xffff0000
-#define NV01_IMAGE_BLIT_SIZE 0x00000308
-#define NV01_IMAGE_BLIT_SIZE_W_SHIFT 0
-#define NV01_IMAGE_BLIT_SIZE_W_MASK 0x0000ffff
-#define NV01_IMAGE_BLIT_SIZE_H_SHIFT 16
-#define NV01_IMAGE_BLIT_SIZE_H_MASK 0xffff0000
-
-
-#define NV04_IMAGE_BLIT 0x0000005f
-
-#define NV04_IMAGE_BLIT_ROP 0x00000190
-#define NV04_IMAGE_BLIT_BETA4 0x00000198
-#define NV04_IMAGE_BLIT_SURFACE 0x0000019c
-
-
-#define NV12_IMAGE_BLIT 0x0000009f
-
-#define NV12_IMAGE_BLIT_WAIT_FOR_IDLE 0x00000108
-
-
-#define NV01_IMAGE_FROM_CPU 0x00000021
-
-#define NV01_IMAGE_FROM_CPU_NOP 0x00000100
-#define NV01_IMAGE_FROM_CPU_NOTIFY 0x00000104
-#define NV01_IMAGE_FROM_CPU_PATCH 0x0000010c
-#define NV01_IMAGE_FROM_CPU_DMA_NOTIFY 0x00000180
-#define NV01_IMAGE_FROM_CPU_COLOR_KEY 0x00000184
-#define NV01_IMAGE_FROM_CPU_CLIP_RECTANGLE 0x00000188
-#define NV01_IMAGE_FROM_CPU_PATTERN 0x0000018c
-#define NV01_IMAGE_FROM_CPU_ROP 0x00000190
-#define NV01_IMAGE_FROM_CPU_BETA1 0x00000194
-#define NV01_IMAGE_FROM_CPU_SURFACE 0x00000198
-#define NV01_IMAGE_FROM_CPU_OPERATION 0x000002fc
-#define NV01_IMAGE_FROM_CPU_OPERATION_SRCCOPY_AND 0x00000000
-#define NV01_IMAGE_FROM_CPU_OPERATION_ROP_AND 0x00000001
-#define NV01_IMAGE_FROM_CPU_OPERATION_BLEND_AND 0x00000002
-#define NV01_IMAGE_FROM_CPU_OPERATION_SRCCOPY 0x00000003
-#define NV01_IMAGE_FROM_CPU_OPERATION_SRCCOPY_PREMULT 0x00000004
-#define NV01_IMAGE_FROM_CPU_OPERATION_BLEND_PREMULT 0x00000005
-#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT 0x00000300
-#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_Y8 0x00000001
-#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_A1R5G5B5 0x00000002
-#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_X1R5G5B5 0x00000003
-#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_A8R8G8B8 0x00000004
-#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_X8R8G8B8 0x00000005
-#define NV01_IMAGE_FROM_CPU_POINT 0x00000304
-#define NV01_IMAGE_FROM_CPU_POINT_X_SHIFT 0
-#define NV01_IMAGE_FROM_CPU_POINT_X_MASK 0x0000ffff
-#define NV01_IMAGE_FROM_CPU_POINT_Y_SHIFT 16
-#define NV01_IMAGE_FROM_CPU_POINT_Y_MASK 0xffff0000
-#define NV01_IMAGE_FROM_CPU_SIZE_OUT 0x00000308
-#define NV01_IMAGE_FROM_CPU_SIZE_OUT_W_SHIFT 0
-#define NV01_IMAGE_FROM_CPU_SIZE_OUT_W_MASK 0x0000ffff
-#define NV01_IMAGE_FROM_CPU_SIZE_OUT_H_SHIFT 16
-#define NV01_IMAGE_FROM_CPU_SIZE_OUT_H_MASK 0xffff0000
-#define NV01_IMAGE_FROM_CPU_SIZE_IN 0x0000030c
-#define NV01_IMAGE_FROM_CPU_SIZE_IN_W_SHIFT 0
-#define NV01_IMAGE_FROM_CPU_SIZE_IN_W_MASK 0x0000ffff
-#define NV01_IMAGE_FROM_CPU_SIZE_IN_H_SHIFT 16
-#define NV01_IMAGE_FROM_CPU_SIZE_IN_H_MASK 0xffff0000
-#define NV01_IMAGE_FROM_CPU_COLOR(x) (0x00000400+((x)*4))
-#define NV01_IMAGE_FROM_CPU_COLOR__SIZE 0x00000020
-
-
-#define NV04_IMAGE_FROM_CPU 0x00000061
-
-#define NV04_IMAGE_FROM_CPU_BETA4 0x00000198
-#define NV04_IMAGE_FROM_CPU_SURFACE 0x0000019c
-
-
-#define NV05_IMAGE_FROM_CPU 0x00000065
-
-#define NV05_IMAGE_FROM_CPU_COLOR_CONVERSION 0x000002f8
-
-
-#define NV10_IMAGE_FROM_CPU 0x0000008a
-
-#define NV10_IMAGE_FROM_CPU_WAIT_FOR_IDLE 0x00000108
-
-
-#define NV30_IMAGE_FROM_CPU 0x0000038a
-
-
-
-#define NV40_IMAGE_FROM_CPU 0x0000308a
-
-
-
-#define NV01_NULL 0x00000030
-
-
-
-#define NV03_STRETCHED_IMAGE_FROM_CPU 0x00000036
-
-#define NV03_STRETCHED_IMAGE_FROM_CPU_NOP 0x00000100
-#define NV03_STRETCHED_IMAGE_FROM_CPU_NOTIFY 0x00000104
-#define NV03_STRETCHED_IMAGE_FROM_CPU_PATCH 0x0000010c
-#define NV03_STRETCHED_IMAGE_FROM_CPU_DMA_NOTIFY 0x00000180
-#define NV03_STRETCHED_IMAGE_FROM_CPU_COLOR_KEY 0x00000184
-#define NV03_STRETCHED_IMAGE_FROM_CPU_PATTERN 0x00000188
-#define NV03_STRETCHED_IMAGE_FROM_CPU_ROP 0x0000018c
-#define NV03_STRETCHED_IMAGE_FROM_CPU_BETA1 0x00000190
-#define NV03_STRETCHED_IMAGE_FROM_CPU_SURFACE 0x00000194
-#define NV03_STRETCHED_IMAGE_FROM_CPU_OPERATION 0x000002fc
-#define NV03_STRETCHED_IMAGE_FROM_CPU_COLOR_FORMAT 0x00000300
-#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN 0x00000304
-#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN_W_SHIFT 0
-#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN_W_MASK 0x0000ffff
-#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN_H_SHIFT 16
-#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN_H_MASK 0xffff0000
-#define NV03_STRETCHED_IMAGE_FROM_CPU_DX_DU 0x00000308
-#define NV03_STRETCHED_IMAGE_FROM_CPU_DY_DV 0x0000030c
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT 0x00000310
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT_X_SHIFT 0
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT_X_MASK 0x0000ffff
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT_Y_SHIFT 16
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT_Y_MASK 0xffff0000
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE 0x00000314
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE_W_SHIFT 0
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE_W_MASK 0x0000ffff
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE_H_SHIFT 16
-#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE_H_MASK 0xffff0000
-#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4 0x00000318
-#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4_X_SHIFT 0
-#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4_X_MASK 0x0000ffff
-#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4_Y_SHIFT 16
-#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4_Y_MASK 0xffff0000
-#define NV03_STRETCHED_IMAGE_FROM_CPU_COLOR(x) (0x00000400+((x)*4))
-#define NV03_STRETCHED_IMAGE_FROM_CPU_COLOR__SIZE 0x00000020
-
-
-#define NV04_STRETCHED_IMAGE_FROM_CPU 0x00000076
-
-#define NV04_STRETCHED_IMAGE_FROM_CPU_BETA4 0x00000194
-#define NV04_STRETCHED_IMAGE_FROM_CPU_SURFACE 0x00000198
-
-
-#define NV05_STRETCHED_IMAGE_FROM_CPU 0x00000066
-
-#define NV05_STRETCHED_IMAGE_FROM_CPU_COLOR_CONVERSION 0x000002f8
-
-
-#define NV30_STRETCHED_IMAGE_FROM_CPU 0x00000366
-
-
-
-#define NV40_STRETCHED_IMAGE_FROM_CPU 0x00003066
-
-
-
-#define NV03_SCALED_IMAGE_FROM_MEMORY 0x00000037
-
-#define NV03_SCALED_IMAGE_FROM_MEMORY_NOP 0x00000100
-#define NV03_SCALED_IMAGE_FROM_MEMORY_NOTIFY 0x00000104
-#define NV03_SCALED_IMAGE_FROM_MEMORY_DMA_NOTIFY 0x00000180
-#define NV03_SCALED_IMAGE_FROM_MEMORY_DMA_IMAGE 0x00000184
-#define NV03_SCALED_IMAGE_FROM_MEMORY_PATTERN 0x00000188
-#define NV03_SCALED_IMAGE_FROM_MEMORY_ROP 0x0000018c
-#define NV03_SCALED_IMAGE_FROM_MEMORY_BETA1 0x00000190
-#define NV03_SCALED_IMAGE_FROM_MEMORY_SURFACE 0x00000194
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT 0x00000300
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A1R5G5B5 0x00000001
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_X1R5G5B5 0x00000002
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A8R8G8B8 0x00000003
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_X8R8G8B8 0x00000004
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_V8YB8U8YA8 0x00000005
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_YB8V8YA8U8 0x00000006
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_R5G6B5 0x00000007
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_Y8 0x00000008
-#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_AY8 0x00000009
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION 0x00000304
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_SRCCOPY_AND 0x00000000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_ROP_AND 0x00000001
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_BLEND_AND 0x00000002
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_SRCCOPY 0x00000003
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_SRCCOPY_PREMULT 0x00000004
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_BLEND_PREMULT 0x00000005
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT 0x00000308
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT_X_SHIFT 0
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT_X_MASK 0x0000ffff
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT_Y_SHIFT 16
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT_Y_MASK 0xffff0000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE 0x0000030c
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE_W_SHIFT 0
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE_W_MASK 0x0000ffff
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE_H_SHIFT 16
-#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE_H_MASK 0xffff0000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT 0x00000310
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT_X_SHIFT 0
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT_X_MASK 0x0000ffff
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT_Y_SHIFT 16
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT_Y_MASK 0xffff0000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE 0x00000314
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE_W_SHIFT 0
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE_W_MASK 0x0000ffff
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE_H_SHIFT 16
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE_H_MASK 0xffff0000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_DU_DX 0x00000318
-#define NV03_SCALED_IMAGE_FROM_MEMORY_DV_DY 0x0000031c
-#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE 0x00000400
-#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE_W_SHIFT 0
-#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE_W_MASK 0x0000ffff
-#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE_H_SHIFT 16
-#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE_H_MASK 0xffff0000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT 0x00000404
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_PITCH_SHIFT 0
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_PITCH_MASK 0x0000ffff
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN_SHIFT 16
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN_MASK 0x00ff0000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN_CENTER 0x00010000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN_CORNER 0x00020000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER_SHIFT 24
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER_MASK 0xff000000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER_POINT_SAMPLE 0x00000000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER_BILINEAR 0x01000000
-#define NV03_SCALED_IMAGE_FROM_MEMORY_OFFSET 0x00000408
-#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT 0x0000040c
-#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT_U_SHIFT 0
-#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT_U_MASK 0x0000ffff
-#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT_V_SHIFT 16
-#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT_V_MASK 0xffff0000
-
-
-#define NV04_SCALED_IMAGE_FROM_MEMORY 0x00000077
-
-#define NV04_SCALED_IMAGE_FROM_MEMORY_BETA4 0x00000194
-#define NV04_SCALED_IMAGE_FROM_MEMORY_SURFACE 0x00000198
-
-
-#define NV05_SCALED_IMAGE_FROM_MEMORY 0x00000063
-
-#define NV05_SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION 0x000002fc
-#define NV05_SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION_DITHER 0x00000000
-#define NV05_SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION_TRUNCATE 0x00000001
-#define NV05_SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION_SUBTR_TRUNCATE 0x00000002
-
-
-#define NV10_SCALED_IMAGE_FROM_MEMORY 0x00000089
-
-#define NV10_SCALED_IMAGE_FROM_MEMORY_WAIT_FOR_IDLE 0x00000108
-
-
-#define NV30_SCALED_IMAGE_FROM_MEMORY 0x00000389
-
-
-
-#define NV40_SCALED_IMAGE_FROM_MEMORY 0x00003089
-
-
-
-#define NV04_DVD_SUBPICTURE 0x00000038
-
-#define NV04_DVD_SUBPICTURE_NOP 0x00000100
-#define NV04_DVD_SUBPICTURE_NOTIFY 0x00000104
-#define NV04_DVD_SUBPICTURE_DMA_NOTIFY 0x00000180
-#define NV04_DVD_SUBPICTURE_DMA_OVERLAY 0x00000184
-#define NV04_DVD_SUBPICTURE_DMA_IMAGEIN 0x00000188
-#define NV04_DVD_SUBPICTURE_DMA_IMAGEOUT 0x0000018c
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_POINT 0x00000300
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_POINT_X_SHIFT 0
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_POINT_X_MASK 0x0000ffff
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_POINT_Y_SHIFT 16
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_POINT_Y_MASK 0xffff0000
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_SIZE 0x00000304
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_SIZE_W_SHIFT 0
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_SIZE_W_MASK 0x0000ffff
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_SIZE_H_SHIFT 16
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_SIZE_H_MASK 0xffff0000
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_FORMAT 0x00000308
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_FORMAT_PITCH_SHIFT 0
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_FORMAT_PITCH_MASK 0x0000ffff
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_FORMAT_COLOR_SHIFT 16
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_FORMAT_COLOR_MASK 0xffff0000
-#define NV04_DVD_SUBPICTURE_IMAGEOUT_OFFSET 0x0000030c
-#define NV04_DVD_SUBPICTURE_IMAGEIN_DELTA_DU_DX 0x00000310
-#define NV04_DVD_SUBPICTURE_IMAGEIN_DELTA_DV_DY 0x00000314
-#define NV04_DVD_SUBPICTURE_IMAGEIN_SIZE 0x00000318
-#define NV04_DVD_SUBPICTURE_IMAGEIN_SIZE_W_SHIFT 0
-#define NV04_DVD_SUBPICTURE_IMAGEIN_SIZE_W_MASK 0x0000ffff
-#define NV04_DVD_SUBPICTURE_IMAGEIN_SIZE_H_SHIFT 16
-#define NV04_DVD_SUBPICTURE_IMAGEIN_SIZE_H_MASK 0xffff0000
-#define NV04_DVD_SUBPICTURE_IMAGEIN_FORMAT 0x0000031c
-#define NV04_DVD_SUBPICTURE_IMAGEIN_FORMAT_PITCH_SHIFT 0
-#define NV04_DVD_SUBPICTURE_IMAGEIN_FORMAT_PITCH_MASK 0x0000ffff
-#define NV04_DVD_SUBPICTURE_IMAGEIN_FORMAT_COLOR_SHIFT 16
-#define NV04_DVD_SUBPICTURE_IMAGEIN_FORMAT_COLOR_MASK 0xffff0000
-#define NV04_DVD_SUBPICTURE_IMAGEIN_OFFSET 0x00000320
-#define NV04_DVD_SUBPICTURE_IMAGEIN_POINT 0x00000324
-#define NV04_DVD_SUBPICTURE_IMAGEIN_POINT_U_SHIFT 0
-#define NV04_DVD_SUBPICTURE_IMAGEIN_POINT_U_MASK 0x0000ffff
-#define NV04_DVD_SUBPICTURE_IMAGEIN_POINT_V_SHIFT 16
-#define NV04_DVD_SUBPICTURE_IMAGEIN_POINT_V_MASK 0xffff0000
-#define NV04_DVD_SUBPICTURE_OVERLAY_DELTA_DU_DX 0x00000328
-#define NV04_DVD_SUBPICTURE_OVERLAY_DELTA_DV_DY 0x0000032c
-#define NV04_DVD_SUBPICTURE_OVERLAY_SIZE 0x00000330
-#define NV04_DVD_SUBPICTURE_OVERLAY_SIZE_W_SHIFT 0
-#define NV04_DVD_SUBPICTURE_OVERLAY_SIZE_W_MASK 0x0000ffff
-#define NV04_DVD_SUBPICTURE_OVERLAY_SIZE_H_SHIFT 16
-#define NV04_DVD_SUBPICTURE_OVERLAY_SIZE_H_MASK 0xffff0000
-#define NV04_DVD_SUBPICTURE_OVERLAY_FORMAT 0x00000334
-#define NV04_DVD_SUBPICTURE_OVERLAY_FORMAT_PITCH_SHIFT 0
-#define NV04_DVD_SUBPICTURE_OVERLAY_FORMAT_PITCH_MASK 0x0000ffff
-#define NV04_DVD_SUBPICTURE_OVERLAY_FORMAT_COLOR_SHIFT 16
-#define NV04_DVD_SUBPICTURE_OVERLAY_FORMAT_COLOR_MASK 0xffff0000
-#define NV04_DVD_SUBPICTURE_OVERLAY_OFFSET 0x00000338
-#define NV04_DVD_SUBPICTURE_OVERLAY_POINT 0x0000033c
-#define NV04_DVD_SUBPICTURE_OVERLAY_POINT_U_SHIFT 0
-#define NV04_DVD_SUBPICTURE_OVERLAY_POINT_U_MASK 0x0000ffff
-#define NV04_DVD_SUBPICTURE_OVERLAY_POINT_V_SHIFT 16
-#define NV04_DVD_SUBPICTURE_OVERLAY_POINT_V_MASK 0xffff0000
-
-
-#define NV10_DVD_SUBPICTURE 0x00000088
-
-#define NV10_DVD_SUBPICTURE_WAIT_FOR_IDLE 0x00000108
-
-
-#define NV04_MEMORY_TO_MEMORY_FORMAT 0x00000039
-
-#define NV04_MEMORY_TO_MEMORY_FORMAT_NOP 0x00000100
-#define NV04_MEMORY_TO_MEMORY_FORMAT_NOTIFY 0x00000104
-#define NV04_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY 0x00000180
-#define NV04_MEMORY_TO_MEMORY_FORMAT_DMA_BUFFER_IN 0x00000184
-#define NV04_MEMORY_TO_MEMORY_FORMAT_DMA_BUFFER_OUT 0x00000188
-#define NV04_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN 0x0000030c
-#define NV04_MEMORY_TO_MEMORY_FORMAT_OFFSET_OUT 0x00000310
-#define NV04_MEMORY_TO_MEMORY_FORMAT_PITCH_IN 0x00000314
-#define NV04_MEMORY_TO_MEMORY_FORMAT_PITCH_OUT 0x00000318
-#define NV04_MEMORY_TO_MEMORY_FORMAT_LINE_LENGTH_IN 0x0000031c
-#define NV04_MEMORY_TO_MEMORY_FORMAT_LINE_COUNT 0x00000320
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT 0x00000324
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_INPUT_INC_SHIFT 0
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_INPUT_INC_MASK 0x000000ff
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_OUTPUT_INC_SHIFT 8
-#define NV04_MEMORY_TO_MEMORY_FORMAT_FORMAT_OUTPUT_INC_MASK 0x0000ff00
-#define NV04_MEMORY_TO_MEMORY_FORMAT_BUF_NOTIFY 0x00000328
-
-
-#define NV50_MEMORY_TO_MEMORY_FORMAT 0x00005039
-
-#define NV50_MEMORY_TO_MEMORY_FORMAT_SERIALIZE 0x00000110
-#define NV50_MEMORY_TO_MEMORY_FORMAT_LINEAR_IN 0x00000200
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_MODE_IN 0x00000204
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_PITCH_IN 0x00000208
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_HEIGHT_IN 0x0000020c
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_DEPTH_IN 0x00000210
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_Z 0x00000214
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN 0x00000218
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_X_SHIFT 0
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_X_MASK 0x0000ffff
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_Y_SHIFT 16
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_IN_Y_MASK 0xffff0000
-#define NV50_MEMORY_TO_MEMORY_FORMAT_LINEAR_OUT 0x0000021c
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_MODE_OUT 0x00000220
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_PITCH_OUT 0x00000224
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_HEIGHT_OUT 0x00000228
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_DEPTH_OUT 0x0000022c
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_Z 0x00000230
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT 0x00000234
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_X_SHIFT 0
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_X_MASK 0x0000ffff
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_Y_SHIFT 16
-#define NV50_MEMORY_TO_MEMORY_FORMAT_TILING_POSITION_OUT_Y_MASK 0xffff0000
-#define NV50_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN_HIGH 0x00000238
-#define NV50_MEMORY_TO_MEMORY_FORMAT_OFFSET_OUT_HIGH 0x0000023c
-
-
-#define NV01_MEMORY_LOCAL_BANKED 0x0000003d
-
-
-
-#define NV01_MAPPING_SYSTEM 0x0000003e
-
-
-
-#define NV03_MEMORY_LOCAL_CURSOR 0x0000003f
-
-
-
-#define NV01_MEMORY_LOCAL_LINEAR 0x00000040
-
-
-
-#define NV01_MAPPING_LOCAL 0x00000041
-
-
-
-#define NV04_CONTEXT_SURFACES_2D 0x00000042
-
-#define NV04_CONTEXT_SURFACES_2D_NOP 0x00000100
-#define NV04_CONTEXT_SURFACES_2D_NOTIFY 0x00000104
-#define NV04_CONTEXT_SURFACES_2D_PM_TRIGGER 0x00000140
-#define NV04_CONTEXT_SURFACES_2D_DMA_NOTIFY 0x00000180
-#define NV04_CONTEXT_SURFACES_2D_DMA_IMAGE_SOURCE 0x00000184
-#define NV04_CONTEXT_SURFACES_2D_DMA_IMAGE_DESTIN 0x00000188
-#define NV04_CONTEXT_SURFACES_2D_FORMAT 0x00000300
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_Y8 0x00000001
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_X1R5G5B5_Z1R5G5B5 0x00000002
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_X1R5G5B5_X1R5G5B5 0x00000003
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_R5G6B5 0x00000004
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_Y16 0x00000005
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_X8R8G8B8_Z8R8G8B8 0x00000006
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_X8R8G8B8_X8R8G8B8 0x00000007
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_X1A7R8G8B8_Z1A7R8G8B8 0x00000008
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_X1A7R8G8B8_X1A7R8G8B8 0x00000009
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_A8R8G8B8 0x0000000a
-#define NV04_CONTEXT_SURFACES_2D_FORMAT_Y32 0x0000000b
-#define NV04_CONTEXT_SURFACES_2D_PITCH 0x00000304
-#define NV04_CONTEXT_SURFACES_2D_PITCH_SOURCE_SHIFT 0
-#define NV04_CONTEXT_SURFACES_2D_PITCH_SOURCE_MASK 0x0000ffff
-#define NV04_CONTEXT_SURFACES_2D_PITCH_DESTIN_SHIFT 16
-#define NV04_CONTEXT_SURFACES_2D_PITCH_DESTIN_MASK 0xffff0000
-#define NV04_CONTEXT_SURFACES_2D_OFFSET_SOURCE 0x00000308
-#define NV04_CONTEXT_SURFACES_2D_OFFSET_DESTIN 0x0000030c
-
-
-#define NV10_CONTEXT_SURFACES_2D 0x00000062
-
-
-
-#define NV30_CONTEXT_SURFACES_2D 0x00000362
-
-
-
-#define NV40_CONTEXT_SURFACES_2D 0x00003062
-
-
-
-#define NV03_CONTEXT_ROP 0x00000043
-
-#define NV03_CONTEXT_ROP_NOP 0x00000100
-#define NV03_CONTEXT_ROP_NOTIFY 0x00000104
-#define NV03_CONTEXT_ROP_DMA_NOTIFY 0x00000180
-#define NV03_CONTEXT_ROP_ROP 0x00000300
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_SHIFT 0
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_MASK 0x0000000f
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_CLEAR 0x00000000
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_NOR 0x00000001
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_AND_INVERTED 0x00000002
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_COPY_INVERTED 0x00000003
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_AND_REVERSE 0x00000004
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_INVERT 0x00000005
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_XOR 0x00000006
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_NAND 0x00000007
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_AND 0x00000008
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_EQUI 0x00000009
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_NOOP 0x0000000a
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_OR_INVERTED 0x0000000b
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_COPY 0x0000000c
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_OR_REVERSE 0x0000000d
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_OR 0x0000000e
-#define NV03_CONTEXT_ROP_ROP_DST_LOGIC_OP_SET 0x0000000f
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_SHIFT 4
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_MASK 0x000000f0
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_CLEAR 0x00000000
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_NOR 0x00000010
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_AND_INVERTED 0x00000020
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_COPY_INVERTED 0x00000030
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_AND_REVERSE 0x00000040
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_INVERT 0x00000050
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_XOR 0x00000060
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_NAND 0x00000070
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_AND 0x00000080
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_EQUI 0x00000090
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_NOOP 0x000000a0
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_OR_INVERTED 0x000000b0
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_COPY 0x000000c0
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_OR_REVERSE 0x000000d0
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_OR 0x000000e0
-#define NV03_CONTEXT_ROP_ROP_SRC_LOGIC_OP_SET 0x000000f0
-
-
-#define NV04_IMAGE_PATTERN 0x00000044
-
-#define NV04_IMAGE_PATTERN_NOP 0x00000100
-#define NV04_IMAGE_PATTERN_NOTIFY 0x00000104
-#define NV04_IMAGE_PATTERN_DMA_NOTIFY 0x00000180
-#define NV04_IMAGE_PATTERN_COLOR_FORMAT 0x00000300
-#define NV04_IMAGE_PATTERN_COLOR_FORMAT_A16R5G6B5 0x00000001
-#define NV04_IMAGE_PATTERN_COLOR_FORMAT_X16A1R5G5B5 0x00000002
-#define NV04_IMAGE_PATTERN_COLOR_FORMAT_A8R8G8B8 0x00000003
-#define NV04_IMAGE_PATTERN_MONOCHROME_FORMAT 0x00000304
-#define NV04_IMAGE_PATTERN_MONOCHROME_FORMAT_CGA6 0x00000001
-#define NV04_IMAGE_PATTERN_MONOCHROME_FORMAT_LE 0x00000002
-#define NV04_IMAGE_PATTERN_MONOCHROME_SHAPE 0x00000308
-#define NV04_IMAGE_PATTERN_MONOCHROME_SHAPE_8X8 0x00000000
-#define NV04_IMAGE_PATTERN_MONOCHROME_SHAPE_64X1 0x00000001
-#define NV04_IMAGE_PATTERN_MONOCHROME_SHAPE_1X64 0x00000002
-#define NV04_IMAGE_PATTERN_PATTERN_SELECT 0x0000030c
-#define NV04_IMAGE_PATTERN_PATTERN_SELECT_MONO 0x00000001
-#define NV04_IMAGE_PATTERN_PATTERN_SELECT_COLOR 0x00000002
-#define NV04_IMAGE_PATTERN_MONOCHROME_COLOR0 0x00000310
-#define NV04_IMAGE_PATTERN_MONOCHROME_COLOR1 0x00000314
-#define NV04_IMAGE_PATTERN_MONOCHROME_PATTERN0 0x00000318
-#define NV04_IMAGE_PATTERN_MONOCHROME_PATTERN1 0x0000031c
-#define NV04_IMAGE_PATTERN_PATTERN_Y8(x) (0x00000400+((x)*4))
-#define NV04_IMAGE_PATTERN_PATTERN_Y8__SIZE 0x00000010
-#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y0_SHIFT 0
-#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y0_MASK 0x000000ff
-#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y1_SHIFT 8
-#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y1_MASK 0x0000ff00
-#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y2_SHIFT 16
-#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y2_MASK 0x00ff0000
-#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y3_SHIFT 24
-#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y3_MASK 0xff000000
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5(x) (0x00000500+((x)*4))
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5__SIZE 0x00000020
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_B0_SHIFT 0
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_B0_MASK 0x0000001f
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_G0_SHIFT 5
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_G0_MASK 0x000007e0
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_R0_SHIFT 11
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_R0_MASK 0x0000f800
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_B1_SHIFT 16
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_B1_MASK 0x001f0000
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_G1_SHIFT 21
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_G1_MASK 0x07e00000
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_R1_SHIFT 27
-#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_R1_MASK 0xf8000000
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5(x) (0x00000600+((x)*4))
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5__SIZE 0x00000020
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_B0_SHIFT 0
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_B0_MASK 0x0000001f
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_G0_SHIFT 5
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_G0_MASK 0x000003e0
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_R0_SHIFT 10
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_R0_MASK 0x00007c00
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_B1_SHIFT 16
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_B1_MASK 0x001f0000
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_G1_SHIFT 21
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_G1_MASK 0x03e00000
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_R1_SHIFT 26
-#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_R1_MASK 0x7c000000
-#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8(x) (0x00000700+((x)*4))
-#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8__SIZE 0x00000040
-#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_B_SHIFT 0
-#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_B_MASK 0x000000ff
-#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_G_SHIFT 8
-#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_G_MASK 0x0000ff00
-#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_R_SHIFT 16
-#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_R_MASK 0x00ff0000
-
-
-#define NV03_VIDEO_LUT_CURSOR_DAC 0x00000046
-
-#define NV03_VIDEO_LUT_CURSOR_DAC_SYNCHRONIZE 0x00000100
-#define NV03_VIDEO_LUT_CURSOR_DAC_STOP_IMAGE 0x00000104
-#define NV03_VIDEO_LUT_CURSOR_DAC_STOP_CURSOR 0x00000108
-#define NV03_VIDEO_LUT_CURSOR_DAC_STOP_DAC 0x0000010c
-#define NV03_VIDEO_LUT_CURSOR_DAC_DMA_NOTIFY 0x00000180
-#define NV03_VIDEO_LUT_CURSOR_DAC_DMA_IMAGE(x) (0x00000184+((x)*4))
-#define NV03_VIDEO_LUT_CURSOR_DAC_DMA_IMAGE__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_DMA_LUT(x) (0x0000018c+((x)*4))
-#define NV03_VIDEO_LUT_CURSOR_DAC_DMA_LUT__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_DMA_CURSOR(x) (0x00000194+((x)*4))
-#define NV03_VIDEO_LUT_CURSOR_DAC_DMA_CURSOR__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_GET 0x000002fc
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_OFFSET(x) (0x00000300+((x)*8))
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_OFFSET__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_FORMAT(x) (0x00000304+((x)*8))
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_FORMAT__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_FORMAT_PITCH_SHIFT 0
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_FORMAT_PITCH_MASK 0x0000ffff
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_FORMAT_COLOR_SHIFT 16
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_FORMAT_COLOR_MASK 0x0fff0000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_FORMAT_NOTIFY_SHIFT 28
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_IMAGE_FORMAT_NOTIFY_MASK 0xf0000000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_OFFSET(x) (0x00000340+((x)*12))
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_OFFSET__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT(x) (0x00000344+((x)*12))
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT_X_SHIFT 0
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT_X_MASK 0x0000ffff
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT_Y_SHIFT 16
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT_Y_MASK 0xffff0000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_FORMAT(x) (0x00000348+((x)*12))
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_FORMAT__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT_A 0x00000358
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT_A_X_SHIFT 0
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT_A_X_MASK 0x0000ffff
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT_A_Y_SHIFT 16
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_CURSOR_POINT_OUT_A_Y_MASK 0xffff0000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_IMAGE_SIZE(x) (0x00000380+((x)*16))
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_IMAGE_SIZE__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_IMAGE_SIZE_W_SHIFT 0
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_IMAGE_SIZE_W_MASK 0x0000ffff
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_IMAGE_SIZE_H_SHIFT 16
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_IMAGE_SIZE_H_MASK 0xffff0000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_HSYNC(x) (0x00000384+((x)*16))
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_HSYNC__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_HSYNC_START_SHIFT 0
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_HSYNC_START_MASK 0x0000ffff
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_HSYNC_WIDTH_SHIFT 16
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_HSYNC_WIDTH_MASK 0x0fff0000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_HSYNC_POLARITY_SHIFT 28
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_HSYNC_POLARITY_MASK 0xf0000000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_VSYNC(x) (0x00000388+((x)*16))
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_VSYNC__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_VSYNC_START_SHIFT 0
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_VSYNC_START_MASK 0x0000ffff
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_VSYNC_WIDTH_SHIFT 16
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_VSYNC_WIDTH_MASK 0x0fff0000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_VSYNC_POLARITY_SHIFT 28
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_VSYNC_POLARITY_MASK 0xf0000000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_TOTAL_SIZE(x) (0x0000038c+((x)*16))
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_TOTAL_SIZE__SIZE 0x00000002
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_TOTAL_SIZE_WIDTH_SHIFT 0
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_TOTAL_SIZE_WIDTH_MASK 0x0000ffff
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_TOTAL_SIZE_HEIGHT_SHIFT 16
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_TOTAL_SIZE_HEIGHT_MASK 0x0fff0000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_TOTAL_SIZE_NOTIFY_SHIFT 28
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_DAC_TOTAL_SIZE_NOTIFY_MASK 0xf0000000
-#define NV03_VIDEO_LUT_CURSOR_DAC_SET_PIXEL_CLOCK 0x000003a0
-
-
-#define NV03_TEXTURED_TRIANGLE 0x00000048
-
-#define NV03_TEXTURED_TRIANGLE_NOP 0x00000100
-#define NV03_TEXTURED_TRIANGLE_NOTIFY 0x00000104
-#define NV03_TEXTURED_TRIANGLE_PATCH 0x0000010c
-#define NV03_TEXTURED_TRIANGLE_DMA_NOTIFY 0x00000180
-#define NV03_TEXTURED_TRIANGLE_DMA_TEXTURE 0x00000184
-#define NV03_TEXTURED_TRIANGLE_CLIP_RECTANGLE 0x00000188
-#define NV03_TEXTURED_TRIANGLE_SURFACE 0x0000018c
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_OFFSET 0x00000304
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT 0x00000308
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_MASK_SHIFT 0
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_MASK_MASK 0x0000ffff
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_ENABLE_SHIFT 16
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_KEY_ENABLE_MASK 0x000f0000
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_SHIFT 20
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_COLOR_MASK 0x00f00000
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MIN_SHIFT 24
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MIN_MASK 0x0f000000
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MAX_SHIFT 28
-#define NV03_TEXTURED_TRIANGLE_TEXTURE_FORMAT_SIZE_MAX_MASK 0xf0000000
-#define NV03_TEXTURED_TRIANGLE_FILTER 0x0000030c
-#define NV03_TEXTURED_TRIANGLE_FILTER_SPREAD_X_SHIFT 0
-#define NV03_TEXTURED_TRIANGLE_FILTER_SPREAD_X_MASK 0x0000001f
-#define NV03_TEXTURED_TRIANGLE_FILTER_SPREAD_Y_SHIFT 8
-#define NV03_TEXTURED_TRIANGLE_FILTER_SPREAD_Y_MASK 0x00001f00
-#define NV03_TEXTURED_TRIANGLE_FILTER_SIZE_ADJUST_SHIFT 16
-#define NV03_TEXTURED_TRIANGLE_FILTER_SIZE_ADJUST_MASK 0x00ff0000
-#define NV03_TEXTURED_TRIANGLE_FOG_COLOR 0x00000310
-#define NV03_TEXTURED_TRIANGLE_FOG_COLOR_B_SHIFT 0
-#define NV03_TEXTURED_TRIANGLE_FOG_COLOR_B_MASK 0x000000ff
-#define NV03_TEXTURED_TRIANGLE_FOG_COLOR_G_SHIFT 8
-#define NV03_TEXTURED_TRIANGLE_FOG_COLOR_G_MASK 0x0000ff00
-#define NV03_TEXTURED_TRIANGLE_FOG_COLOR_R_SHIFT 16
-#define NV03_TEXTURED_TRIANGLE_FOG_COLOR_R_MASK 0x00ff0000
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT 0x00000314
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_INTERPOLATOR_SHIFT 0
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_INTERPOLATOR_MASK 0x0000000f
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_U_SHIFT 4
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_U_MASK 0x00000030
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_V_SHIFT 6
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_WRAP_V_MASK 0x000000c0
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_SOURCE_COLOR_SHIFT 8
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_SOURCE_COLOR_MASK 0x00000f00
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_CULLING_SHIFT 12
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_CULLING_MASK 0x00007000
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_PERSPECTIVE_ENABLE (1 << 15)
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_FUNC_SHIFT 16
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_FUNC_MASK 0x000f0000
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_WRITE_ENABLE_SHIFT 20
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_Z_WRITE_ENABLE_MASK 0x00f00000
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_COLOR_WRITE_ENABLE_SHIFT 24
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_COLOR_WRITE_ENABLE_MASK 0x07000000
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_ROP_SHIFT 27
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_ROP_MASK 0x18000000
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_BETA (1 << 29)
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_DST_BLEND (1 << 30)
-#define NV03_TEXTURED_TRIANGLE_CONTROL_OUT_SRC_BLEND (1 << 31)
-#define NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL 0x00000318
-#define NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_REF_SHIFT 0
-#define NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_REF_MASK 0x000000ff
-#define NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_FUNC_SHIFT 8
-#define NV03_TEXTURED_TRIANGLE_ALPHA_CONTROL_ALPHA_FUNC_MASK 0xffffff00
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR(x) (0x00001000+((x)*32))
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR__SIZE 0x00000080
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I0_SHIFT 0
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I0_MASK 0x0000000f
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I1_SHIFT 4
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I1_MASK 0x000000f0
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I2_SHIFT 8
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I2_MASK 0x00000f00
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I3_SHIFT 12
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I3_MASK 0x0000f000
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I4_SHIFT 16
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I4_MASK 0x000f0000
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I5_SHIFT 20
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_I5_MASK 0x00f00000
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_SHIFT 24
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_MASK 0xff000000
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_COLOR(x) (0x00001004+((x)*32))
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_COLOR__SIZE 0x00000080
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SX(x) (0x00001008+((x)*32))
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SX__SIZE 0x00000080
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SY(x) (0x0000100c+((x)*32))
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SY__SIZE 0x00000080
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SZ(x) (0x00001010+((x)*32))
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_SZ__SIZE 0x00000080
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_RHW(x) (0x00001014+((x)*32))
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_RHW__SIZE 0x00000080
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_TU(x) (0x00001018+((x)*32))
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_TU__SIZE 0x00000080
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_TV(x) (0x0000101c+((x)*32))
-#define NV03_TEXTURED_TRIANGLE_TLVERTEX_TV__SIZE 0x00000080
-
-
-#define NV04_GDI_RECTANGLE_TEXT 0x0000004a
-
-#define NV04_GDI_RECTANGLE_TEXT_NOP 0x00000100
-#define NV04_GDI_RECTANGLE_TEXT_NOTIFY 0x00000104
-#define NV04_GDI_RECTANGLE_TEXT_PATCH 0x0000010c
-#define NV04_GDI_RECTANGLE_TEXT_PM_TRIGGER 0x00000140
-#define NV04_GDI_RECTANGLE_TEXT_DMA_NOTIFY 0x00000180
-#define NV04_GDI_RECTANGLE_TEXT_DMA_FONTS 0x00000184
-#define NV04_GDI_RECTANGLE_TEXT_PATTERN 0x00000188
-#define NV04_GDI_RECTANGLE_TEXT_ROP 0x0000018c
-#define NV04_GDI_RECTANGLE_TEXT_BETA1 0x00000190
-#define NV04_GDI_RECTANGLE_TEXT_BETA4 0x00000194
-#define NV04_GDI_RECTANGLE_TEXT_SURFACE 0x00000198
-#define NV04_GDI_RECTANGLE_TEXT_OPERATION 0x000002fc
-#define NV04_GDI_RECTANGLE_TEXT_OPERATION_SRCCOPY_AND 0x00000000
-#define NV04_GDI_RECTANGLE_TEXT_OPERATION_ROP_AND 0x00000001
-#define NV04_GDI_RECTANGLE_TEXT_OPERATION_BLEND_AND 0x00000002
-#define NV04_GDI_RECTANGLE_TEXT_OPERATION_SRCCOPY 0x00000003
-#define NV04_GDI_RECTANGLE_TEXT_OPERATION_SRCCOPY_PREMULT 0x00000004
-#define NV04_GDI_RECTANGLE_TEXT_OPERATION_BLEND_PREMULT 0x00000005
-#define NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT 0x00000300
-#define NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A16R5G6B5 0x00000001
-#define NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_X16A1R5G5B5 0x00000002
-#define NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8 0x00000003
-#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_FORMAT 0x00000304
-#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_FORMAT_CGA6 0x00000001
-#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_FORMAT_LE 0x00000002
-#define NV04_GDI_RECTANGLE_TEXT_COLOR1_A 0x000003fc
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT(x) (0x00000400+((x)*8))
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT__SIZE 0x00000020
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_Y_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_Y_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_X_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_X_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE(x) (0x00000404+((x)*8))
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE__SIZE 0x00000020
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_H_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_H_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_W_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_W_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0 0x000005f4
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0_L_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0_L_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0_T_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0_T_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1 0x000005f8
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1_R_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1_R_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1_B_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1_B_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_COLOR1_B 0x000005fc
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0(x) (0x00000600+((x)*8))
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0__SIZE 0x00000020
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_L_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_L_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_T_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_T_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1(x) (0x00000604+((x)*8))
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1__SIZE 0x00000020
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_R_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_R_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_B_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_B_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0 0x000007ec
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_L_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_L_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_T_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_T_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1 0x000007f0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_R_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_R_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_B_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_B_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_COLOR1_C 0x000007f4
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_C 0x000007f8
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_C_W_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_C_W_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_C_H_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_C_H_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_POINT_C 0x000007fc
-#define NV04_GDI_RECTANGLE_TEXT_POINT_C_X_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_POINT_C_X_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_POINT_C_Y_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_POINT_C_Y_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C(x) (0x00000800+((x)*4))
-#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C__SIZE 0x00000080
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0 0x00000be4
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_L_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_L_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_T_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_T_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1 0x00000be8
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_R_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_R_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_B_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_B_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_COLOR0_E 0x00000bec
-#define NV04_GDI_RECTANGLE_TEXT_COLOR1_E 0x00000bf0
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E 0x00000bf4
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E_W_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E_W_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E_H_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E_H_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E 0x00000bf8
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E_W_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E_W_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E_H_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E_H_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_POINT_E 0x00000bfc
-#define NV04_GDI_RECTANGLE_TEXT_POINT_E_X_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_POINT_E_X_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_POINT_E_Y_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_POINT_E_Y_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E(x) (0x00000c00+((x)*4))
-#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E__SIZE 0x00000080
-#define NV04_GDI_RECTANGLE_TEXT_FONT_F 0x00000ff0
-#define NV04_GDI_RECTANGLE_TEXT_FONT_F_OFFSET_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_FONT_F_OFFSET_MASK 0x0fffffff
-#define NV04_GDI_RECTANGLE_TEXT_FONT_F_PITCH_SHIFT 28
-#define NV04_GDI_RECTANGLE_TEXT_FONT_F_PITCH_MASK 0xf0000000
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0 0x00000ff4
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0_L_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0_L_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0_T_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0_T_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1 0x00000ff8
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1_R_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1_R_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1_B_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1_B_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_COLOR1_F 0x00000ffc
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F(x) (0x00001000+((x)*4))
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F__SIZE 0x00000100
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_INDEX_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_INDEX_MASK 0x000000ff
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_X_SHIFT 8
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_X_MASK 0x000fff00
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_Y_SHIFT 20
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_Y_MASK 0xfff00000
-#define NV04_GDI_RECTANGLE_TEXT_FONT_G 0x000017f0
-#define NV04_GDI_RECTANGLE_TEXT_FONT_G_OFFSET_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_FONT_G_OFFSET_MASK 0x0fffffff
-#define NV04_GDI_RECTANGLE_TEXT_FONT_G_PITCH_SHIFT 28
-#define NV04_GDI_RECTANGLE_TEXT_FONT_G_PITCH_MASK 0xf0000000
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0 0x000017f4
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0_L_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0_L_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0_T_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0_T_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1 0x000017f8
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1_R_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1_R_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1_B_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1_B_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_COLOR1_G 0x000017fc
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT(x) (0x00001800+((x)*8))
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT__SIZE 0x00000100
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT_X_SHIFT 0
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT_X_MASK 0x0000ffff
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT_Y_SHIFT 16
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT_Y_MASK 0xffff0000
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_INDEX(x) (0x00001804+((x)*8))
-#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_INDEX__SIZE 0x00000100
-
-
-#define NV03_GDI_RECTANGLE_TEXT 0x0000004b
-
-#define NV03_GDI_RECTANGLE_TEXT_NOP 0x00000100
-#define NV03_GDI_RECTANGLE_TEXT_NOTIFY 0x00000104
-#define NV03_GDI_RECTANGLE_TEXT_DMA_NOTIFY 0x00000180
-#define NV03_GDI_RECTANGLE_TEXT_PATTERN 0x00000184
-#define NV03_GDI_RECTANGLE_TEXT_ROP 0x00000188
-#define NV03_GDI_RECTANGLE_TEXT_BETA1 0x0000018c
-#define NV03_GDI_RECTANGLE_TEXT_SURFACE 0x00000190
-#define NV03_GDI_RECTANGLE_TEXT_OPERATION 0x000002fc
-#define NV03_GDI_RECTANGLE_TEXT_COLOR_FORMAT 0x00000300
-#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_FORMAT 0x00000304
-#define NV03_GDI_RECTANGLE_TEXT_COLOR1_A 0x000003fc
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT 0x00000400
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_Y_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_Y_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_X_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_X_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE 0x00000404
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_H_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_H_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_W_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_W_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B 0x000007f4
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B_L_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B_L_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B_T_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B_T_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B 0x000007f8
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B_R_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B_R_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B_B_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B_B_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_COLOR1_B 0x000007fc
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0 0x00000800
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_L_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_L_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_T_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_T_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1 0x00000804
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_R_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_R_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_B_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_B_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0 0x00000bec
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_L_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_L_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_T_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_T_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1 0x00000bf0
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_R_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_R_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_B_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_B_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_COLOR1_C 0x00000bf4
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_C 0x00000bf8
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_C_W_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_C_W_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_C_H_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_C_H_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_POINT_C 0x00000bfc
-#define NV03_GDI_RECTANGLE_TEXT_POINT_C_X_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_POINT_C_X_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_POINT_C_Y_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_POINT_C_Y_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C(x) (0x00000c00+((x)*4))
-#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C__SIZE 0x00000020
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0 0x00000fe8
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0_L_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0_L_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0_T_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0_T_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1 0x00000fec
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1_R_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1_R_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1_B_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1_B_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_COLOR1_D 0x00000ff0
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D 0x00000ff4
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D_W_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D_W_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D_H_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D_H_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D 0x00000ff8
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D_W_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D_W_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D_H_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D_H_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_POINT_D 0x00000ffc
-#define NV03_GDI_RECTANGLE_TEXT_POINT_D_X_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_POINT_D_X_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_POINT_D_Y_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_POINT_D_Y_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_D(x) (0x00001000+((x)*4))
-#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_D__SIZE 0x00000020
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0 0x000013e4
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_L_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_L_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_T_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_T_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1 0x000013e8
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_R_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_R_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_B_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_B_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_COLOR0_E 0x000013ec
-#define NV03_GDI_RECTANGLE_TEXT_COLOR1_E 0x000013f0
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E 0x000013f4
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E_W_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E_W_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E_H_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E_H_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E 0x000013f8
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E_W_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E_W_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E_H_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E_H_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_POINT_E 0x000013fc
-#define NV03_GDI_RECTANGLE_TEXT_POINT_E_X_SHIFT 0
-#define NV03_GDI_RECTANGLE_TEXT_POINT_E_X_MASK 0x0000ffff
-#define NV03_GDI_RECTANGLE_TEXT_POINT_E_Y_SHIFT 16
-#define NV03_GDI_RECTANGLE_TEXT_POINT_E_Y_MASK 0xffff0000
-#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E(x) (0x00001400+((x)*4))
-#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E__SIZE 0x00000020
-
-
-#define NV04_SWIZZLED_SURFACE 0x00000052
-
-#define NV04_SWIZZLED_SURFACE_NOP 0x00000100
-#define NV04_SWIZZLED_SURFACE_NOTIFY 0x00000104
-#define NV04_SWIZZLED_SURFACE_DMA_NOTIFY 0x00000180
-#define NV04_SWIZZLED_SURFACE_DMA_IMAGE 0x00000184
-#define NV04_SWIZZLED_SURFACE_FORMAT 0x00000300
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_SHIFT 0
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_MASK 0x000000ff
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_Y8 0x00000001
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X1R5G5B5_Z1R5G5B5 0x00000002
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X1R5G5B5_X1R5G5B5 0x00000003
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_R5G6B5 0x00000004
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_Y16 0x00000005
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X8R8G8B8_Z8R8G8B8 0x00000006
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X8R8G8B8_X8R8G8B8 0x00000007
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X1A7R8G8B8_Z1A7R8G8B8 0x00000008
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X1A7R8G8B8_X1A7R8G8B8 0x00000009
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_A8R8G8B8 0x0000000a
-#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_Y32 0x0000000b
-#define NV04_SWIZZLED_SURFACE_FORMAT_BASE_SIZE_U_SHIFT 16
-#define NV04_SWIZZLED_SURFACE_FORMAT_BASE_SIZE_U_MASK 0x00ff0000
-#define NV04_SWIZZLED_SURFACE_FORMAT_BASE_SIZE_V_SHIFT 24
-#define NV04_SWIZZLED_SURFACE_FORMAT_BASE_SIZE_V_MASK 0xff000000
-#define NV04_SWIZZLED_SURFACE_OFFSET 0x00000304
-
-
-#define NV20_SWIZZLED_SURFACE 0x0000009e
-
-
-
-#define NV30_SWIZZLED_SURFACE 0x0000039e
-
-
-
-#define NV40_SWIZZLED_SURFACE 0x0000309e
-
-
-
-#define NV04_CONTEXT_SURFACES_3D 0x00000053
-
-#define NV04_CONTEXT_SURFACES_3D_NOP 0x00000100
-#define NV04_CONTEXT_SURFACES_3D_NOTIFY 0x00000104
-#define NV04_CONTEXT_SURFACES_3D_DMA_NOTIFY 0x00000180
-#define NV04_CONTEXT_SURFACES_3D_DMA_COLOR 0x00000184
-#define NV04_CONTEXT_SURFACES_3D_DMA_ZETA 0x00000188
-#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL 0x000002f8
-#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL_X_SHIFT 0
-#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL_X_MASK 0x0000ffff
-#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL_W_SHIFT 16
-#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL_W_MASK 0xffff0000
-#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL 0x000002fc
-#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL_Y_SHIFT 0
-#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL_Y_MASK 0x0000ffff
-#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL_H_SHIFT 16
-#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL_H_MASK 0xffff0000
-#define NV04_CONTEXT_SURFACES_3D_FORMAT 0x00000300
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_SHIFT 0
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_MASK 0x000000ff
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X1R5G5B5_Z1R5G5B5 0x00000001
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X1R5G5B5_X1R5G5B5 0x00000002
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5 0x00000003
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_Z8R8G8B8 0x00000004
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8 0x00000005
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X1A7R8G8B8_Z1A7R8G8B8 0x00000006
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X1A7R8G8B8_X1A7R8G8B8 0x00000007
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8 0x00000008
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_TYPE_SHIFT 8
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_TYPE_MASK 0x0000ff00
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_TYPE_PITCH 0x00000100
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_TYPE_SWIZZLE 0x00000200
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_BASE_SIZE_U_SHIFT 16
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_BASE_SIZE_U_MASK 0x00ff0000
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_BASE_SIZE_V_SHIFT 24
-#define NV04_CONTEXT_SURFACES_3D_FORMAT_BASE_SIZE_V_MASK 0xff000000
-#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE 0x00000304
-#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE_W_SHIFT 0
-#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE_W_MASK 0x0000ffff
-#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE_H_SHIFT 16
-#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE_H_MASK 0xffff0000
-#define NV04_CONTEXT_SURFACES_3D_PITCH 0x00000308
-#define NV04_CONTEXT_SURFACES_3D_PITCH_COLOR_SHIFT 0
-#define NV04_CONTEXT_SURFACES_3D_PITCH_COLOR_MASK 0x0000ffff
-#define NV04_CONTEXT_SURFACES_3D_PITCH_ZETA_SHIFT 16
-#define NV04_CONTEXT_SURFACES_3D_PITCH_ZETA_MASK 0xffff0000
-#define NV04_CONTEXT_SURFACES_3D_OFFSET_COLOR 0x0000030c
-#define NV04_CONTEXT_SURFACES_3D_OFFSET_ZETA 0x00000310
-
-
-#define NV10_CONTEXT_SURFACES_3D 0x00000093
-
-
-
-#define NV04_TEXTURED_TRIANGLE 0x00000054
-
-#define NV04_TEXTURED_TRIANGLE_NOP 0x00000100
-#define NV04_TEXTURED_TRIANGLE_NOTIFY 0x00000104
-#define NV04_TEXTURED_TRIANGLE_DMA_NOTIFY 0x00000180
-#define NV04_TEXTURED_TRIANGLE_DMA_A 0x00000184
-#define NV04_TEXTURED_TRIANGLE_DMA_B 0x00000188
-#define NV04_TEXTURED_TRIANGLE_SURFACE 0x0000018c
-#define NV04_TEXTURED_TRIANGLE_COLORKEY 0x00000300
-#define NV04_TEXTURED_TRIANGLE_OFFSET 0x00000304
-#define NV04_TEXTURED_TRIANGLE_FORMAT 0x00000308
-#define NV04_TEXTURED_TRIANGLE_FORMAT_DMA_A (1 << 0)
-#define NV04_TEXTURED_TRIANGLE_FORMAT_DMA_B (1 << 1)
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_KEY_MATCH_SHIFT 2
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_KEY_MATCH_MASK 0x0000000c
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_SHIFT 4
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_MASK 0x00000030
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_CENTER 0x00000010
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_CORNER 0x00000020
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_SHIFT 6
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_MASK 0x000000c0
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_CENTER 0x00000040
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_CORNER 0x00000080
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_SHIFT 8
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_MASK 0x00000f00
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_Y8 0x00000100
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A1R5G5B5 0x00000200
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_X1R5G5B5 0x00000300
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A4R4G4B4 0x00000400
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_R5G6B5 0x00000500
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A8R8G8B8 0x00000600
-#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_X8R8G8B8 0x00000700
-#define NV04_TEXTURED_TRIANGLE_FORMAT_MIPMAP_LEVELS_SHIFT 12
-#define NV04_TEXTURED_TRIANGLE_FORMAT_MIPMAP_LEVELS_MASK 0x0000f000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_U_SHIFT 16
-#define NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_U_MASK 0x000f0000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_V_SHIFT 20
-#define NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_V_MASK 0x00f00000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_SHIFT 24
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_MASK 0x07000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_REPEAT 0x01000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_MIRRORED_REPEAT 0x02000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_EDGE 0x03000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_BORDER 0x04000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP 0x05000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_WRAPU (1 << 27)
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_SHIFT 28
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_MASK 0x70000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_REPEAT 0x10000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_MIRRORED_REPEAT 0x20000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_EDGE 0x30000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_BORDER 0x40000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP 0x50000000
-#define NV04_TEXTURED_TRIANGLE_FORMAT_WRAPV (1 << 31)
-#define NV04_TEXTURED_TRIANGLE_FILTER 0x0000030c
-#define NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_X_SHIFT 0
-#define NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_X_MASK 0x000000ff
-#define NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_Y_SHIFT 8
-#define NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_Y_MASK 0x00007f00
-#define NV04_TEXTURED_TRIANGLE_FILTER_MIPMAP_DITHER_ENABLE (1 << 15)
-#define NV04_TEXTURED_TRIANGLE_FILTER_MIPMAP_LODBIAS_SHIFT 16
-#define NV04_TEXTURED_TRIANGLE_FILTER_MIPMAP_LODBIAS_MASK 0x00ff0000
-#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_SHIFT 24
-#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_MASK 0x07000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST 0x01000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR 0x02000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST 0x03000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST 0x04000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR 0x05000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR 0x06000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_ANISOTROPIC_MINIFY_ENABLE (1 << 27)
-#define NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_SHIFT 28
-#define NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_MASK 0x70000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_NEAREST 0x10000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_LINEAR 0x20000000
-#define NV04_TEXTURED_TRIANGLE_FILTER_ANISOTROPIC_MAGNIFY_ENABLE (1 << 31)
-#define NV04_TEXTURED_TRIANGLE_BLEND 0x00000310
-#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_SHIFT 0
-#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_MASK 0x0000000f
-#define NV04_TEXTURED_TRIANGLE_BLEND_MASK_BIT_SHIFT 4
-#define NV04_TEXTURED_TRIANGLE_BLEND_MASK_BIT_MASK 0x00000030
-#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_SHIFT 6
-#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_MASK 0x000000c0
-#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_FLAT 0x00000040
-#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_GOURAUD 0x00000080
-#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_PHONG 0x000000c0
-#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE (1 << 8)
-#define NV04_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE (1 << 12)
-#define NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE (1 << 16)
-#define NV04_TEXTURED_TRIANGLE_BLEND_BLEND_ENABLE (1 << 20)
-#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_SHIFT 24
-#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_MASK 0x0f000000
-#define NV04_TEXTURED_TRIANGLE_BLEND_DST_SHIFT 28
-#define NV04_TEXTURED_TRIANGLE_BLEND_DST_MASK 0xf0000000
-#define NV04_TEXTURED_TRIANGLE_CONTROL 0x00000314
-#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_REF_SHIFT 0
-#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_REF_MASK 0x000000ff
-#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_SHIFT 8
-#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_MASK 0x00000f00
-#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_ENABLE (1 << 12)
-#define NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN (1 << 13)
-#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_ENABLE (1 << 14)
-#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_SHIFT 16
-#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_MASK 0x000f0000
-#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_SHIFT 20
-#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_MASK 0x00300000
-#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_BOTH 0x00000000
-#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_NONE 0x00100000
-#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_CW 0x00200000
-#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_CCW 0x00300000
-#define NV04_TEXTURED_TRIANGLE_CONTROL_DITHER_ENABLE (1 << 22)
-#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_PERSPECTIVE_ENABLE (1 << 23)
-#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_WRITE (1 << 24)
-#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_SHIFT 30
-#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_MASK 0xc0000000
-#define NV04_TEXTURED_TRIANGLE_FOGCOLOR 0x00000318
-#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_B_SHIFT 0
-#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_B_MASK 0x000000ff
-#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_G_SHIFT 8
-#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_G_MASK 0x0000ff00
-#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_R_SHIFT 16
-#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_R_MASK 0x00ff0000
-#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_A_SHIFT 24
-#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_A_MASK 0xff000000
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SX(x) (0x00000400+((x)*32))
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SX__SIZE 0x00000010
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SY(x) (0x00000404+((x)*32))
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SY__SIZE 0x00000010
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SZ(x) (0x00000408+((x)*32))
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SZ__SIZE 0x00000010
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_RHW(x) (0x0000040c+((x)*32))
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_RHW__SIZE 0x00000010
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR(x) (0x00000410+((x)*32))
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR__SIZE 0x00000010
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_B_SHIFT 0
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_B_MASK 0x000000ff
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_G_SHIFT 8
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_G_MASK 0x0000ff00
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_R_SHIFT 16
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_R_MASK 0x00ff0000
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_A_SHIFT 24
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_A_MASK 0xff000000
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR(x) (0x00000414+((x)*32))
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR__SIZE 0x00000010
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_B_SHIFT 0
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_B_MASK 0x000000ff
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_G_SHIFT 8
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_G_MASK 0x0000ff00
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_R_SHIFT 16
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_R_MASK 0x00ff0000
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_SHIFT 24
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG_MASK 0xff000000
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_TU(x) (0x00000418+((x)*32))
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_TU__SIZE 0x00000010
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_TV(x) (0x0000041c+((x)*32))
-#define NV04_TEXTURED_TRIANGLE_TLVERTEX_TV__SIZE 0x00000010
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE(x) (0x00000600+((x)*4))
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE__SIZE 0x00000040
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I0_SHIFT 0
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I0_MASK 0x0000000f
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I1_SHIFT 4
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I1_MASK 0x000000f0
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I2_SHIFT 8
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I2_MASK 0x00000f00
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I3_SHIFT 12
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I3_MASK 0x0000f000
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I4_SHIFT 16
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I4_MASK 0x000f0000
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I5_SHIFT 20
-#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I5_MASK 0x00f00000
-
-
-#define NV10_TEXTURED_TRIANGLE 0x00000094
-
-
-
-#define NV04_MULTITEX_TRIANGLE 0x00000055
-
-#define NV04_MULTITEX_TRIANGLE_NOP 0x00000100
-#define NV04_MULTITEX_TRIANGLE_NOTIFY 0x00000104
-#define NV04_MULTITEX_TRIANGLE_DMA_NOTIFY 0x00000180
-#define NV04_MULTITEX_TRIANGLE_DMA_A 0x00000184
-#define NV04_MULTITEX_TRIANGLE_DMA_B 0x00000188
-#define NV04_MULTITEX_TRIANGLE_SURFACE 0x0000018c
-#define NV04_MULTITEX_TRIANGLE_OFFSET(x) (0x00000308+((x)*4))
-#define NV04_MULTITEX_TRIANGLE_OFFSET__SIZE 0x00000002
-#define NV04_MULTITEX_TRIANGLE_FORMAT(x) (0x00000310+((x)*4))
-#define NV04_MULTITEX_TRIANGLE_FORMAT__SIZE 0x00000002
-#define NV04_MULTITEX_TRIANGLE_FORMAT_DMA_A (1 << 0)
-#define NV04_MULTITEX_TRIANGLE_FORMAT_DMA_B (1 << 1)
-#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_SHIFT 4
-#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_MASK 0x00000030
-#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH_SHIFT 6
-#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH_MASK 0x000000c0
-#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_MASK 0x00000f00
-#define NV04_MULTITEX_TRIANGLE_FORMAT_MIPMAP_LEVELS_SHIFT 12
-#define NV04_MULTITEX_TRIANGLE_FORMAT_MIPMAP_LEVELS_MASK 0x0000f000
-#define NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_U_SHIFT 16
-#define NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_U_MASK 0x000f0000
-#define NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_V_SHIFT 20
-#define NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_V_MASK 0x00f00000
-#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_SHIFT 24
-#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_MASK 0x07000000
-#define NV04_MULTITEX_TRIANGLE_FORMAT_WRAPU (1 << 27)
-#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_SHIFT 28
-#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_MASK 0x70000000
-#define NV04_MULTITEX_TRIANGLE_FORMAT_WRAPV (1 << 31)
-#define NV04_MULTITEX_TRIANGLE_FILTER(x) (0x00000318+((x)*4))
-#define NV04_MULTITEX_TRIANGLE_FILTER__SIZE 0x00000002
-#define NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_X_SHIFT 0
-#define NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_X_MASK 0x000000ff
-#define NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_Y_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_Y_MASK 0x00007f00
-#define NV04_MULTITEX_TRIANGLE_FILTER_MIPMAP_DITHER_ENABLE (1 << 15)
-#define NV04_MULTITEX_TRIANGLE_FILTER_MIPMAP_LODBIAS_SHIFT 16
-#define NV04_MULTITEX_TRIANGLE_FILTER_MIPMAP_LODBIAS_MASK 0x00ff0000
-#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_SHIFT 24
-#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_MASK 0x07000000
-#define NV04_MULTITEX_TRIANGLE_FILTER_ANISOTROPIC_MINIFY_ENABLE (1 << 27)
-#define NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY_SHIFT 28
-#define NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY_MASK 0x70000000
-#define NV04_MULTITEX_TRIANGLE_FILTER_ANISOTROPIC_MAGNIFY_ENABLE (1 << 31)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA(x) (0x00000320+((x)*12))
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA__SIZE 0x00000002
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE0 (1 << 0)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_SHIFT 2
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_MASK 0x000000fc
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_ZERO 0x00000004
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_CONSTANT 0x00000008
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_PRIMARY_COLOR 0x0000000c
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_PREVIOUS 0x00000010
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_TEXTURE0 0x00000014
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_TEXTURE1 0x00000018
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE1 (1 << 8)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_SHIFT 10
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_MASK 0x0000fc00
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_ZERO 0x00000400
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_CONSTANT 0x00000800
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_PRIMARY_COLOR 0x00000c00
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_PREVIOUS 0x00001000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_TEXTURE0 0x00001400
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_TEXTURE1 0x00001800
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE2 (1 << 16)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_SHIFT 18
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_MASK 0x00fc0000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_ZERO 0x00040000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_CONSTANT 0x00080000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_PRIMARY_COLOR 0x000c0000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_PREVIOUS 0x00100000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_TEXTURE0 0x00140000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_TEXTURE1 0x00180000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE3 (1 << 24)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_SHIFT 26
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_MASK 0x1c000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_ZERO 0x04000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_CONSTANT 0x08000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_PRIMARY_COLOR 0x0c000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_PREVIOUS 0x10000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_TEXTURE0 0x14000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_TEXTURE1 0x18000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SHIFT 29
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_MASK 0xe0000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_IDENTITY 0x20000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SCALE2 0x40000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SCALE4 0x60000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_BIAS 0x80000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_BIAS_SCALE2 0xe0000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR(x) (0x00000324+((x)*12))
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR__SIZE 0x00000002
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE0 (1 << 0)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA0 (1 << 1)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_SHIFT 2
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_MASK 0x000000fc
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_ZERO 0x00000004
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_CONSTANT 0x00000008
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_PRIMARY_COLOR 0x0000000c
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_PREVIOUS 0x00000010
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_TEXTURE0 0x00000014
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_TEXTURE1 0x00000018
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE1 (1 << 8)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA1 (1 << 9)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_SHIFT 10
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_MASK 0x0000fc00
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_ZERO 0x00000400
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_CONSTANT 0x00000800
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_PRIMARY_COLOR 0x00000c00
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_PREVIOUS 0x00001000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_TEXTURE0 0x00001400
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_TEXTURE1 0x00001800
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE2 (1 << 16)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA2 (1 << 17)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_SHIFT 18
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_MASK 0x00fc0000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_ZERO 0x00040000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_CONSTANT 0x00080000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_PRIMARY_COLOR 0x000c0000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_PREVIOUS 0x00100000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_TEXTURE0 0x00140000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_TEXTURE1 0x00180000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE3 (1 << 24)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA3 (1 << 25)
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_SHIFT 26
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_MASK 0x1c000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_ZERO 0x04000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_CONSTANT 0x08000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_PRIMARY_COLOR 0x0c000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_PREVIOUS 0x10000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_TEXTURE0 0x14000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_TEXTURE1 0x18000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SHIFT 29
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_MASK 0xe0000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_IDENTITY 0x20000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SCALE2 0x40000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SCALE4 0x60000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_BIAS 0x80000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_BIAS_SCALE2 0xe0000000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR 0x00000334
-#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_B_SHIFT 0
-#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_B_MASK 0x000000ff
-#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_G_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_G_MASK 0x0000ff00
-#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_R_SHIFT 16
-#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_R_MASK 0x00ff0000
-#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_A_SHIFT 24
-#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_A_MASK 0xff000000
-#define NV04_MULTITEX_TRIANGLE_BLEND 0x00000338
-#define NV04_MULTITEX_TRIANGLE_BLEND_MASK_BIT_SHIFT 4
-#define NV04_MULTITEX_TRIANGLE_BLEND_MASK_BIT_MASK 0x00000030
-#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_SHIFT 6
-#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_MASK 0x000000c0
-#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_FLAT 0x00000040
-#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_GOURAUD 0x00000080
-#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_PHONG 0x000000c0
-#define NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE (1 << 8)
-#define NV04_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE (1 << 12)
-#define NV04_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE (1 << 16)
-#define NV04_MULTITEX_TRIANGLE_BLEND_BLEND_ENABLE (1 << 20)
-#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_SHIFT 24
-#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_MASK 0x0f000000
-#define NV04_MULTITEX_TRIANGLE_BLEND_DST_SHIFT 28
-#define NV04_MULTITEX_TRIANGLE_BLEND_DST_MASK 0xf0000000
-#define NV04_MULTITEX_TRIANGLE_CONTROL0 0x0000033c
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_REF_SHIFT 0
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_REF_MASK 0x000000ff
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_MASK 0x00000f00
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_ENABLE (1 << 12)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN (1 << 13)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_ENABLE (1 << 14)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_SHIFT 16
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_MASK 0x000f0000
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_SHIFT 20
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_MASK 0x00300000
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_BOTH 0x00000000
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_NONE 0x00100000
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_CW 0x00200000
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_CCW 0x00300000
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_DITHER_ENABLE (1 << 22)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_PERSPECTIVE_ENABLE (1 << 23)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_WRITE (1 << 24)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_STENCIL_WRITE (1 << 25)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_WRITE (1 << 26)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_RED_WRITE (1 << 27)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_GREEN_WRITE (1 << 28)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_BLUE_WRITE (1 << 29)
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_SHIFT 30
-#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_MASK 0xc0000000
-#define NV04_MULTITEX_TRIANGLE_CONTROL1 0x00000340
-#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_ENABLE (1 << 0)
-#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_SHIFT 4
-#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC_MASK 0x000000f0
-#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF_MASK 0x0000ff00
-#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ_SHIFT 16
-#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ_MASK 0x00ff0000
-#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE_SHIFT 24
-#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE_MASK 0xff000000
-#define NV04_MULTITEX_TRIANGLE_CONTROL2 0x00000344
-#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_FAIL_SHIFT 0
-#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_FAIL_MASK 0x0000000f
-#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL_SHIFT 4
-#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL_MASK 0x000000f0
-#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS_MASK 0x00000f00
-#define NV04_MULTITEX_TRIANGLE_FOGCOLOR 0x00000348
-#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_B_SHIFT 0
-#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_B_MASK 0x000000ff
-#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_G_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_G_MASK 0x0000ff00
-#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_R_SHIFT 16
-#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_R_MASK 0x00ff0000
-#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_A_SHIFT 24
-#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_A_MASK 0xff000000
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SX(x) (0x00000400+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SX__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SY(x) (0x00000404+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SY__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SZ(x) (0x00000408+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SZ__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_RHW(x) (0x0000040c+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_RHW__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR(x) (0x00000410+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_B_SHIFT 0
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_B_MASK 0x000000ff
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_G_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_G_MASK 0x0000ff00
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_R_SHIFT 16
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_R_MASK 0x00ff0000
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_A_SHIFT 24
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_A_MASK 0xff000000
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR(x) (0x00000414+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_B_SHIFT 0
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_B_MASK 0x000000ff
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_G_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_G_MASK 0x0000ff00
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_R_SHIFT 16
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_R_MASK 0x00ff0000
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_FOG_SHIFT 24
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_FOG_MASK 0xff000000
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU0(x) (0x00000418+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU0__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV0(x) (0x0000041c+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV0__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU1(x) (0x00000420+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU1__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV1(x) (0x00000424+((x)*40))
-#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV1__SIZE 0x00000008
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE(x) (0x00000540+((x)*4))
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE__SIZE 0x00000030
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I0_SHIFT 0
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I0_MASK 0x0000000f
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I1_SHIFT 4
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I1_MASK 0x000000f0
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I2_SHIFT 8
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I2_MASK 0x00000f00
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I3_SHIFT 12
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I3_MASK 0x0000f000
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I4_SHIFT 16
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I4_MASK 0x000f0000
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I5_SHIFT 20
-#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I5_MASK 0x00f00000
-
-
-#define NV10_MULTITEX_TRIANGLE 0x00000095
-
-
-
-#define NV10TCL 0x00000056
-
-#define NV10TCL_NOP 0x00000100
-#define NV10TCL_NOTIFY 0x00000104
-#define NV10TCL_DMA_NOTIFY 0x00000180
-#define NV10TCL_DMA_IN_MEMORY0 0x00000184
-#define NV10TCL_DMA_IN_MEMORY1 0x00000188
-#define NV10TCL_DMA_VTXBUF0 0x0000018c
-#define NV10TCL_DMA_IN_MEMORY2 0x00000194
-#define NV10TCL_DMA_IN_MEMORY3 0x00000198
-#define NV10TCL_RT_HORIZ 0x00000200
-#define NV10TCL_RT_HORIZ_X_SHIFT 0
-#define NV10TCL_RT_HORIZ_X_MASK 0x0000ffff
-#define NV10TCL_RT_HORIZ_W_SHIFT 16
-#define NV10TCL_RT_HORIZ_W_MASK 0xffff0000
-#define NV10TCL_RT_VERT 0x00000204
-#define NV10TCL_RT_VERT_Y_SHIFT 0
-#define NV10TCL_RT_VERT_Y_MASK 0x0000ffff
-#define NV10TCL_RT_VERT_H_SHIFT 16
-#define NV10TCL_RT_VERT_H_MASK 0xffff0000
-#define NV10TCL_RT_FORMAT 0x00000208
-#define NV10TCL_RT_FORMAT_TYPE_SHIFT 8
-#define NV10TCL_RT_FORMAT_TYPE_MASK 0x00000f00
-#define NV10TCL_RT_FORMAT_TYPE_LINEAR 0x00000100
-#define NV10TCL_RT_FORMAT_TYPE_SWIZZLED 0x00000200
-#define NV10TCL_RT_FORMAT_COLOR_SHIFT 0
-#define NV10TCL_RT_FORMAT_COLOR_MASK 0x0000001f
-#define NV10TCL_RT_FORMAT_COLOR_R5G6B5 0x00000003
-#define NV10TCL_RT_FORMAT_COLOR_X8R8G8B8 0x00000005
-#define NV10TCL_RT_FORMAT_COLOR_A8R8G8B8 0x00000008
-#define NV10TCL_RT_FORMAT_COLOR_B8 0x00000009
-#define NV10TCL_RT_FORMAT_COLOR_UNKNOWN 0x0000000d
-#define NV10TCL_RT_FORMAT_COLOR_X8B8G8R8 0x0000000f
-#define NV10TCL_RT_FORMAT_COLOR_A8B8G8R8 0x00000010
-#define NV10TCL_RT_PITCH 0x0000020c
-#define NV10TCL_RT_PITCH_COLOR_PITCH_SHIFT 0
-#define NV10TCL_RT_PITCH_COLOR_PITCH_MASK 0x0000ffff
-#define NV10TCL_RT_PITCH_ZETA_PITCH_SHIFT 16
-#define NV10TCL_RT_PITCH_ZETA_PITCH_MASK 0xffff0000
-#define NV10TCL_COLOR_OFFSET 0x00000210
-#define NV10TCL_ZETA_OFFSET 0x00000214
-#define NV10TCL_TX_OFFSET(x) (0x00000218+((x)*4))
-#define NV10TCL_TX_OFFSET__SIZE 0x00000002
-#define NV10TCL_TX_FORMAT(x) (0x00000220+((x)*4))
-#define NV10TCL_TX_FORMAT__SIZE 0x00000002
-#define NV10TCL_TX_FORMAT_DMA0 (1 << 0)
-#define NV10TCL_TX_FORMAT_DMA1 (1 << 1)
-#define NV10TCL_TX_FORMAT_CUBE_MAP (1 << 2)
-#define NV10TCL_TX_FORMAT_FORMAT_SHIFT 7
-#define NV10TCL_TX_FORMAT_FORMAT_MASK 0x00000f80
-#define NV10TCL_TX_FORMAT_FORMAT_L8 0x00000000
-#define NV10TCL_TX_FORMAT_FORMAT_A8 0x00000080
-#define NV10TCL_TX_FORMAT_FORMAT_A1R5G5B5 0x00000100
-#define NV10TCL_TX_FORMAT_FORMAT_A4R4G4B4 0x00000200
-#define NV10TCL_TX_FORMAT_FORMAT_R5G6B5 0x00000280
-#define NV10TCL_TX_FORMAT_FORMAT_A8R8G8B8 0x00000300
-#define NV10TCL_TX_FORMAT_FORMAT_X8R8G8B8 0x00000380
-#define NV10TCL_TX_FORMAT_FORMAT_INDEX8 0x00000580
-#define NV10TCL_TX_FORMAT_FORMAT_DXT1 0x00000600
-#define NV10TCL_TX_FORMAT_FORMAT_DXT3 0x00000700
-#define NV10TCL_TX_FORMAT_FORMAT_DXT5 0x00000780
-#define NV10TCL_TX_FORMAT_FORMAT_A1R5G5B5_RECT 0x00000800
-#define NV10TCL_TX_FORMAT_FORMAT_R5G6B5_RECT 0x00000880
-#define NV10TCL_TX_FORMAT_FORMAT_A8R8G8B8_RECT 0x00000900
-#define NV10TCL_TX_FORMAT_FORMAT_A8_RECT 0x00000980
-#define NV10TCL_TX_FORMAT_MIPMAP (1 << 15)
-#define NV10TCL_TX_FORMAT_BASE_SIZE_U_SHIFT 16
-#define NV10TCL_TX_FORMAT_BASE_SIZE_U_MASK 0x000f0000
-#define NV10TCL_TX_FORMAT_BASE_SIZE_V_SHIFT 20
-#define NV10TCL_TX_FORMAT_BASE_SIZE_V_MASK 0x00f00000
-#define NV10TCL_TX_FORMAT_WRAP_S_SHIFT 24
-#define NV10TCL_TX_FORMAT_WRAP_S_MASK 0x0f000000
-#define NV10TCL_TX_FORMAT_WRAP_S_REPEAT 0x01000000
-#define NV10TCL_TX_FORMAT_WRAP_S_MIRRORED_REPEAT 0x02000000
-#define NV10TCL_TX_FORMAT_WRAP_S_CLAMP_TO_EDGE 0x03000000
-#define NV10TCL_TX_FORMAT_WRAP_S_CLAMP_TO_BORDER 0x04000000
-#define NV10TCL_TX_FORMAT_WRAP_S_CLAMP 0x05000000
-#define NV10TCL_TX_FORMAT_WRAP_T_SHIFT 28
-#define NV10TCL_TX_FORMAT_WRAP_T_MASK 0xf0000000
-#define NV10TCL_TX_FORMAT_WRAP_T_REPEAT 0x10000000
-#define NV10TCL_TX_FORMAT_WRAP_T_MIRRORED_REPEAT 0x20000000
-#define NV10TCL_TX_FORMAT_WRAP_T_CLAMP_TO_EDGE 0x30000000
-#define NV10TCL_TX_FORMAT_WRAP_T_CLAMP_TO_BORDER 0x40000000
-#define NV10TCL_TX_FORMAT_WRAP_T_CLAMP 0x50000000
-#define NV10TCL_TX_ENABLE(x) (0x00000228+((x)*4))
-#define NV10TCL_TX_ENABLE__SIZE 0x00000002
-#define NV10TCL_TX_ENABLE_CULL_SHIFT 0
-#define NV10TCL_TX_ENABLE_CULL_MASK 0x0000000f
-#define NV10TCL_TX_ENABLE_CULL_DISABLED 0x00000000
-#define NV10TCL_TX_ENABLE_CULL_TEST_ALL 0x00000003
-#define NV10TCL_TX_ENABLE_CULL_TEST_ALPHA 0x00000004
-#define NV10TCL_TX_ENABLE_ANISOTROPY_SHIFT 4
-#define NV10TCL_TX_ENABLE_ANISOTROPY_MASK 0x00000030
-#define NV10TCL_TX_ENABLE_MIPMAP_MAX_LOD_SHIFT 14
-#define NV10TCL_TX_ENABLE_MIPMAP_MAX_LOD_MASK 0x0003c000
-#define NV10TCL_TX_ENABLE_MIPMAP_MIN_LOD_SHIFT 26
-#define NV10TCL_TX_ENABLE_MIPMAP_MIN_LOD_MASK 0x3c000000
-#define NV10TCL_TX_ENABLE_ENABLE (1 << 30)
-#define NV10TCL_TX_NPOT_PITCH(x) (0x00000230+((x)*4))
-#define NV10TCL_TX_NPOT_PITCH__SIZE 0x00000002
-#define NV10TCL_TX_NPOT_PITCH_PITCH_SHIFT 16
-#define NV10TCL_TX_NPOT_PITCH_PITCH_MASK 0xffff0000
-#define NV10TCL_TX_NPOT_SIZE(x) (0x00000240+((x)*4))
-#define NV10TCL_TX_NPOT_SIZE__SIZE 0x00000002
-#define NV10TCL_TX_NPOT_SIZE_H_SHIFT 0
-#define NV10TCL_TX_NPOT_SIZE_H_MASK 0x0000ffff
-#define NV10TCL_TX_NPOT_SIZE_W_SHIFT 16
-#define NV10TCL_TX_NPOT_SIZE_W_MASK 0xffff0000
-#define NV10TCL_TX_FILTER(x) (0x00000248+((x)*4))
-#define NV10TCL_TX_FILTER__SIZE 0x00000002
-#define NV10TCL_TX_FILTER_LOD_BIAS_SHIFT 8
-#define NV10TCL_TX_FILTER_LOD_BIAS_MASK 0x00000f00
-#define NV10TCL_TX_FILTER_MINIFY_SHIFT 24
-#define NV10TCL_TX_FILTER_MINIFY_MASK 0x0f000000
-#define NV10TCL_TX_FILTER_MINIFY_NEAREST 0x01000000
-#define NV10TCL_TX_FILTER_MINIFY_LINEAR 0x02000000
-#define NV10TCL_TX_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST 0x03000000
-#define NV10TCL_TX_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST 0x04000000
-#define NV10TCL_TX_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR 0x05000000
-#define NV10TCL_TX_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR 0x06000000
-#define NV10TCL_TX_FILTER_MAGNIFY_SHIFT 28
-#define NV10TCL_TX_FILTER_MAGNIFY_MASK 0xf0000000
-#define NV10TCL_TX_FILTER_MAGNIFY_NEAREST 0x10000000
-#define NV10TCL_TX_FILTER_MAGNIFY_LINEAR 0x20000000
-#define NV10TCL_TX_PALETTE_OFFSET(x) (0x00000250+((x)*4))
-#define NV10TCL_TX_PALETTE_OFFSET__SIZE 0x00000002
-#define NV10TCL_RC_IN_ALPHA(x) (0x00000260+((x)*4))
-#define NV10TCL_RC_IN_ALPHA__SIZE 0x00000002
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_SHIFT 0
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_MASK 0x0000000f
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0 0x00000001
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1 0x00000002
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_FOG 0x00000003
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR 0x00000004
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR 0x00000005
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE0 0x00000008
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE1 0x00000009
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_SPARE0 0x0000000c
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_SPARE1 0x0000000d
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_E_TIMES_F 0x0000000f
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE2 0x0000000a
-#define NV10TCL_RC_IN_ALPHA_D_INPUT_TEXTURE3 0x0000000b
-#define NV10TCL_RC_IN_ALPHA_D_COMPONENT_USAGE (1 << 4)
-#define NV10TCL_RC_IN_ALPHA_D_COMPONENT_USAGE_BLUE 0x00000000
-#define NV10TCL_RC_IN_ALPHA_D_COMPONENT_USAGE_ALPHA 0x00000010
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_SHIFT 5
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_MASK 0x000000e0
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT 0x00000020
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL 0x00000040
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE 0x00000060
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY 0x000000c0
-#define NV10TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE 0x000000e0
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_SHIFT 8
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_MASK 0x00000f00
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0 0x00000100
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1 0x00000200
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_FOG 0x00000300
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR 0x00000400
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR 0x00000500
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE0 0x00000800
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE1 0x00000900
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_SPARE0 0x00000c00
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_SPARE1 0x00000d00
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_E_TIMES_F 0x00000f00
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE2 0x00000a00
-#define NV10TCL_RC_IN_ALPHA_C_INPUT_TEXTURE3 0x00000b00
-#define NV10TCL_RC_IN_ALPHA_C_COMPONENT_USAGE (1 << 12)
-#define NV10TCL_RC_IN_ALPHA_C_COMPONENT_USAGE_BLUE 0x00000000
-#define NV10TCL_RC_IN_ALPHA_C_COMPONENT_USAGE_ALPHA 0x00001000
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_SHIFT 13
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_MASK 0x0000e000
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT 0x00002000
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL 0x00004000
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE 0x00006000
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY 0x0000c000
-#define NV10TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE 0x0000e000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_SHIFT 16
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_MASK 0x000f0000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0 0x00010000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1 0x00020000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_FOG 0x00030000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR 0x00040000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR 0x00050000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE0 0x00080000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE1 0x00090000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_SPARE0 0x000c0000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_SPARE1 0x000d0000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_E_TIMES_F 0x000f0000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE2 0x000a0000
-#define NV10TCL_RC_IN_ALPHA_B_INPUT_TEXTURE3 0x000b0000
-#define NV10TCL_RC_IN_ALPHA_B_COMPONENT_USAGE (1 << 20)
-#define NV10TCL_RC_IN_ALPHA_B_COMPONENT_USAGE_BLUE 0x00000000
-#define NV10TCL_RC_IN_ALPHA_B_COMPONENT_USAGE_ALPHA 0x00100000
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_SHIFT 21
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_MASK 0x00e00000
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT 0x00200000
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL 0x00400000
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE 0x00600000
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY 0x00c00000
-#define NV10TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE 0x00e00000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_SHIFT 24
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_MASK 0x0f000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0 0x01000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1 0x02000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_FOG 0x03000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR 0x04000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR 0x05000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE0 0x08000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE1 0x09000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_SPARE0 0x0c000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_SPARE1 0x0d000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_E_TIMES_F 0x0f000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE2 0x0a000000
-#define NV10TCL_RC_IN_ALPHA_A_INPUT_TEXTURE3 0x0b000000
-#define NV10TCL_RC_IN_ALPHA_A_COMPONENT_USAGE (1 << 28)
-#define NV10TCL_RC_IN_ALPHA_A_COMPONENT_USAGE_BLUE 0x00000000
-#define NV10TCL_RC_IN_ALPHA_A_COMPONENT_USAGE_ALPHA 0x10000000
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_SHIFT 29
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_MASK 0xe0000000
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT 0x20000000
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL 0x40000000
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE 0x60000000
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY 0xc0000000
-#define NV10TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE 0xe0000000
-#define NV10TCL_RC_IN_RGB(x) (0x00000268+((x)*4))
-#define NV10TCL_RC_IN_RGB__SIZE 0x00000002
-#define NV10TCL_RC_IN_RGB_D_INPUT_SHIFT 0
-#define NV10TCL_RC_IN_RGB_D_INPUT_MASK 0x0000000f
-#define NV10TCL_RC_IN_RGB_D_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0 0x00000001
-#define NV10TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1 0x00000002
-#define NV10TCL_RC_IN_RGB_D_INPUT_FOG 0x00000003
-#define NV10TCL_RC_IN_RGB_D_INPUT_PRIMARY_COLOR 0x00000004
-#define NV10TCL_RC_IN_RGB_D_INPUT_SECONDARY_COLOR 0x00000005
-#define NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE0 0x00000008
-#define NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE1 0x00000009
-#define NV10TCL_RC_IN_RGB_D_INPUT_SPARE0 0x0000000c
-#define NV10TCL_RC_IN_RGB_D_INPUT_SPARE1 0x0000000d
-#define NV10TCL_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV10TCL_RC_IN_RGB_D_INPUT_E_TIMES_F 0x0000000f
-#define NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE2 0x0000000a
-#define NV10TCL_RC_IN_RGB_D_INPUT_TEXTURE3 0x0000000b
-#define NV10TCL_RC_IN_RGB_D_COMPONENT_USAGE (1 << 4)
-#define NV10TCL_RC_IN_RGB_D_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_IN_RGB_D_COMPONENT_USAGE_ALPHA 0x00000010
-#define NV10TCL_RC_IN_RGB_D_MAPPING_SHIFT 5
-#define NV10TCL_RC_IN_RGB_D_MAPPING_MASK 0x000000e0
-#define NV10TCL_RC_IN_RGB_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_IN_RGB_D_MAPPING_UNSIGNED_INVERT 0x00000020
-#define NV10TCL_RC_IN_RGB_D_MAPPING_EXPAND_NORMAL 0x00000040
-#define NV10TCL_RC_IN_RGB_D_MAPPING_EXPAND_NEGATE 0x00000060
-#define NV10TCL_RC_IN_RGB_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
-#define NV10TCL_RC_IN_RGB_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
-#define NV10TCL_RC_IN_RGB_D_MAPPING_SIGNED_IDENTITY 0x000000c0
-#define NV10TCL_RC_IN_RGB_D_MAPPING_SIGNED_NEGATE 0x000000e0
-#define NV10TCL_RC_IN_RGB_C_INPUT_SHIFT 8
-#define NV10TCL_RC_IN_RGB_C_INPUT_MASK 0x00000f00
-#define NV10TCL_RC_IN_RGB_C_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_IN_RGB_C_INPUT_CONSTANT_COLOR0 0x00000100
-#define NV10TCL_RC_IN_RGB_C_INPUT_CONSTANT_COLOR1 0x00000200
-#define NV10TCL_RC_IN_RGB_C_INPUT_FOG 0x00000300
-#define NV10TCL_RC_IN_RGB_C_INPUT_PRIMARY_COLOR 0x00000400
-#define NV10TCL_RC_IN_RGB_C_INPUT_SECONDARY_COLOR 0x00000500
-#define NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE0 0x00000800
-#define NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE1 0x00000900
-#define NV10TCL_RC_IN_RGB_C_INPUT_SPARE0 0x00000c00
-#define NV10TCL_RC_IN_RGB_C_INPUT_SPARE1 0x00000d00
-#define NV10TCL_RC_IN_RGB_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV10TCL_RC_IN_RGB_C_INPUT_E_TIMES_F 0x00000f00
-#define NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE2 0x00000a00
-#define NV10TCL_RC_IN_RGB_C_INPUT_TEXTURE3 0x00000b00
-#define NV10TCL_RC_IN_RGB_C_COMPONENT_USAGE (1 << 12)
-#define NV10TCL_RC_IN_RGB_C_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_IN_RGB_C_COMPONENT_USAGE_ALPHA 0x00001000
-#define NV10TCL_RC_IN_RGB_C_MAPPING_SHIFT 13
-#define NV10TCL_RC_IN_RGB_C_MAPPING_MASK 0x0000e000
-#define NV10TCL_RC_IN_RGB_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_IN_RGB_C_MAPPING_UNSIGNED_INVERT 0x00002000
-#define NV10TCL_RC_IN_RGB_C_MAPPING_EXPAND_NORMAL 0x00004000
-#define NV10TCL_RC_IN_RGB_C_MAPPING_EXPAND_NEGATE 0x00006000
-#define NV10TCL_RC_IN_RGB_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
-#define NV10TCL_RC_IN_RGB_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
-#define NV10TCL_RC_IN_RGB_C_MAPPING_SIGNED_IDENTITY 0x0000c000
-#define NV10TCL_RC_IN_RGB_C_MAPPING_SIGNED_NEGATE 0x0000e000
-#define NV10TCL_RC_IN_RGB_B_INPUT_SHIFT 16
-#define NV10TCL_RC_IN_RGB_B_INPUT_MASK 0x000f0000
-#define NV10TCL_RC_IN_RGB_B_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_IN_RGB_B_INPUT_CONSTANT_COLOR0 0x00010000
-#define NV10TCL_RC_IN_RGB_B_INPUT_CONSTANT_COLOR1 0x00020000
-#define NV10TCL_RC_IN_RGB_B_INPUT_FOG 0x00030000
-#define NV10TCL_RC_IN_RGB_B_INPUT_PRIMARY_COLOR 0x00040000
-#define NV10TCL_RC_IN_RGB_B_INPUT_SECONDARY_COLOR 0x00050000
-#define NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE0 0x00080000
-#define NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE1 0x00090000
-#define NV10TCL_RC_IN_RGB_B_INPUT_SPARE0 0x000c0000
-#define NV10TCL_RC_IN_RGB_B_INPUT_SPARE1 0x000d0000
-#define NV10TCL_RC_IN_RGB_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
-#define NV10TCL_RC_IN_RGB_B_INPUT_E_TIMES_F 0x000f0000
-#define NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE2 0x000a0000
-#define NV10TCL_RC_IN_RGB_B_INPUT_TEXTURE3 0x000b0000
-#define NV10TCL_RC_IN_RGB_B_COMPONENT_USAGE (1 << 20)
-#define NV10TCL_RC_IN_RGB_B_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_IN_RGB_B_COMPONENT_USAGE_ALPHA 0x00100000
-#define NV10TCL_RC_IN_RGB_B_MAPPING_SHIFT 21
-#define NV10TCL_RC_IN_RGB_B_MAPPING_MASK 0x00e00000
-#define NV10TCL_RC_IN_RGB_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_IN_RGB_B_MAPPING_UNSIGNED_INVERT 0x00200000
-#define NV10TCL_RC_IN_RGB_B_MAPPING_EXPAND_NORMAL 0x00400000
-#define NV10TCL_RC_IN_RGB_B_MAPPING_EXPAND_NEGATE 0x00600000
-#define NV10TCL_RC_IN_RGB_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
-#define NV10TCL_RC_IN_RGB_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
-#define NV10TCL_RC_IN_RGB_B_MAPPING_SIGNED_IDENTITY 0x00c00000
-#define NV10TCL_RC_IN_RGB_B_MAPPING_SIGNED_NEGATE 0x00e00000
-#define NV10TCL_RC_IN_RGB_A_INPUT_SHIFT 24
-#define NV10TCL_RC_IN_RGB_A_INPUT_MASK 0x0f000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_CONSTANT_COLOR0 0x01000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_CONSTANT_COLOR1 0x02000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_FOG 0x03000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_PRIMARY_COLOR 0x04000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_SECONDARY_COLOR 0x05000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE0 0x08000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE1 0x09000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_SPARE0 0x0c000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_SPARE1 0x0d000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_E_TIMES_F 0x0f000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE2 0x0a000000
-#define NV10TCL_RC_IN_RGB_A_INPUT_TEXTURE3 0x0b000000
-#define NV10TCL_RC_IN_RGB_A_COMPONENT_USAGE (1 << 28)
-#define NV10TCL_RC_IN_RGB_A_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_IN_RGB_A_COMPONENT_USAGE_ALPHA 0x10000000
-#define NV10TCL_RC_IN_RGB_A_MAPPING_SHIFT 29
-#define NV10TCL_RC_IN_RGB_A_MAPPING_MASK 0xe0000000
-#define NV10TCL_RC_IN_RGB_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_IN_RGB_A_MAPPING_UNSIGNED_INVERT 0x20000000
-#define NV10TCL_RC_IN_RGB_A_MAPPING_EXPAND_NORMAL 0x40000000
-#define NV10TCL_RC_IN_RGB_A_MAPPING_EXPAND_NEGATE 0x60000000
-#define NV10TCL_RC_IN_RGB_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
-#define NV10TCL_RC_IN_RGB_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
-#define NV10TCL_RC_IN_RGB_A_MAPPING_SIGNED_IDENTITY 0xc0000000
-#define NV10TCL_RC_IN_RGB_A_MAPPING_SIGNED_NEGATE 0xe0000000
-#define NV10TCL_RC_COLOR(x) (0x00000270+((x)*4))
-#define NV10TCL_RC_COLOR__SIZE 0x00000002
-#define NV10TCL_RC_COLOR_B_SHIFT 0
-#define NV10TCL_RC_COLOR_B_MASK 0x000000ff
-#define NV10TCL_RC_COLOR_G_SHIFT 8
-#define NV10TCL_RC_COLOR_G_MASK 0x0000ff00
-#define NV10TCL_RC_COLOR_R_SHIFT 16
-#define NV10TCL_RC_COLOR_R_MASK 0x00ff0000
-#define NV10TCL_RC_COLOR_A_SHIFT 24
-#define NV10TCL_RC_COLOR_A_MASK 0xff000000
-#define NV10TCL_RC_OUT_ALPHA(x) (0x00000278+((x)*4))
-#define NV10TCL_RC_OUT_ALPHA__SIZE 0x00000002
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SHIFT 0
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_MASK 0x0000000f
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_ZERO 0x00000000
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0 0x00000001
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1 0x00000002
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_FOG 0x00000003
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR 0x00000004
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR 0x00000005
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0 0x00000008
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1 0x00000009
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0 0x0000000c
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE1 0x0000000d
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F 0x0000000f
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2 0x0000000a
-#define NV10TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3 0x0000000b
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SHIFT 4
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_MASK 0x000000f0
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_ZERO 0x00000000
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0 0x00000010
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1 0x00000020
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_FOG 0x00000030
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR 0x00000040
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR 0x00000050
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0 0x00000080
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1 0x00000090
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0 0x000000c0
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE1 0x000000d0
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F 0x000000f0
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2 0x000000a0
-#define NV10TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3 0x000000b0
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SHIFT 8
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_MASK 0x00000f00
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_ZERO 0x00000000
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_FOG 0x00000300
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR 0x00000400
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR 0x00000500
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0 0x00000800
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1 0x00000900
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0 0x00000c00
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1 0x00000d00
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F 0x00000f00
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2 0x00000a00
-#define NV10TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3 0x00000b00
-#define NV10TCL_RC_OUT_ALPHA_CD_DOT_PRODUCT (1 << 12)
-#define NV10TCL_RC_OUT_ALPHA_AB_DOT_PRODUCT (1 << 13)
-#define NV10TCL_RC_OUT_ALPHA_MUX_SUM (1 << 14)
-#define NV10TCL_RC_OUT_ALPHA_BIAS (1 << 15)
-#define NV10TCL_RC_OUT_ALPHA_BIAS_NONE 0x00000000
-#define NV10TCL_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000
-#define NV10TCL_RC_OUT_ALPHA_SCALE_SHIFT 16
-#define NV10TCL_RC_OUT_ALPHA_SCALE_MASK 0x00030000
-#define NV10TCL_RC_OUT_ALPHA_SCALE_NONE 0x00000000
-#define NV10TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO 0x00010000
-#define NV10TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR 0x00020000
-#define NV10TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF 0x00030000
-#define NV10TCL_RC_OUT_RGB(x) (0x00000280+((x)*4))
-#define NV10TCL_RC_OUT_RGB__SIZE 0x00000002
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_SHIFT 0
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_MASK 0x0000000f
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_ZERO 0x00000000
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR0 0x00000001
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR1 0x00000002
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_FOG 0x00000003
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_PRIMARY_COLOR 0x00000004
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_SECONDARY_COLOR 0x00000005
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE0 0x00000008
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE1 0x00000009
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_SPARE0 0x0000000c
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_SPARE1 0x0000000d
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_E_TIMES_F 0x0000000f
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE2 0x0000000a
-#define NV10TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE3 0x0000000b
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_SHIFT 4
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_MASK 0x000000f0
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_ZERO 0x00000000
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR0 0x00000010
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR1 0x00000020
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_FOG 0x00000030
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_PRIMARY_COLOR 0x00000040
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_SECONDARY_COLOR 0x00000050
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE0 0x00000080
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE1 0x00000090
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0 0x000000c0
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE1 0x000000d0
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_E_TIMES_F 0x000000f0
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE2 0x000000a0
-#define NV10TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE3 0x000000b0
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SHIFT 8
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_MASK 0x00000f00
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_ZERO 0x00000000
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_FOG 0x00000300
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_PRIMARY_COLOR 0x00000400
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SECONDARY_COLOR 0x00000500
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE0 0x00000800
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE1 0x00000900
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0 0x00000c00
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE1 0x00000d00
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_E_TIMES_F 0x00000f00
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE2 0x00000a00
-#define NV10TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE3 0x00000b00
-#define NV10TCL_RC_OUT_RGB_CD_DOT_PRODUCT (1 << 12)
-#define NV10TCL_RC_OUT_RGB_AB_DOT_PRODUCT (1 << 13)
-#define NV10TCL_RC_OUT_RGB_MUX_SUM (1 << 14)
-#define NV10TCL_RC_OUT_RGB_BIAS (1 << 15)
-#define NV10TCL_RC_OUT_RGB_BIAS_NONE 0x00000000
-#define NV10TCL_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000
-#define NV10TCL_RC_OUT_RGB_SCALE_SHIFT 16
-#define NV10TCL_RC_OUT_RGB_SCALE_MASK 0x00030000
-#define NV10TCL_RC_OUT_RGB_SCALE_NONE 0x00000000
-#define NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_TWO 0x00010000
-#define NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_FOUR 0x00020000
-#define NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_ONE_HALF 0x00030000
-#define NV10TCL_RC_OUT_RGB_OPERATION_SHIFT 27
-#define NV10TCL_RC_OUT_RGB_OPERATION_MASK 0x38000000
-#define NV10TCL_RC_FINAL0 0x00000288
-#define NV10TCL_RC_FINAL0_D_INPUT_SHIFT 0
-#define NV10TCL_RC_FINAL0_D_INPUT_MASK 0x0000000f
-#define NV10TCL_RC_FINAL0_D_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR0 0x00000001
-#define NV10TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR1 0x00000002
-#define NV10TCL_RC_FINAL0_D_INPUT_FOG 0x00000003
-#define NV10TCL_RC_FINAL0_D_INPUT_PRIMARY_COLOR 0x00000004
-#define NV10TCL_RC_FINAL0_D_INPUT_SECONDARY_COLOR 0x00000005
-#define NV10TCL_RC_FINAL0_D_INPUT_TEXTURE0 0x00000008
-#define NV10TCL_RC_FINAL0_D_INPUT_TEXTURE1 0x00000009
-#define NV10TCL_RC_FINAL0_D_INPUT_SPARE0 0x0000000c
-#define NV10TCL_RC_FINAL0_D_INPUT_SPARE1 0x0000000d
-#define NV10TCL_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV10TCL_RC_FINAL0_D_INPUT_E_TIMES_F 0x0000000f
-#define NV10TCL_RC_FINAL0_D_INPUT_TEXTURE2 0x0000000a
-#define NV10TCL_RC_FINAL0_D_INPUT_TEXTURE3 0x0000000b
-#define NV10TCL_RC_FINAL0_D_COMPONENT_USAGE (1 << 4)
-#define NV10TCL_RC_FINAL0_D_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_FINAL0_D_COMPONENT_USAGE_ALPHA 0x00000010
-#define NV10TCL_RC_FINAL0_D_MAPPING_SHIFT 5
-#define NV10TCL_RC_FINAL0_D_MAPPING_MASK 0x000000e0
-#define NV10TCL_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT 0x00000020
-#define NV10TCL_RC_FINAL0_D_MAPPING_EXPAND_NORMAL 0x00000040
-#define NV10TCL_RC_FINAL0_D_MAPPING_EXPAND_NEGATE 0x00000060
-#define NV10TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
-#define NV10TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
-#define NV10TCL_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY 0x000000c0
-#define NV10TCL_RC_FINAL0_D_MAPPING_SIGNED_NEGATE 0x000000e0
-#define NV10TCL_RC_FINAL0_C_INPUT_SHIFT 8
-#define NV10TCL_RC_FINAL0_C_INPUT_MASK 0x00000f00
-#define NV10TCL_RC_FINAL0_C_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR0 0x00000100
-#define NV10TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR1 0x00000200
-#define NV10TCL_RC_FINAL0_C_INPUT_FOG 0x00000300
-#define NV10TCL_RC_FINAL0_C_INPUT_PRIMARY_COLOR 0x00000400
-#define NV10TCL_RC_FINAL0_C_INPUT_SECONDARY_COLOR 0x00000500
-#define NV10TCL_RC_FINAL0_C_INPUT_TEXTURE0 0x00000800
-#define NV10TCL_RC_FINAL0_C_INPUT_TEXTURE1 0x00000900
-#define NV10TCL_RC_FINAL0_C_INPUT_SPARE0 0x00000c00
-#define NV10TCL_RC_FINAL0_C_INPUT_SPARE1 0x00000d00
-#define NV10TCL_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV10TCL_RC_FINAL0_C_INPUT_E_TIMES_F 0x00000f00
-#define NV10TCL_RC_FINAL0_C_INPUT_TEXTURE2 0x00000a00
-#define NV10TCL_RC_FINAL0_C_INPUT_TEXTURE3 0x00000b00
-#define NV10TCL_RC_FINAL0_C_COMPONENT_USAGE (1 << 12)
-#define NV10TCL_RC_FINAL0_C_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_FINAL0_C_COMPONENT_USAGE_ALPHA 0x00001000
-#define NV10TCL_RC_FINAL0_C_MAPPING_SHIFT 13
-#define NV10TCL_RC_FINAL0_C_MAPPING_MASK 0x0000e000
-#define NV10TCL_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT 0x00002000
-#define NV10TCL_RC_FINAL0_C_MAPPING_EXPAND_NORMAL 0x00004000
-#define NV10TCL_RC_FINAL0_C_MAPPING_EXPAND_NEGATE 0x00006000
-#define NV10TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
-#define NV10TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
-#define NV10TCL_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY 0x0000c000
-#define NV10TCL_RC_FINAL0_C_MAPPING_SIGNED_NEGATE 0x0000e000
-#define NV10TCL_RC_FINAL0_B_INPUT_SHIFT 16
-#define NV10TCL_RC_FINAL0_B_INPUT_MASK 0x000f0000
-#define NV10TCL_RC_FINAL0_B_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR0 0x00010000
-#define NV10TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR1 0x00020000
-#define NV10TCL_RC_FINAL0_B_INPUT_FOG 0x00030000
-#define NV10TCL_RC_FINAL0_B_INPUT_PRIMARY_COLOR 0x00040000
-#define NV10TCL_RC_FINAL0_B_INPUT_SECONDARY_COLOR 0x00050000
-#define NV10TCL_RC_FINAL0_B_INPUT_TEXTURE0 0x00080000
-#define NV10TCL_RC_FINAL0_B_INPUT_TEXTURE1 0x00090000
-#define NV10TCL_RC_FINAL0_B_INPUT_SPARE0 0x000c0000
-#define NV10TCL_RC_FINAL0_B_INPUT_SPARE1 0x000d0000
-#define NV10TCL_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
-#define NV10TCL_RC_FINAL0_B_INPUT_E_TIMES_F 0x000f0000
-#define NV10TCL_RC_FINAL0_B_INPUT_TEXTURE2 0x000a0000
-#define NV10TCL_RC_FINAL0_B_INPUT_TEXTURE3 0x000b0000
-#define NV10TCL_RC_FINAL0_B_COMPONENT_USAGE (1 << 20)
-#define NV10TCL_RC_FINAL0_B_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_FINAL0_B_COMPONENT_USAGE_ALPHA 0x00100000
-#define NV10TCL_RC_FINAL0_B_MAPPING_SHIFT 21
-#define NV10TCL_RC_FINAL0_B_MAPPING_MASK 0x00e00000
-#define NV10TCL_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT 0x00200000
-#define NV10TCL_RC_FINAL0_B_MAPPING_EXPAND_NORMAL 0x00400000
-#define NV10TCL_RC_FINAL0_B_MAPPING_EXPAND_NEGATE 0x00600000
-#define NV10TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
-#define NV10TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
-#define NV10TCL_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY 0x00c00000
-#define NV10TCL_RC_FINAL0_B_MAPPING_SIGNED_NEGATE 0x00e00000
-#define NV10TCL_RC_FINAL0_A_INPUT_SHIFT 24
-#define NV10TCL_RC_FINAL0_A_INPUT_MASK 0x0f000000
-#define NV10TCL_RC_FINAL0_A_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR0 0x01000000
-#define NV10TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR1 0x02000000
-#define NV10TCL_RC_FINAL0_A_INPUT_FOG 0x03000000
-#define NV10TCL_RC_FINAL0_A_INPUT_PRIMARY_COLOR 0x04000000
-#define NV10TCL_RC_FINAL0_A_INPUT_SECONDARY_COLOR 0x05000000
-#define NV10TCL_RC_FINAL0_A_INPUT_TEXTURE0 0x08000000
-#define NV10TCL_RC_FINAL0_A_INPUT_TEXTURE1 0x09000000
-#define NV10TCL_RC_FINAL0_A_INPUT_SPARE0 0x0c000000
-#define NV10TCL_RC_FINAL0_A_INPUT_SPARE1 0x0d000000
-#define NV10TCL_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
-#define NV10TCL_RC_FINAL0_A_INPUT_E_TIMES_F 0x0f000000
-#define NV10TCL_RC_FINAL0_A_INPUT_TEXTURE2 0x0a000000
-#define NV10TCL_RC_FINAL0_A_INPUT_TEXTURE3 0x0b000000
-#define NV10TCL_RC_FINAL0_A_COMPONENT_USAGE (1 << 28)
-#define NV10TCL_RC_FINAL0_A_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_FINAL0_A_COMPONENT_USAGE_ALPHA 0x10000000
-#define NV10TCL_RC_FINAL0_A_MAPPING_SHIFT 29
-#define NV10TCL_RC_FINAL0_A_MAPPING_MASK 0xe0000000
-#define NV10TCL_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT 0x20000000
-#define NV10TCL_RC_FINAL0_A_MAPPING_EXPAND_NORMAL 0x40000000
-#define NV10TCL_RC_FINAL0_A_MAPPING_EXPAND_NEGATE 0x60000000
-#define NV10TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
-#define NV10TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
-#define NV10TCL_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY 0xc0000000
-#define NV10TCL_RC_FINAL0_A_MAPPING_SIGNED_NEGATE 0xe0000000
-#define NV10TCL_RC_FINAL1 0x0000028c
-#define NV10TCL_RC_FINAL1_COLOR_SUM_CLAMP (1 << 7)
-#define NV10TCL_RC_FINAL1_G_INPUT_SHIFT 8
-#define NV10TCL_RC_FINAL1_G_INPUT_MASK 0x00000f00
-#define NV10TCL_RC_FINAL1_G_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR0 0x00000100
-#define NV10TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR1 0x00000200
-#define NV10TCL_RC_FINAL1_G_INPUT_FOG 0x00000300
-#define NV10TCL_RC_FINAL1_G_INPUT_PRIMARY_COLOR 0x00000400
-#define NV10TCL_RC_FINAL1_G_INPUT_SECONDARY_COLOR 0x00000500
-#define NV10TCL_RC_FINAL1_G_INPUT_TEXTURE0 0x00000800
-#define NV10TCL_RC_FINAL1_G_INPUT_TEXTURE1 0x00000900
-#define NV10TCL_RC_FINAL1_G_INPUT_SPARE0 0x00000c00
-#define NV10TCL_RC_FINAL1_G_INPUT_SPARE1 0x00000d00
-#define NV10TCL_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV10TCL_RC_FINAL1_G_INPUT_E_TIMES_F 0x00000f00
-#define NV10TCL_RC_FINAL1_G_INPUT_TEXTURE2 0x00000a00
-#define NV10TCL_RC_FINAL1_G_INPUT_TEXTURE3 0x00000b00
-#define NV10TCL_RC_FINAL1_G_COMPONENT_USAGE (1 << 12)
-#define NV10TCL_RC_FINAL1_G_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_FINAL1_G_COMPONENT_USAGE_ALPHA 0x00001000
-#define NV10TCL_RC_FINAL1_G_MAPPING_SHIFT 13
-#define NV10TCL_RC_FINAL1_G_MAPPING_MASK 0x0000e000
-#define NV10TCL_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT 0x00002000
-#define NV10TCL_RC_FINAL1_G_MAPPING_EXPAND_NORMAL 0x00004000
-#define NV10TCL_RC_FINAL1_G_MAPPING_EXPAND_NEGATE 0x00006000
-#define NV10TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL 0x00008000
-#define NV10TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE 0x0000a000
-#define NV10TCL_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY 0x0000c000
-#define NV10TCL_RC_FINAL1_G_MAPPING_SIGNED_NEGATE 0x0000e000
-#define NV10TCL_RC_FINAL1_F_INPUT_SHIFT 16
-#define NV10TCL_RC_FINAL1_F_INPUT_MASK 0x000f0000
-#define NV10TCL_RC_FINAL1_F_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR0 0x00010000
-#define NV10TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR1 0x00020000
-#define NV10TCL_RC_FINAL1_F_INPUT_FOG 0x00030000
-#define NV10TCL_RC_FINAL1_F_INPUT_PRIMARY_COLOR 0x00040000
-#define NV10TCL_RC_FINAL1_F_INPUT_SECONDARY_COLOR 0x00050000
-#define NV10TCL_RC_FINAL1_F_INPUT_TEXTURE0 0x00080000
-#define NV10TCL_RC_FINAL1_F_INPUT_TEXTURE1 0x00090000
-#define NV10TCL_RC_FINAL1_F_INPUT_SPARE0 0x000c0000
-#define NV10TCL_RC_FINAL1_F_INPUT_SPARE1 0x000d0000
-#define NV10TCL_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
-#define NV10TCL_RC_FINAL1_F_INPUT_E_TIMES_F 0x000f0000
-#define NV10TCL_RC_FINAL1_F_INPUT_TEXTURE2 0x000a0000
-#define NV10TCL_RC_FINAL1_F_INPUT_TEXTURE3 0x000b0000
-#define NV10TCL_RC_FINAL1_F_COMPONENT_USAGE (1 << 20)
-#define NV10TCL_RC_FINAL1_F_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_FINAL1_F_COMPONENT_USAGE_ALPHA 0x00100000
-#define NV10TCL_RC_FINAL1_F_MAPPING_SHIFT 21
-#define NV10TCL_RC_FINAL1_F_MAPPING_MASK 0x00e00000
-#define NV10TCL_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT 0x00200000
-#define NV10TCL_RC_FINAL1_F_MAPPING_EXPAND_NORMAL 0x00400000
-#define NV10TCL_RC_FINAL1_F_MAPPING_EXPAND_NEGATE 0x00600000
-#define NV10TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL 0x00800000
-#define NV10TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE 0x00a00000
-#define NV10TCL_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY 0x00c00000
-#define NV10TCL_RC_FINAL1_F_MAPPING_SIGNED_NEGATE 0x00e00000
-#define NV10TCL_RC_FINAL1_E_INPUT_SHIFT 24
-#define NV10TCL_RC_FINAL1_E_INPUT_MASK 0x0f000000
-#define NV10TCL_RC_FINAL1_E_INPUT_ZERO 0x00000000
-#define NV10TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR0 0x01000000
-#define NV10TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR1 0x02000000
-#define NV10TCL_RC_FINAL1_E_INPUT_FOG 0x03000000
-#define NV10TCL_RC_FINAL1_E_INPUT_PRIMARY_COLOR 0x04000000
-#define NV10TCL_RC_FINAL1_E_INPUT_SECONDARY_COLOR 0x05000000
-#define NV10TCL_RC_FINAL1_E_INPUT_TEXTURE0 0x08000000
-#define NV10TCL_RC_FINAL1_E_INPUT_TEXTURE1 0x09000000
-#define NV10TCL_RC_FINAL1_E_INPUT_SPARE0 0x0c000000
-#define NV10TCL_RC_FINAL1_E_INPUT_SPARE1 0x0d000000
-#define NV10TCL_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
-#define NV10TCL_RC_FINAL1_E_INPUT_E_TIMES_F 0x0f000000
-#define NV10TCL_RC_FINAL1_E_INPUT_TEXTURE2 0x0a000000
-#define NV10TCL_RC_FINAL1_E_INPUT_TEXTURE3 0x0b000000
-#define NV10TCL_RC_FINAL1_E_COMPONENT_USAGE (1 << 28)
-#define NV10TCL_RC_FINAL1_E_COMPONENT_USAGE_RGB 0x00000000
-#define NV10TCL_RC_FINAL1_E_COMPONENT_USAGE_ALPHA 0x10000000
-#define NV10TCL_RC_FINAL1_E_MAPPING_SHIFT 29
-#define NV10TCL_RC_FINAL1_E_MAPPING_MASK 0xe0000000
-#define NV10TCL_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV10TCL_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT 0x20000000
-#define NV10TCL_RC_FINAL1_E_MAPPING_EXPAND_NORMAL 0x40000000
-#define NV10TCL_RC_FINAL1_E_MAPPING_EXPAND_NEGATE 0x60000000
-#define NV10TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL 0x80000000
-#define NV10TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE 0xa0000000
-#define NV10TCL_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY 0xc0000000
-#define NV10TCL_RC_FINAL1_E_MAPPING_SIGNED_NEGATE 0xe0000000
-#define NV10TCL_LIGHT_MODEL 0x00000294
-#define NV10TCL_LIGHT_MODEL_VERTEX_SPECULAR (1 << 0)
-#define NV10TCL_LIGHT_MODEL_SEPARATE_SPECULAR (1 << 1)
-#define NV10TCL_LIGHT_MODEL_LOCAL_VIEWER (1 << 16)
-#define NV10TCL_COLOR_MATERIAL 0x00000298
-#define NV10TCL_COLOR_MATERIAL_EMISSION (1 << 0)
-#define NV10TCL_COLOR_MATERIAL_AMBIENT (1 << 1)
-#define NV10TCL_COLOR_MATERIAL_DIFFUSE (1 << 2)
-#define NV10TCL_COLOR_MATERIAL_SPECULAR (1 << 3)
-#define NV10TCL_FOG_MODE 0x0000029c
-#define NV10TCL_FOG_MODE_LINEAR 0x00002601
-#define NV10TCL_FOG_MODE_EXP 0x00000800
-#define NV10TCL_FOG_MODE_EXP_ABS 0x00000802
-#define NV10TCL_FOG_MODE_EXP2 0x00000803
-#define NV10TCL_FOG_COORD 0x000002a0
-#define NV10TCL_FOG_COORD_FOG 0x00000000
-#define NV10TCL_FOG_COORD_DIST_RADIAL 0x00000001
-#define NV10TCL_FOG_COORD_DIST_ORTHOGONAL 0x00000002
-#define NV10TCL_FOG_COORD_DIST_ORTHOGONAL_ABS 0x00000003
-#define NV10TCL_FOG_ENABLE 0x000002a4
-#define NV10TCL_FOG_COLOR 0x000002a8
-#define NV10TCL_FOG_COLOR_R_SHIFT 0
-#define NV10TCL_FOG_COLOR_R_MASK 0x000000ff
-#define NV10TCL_FOG_COLOR_G_SHIFT 8
-#define NV10TCL_FOG_COLOR_G_MASK 0x0000ff00
-#define NV10TCL_FOG_COLOR_B_SHIFT 16
-#define NV10TCL_FOG_COLOR_B_MASK 0x00ff0000
-#define NV10TCL_FOG_COLOR_A_SHIFT 24
-#define NV10TCL_FOG_COLOR_A_MASK 0xff000000
-#define NV10TCL_VIEWPORT_CLIP_MODE 0x000002b4
-#define NV10TCL_VIEWPORT_CLIP_HORIZ(x) (0x000002c0+((x)*4))
-#define NV10TCL_VIEWPORT_CLIP_HORIZ__SIZE 0x00000008
-#define NV10TCL_VIEWPORT_CLIP_HORIZ_CLIP_L_SHIFT 0
-#define NV10TCL_VIEWPORT_CLIP_HORIZ_CLIP_L_MASK 0x000007ff
-#define NV10TCL_VIEWPORT_CLIP_HORIZ_CLIP_LEFT_ENABLE (1 << 11)
-#define NV10TCL_VIEWPORT_CLIP_HORIZ_CLIP_R_SHIFT 16
-#define NV10TCL_VIEWPORT_CLIP_HORIZ_CLIP_R_MASK 0x07ff0000
-#define NV10TCL_VIEWPORT_CLIP_HORIZ_CLIP_RIGHT_ENABLE (1 << 27)
-#define NV10TCL_VIEWPORT_CLIP_VERT(x) (0x000002e0+((x)*4))
-#define NV10TCL_VIEWPORT_CLIP_VERT__SIZE 0x00000008
-#define NV10TCL_VIEWPORT_CLIP_VERT_CLIP_T_SHIFT 0
-#define NV10TCL_VIEWPORT_CLIP_VERT_CLIP_T_MASK 0x000007ff
-#define NV10TCL_VIEWPORT_CLIP_VERT_CLIP_TOP_ENABLE (1 << 11)
-#define NV10TCL_VIEWPORT_CLIP_VERT_CLIP_B_SHIFT 16
-#define NV10TCL_VIEWPORT_CLIP_VERT_CLIP_B_MASK 0x07ff0000
-#define NV10TCL_VIEWPORT_CLIP_VERT_CLIP_BOTTOM_ENABLE (1 << 27)
-#define NV10TCL_ALPHA_FUNC_ENABLE 0x00000300
-#define NV10TCL_BLEND_FUNC_ENABLE 0x00000304
-#define NV10TCL_CULL_FACE_ENABLE 0x00000308
-#define NV10TCL_DEPTH_TEST_ENABLE 0x0000030c
-#define NV10TCL_DITHER_ENABLE 0x00000310
-#define NV10TCL_LIGHTING_ENABLE 0x00000314
-#define NV10TCL_POINT_PARAMETERS_ENABLE 0x00000318
-#define NV10TCL_POINT_SMOOTH_ENABLE 0x0000031c
-#define NV10TCL_LINE_SMOOTH_ENABLE 0x00000320
-#define NV10TCL_POLYGON_SMOOTH_ENABLE 0x00000324
-#define NV10TCL_VERTEX_WEIGHT_ENABLE 0x00000328
-#define NV10TCL_STENCIL_ENABLE 0x0000032c
-#define NV10TCL_POLYGON_OFFSET_POINT_ENABLE 0x00000330
-#define NV10TCL_POLYGON_OFFSET_LINE_ENABLE 0x00000334
-#define NV10TCL_POLYGON_OFFSET_FILL_ENABLE 0x00000338
-#define NV10TCL_ALPHA_FUNC_FUNC 0x0000033c
-#define NV10TCL_ALPHA_FUNC_FUNC_NEVER 0x00000200
-#define NV10TCL_ALPHA_FUNC_FUNC_LESS 0x00000201
-#define NV10TCL_ALPHA_FUNC_FUNC_EQUAL 0x00000202
-#define NV10TCL_ALPHA_FUNC_FUNC_LEQUAL 0x00000203
-#define NV10TCL_ALPHA_FUNC_FUNC_GREATER 0x00000204
-#define NV10TCL_ALPHA_FUNC_FUNC_NOTEQUAL 0x00000205
-#define NV10TCL_ALPHA_FUNC_FUNC_GEQUAL 0x00000206
-#define NV10TCL_ALPHA_FUNC_FUNC_ALWAYS 0x00000207
-#define NV10TCL_ALPHA_FUNC_REF 0x00000340
-#define NV10TCL_BLEND_FUNC_SRC 0x00000344
-#define NV10TCL_BLEND_FUNC_SRC_ZERO 0x00000000
-#define NV10TCL_BLEND_FUNC_SRC_ONE 0x00000001
-#define NV10TCL_BLEND_FUNC_SRC_SRC_COLOR 0x00000300
-#define NV10TCL_BLEND_FUNC_SRC_ONE_MINUS_SRC_COLOR 0x00000301
-#define NV10TCL_BLEND_FUNC_SRC_SRC_ALPHA 0x00000302
-#define NV10TCL_BLEND_FUNC_SRC_ONE_MINUS_SRC_ALPHA 0x00000303
-#define NV10TCL_BLEND_FUNC_SRC_DST_ALPHA 0x00000304
-#define NV10TCL_BLEND_FUNC_SRC_ONE_MINUS_DST_ALPHA 0x00000305
-#define NV10TCL_BLEND_FUNC_SRC_DST_COLOR 0x00000306
-#define NV10TCL_BLEND_FUNC_SRC_ONE_MINUS_DST_COLOR 0x00000307
-#define NV10TCL_BLEND_FUNC_SRC_SRC_ALPHA_SATURATE 0x00000308
-#define NV10TCL_BLEND_FUNC_SRC_CONSTANT_COLOR 0x00008001
-#define NV10TCL_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_COLOR 0x00008002
-#define NV10TCL_BLEND_FUNC_SRC_CONSTANT_ALPHA 0x00008003
-#define NV10TCL_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_ALPHA 0x00008004
-#define NV10TCL_BLEND_FUNC_DST 0x00000348
-#define NV10TCL_BLEND_FUNC_DST_ZERO 0x00000000
-#define NV10TCL_BLEND_FUNC_DST_ONE 0x00000001
-#define NV10TCL_BLEND_FUNC_DST_SRC_COLOR 0x00000300
-#define NV10TCL_BLEND_FUNC_DST_ONE_MINUS_SRC_COLOR 0x00000301
-#define NV10TCL_BLEND_FUNC_DST_SRC_ALPHA 0x00000302
-#define NV10TCL_BLEND_FUNC_DST_ONE_MINUS_SRC_ALPHA 0x00000303
-#define NV10TCL_BLEND_FUNC_DST_DST_ALPHA 0x00000304
-#define NV10TCL_BLEND_FUNC_DST_ONE_MINUS_DST_ALPHA 0x00000305
-#define NV10TCL_BLEND_FUNC_DST_DST_COLOR 0x00000306
-#define NV10TCL_BLEND_FUNC_DST_ONE_MINUS_DST_COLOR 0x00000307
-#define NV10TCL_BLEND_FUNC_DST_SRC_ALPHA_SATURATE 0x00000308
-#define NV10TCL_BLEND_FUNC_DST_CONSTANT_COLOR 0x00008001
-#define NV10TCL_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_COLOR 0x00008002
-#define NV10TCL_BLEND_FUNC_DST_CONSTANT_ALPHA 0x00008003
-#define NV10TCL_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_ALPHA 0x00008004
-#define NV10TCL_BLEND_COLOR 0x0000034c
-#define NV10TCL_BLEND_COLOR_B_SHIFT 0
-#define NV10TCL_BLEND_COLOR_B_MASK 0x000000ff
-#define NV10TCL_BLEND_COLOR_G_SHIFT 8
-#define NV10TCL_BLEND_COLOR_G_MASK 0x0000ff00
-#define NV10TCL_BLEND_COLOR_R_SHIFT 16
-#define NV10TCL_BLEND_COLOR_R_MASK 0x00ff0000
-#define NV10TCL_BLEND_COLOR_A_SHIFT 24
-#define NV10TCL_BLEND_COLOR_A_MASK 0xff000000
-#define NV10TCL_BLEND_EQUATION 0x00000350
-#define NV10TCL_BLEND_EQUATION_FUNC_ADD 0x00008006
-#define NV10TCL_BLEND_EQUATION_MIN 0x00008007
-#define NV10TCL_BLEND_EQUATION_MAX 0x00008008
-#define NV10TCL_BLEND_EQUATION_FUNC_SUBTRACT 0x0000800a
-#define NV10TCL_BLEND_EQUATION_FUNC_REVERSE_SUBTRACT 0x0000800b
-#define NV10TCL_DEPTH_FUNC 0x00000354
-#define NV10TCL_DEPTH_FUNC_NEVER 0x00000200
-#define NV10TCL_DEPTH_FUNC_LESS 0x00000201
-#define NV10TCL_DEPTH_FUNC_EQUAL 0x00000202
-#define NV10TCL_DEPTH_FUNC_LEQUAL 0x00000203
-#define NV10TCL_DEPTH_FUNC_GREATER 0x00000204
-#define NV10TCL_DEPTH_FUNC_NOTEQUAL 0x00000205
-#define NV10TCL_DEPTH_FUNC_GEQUAL 0x00000206
-#define NV10TCL_DEPTH_FUNC_ALWAYS 0x00000207
-#define NV10TCL_COLOR_MASK 0x00000358
-#define NV10TCL_COLOR_MASK_B (1 << 0)
-#define NV10TCL_COLOR_MASK_G (1 << 8)
-#define NV10TCL_COLOR_MASK_R (1 << 16)
-#define NV10TCL_COLOR_MASK_A (1 << 24)
-#define NV10TCL_DEPTH_WRITE_ENABLE 0x0000035c
-#define NV10TCL_STENCIL_MASK 0x00000360
-#define NV10TCL_STENCIL_FUNC_FUNC 0x00000364
-#define NV10TCL_STENCIL_FUNC_FUNC_NEVER 0x00000200
-#define NV10TCL_STENCIL_FUNC_FUNC_LESS 0x00000201
-#define NV10TCL_STENCIL_FUNC_FUNC_EQUAL 0x00000202
-#define NV10TCL_STENCIL_FUNC_FUNC_LEQUAL 0x00000203
-#define NV10TCL_STENCIL_FUNC_FUNC_GREATER 0x00000204
-#define NV10TCL_STENCIL_FUNC_FUNC_NOTEQUAL 0x00000205
-#define NV10TCL_STENCIL_FUNC_FUNC_GEQUAL 0x00000206
-#define NV10TCL_STENCIL_FUNC_FUNC_ALWAYS 0x00000207
-#define NV10TCL_STENCIL_FUNC_REF 0x00000368
-#define NV10TCL_STENCIL_FUNC_MASK 0x0000036c
-#define NV10TCL_STENCIL_OP_FAIL 0x00000370
-#define NV10TCL_STENCIL_OP_FAIL_ZERO 0x00000000
-#define NV10TCL_STENCIL_OP_FAIL_INVERT 0x0000150a
-#define NV10TCL_STENCIL_OP_FAIL_KEEP 0x00001e00
-#define NV10TCL_STENCIL_OP_FAIL_REPLACE 0x00001e01
-#define NV10TCL_STENCIL_OP_FAIL_INCR 0x00001e02
-#define NV10TCL_STENCIL_OP_FAIL_DECR 0x00001e03
-#define NV10TCL_STENCIL_OP_FAIL_INCR_WRAP 0x00008507
-#define NV10TCL_STENCIL_OP_FAIL_DECR_WRAP 0x00008508
-#define NV10TCL_STENCIL_OP_ZFAIL 0x00000374
-#define NV10TCL_STENCIL_OP_ZFAIL_ZERO 0x00000000
-#define NV10TCL_STENCIL_OP_ZFAIL_INVERT 0x0000150a
-#define NV10TCL_STENCIL_OP_ZFAIL_KEEP 0x00001e00
-#define NV10TCL_STENCIL_OP_ZFAIL_REPLACE 0x00001e01
-#define NV10TCL_STENCIL_OP_ZFAIL_INCR 0x00001e02
-#define NV10TCL_STENCIL_OP_ZFAIL_DECR 0x00001e03
-#define NV10TCL_STENCIL_OP_ZFAIL_INCR_WRAP 0x00008507
-#define NV10TCL_STENCIL_OP_ZFAIL_DECR_WRAP 0x00008508
-#define NV10TCL_STENCIL_OP_ZPASS 0x00000378
-#define NV10TCL_STENCIL_OP_ZPASS_ZERO 0x00000000
-#define NV10TCL_STENCIL_OP_ZPASS_INVERT 0x0000150a
-#define NV10TCL_STENCIL_OP_ZPASS_KEEP 0x00001e00
-#define NV10TCL_STENCIL_OP_ZPASS_REPLACE 0x00001e01
-#define NV10TCL_STENCIL_OP_ZPASS_INCR 0x00001e02
-#define NV10TCL_STENCIL_OP_ZPASS_DECR 0x00001e03
-#define NV10TCL_STENCIL_OP_ZPASS_INCR_WRAP 0x00008507
-#define NV10TCL_STENCIL_OP_ZPASS_DECR_WRAP 0x00008508
-#define NV10TCL_SHADE_MODEL 0x0000037c
-#define NV10TCL_SHADE_MODEL_FLAT 0x00001d00
-#define NV10TCL_SHADE_MODEL_SMOOTH 0x00001d01
-#define NV10TCL_LINE_WIDTH 0x00000380
-#define NV10TCL_POLYGON_OFFSET_FACTOR 0x00000384
-#define NV10TCL_POLYGON_OFFSET_UNITS 0x00000388
-#define NV10TCL_POLYGON_MODE_FRONT 0x0000038c
-#define NV10TCL_POLYGON_MODE_FRONT_POINT 0x00001b00
-#define NV10TCL_POLYGON_MODE_FRONT_LINE 0x00001b01
-#define NV10TCL_POLYGON_MODE_FRONT_FILL 0x00001b02
-#define NV10TCL_POLYGON_MODE_BACK 0x00000390
-#define NV10TCL_POLYGON_MODE_BACK_POINT 0x00001b00
-#define NV10TCL_POLYGON_MODE_BACK_LINE 0x00001b01
-#define NV10TCL_POLYGON_MODE_BACK_FILL 0x00001b02
-#define NV10TCL_DEPTH_RANGE_NEAR 0x00000394
-#define NV10TCL_DEPTH_RANGE_FAR 0x00000398
-#define NV10TCL_CULL_FACE 0x0000039c
-#define NV10TCL_CULL_FACE_FRONT 0x00000404
-#define NV10TCL_CULL_FACE_BACK 0x00000405
-#define NV10TCL_CULL_FACE_FRONT_AND_BACK 0x00000408
-#define NV10TCL_FRONT_FACE 0x000003a0
-#define NV10TCL_FRONT_FACE_CW 0x00000900
-#define NV10TCL_FRONT_FACE_CCW 0x00000901
-#define NV10TCL_NORMALIZE_ENABLE 0x000003a4
-#define NV10TCL_MATERIAL_FACTOR_R 0x000003a8
-#define NV10TCL_MATERIAL_FACTOR_G 0x000003ac
-#define NV10TCL_MATERIAL_FACTOR_B 0x000003b0
-#define NV10TCL_MATERIAL_FACTOR_A 0x000003b4
-#define NV10TCL_SEPARATE_SPECULAR_ENABLE 0x000003b8
-#define NV10TCL_ENABLED_LIGHTS 0x000003bc
-#define NV10TCL_ENABLED_LIGHTS_0_SHIFT 0
-#define NV10TCL_ENABLED_LIGHTS_0_MASK 0x00000003
-#define NV10TCL_ENABLED_LIGHTS_0_DISABLED 0x00000000
-#define NV10TCL_ENABLED_LIGHTS_0_NONPOSITIONAL 0x00000001
-#define NV10TCL_ENABLED_LIGHTS_0_POSITIONAL 0x00000002
-#define NV10TCL_ENABLED_LIGHTS_0_DIRECTIONAL 0x00000003
-#define NV10TCL_ENABLED_LIGHTS_1_SHIFT 2
-#define NV10TCL_ENABLED_LIGHTS_1_MASK 0x0000000c
-#define NV10TCL_ENABLED_LIGHTS_1_DISABLED 0x00000000
-#define NV10TCL_ENABLED_LIGHTS_1_NONPOSITIONAL 0x00000004
-#define NV10TCL_ENABLED_LIGHTS_1_POSITIONAL 0x00000008
-#define NV10TCL_ENABLED_LIGHTS_1_DIRECTIONAL 0x0000000c
-#define NV10TCL_ENABLED_LIGHTS_2_SHIFT 4
-#define NV10TCL_ENABLED_LIGHTS_2_MASK 0x00000030
-#define NV10TCL_ENABLED_LIGHTS_2_DISABLED 0x00000000
-#define NV10TCL_ENABLED_LIGHTS_2_NONPOSITIONAL 0x00000010
-#define NV10TCL_ENABLED_LIGHTS_2_POSITIONAL 0x00000020
-#define NV10TCL_ENABLED_LIGHTS_2_DIRECTIONAL 0x00000030
-#define NV10TCL_ENABLED_LIGHTS_3_SHIFT 6
-#define NV10TCL_ENABLED_LIGHTS_3_MASK 0x000000c0
-#define NV10TCL_ENABLED_LIGHTS_3_DISABLED 0x00000000
-#define NV10TCL_ENABLED_LIGHTS_3_NONPOSITIONAL 0x00000040
-#define NV10TCL_ENABLED_LIGHTS_3_POSITIONAL 0x00000080
-#define NV10TCL_ENABLED_LIGHTS_3_DIRECTIONAL 0x000000c0
-#define NV10TCL_ENABLED_LIGHTS_4_SHIFT 8
-#define NV10TCL_ENABLED_LIGHTS_4_MASK 0x00000300
-#define NV10TCL_ENABLED_LIGHTS_4_DISABLED 0x00000000
-#define NV10TCL_ENABLED_LIGHTS_4_NONPOSITIONAL 0x00000100
-#define NV10TCL_ENABLED_LIGHTS_4_POSITIONAL 0x00000200
-#define NV10TCL_ENABLED_LIGHTS_4_DIRECTIONAL 0x00000300
-#define NV10TCL_ENABLED_LIGHTS_5_SHIFT 10
-#define NV10TCL_ENABLED_LIGHTS_5_MASK 0x00000c00
-#define NV10TCL_ENABLED_LIGHTS_5_DISABLED 0x00000000
-#define NV10TCL_ENABLED_LIGHTS_5_NONPOSITIONAL 0x00000400
-#define NV10TCL_ENABLED_LIGHTS_5_POSITIONAL 0x00000800
-#define NV10TCL_ENABLED_LIGHTS_5_DIRECTIONAL 0x00000c00
-#define NV10TCL_ENABLED_LIGHTS_6_SHIFT 12
-#define NV10TCL_ENABLED_LIGHTS_6_MASK 0x00003000
-#define NV10TCL_ENABLED_LIGHTS_6_DISABLED 0x00000000
-#define NV10TCL_ENABLED_LIGHTS_6_NONPOSITIONAL 0x00001000
-#define NV10TCL_ENABLED_LIGHTS_6_POSITIONAL 0x00002000
-#define NV10TCL_ENABLED_LIGHTS_6_DIRECTIONAL 0x00003000
-#define NV10TCL_ENABLED_LIGHTS_7_SHIFT 14
-#define NV10TCL_ENABLED_LIGHTS_7_MASK 0x0000c000
-#define NV10TCL_ENABLED_LIGHTS_7_DISABLED 0x00000000
-#define NV10TCL_ENABLED_LIGHTS_7_NONPOSITIONAL 0x00004000
-#define NV10TCL_ENABLED_LIGHTS_7_POSITIONAL 0x00008000
-#define NV10TCL_ENABLED_LIGHTS_7_DIRECTIONAL 0x0000c000
-#define NV10TCL_TX_GEN_MODE_S(x) (0x000003c0+((x)*16))
-#define NV10TCL_TX_GEN_MODE_S__SIZE 0x00000002
-#define NV10TCL_TX_GEN_MODE_S_FALSE 0x00000000
-#define NV10TCL_TX_GEN_MODE_S_EYE_LINEAR 0x00002400
-#define NV10TCL_TX_GEN_MODE_S_OBJECT_LINEAR 0x00002401
-#define NV10TCL_TX_GEN_MODE_S_SPHERE_MAP 0x00002402
-#define NV10TCL_TX_GEN_MODE_S_NORMAL_MAP 0x00008511
-#define NV10TCL_TX_GEN_MODE_S_REFLECTION_MAP 0x00008512
-#define NV10TCL_TX_GEN_MODE_T(x) (0x000003c4+((x)*16))
-#define NV10TCL_TX_GEN_MODE_T__SIZE 0x00000002
-#define NV10TCL_TX_GEN_MODE_T_FALSE 0x00000000
-#define NV10TCL_TX_GEN_MODE_T_EYE_LINEAR 0x00002400
-#define NV10TCL_TX_GEN_MODE_T_OBJECT_LINEAR 0x00002401
-#define NV10TCL_TX_GEN_MODE_T_SPHERE_MAP 0x00002402
-#define NV10TCL_TX_GEN_MODE_T_NORMAL_MAP 0x00008511
-#define NV10TCL_TX_GEN_MODE_T_REFLECTION_MAP 0x00008512
-#define NV10TCL_TX_GEN_MODE_R(x) (0x000003c8+((x)*16))
-#define NV10TCL_TX_GEN_MODE_R__SIZE 0x00000002
-#define NV10TCL_TX_GEN_MODE_R_FALSE 0x00000000
-#define NV10TCL_TX_GEN_MODE_R_EYE_LINEAR 0x00002400
-#define NV10TCL_TX_GEN_MODE_R_OBJECT_LINEAR 0x00002401
-#define NV10TCL_TX_GEN_MODE_R_SPHERE_MAP 0x00002402
-#define NV10TCL_TX_GEN_MODE_R_NORMAL_MAP 0x00008511
-#define NV10TCL_TX_GEN_MODE_R_REFLECTION_MAP 0x00008512
-#define NV10TCL_TX_GEN_MODE_Q(x) (0x000003cc+((x)*16))
-#define NV10TCL_TX_GEN_MODE_Q__SIZE 0x00000002
-#define NV10TCL_TX_GEN_MODE_Q_FALSE 0x00000000
-#define NV10TCL_TX_GEN_MODE_Q_EYE_LINEAR 0x00002400
-#define NV10TCL_TX_GEN_MODE_Q_OBJECT_LINEAR 0x00002401
-#define NV10TCL_TX_GEN_MODE_Q_SPHERE_MAP 0x00002402
-#define NV10TCL_TX_GEN_MODE_Q_NORMAL_MAP 0x00008511
-#define NV10TCL_TX_GEN_MODE_Q_REFLECTION_MAP 0x00008512
-#define NV10TCL_TX_MATRIX_ENABLE(x) (0x000003e0+((x)*4))
-#define NV10TCL_TX_MATRIX_ENABLE__SIZE 0x00000002
-#define NV10TCL_VIEW_MATRIX_ENABLE 0x000003e8
-#define NV10TCL_VIEW_MATRIX_ENABLE_MODELVIEW1 (1 << 0)
-#define NV10TCL_VIEW_MATRIX_ENABLE_MODELVIEW0 (1 << 1)
-#define NV10TCL_VIEW_MATRIX_ENABLE_PROJECTION (1 << 2)
-#define NV10TCL_POINT_SIZE 0x000003ec
-#define NV10TCL_MODELVIEW0_MATRIX(x) (0x00000400+((x)*4))
-#define NV10TCL_MODELVIEW0_MATRIX__SIZE 0x00000010
-#define NV10TCL_MODELVIEW1_MATRIX(x) (0x00000440+((x)*4))
-#define NV10TCL_MODELVIEW1_MATRIX__SIZE 0x00000010
-#define NV10TCL_INVERSE_MODELVIEW0_MATRIX(x) (0x00000480+((x)*4))
-#define NV10TCL_INVERSE_MODELVIEW0_MATRIX__SIZE 0x00000010
-#define NV10TCL_INVERSE_MODELVIEW1_MATRIX(x) (0x000004c0+((x)*4))
-#define NV10TCL_INVERSE_MODELVIEW1_MATRIX__SIZE 0x00000010
-#define NV10TCL_PROJECTION_MATRIX(x) (0x00000500+((x)*4))
-#define NV10TCL_PROJECTION_MATRIX__SIZE 0x00000010
-#define NV10TCL_TX0_MATRIX(x) (0x00000540+((x)*4))
-#define NV10TCL_TX0_MATRIX__SIZE 0x00000010
-#define NV10TCL_TX1_MATRIX(x) (0x00000580+((x)*4))
-#define NV10TCL_TX1_MATRIX__SIZE 0x00000010
-#define NV10TCL_TX_GEN_COEFF_S_A(x) (0x00000600+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_S_A__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_S_B(x) (0x00000604+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_S_B__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_S_C(x) (0x00000608+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_S_C__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_S_D(x) (0x0000060c+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_S_D__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_T_A(x) (0x00000610+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_T_A__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_T_B(x) (0x00000614+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_T_B__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_T_C(x) (0x00000618+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_T_C__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_T_D(x) (0x0000061c+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_T_D__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_R_A(x) (0x00000620+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_R_A__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_R_B(x) (0x00000624+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_R_B__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_R_C(x) (0x00000628+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_R_C__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_R_D(x) (0x0000062c+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_R_D__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_Q_A(x) (0x00000630+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_Q_A__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_Q_B(x) (0x00000634+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_Q_B__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_Q_C(x) (0x00000638+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_Q_C__SIZE 0x00000002
-#define NV10TCL_TX_GEN_COEFF_Q_D(x) (0x0000063c+((x)*64))
-#define NV10TCL_TX_GEN_COEFF_Q_D__SIZE 0x00000002
-#define NV10TCL_FOG_EQUATION_CONSTANT 0x00000680
-#define NV10TCL_FOG_EQUATION_LINEAR 0x00000684
-#define NV10TCL_FOG_EQUATION_QUADRATIC 0x00000688
-#define NV10TCL_MATERIAL_SHININESS(x) (0x000006a0+((x)*4))
-#define NV10TCL_MATERIAL_SHININESS__SIZE 0x00000006
-#define NV10TCL_LIGHT_MODEL_AMBIENT_R 0x000006c4
-#define NV10TCL_LIGHT_MODEL_AMBIENT_G 0x000006c8
-#define NV10TCL_LIGHT_MODEL_AMBIENT_B 0x000006cc
-#define NV10TCL_VIEWPORT_TRANSLATE_X 0x000006e8
-#define NV10TCL_VIEWPORT_TRANSLATE_Y 0x000006ec
-#define NV10TCL_VIEWPORT_TRANSLATE_Z 0x000006f0
-#define NV10TCL_VIEWPORT_TRANSLATE_W 0x000006f4
-#define NV10TCL_POINT_PARAMETER(x) (0x000006f8+((x)*4))
-#define NV10TCL_POINT_PARAMETER__SIZE 0x00000008
-#define NV10TCL_LIGHT_AMBIENT_R(x) (0x00000800+((x)*128))
-#define NV10TCL_LIGHT_AMBIENT_R__SIZE 0x00000008
-#define NV10TCL_LIGHT_AMBIENT_G(x) (0x00000804+((x)*128))
-#define NV10TCL_LIGHT_AMBIENT_G__SIZE 0x00000008
-#define NV10TCL_LIGHT_AMBIENT_B(x) (0x00000808+((x)*128))
-#define NV10TCL_LIGHT_AMBIENT_B__SIZE 0x00000008
-#define NV10TCL_LIGHT_DIFFUSE_R(x) (0x0000080c+((x)*128))
-#define NV10TCL_LIGHT_DIFFUSE_R__SIZE 0x00000008
-#define NV10TCL_LIGHT_DIFFUSE_G(x) (0x00000810+((x)*128))
-#define NV10TCL_LIGHT_DIFFUSE_G__SIZE 0x00000008
-#define NV10TCL_LIGHT_DIFFUSE_B(x) (0x00000814+((x)*128))
-#define NV10TCL_LIGHT_DIFFUSE_B__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPECULAR_R(x) (0x00000818+((x)*128))
-#define NV10TCL_LIGHT_SPECULAR_R__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPECULAR_G(x) (0x0000081c+((x)*128))
-#define NV10TCL_LIGHT_SPECULAR_G__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPECULAR_B(x) (0x00000820+((x)*128))
-#define NV10TCL_LIGHT_SPECULAR_B__SIZE 0x00000008
-#define NV10TCL_LIGHT_HALF_VECTOR_X(x) (0x00000828+((x)*128))
-#define NV10TCL_LIGHT_HALF_VECTOR_X__SIZE 0x00000008
-#define NV10TCL_LIGHT_HALF_VECTOR_Y(x) (0x0000082c+((x)*128))
-#define NV10TCL_LIGHT_HALF_VECTOR_Y__SIZE 0x00000008
-#define NV10TCL_LIGHT_HALF_VECTOR_Z(x) (0x00000830+((x)*128))
-#define NV10TCL_LIGHT_HALF_VECTOR_Z__SIZE 0x00000008
-#define NV10TCL_LIGHT_DIRECTION_X(x) (0x00000834+((x)*128))
-#define NV10TCL_LIGHT_DIRECTION_X__SIZE 0x00000008
-#define NV10TCL_LIGHT_DIRECTION_Y(x) (0x00000838+((x)*128))
-#define NV10TCL_LIGHT_DIRECTION_Y__SIZE 0x00000008
-#define NV10TCL_LIGHT_DIRECTION_Z(x) (0x0000083c+((x)*128))
-#define NV10TCL_LIGHT_DIRECTION_Z__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPOT_CUTOFF_A(x) (0x00000840+((x)*128))
-#define NV10TCL_LIGHT_SPOT_CUTOFF_A__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPOT_CUTOFF_B(x) (0x00000844+((x)*128))
-#define NV10TCL_LIGHT_SPOT_CUTOFF_B__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPOT_CUTOFF_C(x) (0x00000848+((x)*128))
-#define NV10TCL_LIGHT_SPOT_CUTOFF_C__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPOT_DIR_X(x) (0x0000084c+((x)*128))
-#define NV10TCL_LIGHT_SPOT_DIR_X__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPOT_DIR_Y(x) (0x00000850+((x)*128))
-#define NV10TCL_LIGHT_SPOT_DIR_Y__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPOT_DIR_Z(x) (0x00000854+((x)*128))
-#define NV10TCL_LIGHT_SPOT_DIR_Z__SIZE 0x00000008
-#define NV10TCL_LIGHT_SPOT_CUTOFF_D(x) (0x00000858+((x)*128))
-#define NV10TCL_LIGHT_SPOT_CUTOFF_D__SIZE 0x00000008
-#define NV10TCL_LIGHT_POSITION_X(x) (0x0000085c+((x)*128))
-#define NV10TCL_LIGHT_POSITION_X__SIZE 0x00000008
-#define NV10TCL_LIGHT_POSITION_Y(x) (0x00000860+((x)*128))
-#define NV10TCL_LIGHT_POSITION_Y__SIZE 0x00000008
-#define NV10TCL_LIGHT_POSITION_Z(x) (0x00000864+((x)*128))
-#define NV10TCL_LIGHT_POSITION_Z__SIZE 0x00000008
-#define NV10TCL_LIGHT_ATTENUATION_CONSTANT(x) (0x00000868+((x)*128))
-#define NV10TCL_LIGHT_ATTENUATION_CONSTANT__SIZE 0x00000008
-#define NV10TCL_LIGHT_ATTENUATION_LINEAR(x) (0x0000086c+((x)*128))
-#define NV10TCL_LIGHT_ATTENUATION_LINEAR__SIZE 0x00000008
-#define NV10TCL_LIGHT_ATTENUATION_QUADRATIC(x) (0x00000870+((x)*128))
-#define NV10TCL_LIGHT_ATTENUATION_QUADRATIC__SIZE 0x00000008
-#define NV10TCL_VERTEX_POS_3F_X 0x00000c00
-#define NV10TCL_VERTEX_POS_3F_Y 0x00000c04
-#define NV10TCL_VERTEX_POS_3F_Z 0x00000c08
-#define NV10TCL_VERTEX_POS_4F_X 0x00000c18
-#define NV10TCL_VERTEX_POS_4F_Y 0x00000c1c
-#define NV10TCL_VERTEX_POS_4F_Z 0x00000c20
-#define NV10TCL_VERTEX_POS_4F_W 0x00000c24
-#define NV10TCL_VERTEX_NOR_3F_X 0x00000c30
-#define NV10TCL_VERTEX_NOR_3F_Y 0x00000c34
-#define NV10TCL_VERTEX_NOR_3F_Z 0x00000c38
-#define NV10TCL_VERTEX_NOR_3I_XY 0x00000c40
-#define NV10TCL_VERTEX_NOR_3I_XY_X_SHIFT 0
-#define NV10TCL_VERTEX_NOR_3I_XY_X_MASK 0x0000ffff
-#define NV10TCL_VERTEX_NOR_3I_XY_Y_SHIFT 16
-#define NV10TCL_VERTEX_NOR_3I_XY_Y_MASK 0xffff0000
-#define NV10TCL_VERTEX_NOR_3I_Z 0x00000c44
-#define NV10TCL_VERTEX_NOR_3I_Z_Z_SHIFT 0
-#define NV10TCL_VERTEX_NOR_3I_Z_Z_MASK 0x0000ffff
-#define NV10TCL_VERTEX_COL_4F_R 0x00000c50
-#define NV10TCL_VERTEX_COL_4F_G 0x00000c54
-#define NV10TCL_VERTEX_COL_4F_B 0x00000c58
-#define NV10TCL_VERTEX_COL_4F_A 0x00000c5c
-#define NV10TCL_VERTEX_COL_3F_R 0x00000c60
-#define NV10TCL_VERTEX_COL_3F_G 0x00000c64
-#define NV10TCL_VERTEX_COL_3F_B 0x00000c68
-#define NV10TCL_VERTEX_COL_4I 0x00000c6c
-#define NV10TCL_VERTEX_COL_4I_R_SHIFT 0
-#define NV10TCL_VERTEX_COL_4I_R_MASK 0x000000ff
-#define NV10TCL_VERTEX_COL_4I_G_SHIFT 8
-#define NV10TCL_VERTEX_COL_4I_G_MASK 0x0000ff00
-#define NV10TCL_VERTEX_COL_4I_B_SHIFT 16
-#define NV10TCL_VERTEX_COL_4I_B_MASK 0x00ff0000
-#define NV10TCL_VERTEX_COL_4I_A_SHIFT 24
-#define NV10TCL_VERTEX_COL_4I_A_MASK 0xff000000
-#define NV10TCL_VERTEX_COL2_3F_R 0x00000c80
-#define NV10TCL_VERTEX_COL2_3F_G 0x00000c84
-#define NV10TCL_VERTEX_COL2_3F_B 0x00000c88
-#define NV10TCL_VERTEX_COL2_3I 0x00000c8c
-#define NV10TCL_VERTEX_COL2_3I_R_SHIFT 0
-#define NV10TCL_VERTEX_COL2_3I_R_MASK 0x000000ff
-#define NV10TCL_VERTEX_COL2_3I_G_SHIFT 8
-#define NV10TCL_VERTEX_COL2_3I_G_MASK 0x0000ff00
-#define NV10TCL_VERTEX_COL2_3I_B_SHIFT 16
-#define NV10TCL_VERTEX_COL2_3I_B_MASK 0x00ff0000
-#define NV10TCL_VERTEX_TX0_2F_S 0x00000c90
-#define NV10TCL_VERTEX_TX0_2F_T 0x00000c94
-#define NV10TCL_VERTEX_TX0_2I 0x00000c98
-#define NV10TCL_VERTEX_TX0_2I_S_SHIFT 0
-#define NV10TCL_VERTEX_TX0_2I_S_MASK 0x0000ffff
-#define NV10TCL_VERTEX_TX0_2I_T_SHIFT 16
-#define NV10TCL_VERTEX_TX0_2I_T_MASK 0xffff0000
-#define NV10TCL_VERTEX_TX0_4F_S 0x00000ca0
-#define NV10TCL_VERTEX_TX0_4F_T 0x00000ca4
-#define NV10TCL_VERTEX_TX0_4F_R 0x00000ca8
-#define NV10TCL_VERTEX_TX0_4F_Q 0x00000cac
-#define NV10TCL_VERTEX_TX0_4I_ST 0x00000cb0
-#define NV10TCL_VERTEX_TX0_4I_ST_S_SHIFT 0
-#define NV10TCL_VERTEX_TX0_4I_ST_S_MASK 0x0000ffff
-#define NV10TCL_VERTEX_TX0_4I_ST_T_SHIFT 16
-#define NV10TCL_VERTEX_TX0_4I_ST_T_MASK 0xffff0000
-#define NV10TCL_VERTEX_TX0_4I_RQ 0x00000cb4
-#define NV10TCL_VERTEX_TX0_4I_RQ_R_SHIFT 0
-#define NV10TCL_VERTEX_TX0_4I_RQ_R_MASK 0x0000ffff
-#define NV10TCL_VERTEX_TX0_4I_RQ_Q_SHIFT 16
-#define NV10TCL_VERTEX_TX0_4I_RQ_Q_MASK 0xffff0000
-#define NV10TCL_VERTEX_TX1_2F_S 0x00000cb8
-#define NV10TCL_VERTEX_TX1_2F_T 0x00000cbc
-#define NV10TCL_VERTEX_TX1_2I 0x00000cc0
-#define NV10TCL_VERTEX_TX1_2I_S_SHIFT 0
-#define NV10TCL_VERTEX_TX1_2I_S_MASK 0x0000ffff
-#define NV10TCL_VERTEX_TX1_2I_T_SHIFT 16
-#define NV10TCL_VERTEX_TX1_2I_T_MASK 0xffff0000
-#define NV10TCL_VERTEX_TX1_4F_S 0x00000cc8
-#define NV10TCL_VERTEX_TX1_4F_T 0x00000ccc
-#define NV10TCL_VERTEX_TX1_4F_R 0x00000cd0
-#define NV10TCL_VERTEX_TX1_4F_Q 0x00000cd4
-#define NV10TCL_VERTEX_TX1_4I_ST 0x00000cd8
-#define NV10TCL_VERTEX_TX1_4I_ST_S_SHIFT 0
-#define NV10TCL_VERTEX_TX1_4I_ST_S_MASK 0x0000ffff
-#define NV10TCL_VERTEX_TX1_4I_ST_T_SHIFT 16
-#define NV10TCL_VERTEX_TX1_4I_ST_T_MASK 0xffff0000
-#define NV10TCL_VERTEX_TX1_4I_RQ 0x00000cdc
-#define NV10TCL_VERTEX_TX1_4I_RQ_R_SHIFT 0
-#define NV10TCL_VERTEX_TX1_4I_RQ_R_MASK 0x0000ffff
-#define NV10TCL_VERTEX_TX1_4I_RQ_Q_SHIFT 16
-#define NV10TCL_VERTEX_TX1_4I_RQ_Q_MASK 0xffff0000
-#define NV10TCL_VERTEX_FOG_1F 0x00000ce0
-#define NV10TCL_VERTEX_WGH_1F 0x00000ce4
-#define NV10TCL_EDGEFLAG_ENABLE 0x00000cec
-#define NV10TCL_VERTEX_ARRAY_VALIDATE 0x00000cf0
-#define NV10TCL_VTXBUF_ADDRESS(x) (0x00000d00+((x)*8))
-#define NV10TCL_VTXBUF_ADDRESS__SIZE 0x00000008
-#define NV10TCL_VTXFMT(x) (0x00000d04+((x)*8))
-#define NV10TCL_VTXFMT__SIZE 0x00000008
-#define NV10TCL_VTXFMT_TYPE_SHIFT 0
-#define NV10TCL_VTXFMT_TYPE_MASK 0x0000000f
-#define NV10TCL_VTXFMT_TYPE_BYTE_BGRA 0x00000000
-#define NV10TCL_VTXFMT_TYPE_SHORT 0x00000001
-#define NV10TCL_VTXFMT_TYPE_FLOAT 0x00000002
-#define NV10TCL_VTXFMT_TYPE_BYTE_RGBA 0x00000004
-#define NV10TCL_VTXFMT_FIELDS_SHIFT 4
-#define NV10TCL_VTXFMT_FIELDS_MASK 0x000000f0
-#define NV10TCL_VTXFMT_STRIDE_SHIFT 8
-#define NV10TCL_VTXFMT_STRIDE_MASK 0x0000ff00
-#define NV10TCL_VTXFMT_POS_HOMOGENEOUS (1 << 24)
-#define NV10TCL_VERTEX_BEGIN_END 0x00000dfc
-#define NV10TCL_VERTEX_BEGIN_END_STOP 0x00000000
-#define NV10TCL_VERTEX_BEGIN_END_POINTS 0x00000001
-#define NV10TCL_VERTEX_BEGIN_END_LINES 0x00000002
-#define NV10TCL_VERTEX_BEGIN_END_LINE_LOOP 0x00000003
-#define NV10TCL_VERTEX_BEGIN_END_LINE_STRIP 0x00000004
-#define NV10TCL_VERTEX_BEGIN_END_TRIANGLES 0x00000005
-#define NV10TCL_VERTEX_BEGIN_END_TRIANGLE_STRIP 0x00000006
-#define NV10TCL_VERTEX_BEGIN_END_TRIANGLE_FAN 0x00000007
-#define NV10TCL_VERTEX_BEGIN_END_QUADS 0x00000008
-#define NV10TCL_VERTEX_BEGIN_END_QUAD_STRIP 0x00000009
-#define NV10TCL_VERTEX_BEGIN_END_POLYGON 0x0000000a
-#define NV10TCL_VB_ELEMENT_U16 0x00000e00
-#define NV10TCL_VB_ELEMENT_U16_I0_SHIFT 0
-#define NV10TCL_VB_ELEMENT_U16_I0_MASK 0x0000ffff
-#define NV10TCL_VB_ELEMENT_U16_I1_SHIFT 16
-#define NV10TCL_VB_ELEMENT_U16_I1_MASK 0xffff0000
-#define NV10TCL_VB_ELEMENT_U32 0x00001100
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END 0x000013fc
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_STOP 0x00000000
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_POINTS 0x00000001
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_LINES 0x00000002
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_LINE_LOOP 0x00000003
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_LINE_STRIP 0x00000004
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_TRIANGLES 0x00000005
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_TRIANGLE_STRIP 0x00000006
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_TRIANGLE_FAN 0x00000007
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_QUADS 0x00000008
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_QUAD_STRIP 0x00000009
-#define NV10TCL_VERTEX_BUFFER_BEGIN_END_POLYGON 0x0000000a
-#define NV10TCL_VERTEX_BUFFER_DRAW_ARRAYS 0x00001400
-#define NV10TCL_VERTEX_BUFFER_DRAW_ARRAYS_FIRST_SHIFT 0
-#define NV10TCL_VERTEX_BUFFER_DRAW_ARRAYS_FIRST_MASK 0x0000ffff
-#define NV10TCL_VERTEX_BUFFER_DRAW_ARRAYS_LAST_SHIFT 24
-#define NV10TCL_VERTEX_BUFFER_DRAW_ARRAYS_LAST_MASK 0xff000000
-#define NV10TCL_VERTEX_ARRAY_DATA 0x00001800
-
-
-#define NV11TCL 0x00000096
-
-#define NV11TCL_COLOR_LOGIC_OP_ENABLE 0x00000d40
-#define NV11TCL_COLOR_LOGIC_OP_OP 0x00000d44
-#define NV11TCL_COLOR_LOGIC_OP_OP_CLEAR 0x00001500
-#define NV11TCL_COLOR_LOGIC_OP_OP_AND 0x00001501
-#define NV11TCL_COLOR_LOGIC_OP_OP_AND_REVERSE 0x00001502
-#define NV11TCL_COLOR_LOGIC_OP_OP_COPY 0x00001503
-#define NV11TCL_COLOR_LOGIC_OP_OP_AND_INVERTED 0x00001504
-#define NV11TCL_COLOR_LOGIC_OP_OP_NOOP 0x00001505
-#define NV11TCL_COLOR_LOGIC_OP_OP_XOR 0x00001506
-#define NV11TCL_COLOR_LOGIC_OP_OP_OR 0x00001507
-#define NV11TCL_COLOR_LOGIC_OP_OP_NOR 0x00001508
-#define NV11TCL_COLOR_LOGIC_OP_OP_EQUIV 0x00001509
-#define NV11TCL_COLOR_LOGIC_OP_OP_INVERT 0x0000150a
-#define NV11TCL_COLOR_LOGIC_OP_OP_OR_REVERSE 0x0000150b
-#define NV11TCL_COLOR_LOGIC_OP_OP_COPY_INVERTED 0x0000150c
-#define NV11TCL_COLOR_LOGIC_OP_OP_OR_INVERTED 0x0000150d
-#define NV11TCL_COLOR_LOGIC_OP_OP_NAND 0x0000150e
-#define NV11TCL_COLOR_LOGIC_OP_OP_SET 0x0000150f
-
-
-#define NV17TCL 0x00000099
-
-#define NV17TCL_DMA_IN_MEMORY4 0x000001ac
-#define NV17TCL_DMA_IN_MEMORY5 0x000001b0
-#define NV17TCL_COLOR_MASK_ENABLE 0x000002bc
-#define NV17TCL_ZCLEAR_ENABLE 0x000003f8
-#define NV17TCL_ZCLEAR_VALUE 0x000003fc
-#define NV17TCL_ZCLEAR_VALUE_DEPTH_SHIFT 8
-#define NV17TCL_ZCLEAR_VALUE_DEPTH_MASK 0xffffff00
-#define NV17TCL_ZCLEAR_VALUE_SEQUENCE_SHIFT 0
-#define NV17TCL_ZCLEAR_VALUE_SEQUENCE_MASK 0x000000ff
-#define NV17TCL_LMA_DEPTH_BUFFER_PITCH 0x00000d5c
-#define NV17TCL_LMA_DEPTH_BUFFER_OFFSET 0x00000d60
-#define NV17TCL_LMA_DEPTH_FILL_VALUE 0x00000d68
-#define NV17TCL_LMA_DEPTH_BUFFER_CLEAR 0x00000d6c
-#define NV17TCL_LMA_DEPTH_WINDOW_X 0x00001638
-#define NV17TCL_LMA_DEPTH_WINDOW_Y 0x0000163c
-#define NV17TCL_LMA_DEPTH_WINDOW_Z 0x00001640
-#define NV17TCL_LMA_DEPTH_WINDOW_W 0x00001644
-#define NV17TCL_LMA_DEPTH_ENABLE 0x00001658
-
-
-#define NV03_CONTEXT_SURFACES_2D 0x00000058
-
-#define NV03_CONTEXT_SURFACES_2D_SYNCHRONIZE 0x00000100
-#define NV03_CONTEXT_SURFACES_2D_DMA_NOTIFY 0x00000180
-#define NV03_CONTEXT_SURFACES_2D_DMA_SOURCE 0x00000184
-#define NV03_CONTEXT_SURFACES_2D_DMA_DESTIN 0x00000188
-#define NV03_CONTEXT_SURFACES_2D_COLOR_FORMAT 0x00000300
-#define NV03_CONTEXT_SURFACES_2D_PITCH 0x00000304
-#define NV03_CONTEXT_SURFACES_2D_PITCH_SOURCE_SHIFT 0
-#define NV03_CONTEXT_SURFACES_2D_PITCH_SOURCE_MASK 0x0000ffff
-#define NV03_CONTEXT_SURFACES_2D_PITCH_DESTIN_SHIFT 16
-#define NV03_CONTEXT_SURFACES_2D_PITCH_DESTIN_MASK 0xffff0000
-#define NV03_CONTEXT_SURFACES_2D_OFFSET_SOURCE 0x00000308
-#define NV03_CONTEXT_SURFACES_2D_OFFSET_DESTIN 0x0000030c
-
-
-#define NV03_CONTEXT_SURFACES_3D 0x0000005a
-
-#define NV03_CONTEXT_SURFACES_3D_SYNCHRONIZE 0x00000100
-#define NV03_CONTEXT_SURFACES_3D_DMA_NOTIFY 0x00000180
-#define NV03_CONTEXT_SURFACES_3D_DMA_SURFACE 0x00000184
-#define NV03_CONTEXT_SURFACES_3D_PITCH 0x00000300
-#define NV03_CONTEXT_SURFACES_3D_OFFSET_COLOR 0x00000304
-#define NV03_CONTEXT_SURFACES_3D_OFFSET_ZETA 0x00000308
-
-
-#define NV04_INDEXED_IMAGE_FROM_CPU 0x00000060
-
-#define NV04_INDEXED_IMAGE_FROM_CPU_NOP 0x00000100
-#define NV04_INDEXED_IMAGE_FROM_CPU_NOTIFY 0x00000104
-#define NV04_INDEXED_IMAGE_FROM_CPU_PATCH 0x0000010c
-#define NV04_INDEXED_IMAGE_FROM_CPU_DMA_NOTIFY 0x00000180
-#define NV04_INDEXED_IMAGE_FROM_CPU_DMA_LUT 0x00000184
-#define NV04_INDEXED_IMAGE_FROM_CPU_COLOR_KEY 0x00000188
-#define NV04_INDEXED_IMAGE_FROM_CPU_CLIP_RECTANGLE 0x0000018c
-#define NV04_INDEXED_IMAGE_FROM_CPU_PATTERN 0x00000190
-#define NV04_INDEXED_IMAGE_FROM_CPU_ROP 0x00000194
-#define NV04_INDEXED_IMAGE_FROM_CPU_BETA1 0x00000198
-#define NV04_INDEXED_IMAGE_FROM_CPU_BETA4 0x0000019c
-#define NV04_INDEXED_IMAGE_FROM_CPU_SURFACE 0x000001a0
-#define NV04_INDEXED_IMAGE_FROM_CPU_OPERATION 0x000003e4
-#define NV04_INDEXED_IMAGE_FROM_CPU_COLOR_FORMAT 0x000003e8
-#define NV04_INDEXED_IMAGE_FROM_CPU_INDEX_FORMAT 0x000003ec
-#define NV04_INDEXED_IMAGE_FROM_CPU_LUT_OFFSET 0x000003f0
-#define NV04_INDEXED_IMAGE_FROM_CPU_POINT 0x000003f4
-#define NV04_INDEXED_IMAGE_FROM_CPU_SIZE_OUT 0x000003f8
-#define NV04_INDEXED_IMAGE_FROM_CPU_SIZE_IN 0x000003fc
-#define NV04_INDEXED_IMAGE_FROM_CPU_COLOR(x) (0x00000400+((x)*4))
-#define NV04_INDEXED_IMAGE_FROM_CPU_COLOR__SIZE 0x00000700
-
-
-#define NV05_INDEXED_IMAGE_FROM_CPU 0x00000064
-
-#define NV05_INDEXED_IMAGE_FROM_CPU_COLOR_CONVERSION 0x000003e0
-
-
-#define NV03_CHANNEL_PIO 0x0000006a
-
-
-
-#define NV03_CHANNEL_DMA 0x0000006b
-
-
-
-#define NV04_BETA_SOLID 0x00000072
-
-#define NV04_BETA_SOLID_NOP 0x00000100
-#define NV04_BETA_SOLID_NOTIFY 0x00000104
-#define NV04_BETA_SOLID_DMA_NOTIFY 0x00000180
-#define NV04_BETA_SOLID_BETA_OUTPUT 0x00000200
-#define NV04_BETA_SOLID_BETA_FACTOR 0x00000300
-
-
-#define NV10_TEXTURE_FROM_CPU 0x0000007b
-
-#define NV10_TEXTURE_FROM_CPU_NOP 0x00000100
-#define NV10_TEXTURE_FROM_CPU_NOTIFY 0x00000104
-#define NV10_TEXTURE_FROM_CPU_WAIT_FOR_IDLE 0x00000108
-#define NV10_TEXTURE_FROM_CPU_PM_TRIGGER 0x00000140
-#define NV10_TEXTURE_FROM_CPU_DMA_NOTIFY 0x00000180
-#define NV10_TEXTURE_FROM_CPU_SURFACE 0x00000184
-#define NV10_TEXTURE_FROM_CPU_COLOR_FORMAT 0x00000300
-#define NV10_TEXTURE_FROM_CPU_POINT 0x00000304
-#define NV10_TEXTURE_FROM_CPU_POINT_X_SHIFT 0
-#define NV10_TEXTURE_FROM_CPU_POINT_X_MASK 0x0000ffff
-#define NV10_TEXTURE_FROM_CPU_POINT_Y_SHIFT 16
-#define NV10_TEXTURE_FROM_CPU_POINT_Y_MASK 0xffff0000
-#define NV10_TEXTURE_FROM_CPU_SIZE 0x00000308
-#define NV10_TEXTURE_FROM_CPU_SIZE_W_SHIFT 0
-#define NV10_TEXTURE_FROM_CPU_SIZE_W_MASK 0x0000ffff
-#define NV10_TEXTURE_FROM_CPU_SIZE_H_SHIFT 16
-#define NV10_TEXTURE_FROM_CPU_SIZE_H_MASK 0xffff0000
-#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL 0x0000030c
-#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL_X_SHIFT 0
-#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL_X_MASK 0x0000ffff
-#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL_W_SHIFT 16
-#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL_W_MASK 0xffff0000
-#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL 0x00000310
-#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL_Y_SHIFT 0
-#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL_Y_MASK 0x0000ffff
-#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL_H_SHIFT 16
-#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL_H_MASK 0xffff0000
-#define NV10_TEXTURE_FROM_CPU_COLOR(x) (0x00000400+((x)*4))
-#define NV10_TEXTURE_FROM_CPU_COLOR__SIZE 0x00000700
-
-
-#define NV30_TEXTURE_FROM_CPU 0x0000037b
-
-
-
-#define NV40_TEXTURE_FROM_CPU 0x0000307b
-
-
-
-#define NV10_VIDEO_DISPLAY 0x0000007c
-
-
-
-#define NV20TCL 0x00000097
-
-#define NV20TCL_NOP 0x00000100
-#define NV20TCL_NOTIFY 0x00000104
-#define NV20TCL_DMA_NOTIFY 0x00000180
-#define NV20TCL_DMA_TEXTURE0 0x00000184
-#define NV20TCL_DMA_TEXTURE1 0x00000188
-#define NV20TCL_DMA_COLOR 0x00000194
-#define NV20TCL_DMA_ZETA 0x00000198
-#define NV20TCL_DMA_VTXBUF0 0x0000019c
-#define NV20TCL_DMA_VTXBUF1 0x000001a0
-#define NV20TCL_DMA_FENCE 0x000001a4
-#define NV20TCL_DMA_QUERY 0x000001a8
-#define NV20TCL_RT_HORIZ 0x00000200
-#define NV20TCL_RT_HORIZ_X_SHIFT 0
-#define NV20TCL_RT_HORIZ_X_MASK 0x0000ffff
-#define NV20TCL_RT_HORIZ_W_SHIFT 16
-#define NV20TCL_RT_HORIZ_W_MASK 0xffff0000
-#define NV20TCL_RT_VERT 0x00000204
-#define NV20TCL_RT_VERT_Y_SHIFT 0
-#define NV20TCL_RT_VERT_Y_MASK 0x0000ffff
-#define NV20TCL_RT_VERT_H_SHIFT 16
-#define NV20TCL_RT_VERT_H_MASK 0xffff0000
-#define NV20TCL_RT_FORMAT 0x00000208
-#define NV20TCL_RT_FORMAT_TYPE_SHIFT 8
-#define NV20TCL_RT_FORMAT_TYPE_MASK 0x00000f00
-#define NV20TCL_RT_FORMAT_TYPE_LINEAR 0x00000100
-#define NV20TCL_RT_FORMAT_TYPE_SWIZZLED 0x00000200
-#define NV20TCL_RT_FORMAT_COLOR_SHIFT 0
-#define NV20TCL_RT_FORMAT_COLOR_MASK 0x0000001f
-#define NV20TCL_RT_FORMAT_COLOR_R5G6B5 0x00000003
-#define NV20TCL_RT_FORMAT_COLOR_X8R8G8B8 0x00000005
-#define NV20TCL_RT_FORMAT_COLOR_A8R8G8B8 0x00000008
-#define NV20TCL_RT_FORMAT_COLOR_B8 0x00000009
-#define NV20TCL_RT_FORMAT_COLOR_UNKNOWN 0x0000000d
-#define NV20TCL_RT_FORMAT_COLOR_X8B8G8R8 0x0000000f
-#define NV20TCL_RT_FORMAT_COLOR_A8B8G8R8 0x00000010
-#define NV20TCL_RT_PITCH 0x0000020c
-#define NV20TCL_RT_PITCH_COLOR_PITCH_SHIFT 0
-#define NV20TCL_RT_PITCH_COLOR_PITCH_MASK 0x0000ffff
-#define NV20TCL_RT_PITCH_ZETA_PITCH_SHIFT 16
-#define NV20TCL_RT_PITCH_ZETA_PITCH_MASK 0xffff0000
-#define NV20TCL_COLOR_OFFSET 0x00000210
-#define NV20TCL_ZETA_OFFSET 0x00000214
-#define NV20TCL_RC_IN_ALPHA(x) (0x00000260+((x)*4))
-#define NV20TCL_RC_IN_ALPHA__SIZE 0x00000008
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_SHIFT 0
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_MASK 0x0000000f
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0 0x00000001
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1 0x00000002
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_FOG 0x00000003
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR 0x00000004
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR 0x00000005
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE0 0x00000008
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE1 0x00000009
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_SPARE0 0x0000000c
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_SPARE1 0x0000000d
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_E_TIMES_F 0x0000000f
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE2 0x0000000a
-#define NV20TCL_RC_IN_ALPHA_D_INPUT_TEXTURE3 0x0000000b
-#define NV20TCL_RC_IN_ALPHA_D_COMPONENT_USAGE (1 << 4)
-#define NV20TCL_RC_IN_ALPHA_D_COMPONENT_USAGE_BLUE 0x00000000
-#define NV20TCL_RC_IN_ALPHA_D_COMPONENT_USAGE_ALPHA 0x00000010
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_SHIFT 5
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_MASK 0x000000e0
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT 0x00000020
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL 0x00000040
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE 0x00000060
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY 0x000000c0
-#define NV20TCL_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE 0x000000e0
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_SHIFT 8
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_MASK 0x00000f00
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0 0x00000100
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1 0x00000200
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_FOG 0x00000300
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR 0x00000400
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR 0x00000500
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE0 0x00000800
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE1 0x00000900
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_SPARE0 0x00000c00
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_SPARE1 0x00000d00
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_E_TIMES_F 0x00000f00
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE2 0x00000a00
-#define NV20TCL_RC_IN_ALPHA_C_INPUT_TEXTURE3 0x00000b00
-#define NV20TCL_RC_IN_ALPHA_C_COMPONENT_USAGE (1 << 12)
-#define NV20TCL_RC_IN_ALPHA_C_COMPONENT_USAGE_BLUE 0x00000000
-#define NV20TCL_RC_IN_ALPHA_C_COMPONENT_USAGE_ALPHA 0x00001000
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_SHIFT 13
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_MASK 0x0000e000
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT 0x00002000
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL 0x00004000
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE 0x00006000
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY 0x0000c000
-#define NV20TCL_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE 0x0000e000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_SHIFT 16
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_MASK 0x000f0000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0 0x00010000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1 0x00020000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_FOG 0x00030000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR 0x00040000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR 0x00050000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE0 0x00080000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE1 0x00090000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_SPARE0 0x000c0000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_SPARE1 0x000d0000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_E_TIMES_F 0x000f0000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE2 0x000a0000
-#define NV20TCL_RC_IN_ALPHA_B_INPUT_TEXTURE3 0x000b0000
-#define NV20TCL_RC_IN_ALPHA_B_COMPONENT_USAGE (1 << 20)
-#define NV20TCL_RC_IN_ALPHA_B_COMPONENT_USAGE_BLUE 0x00000000
-#define NV20TCL_RC_IN_ALPHA_B_COMPONENT_USAGE_ALPHA 0x00100000
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_SHIFT 21
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_MASK 0x00e00000
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT 0x00200000
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL 0x00400000
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE 0x00600000
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY 0x00c00000
-#define NV20TCL_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE 0x00e00000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_SHIFT 24
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_MASK 0x0f000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0 0x01000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1 0x02000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_FOG 0x03000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR 0x04000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR 0x05000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE0 0x08000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE1 0x09000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_SPARE0 0x0c000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_SPARE1 0x0d000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_E_TIMES_F 0x0f000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE2 0x0a000000
-#define NV20TCL_RC_IN_ALPHA_A_INPUT_TEXTURE3 0x0b000000
-#define NV20TCL_RC_IN_ALPHA_A_COMPONENT_USAGE (1 << 28)
-#define NV20TCL_RC_IN_ALPHA_A_COMPONENT_USAGE_BLUE 0x00000000
-#define NV20TCL_RC_IN_ALPHA_A_COMPONENT_USAGE_ALPHA 0x10000000
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_SHIFT 29
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_MASK 0xe0000000
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT 0x20000000
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL 0x40000000
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE 0x60000000
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY 0xc0000000
-#define NV20TCL_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE 0xe0000000
-#define NV20TCL_RC_FINAL0 0x00000288
-#define NV20TCL_RC_FINAL0_D_INPUT_SHIFT 0
-#define NV20TCL_RC_FINAL0_D_INPUT_MASK 0x0000000f
-#define NV20TCL_RC_FINAL0_D_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR0 0x00000001
-#define NV20TCL_RC_FINAL0_D_INPUT_CONSTANT_COLOR1 0x00000002
-#define NV20TCL_RC_FINAL0_D_INPUT_FOG 0x00000003
-#define NV20TCL_RC_FINAL0_D_INPUT_PRIMARY_COLOR 0x00000004
-#define NV20TCL_RC_FINAL0_D_INPUT_SECONDARY_COLOR 0x00000005
-#define NV20TCL_RC_FINAL0_D_INPUT_TEXTURE0 0x00000008
-#define NV20TCL_RC_FINAL0_D_INPUT_TEXTURE1 0x00000009
-#define NV20TCL_RC_FINAL0_D_INPUT_SPARE0 0x0000000c
-#define NV20TCL_RC_FINAL0_D_INPUT_SPARE1 0x0000000d
-#define NV20TCL_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV20TCL_RC_FINAL0_D_INPUT_E_TIMES_F 0x0000000f
-#define NV20TCL_RC_FINAL0_D_INPUT_TEXTURE2 0x0000000a
-#define NV20TCL_RC_FINAL0_D_INPUT_TEXTURE3 0x0000000b
-#define NV20TCL_RC_FINAL0_D_COMPONENT_USAGE (1 << 4)
-#define NV20TCL_RC_FINAL0_D_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_FINAL0_D_COMPONENT_USAGE_ALPHA 0x00000010
-#define NV20TCL_RC_FINAL0_D_MAPPING_SHIFT 5
-#define NV20TCL_RC_FINAL0_D_MAPPING_MASK 0x000000e0
-#define NV20TCL_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT 0x00000020
-#define NV20TCL_RC_FINAL0_D_MAPPING_EXPAND_NORMAL 0x00000040
-#define NV20TCL_RC_FINAL0_D_MAPPING_EXPAND_NEGATE 0x00000060
-#define NV20TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
-#define NV20TCL_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
-#define NV20TCL_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY 0x000000c0
-#define NV20TCL_RC_FINAL0_D_MAPPING_SIGNED_NEGATE 0x000000e0
-#define NV20TCL_RC_FINAL0_C_INPUT_SHIFT 8
-#define NV20TCL_RC_FINAL0_C_INPUT_MASK 0x00000f00
-#define NV20TCL_RC_FINAL0_C_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR0 0x00000100
-#define NV20TCL_RC_FINAL0_C_INPUT_CONSTANT_COLOR1 0x00000200
-#define NV20TCL_RC_FINAL0_C_INPUT_FOG 0x00000300
-#define NV20TCL_RC_FINAL0_C_INPUT_PRIMARY_COLOR 0x00000400
-#define NV20TCL_RC_FINAL0_C_INPUT_SECONDARY_COLOR 0x00000500
-#define NV20TCL_RC_FINAL0_C_INPUT_TEXTURE0 0x00000800
-#define NV20TCL_RC_FINAL0_C_INPUT_TEXTURE1 0x00000900
-#define NV20TCL_RC_FINAL0_C_INPUT_SPARE0 0x00000c00
-#define NV20TCL_RC_FINAL0_C_INPUT_SPARE1 0x00000d00
-#define NV20TCL_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV20TCL_RC_FINAL0_C_INPUT_E_TIMES_F 0x00000f00
-#define NV20TCL_RC_FINAL0_C_INPUT_TEXTURE2 0x00000a00
-#define NV20TCL_RC_FINAL0_C_INPUT_TEXTURE3 0x00000b00
-#define NV20TCL_RC_FINAL0_C_COMPONENT_USAGE (1 << 12)
-#define NV20TCL_RC_FINAL0_C_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_FINAL0_C_COMPONENT_USAGE_ALPHA 0x00001000
-#define NV20TCL_RC_FINAL0_C_MAPPING_SHIFT 13
-#define NV20TCL_RC_FINAL0_C_MAPPING_MASK 0x0000e000
-#define NV20TCL_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT 0x00002000
-#define NV20TCL_RC_FINAL0_C_MAPPING_EXPAND_NORMAL 0x00004000
-#define NV20TCL_RC_FINAL0_C_MAPPING_EXPAND_NEGATE 0x00006000
-#define NV20TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
-#define NV20TCL_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
-#define NV20TCL_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY 0x0000c000
-#define NV20TCL_RC_FINAL0_C_MAPPING_SIGNED_NEGATE 0x0000e000
-#define NV20TCL_RC_FINAL0_B_INPUT_SHIFT 16
-#define NV20TCL_RC_FINAL0_B_INPUT_MASK 0x000f0000
-#define NV20TCL_RC_FINAL0_B_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR0 0x00010000
-#define NV20TCL_RC_FINAL0_B_INPUT_CONSTANT_COLOR1 0x00020000
-#define NV20TCL_RC_FINAL0_B_INPUT_FOG 0x00030000
-#define NV20TCL_RC_FINAL0_B_INPUT_PRIMARY_COLOR 0x00040000
-#define NV20TCL_RC_FINAL0_B_INPUT_SECONDARY_COLOR 0x00050000
-#define NV20TCL_RC_FINAL0_B_INPUT_TEXTURE0 0x00080000
-#define NV20TCL_RC_FINAL0_B_INPUT_TEXTURE1 0x00090000
-#define NV20TCL_RC_FINAL0_B_INPUT_SPARE0 0x000c0000
-#define NV20TCL_RC_FINAL0_B_INPUT_SPARE1 0x000d0000
-#define NV20TCL_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
-#define NV20TCL_RC_FINAL0_B_INPUT_E_TIMES_F 0x000f0000
-#define NV20TCL_RC_FINAL0_B_INPUT_TEXTURE2 0x000a0000
-#define NV20TCL_RC_FINAL0_B_INPUT_TEXTURE3 0x000b0000
-#define NV20TCL_RC_FINAL0_B_COMPONENT_USAGE (1 << 20)
-#define NV20TCL_RC_FINAL0_B_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_FINAL0_B_COMPONENT_USAGE_ALPHA 0x00100000
-#define NV20TCL_RC_FINAL0_B_MAPPING_SHIFT 21
-#define NV20TCL_RC_FINAL0_B_MAPPING_MASK 0x00e00000
-#define NV20TCL_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT 0x00200000
-#define NV20TCL_RC_FINAL0_B_MAPPING_EXPAND_NORMAL 0x00400000
-#define NV20TCL_RC_FINAL0_B_MAPPING_EXPAND_NEGATE 0x00600000
-#define NV20TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
-#define NV20TCL_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
-#define NV20TCL_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY 0x00c00000
-#define NV20TCL_RC_FINAL0_B_MAPPING_SIGNED_NEGATE 0x00e00000
-#define NV20TCL_RC_FINAL0_A_INPUT_SHIFT 24
-#define NV20TCL_RC_FINAL0_A_INPUT_MASK 0x0f000000
-#define NV20TCL_RC_FINAL0_A_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR0 0x01000000
-#define NV20TCL_RC_FINAL0_A_INPUT_CONSTANT_COLOR1 0x02000000
-#define NV20TCL_RC_FINAL0_A_INPUT_FOG 0x03000000
-#define NV20TCL_RC_FINAL0_A_INPUT_PRIMARY_COLOR 0x04000000
-#define NV20TCL_RC_FINAL0_A_INPUT_SECONDARY_COLOR 0x05000000
-#define NV20TCL_RC_FINAL0_A_INPUT_TEXTURE0 0x08000000
-#define NV20TCL_RC_FINAL0_A_INPUT_TEXTURE1 0x09000000
-#define NV20TCL_RC_FINAL0_A_INPUT_SPARE0 0x0c000000
-#define NV20TCL_RC_FINAL0_A_INPUT_SPARE1 0x0d000000
-#define NV20TCL_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
-#define NV20TCL_RC_FINAL0_A_INPUT_E_TIMES_F 0x0f000000
-#define NV20TCL_RC_FINAL0_A_INPUT_TEXTURE2 0x0a000000
-#define NV20TCL_RC_FINAL0_A_INPUT_TEXTURE3 0x0b000000
-#define NV20TCL_RC_FINAL0_A_COMPONENT_USAGE (1 << 28)
-#define NV20TCL_RC_FINAL0_A_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_FINAL0_A_COMPONENT_USAGE_ALPHA 0x10000000
-#define NV20TCL_RC_FINAL0_A_MAPPING_SHIFT 29
-#define NV20TCL_RC_FINAL0_A_MAPPING_MASK 0xe0000000
-#define NV20TCL_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT 0x20000000
-#define NV20TCL_RC_FINAL0_A_MAPPING_EXPAND_NORMAL 0x40000000
-#define NV20TCL_RC_FINAL0_A_MAPPING_EXPAND_NEGATE 0x60000000
-#define NV20TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
-#define NV20TCL_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
-#define NV20TCL_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY 0xc0000000
-#define NV20TCL_RC_FINAL0_A_MAPPING_SIGNED_NEGATE 0xe0000000
-#define NV20TCL_RC_FINAL1 0x0000028c
-#define NV20TCL_RC_FINAL1_COLOR_SUM_CLAMP (1 << 7)
-#define NV20TCL_RC_FINAL1_G_INPUT_SHIFT 8
-#define NV20TCL_RC_FINAL1_G_INPUT_MASK 0x00000f00
-#define NV20TCL_RC_FINAL1_G_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR0 0x00000100
-#define NV20TCL_RC_FINAL1_G_INPUT_CONSTANT_COLOR1 0x00000200
-#define NV20TCL_RC_FINAL1_G_INPUT_FOG 0x00000300
-#define NV20TCL_RC_FINAL1_G_INPUT_PRIMARY_COLOR 0x00000400
-#define NV20TCL_RC_FINAL1_G_INPUT_SECONDARY_COLOR 0x00000500
-#define NV20TCL_RC_FINAL1_G_INPUT_TEXTURE0 0x00000800
-#define NV20TCL_RC_FINAL1_G_INPUT_TEXTURE1 0x00000900
-#define NV20TCL_RC_FINAL1_G_INPUT_SPARE0 0x00000c00
-#define NV20TCL_RC_FINAL1_G_INPUT_SPARE1 0x00000d00
-#define NV20TCL_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV20TCL_RC_FINAL1_G_INPUT_E_TIMES_F 0x00000f00
-#define NV20TCL_RC_FINAL1_G_INPUT_TEXTURE2 0x00000a00
-#define NV20TCL_RC_FINAL1_G_INPUT_TEXTURE3 0x00000b00
-#define NV20TCL_RC_FINAL1_G_COMPONENT_USAGE (1 << 12)
-#define NV20TCL_RC_FINAL1_G_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_FINAL1_G_COMPONENT_USAGE_ALPHA 0x00001000
-#define NV20TCL_RC_FINAL1_G_MAPPING_SHIFT 13
-#define NV20TCL_RC_FINAL1_G_MAPPING_MASK 0x0000e000
-#define NV20TCL_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT 0x00002000
-#define NV20TCL_RC_FINAL1_G_MAPPING_EXPAND_NORMAL 0x00004000
-#define NV20TCL_RC_FINAL1_G_MAPPING_EXPAND_NEGATE 0x00006000
-#define NV20TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL 0x00008000
-#define NV20TCL_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE 0x0000a000
-#define NV20TCL_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY 0x0000c000
-#define NV20TCL_RC_FINAL1_G_MAPPING_SIGNED_NEGATE 0x0000e000
-#define NV20TCL_RC_FINAL1_F_INPUT_SHIFT 16
-#define NV20TCL_RC_FINAL1_F_INPUT_MASK 0x000f0000
-#define NV20TCL_RC_FINAL1_F_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR0 0x00010000
-#define NV20TCL_RC_FINAL1_F_INPUT_CONSTANT_COLOR1 0x00020000
-#define NV20TCL_RC_FINAL1_F_INPUT_FOG 0x00030000
-#define NV20TCL_RC_FINAL1_F_INPUT_PRIMARY_COLOR 0x00040000
-#define NV20TCL_RC_FINAL1_F_INPUT_SECONDARY_COLOR 0x00050000
-#define NV20TCL_RC_FINAL1_F_INPUT_TEXTURE0 0x00080000
-#define NV20TCL_RC_FINAL1_F_INPUT_TEXTURE1 0x00090000
-#define NV20TCL_RC_FINAL1_F_INPUT_SPARE0 0x000c0000
-#define NV20TCL_RC_FINAL1_F_INPUT_SPARE1 0x000d0000
-#define NV20TCL_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
-#define NV20TCL_RC_FINAL1_F_INPUT_E_TIMES_F 0x000f0000
-#define NV20TCL_RC_FINAL1_F_INPUT_TEXTURE2 0x000a0000
-#define NV20TCL_RC_FINAL1_F_INPUT_TEXTURE3 0x000b0000
-#define NV20TCL_RC_FINAL1_F_COMPONENT_USAGE (1 << 20)
-#define NV20TCL_RC_FINAL1_F_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_FINAL1_F_COMPONENT_USAGE_ALPHA 0x00100000
-#define NV20TCL_RC_FINAL1_F_MAPPING_SHIFT 21
-#define NV20TCL_RC_FINAL1_F_MAPPING_MASK 0x00e00000
-#define NV20TCL_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT 0x00200000
-#define NV20TCL_RC_FINAL1_F_MAPPING_EXPAND_NORMAL 0x00400000
-#define NV20TCL_RC_FINAL1_F_MAPPING_EXPAND_NEGATE 0x00600000
-#define NV20TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL 0x00800000
-#define NV20TCL_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE 0x00a00000
-#define NV20TCL_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY 0x00c00000
-#define NV20TCL_RC_FINAL1_F_MAPPING_SIGNED_NEGATE 0x00e00000
-#define NV20TCL_RC_FINAL1_E_INPUT_SHIFT 24
-#define NV20TCL_RC_FINAL1_E_INPUT_MASK 0x0f000000
-#define NV20TCL_RC_FINAL1_E_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR0 0x01000000
-#define NV20TCL_RC_FINAL1_E_INPUT_CONSTANT_COLOR1 0x02000000
-#define NV20TCL_RC_FINAL1_E_INPUT_FOG 0x03000000
-#define NV20TCL_RC_FINAL1_E_INPUT_PRIMARY_COLOR 0x04000000
-#define NV20TCL_RC_FINAL1_E_INPUT_SECONDARY_COLOR 0x05000000
-#define NV20TCL_RC_FINAL1_E_INPUT_TEXTURE0 0x08000000
-#define NV20TCL_RC_FINAL1_E_INPUT_TEXTURE1 0x09000000
-#define NV20TCL_RC_FINAL1_E_INPUT_SPARE0 0x0c000000
-#define NV20TCL_RC_FINAL1_E_INPUT_SPARE1 0x0d000000
-#define NV20TCL_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
-#define NV20TCL_RC_FINAL1_E_INPUT_E_TIMES_F 0x0f000000
-#define NV20TCL_RC_FINAL1_E_INPUT_TEXTURE2 0x0a000000
-#define NV20TCL_RC_FINAL1_E_INPUT_TEXTURE3 0x0b000000
-#define NV20TCL_RC_FINAL1_E_COMPONENT_USAGE (1 << 28)
-#define NV20TCL_RC_FINAL1_E_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_FINAL1_E_COMPONENT_USAGE_ALPHA 0x10000000
-#define NV20TCL_RC_FINAL1_E_MAPPING_SHIFT 29
-#define NV20TCL_RC_FINAL1_E_MAPPING_MASK 0xe0000000
-#define NV20TCL_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT 0x20000000
-#define NV20TCL_RC_FINAL1_E_MAPPING_EXPAND_NORMAL 0x40000000
-#define NV20TCL_RC_FINAL1_E_MAPPING_EXPAND_NEGATE 0x60000000
-#define NV20TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL 0x80000000
-#define NV20TCL_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE 0xa0000000
-#define NV20TCL_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY 0xc0000000
-#define NV20TCL_RC_FINAL1_E_MAPPING_SIGNED_NEGATE 0xe0000000
-#define NV20TCL_LIGHT_MODEL 0x00000294
-#define NV20TCL_LIGHT_MODEL_VIEWER_SHIFT 16
-#define NV20TCL_LIGHT_MODEL_VIEWER_MASK 0x00030000
-#define NV20TCL_LIGHT_MODEL_VIEWER_NONLOCAL 0x00020000
-#define NV20TCL_LIGHT_MODEL_VIEWER_LOCAL 0x00030000
-#define NV20TCL_LIGHT_MODEL_SEPARATE_SPECULAR (1 << 0)
-#define NV20TCL_COLOR_MATERIAL 0x00000298
-#define NV20TCL_COLOR_MATERIAL_FRONT_EMISSION_SHIFT 0
-#define NV20TCL_COLOR_MATERIAL_FRONT_EMISSION_MASK 0x00000003
-#define NV20TCL_COLOR_MATERIAL_FRONT_EMISSION_OFF 0x00000000
-#define NV20TCL_COLOR_MATERIAL_FRONT_EMISSION_COL1 0x00000001
-#define NV20TCL_COLOR_MATERIAL_FRONT_EMISSION_COL2 0x00000002
-#define NV20TCL_COLOR_MATERIAL_FRONT_AMBIENT_SHIFT 2
-#define NV20TCL_COLOR_MATERIAL_FRONT_AMBIENT_MASK 0x0000000c
-#define NV20TCL_COLOR_MATERIAL_FRONT_AMBIENT_OFF 0x00000000
-#define NV20TCL_COLOR_MATERIAL_FRONT_AMBIENT_COL1 0x00000004
-#define NV20TCL_COLOR_MATERIAL_FRONT_AMBIENT_COL2 0x00000008
-#define NV20TCL_COLOR_MATERIAL_FRONT_DIFFUSE_SHIFT 4
-#define NV20TCL_COLOR_MATERIAL_FRONT_DIFFUSE_MASK 0x00000030
-#define NV20TCL_COLOR_MATERIAL_FRONT_DIFFUSE_OFF 0x00000000
-#define NV20TCL_COLOR_MATERIAL_FRONT_DIFFUSE_COL1 0x00000010
-#define NV20TCL_COLOR_MATERIAL_FRONT_DIFFUSE_COL2 0x00000020
-#define NV20TCL_COLOR_MATERIAL_FRONT_SPECULAR_SHIFT 6
-#define NV20TCL_COLOR_MATERIAL_FRONT_SPECULAR_MASK 0x000000c0
-#define NV20TCL_COLOR_MATERIAL_FRONT_SPECULAR_OFF 0x00000000
-#define NV20TCL_COLOR_MATERIAL_FRONT_SPECULAR_COL1 0x00000040
-#define NV20TCL_COLOR_MATERIAL_FRONT_SPECULAR_COL2 0x00000080
-#define NV20TCL_COLOR_MATERIAL_BACK_EMISSION_SHIFT 8
-#define NV20TCL_COLOR_MATERIAL_BACK_EMISSION_MASK 0x00000300
-#define NV20TCL_COLOR_MATERIAL_BACK_EMISSION_OFF 0x00000000
-#define NV20TCL_COLOR_MATERIAL_BACK_EMISSION_COL1 0x00000100
-#define NV20TCL_COLOR_MATERIAL_BACK_EMISSION_COL2 0x00000200
-#define NV20TCL_COLOR_MATERIAL_BACK_AMBIENT_SHIFT 10
-#define NV20TCL_COLOR_MATERIAL_BACK_AMBIENT_MASK 0x00000c00
-#define NV20TCL_COLOR_MATERIAL_BACK_AMBIENT_OFF 0x00000000
-#define NV20TCL_COLOR_MATERIAL_BACK_AMBIENT_COL1 0x00000400
-#define NV20TCL_COLOR_MATERIAL_BACK_AMBIENT_COL2 0x00000800
-#define NV20TCL_COLOR_MATERIAL_BACK_DIFFUSE_SHIFT 12
-#define NV20TCL_COLOR_MATERIAL_BACK_DIFFUSE_MASK 0x00003000
-#define NV20TCL_COLOR_MATERIAL_BACK_DIFFUSE_OFF 0x00000000
-#define NV20TCL_COLOR_MATERIAL_BACK_DIFFUSE_COL1 0x00001000
-#define NV20TCL_COLOR_MATERIAL_BACK_DIFFUSE_COL2 0x00002000
-#define NV20TCL_COLOR_MATERIAL_BACK_SPECULAR_SHIFT 14
-#define NV20TCL_COLOR_MATERIAL_BACK_SPECULAR_MASK 0x0000c000
-#define NV20TCL_COLOR_MATERIAL_BACK_SPECULAR_OFF 0x00000000
-#define NV20TCL_COLOR_MATERIAL_BACK_SPECULAR_COL1 0x00004000
-#define NV20TCL_COLOR_MATERIAL_BACK_SPECULAR_COL2 0x00008000
-#define NV20TCL_FOG_MODE 0x0000029c
-#define NV20TCL_FOG_MODE_LINEAR_UNSIGNED 0x00000804
-#define NV20TCL_FOG_MODE_LINEAR_SIGNED 0x00002601
-#define NV20TCL_FOG_MODE_EXP_UNSIGNED 0x00000802
-#define NV20TCL_FOG_MODE_EXP_SIGNED 0x00000800
-#define NV20TCL_FOG_MODE_EXP2_UNSIGNED 0x00000803
-#define NV20TCL_FOG_MODE_EXP2_SIGNED 0x00000801
-#define NV20TCL_FOG_COORD 0x000002a0
-#define NV20TCL_FOG_COORD_DIST_RADIAL 0x00000001
-#define NV20TCL_FOG_COORD_DIST_ORTHOGONAL 0x00000002
-#define NV20TCL_FOG_COORD_DIST_ORTHOGONAL_ABS 0x00000003
-#define NV20TCL_FOG_COORD_FOG 0x00000006
-#define NV20TCL_FOG_ENABLE 0x000002a4
-#define NV20TCL_FOG_COLOR 0x000002a8
-#define NV20TCL_FOG_COLOR_R_SHIFT 0
-#define NV20TCL_FOG_COLOR_R_MASK 0x000000ff
-#define NV20TCL_FOG_COLOR_G_SHIFT 8
-#define NV20TCL_FOG_COLOR_G_MASK 0x0000ff00
-#define NV20TCL_FOG_COLOR_B_SHIFT 16
-#define NV20TCL_FOG_COLOR_B_MASK 0x00ff0000
-#define NV20TCL_FOG_COLOR_A_SHIFT 24
-#define NV20TCL_FOG_COLOR_A_MASK 0xff000000
-#define NV20TCL_VIEWPORT_CLIP_MODE 0x000002b4
-#define NV20TCL_VIEWPORT_CLIP_HORIZ(x) (0x000002c0+((x)*4))
-#define NV20TCL_VIEWPORT_CLIP_HORIZ__SIZE 0x00000008
-#define NV20TCL_VIEWPORT_CLIP_VERT(x) (0x000002e0+((x)*4))
-#define NV20TCL_VIEWPORT_CLIP_VERT__SIZE 0x00000008
-#define NV20TCL_ALPHA_FUNC_ENABLE 0x00000300
-#define NV20TCL_BLEND_FUNC_ENABLE 0x00000304
-#define NV20TCL_CULL_FACE_ENABLE 0x00000308
-#define NV20TCL_DEPTH_TEST_ENABLE 0x0000030c
-#define NV20TCL_DITHER_ENABLE 0x00000310
-#define NV20TCL_LIGHTING_ENABLE 0x00000314
-#define NV20TCL_POINT_PARAMETERS_ENABLE 0x00000318
-#define NV20TCL_POINT_SMOOTH_ENABLE 0x0000031c
-#define NV20TCL_LINE_SMOOTH_ENABLE 0x00000320
-#define NV20TCL_POLYGON_SMOOTH_ENABLE 0x00000324
-#define NV20TCL_STENCIL_ENABLE 0x0000032c
-#define NV20TCL_POLYGON_OFFSET_POINT_ENABLE 0x00000330
-#define NV20TCL_POLYGON_OFFSET_LINE_ENABLE 0x00000334
-#define NV20TCL_POLYGON_OFFSET_FILL_ENABLE 0x00000338
-#define NV20TCL_ALPHA_FUNC_FUNC 0x0000033c
-#define NV20TCL_ALPHA_FUNC_FUNC_NEVER 0x00000200
-#define NV20TCL_ALPHA_FUNC_FUNC_LESS 0x00000201
-#define NV20TCL_ALPHA_FUNC_FUNC_EQUAL 0x00000202
-#define NV20TCL_ALPHA_FUNC_FUNC_LEQUAL 0x00000203
-#define NV20TCL_ALPHA_FUNC_FUNC_GREATER 0x00000204
-#define NV20TCL_ALPHA_FUNC_FUNC_NOTEQUAL 0x00000205
-#define NV20TCL_ALPHA_FUNC_FUNC_GEQUAL 0x00000206
-#define NV20TCL_ALPHA_FUNC_FUNC_ALWAYS 0x00000207
-#define NV20TCL_ALPHA_FUNC_REF 0x00000340
-#define NV20TCL_BLEND_FUNC_SRC 0x00000344
-#define NV20TCL_BLEND_FUNC_SRC_ZERO 0x00000000
-#define NV20TCL_BLEND_FUNC_SRC_ONE 0x00000001
-#define NV20TCL_BLEND_FUNC_SRC_SRC_COLOR 0x00000300
-#define NV20TCL_BLEND_FUNC_SRC_ONE_MINUS_SRC_COLOR 0x00000301
-#define NV20TCL_BLEND_FUNC_SRC_SRC_ALPHA 0x00000302
-#define NV20TCL_BLEND_FUNC_SRC_ONE_MINUS_SRC_ALPHA 0x00000303
-#define NV20TCL_BLEND_FUNC_SRC_DST_ALPHA 0x00000304
-#define NV20TCL_BLEND_FUNC_SRC_ONE_MINUS_DST_ALPHA 0x00000305
-#define NV20TCL_BLEND_FUNC_SRC_DST_COLOR 0x00000306
-#define NV20TCL_BLEND_FUNC_SRC_ONE_MINUS_DST_COLOR 0x00000307
-#define NV20TCL_BLEND_FUNC_SRC_SRC_ALPHA_SATURATE 0x00000308
-#define NV20TCL_BLEND_FUNC_SRC_CONSTANT_COLOR 0x00008001
-#define NV20TCL_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_COLOR 0x00008002
-#define NV20TCL_BLEND_FUNC_SRC_CONSTANT_ALPHA 0x00008003
-#define NV20TCL_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_ALPHA 0x00008004
-#define NV20TCL_BLEND_FUNC_DST 0x00000348
-#define NV20TCL_BLEND_FUNC_DST_ZERO 0x00000000
-#define NV20TCL_BLEND_FUNC_DST_ONE 0x00000001
-#define NV20TCL_BLEND_FUNC_DST_SRC_COLOR 0x00000300
-#define NV20TCL_BLEND_FUNC_DST_ONE_MINUS_SRC_COLOR 0x00000301
-#define NV20TCL_BLEND_FUNC_DST_SRC_ALPHA 0x00000302
-#define NV20TCL_BLEND_FUNC_DST_ONE_MINUS_SRC_ALPHA 0x00000303
-#define NV20TCL_BLEND_FUNC_DST_DST_ALPHA 0x00000304
-#define NV20TCL_BLEND_FUNC_DST_ONE_MINUS_DST_ALPHA 0x00000305
-#define NV20TCL_BLEND_FUNC_DST_DST_COLOR 0x00000306
-#define NV20TCL_BLEND_FUNC_DST_ONE_MINUS_DST_COLOR 0x00000307
-#define NV20TCL_BLEND_FUNC_DST_SRC_ALPHA_SATURATE 0x00000308
-#define NV20TCL_BLEND_FUNC_DST_CONSTANT_COLOR 0x00008001
-#define NV20TCL_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_COLOR 0x00008002
-#define NV20TCL_BLEND_FUNC_DST_CONSTANT_ALPHA 0x00008003
-#define NV20TCL_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_ALPHA 0x00008004
-#define NV20TCL_BLEND_COLOR 0x0000034c
-#define NV20TCL_BLEND_COLOR_B_SHIFT 0
-#define NV20TCL_BLEND_COLOR_B_MASK 0x000000ff
-#define NV20TCL_BLEND_COLOR_G_SHIFT 8
-#define NV20TCL_BLEND_COLOR_G_MASK 0x0000ff00
-#define NV20TCL_BLEND_COLOR_R_SHIFT 16
-#define NV20TCL_BLEND_COLOR_R_MASK 0x00ff0000
-#define NV20TCL_BLEND_COLOR_A_SHIFT 24
-#define NV20TCL_BLEND_COLOR_A_MASK 0xff000000
-#define NV20TCL_BLEND_EQUATION 0x00000350
-#define NV20TCL_BLEND_EQUATION_FUNC_ADD 0x00008006
-#define NV20TCL_BLEND_EQUATION_MIN 0x00008007
-#define NV20TCL_BLEND_EQUATION_MAX 0x00008008
-#define NV20TCL_BLEND_EQUATION_FUNC_SUBTRACT 0x0000800a
-#define NV20TCL_BLEND_EQUATION_FUNC_REVERSE_SUBTRACT 0x0000800b
-#define NV20TCL_DEPTH_FUNC 0x00000354
-#define NV20TCL_DEPTH_FUNC_NEVER 0x00000200
-#define NV20TCL_DEPTH_FUNC_LESS 0x00000201
-#define NV20TCL_DEPTH_FUNC_EQUAL 0x00000202
-#define NV20TCL_DEPTH_FUNC_LEQUAL 0x00000203
-#define NV20TCL_DEPTH_FUNC_GREATER 0x00000204
-#define NV20TCL_DEPTH_FUNC_NOTEQUAL 0x00000205
-#define NV20TCL_DEPTH_FUNC_GEQUAL 0x00000206
-#define NV20TCL_DEPTH_FUNC_ALWAYS 0x00000207
-#define NV20TCL_COLOR_MASK 0x00000358
-#define NV20TCL_COLOR_MASK_B (1 << 0)
-#define NV20TCL_COLOR_MASK_G (1 << 8)
-#define NV20TCL_COLOR_MASK_R (1 << 16)
-#define NV20TCL_COLOR_MASK_A (1 << 24)
-#define NV20TCL_DEPTH_WRITE_ENABLE 0x0000035c
-#define NV20TCL_STENCIL_MASK 0x00000360
-#define NV20TCL_STENCIL_FUNC_FUNC 0x00000364
-#define NV20TCL_STENCIL_FUNC_FUNC_NEVER 0x00000200
-#define NV20TCL_STENCIL_FUNC_FUNC_LESS 0x00000201
-#define NV20TCL_STENCIL_FUNC_FUNC_EQUAL 0x00000202
-#define NV20TCL_STENCIL_FUNC_FUNC_LEQUAL 0x00000203
-#define NV20TCL_STENCIL_FUNC_FUNC_GREATER 0x00000204
-#define NV20TCL_STENCIL_FUNC_FUNC_NOTEQUAL 0x00000205
-#define NV20TCL_STENCIL_FUNC_FUNC_GEQUAL 0x00000206
-#define NV20TCL_STENCIL_FUNC_FUNC_ALWAYS 0x00000207
-#define NV20TCL_STENCIL_FUNC_REF 0x00000368
-#define NV20TCL_STENCIL_FUNC_MASK 0x0000036c
-#define NV20TCL_STENCIL_OP_FAIL 0x00000370
-#define NV20TCL_STENCIL_OP_FAIL_ZERO 0x00000000
-#define NV20TCL_STENCIL_OP_FAIL_INVERT 0x0000150a
-#define NV20TCL_STENCIL_OP_FAIL_KEEP 0x00001e00
-#define NV20TCL_STENCIL_OP_FAIL_REPLACE 0x00001e01
-#define NV20TCL_STENCIL_OP_FAIL_INCR 0x00001e02
-#define NV20TCL_STENCIL_OP_FAIL_DECR 0x00001e03
-#define NV20TCL_STENCIL_OP_FAIL_INCR_WRAP 0x00008507
-#define NV20TCL_STENCIL_OP_FAIL_DECR_WRAP 0x00008508
-#define NV20TCL_STENCIL_OP_ZFAIL 0x00000374
-#define NV20TCL_STENCIL_OP_ZFAIL_ZERO 0x00000000
-#define NV20TCL_STENCIL_OP_ZFAIL_INVERT 0x0000150a
-#define NV20TCL_STENCIL_OP_ZFAIL_KEEP 0x00001e00
-#define NV20TCL_STENCIL_OP_ZFAIL_REPLACE 0x00001e01
-#define NV20TCL_STENCIL_OP_ZFAIL_INCR 0x00001e02
-#define NV20TCL_STENCIL_OP_ZFAIL_DECR 0x00001e03
-#define NV20TCL_STENCIL_OP_ZFAIL_INCR_WRAP 0x00008507
-#define NV20TCL_STENCIL_OP_ZFAIL_DECR_WRAP 0x00008508
-#define NV20TCL_STENCIL_OP_ZPASS 0x00000378
-#define NV20TCL_STENCIL_OP_ZPASS_ZERO 0x00000000
-#define NV20TCL_STENCIL_OP_ZPASS_INVERT 0x0000150a
-#define NV20TCL_STENCIL_OP_ZPASS_KEEP 0x00001e00
-#define NV20TCL_STENCIL_OP_ZPASS_REPLACE 0x00001e01
-#define NV20TCL_STENCIL_OP_ZPASS_INCR 0x00001e02
-#define NV20TCL_STENCIL_OP_ZPASS_DECR 0x00001e03
-#define NV20TCL_STENCIL_OP_ZPASS_INCR_WRAP 0x00008507
-#define NV20TCL_STENCIL_OP_ZPASS_DECR_WRAP 0x00008508
-#define NV20TCL_SHADE_MODEL 0x0000037c
-#define NV20TCL_SHADE_MODEL_FLAT 0x00001d00
-#define NV20TCL_SHADE_MODEL_SMOOTH 0x00001d01
-#define NV20TCL_LINE_WIDTH 0x00000380
-#define NV20TCL_POLYGON_OFFSET_FACTOR 0x00000384
-#define NV20TCL_POLYGON_OFFSET_UNITS 0x00000388
-#define NV20TCL_POLYGON_MODE_FRONT 0x0000038c
-#define NV20TCL_POLYGON_MODE_FRONT_POINT 0x00001b00
-#define NV20TCL_POLYGON_MODE_FRONT_LINE 0x00001b01
-#define NV20TCL_POLYGON_MODE_FRONT_FILL 0x00001b02
-#define NV20TCL_POLYGON_MODE_BACK 0x00000390
-#define NV20TCL_POLYGON_MODE_BACK_POINT 0x00001b00
-#define NV20TCL_POLYGON_MODE_BACK_LINE 0x00001b01
-#define NV20TCL_POLYGON_MODE_BACK_FILL 0x00001b02
-#define NV20TCL_DEPTH_RANGE_NEAR 0x00000394
-#define NV20TCL_DEPTH_RANGE_FAR 0x00000398
-#define NV20TCL_CULL_FACE 0x0000039c
-#define NV20TCL_CULL_FACE_FRONT 0x00000404
-#define NV20TCL_CULL_FACE_BACK 0x00000405
-#define NV20TCL_CULL_FACE_FRONT_AND_BACK 0x00000408
-#define NV20TCL_FRONT_FACE 0x000003a0
-#define NV20TCL_FRONT_FACE_CW 0x00000900
-#define NV20TCL_FRONT_FACE_CCW 0x00000901
-#define NV20TCL_NORMALIZE_ENABLE 0x000003a4
-#define NV20TCL_MATERIAL_FACTOR_FRONT_R 0x000003a8
-#define NV20TCL_MATERIAL_FACTOR_FRONT_G 0x000003ac
-#define NV20TCL_MATERIAL_FACTOR_FRONT_B 0x000003b0
-#define NV20TCL_MATERIAL_FACTOR_FRONT_A 0x000003b4
-#define NV20TCL_SEPARATE_SPECULAR_ENABLE 0x000003b8
-#define NV20TCL_ENABLED_LIGHTS 0x000003bc
-#define NV20TCL_ENABLED_LIGHTS_0_SHIFT 0
-#define NV20TCL_ENABLED_LIGHTS_0_MASK 0x00000003
-#define NV20TCL_ENABLED_LIGHTS_0_DISABLED 0x00000000
-#define NV20TCL_ENABLED_LIGHTS_0_NONPOSITIONAL 0x00000001
-#define NV20TCL_ENABLED_LIGHTS_0_POSITIONAL 0x00000002
-#define NV20TCL_ENABLED_LIGHTS_0_DIRECTIONAL 0x00000003
-#define NV20TCL_ENABLED_LIGHTS_1_SHIFT 2
-#define NV20TCL_ENABLED_LIGHTS_1_MASK 0x0000000c
-#define NV20TCL_ENABLED_LIGHTS_1_DISABLED 0x00000000
-#define NV20TCL_ENABLED_LIGHTS_1_NONPOSITIONAL 0x00000004
-#define NV20TCL_ENABLED_LIGHTS_1_POSITIONAL 0x00000008
-#define NV20TCL_ENABLED_LIGHTS_1_DIRECTIONAL 0x0000000c
-#define NV20TCL_ENABLED_LIGHTS_2_SHIFT 4
-#define NV20TCL_ENABLED_LIGHTS_2_MASK 0x00000030
-#define NV20TCL_ENABLED_LIGHTS_2_DISABLED 0x00000000
-#define NV20TCL_ENABLED_LIGHTS_2_NONPOSITIONAL 0x00000010
-#define NV20TCL_ENABLED_LIGHTS_2_POSITIONAL 0x00000020
-#define NV20TCL_ENABLED_LIGHTS_2_DIRECTIONAL 0x00000030
-#define NV20TCL_ENABLED_LIGHTS_3_SHIFT 6
-#define NV20TCL_ENABLED_LIGHTS_3_MASK 0x000000c0
-#define NV20TCL_ENABLED_LIGHTS_3_DISABLED 0x00000000
-#define NV20TCL_ENABLED_LIGHTS_3_NONPOSITIONAL 0x00000040
-#define NV20TCL_ENABLED_LIGHTS_3_POSITIONAL 0x00000080
-#define NV20TCL_ENABLED_LIGHTS_3_DIRECTIONAL 0x000000c0
-#define NV20TCL_ENABLED_LIGHTS_4_SHIFT 8
-#define NV20TCL_ENABLED_LIGHTS_4_MASK 0x00000300
-#define NV20TCL_ENABLED_LIGHTS_4_DISABLED 0x00000000
-#define NV20TCL_ENABLED_LIGHTS_4_NONPOSITIONAL 0x00000100
-#define NV20TCL_ENABLED_LIGHTS_4_POSITIONAL 0x00000200
-#define NV20TCL_ENABLED_LIGHTS_4_DIRECTIONAL 0x00000300
-#define NV20TCL_ENABLED_LIGHTS_5_SHIFT 10
-#define NV20TCL_ENABLED_LIGHTS_5_MASK 0x00000c00
-#define NV20TCL_ENABLED_LIGHTS_5_DISABLED 0x00000000
-#define NV20TCL_ENABLED_LIGHTS_5_NONPOSITIONAL 0x00000400
-#define NV20TCL_ENABLED_LIGHTS_5_POSITIONAL 0x00000800
-#define NV20TCL_ENABLED_LIGHTS_5_DIRECTIONAL 0x00000c00
-#define NV20TCL_ENABLED_LIGHTS_6_SHIFT 12
-#define NV20TCL_ENABLED_LIGHTS_6_MASK 0x00003000
-#define NV20TCL_ENABLED_LIGHTS_6_DISABLED 0x00000000
-#define NV20TCL_ENABLED_LIGHTS_6_NONPOSITIONAL 0x00001000
-#define NV20TCL_ENABLED_LIGHTS_6_POSITIONAL 0x00002000
-#define NV20TCL_ENABLED_LIGHTS_6_DIRECTIONAL 0x00003000
-#define NV20TCL_ENABLED_LIGHTS_7_SHIFT 14
-#define NV20TCL_ENABLED_LIGHTS_7_MASK 0x0000c000
-#define NV20TCL_ENABLED_LIGHTS_7_DISABLED 0x00000000
-#define NV20TCL_ENABLED_LIGHTS_7_NONPOSITIONAL 0x00004000
-#define NV20TCL_ENABLED_LIGHTS_7_POSITIONAL 0x00008000
-#define NV20TCL_ENABLED_LIGHTS_7_DIRECTIONAL 0x0000c000
-#define NV20TCL_TX_GEN_MODE_S(x) (0x000003c0+((x)*16))
-#define NV20TCL_TX_GEN_MODE_S__SIZE 0x00000004
-#define NV20TCL_TX_GEN_MODE_S_FALSE 0x00000000
-#define NV20TCL_TX_GEN_MODE_S_EYE_LINEAR 0x00002400
-#define NV20TCL_TX_GEN_MODE_S_OBJECT_LINEAR 0x00002401
-#define NV20TCL_TX_GEN_MODE_S_SPHERE_MAP 0x00002402
-#define NV20TCL_TX_GEN_MODE_S_NORMAL_MAP 0x00008511
-#define NV20TCL_TX_GEN_MODE_S_REFLECTION_MAP 0x00008512
-#define NV20TCL_TX_GEN_MODE_T(x) (0x000003c4+((x)*16))
-#define NV20TCL_TX_GEN_MODE_T__SIZE 0x00000004
-#define NV20TCL_TX_GEN_MODE_T_FALSE 0x00000000
-#define NV20TCL_TX_GEN_MODE_T_EYE_LINEAR 0x00002400
-#define NV20TCL_TX_GEN_MODE_T_OBJECT_LINEAR 0x00002401
-#define NV20TCL_TX_GEN_MODE_T_SPHERE_MAP 0x00002402
-#define NV20TCL_TX_GEN_MODE_T_NORMAL_MAP 0x00008511
-#define NV20TCL_TX_GEN_MODE_T_REFLECTION_MAP 0x00008512
-#define NV20TCL_TX_GEN_MODE_R(x) (0x000003c8+((x)*16))
-#define NV20TCL_TX_GEN_MODE_R__SIZE 0x00000004
-#define NV20TCL_TX_GEN_MODE_R_FALSE 0x00000000
-#define NV20TCL_TX_GEN_MODE_R_EYE_LINEAR 0x00002400
-#define NV20TCL_TX_GEN_MODE_R_OBJECT_LINEAR 0x00002401
-#define NV20TCL_TX_GEN_MODE_R_SPHERE_MAP 0x00002402
-#define NV20TCL_TX_GEN_MODE_R_NORMAL_MAP 0x00008511
-#define NV20TCL_TX_GEN_MODE_R_REFLECTION_MAP 0x00008512
-#define NV20TCL_TX_GEN_MODE_Q(x) (0x000003cc+((x)*16))
-#define NV20TCL_TX_GEN_MODE_Q__SIZE 0x00000004
-#define NV20TCL_TX_GEN_MODE_Q_FALSE 0x00000000
-#define NV20TCL_TX_GEN_MODE_Q_EYE_LINEAR 0x00002400
-#define NV20TCL_TX_GEN_MODE_Q_OBJECT_LINEAR 0x00002401
-#define NV20TCL_TX_GEN_MODE_Q_SPHERE_MAP 0x00002402
-#define NV20TCL_TX_GEN_MODE_Q_NORMAL_MAP 0x00008511
-#define NV20TCL_TX_GEN_MODE_Q_REFLECTION_MAP 0x00008512
-#define NV20TCL_TX_MATRIX_ENABLE(x) (0x00000420+((x)*4))
-#define NV20TCL_TX_MATRIX_ENABLE__SIZE 0x00000004
-#define NV20TCL_POINT_SIZE 0x0000043c
-#define NV20TCL_MODELVIEW0_MATRIX(x) (0x00000480+((x)*4))
-#define NV20TCL_MODELVIEW0_MATRIX__SIZE 0x00000010
-#define NV20TCL_MODELVIEW1_MATRIX(x) (0x000004c0+((x)*4))
-#define NV20TCL_MODELVIEW1_MATRIX__SIZE 0x00000010
-#define NV20TCL_MODELVIEW2_MATRIX(x) (0x00000500+((x)*4))
-#define NV20TCL_MODELVIEW2_MATRIX__SIZE 0x00000010
-#define NV20TCL_MODELVIEW3_MATRIX(x) (0x00000540+((x)*4))
-#define NV20TCL_MODELVIEW3_MATRIX__SIZE 0x00000010
-#define NV20TCL_INVERSE_MODELVIEW0_MATRIX(x) (0x00000580+((x)*4))
-#define NV20TCL_INVERSE_MODELVIEW0_MATRIX__SIZE 0x00000010
-#define NV20TCL_INVERSE_MODELVIEW1_MATRIX(x) (0x000005c0+((x)*4))
-#define NV20TCL_INVERSE_MODELVIEW1_MATRIX__SIZE 0x00000010
-#define NV20TCL_INVERSE_MODELVIEW2_MATRIX(x) (0x00000600+((x)*4))
-#define NV20TCL_INVERSE_MODELVIEW2_MATRIX__SIZE 0x00000010
-#define NV20TCL_INVERSE_MODELVIEW3_MATRIX(x) (0x00000640+((x)*4))
-#define NV20TCL_INVERSE_MODELVIEW3_MATRIX__SIZE 0x00000010
-#define NV20TCL_PROJECTION_MATRIX(x) (0x00000680+((x)*4))
-#define NV20TCL_PROJECTION_MATRIX__SIZE 0x00000010
-#define NV20TCL_TX0_MATRIX(x) (0x000006c0+((x)*4))
-#define NV20TCL_TX0_MATRIX__SIZE 0x00000010
-#define NV20TCL_TX1_MATRIX(x) (0x00000700+((x)*4))
-#define NV20TCL_TX1_MATRIX__SIZE 0x00000010
-#define NV20TCL_TX2_MATRIX(x) (0x00000740+((x)*4))
-#define NV20TCL_TX2_MATRIX__SIZE 0x00000010
-#define NV20TCL_TX3_MATRIX(x) (0x00000780+((x)*4))
-#define NV20TCL_TX3_MATRIX__SIZE 0x00000010
-#define NV20TCL_TX_GEN_COEFF_S_A(x) (0x00000840+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_S_A__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_S_B(x) (0x00000844+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_S_B__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_S_C(x) (0x00000848+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_S_C__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_S_D(x) (0x0000084c+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_S_D__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_T_A(x) (0x00000850+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_T_A__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_T_B(x) (0x00000854+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_T_B__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_T_C(x) (0x00000858+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_T_C__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_T_D(x) (0x0000085c+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_T_D__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_R_A(x) (0x00000860+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_R_A__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_R_B(x) (0x00000864+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_R_B__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_R_C(x) (0x00000868+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_R_C__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_R_D(x) (0x0000086c+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_R_D__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_Q_A(x) (0x00000870+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_Q_A__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_Q_B(x) (0x00000874+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_Q_B__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_Q_C(x) (0x00000878+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_Q_C__SIZE 0x00000004
-#define NV20TCL_TX_GEN_COEFF_Q_D(x) (0x0000087c+((x)*64))
-#define NV20TCL_TX_GEN_COEFF_Q_D__SIZE 0x00000004
-#define NV20TCL_FOG_EQUATION_CONSTANT 0x000009c0
-#define NV20TCL_FOG_EQUATION_LINEAR 0x000009c4
-#define NV20TCL_FOG_EQUATION_QUADRATIC 0x000009c8
-#define NV20TCL_FRONT_MATERIAL_SHININESS(x) (0x000009e0+((x)*4))
-#define NV20TCL_FRONT_MATERIAL_SHININESS__SIZE 0x00000006
-#define NV20TCL_LIGHT_MODEL_FRONT_AMBIENT_R 0x00000a10
-#define NV20TCL_LIGHT_MODEL_FRONT_AMBIENT_G 0x00000a14
-#define NV20TCL_LIGHT_MODEL_FRONT_AMBIENT_B 0x00000a18
-#define NV20TCL_VIEWPORT_TRANSLATE_X 0x00000a20
-#define NV20TCL_VIEWPORT_TRANSLATE_Y 0x00000a24
-#define NV20TCL_VIEWPORT_TRANSLATE_Z 0x00000a28
-#define NV20TCL_VIEWPORT_TRANSLATE_W 0x00000a2c
-#define NV20TCL_POINT_PARAMETER(x) (0x00000a30+((x)*4))
-#define NV20TCL_POINT_PARAMETER__SIZE 0x00000008
-#define NV20TCL_RC_CONSTANT_COLOR0(x) (0x00000a60+((x)*4))
-#define NV20TCL_RC_CONSTANT_COLOR0__SIZE 0x00000008
-#define NV20TCL_RC_CONSTANT_COLOR0_B_SHIFT 0
-#define NV20TCL_RC_CONSTANT_COLOR0_B_MASK 0x000000ff
-#define NV20TCL_RC_CONSTANT_COLOR0_G_SHIFT 8
-#define NV20TCL_RC_CONSTANT_COLOR0_G_MASK 0x0000ff00
-#define NV20TCL_RC_CONSTANT_COLOR0_R_SHIFT 16
-#define NV20TCL_RC_CONSTANT_COLOR0_R_MASK 0x00ff0000
-#define NV20TCL_RC_CONSTANT_COLOR0_A_SHIFT 24
-#define NV20TCL_RC_CONSTANT_COLOR0_A_MASK 0xff000000
-#define NV20TCL_RC_CONSTANT_COLOR1(x) (0x00000a80+((x)*4))
-#define NV20TCL_RC_CONSTANT_COLOR1__SIZE 0x00000008
-#define NV20TCL_RC_CONSTANT_COLOR1_B_SHIFT 0
-#define NV20TCL_RC_CONSTANT_COLOR1_B_MASK 0x000000ff
-#define NV20TCL_RC_CONSTANT_COLOR1_G_SHIFT 8
-#define NV20TCL_RC_CONSTANT_COLOR1_G_MASK 0x0000ff00
-#define NV20TCL_RC_CONSTANT_COLOR1_R_SHIFT 16
-#define NV20TCL_RC_CONSTANT_COLOR1_R_MASK 0x00ff0000
-#define NV20TCL_RC_CONSTANT_COLOR1_A_SHIFT 24
-#define NV20TCL_RC_CONSTANT_COLOR1_A_MASK 0xff000000
-#define NV20TCL_RC_OUT_ALPHA(x) (0x00000aa0+((x)*4))
-#define NV20TCL_RC_OUT_ALPHA__SIZE 0x00000008
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SHIFT 0
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_MASK 0x0000000f
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_ZERO 0x00000000
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0 0x00000001
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1 0x00000002
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_FOG 0x00000003
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR 0x00000004
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR 0x00000005
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0 0x00000008
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1 0x00000009
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0 0x0000000c
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE1 0x0000000d
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F 0x0000000f
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2 0x0000000a
-#define NV20TCL_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3 0x0000000b
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SHIFT 4
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_MASK 0x000000f0
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_ZERO 0x00000000
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0 0x00000010
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1 0x00000020
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_FOG 0x00000030
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR 0x00000040
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR 0x00000050
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0 0x00000080
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1 0x00000090
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0 0x000000c0
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE1 0x000000d0
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F 0x000000f0
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2 0x000000a0
-#define NV20TCL_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3 0x000000b0
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SHIFT 8
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_MASK 0x00000f00
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_ZERO 0x00000000
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_FOG 0x00000300
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR 0x00000400
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR 0x00000500
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0 0x00000800
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1 0x00000900
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0 0x00000c00
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1 0x00000d00
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F 0x00000f00
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2 0x00000a00
-#define NV20TCL_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3 0x00000b00
-#define NV20TCL_RC_OUT_ALPHA_CD_DOT_PRODUCT (1 << 12)
-#define NV20TCL_RC_OUT_ALPHA_AB_DOT_PRODUCT (1 << 13)
-#define NV20TCL_RC_OUT_ALPHA_MUX_SUM (1 << 14)
-#define NV20TCL_RC_OUT_ALPHA_BIAS (1 << 15)
-#define NV20TCL_RC_OUT_ALPHA_BIAS_NONE 0x00000000
-#define NV20TCL_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000
-#define NV20TCL_RC_OUT_ALPHA_SCALE_SHIFT 16
-#define NV20TCL_RC_OUT_ALPHA_SCALE_MASK 0x00030000
-#define NV20TCL_RC_OUT_ALPHA_SCALE_NONE 0x00000000
-#define NV20TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO 0x00010000
-#define NV20TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR 0x00020000
-#define NV20TCL_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF 0x00030000
-#define NV20TCL_RC_IN_RGB(x) (0x00000ac0+((x)*4))
-#define NV20TCL_RC_IN_RGB__SIZE 0x00000008
-#define NV20TCL_RC_IN_RGB_D_INPUT_SHIFT 0
-#define NV20TCL_RC_IN_RGB_D_INPUT_MASK 0x0000000f
-#define NV20TCL_RC_IN_RGB_D_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0 0x00000001
-#define NV20TCL_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1 0x00000002
-#define NV20TCL_RC_IN_RGB_D_INPUT_FOG 0x00000003
-#define NV20TCL_RC_IN_RGB_D_INPUT_PRIMARY_COLOR 0x00000004
-#define NV20TCL_RC_IN_RGB_D_INPUT_SECONDARY_COLOR 0x00000005
-#define NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE0 0x00000008
-#define NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE1 0x00000009
-#define NV20TCL_RC_IN_RGB_D_INPUT_SPARE0 0x0000000c
-#define NV20TCL_RC_IN_RGB_D_INPUT_SPARE1 0x0000000d
-#define NV20TCL_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV20TCL_RC_IN_RGB_D_INPUT_E_TIMES_F 0x0000000f
-#define NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE2 0x0000000a
-#define NV20TCL_RC_IN_RGB_D_INPUT_TEXTURE3 0x0000000b
-#define NV20TCL_RC_IN_RGB_D_COMPONENT_USAGE (1 << 4)
-#define NV20TCL_RC_IN_RGB_D_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_IN_RGB_D_COMPONENT_USAGE_ALPHA 0x00000010
-#define NV20TCL_RC_IN_RGB_D_MAPPING_SHIFT 5
-#define NV20TCL_RC_IN_RGB_D_MAPPING_MASK 0x000000e0
-#define NV20TCL_RC_IN_RGB_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_IN_RGB_D_MAPPING_UNSIGNED_INVERT 0x00000020
-#define NV20TCL_RC_IN_RGB_D_MAPPING_EXPAND_NORMAL 0x00000040
-#define NV20TCL_RC_IN_RGB_D_MAPPING_EXPAND_NEGATE 0x00000060
-#define NV20TCL_RC_IN_RGB_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
-#define NV20TCL_RC_IN_RGB_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
-#define NV20TCL_RC_IN_RGB_D_MAPPING_SIGNED_IDENTITY 0x000000c0
-#define NV20TCL_RC_IN_RGB_D_MAPPING_SIGNED_NEGATE 0x000000e0
-#define NV20TCL_RC_IN_RGB_C_INPUT_SHIFT 8
-#define NV20TCL_RC_IN_RGB_C_INPUT_MASK 0x00000f00
-#define NV20TCL_RC_IN_RGB_C_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_IN_RGB_C_INPUT_CONSTANT_COLOR0 0x00000100
-#define NV20TCL_RC_IN_RGB_C_INPUT_CONSTANT_COLOR1 0x00000200
-#define NV20TCL_RC_IN_RGB_C_INPUT_FOG 0x00000300
-#define NV20TCL_RC_IN_RGB_C_INPUT_PRIMARY_COLOR 0x00000400
-#define NV20TCL_RC_IN_RGB_C_INPUT_SECONDARY_COLOR 0x00000500
-#define NV20TCL_RC_IN_RGB_C_INPUT_TEXTURE0 0x00000800
-#define NV20TCL_RC_IN_RGB_C_INPUT_TEXTURE1 0x00000900
-#define NV20TCL_RC_IN_RGB_C_INPUT_SPARE0 0x00000c00
-#define NV20TCL_RC_IN_RGB_C_INPUT_SPARE1 0x00000d00
-#define NV20TCL_RC_IN_RGB_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV20TCL_RC_IN_RGB_C_INPUT_E_TIMES_F 0x00000f00
-#define NV20TCL_RC_IN_RGB_C_INPUT_TEXTURE2 0x00000a00
-#define NV20TCL_RC_IN_RGB_C_INPUT_TEXTURE3 0x00000b00
-#define NV20TCL_RC_IN_RGB_C_COMPONENT_USAGE (1 << 12)
-#define NV20TCL_RC_IN_RGB_C_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_IN_RGB_C_COMPONENT_USAGE_ALPHA 0x00001000
-#define NV20TCL_RC_IN_RGB_C_MAPPING_SHIFT 13
-#define NV20TCL_RC_IN_RGB_C_MAPPING_MASK 0x0000e000
-#define NV20TCL_RC_IN_RGB_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_IN_RGB_C_MAPPING_UNSIGNED_INVERT 0x00002000
-#define NV20TCL_RC_IN_RGB_C_MAPPING_EXPAND_NORMAL 0x00004000
-#define NV20TCL_RC_IN_RGB_C_MAPPING_EXPAND_NEGATE 0x00006000
-#define NV20TCL_RC_IN_RGB_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
-#define NV20TCL_RC_IN_RGB_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
-#define NV20TCL_RC_IN_RGB_C_MAPPING_SIGNED_IDENTITY 0x0000c000
-#define NV20TCL_RC_IN_RGB_C_MAPPING_SIGNED_NEGATE 0x0000e000
-#define NV20TCL_RC_IN_RGB_B_INPUT_SHIFT 16
-#define NV20TCL_RC_IN_RGB_B_INPUT_MASK 0x000f0000
-#define NV20TCL_RC_IN_RGB_B_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_IN_RGB_B_INPUT_CONSTANT_COLOR0 0x00010000
-#define NV20TCL_RC_IN_RGB_B_INPUT_CONSTANT_COLOR1 0x00020000
-#define NV20TCL_RC_IN_RGB_B_INPUT_FOG 0x00030000
-#define NV20TCL_RC_IN_RGB_B_INPUT_PRIMARY_COLOR 0x00040000
-#define NV20TCL_RC_IN_RGB_B_INPUT_SECONDARY_COLOR 0x00050000
-#define NV20TCL_RC_IN_RGB_B_INPUT_TEXTURE0 0x00080000
-#define NV20TCL_RC_IN_RGB_B_INPUT_TEXTURE1 0x00090000
-#define NV20TCL_RC_IN_RGB_B_INPUT_SPARE0 0x000c0000
-#define NV20TCL_RC_IN_RGB_B_INPUT_SPARE1 0x000d0000
-#define NV20TCL_RC_IN_RGB_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
-#define NV20TCL_RC_IN_RGB_B_INPUT_E_TIMES_F 0x000f0000
-#define NV20TCL_RC_IN_RGB_B_INPUT_TEXTURE2 0x000a0000
-#define NV20TCL_RC_IN_RGB_B_INPUT_TEXTURE3 0x000b0000
-#define NV20TCL_RC_IN_RGB_B_COMPONENT_USAGE (1 << 20)
-#define NV20TCL_RC_IN_RGB_B_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_IN_RGB_B_COMPONENT_USAGE_ALPHA 0x00100000
-#define NV20TCL_RC_IN_RGB_B_MAPPING_SHIFT 21
-#define NV20TCL_RC_IN_RGB_B_MAPPING_MASK 0x00e00000
-#define NV20TCL_RC_IN_RGB_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_IN_RGB_B_MAPPING_UNSIGNED_INVERT 0x00200000
-#define NV20TCL_RC_IN_RGB_B_MAPPING_EXPAND_NORMAL 0x00400000
-#define NV20TCL_RC_IN_RGB_B_MAPPING_EXPAND_NEGATE 0x00600000
-#define NV20TCL_RC_IN_RGB_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
-#define NV20TCL_RC_IN_RGB_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
-#define NV20TCL_RC_IN_RGB_B_MAPPING_SIGNED_IDENTITY 0x00c00000
-#define NV20TCL_RC_IN_RGB_B_MAPPING_SIGNED_NEGATE 0x00e00000
-#define NV20TCL_RC_IN_RGB_A_INPUT_SHIFT 24
-#define NV20TCL_RC_IN_RGB_A_INPUT_MASK 0x0f000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_ZERO 0x00000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_CONSTANT_COLOR0 0x01000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_CONSTANT_COLOR1 0x02000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_FOG 0x03000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_PRIMARY_COLOR 0x04000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_SECONDARY_COLOR 0x05000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_TEXTURE0 0x08000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_TEXTURE1 0x09000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_SPARE0 0x0c000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_SPARE1 0x0d000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_E_TIMES_F 0x0f000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_TEXTURE2 0x0a000000
-#define NV20TCL_RC_IN_RGB_A_INPUT_TEXTURE3 0x0b000000
-#define NV20TCL_RC_IN_RGB_A_COMPONENT_USAGE (1 << 28)
-#define NV20TCL_RC_IN_RGB_A_COMPONENT_USAGE_RGB 0x00000000
-#define NV20TCL_RC_IN_RGB_A_COMPONENT_USAGE_ALPHA 0x10000000
-#define NV20TCL_RC_IN_RGB_A_MAPPING_SHIFT 29
-#define NV20TCL_RC_IN_RGB_A_MAPPING_MASK 0xe0000000
-#define NV20TCL_RC_IN_RGB_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
-#define NV20TCL_RC_IN_RGB_A_MAPPING_UNSIGNED_INVERT 0x20000000
-#define NV20TCL_RC_IN_RGB_A_MAPPING_EXPAND_NORMAL 0x40000000
-#define NV20TCL_RC_IN_RGB_A_MAPPING_EXPAND_NEGATE 0x60000000
-#define NV20TCL_RC_IN_RGB_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
-#define NV20TCL_RC_IN_RGB_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
-#define NV20TCL_RC_IN_RGB_A_MAPPING_SIGNED_IDENTITY 0xc0000000
-#define NV20TCL_RC_IN_RGB_A_MAPPING_SIGNED_NEGATE 0xe0000000
-#define NV20TCL_VIEWPORT_SCALE_X 0x00000af0
-#define NV20TCL_VIEWPORT_SCALE_Y 0x00000af4
-#define NV20TCL_VIEWPORT_SCALE_Z 0x00000af8
-#define NV20TCL_VIEWPORT_SCALE_W 0x00000afc
-#define NV20TCL_VP_UPLOAD_INST(x) (0x00000b00+((x)*4))
-#define NV20TCL_VP_UPLOAD_INST__SIZE 0x00000004
-#define NV20TCL_VP_UPLOAD_CONST(x) (0x00000b80+((x)*4))
-#define NV20TCL_VP_UPLOAD_CONST__SIZE 0x00000004
-#define NV20TCL_LIGHT_BACK_AMBIENT_R(x) (0x00000c00+((x)*64))
-#define NV20TCL_LIGHT_BACK_AMBIENT_R__SIZE 0x00000008
-#define NV20TCL_LIGHT_BACK_AMBIENT_G(x) (0x00000c04+((x)*64))
-#define NV20TCL_LIGHT_BACK_AMBIENT_G__SIZE 0x00000008
-#define NV20TCL_LIGHT_BACK_AMBIENT_B(x) (0x00000c08+((x)*64))
-#define NV20TCL_LIGHT_BACK_AMBIENT_B__SIZE 0x00000008
-#define NV20TCL_LIGHT_BACK_DIFFUSE_R(x) (0x00000c0c+((x)*64))
-#define NV20TCL_LIGHT_BACK_DIFFUSE_R__SIZE 0x00000008
-#define NV20TCL_LIGHT_BACK_DIFFUSE_G(x) (0x00000c10+((x)*64))
-#define NV20TCL_LIGHT_BACK_DIFFUSE_G__SIZE 0x00000008
-#define NV20TCL_LIGHT_BACK_DIFFUSE_B(x) (0x00000c14+((x)*64))
-#define NV20TCL_LIGHT_BACK_DIFFUSE_B__SIZE 0x00000008
-#define NV20TCL_LIGHT_BACK_SPECULAR_R(x) (0x00000c18+((x)*64))
-#define NV20TCL_LIGHT_BACK_SPECULAR_R__SIZE 0x00000008
-#define NV20TCL_LIGHT_BACK_SPECULAR_G(x) (0x00000c1c+((x)*64))
-#define NV20TCL_LIGHT_BACK_SPECULAR_G__SIZE 0x00000008
-#define NV20TCL_LIGHT_BACK_SPECULAR_B(x) (0x00000c20+((x)*64))
-#define NV20TCL_LIGHT_BACK_SPECULAR_B__SIZE 0x00000008
-#define NV20TCL_LIGHT_FRONT_AMBIENT_R(x) (0x00001000+((x)*128))
-#define NV20TCL_LIGHT_FRONT_AMBIENT_R__SIZE 0x00000008
-#define NV20TCL_LIGHT_FRONT_AMBIENT_G(x) (0x00001004+((x)*128))
-#define NV20TCL_LIGHT_FRONT_AMBIENT_G__SIZE 0x00000008
-#define NV20TCL_LIGHT_FRONT_AMBIENT_B(x) (0x00001008+((x)*128))
-#define NV20TCL_LIGHT_FRONT_AMBIENT_B__SIZE 0x00000008
-#define NV20TCL_LIGHT_FRONT_DIFFUSE_R(x) (0x0000100c+((x)*128))
-#define NV20TCL_LIGHT_FRONT_DIFFUSE_R__SIZE 0x00000008
-#define NV20TCL_LIGHT_FRONT_DIFFUSE_G(x) (0x00001010+((x)*128))
-#define NV20TCL_LIGHT_FRONT_DIFFUSE_G__SIZE 0x00000008
-#define NV20TCL_LIGHT_FRONT_DIFFUSE_B(x) (0x00001014+((x)*128))
-#define NV20TCL_LIGHT_FRONT_DIFFUSE_B__SIZE 0x00000008
-#define NV20TCL_LIGHT_FRONT_SPECULAR_R(x) (0x00001018+((x)*128))
-#define NV20TCL_LIGHT_FRONT_SPECULAR_R__SIZE 0x00000008
-#define NV20TCL_LIGHT_FRONT_SPECULAR_G(x) (0x0000101c+((x)*128))
-#define NV20TCL_LIGHT_FRONT_SPECULAR_G__SIZE 0x00000008
-#define NV20TCL_LIGHT_FRONT_SPECULAR_B(x) (0x00001020+((x)*128))
-#define NV20TCL_LIGHT_FRONT_SPECULAR_B__SIZE 0x00000008
-#define NV20TCL_LIGHT_HALF_VECTOR_X(x) (0x00001028+((x)*128))
-#define NV20TCL_LIGHT_HALF_VECTOR_X__SIZE 0x00000008
-#define NV20TCL_LIGHT_HALF_VECTOR_Y(x) (0x0000102c+((x)*128))
-#define NV20TCL_LIGHT_HALF_VECTOR_Y__SIZE 0x00000008
-#define NV20TCL_LIGHT_HALF_VECTOR_Z(x) (0x00001030+((x)*128))
-#define NV20TCL_LIGHT_HALF_VECTOR_Z__SIZE 0x00000008
-#define NV20TCL_LIGHT_DIRECTION_X(x) (0x00001034+((x)*128))
-#define NV20TCL_LIGHT_DIRECTION_X__SIZE 0x00000008
-#define NV20TCL_LIGHT_DIRECTION_Y(x) (0x00001038+((x)*128))
-#define NV20TCL_LIGHT_DIRECTION_Y__SIZE 0x00000008
-#define NV20TCL_LIGHT_DIRECTION_Z(x) (0x0000103c+((x)*128))
-#define NV20TCL_LIGHT_DIRECTION_Z__SIZE 0x00000008
-#define NV20TCL_LIGHT_SPOT_CUTOFF_A(x) (0x00001040+((x)*128))
-#define NV20TCL_LIGHT_SPOT_CUTOFF_A__SIZE 0x00000008
-#define NV20TCL_LIGHT_SPOT_CUTOFF_B(x) (0x00001044+((x)*128))
-#define NV20TCL_LIGHT_SPOT_CUTOFF_B__SIZE 0x00000008
-#define NV20TCL_LIGHT_SPOT_CUTOFF_C(x) (0x00001048+((x)*128))
-#define NV20TCL_LIGHT_SPOT_CUTOFF_C__SIZE 0x00000008
-#define NV20TCL_LIGHT_SPOT_DIR_X(x) (0x0000104c+((x)*128))
-#define NV20TCL_LIGHT_SPOT_DIR_X__SIZE 0x00000008
-#define NV20TCL_LIGHT_SPOT_DIR_Y(x) (0x00001050+((x)*128))
-#define NV20TCL_LIGHT_SPOT_DIR_Y__SIZE 0x00000008
-#define NV20TCL_LIGHT_SPOT_DIR_Z(x) (0x00001054+((x)*128))
-#define NV20TCL_LIGHT_SPOT_DIR_Z__SIZE 0x00000008
-#define NV20TCL_LIGHT_SPOT_CUTOFF_D(x) (0x00001058+((x)*128))
-#define NV20TCL_LIGHT_SPOT_CUTOFF_D__SIZE 0x00000008
-#define NV20TCL_LIGHT_POSITION_X(x) (0x0000105c+((x)*128))
-#define NV20TCL_LIGHT_POSITION_X__SIZE 0x00000008
-#define NV20TCL_LIGHT_POSITION_Y(x) (0x00001060+((x)*128))
-#define NV20TCL_LIGHT_POSITION_Y__SIZE 0x00000008
-#define NV20TCL_LIGHT_POSITION_Z(x) (0x00001064+((x)*128))
-#define NV20TCL_LIGHT_POSITION_Z__SIZE 0x00000008
-#define NV20TCL_LIGHT_ATTENUATION_CONSTANT(x) (0x00001068+((x)*128))
-#define NV20TCL_LIGHT_ATTENUATION_CONSTANT__SIZE 0x00000008
-#define NV20TCL_LIGHT_ATTENUATION_LINEAR(x) (0x0000106c+((x)*128))
-#define NV20TCL_LIGHT_ATTENUATION_LINEAR__SIZE 0x00000008
-#define NV20TCL_LIGHT_ATTENUATION_QUADRATIC(x) (0x00001070+((x)*128))
-#define NV20TCL_LIGHT_ATTENUATION_QUADRATIC__SIZE 0x00000008
-#define NV20TCL_POLYGON_STIPPLE_ENABLE 0x0000147c
-#define NV20TCL_POLYGON_STIPPLE_PATTERN(x) (0x00001480+((x)*4))
-#define NV20TCL_POLYGON_STIPPLE_PATTERN__SIZE 0x00000020
-#define NV20TCL_VERTEX_POS_3F_X 0x00001500
-#define NV20TCL_VERTEX_POS_3F_Y 0x00001504
-#define NV20TCL_VERTEX_POS_3F_Z 0x00001508
-#define NV20TCL_VERTEX_POS_4F_X 0x00001518
-#define NV20TCL_VERTEX_POS_4F_Y 0x0000151c
-#define NV20TCL_VERTEX_POS_4F_Z 0x00001520
-#define NV20TCL_VERTEX_POS_3I_XY 0x00001528
-#define NV20TCL_VERTEX_POS_3I_XY_X_SHIFT 0
-#define NV20TCL_VERTEX_POS_3I_XY_X_MASK 0x0000ffff
-#define NV20TCL_VERTEX_POS_3I_XY_Y_SHIFT 16
-#define NV20TCL_VERTEX_POS_3I_XY_Y_MASK 0xffff0000
-#define NV20TCL_VERTEX_POS_3I_Z 0x0000152c
-#define NV20TCL_VERTEX_POS_3I_Z_Z_SHIFT 0
-#define NV20TCL_VERTEX_POS_3I_Z_Z_MASK 0x0000ffff
-#define NV20TCL_VERTEX_NOR_3F_X 0x00001530
-#define NV20TCL_VERTEX_NOR_3F_Y 0x00001534
-#define NV20TCL_VERTEX_NOR_3F_Z 0x00001538
-#define NV20TCL_VERTEX_NOR_3I_XY 0x00001540
-#define NV20TCL_VERTEX_NOR_3I_XY_X_SHIFT 0
-#define NV20TCL_VERTEX_NOR_3I_XY_X_MASK 0x0000ffff
-#define NV20TCL_VERTEX_NOR_3I_XY_Y_SHIFT 16
-#define NV20TCL_VERTEX_NOR_3I_XY_Y_MASK 0xffff0000
-#define NV20TCL_VERTEX_NOR_3I_Z 0x00001544
-#define NV20TCL_VERTEX_NOR_3I_Z_Z_SHIFT 0
-#define NV20TCL_VERTEX_NOR_3I_Z_Z_MASK 0x0000ffff
-#define NV20TCL_VERTEX_COL_4F_X 0x00001550
-#define NV20TCL_VERTEX_COL_4F_Y 0x00001554
-#define NV20TCL_VERTEX_COL_4F_Z 0x00001558
-#define NV20TCL_VERTEX_COL_4F_W 0x0000155c
-#define NV20TCL_VERTEX_COL_3F_X 0x00001560
-#define NV20TCL_VERTEX_COL_3F_Y 0x00001564
-#define NV20TCL_VERTEX_COL_3F_Z 0x00001568
-#define NV20TCL_VERTEX_COL_4I 0x0000156c
-#define NV20TCL_VERTEX_COL_4I_R_SHIFT 0
-#define NV20TCL_VERTEX_COL_4I_R_MASK 0x000000ff
-#define NV20TCL_VERTEX_COL_4I_G_SHIFT 8
-#define NV20TCL_VERTEX_COL_4I_G_MASK 0x0000ff00
-#define NV20TCL_VERTEX_COL_4I_B_SHIFT 16
-#define NV20TCL_VERTEX_COL_4I_B_MASK 0x00ff0000
-#define NV20TCL_VERTEX_COL_4I_A_SHIFT 24
-#define NV20TCL_VERTEX_COL_4I_A_MASK 0xff000000
-#define NV20TCL_VERTEX_COL2_3F_X 0x00001580
-#define NV20TCL_VERTEX_COL2_3F_Y 0x00001584
-#define NV20TCL_VERTEX_COL2_3F_Z 0x00001588
-#define NV20TCL_VERTEX_COL2_4I 0x0000158c
-#define NV20TCL_VERTEX_COL2_4I_R_SHIFT 0
-#define NV20TCL_VERTEX_COL2_4I_R_MASK 0x000000ff
-#define NV20TCL_VERTEX_COL2_4I_G_SHIFT 8
-#define NV20TCL_VERTEX_COL2_4I_G_MASK 0x0000ff00
-#define NV20TCL_VERTEX_COL2_4I_B_SHIFT 16
-#define NV20TCL_VERTEX_COL2_4I_B_MASK 0x00ff0000
-#define NV20TCL_VERTEX_COL2_4I_A_SHIFT 24
-#define NV20TCL_VERTEX_COL2_4I_A_MASK 0xff000000
-#define NV20TCL_VERTEX_TX0_2F_S 0x00001590
-#define NV20TCL_VERTEX_TX0_2F_T 0x00001594
-#define NV20TCL_VERTEX_TX0_2I 0x00001598
-#define NV20TCL_VERTEX_TX0_2I_S_SHIFT 0
-#define NV20TCL_VERTEX_TX0_2I_S_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX0_2I_T_SHIFT 16
-#define NV20TCL_VERTEX_TX0_2I_T_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX0_4F_S 0x000015a0
-#define NV20TCL_VERTEX_TX0_4F_T 0x000015a4
-#define NV20TCL_VERTEX_TX0_4F_R 0x000015a8
-#define NV20TCL_VERTEX_TX0_4F_Q 0x000015ac
-#define NV20TCL_VERTEX_TX0_4I_ST 0x000015b0
-#define NV20TCL_VERTEX_TX0_4I_ST_S_SHIFT 0
-#define NV20TCL_VERTEX_TX0_4I_ST_S_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX0_4I_ST_T_SHIFT 16
-#define NV20TCL_VERTEX_TX0_4I_ST_T_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX0_4I_RQ 0x000015b4
-#define NV20TCL_VERTEX_TX0_4I_RQ_R_SHIFT 0
-#define NV20TCL_VERTEX_TX0_4I_RQ_R_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX0_4I_RQ_Q_SHIFT 16
-#define NV20TCL_VERTEX_TX0_4I_RQ_Q_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX1_2F_S 0x000015b8
-#define NV20TCL_VERTEX_TX1_2F_T 0x000015bc
-#define NV20TCL_VERTEX_TX1_2I 0x000015c0
-#define NV20TCL_VERTEX_TX1_2I_S_SHIFT 0
-#define NV20TCL_VERTEX_TX1_2I_S_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX1_2I_T_SHIFT 16
-#define NV20TCL_VERTEX_TX1_2I_T_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX1_4F_S 0x000015c8
-#define NV20TCL_VERTEX_TX1_4F_T 0x000015cc
-#define NV20TCL_VERTEX_TX1_4F_R 0x000015d0
-#define NV20TCL_VERTEX_TX1_4F_Q 0x000015d4
-#define NV20TCL_VERTEX_TX1_4I_ST 0x000015d8
-#define NV20TCL_VERTEX_TX1_4I_ST_S_SHIFT 0
-#define NV20TCL_VERTEX_TX1_4I_ST_S_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX1_4I_ST_T_SHIFT 16
-#define NV20TCL_VERTEX_TX1_4I_ST_T_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX1_4I_RQ 0x000015dc
-#define NV20TCL_VERTEX_TX1_4I_RQ_R_SHIFT 0
-#define NV20TCL_VERTEX_TX1_4I_RQ_R_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX1_4I_RQ_Q_SHIFT 16
-#define NV20TCL_VERTEX_TX1_4I_RQ_Q_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX2_2F_S 0x000015e0
-#define NV20TCL_VERTEX_TX2_2F_T 0x000015e4
-#define NV20TCL_VERTEX_TX2_2I 0x000015e8
-#define NV20TCL_VERTEX_TX2_2I_S_SHIFT 0
-#define NV20TCL_VERTEX_TX2_2I_S_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX2_2I_T_SHIFT 16
-#define NV20TCL_VERTEX_TX2_2I_T_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX2_4F_S 0x000015f0
-#define NV20TCL_VERTEX_TX2_4F_T 0x000015f4
-#define NV20TCL_VERTEX_TX2_4F_R 0x000015f8
-#define NV20TCL_VERTEX_TX2_4F_Q 0x000015fc
-#define NV20TCL_VERTEX_TX2_4I_ST 0x00001600
-#define NV20TCL_VERTEX_TX2_4I_ST_S_SHIFT 0
-#define NV20TCL_VERTEX_TX2_4I_ST_S_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX2_4I_ST_T_SHIFT 16
-#define NV20TCL_VERTEX_TX2_4I_ST_T_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX2_4I_RQ 0x00001604
-#define NV20TCL_VERTEX_TX2_4I_RQ_R_SHIFT 0
-#define NV20TCL_VERTEX_TX2_4I_RQ_R_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX2_4I_RQ_Q_SHIFT 16
-#define NV20TCL_VERTEX_TX2_4I_RQ_Q_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX3_2F_S 0x00001608
-#define NV20TCL_VERTEX_TX3_2F_T 0x0000160c
-#define NV20TCL_VERTEX_TX3_2I 0x00001610
-#define NV20TCL_VERTEX_TX3_2I_S_SHIFT 0
-#define NV20TCL_VERTEX_TX3_2I_S_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX3_2I_T_SHIFT 16
-#define NV20TCL_VERTEX_TX3_2I_T_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX3_4F_S 0x00001620
-#define NV20TCL_VERTEX_TX3_4F_T 0x00001624
-#define NV20TCL_VERTEX_TX3_4F_R 0x00001628
-#define NV20TCL_VERTEX_TX3_4F_Q 0x0000162c
-#define NV20TCL_VERTEX_TX3_4I_ST 0x00001630
-#define NV20TCL_VERTEX_TX3_4I_ST_S_SHIFT 0
-#define NV20TCL_VERTEX_TX3_4I_ST_S_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX3_4I_ST_T_SHIFT 16
-#define NV20TCL_VERTEX_TX3_4I_ST_T_MASK 0xffff0000
-#define NV20TCL_VERTEX_TX3_4I_RQ 0x00001634
-#define NV20TCL_VERTEX_TX3_4I_RQ_R_SHIFT 0
-#define NV20TCL_VERTEX_TX3_4I_RQ_R_MASK 0x0000ffff
-#define NV20TCL_VERTEX_TX3_4I_RQ_Q_SHIFT 16
-#define NV20TCL_VERTEX_TX3_4I_RQ_Q_MASK 0xffff0000
-#define NV20TCL_VERTEX_FOG_1F 0x00001698
-#define NV20TCL_EDGEFLAG_ENABLE 0x000016bc
-#define NV20TCL_VTX_CACHE_INVALIDATE 0x00001710
-#define NV20TCL_VTXBUF_ADDRESS(x) (0x00001720+((x)*4))
-#define NV20TCL_VTXBUF_ADDRESS__SIZE 0x00000010
-#define NV20TCL_VTXBUF_ADDRESS_DMA1 (1 << 31)
-#define NV20TCL_VTXBUF_ADDRESS_OFFSET_SHIFT 0
-#define NV20TCL_VTXBUF_ADDRESS_OFFSET_MASK 0x0fffffff
-#define NV20TCL_VTXFMT(x) (0x00001760+((x)*4))
-#define NV20TCL_VTXFMT__SIZE 0x00000010
-#define NV20TCL_VTXFMT_TYPE_SHIFT 0
-#define NV20TCL_VTXFMT_TYPE_MASK 0x0000000f
-#define NV20TCL_VTXFMT_TYPE_FLOAT 0x00000002
-#define NV20TCL_VTXFMT_TYPE_UBYTE 0x00000004
-#define NV20TCL_VTXFMT_TYPE_USHORT 0x00000005
-#define NV20TCL_VTXFMT_SIZE_SHIFT 4
-#define NV20TCL_VTXFMT_SIZE_MASK 0x000000f0
-#define NV20TCL_VTXFMT_STRIDE_SHIFT 8
-#define NV20TCL_VTXFMT_STRIDE_MASK 0x0000ff00
-#define NV20TCL_LIGHT_MODEL_BACK_AMBIENT_R 0x000017a0
-#define NV20TCL_LIGHT_MODEL_BACK_AMBIENT_G 0x000017a4
-#define NV20TCL_LIGHT_MODEL_BACK_AMBIENT_B 0x000017a8
-#define NV20TCL_MATERIAL_FACTOR_BACK_A 0x000017ac
-#define NV20TCL_MATERIAL_FACTOR_BACK_R 0x000017b0
-#define NV20TCL_MATERIAL_FACTOR_BACK_G 0x000017b4
-#define NV20TCL_MATERIAL_FACTOR_BACK_B 0x000017b8
-#define NV20TCL_COLOR_LOGIC_OP_ENABLE 0x000017bc
-#define NV20TCL_COLOR_LOGIC_OP_OP 0x000017c0
-#define NV20TCL_COLOR_LOGIC_OP_OP_CLEAR 0x00001500
-#define NV20TCL_COLOR_LOGIC_OP_OP_AND 0x00001501
-#define NV20TCL_COLOR_LOGIC_OP_OP_AND_REVERSE 0x00001502
-#define NV20TCL_COLOR_LOGIC_OP_OP_COPY 0x00001503
-#define NV20TCL_COLOR_LOGIC_OP_OP_AND_INVERTED 0x00001504
-#define NV20TCL_COLOR_LOGIC_OP_OP_NOOP 0x00001505
-#define NV20TCL_COLOR_LOGIC_OP_OP_XOR 0x00001506
-#define NV20TCL_COLOR_LOGIC_OP_OP_OR 0x00001507
-#define NV20TCL_COLOR_LOGIC_OP_OP_NOR 0x00001508
-#define NV20TCL_COLOR_LOGIC_OP_OP_EQUIV 0x00001509
-#define NV20TCL_COLOR_LOGIC_OP_OP_INVERT 0x0000150a
-#define NV20TCL_COLOR_LOGIC_OP_OP_OR_REVERSE 0x0000150b
-#define NV20TCL_COLOR_LOGIC_OP_OP_COPY_INVERTED 0x0000150c
-#define NV20TCL_COLOR_LOGIC_OP_OP_OR_INVERTED 0x0000150d
-#define NV20TCL_COLOR_LOGIC_OP_OP_NAND 0x0000150e
-#define NV20TCL_COLOR_LOGIC_OP_OP_SET 0x0000150f
-#define NV20TCL_LIGHT_MODEL_TWO_SIDE_ENABLE 0x000017c4
-#define NV20TCL_TX_SHADER_CULL_MODE 0x000017f8
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_S (1 << 0)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_S_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_S_LESS 0x00000001
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_T (1 << 1)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_T_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_T_LESS 0x00000002
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_R (1 << 2)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_R_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_R_LESS 0x00000004
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_Q (1 << 3)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_Q_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX0_Q_LESS 0x00000008
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_S (1 << 4)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_S_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_S_LESS 0x00000010
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_T (1 << 5)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_T_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_T_LESS 0x00000020
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_R (1 << 6)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_R_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_R_LESS 0x00000040
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_Q (1 << 7)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_Q_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX1_Q_LESS 0x00000080
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_S (1 << 8)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_S_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_S_LESS 0x00000100
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_T (1 << 9)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_T_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_T_LESS 0x00000200
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_R (1 << 10)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_R_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_R_LESS 0x00000400
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_Q (1 << 11)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_Q_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX2_Q_LESS 0x00000800
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_S (1 << 12)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_S_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_S_LESS 0x00001000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_T (1 << 13)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_T_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_T_LESS 0x00002000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_R (1 << 14)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_R_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_R_LESS 0x00004000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_Q (1 << 15)
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_Q_GEQUAL 0x00000000
-#define NV20TCL_TX_SHADER_CULL_MODE_TX3_Q_LESS 0x00008000
-#define NV20TCL_VERTEX_BEGIN_END 0x000017fc
-#define NV20TCL_VERTEX_BEGIN_END_STOP 0x00000000
-#define NV20TCL_VERTEX_BEGIN_END_POINTS 0x00000001
-#define NV20TCL_VERTEX_BEGIN_END_LINES 0x00000002
-#define NV20TCL_VERTEX_BEGIN_END_LINE_LOOP 0x00000003
-#define NV20TCL_VERTEX_BEGIN_END_LINE_STRIP 0x00000004
-#define NV20TCL_VERTEX_BEGIN_END_TRIANGLES 0x00000005
-#define NV20TCL_VERTEX_BEGIN_END_TRIANGLE_STRIP 0x00000006
-#define NV20TCL_VERTEX_BEGIN_END_TRIANGLE_FAN 0x00000007
-#define NV20TCL_VERTEX_BEGIN_END_QUADS 0x00000008
-#define NV20TCL_VERTEX_BEGIN_END_QUAD_STRIP 0x00000009
-#define NV20TCL_VERTEX_BEGIN_END_POLYGON 0x0000000a
-#define NV20TCL_VB_ELEMENT_U16 0x00001800
-#define NV20TCL_VB_ELEMENT_U16_I0_SHIFT 0
-#define NV20TCL_VB_ELEMENT_U16_I0_MASK 0x0000ffff
-#define NV20TCL_VB_ELEMENT_U16_I1_SHIFT 16
-#define NV20TCL_VB_ELEMENT_U16_I1_MASK 0xffff0000
-#define NV20TCL_VB_ELEMENT_U32 0x00001808
-#define NV20TCL_VB_VERTEX_BATCH 0x00001810
-#define NV20TCL_VB_VERTEX_BATCH_OFFSET_SHIFT 0
-#define NV20TCL_VB_VERTEX_BATCH_OFFSET_MASK 0x00ffffff
-#define NV20TCL_VB_VERTEX_BATCH_COUNT_SHIFT 24
-#define NV20TCL_VB_VERTEX_BATCH_COUNT_MASK 0xff000000
-#define NV20TCL_VERTEX_DATA 0x00001818
-#define NV20TCL_TX_SHADER_CONST_EYE_X 0x0000181c
-#define NV20TCL_TX_SHADER_CONST_EYE_Y 0x00001820
-#define NV20TCL_TX_SHADER_CONST_EYE_Z 0x00001824
-#define NV20TCL_VTX_ATTR_4F_X(x) (0x00001a00+((x)*16))
-#define NV20TCL_VTX_ATTR_4F_X__SIZE 0x00000010
-#define NV20TCL_VTX_ATTR_4F_Y(x) (0x00001a04+((x)*16))
-#define NV20TCL_VTX_ATTR_4F_Y__SIZE 0x00000010
-#define NV20TCL_VTX_ATTR_4F_Z(x) (0x00001a08+((x)*16))
-#define NV20TCL_VTX_ATTR_4F_Z__SIZE 0x00000010
-#define NV20TCL_VTX_ATTR_4F_W(x) (0x00001a0c+((x)*16))
-#define NV20TCL_VTX_ATTR_4F_W__SIZE 0x00000010
-#define NV20TCL_TX_OFFSET(x) (0x00001b00+((x)*64))
-#define NV20TCL_TX_OFFSET__SIZE 0x00000004
-#define NV20TCL_TX_FORMAT(x) (0x00001b04+((x)*64))
-#define NV20TCL_TX_FORMAT__SIZE 0x00000004
-#define NV20TCL_TX_FORMAT_DMA0 (1 << 0)
-#define NV20TCL_TX_FORMAT_DMA1 (1 << 1)
-#define NV20TCL_TX_FORMAT_CUBIC (1 << 2)
-#define NV20TCL_TX_FORMAT_NO_BORDER (1 << 3)
-#define NV20TCL_TX_FORMAT_DIMS_SHIFT 4
-#define NV20TCL_TX_FORMAT_DIMS_MASK 0x000000f0
-#define NV20TCL_TX_FORMAT_DIMS_1D 0x00000010
-#define NV20TCL_TX_FORMAT_DIMS_2D 0x00000020
-#define NV20TCL_TX_FORMAT_DIMS_3D 0x00000030
-#define NV20TCL_TX_FORMAT_FORMAT_SHIFT 8
-#define NV20TCL_TX_FORMAT_FORMAT_MASK 0x0000ff00
-#define NV20TCL_TX_FORMAT_FORMAT_L8 0x00000000
-#define NV20TCL_TX_FORMAT_FORMAT_A8 0x00000100
-#define NV20TCL_TX_FORMAT_FORMAT_A1R5G5B5 0x00000200
-#define NV20TCL_TX_FORMAT_FORMAT_A4R4G4B4 0x00000400
-#define NV20TCL_TX_FORMAT_FORMAT_R5G6B5 0x00000500
-#define NV20TCL_TX_FORMAT_FORMAT_A8R8G8B8 0x00000600
-#define NV20TCL_TX_FORMAT_FORMAT_X8R8G8B8 0x00000700
-#define NV20TCL_TX_FORMAT_FORMAT_INDEX8 0x00000b00
-#define NV20TCL_TX_FORMAT_FORMAT_DXT1 0x00000c00
-#define NV20TCL_TX_FORMAT_FORMAT_DXT3 0x00000e00
-#define NV20TCL_TX_FORMAT_FORMAT_DXT5 0x00000f00
-#define NV20TCL_TX_FORMAT_FORMAT_A1R5G5B5_RECT 0x00001000
-#define NV20TCL_TX_FORMAT_FORMAT_R5G6B5_RECT 0x00001100
-#define NV20TCL_TX_FORMAT_FORMAT_A8R8G8B8_RECT 0x00001200
-#define NV20TCL_TX_FORMAT_FORMAT_L8_RECT 0x00001300
-#define NV20TCL_TX_FORMAT_FORMAT_DSDT8_RECT 0x00001700
-#define NV20TCL_TX_FORMAT_FORMAT_A8L8 0x00001a00
-#define NV20TCL_TX_FORMAT_FORMAT_A8_RECT 0x00001b00
-#define NV20TCL_TX_FORMAT_FORMAT_A4R4G4B4_RECT 0x00001d00
-#define NV20TCL_TX_FORMAT_FORMAT_R8G8B8_RECT 0x00001e00
-#define NV20TCL_TX_FORMAT_FORMAT_A8L8_RECT 0x00002000
-#define NV20TCL_TX_FORMAT_FORMAT_DSDT8 0x00002800
-#define NV20TCL_TX_FORMAT_FORMAT_HILO16 0x00003300
-#define NV20TCL_TX_FORMAT_FORMAT_HILO16_RECT 0x00003600
-#define NV20TCL_TX_FORMAT_FORMAT_HILO8 0x00004400
-#define NV20TCL_TX_FORMAT_FORMAT_SIGNED_HILO8 0x00004500
-#define NV20TCL_TX_FORMAT_FORMAT_HILO8_RECT 0x00004600
-#define NV20TCL_TX_FORMAT_FORMAT_SIGNED_HILO8_RECT 0x00004700
-#define NV20TCL_TX_FORMAT_FORMAT_A16 0x00003200
-#define NV20TCL_TX_FORMAT_FORMAT_A16_RECT 0x00003500
-#define NV20TCL_TX_FORMAT_FORMAT_FLOAT_RGBA16_NV 0x00004a00
-#define NV20TCL_TX_FORMAT_FORMAT_FLOAT_RGBA32_NV 0x00004b00
-#define NV20TCL_TX_FORMAT_FORMAT_FLOAT_R32_NV 0x00004c00
-#define NV20TCL_TX_FORMAT_MIPMAP (1 << 19)
-#define NV20TCL_TX_FORMAT_BASE_SIZE_U_SHIFT 20
-#define NV20TCL_TX_FORMAT_BASE_SIZE_U_MASK 0x00f00000
-#define NV20TCL_TX_FORMAT_BASE_SIZE_V_SHIFT 24
-#define NV20TCL_TX_FORMAT_BASE_SIZE_V_MASK 0x0f000000
-#define NV20TCL_TX_FORMAT_BASE_SIZE_W_SHIFT 28
-#define NV20TCL_TX_FORMAT_BASE_SIZE_W_MASK 0xf0000000
-#define NV20TCL_TX_WRAP(x) (0x00001b08+((x)*64))
-#define NV20TCL_TX_WRAP__SIZE 0x00000004
-#define NV20TCL_TX_WRAP_S_SHIFT 0
-#define NV20TCL_TX_WRAP_S_MASK 0x000000ff
-#define NV20TCL_TX_WRAP_S_REPEAT 0x00000001
-#define NV20TCL_TX_WRAP_S_MIRRORED_REPEAT 0x00000002
-#define NV20TCL_TX_WRAP_S_CLAMP_TO_EDGE 0x00000003
-#define NV20TCL_TX_WRAP_S_CLAMP_TO_BORDER 0x00000004
-#define NV20TCL_TX_WRAP_S_CLAMP 0x00000005
-#define NV20TCL_TX_WRAP_T_SHIFT 8
-#define NV20TCL_TX_WRAP_T_MASK 0x00000f00
-#define NV20TCL_TX_WRAP_T_REPEAT 0x00000100
-#define NV20TCL_TX_WRAP_T_MIRRORED_REPEAT 0x00000200
-#define NV20TCL_TX_WRAP_T_CLAMP_TO_EDGE 0x00000300
-#define NV20TCL_TX_WRAP_T_CLAMP_TO_BORDER 0x00000400
-#define NV20TCL_TX_WRAP_T_CLAMP 0x00000500
-#define NV20TCL_TX_WRAP_R_SHIFT 16
-#define NV20TCL_TX_WRAP_R_MASK 0x000f0000
-#define NV20TCL_TX_WRAP_R_REPEAT 0x00010000
-#define NV20TCL_TX_WRAP_R_MIRRORED_REPEAT 0x00020000
-#define NV20TCL_TX_WRAP_R_CLAMP_TO_EDGE 0x00030000
-#define NV20TCL_TX_WRAP_R_CLAMP_TO_BORDER 0x00040000
-#define NV20TCL_TX_WRAP_R_CLAMP 0x00050000
-#define NV20TCL_TX_ENABLE(x) (0x00001b0c+((x)*64))
-#define NV20TCL_TX_ENABLE__SIZE 0x00000004
-#define NV20TCL_TX_ENABLE_ANISO_SHIFT 4
-#define NV20TCL_TX_ENABLE_ANISO_MASK 0x00000030
-#define NV20TCL_TX_ENABLE_ANISO_NONE 0x00000000
-#define NV20TCL_TX_ENABLE_ANISO_2X 0x00000010
-#define NV20TCL_TX_ENABLE_ANISO_4X 0x00000020
-#define NV20TCL_TX_ENABLE_ANISO_8X 0x00000030
-#define NV20TCL_TX_ENABLE_MIPMAP_MAX_LOD_SHIFT 14
-#define NV20TCL_TX_ENABLE_MIPMAP_MAX_LOD_MASK 0x0003c000
-#define NV20TCL_TX_ENABLE_MIPMAP_MIN_LOD_SHIFT 26
-#define NV20TCL_TX_ENABLE_MIPMAP_MIN_LOD_MASK 0x3c000000
-#define NV20TCL_TX_ENABLE_ENABLE (1 << 30)
-#define NV20TCL_TX_NPOT_PITCH(x) (0x00001b10+((x)*64))
-#define NV20TCL_TX_NPOT_PITCH__SIZE 0x00000004
-#define NV20TCL_TX_NPOT_PITCH_PITCH_SHIFT 16
-#define NV20TCL_TX_NPOT_PITCH_PITCH_MASK 0xffff0000
-#define NV20TCL_TX_FILTER(x) (0x00001b14+((x)*64))
-#define NV20TCL_TX_FILTER__SIZE 0x00000004
-#define NV20TCL_TX_FILTER_LOD_BIAS_SHIFT 8
-#define NV20TCL_TX_FILTER_LOD_BIAS_MASK 0x00000f00
-#define NV20TCL_TX_FILTER_MINIFY_SHIFT 16
-#define NV20TCL_TX_FILTER_MINIFY_MASK 0x000f0000
-#define NV20TCL_TX_FILTER_MINIFY_NEAREST 0x00010000
-#define NV20TCL_TX_FILTER_MINIFY_LINEAR 0x00020000
-#define NV20TCL_TX_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST 0x00030000
-#define NV20TCL_TX_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST 0x00040000
-#define NV20TCL_TX_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR 0x00050000
-#define NV20TCL_TX_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR 0x00060000
-#define NV20TCL_TX_FILTER_MAGNIFY_SHIFT 24
-#define NV20TCL_TX_FILTER_MAGNIFY_MASK 0x0f000000
-#define NV20TCL_TX_FILTER_MAGNIFY_NEAREST 0x01000000
-#define NV20TCL_TX_FILTER_MAGNIFY_LINEAR 0x02000000
-#define NV20TCL_TX_NPOT_SIZE(x) (0x00001b1c+((x)*64))
-#define NV20TCL_TX_NPOT_SIZE__SIZE 0x00000004
-#define NV20TCL_TX_NPOT_SIZE_H_SHIFT 0
-#define NV20TCL_TX_NPOT_SIZE_H_MASK 0x0000ffff
-#define NV20TCL_TX_NPOT_SIZE_W_SHIFT 16
-#define NV20TCL_TX_NPOT_SIZE_W_MASK 0xffff0000
-#define NV20TCL_TX_PALETTE_OFFSET(x) (0x00001b20+((x)*64))
-#define NV20TCL_TX_PALETTE_OFFSET__SIZE 0x00000004
-#define NV20TCL_TX_BORDER_COLOR(x) (0x00001b24+((x)*64))
-#define NV20TCL_TX_BORDER_COLOR__SIZE 0x00000004
-#define NV20TCL_TX_BORDER_COLOR_B_SHIFT 0
-#define NV20TCL_TX_BORDER_COLOR_B_MASK 0x000000ff
-#define NV20TCL_TX_BORDER_COLOR_G_SHIFT 8
-#define NV20TCL_TX_BORDER_COLOR_G_MASK 0x0000ff00
-#define NV20TCL_TX_BORDER_COLOR_R_SHIFT 16
-#define NV20TCL_TX_BORDER_COLOR_R_MASK 0x00ff0000
-#define NV20TCL_TX_BORDER_COLOR_A_SHIFT 24
-#define NV20TCL_TX_BORDER_COLOR_A_MASK 0xff000000
-#define NV20TCL_TX_SHADER_OFFSET_MATRIX00(x) (0x00001b28+((x)*64))
-#define NV20TCL_TX_SHADER_OFFSET_MATRIX00__SIZE 0x00000004
-#define NV20TCL_TX_SHADER_OFFSET_MATRIX01(x) (0x00001b2c+((x)*64))
-#define NV20TCL_TX_SHADER_OFFSET_MATRIX01__SIZE 0x00000004
-#define NV20TCL_TX_SHADER_OFFSET_MATRIX11(x) (0x00001b30+((x)*64))
-#define NV20TCL_TX_SHADER_OFFSET_MATRIX11__SIZE 0x00000004
-#define NV20TCL_TX_SHADER_OFFSET_MATRIX10(x) (0x00001b34+((x)*64))
-#define NV20TCL_TX_SHADER_OFFSET_MATRIX10__SIZE 0x00000004
-#define NV20TCL_DEPTH_UNK17D8 0x00001d78
-#define NV20TCL_DEPTH_UNK17D8_CLAMP_SHIFT 4
-#define NV20TCL_DEPTH_UNK17D8_CLAMP_MASK 0x000000f0
-#define NV20TCL_MULTISAMPLE_CONTROL 0x00001d7c
-#define NV20TCL_CLEAR_DEPTH_VALUE 0x00001d8c
-#define NV20TCL_CLEAR_VALUE 0x00001d90
-#define NV20TCL_CLEAR_BUFFERS 0x00001d94
-#define NV20TCL_CLEAR_BUFFERS_COLOR_A (1 << 7)
-#define NV20TCL_CLEAR_BUFFERS_COLOR_B (1 << 6)
-#define NV20TCL_CLEAR_BUFFERS_COLOR_G (1 << 5)
-#define NV20TCL_CLEAR_BUFFERS_COLOR_R (1 << 4)
-#define NV20TCL_CLEAR_BUFFERS_STENCIL (1 << 1)
-#define NV20TCL_CLEAR_BUFFERS_DEPTH (1 << 0)
-#define NV20TCL_RC_COLOR0 0x00001e20
-#define NV20TCL_RC_COLOR0_B_SHIFT 0
-#define NV20TCL_RC_COLOR0_B_MASK 0x000000ff
-#define NV20TCL_RC_COLOR0_G_SHIFT 8
-#define NV20TCL_RC_COLOR0_G_MASK 0x0000ff00
-#define NV20TCL_RC_COLOR0_R_SHIFT 16
-#define NV20TCL_RC_COLOR0_R_MASK 0x00ff0000
-#define NV20TCL_RC_COLOR0_A_SHIFT 24
-#define NV20TCL_RC_COLOR0_A_MASK 0xff000000
-#define NV20TCL_RC_COLOR1 0x00001e24
-#define NV20TCL_RC_COLOR1_B_SHIFT 0
-#define NV20TCL_RC_COLOR1_B_MASK 0x000000ff
-#define NV20TCL_RC_COLOR1_G_SHIFT 8
-#define NV20TCL_RC_COLOR1_G_MASK 0x0000ff00
-#define NV20TCL_RC_COLOR1_R_SHIFT 16
-#define NV20TCL_RC_COLOR1_R_MASK 0x00ff0000
-#define NV20TCL_RC_COLOR1_A_SHIFT 24
-#define NV20TCL_RC_COLOR1_A_MASK 0xff000000
-#define NV20TCL_BACK_MATERIAL_SHININESS(x) (0x00001e28+((x)*4))
-#define NV20TCL_BACK_MATERIAL_SHININESS__SIZE 0x00000006
-#define NV20TCL_RC_OUT_RGB(x) (0x00001e40+((x)*4))
-#define NV20TCL_RC_OUT_RGB__SIZE 0x00000008
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_SHIFT 0
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_MASK 0x0000000f
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_ZERO 0x00000000
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR0 0x00000001
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR1 0x00000002
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_FOG 0x00000003
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_PRIMARY_COLOR 0x00000004
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_SECONDARY_COLOR 0x00000005
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE0 0x00000008
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE1 0x00000009
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_SPARE0 0x0000000c
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_SPARE1 0x0000000d
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_E_TIMES_F 0x0000000f
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE2 0x0000000a
-#define NV20TCL_RC_OUT_RGB_CD_OUTPUT_TEXTURE3 0x0000000b
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_SHIFT 4
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_MASK 0x000000f0
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_ZERO 0x00000000
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR0 0x00000010
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR1 0x00000020
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_FOG 0x00000030
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_PRIMARY_COLOR 0x00000040
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_SECONDARY_COLOR 0x00000050
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE0 0x00000080
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE1 0x00000090
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0 0x000000c0
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_SPARE1 0x000000d0
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_E_TIMES_F 0x000000f0
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE2 0x000000a0
-#define NV20TCL_RC_OUT_RGB_AB_OUTPUT_TEXTURE3 0x000000b0
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_SHIFT 8
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_MASK 0x00000f00
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_ZERO 0x00000000
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_FOG 0x00000300
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_PRIMARY_COLOR 0x00000400
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_SECONDARY_COLOR 0x00000500
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE0 0x00000800
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE1 0x00000900
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0 0x00000c00
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE1 0x00000d00
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_E_TIMES_F 0x00000f00
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE2 0x00000a00
-#define NV20TCL_RC_OUT_RGB_SUM_OUTPUT_TEXTURE3 0x00000b00
-#define NV20TCL_RC_OUT_RGB_CD_DOT_PRODUCT (1 << 12)
-#define NV20TCL_RC_OUT_RGB_AB_DOT_PRODUCT (1 << 13)
-#define NV20TCL_RC_OUT_RGB_MUX_SUM (1 << 14)
-#define NV20TCL_RC_OUT_RGB_BIAS (1 << 15)
-#define NV20TCL_RC_OUT_RGB_BIAS_NONE 0x00000000
-#define NV20TCL_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000
-#define NV20TCL_RC_OUT_RGB_SCALE_SHIFT 16
-#define NV20TCL_RC_OUT_RGB_SCALE_MASK 0x00030000
-#define NV20TCL_RC_OUT_RGB_SCALE_NONE 0x00000000
-#define NV20TCL_RC_OUT_RGB_SCALE_SCALE_BY_TWO 0x00010000
-#define NV20TCL_RC_OUT_RGB_SCALE_SCALE_BY_FOUR 0x00020000
-#define NV20TCL_RC_OUT_RGB_SCALE_SCALE_BY_ONE_HALF 0x00030000
-#define NV20TCL_RC_ENABLE 0x00001e60
-#define NV20TCL_RC_ENABLE_NUM_COMBINERS_SHIFT 0
-#define NV20TCL_RC_ENABLE_NUM_COMBINERS_MASK 0x0000000f
-#define NV20TCL_TX_RCOMP 0x00001e6c
-#define NV20TCL_TX_RCOMP_NEVER 0x00000000
-#define NV20TCL_TX_RCOMP_GREATER 0x00000001
-#define NV20TCL_TX_RCOMP_EQUAL 0x00000002
-#define NV20TCL_TX_RCOMP_GEQUAL 0x00000003
-#define NV20TCL_TX_RCOMP_LESS 0x00000004
-#define NV20TCL_TX_RCOMP_NOTEQUAL 0x00000005
-#define NV20TCL_TX_RCOMP_LEQUAL 0x00000006
-#define NV20TCL_TX_RCOMP_ALWAYS 0x00000007
-#define NV20TCL_TX_SHADER_OP 0x00001e70
-#define NV20TCL_TX_SHADER_OP_TX0_SHIFT 0
-#define NV20TCL_TX_SHADER_OP_TX0_MASK 0x0000001f
-#define NV20TCL_TX_SHADER_OP_TX0_NONE 0x00000000
-#define NV20TCL_TX_SHADER_OP_TX0_TEXTURE_2D 0x00000001
-#define NV20TCL_TX_SHADER_OP_TX0_PASS_THROUGH 0x00000004
-#define NV20TCL_TX_SHADER_OP_TX0_CULL_FRAGMENT 0x00000005
-#define NV20TCL_TX_SHADER_OP_TX0_OFFSET_TEXTURE_2D 0x00000006
-#define NV20TCL_TX_SHADER_OP_TX0_DOT_PRODUCT_TEXTURE_2D 0x00000009
-#define NV20TCL_TX_SHADER_OP_TX0_DOT_PRODUCT_DEPTH_REPLACE 0x0000000a
-#define NV20TCL_TX_SHADER_OP_TX0_DEPENDANT_AR_TEXTURE_2D 0x0000000f
-#define NV20TCL_TX_SHADER_OP_TX0_DEPENDANT_GB_TEXTURE_2D 0x00000010
-#define NV20TCL_TX_SHADER_OP_TX0_DOT_PRODUCT 0x00000011
-#define NV20TCL_TX_SHADER_OP_TX1_SHIFT 5
-#define NV20TCL_TX_SHADER_OP_TX1_MASK 0x000003e0
-#define NV20TCL_TX_SHADER_OP_TX1_NONE 0x00000000
-#define NV20TCL_TX_SHADER_OP_TX1_TEXTURE_2D 0x00000020
-#define NV20TCL_TX_SHADER_OP_TX1_PASS_THROUGH 0x00000080
-#define NV20TCL_TX_SHADER_OP_TX1_CULL_FRAGMENT 0x000000a0
-#define NV20TCL_TX_SHADER_OP_TX1_OFFSET_TEXTURE_2D 0x000000c0
-#define NV20TCL_TX_SHADER_OP_TX1_DOT_PRODUCT_TEXTURE_2D 0x00000120
-#define NV20TCL_TX_SHADER_OP_TX1_DOT_PRODUCT_DEPTH_REPLACE 0x00000140
-#define NV20TCL_TX_SHADER_OP_TX1_DEPENDANT_AR_TEXTURE_2D 0x000001e0
-#define NV20TCL_TX_SHADER_OP_TX1_DEPENDANT_GB_TEXTURE_2D 0x00000200
-#define NV20TCL_TX_SHADER_OP_TX1_DOT_PRODUCT 0x00000220
-#define NV20TCL_TX_SHADER_OP_TX2_SHIFT 10
-#define NV20TCL_TX_SHADER_OP_TX2_MASK 0x00007c00
-#define NV20TCL_TX_SHADER_OP_TX2_NONE 0x00000000
-#define NV20TCL_TX_SHADER_OP_TX2_TEXTURE_2D 0x00000400
-#define NV20TCL_TX_SHADER_OP_TX2_PASS_THROUGH 0x00001000
-#define NV20TCL_TX_SHADER_OP_TX2_CULL_FRAGMENT 0x00001400
-#define NV20TCL_TX_SHADER_OP_TX2_OFFSET_TEXTURE_2D 0x00001800
-#define NV20TCL_TX_SHADER_OP_TX2_DOT_PRODUCT_TEXTURE_2D 0x00002400
-#define NV20TCL_TX_SHADER_OP_TX2_DOT_PRODUCT_DEPTH_REPLACE 0x00002800
-#define NV20TCL_TX_SHADER_OP_TX2_DEPENDANT_AR_TEXTURE_2D 0x00003c00
-#define NV20TCL_TX_SHADER_OP_TX2_DEPENDANT_GB_TEXTURE_2D 0x00004000
-#define NV20TCL_TX_SHADER_OP_TX2_DOT_PRODUCT 0x00004400
-#define NV20TCL_TX_SHADER_OP_TX3_SHIFT 15
-#define NV20TCL_TX_SHADER_OP_TX3_MASK 0x000f8000
-#define NV20TCL_TX_SHADER_OP_TX3_NONE 0x00000000
-#define NV20TCL_TX_SHADER_OP_TX3_TEXTURE_2D 0x00008000
-#define NV20TCL_TX_SHADER_OP_TX3_PASS_THROUGH 0x00020000
-#define NV20TCL_TX_SHADER_OP_TX3_CULL_FRAGMENT 0x00028000
-#define NV20TCL_TX_SHADER_OP_TX3_OFFSET_TEXTURE_2D 0x00030000
-#define NV20TCL_TX_SHADER_OP_TX3_DOT_PRODUCT_TEXTURE_2D 0x00048000
-#define NV20TCL_TX_SHADER_OP_TX3_DOT_PRODUCT_DEPTH_REPLACE 0x00050000
-#define NV20TCL_TX_SHADER_OP_TX3_DEPENDANT_AR_TEXTURE_2D 0x00078000
-#define NV20TCL_TX_SHADER_OP_TX3_DEPENDANT_GB_TEXTURE_2D 0x00080000
-#define NV20TCL_TX_SHADER_OP_TX3_DOT_PRODUCT 0x00088000
-#define NV20TCL_TX_SHADER_DOTMAPPING 0x00001e74
-#define NV20TCL_TX_SHADER_DOTMAPPING_TX0_SHIFT 0
-#define NV20TCL_TX_SHADER_DOTMAPPING_TX0_MASK 0x0000000f
-#define NV20TCL_TX_SHADER_DOTMAPPING_TX1_SHIFT 4
-#define NV20TCL_TX_SHADER_DOTMAPPING_TX1_MASK 0x000000f0
-#define NV20TCL_TX_SHADER_DOTMAPPING_TX2_SHIFT 8
-#define NV20TCL_TX_SHADER_DOTMAPPING_TX2_MASK 0x00000f00
-#define NV20TCL_TX_SHADER_DOTMAPPING_TX3_SHIFT 12
-#define NV20TCL_TX_SHADER_DOTMAPPING_TX3_MASK 0x0000f000
-#define NV20TCL_TX_SHADER_PREVIOUS 0x00001e78
-#define NV20TCL_TX_SHADER_PREVIOUS_TX0_SHIFT 8
-#define NV20TCL_TX_SHADER_PREVIOUS_TX0_MASK 0x00000f00
-#define NV20TCL_TX_SHADER_PREVIOUS_TX1_SHIFT 12
-#define NV20TCL_TX_SHADER_PREVIOUS_TX1_MASK 0x0000f000
-#define NV20TCL_TX_SHADER_PREVIOUS_TX2_SHIFT 16
-#define NV20TCL_TX_SHADER_PREVIOUS_TX2_MASK 0x00030000
-#define NV20TCL_TX_SHADER_PREVIOUS_TX3_SHIFT 20
-#define NV20TCL_TX_SHADER_PREVIOUS_TX3_MASK 0x00300000
-#define NV20TCL_ENGINE 0x00001e94
-#define NV20TCL_ENGINE_VP (1 << 1)
-#define NV20TCL_ENGINE_FIXED (1 << 2)
-#define NV20TCL_VP_UPLOAD_FROM_ID 0x00001e9c
-#define NV20TCL_VP_START_FROM_ID 0x00001ea0
-#define NV20TCL_VP_UPLOAD_CONST_ID 0x00001ea4
-
-
-#define NV25TCL 0x00000597
-
-#define NV25TCL_DMA_IN_MEMORY4 0x0000019c
-#define NV25TCL_DMA_IN_MEMORY5 0x000001a0
-#define NV25TCL_DMA_IN_MEMORY8 0x000001ac
-#define NV25TCL_DMA_IN_MEMORY9 0x000001b0
-
-#endif /* NOUVEAU_REG_H */
-
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index 0ace139b88..53a121420d 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -119,6 +119,7 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
nouveau_state_init(ctx);
nouveau_bo_state_init(ctx);
+ nouveau_scratch_init(ctx);
_mesa_meta_init(ctx);
_swrast_CreateContext(ctx);
_vbo_CreateContext(ctx);
@@ -163,6 +164,7 @@ nouveau_context_deinit(struct gl_context *ctx)
if (nctx->hw.chan)
nouveau_channel_free(&nctx->hw.chan);
+ nouveau_scratch_destroy(ctx);
nouveau_bo_state_destroy(ctx);
_mesa_free_context_data(ctx);
}
@@ -312,7 +314,7 @@ nouveau_context_make_current(__DRIcontext *dri_ctx, __DRIdrawable *dri_draw,
GLboolean
nouveau_context_unbind(__DRIcontext *dri_ctx)
{
- /* Unset current context and dispath table */
+ /* Unset current context and dispatch table */
_mesa_make_current(NULL, NULL, NULL);
return GL_TRUE;
@@ -325,10 +327,12 @@ nouveau_fallback(struct gl_context *ctx, enum nouveau_fallback mode)
nctx->fallback = MAX2(HWTNL, mode);
- if (mode < SWRAST)
+ if (mode < SWRAST) {
nouveau_state_emit(ctx);
- else
+ nouveau_bo_state_emit(ctx);
+ } else {
FIRE_RING(context_chan(ctx));
+ }
}
static void
@@ -365,5 +369,6 @@ nouveau_validate_framebuffer(struct gl_context *ctx)
validate_framebuffer(dri_ctx, dri_read,
&dri_ctx->dri2.read_stamp);
- nouveau_state_emit(ctx);
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h
index 23a8725672..7ebc676379 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h
@@ -30,6 +30,7 @@
#include "nouveau_screen.h"
#include "nouveau_state.h"
#include "nouveau_bo_state.h"
+#include "nouveau_scratch.h"
#include "nouveau_render.h"
#include "main/bitset.h"
@@ -67,6 +68,7 @@ struct nouveau_context {
struct nouveau_hw_state hw;
struct nouveau_bo_state bo;
struct nouveau_render_state render;
+ struct nouveau_scratch_state scratch;
struct {
GLboolean clear_blocked;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_render.h b/src/mesa/drivers/dri/nouveau/nouveau_render.h
index 81c6119fcc..0539c37758 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_render.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_render.h
@@ -28,46 +28,22 @@
#define __NOUVEAU_RENDER_H__
#include "vbo/vbo_context.h"
-
-struct nouveau_array_state;
+#include "nouveau_array.h"
typedef void (*dispatch_t)(struct gl_context *, unsigned int, int, unsigned int);
-typedef unsigned (*extract_u_t)(struct nouveau_array_state *, int, int);
-typedef float (*extract_f_t)(struct nouveau_array_state *, int, int);
+typedef void (*emit_t)(struct gl_context *, struct nouveau_array *, const void *);
struct nouveau_attr_info {
int vbo_index;
int imm_method;
int imm_fields;
- void (*emit)(struct gl_context *, struct nouveau_array_state *, const void *);
-};
-
-struct nouveau_array_state {
- int attr;
- int stride, fields, type;
-
- struct nouveau_bo *bo;
- unsigned offset;
- const void *buf;
-
- extract_u_t extract_u;
- extract_f_t extract_f;
-};
-
-#define RENDER_SCRATCH_COUNT 2
-#define RENDER_SCRATCH_SIZE 2*1024*1024
-
-struct nouveau_scratch_state {
- struct nouveau_bo *bo[RENDER_SCRATCH_COUNT];
-
- int index;
- int offset;
- void *buf;
+ emit_t emit;
};
struct nouveau_swtnl_state {
struct nouveau_bo *vbo;
+ unsigned offset;
void *buf;
unsigned vertex_count;
GLenum primitive;
@@ -79,8 +55,8 @@ struct nouveau_render_state {
IMM
} mode;
- struct nouveau_array_state ib;
- struct nouveau_array_state attrs[VERT_ATTRIB_MAX];
+ struct nouveau_array ib;
+ struct nouveau_array attrs[VERT_ATTRIB_MAX];
/* Maps a HW VBO index or IMM emission order to an index in
* the attrs array above (or -1 if unused). */
@@ -89,10 +65,16 @@ struct nouveau_render_state {
int attr_count;
int vertex_size;
- struct nouveau_scratch_state scratch;
struct nouveau_swtnl_state swtnl;
};
#define to_render_state(ctx) (&to_nouveau_context(ctx)->render)
+#define FOR_EACH_ATTR(render, i, attr) \
+ for (i = 0; attr = (render)->map[i], i < NUM_VERTEX_ATTRS; i++)
+
+#define FOR_EACH_BOUND_ATTR(render, i, attr) \
+ for (i = 0; attr = (render)->map[i], i < render->attr_count; i++) \
+ if (attr >= 0)
+
#endif
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_render_t.c b/src/mesa/drivers/dri/nouveau/nouveau_render_t.c
index dd38c14aa7..e0cf727d11 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_render_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_render_t.c
@@ -100,8 +100,8 @@
/*
* Select an appropriate dispatch function for the given index buffer.
*/
-static void
-get_array_dispatch(struct nouveau_array_state *a, dispatch_t *dispatch)
+static dispatch_t
+get_array_dispatch(struct nouveau_array *a)
{
if (!a->fields) {
auto void f(struct gl_context *, unsigned int, int, unsigned int);
@@ -114,7 +114,7 @@ get_array_dispatch(struct nouveau_array_state *a, dispatch_t *dispatch)
EMIT_VBO(L, ctx, start, delta, n);
};
- *dispatch = f;
+ return f;
} else if (a->type == GL_UNSIGNED_INT) {
auto void f(struct gl_context *, unsigned int, int, unsigned int);
@@ -127,7 +127,7 @@ get_array_dispatch(struct nouveau_array_state *a, dispatch_t *dispatch)
EMIT_VBO(I32, ctx, start, delta, n);
};
- *dispatch = f;
+ return f;
} else {
auto void f(struct gl_context *, unsigned int, int, unsigned int);
@@ -141,115 +141,11 @@ get_array_dispatch(struct nouveau_array_state *a, dispatch_t *dispatch)
EMIT_VBO(I16, ctx, start, delta, n & ~1);
};
- *dispatch = f;
+ return f;
}
}
/*
- * Select appropriate element extraction functions for the given
- * array.
- */
-static void
-get_array_extract(struct nouveau_array_state *a,
- extract_u_t *extract_u, extract_f_t *extract_f)
-{
-#define EXTRACT(in_t, out_t, k) \
- ({ \
- auto out_t f(struct nouveau_array_state *, int, int); \
- out_t f(struct nouveau_array_state *a, int i, int j) { \
- in_t x = ((in_t *)(a->buf + i * a->stride))[j]; \
- \
- return (out_t)x / (k); \
- }; \
- f; \
- });
-
- switch (a->type) {
- case GL_BYTE:
- *extract_u = EXTRACT(char, unsigned, 1);
- *extract_f = EXTRACT(char, float, SCHAR_MAX);
- break;
- case GL_UNSIGNED_BYTE:
- *extract_u = EXTRACT(unsigned char, unsigned, 1);
- *extract_f = EXTRACT(unsigned char, float, UCHAR_MAX);
- break;
- case GL_SHORT:
- *extract_u = EXTRACT(short, unsigned, 1);
- *extract_f = EXTRACT(short, float, SHRT_MAX);
- break;
- case GL_UNSIGNED_SHORT:
- *extract_u = EXTRACT(unsigned short, unsigned, 1);
- *extract_f = EXTRACT(unsigned short, float, USHRT_MAX);
- break;
- case GL_INT:
- *extract_u = EXTRACT(int, unsigned, 1);
- *extract_f = EXTRACT(int, float, INT_MAX);
- break;
- case GL_UNSIGNED_INT:
- *extract_u = EXTRACT(unsigned int, unsigned, 1);
- *extract_f = EXTRACT(unsigned int, float, UINT_MAX);
- break;
- case GL_FLOAT:
- *extract_u = EXTRACT(float, unsigned, 1.0 / UINT_MAX);
- *extract_f = EXTRACT(float, float, 1);
- break;
-
- default:
- assert(0);
- }
-}
-
-/*
- * Returns a pointer to a chunk of <size> bytes long GART memory. <bo>
- * will be updated with the buffer object the memory is located in.
- *
- * If <offset> is provided, it will be updated with the offset within
- * <bo> of the allocated memory. Otherwise the returned memory will
- * always be located right at the beginning of <bo>.
- */
-static inline void *
-get_scratch_vbo(struct gl_context *ctx, unsigned size, struct nouveau_bo **bo,
- unsigned *offset)
-{
- struct nouveau_scratch_state *scratch = &to_render_state(ctx)->scratch;
- void *buf;
-
- if (scratch->buf && offset &&
- size <= RENDER_SCRATCH_SIZE - scratch->offset) {
- nouveau_bo_ref(scratch->bo[scratch->index], bo);
-
- buf = scratch->buf + scratch->offset;
- *offset = scratch->offset;
- scratch->offset += size;
-
- } else if (size <= RENDER_SCRATCH_SIZE) {
- scratch->index = (scratch->index + 1) % RENDER_SCRATCH_COUNT;
- nouveau_bo_ref(scratch->bo[scratch->index], bo);
-
- nouveau_bo_map(*bo, NOUVEAU_BO_WR);
- buf = scratch->buf = (*bo)->map;
- nouveau_bo_unmap(*bo);
-
- if (offset)
- *offset = 0;
- scratch->offset = size;
-
- } else {
- nouveau_bo_new(context_dev(ctx),
- NOUVEAU_BO_MAP | NOUVEAU_BO_GART, 0, size, bo);
-
- nouveau_bo_map(*bo, NOUVEAU_BO_WR);
- buf = (*bo)->map;
- nouveau_bo_unmap(*bo);
-
- if (offset)
- *offset = 0;
- }
-
- return buf;
-}
-
-/*
* Returns how many vertices you can draw using <n> pushbuf dwords.
*/
static inline unsigned
@@ -277,6 +173,11 @@ get_max_vertices(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
case GL_UNSIGNED_BYTE:
max_out = MAX_OUT_I16;
break;
+
+ default:
+ assert(0);
+ max_out = 0;
+ break;
}
} else {
max_out = MAX_OUT_L;
@@ -286,76 +187,26 @@ get_max_vertices(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
}
}
-#include "nouveau_vbo_t.c"
-#include "nouveau_swtnl_t.c"
-
static void
-TAG(emit_material)(struct gl_context *ctx, struct nouveau_array_state *a,
+TAG(emit_material)(struct gl_context *ctx, struct nouveau_array *a,
const void *v)
{
- const int attr = a->attr - VERT_ATTRIB_GENERIC0;
- const int state = ((int []) {
- NOUVEAU_STATE_MATERIAL_FRONT_AMBIENT,
- NOUVEAU_STATE_MATERIAL_BACK_AMBIENT,
- NOUVEAU_STATE_MATERIAL_FRONT_DIFFUSE,
- NOUVEAU_STATE_MATERIAL_BACK_DIFFUSE,
- NOUVEAU_STATE_MATERIAL_FRONT_SPECULAR,
- NOUVEAU_STATE_MATERIAL_BACK_SPECULAR,
- NOUVEAU_STATE_MATERIAL_FRONT_AMBIENT,
- NOUVEAU_STATE_MATERIAL_BACK_AMBIENT,
- NOUVEAU_STATE_MATERIAL_FRONT_SHININESS,
- NOUVEAU_STATE_MATERIAL_BACK_SHININESS
- }) [attr];
+ int attr = a->attr - VERT_ATTRIB_GENERIC0;
+ int state = ((int []) {
+ NOUVEAU_STATE_MATERIAL_FRONT_AMBIENT,
+ NOUVEAU_STATE_MATERIAL_BACK_AMBIENT,
+ NOUVEAU_STATE_MATERIAL_FRONT_DIFFUSE,
+ NOUVEAU_STATE_MATERIAL_BACK_DIFFUSE,
+ NOUVEAU_STATE_MATERIAL_FRONT_SPECULAR,
+ NOUVEAU_STATE_MATERIAL_BACK_SPECULAR,
+ NOUVEAU_STATE_MATERIAL_FRONT_AMBIENT,
+ NOUVEAU_STATE_MATERIAL_BACK_AMBIENT,
+ NOUVEAU_STATE_MATERIAL_FRONT_SHININESS,
+ NOUVEAU_STATE_MATERIAL_BACK_SHININESS
+ }) [attr];
COPY_4V(ctx->Light.Material.Attrib[attr], (float *)v);
_mesa_update_material(ctx, 1 << attr);
context_drv(ctx)->emit[state](ctx, state);
}
-
-static void
-TAG(render_prims)(struct gl_context *ctx, const struct gl_client_array **arrays,
- const struct _mesa_prim *prims, GLuint nr_prims,
- const struct _mesa_index_buffer *ib,
- GLboolean index_bounds_valid,
- GLuint min_index, GLuint max_index)
-{
- struct nouveau_context *nctx = to_nouveau_context(ctx);
-
- nouveau_validate_framebuffer(ctx);
-
- if (nctx->fallback == HWTNL)
- TAG(vbo_render_prims)(ctx, arrays, prims, nr_prims, ib,
- index_bounds_valid, min_index, max_index);
-
- if (nctx->fallback == SWTNL)
- _tnl_vbo_draw_prims(ctx, arrays, prims, nr_prims, ib,
- index_bounds_valid, min_index, max_index);
-}
-
-void
-TAG(render_init)(struct gl_context *ctx)
-{
- struct nouveau_render_state *render = to_render_state(ctx);
- struct nouveau_scratch_state *scratch = &render->scratch;
- int ret, i;
-
- for (i = 0; i < RENDER_SCRATCH_COUNT; i++) {
- ret = nouveau_bo_new(context_dev(ctx),
- NOUVEAU_BO_MAP | NOUVEAU_BO_GART,
- 0, RENDER_SCRATCH_SIZE, &scratch->bo[i]);
- assert(!ret);
- }
-
- for (i = 0; i < VERT_ATTRIB_MAX; i++)
- render->map[i] = -1;
-
- TAG(swtnl_init)(ctx);
- vbo_set_draw_func(ctx, TAG(render_prims));
-}
-
-void
-TAG(render_destroy)(struct gl_context *ctx)
-{
- TAG(swtnl_destroy)(ctx);
-}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_scratch.c b/src/mesa/drivers/dri/nouveau/nouveau_scratch.c
new file mode 100644
index 0000000000..ddda67b2f1
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nouveau_scratch.c
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2009-2010 Francisco Jerez.
+ * 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 "nouveau_driver.h"
+#include "nouveau_context.h"
+
+/*
+ * Returns a pointer to a chunk of 'size' bytes long GART memory. 'bo'
+ * and 'offset' will point to the returned memory.
+ */
+void *
+nouveau_get_scratch(struct gl_context *ctx, unsigned size,
+ struct nouveau_bo **bo, unsigned *offset)
+{
+ struct nouveau_scratch_state *scratch =
+ &to_nouveau_context(ctx)->scratch;
+ void *buf;
+
+ if (scratch->buf && size <= NOUVEAU_SCRATCH_SIZE - scratch->offset) {
+ nouveau_bo_ref(scratch->bo[scratch->index], bo);
+
+ buf = scratch->buf + scratch->offset;
+ *offset = scratch->offset;
+ scratch->offset += size;
+
+ } else if (size <= NOUVEAU_SCRATCH_SIZE) {
+ scratch->index = (scratch->index + 1) % NOUVEAU_SCRATCH_COUNT;
+ nouveau_bo_ref(scratch->bo[scratch->index], bo);
+
+ nouveau_bo_map(*bo, NOUVEAU_BO_WR);
+ buf = scratch->buf = (*bo)->map;
+ nouveau_bo_unmap(*bo);
+
+ *offset = 0;
+ scratch->offset = size;
+
+ } else {
+ nouveau_bo_new(context_dev(ctx),
+ NOUVEAU_BO_MAP | NOUVEAU_BO_GART, 0, size, bo);
+
+ nouveau_bo_map(*bo, NOUVEAU_BO_WR);
+ buf = (*bo)->map;
+ nouveau_bo_unmap(*bo);
+
+ *offset = 0;
+ }
+
+ return buf;
+}
+
+void
+nouveau_scratch_init(struct gl_context *ctx)
+{
+ struct nouveau_scratch_state *scratch =
+ &to_nouveau_context(ctx)->scratch;
+ int ret, i;
+
+ for (i = 0; i < NOUVEAU_SCRATCH_COUNT; i++) {
+ ret = nouveau_bo_new(context_dev(ctx),
+ NOUVEAU_BO_MAP | NOUVEAU_BO_GART,
+ 0, NOUVEAU_SCRATCH_SIZE, &scratch->bo[i]);
+ assert(!ret);
+ }
+}
+
+void
+nouveau_scratch_destroy(struct gl_context *ctx)
+{
+ struct nouveau_scratch_state *scratch =
+ &to_nouveau_context(ctx)->scratch;
+ int i;
+
+ for (i = 0; i < NOUVEAU_SCRATCH_COUNT; i++)
+ nouveau_bo_ref(NULL, &scratch->bo[i]);
+}
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_scratch.h b/src/mesa/drivers/dri/nouveau/nouveau_scratch.h
new file mode 100644
index 0000000000..b60b33dd1a
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nouveau_scratch.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2009-2010 Francisco Jerez.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef __NOUVEAU_SCRATCH_H__
+#define __NOUVEAU_SCRATCH_H__
+
+#define NOUVEAU_SCRATCH_COUNT 2
+#define NOUVEAU_SCRATCH_SIZE 3*1024*1024
+
+struct nouveau_scratch_state {
+ struct nouveau_bo *bo[NOUVEAU_SCRATCH_COUNT];
+
+ int index;
+ int offset;
+ void *buf;
+};
+
+void *
+nouveau_get_scratch(struct gl_context *ctx, unsigned size,
+ struct nouveau_bo **bo, unsigned *offset);
+
+void
+nouveau_scratch_init(struct gl_context *ctx);
+
+void
+nouveau_scratch_destroy(struct gl_context *ctx);
+
+#endif
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c
index 7b7ddd2f54..1579d29efc 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_state.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c
@@ -113,6 +113,12 @@ nouveau_depth_range(struct gl_context *ctx, GLclampd nearval, GLclampd farval)
}
static void
+nouveau_read_buffer(struct gl_context *ctx, GLenum buffer)
+{
+ nouveau_validate_framebuffer(ctx);
+}
+
+static void
nouveau_draw_buffers(struct gl_context *ctx, GLsizei n, const GLenum *buffers)
{
nouveau_validate_framebuffer(ctx);
@@ -512,6 +518,7 @@ nouveau_state_init(struct gl_context *ctx)
ctx->Driver.DepthFunc = nouveau_depth_func;
ctx->Driver.DepthMask = nouveau_depth_mask;
ctx->Driver.DepthRange = nouveau_depth_range;
+ ctx->Driver.ReadBuffer = nouveau_read_buffer;
ctx->Driver.DrawBuffers = nouveau_draw_buffers;
ctx->Driver.Enable = nouveau_enable;
ctx->Driver.Fogfv = nouveau_fog;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c b/src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c
index b3588e8fd3..f084f89d29 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_swtnl_t.c
@@ -28,6 +28,8 @@
#include "tnl/t_pipeline.h"
#include "tnl/t_vertex.h"
+#define SWTNL_VBO_SIZE 65536
+
static enum tnl_attr_format
swtnl_get_format(int type, int fields) {
switch (type) {
@@ -105,7 +107,7 @@ swtnl_choose_attrs(struct gl_context *ctx)
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct tnl_clipspace *vtx = &tnl->clipspace;
static struct tnl_attr_map map[NUM_VERTEX_ATTRS];
- int fields, i, n = 0;
+ int fields, attr, i, n = 0;
render->mode = VBO;
render->attr_count = NUM_VERTEX_ATTRS;
@@ -116,7 +118,7 @@ swtnl_choose_attrs(struct gl_context *ctx)
for (i = 0; i < VERT_ATTRIB_MAX; i++) {
struct nouveau_attr_info *ha = &TAG(vertex_attrs)[i];
struct swtnl_attr_info *sa = &swtnl_attrs[i];
- struct nouveau_array_state *a = &render->attrs[i];
+ struct nouveau_array *a = &render->attrs[i];
if (!sa->fields)
continue; /* Unsupported attribute. */
@@ -141,13 +143,8 @@ swtnl_choose_attrs(struct gl_context *ctx)
_tnl_install_attrs(ctx, map, n, NULL, 0);
- for (i = 0; i < vtx->attr_count; i++) {
- struct tnl_clipspace_attr *ta = &vtx->attr[i];
- struct nouveau_array_state *a = &render->attrs[ta->attrib];
-
- a->stride = vtx->vertex_size;
- a->offset = ta->vertoffset;
- }
+ FOR_EACH_BOUND_ATTR(render, i, attr)
+ render->attrs[attr].stride = vtx->vertex_size;
TAG(render_set_format)(ctx);
}
@@ -158,8 +155,8 @@ swtnl_alloc_vertices(struct gl_context *ctx)
struct nouveau_swtnl_state *swtnl = &to_render_state(ctx)->swtnl;
nouveau_bo_ref(NULL, &swtnl->vbo);
- swtnl->buf = get_scratch_vbo(ctx, RENDER_SCRATCH_SIZE,
- &swtnl->vbo, NULL);
+ swtnl->buf = nouveau_get_scratch(ctx, SWTNL_VBO_SIZE, &swtnl->vbo,
+ &swtnl->offset);
swtnl->vertex_count = 0;
}
@@ -168,14 +165,15 @@ swtnl_bind_vertices(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_swtnl_state *swtnl = &render->swtnl;
+ struct tnl_clipspace *vtx = &TNL_CONTEXT(ctx)->clipspace;
int i;
- for (i = 0; i < render->attr_count; i++) {
- int attr = render->map[i];
+ for (i = 0; i < vtx->attr_count; i++) {
+ struct tnl_clipspace_attr *ta = &vtx->attr[i];
+ struct nouveau_array *a = &render->attrs[ta->attrib];
- if (attr >= 0)
- nouveau_bo_ref(swtnl->vbo,
- &render->attrs[attr].bo);
+ nouveau_bo_ref(swtnl->vbo, &a->bo);
+ a->offset = swtnl->offset + ta->vertoffset;
}
TAG(render_bind_vertices)(ctx);
@@ -185,15 +183,11 @@ static void
swtnl_unbind_vertices(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
- int i;
-
- for (i = 0; i < render->attr_count; i++) {
- int *attr = &render->map[i];
+ int i, attr;
- if (*attr >= 0) {
- nouveau_bo_ref(NULL, &render->attrs[*attr].bo);
- *attr = -1;
- }
+ FOR_EACH_BOUND_ATTR(render, i, attr) {
+ nouveau_bo_ref(NULL, &render->attrs[attr].bo);
+ render->map[i] = -1;
}
render->attr_count = 0;
@@ -260,7 +254,7 @@ swtnl_reset_stipple(struct gl_context *ctx)
struct nouveau_swtnl_state *swtnl = &to_render_state(ctx)->swtnl; \
int vertex_len = TNL_CONTEXT(ctx)->clipspace.vertex_size; \
\
- if (swtnl->vertex_count + (n) > swtnl->vbo->size/vertex_len \
+ if (swtnl->vertex_count + (n) > SWTNL_VBO_SIZE/vertex_len \
|| (swtnl->vertex_count && swtnl->primitive != p)) \
swtnl_flush_vertices(ctx); \
\
@@ -280,7 +274,7 @@ swtnl_points(struct gl_context *ctx, GLuint first, GLuint last)
while (first < last) {
BEGIN_PRIMITIVE(GL_POINTS, last - first);
- count = MIN2(swtnl->vbo->size / vertex_len, last - first);
+ count = MIN2(SWTNL_VBO_SIZE / vertex_len, last - first);
for (i = 0; i < count; i++)
OUT_VERTEX(first + i);
@@ -316,7 +310,7 @@ swtnl_quad(struct gl_context *ctx, GLuint v1, GLuint v2, GLuint v3, GLuint v4)
}
/* TnL initialization. */
-static void
+void
TAG(swtnl_init)(struct gl_context *ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -347,7 +341,7 @@ TAG(swtnl_init)(struct gl_context *ctx)
swtnl_alloc_vertices(ctx);
}
-static void
+void
TAG(swtnl_destroy)(struct gl_context *ctx)
{
nouveau_bo_ref(NULL, &to_render_state(ctx)->swtnl.vbo);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index cd063702af..2480b1ea50 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -79,26 +79,65 @@ nouveau_teximage_free(struct gl_context *ctx, struct gl_texture_image *ti)
}
static void
-nouveau_teximage_map(struct gl_context *ctx, struct gl_texture_image *ti)
+nouveau_teximage_map(struct gl_context *ctx, struct gl_texture_image *ti,
+ int access, int x, int y, int w, int h)
{
- struct nouveau_surface *s = &to_nouveau_teximage(ti)->surface;
- int ret;
+ struct nouveau_teximage *nti = to_nouveau_teximage(ti);
+ struct nouveau_surface *s = &nti->surface;
+ struct nouveau_surface *st = &nti->transfer.surface;
if (s->bo) {
- ret = nouveau_bo_map(s->bo, NOUVEAU_BO_RDWR);
- assert(!ret);
-
- ti->Data = s->bo->map;
+ if (!(access & GL_MAP_READ_BIT) &&
+ nouveau_bo_pending(s->bo)) {
+ /*
+ * Heuristic: use a bounce buffer to pipeline
+ * teximage transfers.
+ */
+ st->layout = LINEAR;
+ st->format = s->format;
+ st->cpp = s->cpp;
+ st->width = w;
+ st->height = h;
+ st->pitch = s->pitch;
+ nti->transfer.x = x;
+ nti->transfer.y = y;
+
+ ti->Data = nouveau_get_scratch(ctx, st->pitch * h,
+ &st->bo, &st->offset);
+
+ } else {
+ int ret, flags = 0;
+
+ if (access & GL_MAP_READ_BIT)
+ flags |= NOUVEAU_BO_RD;
+ if (access & GL_MAP_WRITE_BIT)
+ flags |= NOUVEAU_BO_WR;
+
+ ret = nouveau_bo_map(s->bo, flags);
+ assert(!ret);
+
+ ti->Data = s->bo->map + y * s->pitch + x * s->cpp;
+ }
}
}
static void
nouveau_teximage_unmap(struct gl_context *ctx, struct gl_texture_image *ti)
{
- struct nouveau_surface *s = &to_nouveau_teximage(ti)->surface;
+ struct nouveau_teximage *nti = to_nouveau_teximage(ti);
+ struct nouveau_surface *s = &nti->surface;
+ struct nouveau_surface *st = &nti->transfer.surface;
- if (s->bo)
+ if (st->bo) {
+ context_drv(ctx)->surface_copy(ctx, s, st, nti->transfer.x,
+ nti->transfer.y, 0, 0,
+ st->width, st->height);
+ nouveau_surface_ref(NULL, st);
+
+ } else if (s->bo) {
nouveau_bo_unmap(s->bo);
+ }
+
ti->Data = NULL;
}
@@ -115,6 +154,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLint internalFormat,
case GL_RGBA12:
case GL_RGBA16:
case GL_RGB10_A2:
+ case GL_COMPRESSED_RGBA:
return MESA_FORMAT_ARGB8888;
case GL_RGB5_A1:
return MESA_FORMAT_ARGB1555;
@@ -124,6 +164,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLint internalFormat,
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
+ case GL_COMPRESSED_RGB:
return MESA_FORMAT_XRGB8888;
case 3:
case GL_R3_G3_B2:
@@ -139,6 +180,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLint internalFormat,
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
case GL_LUMINANCE8_ALPHA8:
+ case GL_COMPRESSED_LUMINANCE_ALPHA:
return MESA_FORMAT_ARGB8888;
case 1:
@@ -147,6 +189,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLint internalFormat,
case GL_LUMINANCE12:
case GL_LUMINANCE16:
case GL_LUMINANCE8:
+ case GL_COMPRESSED_LUMINANCE:
return MESA_FORMAT_L8;
case GL_ALPHA:
@@ -154,6 +197,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLint internalFormat,
case GL_ALPHA12:
case GL_ALPHA16:
case GL_ALPHA8:
+ case GL_COMPRESSED_ALPHA:
return MESA_FORMAT_A8;
case GL_INTENSITY:
@@ -356,7 +400,8 @@ nouveau_teximage(struct gl_context *ctx, GLint dims, GLenum target, GLint level,
"glTexImage");
if (pixels) {
/* Store the pixel data. */
- nouveau_teximage_map(ctx, ti);
+ nouveau_teximage_map(ctx, ti, GL_MAP_WRITE_BIT,
+ 0, 0, width, height);
ret = _mesa_texstore(ctx, dims, ti->_BaseFormat,
ti->TexFormat, ti->Data,
@@ -443,13 +488,13 @@ nouveau_texsubimage(struct gl_context *ctx, GLint dims, GLenum target, GLint lev
format, type, pixels, packing,
"glTexSubImage");
if (pixels) {
- nouveau_teximage_map(ctx, ti);
+ nouveau_teximage_map(ctx, ti, GL_MAP_WRITE_BIT,
+ xoffset, yoffset, width, height);
ret = _mesa_texstore(ctx, 3, ti->_BaseFormat, ti->TexFormat,
- ti->Data, xoffset, yoffset, zoffset,
- s->pitch, ti->ImageOffsets,
- width, height, depth, format, type,
- pixels, packing);
+ ti->Data, 0, 0, 0, s->pitch,
+ ti->ImageOffsets, width, height, depth,
+ format, type, pixels, packing);
assert(ret);
nouveau_teximage_unmap(ctx, ti);
@@ -508,7 +553,8 @@ nouveau_get_teximage(struct gl_context *ctx, GLenum target, GLint level,
struct gl_texture_object *t,
struct gl_texture_image *ti)
{
- nouveau_teximage_map(ctx, ti);
+ nouveau_teximage_map(ctx, ti, GL_MAP_READ_BIT,
+ 0, 0, ti->Width, ti->Height);
_mesa_get_teximage(ctx, target, level, format, type, pixels,
t, ti);
nouveau_teximage_unmap(ctx, ti);
@@ -557,11 +603,12 @@ nouveau_set_texbuffer(__DRIcontext *dri_ctx,
nouveau_update_renderbuffers(dri_ctx, draw);
nouveau_surface_ref(&to_nouveau_renderbuffer(rb)->surface, s);
+ s->format = get_texbuffer_format(rb, format);
+
/* Update the image fields. */
_mesa_init_teximage_fields(ctx, target, ti, s->width, s->height,
- 1, 0, s->cpp);
+ 1, 0, s->cpp, s->format);
ti->RowStride = s->pitch / s->cpp;
- ti->TexFormat = s->format = get_texbuffer_format(rb, format);
/* Try to validate it. */
if (!validate_teximage(ctx, t, 0, 0, 0, 0, s->width, s->height, 1))
@@ -579,8 +626,11 @@ nouveau_texture_map(struct gl_context *ctx, struct gl_texture_object *t)
int i;
for (i = t->BaseLevel; i < t->_MaxLevel; i++) {
- if (t->Image[0][i])
- nouveau_teximage_map(ctx, t->Image[0][i]);
+ struct gl_texture_image *ti = t->Image[0][i];
+
+ if (ti)
+ nouveau_teximage_map(ctx, ti, GL_MAP_READ_BIT,
+ 0, 0, ti->Width, ti->Height);
}
}
@@ -630,7 +680,8 @@ nouveau_generate_mipmap(struct gl_context *ctx, GLenum target,
if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, t)) {
struct gl_texture_image *base = t->Image[0][t->BaseLevel];
- nouveau_teximage_map(ctx, base);
+ nouveau_teximage_map(ctx, base, GL_MAP_READ_BIT,
+ 0, 0, base->Width, base->Height);
_mesa_generate_mipmap(ctx, target, t);
nouveau_teximage_unmap(ctx, base);
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.h b/src/mesa/drivers/dri/nouveau/nouveau_texture.h
index fc170215f3..56e61c7337 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.h
@@ -30,6 +30,10 @@
struct nouveau_teximage {
struct gl_texture_image base;
struct nouveau_surface surface;
+ struct {
+ struct nouveau_surface surface;
+ int x, y;
+ } transfer;
};
#define to_nouveau_teximage(x) ((struct nouveau_teximage *)(x))
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h
index 8df8867d14..6d01934dad 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_util.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h
@@ -164,6 +164,12 @@ get_viewport_translate(struct gl_context *ctx, float a[4])
}
static inline void
+OUT_RINGb(struct nouveau_channel *chan, GLboolean x)
+{
+ OUT_RING(chan, x ? 1 : 0);
+}
+
+static inline void
OUT_RINGm(struct nouveau_channel *chan, float m[16])
{
int i, j;
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
index 394f3c9b50..d8b331cca7 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c
@@ -31,59 +31,11 @@
#include "main/image.h"
/* Arbitrary pushbuf length we can assume we can get with a single
- * WAIT_RING. */
+ * call to WAIT_RING. */
#define PUSHBUF_DWORDS 65536
-/* Functions to set up struct nouveau_array_state from something like
- * a GL array or index buffer. */
-
-static void
-vbo_init_array(struct nouveau_array_state *a, int attr, int stride,
- int fields, int type, struct gl_buffer_object *obj,
- const void *ptr, GLboolean map)
-{
- a->attr = attr;
- a->stride = stride;
- a->fields = fields;
- a->type = type;
-
- if (_mesa_is_bufferobj(obj)) {
- nouveau_bo_ref(to_nouveau_bufferobj(obj)->bo, &a->bo);
- a->offset = (intptr_t)ptr;
-
- if (map) {
- nouveau_bo_map(a->bo, NOUVEAU_BO_RD);
- a->buf = a->bo->map + a->offset;
- } else {
- a->buf = NULL;
- }
-
- } else {
- nouveau_bo_ref(NULL, &a->bo);
- a->offset = 0;
-
- if (map)
- a->buf = ptr;
- else
- a->buf = NULL;
- }
-
- if (a->buf)
- get_array_extract(a, &a->extract_u, &a->extract_f);
-}
-
-static void
-vbo_deinit_array(struct nouveau_array_state *a)
-{
- if (a->bo) {
- if (a->bo->map)
- nouveau_bo_unmap(a->bo);
- nouveau_bo_ref(NULL, &a->bo);
- }
-
- a->buf = NULL;
- a->fields = 0;
-}
+/* Functions to turn GL arrays or index buffers into nouveau_array
+ * structures. */
static int
get_array_stride(struct gl_context *ctx, const struct gl_client_array *a)
@@ -102,48 +54,45 @@ vbo_init_arrays(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
const struct gl_client_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
- int i;
+ GLboolean imm = (render->mode == IMM);
+ int i, attr;
if (ib)
- vbo_init_array(&render->ib, 0, 0, ib->count, ib->type,
- ib->obj, ib->ptr, GL_TRUE);
+ nouveau_init_array(&render->ib, 0, 0, ib->count, ib->type,
+ ib->obj, ib->ptr, GL_TRUE);
- for (i = 0; i < render->attr_count; i++) {
- int attr = render->map[i];
+ FOR_EACH_BOUND_ATTR(render, i, attr) {
+ const struct gl_client_array *array = arrays[attr];
- if (attr >= 0) {
- const struct gl_client_array *array = arrays[attr];
-
- vbo_init_array(&render->attrs[attr], attr,
- get_array_stride(ctx, array),
- array->Size, array->Type,
- array->BufferObj, array->Ptr,
- render->mode == IMM);
- }
+ nouveau_init_array(&render->attrs[attr], attr,
+ get_array_stride(ctx, array),
+ array->Size, array->Type,
+ imm ? array->BufferObj : NULL,
+ array->Ptr, imm);
}
}
static void
vbo_deinit_arrays(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
- const struct gl_client_array **arrays)
+ const struct gl_client_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
- int i;
+ int i, attr;
if (ib)
- vbo_deinit_array(&render->ib);
+ nouveau_cleanup_array(&render->ib);
- for (i = 0; i < render->attr_count; i++) {
- int *attr = &render->map[i];
+ FOR_EACH_BOUND_ATTR(render, i, attr) {
+ struct nouveau_array *a = &render->attrs[attr];
- if (*attr >= 0) {
- vbo_deinit_array(&render->attrs[*attr]);
- *attr = -1;
- }
+ if (render->mode == IMM)
+ nouveau_bo_ref(NULL, &a->bo);
+
+ nouveau_deinit_array(a);
+ render->map[i] = -1;
}
render->attr_count = 0;
- context_bctx(ctx, VERTEX);
}
/* Make some rendering decisions from the GL context. */
@@ -164,20 +113,16 @@ vbo_choose_render_mode(struct gl_context *ctx, const struct gl_client_array **ar
}
}
}
-
- if (render->mode == VBO)
- render->attr_count = NUM_VERTEX_ATTRS;
- else
- render->attr_count = 0;
}
static void
-vbo_emit_attr(struct gl_context *ctx, const struct gl_client_array **arrays, int attr)
+vbo_emit_attr(struct gl_context *ctx, const struct gl_client_array **arrays,
+ int attr)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_render_state *render = to_render_state(ctx);
const struct gl_client_array *array = arrays[attr];
- struct nouveau_array_state *a = &render->attrs[attr];
+ struct nouveau_array *a = &render->attrs[attr];
RENDER_LOCALS(ctx);
if (!array->StrideB) {
@@ -186,11 +131,11 @@ vbo_emit_attr(struct gl_context *ctx, const struct gl_client_array **arrays, int
return;
/* Constant attribute. */
- vbo_init_array(a, attr, array->StrideB, array->Size,
- array->Type, array->BufferObj, array->Ptr,
- GL_TRUE);
+ nouveau_init_array(a, attr, array->StrideB, array->Size,
+ array->Type, array->BufferObj, array->Ptr,
+ GL_TRUE);
EMIT_IMM(ctx, a, 0);
- vbo_deinit_array(a);
+ nouveau_deinit_array(a);
} else {
/* Varying attribute. */
@@ -199,6 +144,8 @@ vbo_emit_attr(struct gl_context *ctx, const struct gl_client_array **arrays, int
if (render->mode == VBO) {
render->map[info->vbo_index] = attr;
render->vertex_size += array->_ElementSize;
+ render->attr_count = MAX2(render->attr_count,
+ info->vbo_index + 1);
} else {
render->map[render->attr_count++] = attr;
render->vertex_size += 4 * info->imm_fields;
@@ -216,6 +163,7 @@ vbo_choose_attrs(struct gl_context *ctx, const struct gl_client_array **arrays)
/* Reset the vertex size. */
render->vertex_size = 0;
+ render->attr_count = 0;
vbo_emit_attr(ctx, arrays, VERT_ATTRIB_COLOR0);
if (ctx->Fog.ColorSumEnabled && !ctx->Light.Enabled)
@@ -233,7 +181,7 @@ vbo_choose_attrs(struct gl_context *ctx, const struct gl_client_array **arrays)
(ctx->Texture._GenFlags & TEXGEN_NEED_NORMALS))
vbo_emit_attr(ctx, arrays, VERT_ATTRIB_NORMAL);
- if (ctx->Light.Enabled) {
+ if (ctx->Light.Enabled && render->mode == IMM) {
vbo_emit_attr(ctx, arrays, MAT(FRONT_AMBIENT));
vbo_emit_attr(ctx, arrays, MAT(FRONT_DIFFUSE));
vbo_emit_attr(ctx, arrays, MAT(FRONT_SPECULAR));
@@ -254,17 +202,13 @@ static int
get_max_client_stride(struct gl_context *ctx, const struct gl_client_array **arrays)
{
struct nouveau_render_state *render = to_render_state(ctx);
- int i, s = 0;
-
- for (i = 0; i < render->attr_count; i++) {
- int attr = render->map[i];
+ int i, attr, s = 0;
- if (attr >= 0) {
- const struct gl_client_array *a = arrays[attr];
+ FOR_EACH_BOUND_ATTR(render, i, attr) {
+ const struct gl_client_array *a = arrays[attr];
- if (!_mesa_is_bufferobj(a->BufferObj))
- s = MAX2(s, get_array_stride(ctx, a));
- }
+ if (!_mesa_is_bufferobj(a->BufferObj))
+ s = MAX2(s, get_array_stride(ctx, a));
}
return s;
@@ -295,7 +239,7 @@ vbo_maybe_split(struct gl_context *ctx, const struct gl_client_array **arrays,
if (render->mode == VBO &&
(stride = get_max_client_stride(ctx, arrays)))
vert_avail = MIN2(vert_avail,
- RENDER_SCRATCH_SIZE / stride);
+ NOUVEAU_SCRATCH_SIZE / stride);
if (max_index - min_index > vert_avail ||
(ib && ib->count > idx_avail)) {
@@ -315,42 +259,93 @@ vbo_maybe_split(struct gl_context *ctx, const struct gl_client_array **arrays,
/* VBO rendering path. */
+static GLboolean
+check_update_array(struct nouveau_array *a, unsigned offset,
+ struct nouveau_bo *bo, int *pdelta)
+{
+ int delta = *pdelta;
+ GLboolean dirty;
+
+ if (a->bo == bo) {
+ if (delta < 0)
+ delta = ((int)offset - (int)a->offset) / a->stride;
+
+ dirty = (delta < 0 ||
+ offset != (a->offset + delta * a->stride));
+ } else {
+ dirty = GL_TRUE;
+ }
+
+ *pdelta = (dirty ? 0 : delta);
+ return dirty;
+}
+
static void
vbo_bind_vertices(struct gl_context *ctx, const struct gl_client_array **arrays,
- GLint basevertex, GLuint min_index, GLuint max_index)
+ int base, unsigned min_index, unsigned max_index, int *pdelta)
{
struct nouveau_render_state *render = to_render_state(ctx);
- int i;
+ struct nouveau_channel *chan = context_chan(ctx);
+ struct nouveau_bo *bo[NUM_VERTEX_ATTRS];
+ unsigned offset[NUM_VERTEX_ATTRS];
+ GLboolean dirty = GL_FALSE;
+ int i, j, attr;
+ RENDER_LOCALS(ctx);
- for (i = 0; i < NUM_VERTEX_ATTRS; i++) {
- int attr = render->map[i];
-
- if (attr >= 0) {
- const struct gl_client_array *array = arrays[attr];
- struct nouveau_array_state *a = &render->attrs[attr];
- unsigned delta = (basevertex + min_index)
- * array->StrideB;
-
- if (a->bo) {
- /* Array in a buffer obj. */
- a->offset = (intptr_t)array->Ptr + delta;
- } else {
- 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);
-
- /* Array in client memory, move it to
- * a scratch buffer obj. */
- for (j = 0; j < n; j++)
- memcpy(dp + j * a->stride,
- sp + j * array->StrideB,
- a->stride);
- }
+ *pdelta = -1;
+
+ FOR_EACH_BOUND_ATTR(render, i, attr) {
+ const struct gl_client_array *array = arrays[attr];
+ struct gl_buffer_object *obj = array->BufferObj;
+ struct nouveau_array *a = &render->attrs[attr];
+ unsigned delta = (base + min_index) * array->StrideB;
+
+ bo[i] = NULL;
+
+ if (nouveau_bufferobj_hw(obj)) {
+ /* Array in a buffer obj. */
+ nouveau_bo_ref(to_nouveau_bufferobj(obj)->bo, &bo[i]);
+ offset[i] = delta + (intptr_t)array->Ptr;
+
+ } else {
+ int n = max_index - min_index + 1;
+ char *sp = (char *)ADD_POINTERS(
+ nouveau_bufferobj_sys(obj), array->Ptr) + delta;
+ char *dp = nouveau_get_scratch(ctx, n * a->stride,
+ &bo[i], &offset[i]);
+
+ /* Array in client memory, move it to a
+ * scratch buffer obj. */
+ for (j = 0; j < n; j++)
+ memcpy(dp + j * a->stride,
+ sp + j * array->StrideB,
+ a->stride);
+ }
+
+ dirty |= check_update_array(a, offset[i], bo[i], pdelta);
+ }
+
+ *pdelta -= min_index;
+
+ if (dirty) {
+ /* Buffers changed, update the attribute binding. */
+ FOR_EACH_BOUND_ATTR(render, i, attr) {
+ struct nouveau_array *a = &render->attrs[attr];
+
+ nouveau_bo_ref(NULL, &a->bo);
+ a->offset = offset[i];
+ a->bo = bo[i];
}
+
+ TAG(render_bind_vertices)(ctx);
+
+ } else {
+ /* Just cleanup. */
+ FOR_EACH_BOUND_ATTR(render, i, attr)
+ nouveau_bo_ref(NULL, &bo[i]);
}
- TAG(render_bind_vertices)(ctx);
+ BATCH_VALIDATE();
}
static void
@@ -360,12 +355,10 @@ vbo_draw_vbo(struct gl_context *ctx, const struct gl_client_array **arrays,
GLuint max_index)
{
struct nouveau_channel *chan = context_chan(ctx);
- dispatch_t dispatch;
- int delta = -min_index, basevertex = 0, i;
+ dispatch_t dispatch = get_array_dispatch(&to_render_state(ctx)->ib);
+ int i, delta = 0, basevertex = 0;
RENDER_LOCALS(ctx);
- get_array_dispatch(&to_render_state(ctx)->ib, &dispatch);
-
TAG(render_set_format)(ctx);
for (i = 0; i < nr_prims; i++) {
@@ -374,8 +367,8 @@ vbo_draw_vbo(struct gl_context *ctx, const struct gl_client_array **arrays,
if (i == 0 || basevertex != prims[i].basevertex) {
basevertex = prims[i].basevertex;
- vbo_bind_vertices(ctx, arrays, basevertex,
- min_index, max_index);
+ vbo_bind_vertices(ctx, arrays, basevertex, min_index,
+ max_index, &delta);
}
if (count > get_max_vertices(ctx, ib, AVAIL_RING(chan)))
@@ -390,7 +383,7 @@ vbo_draw_vbo(struct gl_context *ctx, const struct gl_client_array **arrays,
/* Immediate rendering path. */
static unsigned
-extract_id(struct nouveau_array_state *a, int i, int j)
+extract_id(struct nouveau_array *a, int i, int j)
{
return j;
}
@@ -404,7 +397,7 @@ vbo_draw_imm(struct gl_context *ctx, const struct gl_client_array **arrays,
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_channel *chan = context_chan(ctx);
extract_u_t extract = ib ? render->ib.extract_u : extract_id;
- int i, j, k;
+ int i, j, k, attr;
RENDER_LOCALS(ctx);
for (i = 0; i < nr_prims; i++) {
@@ -421,9 +414,8 @@ vbo_draw_imm(struct gl_context *ctx, const struct gl_client_array **arrays,
j = prims[i].basevertex +
extract(&render->ib, 0, start);
- for (k = 0; k < render->attr_count; k++)
- EMIT_IMM(ctx, &render->attrs[render->map[k]],
- j);
+ FOR_EACH_BOUND_ATTR(render, k, attr)
+ EMIT_IMM(ctx, &render->attrs[attr], j);
}
BATCH_END();
@@ -433,7 +425,8 @@ vbo_draw_imm(struct gl_context *ctx, const struct gl_client_array **arrays,
/* draw_prims entry point when we're doing hw-tnl. */
static void
-TAG(vbo_render_prims)(struct gl_context *ctx, const struct gl_client_array **arrays,
+TAG(vbo_render_prims)(struct gl_context *ctx,
+ const struct gl_client_array **arrays,
const struct _mesa_prim *prims, GLuint nr_prims,
const struct _mesa_index_buffer *ib,
GLboolean index_bounds_valid,
@@ -462,3 +455,44 @@ TAG(vbo_render_prims)(struct gl_context *ctx, const struct gl_client_array **arr
vbo_deinit_arrays(ctx, ib, arrays);
}
+
+/* VBO rendering entry points. */
+
+static void
+TAG(vbo_check_render_prims)(struct gl_context *ctx,
+ const struct gl_client_array **arrays,
+ const struct _mesa_prim *prims, GLuint nr_prims,
+ const struct _mesa_index_buffer *ib,
+ GLboolean index_bounds_valid,
+ GLuint min_index, GLuint max_index)
+{
+ struct nouveau_context *nctx = to_nouveau_context(ctx);
+
+ nouveau_validate_framebuffer(ctx);
+
+ if (nctx->fallback == HWTNL)
+ TAG(vbo_render_prims)(ctx, arrays, prims, nr_prims, ib,
+ index_bounds_valid, min_index, max_index);
+
+ if (nctx->fallback == SWTNL)
+ _tnl_vbo_draw_prims(ctx, arrays, prims, nr_prims, ib,
+ index_bounds_valid, min_index, max_index);
+}
+
+void
+TAG(vbo_init)(struct gl_context *ctx)
+{
+ struct nouveau_render_state *render = to_render_state(ctx);
+ int i;
+
+ for (i = 0; i < VERT_ATTRIB_MAX; i++)
+ render->map[i] = -1;
+
+ vbo_set_draw_func(ctx, TAG(vbo_check_render_prims));
+ vbo_use_buffer_objects(ctx);
+}
+
+void
+TAG(vbo_destroy)(struct gl_context *ctx)
+{
+}
diff --git a/src/mesa/drivers/dri/nouveau/nv01_2d.xml.h b/src/mesa/drivers/dri/nouveau/nv01_2d.xml.h
new file mode 100644
index 0000000000..3390da089b
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nv01_2d.xml.h
@@ -0,0 +1,1343 @@
+#ifndef NV01_2D_XML
+#define NV01_2D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv01_2d.xml ( 33509 bytes, from 2010-11-13 23:32:57)
+- copyright.xml ( 6452 bytes, from 2010-11-15 15:10:58)
+- nv_defs.xml ( 4437 bytes, from 2010-11-01 00:28:46)
+- nv_object.xml ( 11547 bytes, from 2010-11-13 23:32:57)
+- nvchipsets.xml ( 3074 bytes, from 2010-11-13 23:32:57)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+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.
+*/
+
+
+
+#define NV01_CONTEXT_BETA1_DMA_NOTIFY 0x00000180
+
+#define NV01_CONTEXT_BETA1_BETA_1D31 0x00000300
+
+
+#define NV04_BETA_SOLID_DMA_NOTIFY 0x00000180
+
+#define NV04_BETA_SOLID_BETA_FACTOR 0x00000300
+
+
+#define NV01_CONTEXT_COLOR_KEY_DMA_NOTIFY 0x00000180
+
+#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT 0x00000300
+#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_A16R5G6B5 0x00000001
+#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_X16A1R5G5B5 0x00000002
+#define NV01_CONTEXT_COLOR_KEY_COLOR_FORMAT_A8R8G8B8 0x00000003
+
+#define NV01_CONTEXT_COLOR_KEY_COLOR 0x00000304
+
+
+#define NV01_CONTEXT_PATTERN_DMA_NOTIFY 0x00000180
+
+#define NV01_CONTEXT_PATTERN_COLOR_FORMAT 0x00000300
+
+#define NV01_CONTEXT_PATTERN_MONOCHROME_FORMAT 0x00000304
+
+#define NV01_CONTEXT_PATTERN_SHAPE 0x00000308
+
+#define NV01_CONTEXT_PATTERN_COLOR(i0) (0x00000310 + 0x4*(i0))
+#define NV01_CONTEXT_PATTERN_COLOR__ESIZE 0x00000004
+#define NV01_CONTEXT_PATTERN_COLOR__LEN 0x00000002
+
+#define NV01_CONTEXT_PATTERN_PATTERN(i0) (0x00000318 + 0x4*(i0))
+#define NV01_CONTEXT_PATTERN_PATTERN__ESIZE 0x00000004
+#define NV01_CONTEXT_PATTERN_PATTERN__LEN 0x00000002
+
+
+#define NV01_CONTEXT_CLIP_RECTANGLE_DMA_NOTIFY 0x00000180
+
+#define NV01_CONTEXT_CLIP_RECTANGLE_POINT 0x00000300
+#define NV01_CONTEXT_CLIP_RECTANGLE_POINT_X__MASK 0x0000ffff
+#define NV01_CONTEXT_CLIP_RECTANGLE_POINT_X__SHIFT 0
+#define NV01_CONTEXT_CLIP_RECTANGLE_POINT_Y__MASK 0xffff0000
+#define NV01_CONTEXT_CLIP_RECTANGLE_POINT_Y__SHIFT 16
+
+#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE 0x00000304
+#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE_W__MASK 0x0000ffff
+#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE_W__SHIFT 0
+#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE_H__MASK 0xffff0000
+#define NV01_CONTEXT_CLIP_RECTANGLE_SIZE_H__SHIFT 16
+
+
+#define NV04_CONTEXT_SURFACES_2D_DMA_NOTIFY 0x00000180
+
+#define NV04_CONTEXT_SURFACES_2D_DMA_IMAGE_SOURCE 0x00000184
+
+#define NV04_CONTEXT_SURFACES_2D_DMA_IMAGE_DESTIN 0x00000188
+
+
+#define NV50_CONTEXT_SURFACES_2D_SRC_LINEAR 0x00000200
+
+#define NV50_CONTEXT_SURFACES_2D_SRC_TILE_MODE 0x00000204
+
+#define NV50_CONTEXT_SURFACES_2D_SRC_WIDTH 0x00000208
+
+#define NV50_CONTEXT_SURFACES_2D_SRC_HEIGHT 0x0000020c
+
+#define NV50_CONTEXT_SURFACES_2D_UNK0210 0x00000210
+
+#define NV50_CONTEXT_SURFACES_2D_UNK0214 0x00000214
+
+#define NV50_CONTEXT_SURFACES_2D_DST_LINEAR 0x00000218
+
+#define NV50_CONTEXT_SURFACES_2D_DST_TILE_MODE 0x0000021c
+
+#define NV50_CONTEXT_SURFACES_2D_DST_WIDTH 0x00000220
+
+#define NV50_CONTEXT_SURFACES_2D_DST_HEIGHT 0x00000224
+
+#define NV50_CONTEXT_SURFACES_2D_UNK0228 0x00000228
+
+#define NV50_CONTEXT_SURFACES_2D_UNK022C 0x0000022c
+
+#define NV50_CONTEXT_SURFACES_2D_OFFSET_SOURCE_HIGH 0x00000230
+
+#define NV50_CONTEXT_SURFACES_2D_OFFSET_DESTIN_HIGH 0x00000234
+
+#define NV04_CONTEXT_SURFACES_2D_FORMAT 0x00000300
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_Y8 0x00000001
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_X1R5G5B5_Z1R5G5B5 0x00000002
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_X1R5G5B5_X1R5G5B5 0x00000003
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_R5G6B5 0x00000004
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_Y16 0x00000005
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_X8R8G8B8_Z8R8G8B8 0x00000006
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_X8R8G8B8_X8R8G8B8 0x00000007
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_X1A7R8G8B8_Z1A7R8G8B8 0x00000008
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_X1A7R8G8B8_X1A7R8G8B8 0x00000009
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_A8R8G8B8 0x0000000a
+#define NV04_CONTEXT_SURFACES_2D_FORMAT_Y32 0x0000000b
+
+#define NV04_CONTEXT_SURFACES_2D_PITCH 0x00000304
+#define NV04_CONTEXT_SURFACES_2D_PITCH_SOURCE__MASK 0x0000ffff
+#define NV04_CONTEXT_SURFACES_2D_PITCH_SOURCE__SHIFT 0
+#define NV04_CONTEXT_SURFACES_2D_PITCH_DESTIN__MASK 0xffff0000
+#define NV04_CONTEXT_SURFACES_2D_PITCH_DESTIN__SHIFT 16
+
+#define NV04_CONTEXT_SURFACES_2D_OFFSET_SOURCE 0x00000308
+
+#define NV04_CONTEXT_SURFACES_2D_OFFSET_DESTIN 0x0000030c
+
+
+#define NV04_SWIZZLED_SURFACE_DMA_NOTIFY 0x00000180
+
+#define NV04_SWIZZLED_SURFACE_DMA_IMAGE 0x00000184
+
+#define NV04_SWIZZLED_SURFACE_FORMAT 0x00000300
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR__MASK 0x000000ff
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR__SHIFT 0
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_Y8 0x00000001
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X1R5G5B5_Z1R5G5B5 0x00000002
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X1R5G5B5_X1R5G5B5 0x00000003
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_R5G6B5 0x00000004
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_Y16 0x00000005
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X8R8G8B8_Z8R8G8B8 0x00000006
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X8R8G8B8_X8R8G8B8 0x00000007
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X1A7R8G8B8_Z1A7R8G8B8 0x00000008
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_X1A7R8G8B8_X1A7R8G8B8 0x00000009
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_A8R8G8B8 0x0000000a
+#define NV04_SWIZZLED_SURFACE_FORMAT_COLOR_Y32 0x0000000b
+#define NV04_SWIZZLED_SURFACE_FORMAT_BASE_SIZE_U__MASK 0x00ff0000
+#define NV04_SWIZZLED_SURFACE_FORMAT_BASE_SIZE_U__SHIFT 16
+#define NV04_SWIZZLED_SURFACE_FORMAT_BASE_SIZE_V__MASK 0xff000000
+#define NV04_SWIZZLED_SURFACE_FORMAT_BASE_SIZE_V__SHIFT 24
+
+#define NV04_SWIZZLED_SURFACE_OFFSET 0x00000304
+
+
+#define NV03_CONTEXT_ROP_DMA_NOTIFY 0x00000180
+
+#define NV03_CONTEXT_ROP_ROP 0x00000300
+
+
+#define NV04_IMAGE_PATTERN_DMA_NOTIFY 0x00000180
+
+#define NV04_IMAGE_PATTERN_COLOR_FORMAT 0x00000300
+#define NV04_IMAGE_PATTERN_COLOR_FORMAT_A16R5G6B5 0x00000001
+#define NV04_IMAGE_PATTERN_COLOR_FORMAT_X16A1R5G5B5 0x00000002
+#define NV04_IMAGE_PATTERN_COLOR_FORMAT_A8R8G8B8 0x00000003
+
+#define NV04_IMAGE_PATTERN_MONOCHROME_FORMAT 0x00000304
+#define NV04_IMAGE_PATTERN_MONOCHROME_FORMAT_CGA6 0x00000001
+#define NV04_IMAGE_PATTERN_MONOCHROME_FORMAT_LE 0x00000002
+
+#define NV04_IMAGE_PATTERN_MONOCHROME_SHAPE 0x00000308
+#define NV04_IMAGE_PATTERN_MONOCHROME_SHAPE_8X8 0x00000000
+#define NV04_IMAGE_PATTERN_MONOCHROME_SHAPE_64X1 0x00000001
+#define NV04_IMAGE_PATTERN_MONOCHROME_SHAPE_1X64 0x00000002
+
+#define NV04_IMAGE_PATTERN_PATTERN_SELECT 0x0000030c
+#define NV04_IMAGE_PATTERN_PATTERN_SELECT_MONO 0x00000001
+#define NV04_IMAGE_PATTERN_PATTERN_SELECT_COLOR 0x00000002
+
+#define NV04_IMAGE_PATTERN_MONOCHROME_COLOR0 0x00000310
+
+#define NV04_IMAGE_PATTERN_MONOCHROME_COLOR1 0x00000314
+
+#define NV04_IMAGE_PATTERN_MONOCHROME_PATTERN0 0x00000318
+
+#define NV04_IMAGE_PATTERN_MONOCHROME_PATTERN1 0x0000031c
+
+#define NV04_IMAGE_PATTERN_PATTERN_Y8(i0) (0x00000400 + 0x4*(i0))
+#define NV04_IMAGE_PATTERN_PATTERN_Y8__ESIZE 0x00000004
+#define NV04_IMAGE_PATTERN_PATTERN_Y8__LEN 0x00000010
+#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y0__MASK 0x000000ff
+#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y0__SHIFT 0
+#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y1__MASK 0x0000ff00
+#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y1__SHIFT 8
+#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y2__MASK 0x00ff0000
+#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y2__SHIFT 16
+#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y3__MASK 0xff000000
+#define NV04_IMAGE_PATTERN_PATTERN_Y8_Y3__SHIFT 24
+
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5(i0) (0x00000500 + 0x4*(i0))
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5__ESIZE 0x00000004
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5__LEN 0x00000020
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_B0__MASK 0x0000001f
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_B0__SHIFT 0
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_G0__MASK 0x000007e0
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_G0__SHIFT 5
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_R0__MASK 0x0000f800
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_R0__SHIFT 11
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_B1__MASK 0x001f0000
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_B1__SHIFT 16
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_G1__MASK 0x07e00000
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_G1__SHIFT 21
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_R1__MASK 0xf8000000
+#define NV04_IMAGE_PATTERN_PATTERN_R5G6B5_R1__SHIFT 27
+
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5(i0) (0x00000600 + 0x4*(i0))
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5__ESIZE 0x00000004
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5__LEN 0x00000020
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_B0__MASK 0x0000001f
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_B0__SHIFT 0
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_G0__MASK 0x000003e0
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_G0__SHIFT 5
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_R0__MASK 0x00007c00
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_R0__SHIFT 10
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_B1__MASK 0x001f0000
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_B1__SHIFT 16
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_G1__MASK 0x03e00000
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_G1__SHIFT 21
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_R1__MASK 0x7c000000
+#define NV04_IMAGE_PATTERN_PATTERN_X1R5G5B5_R1__SHIFT 26
+
+#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8(i0) (0x00000700 + 0x4*(i0))
+#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8__ESIZE 0x00000004
+#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8__LEN 0x00000040
+#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_B__MASK 0x000000ff
+#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_B__SHIFT 0
+#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_G__MASK 0x0000ff00
+#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_G__SHIFT 8
+#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_R__MASK 0x00ff0000
+#define NV04_IMAGE_PATTERN_PATTERN_X8R8G8B8_R__SHIFT 16
+
+
+#define NV01_RENDER_SOLID_LINE_PATCH 0x0000010c
+
+#define NV01_RENDER_SOLID_LINE_DMA_NOTIFY 0x00000180
+
+#define NV01_RENDER_SOLID_LINE_CLIP_RECTANGLE 0x00000184
+
+#define NV01_RENDER_SOLID_LINE_PATTERN 0x00000188
+
+#define NV04_RENDER_SOLID_LINE_PATTERN 0x00000188
+
+#define NV01_RENDER_SOLID_LINE_ROP 0x0000018c
+
+#define NV01_RENDER_SOLID_LINE_BETA1 0x00000190
+
+#define NV01_RENDER_SOLID_LINE_SURFACE_DST 0x00000194
+
+
+#define NV04_RENDER_SOLID_LINE_BETA4 0x00000194
+
+#define NV04_RENDER_SOLID_LINE_SURFACE 0x00000198
+
+#define NV01_RENDER_SOLID_LINE_OPERATION 0x000002fc
+#define NV01_RENDER_SOLID_LINE_OPERATION_SRCCOPY_AND 0x00000000
+#define NV01_RENDER_SOLID_LINE_OPERATION_ROP_AND 0x00000001
+#define NV01_RENDER_SOLID_LINE_OPERATION_BLEND_AND 0x00000002
+#define NV01_RENDER_SOLID_LINE_OPERATION_SRCCOPY 0x00000003
+#define NV01_RENDER_SOLID_LINE_OPERATION_SRCCOPY_PREMULT 0x00000004
+#define NV01_RENDER_SOLID_LINE_OPERATION_BLEND_PREMULT 0x00000005
+
+#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT 0x00000300
+#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_A16R5G6B5 0x00000001
+#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_X16A1R5G5B5 0x00000002
+#define NV01_RENDER_SOLID_LINE_COLOR_FORMAT_A8R8G8B8 0x00000003
+
+#define NV01_RENDER_SOLID_LINE_COLOR 0x00000304
+
+#define NV01_RENDER_SOLID_LINE_LINE_POINT0(i0) (0x00000400 + 0x8*(i0))
+#define NV01_RENDER_SOLID_LINE_LINE_POINT0__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_LINE_LINE_POINT0__LEN 0x00000010
+#define NV01_RENDER_SOLID_LINE_LINE_POINT0_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_LINE_LINE_POINT0_X__SHIFT 0
+#define NV01_RENDER_SOLID_LINE_LINE_POINT0_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_LINE_LINE_POINT0_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_LINE_LINE_POINT1(i0) (0x00000404 + 0x8*(i0))
+#define NV01_RENDER_SOLID_LINE_LINE_POINT1__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_LINE_LINE_POINT1__LEN 0x00000010
+#define NV01_RENDER_SOLID_LINE_LINE_POINT1_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_LINE_LINE_POINT1_X__SHIFT 0
+#define NV01_RENDER_SOLID_LINE_LINE_POINT1_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_LINE_LINE_POINT1_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_X(i0) (0x00000480 + 0x10*(i0))
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_X__ESIZE 0x00000010
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_X__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_Y(i0) (0x00000484 + 0x10*(i0))
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_Y__ESIZE 0x00000010
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT0_Y__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_X(i0) (0x00000488 + 0x10*(i0))
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_X__ESIZE 0x00000010
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_X__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_Y(i0) (0x0000048c + 0x10*(i0))
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_Y__ESIZE 0x00000010
+#define NV01_RENDER_SOLID_LINE_LINE32_POINT1_Y__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_LINE_POLYLINE(i0) (0x00000500 + 0x4*(i0))
+#define NV01_RENDER_SOLID_LINE_POLYLINE__ESIZE 0x00000004
+#define NV01_RENDER_SOLID_LINE_POLYLINE__LEN 0x00000020
+#define NV01_RENDER_SOLID_LINE_POLYLINE_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_LINE_POLYLINE_X__SHIFT 0
+#define NV01_RENDER_SOLID_LINE_POLYLINE_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_LINE_POLYLINE_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_X(i0) (0x00000580 + 0x8*(i0))
+#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_X__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_X__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_Y(i0) (0x00000584 + 0x8*(i0))
+#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_Y__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_LINE_POLYLINE32_POINT_Y__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_COLOR(i0) (0x00000600 + 0x8*(i0))
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_COLOR__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_COLOR__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT(i0) (0x00000604 + 0x8*(i0))
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT__LEN 0x00000010
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_X__SHIFT 0
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_LINE_CPOLYLINE_POINT_Y__SHIFT 16
+
+
+#define NV01_RENDER_SOLID_TRIANGLE_PATCH 0x0000010c
+
+#define NV01_RENDER_SOLID_TRIANGLE_DMA_NOTIFY 0x00000180
+
+#define NV01_RENDER_SOLID_TRIANGLE_CLIP_RECTANGLE 0x00000184
+
+#define NV01_RENDER_SOLID_TRIANGLE_PATTERN 0x00000188
+
+#define NV04_RENDER_SOLID_TRIANGLE_PATTERN 0x00000188
+
+#define NV01_RENDER_SOLID_TRIANGLE_ROP 0x0000018c
+
+#define NV01_RENDER_SOLID_TRIANGLE_BETA1 0x00000190
+
+#define NV01_RENDER_SOLID_TRIANGLE_SURFACE_DST 0x00000194
+
+
+#define NV04_RENDER_SOLID_TRIANGLE_BETA4 0x00000194
+
+#define NV04_RENDER_SOLID_TRIANGLE_SURFACE 0x00000198
+
+#define NV01_RENDER_SOLID_TRIANGLE_OPERATION 0x000002fc
+#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_SRCCOPY_AND 0x00000000
+#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_ROP_AND 0x00000001
+#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_BLEND_AND 0x00000002
+#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_SRCCOPY 0x00000003
+#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_SRCCOPY_PREMULT 0x00000004
+#define NV01_RENDER_SOLID_TRIANGLE_OPERATION_BLEND_PREMULT 0x00000005
+
+#define NV01_RENDER_SOLID_TRIANGLE_COLOR_FORMAT 0x00000300
+#define NV01_RENDER_SOLID_TRIANGLE_COLOR_FORMAT_A16R5G6B5 0x00000001
+#define NV01_RENDER_SOLID_TRIANGLE_COLOR_FORMAT_X16A1R5G5B5 0x00000002
+#define NV01_RENDER_SOLID_TRIANGLE_COLOR_FORMAT_A8R8G8B8 0x00000003
+
+#define NV01_RENDER_SOLID_TRIANGLE_COLOR 0x00000304
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0 0x00000310
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_X__SHIFT 0
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT0_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1 0x00000314
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_X__SHIFT 0
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT1_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2 0x00000318
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_X__SHIFT 0
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE_POINT2_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT0_X 0x00000320
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT0_Y 0x00000324
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT1_X 0x00000328
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT1_Y 0x0000032c
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT2_X 0x00000330
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIANGLE32_POINT2_Y 0x00000334
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH(i0) (0x00000400 + 0x4*(i0))
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH__ESIZE 0x00000004
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH__LEN 0x00000020
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH_X__SHIFT 0
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_X(i0) (0x00000480 + 0x8*(i0))
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_X__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_X__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_Y(i0) (0x00000484 + 0x8*(i0))
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_Y__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_TRIANGLE_TRIMESH32_POINT_Y__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_COLOR(i0) (0x00000500 + 0x10*(i0))
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_COLOR__ESIZE 0x00000010
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_COLOR__LEN 0x00000008
+
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0(i0) (0x00000504 + 0x10*(i0))
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0__ESIZE 0x00000010
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0__LEN 0x00000008
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0_X__SHIFT 0
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT0_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1(i0) (0x00000508 + 0x10*(i0))
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1__ESIZE 0x00000010
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1__LEN 0x00000008
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1_X__SHIFT 0
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT1_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2(i0) (0x0000050c + 0x10*(i0))
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2__ESIZE 0x00000010
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2__LEN 0x00000008
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2_X__SHIFT 0
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIANGLE_POINT2_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_COLOR(i0) (0x00000580 + 0x8*(i0))
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_COLOR__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_COLOR__LEN 0x00000010
+
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT(i0) (0x00000584 + 0x8*(i0))
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT__LEN 0x00000010
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT_X__SHIFT 0
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_TRIANGLE_CTRIMESH_POINT_Y__SHIFT 16
+
+
+#define NV01_RENDER_SOLID_RECTANGLE_PATCH 0x0000010c
+
+#define NV01_RENDER_SOLID_RECTANGLE_DMA_NOTIFY 0x00000180
+
+#define NV01_RENDER_SOLID_RECTANGLE_CLIP_RECTANGLE 0x00000184
+
+#define NV01_RENDER_SOLID_RECTANGLE_PATTERN 0x00000188
+
+#define NV04_RENDER_SOLID_RECTANGLE_PATTERN 0x00000188
+
+#define NV01_RENDER_SOLID_RECTANGLE_ROP 0x0000018c
+
+#define NV01_RENDER_SOLID_RECTANGLE_BETA1 0x00000190
+
+#define NV01_RENDER_SOLID_RECTANGLE_SURFACE_DST 0x00000194
+
+
+#define NV04_RENDER_SOLID_RECTANGLE_BETA4 0x00000194
+
+#define NV04_RENDER_SOLID_RECTANGLE_SURFACE 0x00000198
+
+#define NV01_RENDER_SOLID_RECTANGLE_OPERATION 0x000002fc
+#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_SRCCOPY_AND 0x00000000
+#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_ROP_AND 0x00000001
+#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_BLEND_AND 0x00000002
+#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_SRCCOPY 0x00000003
+#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_SRCCOPY_PREMULT 0x00000004
+#define NV01_RENDER_SOLID_RECTANGLE_OPERATION_BLEND_PREMULT 0x00000005
+
+#define NV01_RENDER_SOLID_RECTANGLE_COLOR_FORMAT 0x00000300
+#define NV01_RENDER_SOLID_RECTANGLE_COLOR_FORMAT_A16R5G6B5 0x00000001
+#define NV01_RENDER_SOLID_RECTANGLE_COLOR_FORMAT_X16A1R5G5B5 0x00000002
+#define NV01_RENDER_SOLID_RECTANGLE_COLOR_FORMAT_A8R8G8B8 0x00000003
+
+#define NV01_RENDER_SOLID_RECTANGLE_COLOR 0x00000304
+
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT(i0) (0x00000400 + 0x8*(i0))
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT__LEN 0x00000010
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT_X__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT_X__SHIFT 0
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT_Y__MASK 0xffff0000
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_POINT_Y__SHIFT 16
+
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE(i0) (0x00000404 + 0x8*(i0))
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE__ESIZE 0x00000008
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE__LEN 0x00000010
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE_W__MASK 0x0000ffff
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE_W__SHIFT 0
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE_H__MASK 0xffff0000
+#define NV01_RENDER_SOLID_RECTANGLE_RECTANGLE_SIZE_H__SHIFT 16
+
+
+#define NV01_IMAGE_BLIT_PATCH 0x0000010c
+
+
+#define NV11_IMAGE_BLIT_WAIT_FOR_IDLE 0x00000108
+
+#define NV11_IMAGE_BLIT_FLIP_SET_READ 0x00000120
+
+#define NV11_IMAGE_BLIT_FLIP_SET_WRITE 0x00000124
+
+#define NV11_IMAGE_BLIT_FLIP_MAX 0x00000128
+
+#define NV11_IMAGE_BLIT_FLIP_INCR_WRITE 0x0000012c
+
+#define NV11_IMAGE_BLIT_FLIP_WAIT 0x00000130
+
+#define NV11_IMAGE_BLIT_FLIP_CRTC_INCR_READ 0x00000134
+
+#define NV01_IMAGE_BLIT_DMA_NOTIFY 0x00000180
+
+#define NV01_IMAGE_BLIT_COLOR_KEY 0x00000184
+
+#define NV04_IMAGE_BLIT_COLOR_KEY 0x00000184
+
+#define NV01_IMAGE_BLIT_CLIP_RECTANGLE 0x00000188
+
+#define NV01_IMAGE_BLIT_PATTERN 0x0000018c
+
+#define NV04_IMAGE_BLIT_PATTERN 0x0000018c
+
+#define NV01_IMAGE_BLIT_ROP 0x00000190
+
+#define NV01_IMAGE_BLIT_BETA1 0x00000194
+
+
+#define NV01_IMAGE_BLIT_SURFACE_SRC 0x00000198
+
+#define NV01_IMAGE_BLIT_SURFACE_DST 0x0000019c
+
+
+#define NV04_IMAGE_BLIT_BETA4 0x00000198
+
+#define NV04_IMAGE_BLIT_SURFACES 0x0000019c
+
+#define NV01_IMAGE_BLIT_OPERATION 0x000002fc
+#define NV01_IMAGE_BLIT_OPERATION_SRCCOPY_AND 0x00000000
+#define NV01_IMAGE_BLIT_OPERATION_ROP_AND 0x00000001
+#define NV01_IMAGE_BLIT_OPERATION_BLEND_AND 0x00000002
+#define NV01_IMAGE_BLIT_OPERATION_SRCCOPY 0x00000003
+#define NV01_IMAGE_BLIT_OPERATION_SRCCOPY_PREMULT 0x00000004
+#define NV01_IMAGE_BLIT_OPERATION_BLEND_PREMULT 0x00000005
+
+#define NV01_IMAGE_BLIT_POINT_IN 0x00000300
+#define NV01_IMAGE_BLIT_POINT_IN_X__MASK 0x0000ffff
+#define NV01_IMAGE_BLIT_POINT_IN_X__SHIFT 0
+#define NV01_IMAGE_BLIT_POINT_IN_Y__MASK 0xffff0000
+#define NV01_IMAGE_BLIT_POINT_IN_Y__SHIFT 16
+
+#define NV01_IMAGE_BLIT_POINT_OUT 0x00000304
+#define NV01_IMAGE_BLIT_POINT_OUT_X__MASK 0x0000ffff
+#define NV01_IMAGE_BLIT_POINT_OUT_X__SHIFT 0
+#define NV01_IMAGE_BLIT_POINT_OUT_Y__MASK 0xffff0000
+#define NV01_IMAGE_BLIT_POINT_OUT_Y__SHIFT 16
+
+#define NV01_IMAGE_BLIT_SIZE 0x00000308
+#define NV01_IMAGE_BLIT_SIZE_W__MASK 0x0000ffff
+#define NV01_IMAGE_BLIT_SIZE_W__SHIFT 0
+#define NV01_IMAGE_BLIT_SIZE_H__MASK 0xffff0000
+#define NV01_IMAGE_BLIT_SIZE_H__SHIFT 16
+
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_PATCH 0x0000010c
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_DMA_NOTIFY 0x00000180
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_DMA_LUT 0x00000184
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_COLOR_KEY 0x00000188
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_CLIP_RECTANGLE 0x0000018c
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_PATTERN 0x00000190
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_ROP 0x00000194
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_BETA1 0x00000198
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_BETA4 0x0000019c
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_SURFACE 0x000001a0
+
+#define NV05_INDEXED_IMAGE_FROM_CPU_SURFACE 0x000001a0
+
+#define NV05_INDEXED_IMAGE_FROM_CPU_COLOR_CONVERSION 0x000003e0
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_OPERATION 0x000003e4
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_COLOR_FORMAT 0x000003e8
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_INDEX_FORMAT 0x000003ec
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_LUT_OFFSET 0x000003f0
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_POINT 0x000003f4
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_SIZE_OUT 0x000003f8
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_SIZE_IN 0x000003fc
+
+#define NV04_INDEXED_IMAGE_FROM_CPU_COLOR(i0) (0x00000400 + 0x4*(i0))
+#define NV04_INDEXED_IMAGE_FROM_CPU_COLOR__ESIZE 0x00000004
+#define NV04_INDEXED_IMAGE_FROM_CPU_COLOR__LEN 0x00000700
+
+
+#define NV10_IMAGE_FROM_CPU_WAIT_FOR_IDLE 0x00000108
+
+#define NV01_IMAGE_FROM_CPU_PATCH 0x0000010c
+
+#define NV01_IMAGE_FROM_CPU_DMA_NOTIFY 0x00000180
+
+#define NV01_IMAGE_FROM_CPU_COLOR_KEY 0x00000184
+
+#define NV04_IMAGE_FROM_CPU_COLOR_KEY 0x00000184
+
+#define NV01_IMAGE_FROM_CPU_CLIP_RECTANGLE 0x00000188
+
+#define NV01_IMAGE_FROM_CPU_PATTERN 0x0000018c
+
+#define NV04_IMAGE_FROM_CPU_PATTERN 0x0000018c
+
+#define NV01_IMAGE_FROM_CPU_ROP 0x00000190
+
+#define NV01_IMAGE_FROM_CPU_BETA1 0x00000194
+
+
+#define NV01_IMAGE_FROM_CPU_SURFACE_DST 0x00000198
+
+
+#define NV04_IMAGE_FROM_CPU_BETA4 0x00000198
+
+#define NV04_IMAGE_FROM_CPU_SURFACE 0x0000019c
+
+#define NV05_IMAGE_FROM_CPU_COLOR_CONVERSION 0x000002f8
+
+#define NV01_IMAGE_FROM_CPU_OPERATION 0x000002fc
+#define NV01_IMAGE_FROM_CPU_OPERATION_SRCCOPY_AND 0x00000000
+#define NV01_IMAGE_FROM_CPU_OPERATION_ROP_AND 0x00000001
+#define NV01_IMAGE_FROM_CPU_OPERATION_BLEND_AND 0x00000002
+#define NV01_IMAGE_FROM_CPU_OPERATION_SRCCOPY 0x00000003
+#define NV01_IMAGE_FROM_CPU_OPERATION_SRCCOPY_PREMULT 0x00000004
+#define NV01_IMAGE_FROM_CPU_OPERATION_BLEND_PREMULT 0x00000005
+
+#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT 0x00000300
+#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_R5G6G5 0x00000001
+#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_A1R5G5B5 0x00000002
+#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_X1R5G5B5 0x00000003
+#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_A8R8G8B8 0x00000004
+#define NV01_IMAGE_FROM_CPU_COLOR_FORMAT_X8R8G8B8 0x00000005
+
+#define NV01_IMAGE_FROM_CPU_POINT 0x00000304
+#define NV01_IMAGE_FROM_CPU_POINT_X__MASK 0x0000ffff
+#define NV01_IMAGE_FROM_CPU_POINT_X__SHIFT 0
+#define NV01_IMAGE_FROM_CPU_POINT_Y__MASK 0xffff0000
+#define NV01_IMAGE_FROM_CPU_POINT_Y__SHIFT 16
+
+#define NV01_IMAGE_FROM_CPU_SIZE_OUT 0x00000308
+#define NV01_IMAGE_FROM_CPU_SIZE_OUT_W__MASK 0x0000ffff
+#define NV01_IMAGE_FROM_CPU_SIZE_OUT_W__SHIFT 0
+#define NV01_IMAGE_FROM_CPU_SIZE_OUT_H__MASK 0xffff0000
+#define NV01_IMAGE_FROM_CPU_SIZE_OUT_H__SHIFT 16
+
+#define NV01_IMAGE_FROM_CPU_SIZE_IN 0x0000030c
+#define NV01_IMAGE_FROM_CPU_SIZE_IN_W__MASK 0x0000ffff
+#define NV01_IMAGE_FROM_CPU_SIZE_IN_W__SHIFT 0
+#define NV01_IMAGE_FROM_CPU_SIZE_IN_H__MASK 0xffff0000
+#define NV01_IMAGE_FROM_CPU_SIZE_IN_H__SHIFT 16
+
+#define NV01_IMAGE_FROM_CPU_COLOR(i0) (0x00000400 + 0x4*(i0))
+#define NV01_IMAGE_FROM_CPU_COLOR__ESIZE 0x00000004
+#define NV01_IMAGE_FROM_CPU_COLOR__LEN 0x00000020
+
+#define NV04_IMAGE_FROM_CPU_COLOR(i0) (0x00000400 + 0x4*(i0))
+#define NV04_IMAGE_FROM_CPU_COLOR__ESIZE 0x00000004
+#define NV04_IMAGE_FROM_CPU_COLOR__LEN 0x00000700
+
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_PATCH 0x0000010c
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_DMA_NOTIFY 0x00000180
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_COLOR_KEY 0x00000184
+
+#define NV04_STRETCHED_IMAGE_FROM_CPU_COLOR_KEY 0x00000184
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_PATTERN 0x00000188
+
+#define NV04_STRETCHED_IMAGE_FROM_CPU_PATTERN 0x00000188
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_ROP 0x0000018c
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_BETA1 0x00000190
+
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_SURFACE_DST 0x00000194
+
+
+#define NV04_STRETCHED_IMAGE_FROM_CPU_BETA4 0x00000194
+
+#define NV04_STRETCHED_IMAGE_FROM_CPU_SURFACE 0x00000198
+
+#define NV05_STRETCHED_IMAGE_FROM_CPU_COLOR_CONVERSION 0x000002f8
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_OPERATION 0x000002fc
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_COLOR_FORMAT 0x00000300
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN 0x00000304
+#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN_W__MASK 0x0000ffff
+#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN_W__SHIFT 0
+#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN_H__MASK 0xffff0000
+#define NV03_STRETCHED_IMAGE_FROM_CPU_SIZE_IN_H__SHIFT 16
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_DX_DU 0x00000308
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_DY_DV 0x0000030c
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT 0x00000310
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT_X__MASK 0x0000ffff
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT_X__SHIFT 0
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT_Y__MASK 0xffff0000
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_POINT_Y__SHIFT 16
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE 0x00000314
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE_W__MASK 0x0000ffff
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE_W__SHIFT 0
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE_H__MASK 0xffff0000
+#define NV03_STRETCHED_IMAGE_FROM_CPU_CLIP_SIZE_H__SHIFT 16
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4 0x00000318
+#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4_X__MASK 0x0000ffff
+#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4_X__SHIFT 0
+#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4_Y__MASK 0xffff0000
+#define NV03_STRETCHED_IMAGE_FROM_CPU_POINT12D4_Y__SHIFT 16
+
+#define NV03_STRETCHED_IMAGE_FROM_CPU_COLOR(i0) (0x00000400 + 0x4*(i0))
+#define NV03_STRETCHED_IMAGE_FROM_CPU_COLOR__ESIZE 0x00000004
+#define NV03_STRETCHED_IMAGE_FROM_CPU_COLOR__LEN 0x00000700
+
+
+#define NV10_SCALED_IMAGE_FROM_MEMORY_WAIT_FOR_IDLE 0x00000108
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_DMA_NOTIFY 0x00000180
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_DMA_IMAGE 0x00000184
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_PATTERN 0x00000188
+
+#define NV04_SCALED_IMAGE_FROM_MEMORY_PATTERN 0x00000188
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_ROP 0x0000018c
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_BETA1 0x00000190
+
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_SURFACE_DST 0x00000194
+
+
+#define NV04_SCALED_IMAGE_FROM_MEMORY_BETA4 0x00000194
+
+#define NV04_SCALED_IMAGE_FROM_MEMORY_SURFACE 0x00000198
+
+#define NV05_SCALED_IMAGE_FROM_MEMORY_SURFACE 0x00000198
+
+#define NV05_SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION 0x000002fc
+#define NV05_SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION_DITHER 0x00000000
+#define NV05_SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION_TRUNCATE 0x00000001
+#define NV05_SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION_SUBTR_TRUNCATE 0x00000002
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT 0x00000300
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A1R5G5B5 0x00000001
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_X1R5G5B5 0x00000002
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_A8R8G8B8 0x00000003
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_X8R8G8B8 0x00000004
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_V8YB8U8YA8 0x00000005
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_YB8V8YA8U8 0x00000006
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_R5G6B5 0x00000007
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_Y8 0x00000008
+#define NV03_SCALED_IMAGE_FROM_MEMORY_COLOR_FORMAT_AY8 0x00000009
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION 0x00000304
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_SRCCOPY_AND 0x00000000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_ROP_AND 0x00000001
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_BLEND_AND 0x00000002
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_SRCCOPY 0x00000003
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_SRCCOPY_PREMULT 0x00000004
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OPERATION_BLEND_PREMULT 0x00000005
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT 0x00000308
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT_X__MASK 0x0000ffff
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT_X__SHIFT 0
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT_Y__MASK 0xffff0000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_POINT_Y__SHIFT 16
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE 0x0000030c
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE_W__MASK 0x0000ffff
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE_W__SHIFT 0
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE_H__MASK 0xffff0000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_CLIP_SIZE_H__SHIFT 16
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT 0x00000310
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT_X__MASK 0x0000ffff
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT_X__SHIFT 0
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT_Y__MASK 0xffff0000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_POINT_Y__SHIFT 16
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE 0x00000314
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE_W__MASK 0x0000ffff
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE_W__SHIFT 0
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE_H__MASK 0xffff0000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OUT_SIZE_H__SHIFT 16
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_DU_DX 0x00000318
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_DV_DY 0x0000031c
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE 0x00000400
+#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE_W__MASK 0x0000ffff
+#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE_W__SHIFT 0
+#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE_H__MASK 0xffff0000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_SIZE_H__SHIFT 16
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT 0x00000404
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_PITCH__MASK 0x0000ffff
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_PITCH__SHIFT 0
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN__MASK 0x00ff0000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN__SHIFT 16
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN_CENTER 0x00010000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN_CORNER 0x00020000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER__MASK 0xff000000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER__SHIFT 24
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER_POINT_SAMPLE 0x00000000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER_BILINEAR 0x01000000
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_OFFSET 0x00000408
+
+#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT 0x0000040c
+#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT_U__MASK 0x0000ffff
+#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT_U__SHIFT 0
+#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT_V__MASK 0xffff0000
+#define NV03_SCALED_IMAGE_FROM_MEMORY_POINT_V__SHIFT 16
+
+
+#define NV50_SCALED_IMAGE_FROM_MEMORY_OFFSET_HIGH 0x00000410
+
+#define NV50_SCALED_IMAGE_FROM_MEMORY_SRC_LINEAR 0x00000414
+
+#define NV50_SCALED_IMAGE_FROM_MEMORY_SRC_TILE_MODE 0x00000418
+
+
+#define NV03_GDI_RECTANGLE_TEXT_DMA_NOTIFY 0x00000180
+
+#define NV03_GDI_RECTANGLE_TEXT_PATTERN 0x00000184
+
+#define NV03_GDI_RECTANGLE_TEXT_ROP 0x00000188
+
+#define NV03_GDI_RECTANGLE_TEXT_BETA1 0x0000019c
+
+#define NV03_GDI_RECTANGLE_TEXT_SURFACE_DST 0x00000190
+
+#define NV03_GDI_RECTANGLE_TEXT_OPERATION 0x000002fc
+
+#define NV03_GDI_RECTANGLE_TEXT_COLOR_FORMAT 0x00000300
+
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_FORMAT 0x00000304
+
+#define NV03_GDI_RECTANGLE_TEXT_COLOR1_A 0x000003fc
+
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT 0x00000400
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_Y__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_Y__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_X__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_X__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE 0x00000404
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_H__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_H__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_W__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_W__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B 0x000007f4
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B_L__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B_L__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B_T__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT0_B_T__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B 0x000007f8
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B_R__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B_R__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B_B__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_POINT1_B_B__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_COLOR1_B 0x000007fc
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0 0x00000800
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_L__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_L__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_T__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_T__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1 0x00000804
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_R__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_R__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_B__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_B__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0 0x00000bec
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_L__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_L__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_T__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_T__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1 0x00000bf0
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_R__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_R__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_B__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_B__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_COLOR1_C 0x00000bf4
+
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_C 0x00000bf8
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_C_W__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_C_W__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_C_H__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_C_H__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_POINT_C 0x00000bfc
+#define NV03_GDI_RECTANGLE_TEXT_POINT_C_X__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_POINT_C_X__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_POINT_C_Y__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_POINT_C_Y__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C(i0) (0x00000c00 + 0x4*(i0))
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C__ESIZE 0x00000004
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C__LEN 0x00000020
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0 0x00000fe8
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0_L__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0_L__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0_T__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT0_T__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1 0x00000fec
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1_R__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1_R__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1_B__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_D_POINT1_B__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_COLOR1_D 0x00000ff0
+
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D 0x00000ff4
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D_W__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D_W__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D_H__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_D_H__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D 0x00000ff8
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D_W__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D_W__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D_H__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_D_H__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_POINT_D 0x00000ffc
+#define NV03_GDI_RECTANGLE_TEXT_POINT_D_X__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_POINT_D_X__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_POINT_D_Y__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_POINT_D_Y__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_D(i0) (0x00001000 + 0x4*(i0))
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_D__ESIZE 0x00000004
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_D__LEN 0x00000020
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0 0x000013e4
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_L__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_L__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_T__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_T__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1 0x000013e8
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_R__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_R__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_B__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_B__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_COLOR0_E 0x000013ec
+
+#define NV03_GDI_RECTANGLE_TEXT_COLOR1_E 0x000013f0
+
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E 0x000013f4
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E_W__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E_W__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E_H__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_IN_E_H__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E 0x000013f8
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E_W__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E_W__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E_H__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_SIZE_OUT_E_H__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_POINT_E 0x000013fc
+#define NV03_GDI_RECTANGLE_TEXT_POINT_E_X__MASK 0x0000ffff
+#define NV03_GDI_RECTANGLE_TEXT_POINT_E_X__SHIFT 0
+#define NV03_GDI_RECTANGLE_TEXT_POINT_E_Y__MASK 0xffff0000
+#define NV03_GDI_RECTANGLE_TEXT_POINT_E_Y__SHIFT 16
+
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E(i0) (0x00001400 + 0x4*(i0))
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E__ESIZE 0x00000004
+#define NV03_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E__LEN 0x00000020
+
+
+#define NV04_GDI_RECTANGLE_TEXT_PATCH 0x0000010c
+
+#define NV04_GDI_RECTANGLE_TEXT_DMA_NOTIFY 0x00000180
+
+#define NV04_GDI_RECTANGLE_TEXT_DMA_FONTS 0x00000184
+
+#define NV04_GDI_RECTANGLE_TEXT_PATTERN 0x00000188
+
+#define NV04_GDI_RECTANGLE_TEXT_ROP 0x0000018c
+
+#define NV04_GDI_RECTANGLE_TEXT_BETA1 0x00000190
+
+#define NV04_GDI_RECTANGLE_TEXT_BETA4 0x00000194
+
+#define NV04_GDI_RECTANGLE_TEXT_SURFACE 0x00000198
+
+#define NV04_GDI_RECTANGLE_TEXT_OPERATION 0x000002fc
+#define NV04_GDI_RECTANGLE_TEXT_OPERATION_SRCCOPY_AND 0x00000000
+#define NV04_GDI_RECTANGLE_TEXT_OPERATION_ROP_AND 0x00000001
+#define NV04_GDI_RECTANGLE_TEXT_OPERATION_BLEND_AND 0x00000002
+#define NV04_GDI_RECTANGLE_TEXT_OPERATION_SRCCOPY 0x00000003
+#define NV04_GDI_RECTANGLE_TEXT_OPERATION_SRCCOPY_PREMULT 0x00000004
+#define NV04_GDI_RECTANGLE_TEXT_OPERATION_BLEND_PREMULT 0x00000005
+
+#define NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT 0x00000300
+#define NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A16R5G6B5 0x00000001
+#define NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_X16A1R5G5B5 0x00000002
+#define NV04_GDI_RECTANGLE_TEXT_COLOR_FORMAT_A8R8G8B8 0x00000003
+
+#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_FORMAT 0x00000304
+#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_FORMAT_CGA6 0x00000001
+#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_FORMAT_LE 0x00000002
+
+#define NV04_GDI_RECTANGLE_TEXT_COLOR1_A 0x000003fc
+
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT(i0) (0x00000400 + 0x8*(i0))
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT__ESIZE 0x00000008
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT__LEN 0x00000020
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_Y__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_Y__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_X__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_POINT_X__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE(i0) (0x00000404 + 0x8*(i0))
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE__ESIZE 0x00000008
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE__LEN 0x00000020
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_H__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_H__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_W__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_UNCLIPPED_RECTANGLE_SIZE_W__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0 0x000005f4
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0_L__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0_L__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0_T__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT0_T__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1 0x000005f8
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1_R__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1_R__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1_B__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_B_POINT1_B__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_COLOR1_B 0x000005fc
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0(i0) (0x00000600 + 0x8*(i0))
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0__ESIZE 0x00000008
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0__LEN 0x00000020
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_L__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_L__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_T__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_0_T__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1(i0) (0x00000604 + 0x8*(i0))
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1__ESIZE 0x00000008
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1__LEN 0x00000020
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_R__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_R__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_B__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIPPED_RECTANGLE_POINT_1_B__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0 0x000007ec
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_L__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_L__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_T__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT0_T__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1 0x000007f0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_R__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_R__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_B__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_C_POINT1_B__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_COLOR1_C 0x000007f4
+
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_C 0x000007f8
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_C_W__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_C_W__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_C_H__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_C_H__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_POINT_C 0x000007fc
+#define NV04_GDI_RECTANGLE_TEXT_POINT_C_X__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_POINT_C_X__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_POINT_C_Y__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_POINT_C_Y__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C(i0) (0x00000800 + 0x4*(i0))
+#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C__ESIZE 0x00000004
+#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR1_C__LEN 0x00000080
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0 0x00000be4
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_L__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_L__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_T__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT0_T__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1 0x00000be8
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_R__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_R__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_B__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_E_POINT1_B__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_COLOR0_E 0x00000bec
+
+#define NV04_GDI_RECTANGLE_TEXT_COLOR1_E 0x00000bf0
+
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E 0x00000bf4
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E_W__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E_W__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E_H__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_IN_E_H__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E 0x00000bf8
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E_W__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E_W__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E_H__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_SIZE_OUT_E_H__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_POINT_E 0x00000bfc
+#define NV04_GDI_RECTANGLE_TEXT_POINT_E_X__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_POINT_E_X__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_POINT_E_Y__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_POINT_E_Y__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E(i0) (0x00000c00 + 0x4*(i0))
+#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E__ESIZE 0x00000004
+#define NV04_GDI_RECTANGLE_TEXT_MONOCHROME_COLOR01_E__LEN 0x00000080
+
+#define NV04_GDI_RECTANGLE_TEXT_FONT_F 0x00000ff0
+#define NV04_GDI_RECTANGLE_TEXT_FONT_F_OFFSET__MASK 0x0fffffff
+#define NV04_GDI_RECTANGLE_TEXT_FONT_F_OFFSET__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_FONT_F_PITCH__MASK 0xf0000000
+#define NV04_GDI_RECTANGLE_TEXT_FONT_F_PITCH__SHIFT 28
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0 0x00000ff4
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0_L__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0_L__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0_T__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT0_T__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1 0x00000ff8
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1_R__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1_R__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1_B__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_F_POINT1_B__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_COLOR1_F 0x00000ffc
+
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F(i0) (0x00001000 + 0x4*(i0))
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F__ESIZE 0x00000004
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F__LEN 0x00000100
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_INDEX__MASK 0x000000ff
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_INDEX__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_X__MASK 0x000fff00
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_X__SHIFT 8
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_Y__MASK 0xfff00000
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_F_Y__SHIFT 20
+
+#define NV04_GDI_RECTANGLE_TEXT_FONT_G 0x000017f0
+#define NV04_GDI_RECTANGLE_TEXT_FONT_G_OFFSET__MASK 0x0fffffff
+#define NV04_GDI_RECTANGLE_TEXT_FONT_G_OFFSET__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_FONT_G_PITCH__MASK 0xf0000000
+#define NV04_GDI_RECTANGLE_TEXT_FONT_G_PITCH__SHIFT 28
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0 0x000017f4
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0_L__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0_L__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0_T__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT0_T__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1 0x000017f8
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1_R__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1_R__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1_B__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CLIP_G_POINT1_B__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_COLOR1_G 0x000017fc
+
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT(i0) (0x00001800 + 0x8*(i0))
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT__ESIZE 0x00000008
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT__LEN 0x00000100
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT_X__MASK 0x0000ffff
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT_X__SHIFT 0
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT_Y__MASK 0xffff0000
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_POINT_Y__SHIFT 16
+
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_INDEX(i0) (0x00001804 + 0x8*(i0))
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_INDEX__ESIZE 0x00000008
+#define NV04_GDI_RECTANGLE_TEXT_CHARACTER_COLOR1_G_INDEX__LEN 0x00000100
+
+
+#define NV10_TEXTURE_FROM_CPU_WAIT_FOR_IDLE 0x00000108
+
+#define NV10_TEXTURE_FROM_CPU_DMA_NOTIFY 0x00000180
+
+#define NV10_TEXTURE_FROM_CPU_SURFACE 0x00000184
+
+#define NV10_TEXTURE_FROM_CPU_COLOR_FORMAT 0x00000300
+
+#define NV10_TEXTURE_FROM_CPU_POINT 0x00000304
+#define NV10_TEXTURE_FROM_CPU_POINT_X__MASK 0x0000ffff
+#define NV10_TEXTURE_FROM_CPU_POINT_X__SHIFT 0
+#define NV10_TEXTURE_FROM_CPU_POINT_Y__MASK 0xffff0000
+#define NV10_TEXTURE_FROM_CPU_POINT_Y__SHIFT 16
+
+#define NV10_TEXTURE_FROM_CPU_SIZE 0x00000308
+#define NV10_TEXTURE_FROM_CPU_SIZE_W__MASK 0x0000ffff
+#define NV10_TEXTURE_FROM_CPU_SIZE_W__SHIFT 0
+#define NV10_TEXTURE_FROM_CPU_SIZE_H__MASK 0xffff0000
+#define NV10_TEXTURE_FROM_CPU_SIZE_H__SHIFT 16
+
+#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL 0x0000030c
+#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL_X__MASK 0x0000ffff
+#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL_X__SHIFT 0
+#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL_W__MASK 0xffff0000
+#define NV10_TEXTURE_FROM_CPU_CLIP_HORIZONTAL_W__SHIFT 16
+
+#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL 0x00000310
+#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL_Y__MASK 0x0000ffff
+#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL_Y__SHIFT 0
+#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL_H__MASK 0xffff0000
+#define NV10_TEXTURE_FROM_CPU_CLIP_VERTICAL_H__SHIFT 16
+
+#define NV10_TEXTURE_FROM_CPU_COLOR(i0) (0x00000400 + 0x4*(i0))
+#define NV10_TEXTURE_FROM_CPU_COLOR__ESIZE 0x00000004
+#define NV10_TEXTURE_FROM_CPU_COLOR__LEN 0x00000700
+
+
+#endif /* NV01_2D_XML */
diff --git a/src/mesa/drivers/dri/nouveau/nv04_3d.xml.h b/src/mesa/drivers/dri/nouveau/nv04_3d.xml.h
new file mode 100644
index 0000000000..d4fb680a36
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nv04_3d.xml.h
@@ -0,0 +1,738 @@
+#ifndef NV04_3D_XML
+#define NV04_3D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv04_3d.xml ( 17839 bytes, from 2010-11-15 02:23:48)
+- copyright.xml ( 6452 bytes, from 2010-11-15 15:10:58)
+- nv_object.xml ( 11547 bytes, from 2010-11-13 23:32:57)
+- nvchipsets.xml ( 3074 bytes, from 2010-11-13 23:32:57)
+- nv_defs.xml ( 4437 bytes, from 2010-11-01 00:28:46)
+- nv_3ddefs.xml ( 16394 bytes, from 2010-11-01 00:28:46)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+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.
+*/
+
+
+
+#define NV04_CONTEXT_SURFACES_3D_DMA_NOTIFY 0x00000180
+
+#define NV04_CONTEXT_SURFACES_3D_DMA_COLOR 0x00000184
+
+#define NV04_CONTEXT_SURFACES_3D_DMA_ZETA 0x00000188
+
+#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL 0x000002f8
+#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL_X__MASK 0x0000ffff
+#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL_X__SHIFT 0
+#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL_W__MASK 0xffff0000
+#define NV04_CONTEXT_SURFACES_3D_CLIP_HORIZONTAL_W__SHIFT 16
+
+#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL 0x000002fc
+#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL_Y__MASK 0x0000ffff
+#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL_Y__SHIFT 0
+#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL_H__MASK 0xffff0000
+#define NV04_CONTEXT_SURFACES_3D_CLIP_VERTICAL_H__SHIFT 16
+
+#define NV04_CONTEXT_SURFACES_3D_FORMAT 0x00000300
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR__MASK 0x000000ff
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR__SHIFT 0
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X1R5G5B5_Z1R5G5B5 0x00000001
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X1R5G5B5_X1R5G5B5 0x00000002
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5 0x00000003
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_Z8R8G8B8 0x00000004
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8 0x00000005
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X1A7R8G8B8_Z1A7R8G8B8 0x00000006
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X1A7R8G8B8_X1A7R8G8B8 0x00000007
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8 0x00000008
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_TYPE__MASK 0x0000ff00
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_TYPE__SHIFT 8
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_TYPE_PITCH 0x00000100
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_TYPE_SWIZZLE 0x00000200
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_BASE_SIZE_U__MASK 0x00ff0000
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_BASE_SIZE_U__SHIFT 16
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_BASE_SIZE_V__MASK 0xff000000
+#define NV04_CONTEXT_SURFACES_3D_FORMAT_BASE_SIZE_V__SHIFT 24
+
+#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE 0x00000304
+#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE_W__MASK 0x0000ffff
+#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE_W__SHIFT 0
+#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE_H__MASK 0xffff0000
+#define NV04_CONTEXT_SURFACES_3D_CLIP_SIZE_H__SHIFT 16
+
+#define NV04_CONTEXT_SURFACES_3D_PITCH 0x00000308
+#define NV04_CONTEXT_SURFACES_3D_PITCH_COLOR__MASK 0x0000ffff
+#define NV04_CONTEXT_SURFACES_3D_PITCH_COLOR__SHIFT 0
+#define NV04_CONTEXT_SURFACES_3D_PITCH_ZETA__MASK 0xffff0000
+#define NV04_CONTEXT_SURFACES_3D_PITCH_ZETA__SHIFT 16
+
+#define NV04_CONTEXT_SURFACES_3D_OFFSET_COLOR 0x0000030c
+
+#define NV04_CONTEXT_SURFACES_3D_OFFSET_ZETA 0x00000310
+
+
+#define NV04_TEXTURED_TRIANGLE_DMA_NOTIFY 0x00000180
+
+#define NV04_TEXTURED_TRIANGLE_DMA_A 0x00000184
+
+#define NV04_TEXTURED_TRIANGLE_DMA_B 0x00000188
+
+#define NV04_TEXTURED_TRIANGLE_SURFACES 0x0000018c
+
+#define NV04_TEXTURED_TRIANGLE_COLORKEY 0x00000300
+
+#define NV04_TEXTURED_TRIANGLE_OFFSET 0x00000304
+
+#define NV04_TEXTURED_TRIANGLE_FORMAT 0x00000308
+#define NV04_TEXTURED_TRIANGLE_FORMAT_DMA_A 0x00000001
+#define NV04_TEXTURED_TRIANGLE_FORMAT_DMA_B 0x00000002
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_KEY_ENABLE 0x00000004
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH__MASK 0x00000030
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH__SHIFT 4
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_CENTER 0x00000010
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_ZOH_CORNER 0x00000020
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH__MASK 0x000000c0
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH__SHIFT 6
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_CENTER 0x00000040
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ORIGIN_FOH_CORNER 0x00000080
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR__MASK 0x00000f00
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR__SHIFT 8
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_Y8 0x00000100
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A1R5G5B5 0x00000200
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_X1R5G5B5 0x00000300
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A4R4G4B4 0x00000400
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_R5G6B5 0x00000500
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_A8R8G8B8 0x00000600
+#define NV04_TEXTURED_TRIANGLE_FORMAT_COLOR_X8R8G8B8 0x00000700
+#define NV04_TEXTURED_TRIANGLE_FORMAT_MIPMAP_LEVELS__MASK 0x0000f000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_MIPMAP_LEVELS__SHIFT 12
+#define NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_U__MASK 0x000f0000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_U__SHIFT 16
+#define NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_V__MASK 0x00f00000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_BASE_SIZE_V__SHIFT 20
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU__MASK 0x07000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU__SHIFT 24
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_REPEAT 0x01000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_MIRRORED_REPEAT 0x02000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_EDGE 0x03000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_BORDER 0x04000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_WRAPU 0x08000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV__MASK 0x70000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV__SHIFT 28
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_REPEAT 0x10000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_MIRRORED_REPEAT 0x20000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_EDGE 0x30000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_BORDER 0x40000000
+#define NV04_TEXTURED_TRIANGLE_FORMAT_WRAPV 0x80000000
+
+#define NV04_TEXTURED_TRIANGLE_FILTER 0x0000030c
+#define NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_X__MASK 0x000000ff
+#define NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_X__SHIFT 0
+#define NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_Y__MASK 0x00007f00
+#define NV04_TEXTURED_TRIANGLE_FILTER_KERNEL_SIZE_Y__SHIFT 8
+#define NV04_TEXTURED_TRIANGLE_FILTER_MIPMAP_DITHER_ENABLE 0x00008000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MIPMAP_LODBIAS__MASK 0x00ff0000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MIPMAP_LODBIAS__SHIFT 16
+#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY__MASK 0x07000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY__SHIFT 24
+#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST 0x01000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR 0x02000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST 0x03000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST 0x04000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR 0x05000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR 0x06000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_ANISOTROPIC_MINIFY_ENABLE 0x08000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY__MASK 0x70000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY__SHIFT 28
+#define NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_NEAREST 0x10000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_MAGNIFY_LINEAR 0x20000000
+#define NV04_TEXTURED_TRIANGLE_FILTER_ANISOTROPIC_MAGNIFY_ENABLE 0x80000000
+
+#define NV04_TEXTURED_TRIANGLE_BLEND 0x00000310
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP__MASK 0x0000000f
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP__SHIFT 0
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_DECAL 0x00000001
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_MODULATE 0x00000002
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_DECALALPHA 0x00000003
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_MODULATEALPHA 0x00000004
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_DECALMASK 0x00000005
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_MODULATEMASK 0x00000006
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_COPY 0x00000007
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_MAP_ADD 0x00000008
+#define NV04_TEXTURED_TRIANGLE_BLEND_MASK_BIT__MASK 0x00000030
+#define NV04_TEXTURED_TRIANGLE_BLEND_MASK_BIT__SHIFT 4
+#define NV04_TEXTURED_TRIANGLE_BLEND_MASK_BIT_LSB 0x00000010
+#define NV04_TEXTURED_TRIANGLE_BLEND_MASK_BIT_MSB 0x00000020
+#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE__MASK 0x000000c0
+#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE__SHIFT 6
+#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_FLAT 0x00000040
+#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_GOURAUD 0x00000080
+#define NV04_TEXTURED_TRIANGLE_BLEND_SHADE_MODE_PHONG 0x000000c0
+#define NV04_TEXTURED_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE 0x00000100
+#define NV04_TEXTURED_TRIANGLE_BLEND_SPECULAR_ENABLE 0x00001000
+#define NV04_TEXTURED_TRIANGLE_BLEND_FOG_ENABLE 0x00010000
+#define NV04_TEXTURED_TRIANGLE_BLEND_BLEND_ENABLE 0x00100000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC__MASK 0x0f000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC__SHIFT 24
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_ZERO 0x01000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_ONE 0x02000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_SRC_COLOR 0x03000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_ONE_MINUS_SRC_COLOR 0x04000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_SRC_ALPHA 0x05000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_ONE_MINUS_SRC_ALPHA 0x06000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_DST_ALPHA 0x07000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_ONE_MINUS_DST_ALPHA 0x08000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_DST_COLOR 0x09000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_ONE_MINUS_DST_COLOR 0x0a000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_SRC_SRC_ALPHA_SATURATE 0x0b000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST__MASK 0xf0000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST__SHIFT 28
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_ZERO 0x10000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_ONE 0x20000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_SRC_COLOR 0x30000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_ONE_MINUS_SRC_COLOR 0x40000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_SRC_ALPHA 0x50000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_ONE_MINUS_SRC_ALPHA 0x60000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_DST_ALPHA 0x70000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_ONE_MINUS_DST_ALPHA 0x80000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_DST_COLOR 0x90000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_ONE_MINUS_DST_COLOR 0xa0000000
+#define NV04_TEXTURED_TRIANGLE_BLEND_DST_SRC_ALPHA_SATURATE 0xb0000000
+
+#define NV04_TEXTURED_TRIANGLE_CONTROL 0x00000314
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_REF__MASK 0x000000ff
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_REF__SHIFT 0
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC__MASK 0x00000f00
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC__SHIFT 8
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_NEVER 0x00000100
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_LESS 0x00000200
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_EQUAL 0x00000300
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_LEQUAL 0x00000400
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_GREATER 0x00000500
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_NOTEQUAL 0x00000600
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_GEQUAL 0x00000700
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_FUNC_ALWAYS 0x00000800
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ALPHA_ENABLE 0x00001000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN__MASK 0x00002000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN__SHIFT 13
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN_CENTER 0x00000000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN_CORNER 0x00002000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_ENABLE 0x00004000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC__MASK 0x000f0000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC__SHIFT 16
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_NEVER 0x00010000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_LESS 0x00020000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_EQUAL 0x00030000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_LEQUAL 0x00040000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_GREATER 0x00050000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_NOTEQUAL 0x00060000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_GEQUAL 0x00070000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FUNC_ALWAYS 0x00080000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE__MASK 0x00300000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE__SHIFT 20
+#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_BOTH 0x00000000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_NONE 0x00100000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_CW 0x00200000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_CULL_MODE_CCW 0x00300000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_DITHER_ENABLE 0x00400000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_PERSPECTIVE_ENABLE 0x00800000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_WRITE 0x01000000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT__MASK 0xc0000000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT__SHIFT 30
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_FIXED 0x40000000
+#define NV04_TEXTURED_TRIANGLE_CONTROL_Z_FORMAT_FLOAT 0x80000000
+
+#define NV04_TEXTURED_TRIANGLE_FOGCOLOR 0x00000318
+#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_B__MASK 0x000000ff
+#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_B__SHIFT 0
+#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_G__MASK 0x0000ff00
+#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_G__SHIFT 8
+#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_R__MASK 0x00ff0000
+#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_R__SHIFT 16
+#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_A__MASK 0xff000000
+#define NV04_TEXTURED_TRIANGLE_FOGCOLOR_A__SHIFT 24
+
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX(i0) (0x00000400 + 0x20*(i0))
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX__ESIZE 0x00000020
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX__LEN 0x00000010
+
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SX(i0) (0x00000400 + 0x20*(i0))
+
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SY(i0) (0x00000404 + 0x20*(i0))
+
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SZ(i0) (0x00000408 + 0x20*(i0))
+
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_RHW(i0) (0x0000040c + 0x20*(i0))
+
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR(i0) (0x00000410 + 0x20*(i0))
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_B__MASK 0x000000ff
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_B__SHIFT 0
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_G__MASK 0x0000ff00
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_G__SHIFT 8
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_R__MASK 0x00ff0000
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_R__SHIFT 16
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_A__MASK 0xff000000
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_COLOR_A__SHIFT 24
+
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR(i0) (0x00000414 + 0x20*(i0))
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_B__MASK 0x000000ff
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_B__SHIFT 0
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_G__MASK 0x0000ff00
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_G__SHIFT 8
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_R__MASK 0x00ff0000
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_R__SHIFT 16
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG__MASK 0xff000000
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_SPECULAR_FOG__SHIFT 24
+
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_TU(i0) (0x00000418 + 0x20*(i0))
+
+#define NV04_TEXTURED_TRIANGLE_TLVERTEX_TV(i0) (0x0000041c + 0x20*(i0))
+
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE(i0) (0x00000600 + 0x4*(i0))
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE__ESIZE 0x00000004
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE__LEN 0x00000040
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I0__MASK 0x0000000f
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I0__SHIFT 0
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I1__MASK 0x000000f0
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I1__SHIFT 4
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I2__MASK 0x00000f00
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I2__SHIFT 8
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I3__MASK 0x0000f000
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I3__SHIFT 12
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I4__MASK 0x000f0000
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I4__SHIFT 16
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I5__MASK 0x00f00000
+#define NV04_TEXTURED_TRIANGLE_DRAWPRIMITIVE_I5__SHIFT 20
+
+
+#define NV04_MULTITEX_TRIANGLE_DMA_NOTIFY 0x00000180
+
+#define NV04_MULTITEX_TRIANGLE_DMA_A 0x00000184
+
+#define NV04_MULTITEX_TRIANGLE_DMA_B 0x00000188
+
+#define NV04_MULTITEX_TRIANGLE_SURFACES 0x0000018c
+
+#define NV04_MULTITEX_TRIANGLE_OFFSET(i0) (0x00000308 + 0x4*(i0))
+#define NV04_MULTITEX_TRIANGLE_OFFSET__ESIZE 0x00000004
+#define NV04_MULTITEX_TRIANGLE_OFFSET__LEN 0x00000002
+
+#define NV04_MULTITEX_TRIANGLE_FORMAT(i0) (0x00000310 + 0x4*(i0))
+#define NV04_MULTITEX_TRIANGLE_FORMAT__ESIZE 0x00000004
+#define NV04_MULTITEX_TRIANGLE_FORMAT__LEN 0x00000002
+#define NV04_MULTITEX_TRIANGLE_FORMAT_DMA_A 0x00000001
+#define NV04_MULTITEX_TRIANGLE_FORMAT_DMA_B 0x00000002
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH__MASK 0x00000030
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH__SHIFT 4
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_CENTER 0x00000010
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_ZOH_CORNER 0x00000020
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH__MASK 0x000000c0
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH__SHIFT 6
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH_CENTER 0x00000040
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ORIGIN_FOH_CORNER 0x00000080
+#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR__MASK 0x00000f00
+#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR__SHIFT 8
+#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_Y8 0x00000100
+#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_A1R5G5B5 0x00000200
+#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_X1R5G5B5 0x00000300
+#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_A4R4G4B4 0x00000400
+#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_R5G6B5 0x00000500
+#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_A8R8G8B8 0x00000600
+#define NV04_MULTITEX_TRIANGLE_FORMAT_COLOR_X8R8G8B8 0x00000700
+#define NV04_MULTITEX_TRIANGLE_FORMAT_MIPMAP_LEVELS__MASK 0x0000f000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_MIPMAP_LEVELS__SHIFT 12
+#define NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_U__MASK 0x000f0000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_U__SHIFT 16
+#define NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_V__MASK 0x00f00000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_BASE_SIZE_V__SHIFT 20
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU__MASK 0x07000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU__SHIFT 24
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_REPEAT 0x01000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_MIRRORED_REPEAT 0x02000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_EDGE 0x03000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSU_CLAMP_TO_BORDER 0x04000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_WRAPU 0x08000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV__MASK 0x70000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV__SHIFT 28
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_REPEAT 0x10000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_MIRRORED_REPEAT 0x20000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_EDGE 0x30000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_ADDRESSV_CLAMP_TO_BORDER 0x40000000
+#define NV04_MULTITEX_TRIANGLE_FORMAT_WRAPV 0x80000000
+
+#define NV04_MULTITEX_TRIANGLE_FILTER(i0) (0x00000318 + 0x4*(i0))
+#define NV04_MULTITEX_TRIANGLE_FILTER__ESIZE 0x00000004
+#define NV04_MULTITEX_TRIANGLE_FILTER__LEN 0x00000002
+#define NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_X__MASK 0x000000ff
+#define NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_X__SHIFT 0
+#define NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_Y__MASK 0x00007f00
+#define NV04_MULTITEX_TRIANGLE_FILTER_KERNEL_SIZE_Y__SHIFT 8
+#define NV04_MULTITEX_TRIANGLE_FILTER_MIPMAP_DITHER_ENABLE 0x00008000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MIPMAP_LODBIAS__MASK 0x00ff0000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MIPMAP_LODBIAS__SHIFT 16
+#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY__MASK 0x07000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY__SHIFT 24
+#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_NEAREST 0x01000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_LINEAR 0x02000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST 0x03000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST 0x04000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR 0x05000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR 0x06000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_ANISOTROPIC_MINIFY_ENABLE 0x08000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY__MASK 0x70000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY__SHIFT 28
+#define NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY_NEAREST 0x10000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_MAGNIFY_LINEAR 0x20000000
+#define NV04_MULTITEX_TRIANGLE_FILTER_ANISOTROPIC_MAGNIFY_ENABLE 0x80000000
+
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA(i0) (0x00000320 + 0xc*(i0))
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA__ESIZE 0x0000000c
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA__LEN 0x00000002
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE0 0x00000001
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0__MASK 0x000000fc
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0__SHIFT 2
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_ZERO 0x00000004
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_CONSTANT 0x00000008
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_PRIMARY_COLOR 0x0000000c
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_PREVIOUS 0x00000010
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_TEXTURE0 0x00000014
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_TEXTURE1 0x00000018
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT0_TEXTURELOD 0x0000001c
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE1 0x00000100
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1__MASK 0x0000fc00
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1__SHIFT 10
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_ZERO 0x00000400
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_CONSTANT 0x00000800
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_PRIMARY_COLOR 0x00000c00
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_PREVIOUS 0x00001000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_TEXTURE0 0x00001400
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_TEXTURE1 0x00001800
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT1_TEXTURELOD 0x00001c00
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE2 0x00010000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2__MASK 0x00fc0000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2__SHIFT 18
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_ZERO 0x00040000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_CONSTANT 0x00080000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_PRIMARY_COLOR 0x000c0000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_PREVIOUS 0x00100000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_TEXTURE0 0x00140000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_TEXTURE1 0x00180000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT2_TEXTURELOD 0x001c0000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_INVERSE3 0x01000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3__MASK 0x1c000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3__SHIFT 26
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_ZERO 0x04000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_CONSTANT 0x08000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_PRIMARY_COLOR 0x0c000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_PREVIOUS 0x10000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_TEXTURE0 0x14000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_TEXTURE1 0x18000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_ARGUMENT3_TEXTURELOD 0x1c000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP__MASK 0xe0000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP__SHIFT 29
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_IDENTITY 0x20000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SCALE2 0x40000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_SCALE4 0x60000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_BIAS 0x80000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_ALPHA_MAP_BIAS_SCALE2 0xe0000000
+
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR(i0) (0x00000324 + 0xc*(i0))
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR__ESIZE 0x0000000c
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR__LEN 0x00000002
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE0 0x00000001
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA0 0x00000002
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0__MASK 0x000000fc
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0__SHIFT 2
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_ZERO 0x00000004
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_CONSTANT 0x00000008
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_PRIMARY_COLOR 0x0000000c
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_PREVIOUS 0x00000010
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_TEXTURE0 0x00000014
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_TEXTURE1 0x00000018
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_TEXTURELOD 0x0000001c
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE1 0x00000100
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA1 0x00000200
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1__MASK 0x0000fc00
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1__SHIFT 10
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_ZERO 0x00000400
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_CONSTANT 0x00000800
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_PRIMARY_COLOR 0x00000c00
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_PREVIOUS 0x00001000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_TEXTURE0 0x00001400
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_TEXTURE1 0x00001800
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT1_TEXTURELOD 0x00001c00
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE2 0x00010000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA2 0x00020000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2__MASK 0x00fc0000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2__SHIFT 18
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_ZERO 0x00040000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_CONSTANT 0x00080000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_PRIMARY_COLOR 0x000c0000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_PREVIOUS 0x00100000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_TEXTURE0 0x00140000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_TEXTURE1 0x00180000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT2_TEXTURELOD 0x001c0000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_INVERSE3 0x01000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ALPHA3 0x02000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3__MASK 0x1c000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3__SHIFT 26
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_ZERO 0x04000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_CONSTANT 0x08000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_PRIMARY_COLOR 0x0c000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_PREVIOUS 0x10000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_TEXTURE0 0x14000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_TEXTURE1 0x18000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT3_TEXTURELOD 0x1c000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP__MASK 0xe0000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP__SHIFT 29
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_IDENTITY 0x20000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SCALE2 0x40000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_SCALE4 0x60000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_BIAS 0x80000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_MAP_BIAS_SCALE2 0xe0000000
+
+#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR 0x00000334
+#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_B__MASK 0x000000ff
+#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_B__SHIFT 0
+#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_G__MASK 0x0000ff00
+#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_G__SHIFT 8
+#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_R__MASK 0x00ff0000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_R__SHIFT 16
+#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_A__MASK 0xff000000
+#define NV04_MULTITEX_TRIANGLE_COMBINE_FACTOR_A__SHIFT 24
+
+#define NV04_MULTITEX_TRIANGLE_BLEND 0x00000338
+#define NV04_MULTITEX_TRIANGLE_BLEND_MASK_BIT__MASK 0x00000030
+#define NV04_MULTITEX_TRIANGLE_BLEND_MASK_BIT__SHIFT 4
+#define NV04_MULTITEX_TRIANGLE_BLEND_MASK_BIT_LSB 0x00000010
+#define NV04_MULTITEX_TRIANGLE_BLEND_MASK_BIT_MSB 0x00000020
+#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE__MASK 0x000000c0
+#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE__SHIFT 6
+#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_FLAT 0x00000040
+#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_GOURAUD 0x00000080
+#define NV04_MULTITEX_TRIANGLE_BLEND_SHADE_MODE_PHONG 0x000000c0
+#define NV04_MULTITEX_TRIANGLE_BLEND_TEXTURE_PERSPECTIVE_ENABLE 0x00000100
+#define NV04_MULTITEX_TRIANGLE_BLEND_SPECULAR_ENABLE 0x00001000
+#define NV04_MULTITEX_TRIANGLE_BLEND_FOG_ENABLE 0x00010000
+#define NV04_MULTITEX_TRIANGLE_BLEND_BLEND_ENABLE 0x00100000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC__MASK 0x0f000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC__SHIFT 24
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_ZERO 0x01000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_ONE 0x02000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_SRC_COLOR 0x03000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_ONE_MINUS_SRC_COLOR 0x04000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_SRC_ALPHA 0x05000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_ONE_MINUS_SRC_ALPHA 0x06000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_DST_ALPHA 0x07000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_ONE_MINUS_DST_ALPHA 0x08000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_DST_COLOR 0x09000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_ONE_MINUS_DST_COLOR 0x0a000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_SRC_SRC_ALPHA_SATURATE 0x0b000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST__MASK 0xf0000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST__SHIFT 28
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_ZERO 0x10000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_ONE 0x20000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_SRC_COLOR 0x30000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_ONE_MINUS_SRC_COLOR 0x40000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_SRC_ALPHA 0x50000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_ONE_MINUS_SRC_ALPHA 0x60000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_DST_ALPHA 0x70000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_ONE_MINUS_DST_ALPHA 0x80000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_DST_COLOR 0x90000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_ONE_MINUS_DST_COLOR 0xa0000000
+#define NV04_MULTITEX_TRIANGLE_BLEND_DST_SRC_ALPHA_SATURATE 0xb0000000
+
+#define NV04_MULTITEX_TRIANGLE_CONTROL0 0x0000033c
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_REF__MASK 0x000000ff
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_REF__SHIFT 0
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC__MASK 0x00000f00
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC__SHIFT 8
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_NEVER 0x00000100
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_LESS 0x00000200
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_EQUAL 0x00000300
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_LEQUAL 0x00000400
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_GREATER 0x00000500
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_NOTEQUAL 0x00000600
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_GEQUAL 0x00000700
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_FUNC_ALWAYS 0x00000800
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_ENABLE 0x00001000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN__MASK 0x00002000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN__SHIFT 13
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN_CENTER 0x00000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN_CORNER 0x00002000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_ENABLE 0x00004000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC__MASK 0x000f0000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC__SHIFT 16
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_NEVER 0x00010000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_LESS 0x00020000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_EQUAL 0x00030000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_LEQUAL 0x00040000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_GREATER 0x00050000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_NOTEQUAL 0x00060000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_GEQUAL 0x00070000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FUNC_ALWAYS 0x00080000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE__MASK 0x00300000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE__SHIFT 20
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_BOTH 0x00000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_NONE 0x00100000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_CW 0x00200000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_CULL_MODE_CCW 0x00300000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_DITHER_ENABLE 0x00400000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_PERSPECTIVE_ENABLE 0x00800000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_WRITE 0x01000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_STENCIL_WRITE 0x02000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_ALPHA_WRITE 0x04000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_RED_WRITE 0x08000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_GREEN_WRITE 0x10000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_BLUE_WRITE 0x20000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT__MASK 0xc0000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT__SHIFT 30
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_FIXED 0x40000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL0_Z_FORMAT_FLOAT 0x80000000
+
+#define NV04_MULTITEX_TRIANGLE_CONTROL1 0x00000340
+#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_ENABLE 0x00000001
+#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC__MASK 0x000000f0
+#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_FUNC__SHIFT 4
+#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF__MASK 0x0000ff00
+#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_REF__SHIFT 8
+#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ__MASK 0x00ff0000
+#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_READ__SHIFT 16
+#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE__MASK 0xff000000
+#define NV04_MULTITEX_TRIANGLE_CONTROL1_STENCIL_MASK_WRITE__SHIFT 24
+
+#define NV04_MULTITEX_TRIANGLE_CONTROL2 0x00000344
+#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_FAIL__MASK 0x0000000f
+#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_FAIL__SHIFT 0
+#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL__MASK 0x000000f0
+#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZFAIL__SHIFT 4
+#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS__MASK 0x00000f00
+#define NV04_MULTITEX_TRIANGLE_CONTROL2_STENCIL_OP_ZPASS__SHIFT 8
+
+#define NV04_MULTITEX_TRIANGLE_FOGCOLOR 0x00000348
+#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_B__MASK 0x000000ff
+#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_B__SHIFT 0
+#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_G__MASK 0x0000ff00
+#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_G__SHIFT 8
+#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_R__MASK 0x00ff0000
+#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_R__SHIFT 16
+#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_A__MASK 0xff000000
+#define NV04_MULTITEX_TRIANGLE_FOGCOLOR_A__SHIFT 24
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX(i0) (0x00000400 + 0x28*(i0))
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX__ESIZE 0x00000028
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX__LEN 0x00000008
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SX(i0) (0x00000400 + 0x28*(i0))
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SY(i0) (0x00000404 + 0x28*(i0))
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SZ(i0) (0x00000408 + 0x28*(i0))
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_RHW(i0) (0x0000040c + 0x28*(i0))
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR(i0) (0x00000410 + 0x28*(i0))
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_B__MASK 0x000000ff
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_B__SHIFT 0
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_G__MASK 0x0000ff00
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_G__SHIFT 8
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_R__MASK 0x00ff0000
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_R__SHIFT 16
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_A__MASK 0xff000000
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_COLOR_A__SHIFT 24
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR(i0) (0x00000414 + 0x28*(i0))
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_B__MASK 0x000000ff
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_B__SHIFT 0
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_G__MASK 0x0000ff00
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_G__SHIFT 8
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_R__MASK 0x00ff0000
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_R__SHIFT 16
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_FOG__MASK 0xff000000
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_SPECULAR_FOG__SHIFT 24
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU0(i0) (0x00000418 + 0x28*(i0))
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV0(i0) (0x0000041c + 0x28*(i0))
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TU1(i0) (0x00000420 + 0x28*(i0))
+
+#define NV04_MULTITEX_TRIANGLE_TLMTVERTEX_TV1(i0) (0x00000424 + 0x28*(i0))
+
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE(i0) (0x00000540 + 0x4*(i0))
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE__ESIZE 0x00000004
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE__LEN 0x00000030
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I0__MASK 0x0000000f
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I0__SHIFT 0
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I1__MASK 0x000000f0
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I1__SHIFT 4
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I2__MASK 0x00000f00
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I2__SHIFT 8
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I3__MASK 0x0000f000
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I3__SHIFT 12
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I4__MASK 0x000f0000
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I4__SHIFT 16
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I5__MASK 0x00f00000
+#define NV04_MULTITEX_TRIANGLE_DRAWPRIMITIVE_I5__SHIFT 20
+
+
+#endif /* NV04_3D_XML */
diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.c b/src/mesa/drivers/dri/nouveau/nv04_context.c
index 8683343b39..3140af56fd 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_context.c
@@ -28,7 +28,7 @@
#include "nouveau_context.h"
#include "nouveau_fbo.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv04_3d.xml.h"
#include "nv04_driver.h"
static GLboolean
diff --git a/src/mesa/drivers/dri/nouveau/nv04_context.h b/src/mesa/drivers/dri/nouveau/nv04_context.h
index 45e70d2bc3..960a6550dc 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_context.h
+++ b/src/mesa/drivers/dri/nouveau/nv04_context.h
@@ -28,6 +28,7 @@
#define __NV04_CONTEXT_H__
#include "nouveau_context.h"
+#include "nv_object.xml.h"
struct nv04_context {
struct nouveau_context base;
diff --git a/src/mesa/drivers/dri/nouveau/nv04_render.c b/src/mesa/drivers/dri/nouveau/nv04_render.c
index 47bad24f9d..ad45093edd 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_render.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_render.c
@@ -27,7 +27,7 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv04_3d.xml.h"
#include "nv04_driver.h"
#include "tnl/tnl.h"
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
index a3e343660f..854571d07e 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_fb.c
@@ -28,7 +28,7 @@
#include "nouveau_context.h"
#include "nouveau_fbo.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv04_3d.xml.h"
#include "nv04_driver.h"
static inline unsigned
@@ -36,11 +36,11 @@ get_rt_format(gl_format format)
{
switch (format) {
case MESA_FORMAT_XRGB8888:
- return 0x05;
+ return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_X8R8G8B8_X8R8G8B8;
case MESA_FORMAT_ARGB8888:
- return 0x08;
+ return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_A8R8G8B8;
case MESA_FORMAT_RGB565:
- return 0x03;
+ return NV04_CONTEXT_SURFACES_3D_FORMAT_COLOR_R5G6B5;
default:
assert(0);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
index 658b23a4d9..21478de262 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_frag.c
@@ -27,12 +27,13 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv_object.xml.h"
+#include "nv04_3d.xml.h"
#include "nv04_driver.h"
#define COMBINER_SHIFT(in) \
- (NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT##in##_SHIFT \
- - NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_SHIFT)
+ (NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT##in##__SHIFT \
+ - NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0__SHIFT)
#define COMBINER_SOURCE(reg) \
NV04_MULTITEX_TRIANGLE_COMBINE_COLOR_ARGUMENT0_##reg
#define COMBINER_INVERT \
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
index a114f44b22..98f2f98f1d 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_raster.c
@@ -27,7 +27,8 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv_object.xml.h"
+#include "nv04_3d.xml.h"
#include "nv04_driver.h"
static unsigned
@@ -142,7 +143,7 @@ nv04_emit_control(struct gl_context *ctx, int emit)
int cull_mode = ctx->Polygon.CullFaceMode;
int front_face = ctx->Polygon.FrontFace;
uint32_t ctrl0 = 1 << 30 |
- NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN;
+ NV04_MULTITEX_TRIANGLE_CONTROL0_ORIGIN_CORNER;
uint32_t ctrl1 = 0, ctrl2 = 0;
/* Color mask. */
@@ -210,7 +211,7 @@ nv04_emit_control(struct gl_context *ctx, int emit)
int cull_mode = ctx->Polygon.CullFaceMode;
int front_face = ctx->Polygon.FrontFace;
uint32_t ctrl = 1 << 30 |
- NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN;
+ NV04_TEXTURED_TRIANGLE_CONTROL_ORIGIN_CORNER;
/* Dithering. */
if (ctx->Color.DitherFlag)
diff --git a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
index 1fe47a30e4..5ed8b14755 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_state_tex.c
@@ -29,7 +29,8 @@
#include "nouveau_texture.h"
#include "nouveau_util.h"
#include "nouveau_gldefs.h"
-#include "nouveau_class.h"
+#include "nv_object.xml.h"
+#include "nv04_3d.xml.h"
#include "nv04_driver.h"
static uint32_t
diff --git a/src/mesa/drivers/dri/nouveau/nv04_surface.c b/src/mesa/drivers/dri/nouveau/nv04_surface.c
index 6d3ffa26d3..c1eda8b7f3 100644
--- a/src/mesa/drivers/dri/nouveau/nv04_surface.c
+++ b/src/mesa/drivers/dri/nouveau/nv04_surface.c
@@ -25,7 +25,10 @@
*/
#include "nouveau_driver.h"
-#include "nouveau_class.h"
+#include "nv_object.xml.h"
+#include "nv_m2mf.xml.h"
+#include "nv01_2d.xml.h"
+#include "nv04_3d.xml.h"
#include "nouveau_context.h"
#include "nouveau_util.h"
#include "nv04_driver.h"
@@ -283,9 +286,9 @@ nv04_surface_copy_m2mf(struct gl_context *ctx,
unsigned dst_offset = dst->offset + dy * dst->pitch + dx * dst->cpp;
unsigned src_offset = src->offset + sy * src->pitch + sx * src->cpp;
- nouveau_bo_marko(bctx, m2mf, NV04_MEMORY_TO_MEMORY_FORMAT_DMA_BUFFER_IN,
+ nouveau_bo_marko(bctx, m2mf, NV04_M2MF_DMA_BUFFER_IN,
src->bo, bo_flags | NOUVEAU_BO_RD);
- nouveau_bo_marko(bctx, m2mf, NV04_MEMORY_TO_MEMORY_FORMAT_DMA_BUFFER_OUT,
+ nouveau_bo_marko(bctx, m2mf, NV04_M2MF_DMA_BUFFER_OUT,
dst->bo, bo_flags | NOUVEAU_BO_WR);
while (h) {
@@ -293,7 +296,7 @@ nv04_surface_copy_m2mf(struct gl_context *ctx,
MARK_RING(chan, 9, 2);
- BEGIN_RING(chan, m2mf, NV04_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8);
+ BEGIN_RING(chan, m2mf, NV04_M2MF_OFFSET_IN, 8);
OUT_RELOCl(chan, src->bo, src_offset,
bo_flags | NOUVEAU_BO_RD);
OUT_RELOCl(chan, dst->bo, dst_offset,
@@ -488,12 +491,11 @@ nv04_surface_init(struct gl_context *ctx)
goto fail;
/* Memory to memory format. */
- ret = nouveau_grobj_alloc(chan, handle++, NV04_MEMORY_TO_MEMORY_FORMAT,
- &hw->m2mf);
+ ret = nouveau_grobj_alloc(chan, handle++, NV04_M2MF, &hw->m2mf);
if (ret)
goto fail;
- BEGIN_RING(chan, hw->m2mf, NV04_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY, 1);
+ BEGIN_RING(chan, hw->m2mf, NV04_M2MF_DMA_NOTIFY, 1);
OUT_RING (chan, hw->ntfy->handle);
/* Context surfaces 2D. */
diff --git a/src/mesa/drivers/dri/nouveau/nv10_3d.xml.h b/src/mesa/drivers/dri/nouveau/nv10_3d.xml.h
new file mode 100644
index 0000000000..cdc61f4573
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nv10_3d.xml.h
@@ -0,0 +1,1619 @@
+#ifndef NV10_3D_XML
+#define NV10_3D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv10_3d.xml ( 18437 bytes, from 2010-11-15 15:30:21)
+- copyright.xml ( 6452 bytes, from 2010-11-15 15:10:58)
+- nv_defs.xml ( 4437 bytes, from 2010-11-01 00:28:46)
+- nv_3ddefs.xml ( 16394 bytes, from 2010-11-01 00:28:46)
+- nv_object.xml ( 11547 bytes, from 2010-11-13 23:32:57)
+- nvchipsets.xml ( 3074 bytes, from 2010-11-13 23:32:57)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+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.
+*/
+
+
+#define NV10_VERTEX_ATTR_POS 0x00000000
+#define NV10_VERTEX_ATTR_COLOR0 0x00000001
+#define NV10_VERTEX_ATTR_COLOR1 0x00000002
+#define NV10_VERTEX_ATTR_TEX0 0x00000003
+#define NV10_VERTEX_ATTR_TEX1 0x00000004
+#define NV10_VERTEX_ATTR_NORMAL 0x00000005
+#define NV10_VERTEX_ATTR_WEIGHT 0x00000006
+#define NV10_VERTEX_ATTR_FOG 0x00000007
+
+
+
+#define NV11_3D_FLIP_SET_READ 0x00000120
+
+#define NV11_3D_FLIP_SET_WRITE 0x00000124
+
+#define NV11_3D_FLIP_MAX 0x00000128
+
+#define NV11_3D_FLIP_INCR_WRITE 0x0000012c
+
+#define NV11_3D_FLIP_WAIT 0x00000130
+
+#define NV10_3D_DMA_NOTIFY 0x00000180
+
+#define NV10_3D_DMA_TEXTURE0 0x00000184
+
+#define NV10_3D_DMA_TEXTURE1 0x00000188
+
+#define NV10_3D_DMA_COLOR 0x00000194
+
+#define NV10_3D_DMA_ZETA 0x00000198
+
+#define NV10_3D_RT_HORIZ 0x00000200
+#define NV10_3D_RT_HORIZ_X__MASK 0x0000ffff
+#define NV10_3D_RT_HORIZ_X__SHIFT 0
+#define NV10_3D_RT_HORIZ_W__MASK 0xffff0000
+#define NV10_3D_RT_HORIZ_W__SHIFT 16
+
+#define NV10_3D_RT_VERT 0x00000204
+#define NV10_3D_RT_VERT_Y__MASK 0x0000ffff
+#define NV10_3D_RT_VERT_Y__SHIFT 0
+#define NV10_3D_RT_VERT_H__MASK 0xffff0000
+#define NV10_3D_RT_VERT_H__SHIFT 16
+
+#define NV10_3D_RT_FORMAT 0x00000208
+#define NV10_3D_RT_FORMAT_TYPE__MASK 0x00000f00
+#define NV10_3D_RT_FORMAT_TYPE__SHIFT 8
+#define NV10_3D_RT_FORMAT_TYPE_LINEAR 0x00000100
+#define NV10_3D_RT_FORMAT_TYPE_SWIZZLED 0x00000200
+#define NV10_3D_RT_FORMAT_DEPTH__MASK 0x00000030
+#define NV10_3D_RT_FORMAT_DEPTH__SHIFT 4
+#define NV10_3D_RT_FORMAT_DEPTH_Z24S8 0x00000000
+#define NV10_3D_RT_FORMAT_DEPTH_Z16 0x00000010
+#define NV10_3D_RT_FORMAT_COLOR__MASK 0x0000000f
+#define NV10_3D_RT_FORMAT_COLOR__SHIFT 0
+#define NV10_3D_RT_FORMAT_COLOR_R5G6B5 0x00000003
+#define NV10_3D_RT_FORMAT_COLOR_X8R8G8B8 0x00000005
+#define NV10_3D_RT_FORMAT_COLOR_A8R8G8B8 0x00000008
+#define NV10_3D_RT_FORMAT_COLOR_B8 0x00000009
+
+#define NV10_3D_RT_PITCH 0x0000020c
+#define NV10_3D_RT_PITCH_COLOR_PITCH__MASK 0x0000ffff
+#define NV10_3D_RT_PITCH_COLOR_PITCH__SHIFT 0
+#define NV10_3D_RT_PITCH_ZETA_PITCH__MASK 0xffff0000
+#define NV10_3D_RT_PITCH_ZETA_PITCH__SHIFT 16
+
+#define NV10_3D_COLOR_OFFSET 0x00000210
+
+#define NV10_3D_ZETA_OFFSET 0x00000214
+
+#define NV10_3D_UNK0290 0x00000290
+
+#define NV10_3D_VIEWPORT_CLIP_MODE 0x000002b4
+
+#define NV10_3D_VIEWPORT_CLIP_HORIZ(i0) (0x000002c0 + 0x4*(i0))
+#define NV10_3D_VIEWPORT_CLIP_HORIZ__ESIZE 0x00000004
+#define NV10_3D_VIEWPORT_CLIP_HORIZ__LEN 0x00000008
+#define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_L__MASK 0x000007ff
+#define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_L__SHIFT 0
+#define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_LEFT_ENABLE 0x00000800
+#define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_R__MASK 0x07ff0000
+#define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_R__SHIFT 16
+#define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_RIGHT_ENABLE 0x08000000
+
+#define NV10_3D_VIEWPORT_CLIP_VERT(i0) (0x000002e0 + 0x4*(i0))
+#define NV10_3D_VIEWPORT_CLIP_VERT__ESIZE 0x00000004
+#define NV10_3D_VIEWPORT_CLIP_VERT__LEN 0x00000008
+#define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_T__MASK 0x000007ff
+#define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_T__SHIFT 0
+#define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_TOP_ENABLE 0x00000800
+#define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_B__MASK 0x07ff0000
+#define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_B__SHIFT 16
+#define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_BOTTOM_ENABLE 0x08000000
+
+#define NV10_3D_ALPHA_FUNC_ENABLE 0x00000300
+
+#define NV10_3D_BLEND_FUNC_ENABLE 0x00000304
+
+#define NV10_3D_CULL_FACE_ENABLE 0x00000308
+
+#define NV10_3D_DEPTH_TEST_ENABLE 0x0000030c
+
+#define NV10_3D_DITHER_ENABLE 0x00000310
+
+#define NV10_3D_LIGHTING_ENABLE 0x00000314
+
+#define NV10_3D_POINT_PARAMETERS_ENABLE 0x00000318
+
+#define NV10_3D_POINT_SMOOTH_ENABLE 0x0000031c
+
+#define NV10_3D_LINE_SMOOTH_ENABLE 0x00000320
+
+#define NV10_3D_POLYGON_SMOOTH_ENABLE 0x00000324
+
+#define NV10_3D_STENCIL_ENABLE 0x0000032c
+
+#define NV10_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330
+
+#define NV10_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334
+
+#define NV10_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338
+
+#define NV10_3D_ALPHA_FUNC_FUNC 0x0000033c
+#define NV10_3D_ALPHA_FUNC_FUNC_NEVER 0x00000200
+#define NV10_3D_ALPHA_FUNC_FUNC_LESS 0x00000201
+#define NV10_3D_ALPHA_FUNC_FUNC_EQUAL 0x00000202
+#define NV10_3D_ALPHA_FUNC_FUNC_LEQUAL 0x00000203
+#define NV10_3D_ALPHA_FUNC_FUNC_GREATER 0x00000204
+#define NV10_3D_ALPHA_FUNC_FUNC_NOTEQUAL 0x00000205
+#define NV10_3D_ALPHA_FUNC_FUNC_GEQUAL 0x00000206
+#define NV10_3D_ALPHA_FUNC_FUNC_ALWAYS 0x00000207
+
+#define NV10_3D_ALPHA_FUNC_REF 0x00000340
+
+#define NV10_3D_BLEND_FUNC_SRC 0x00000344
+#define NV10_3D_BLEND_FUNC_SRC_ZERO 0x00000000
+#define NV10_3D_BLEND_FUNC_SRC_ONE 0x00000001
+#define NV10_3D_BLEND_FUNC_SRC_SRC_COLOR 0x00000300
+#define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_SRC_COLOR 0x00000301
+#define NV10_3D_BLEND_FUNC_SRC_SRC_ALPHA 0x00000302
+#define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_SRC_ALPHA 0x00000303
+#define NV10_3D_BLEND_FUNC_SRC_DST_ALPHA 0x00000304
+#define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_DST_ALPHA 0x00000305
+#define NV10_3D_BLEND_FUNC_SRC_DST_COLOR 0x00000306
+#define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_DST_COLOR 0x00000307
+#define NV10_3D_BLEND_FUNC_SRC_SRC_ALPHA_SATURATE 0x00000308
+#define NV10_3D_BLEND_FUNC_SRC_CONSTANT_COLOR 0x00008001
+#define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_COLOR 0x00008002
+#define NV10_3D_BLEND_FUNC_SRC_CONSTANT_ALPHA 0x00008003
+#define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_ALPHA 0x00008004
+
+#define NV10_3D_BLEND_FUNC_DST 0x00000348
+#define NV10_3D_BLEND_FUNC_DST_ZERO 0x00000000
+#define NV10_3D_BLEND_FUNC_DST_ONE 0x00000001
+#define NV10_3D_BLEND_FUNC_DST_SRC_COLOR 0x00000300
+#define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_SRC_COLOR 0x00000301
+#define NV10_3D_BLEND_FUNC_DST_SRC_ALPHA 0x00000302
+#define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_SRC_ALPHA 0x00000303
+#define NV10_3D_BLEND_FUNC_DST_DST_ALPHA 0x00000304
+#define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_DST_ALPHA 0x00000305
+#define NV10_3D_BLEND_FUNC_DST_DST_COLOR 0x00000306
+#define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_DST_COLOR 0x00000307
+#define NV10_3D_BLEND_FUNC_DST_SRC_ALPHA_SATURATE 0x00000308
+#define NV10_3D_BLEND_FUNC_DST_CONSTANT_COLOR 0x00008001
+#define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_COLOR 0x00008002
+#define NV10_3D_BLEND_FUNC_DST_CONSTANT_ALPHA 0x00008003
+#define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_ALPHA 0x00008004
+
+#define NV10_3D_BLEND_COLOR 0x0000034c
+#define NV10_3D_BLEND_COLOR_B__MASK 0x000000ff
+#define NV10_3D_BLEND_COLOR_B__SHIFT 0
+#define NV10_3D_BLEND_COLOR_G__MASK 0x0000ff00
+#define NV10_3D_BLEND_COLOR_G__SHIFT 8
+#define NV10_3D_BLEND_COLOR_R__MASK 0x00ff0000
+#define NV10_3D_BLEND_COLOR_R__SHIFT 16
+#define NV10_3D_BLEND_COLOR_A__MASK 0xff000000
+#define NV10_3D_BLEND_COLOR_A__SHIFT 24
+
+#define NV10_3D_BLEND_EQUATION 0x00000350
+#define NV10_3D_BLEND_EQUATION_FUNC_ADD 0x00008006
+#define NV10_3D_BLEND_EQUATION_MIN 0x00008007
+#define NV10_3D_BLEND_EQUATION_MAX 0x00008008
+#define NV10_3D_BLEND_EQUATION_FUNC_SUBTRACT 0x0000800a
+#define NV10_3D_BLEND_EQUATION_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NV10_3D_DEPTH_FUNC 0x00000354
+#define NV10_3D_DEPTH_FUNC_NEVER 0x00000200
+#define NV10_3D_DEPTH_FUNC_LESS 0x00000201
+#define NV10_3D_DEPTH_FUNC_EQUAL 0x00000202
+#define NV10_3D_DEPTH_FUNC_LEQUAL 0x00000203
+#define NV10_3D_DEPTH_FUNC_GREATER 0x00000204
+#define NV10_3D_DEPTH_FUNC_NOTEQUAL 0x00000205
+#define NV10_3D_DEPTH_FUNC_GEQUAL 0x00000206
+#define NV10_3D_DEPTH_FUNC_ALWAYS 0x00000207
+
+#define NV10_3D_COLOR_MASK 0x00000358
+#define NV10_3D_COLOR_MASK_B 0x00000001
+#define NV10_3D_COLOR_MASK_G 0x00000100
+#define NV10_3D_COLOR_MASK_R 0x00010000
+#define NV10_3D_COLOR_MASK_A 0x01000000
+
+#define NV10_3D_DEPTH_WRITE_ENABLE 0x0000035c
+
+#define NV10_3D_STENCIL_MASK 0x00000360
+
+#define NV10_3D_STENCIL_FUNC_FUNC 0x00000364
+#define NV10_3D_STENCIL_FUNC_FUNC_NEVER 0x00000200
+#define NV10_3D_STENCIL_FUNC_FUNC_LESS 0x00000201
+#define NV10_3D_STENCIL_FUNC_FUNC_EQUAL 0x00000202
+#define NV10_3D_STENCIL_FUNC_FUNC_LEQUAL 0x00000203
+#define NV10_3D_STENCIL_FUNC_FUNC_GREATER 0x00000204
+#define NV10_3D_STENCIL_FUNC_FUNC_NOTEQUAL 0x00000205
+#define NV10_3D_STENCIL_FUNC_FUNC_GEQUAL 0x00000206
+#define NV10_3D_STENCIL_FUNC_FUNC_ALWAYS 0x00000207
+
+#define NV10_3D_STENCIL_FUNC_REF 0x00000368
+
+#define NV10_3D_STENCIL_FUNC_MASK 0x0000036c
+
+#define NV10_3D_STENCIL_OP_FAIL 0x00000370
+#define NV10_3D_STENCIL_OP_FAIL_ZERO 0x00000000
+#define NV10_3D_STENCIL_OP_FAIL_INVERT 0x0000150a
+#define NV10_3D_STENCIL_OP_FAIL_KEEP 0x00001e00
+#define NV10_3D_STENCIL_OP_FAIL_REPLACE 0x00001e01
+#define NV10_3D_STENCIL_OP_FAIL_INCR 0x00001e02
+#define NV10_3D_STENCIL_OP_FAIL_DECR 0x00001e03
+#define NV10_3D_STENCIL_OP_FAIL_INCR_WRAP 0x00008507
+#define NV10_3D_STENCIL_OP_FAIL_DECR_WRAP 0x00008508
+
+#define NV10_3D_STENCIL_OP_ZFAIL 0x00000374
+#define NV10_3D_STENCIL_OP_ZFAIL_ZERO 0x00000000
+#define NV10_3D_STENCIL_OP_ZFAIL_INVERT 0x0000150a
+#define NV10_3D_STENCIL_OP_ZFAIL_KEEP 0x00001e00
+#define NV10_3D_STENCIL_OP_ZFAIL_REPLACE 0x00001e01
+#define NV10_3D_STENCIL_OP_ZFAIL_INCR 0x00001e02
+#define NV10_3D_STENCIL_OP_ZFAIL_DECR 0x00001e03
+#define NV10_3D_STENCIL_OP_ZFAIL_INCR_WRAP 0x00008507
+#define NV10_3D_STENCIL_OP_ZFAIL_DECR_WRAP 0x00008508
+
+#define NV10_3D_STENCIL_OP_ZPASS 0x00000378
+#define NV10_3D_STENCIL_OP_ZPASS_ZERO 0x00000000
+#define NV10_3D_STENCIL_OP_ZPASS_INVERT 0x0000150a
+#define NV10_3D_STENCIL_OP_ZPASS_KEEP 0x00001e00
+#define NV10_3D_STENCIL_OP_ZPASS_REPLACE 0x00001e01
+#define NV10_3D_STENCIL_OP_ZPASS_INCR 0x00001e02
+#define NV10_3D_STENCIL_OP_ZPASS_DECR 0x00001e03
+#define NV10_3D_STENCIL_OP_ZPASS_INCR_WRAP 0x00008507
+#define NV10_3D_STENCIL_OP_ZPASS_DECR_WRAP 0x00008508
+
+#define NV10_3D_SHADE_MODEL 0x0000037c
+#define NV10_3D_SHADE_MODEL_FLAT 0x00001d00
+#define NV10_3D_SHADE_MODEL_SMOOTH 0x00001d01
+
+#define NV10_3D_LINE_WIDTH 0x00000380
+
+#define NV10_3D_POLYGON_OFFSET_FACTOR 0x00000384
+
+#define NV10_3D_POLYGON_OFFSET_UNITS 0x00000388
+
+#define NV10_3D_POLYGON_MODE_FRONT 0x0000038c
+#define NV10_3D_POLYGON_MODE_FRONT_POINT 0x00001b00
+#define NV10_3D_POLYGON_MODE_FRONT_LINE 0x00001b01
+#define NV10_3D_POLYGON_MODE_FRONT_FILL 0x00001b02
+
+#define NV10_3D_POLYGON_MODE_BACK 0x00000390
+#define NV10_3D_POLYGON_MODE_BACK_POINT 0x00001b00
+#define NV10_3D_POLYGON_MODE_BACK_LINE 0x00001b01
+#define NV10_3D_POLYGON_MODE_BACK_FILL 0x00001b02
+
+#define NV10_3D_DEPTH_RANGE_NEAR 0x00000394
+
+#define NV10_3D_DEPTH_RANGE_FAR 0x00000398
+
+#define NV10_3D_CULL_FACE 0x0000039c
+#define NV10_3D_CULL_FACE_FRONT 0x00000404
+#define NV10_3D_CULL_FACE_BACK 0x00000405
+#define NV10_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
+
+#define NV10_3D_FRONT_FACE 0x000003a0
+#define NV10_3D_FRONT_FACE_CW 0x00000900
+#define NV10_3D_FRONT_FACE_CCW 0x00000901
+
+
+#define NV10_3D_VERTEX_POS_3F 0x00000c00
+
+
+#define NV10_3D_VERTEX_POS_3F_X 0x00000c00
+
+#define NV10_3D_VERTEX_POS_3F_Y 0x00000c04
+
+#define NV10_3D_VERTEX_POS_3F_Z 0x00000c08
+
+#define NV10_3D_VERTEX_POS_4F 0x00000c18
+
+
+#define NV10_3D_VERTEX_POS_4F_X 0x00000c18
+
+#define NV10_3D_VERTEX_POS_4F_Y 0x00000c1c
+
+#define NV10_3D_VERTEX_POS_4F_Z 0x00000c20
+
+#define NV10_3D_VERTEX_POS_4F_W 0x00000c24
+
+#define NV10_3D_VERTEX_NOR_3F 0x00000c30
+
+
+#define NV10_3D_VERTEX_NOR_3F_X 0x00000c30
+
+#define NV10_3D_VERTEX_NOR_3F_Y 0x00000c34
+
+#define NV10_3D_VERTEX_NOR_3F_Z 0x00000c38
+
+#define NV10_3D_VERTEX_NOR_3I 0x00000c30
+
+
+#define NV10_3D_VERTEX_NOR_3I_XY 0x00000c30
+#define NV10_3D_VERTEX_NOR_3I_XY_X__MASK 0x0000ffff
+#define NV10_3D_VERTEX_NOR_3I_XY_X__SHIFT 0
+#define NV10_3D_VERTEX_NOR_3I_XY_Y__MASK 0xffff0000
+#define NV10_3D_VERTEX_NOR_3I_XY_Y__SHIFT 16
+
+#define NV10_3D_VERTEX_NOR_3I_Z 0x00000c34
+#define NV10_3D_VERTEX_NOR_3I_Z_Z__MASK 0x0000ffff
+#define NV10_3D_VERTEX_NOR_3I_Z_Z__SHIFT 0
+
+#define NV10_3D_VERTEX_COL_4F 0x00000c50
+
+
+#define NV10_3D_VERTEX_COL_4F_R 0x00000c50
+
+#define NV10_3D_VERTEX_COL_4F_G 0x00000c54
+
+#define NV10_3D_VERTEX_COL_4F_B 0x00000c58
+
+#define NV10_3D_VERTEX_COL_4F_A 0x00000c5c
+
+#define NV10_3D_VERTEX_COL_3F 0x00000c60
+
+
+#define NV10_3D_VERTEX_COL_3F_R 0x00000c60
+
+#define NV10_3D_VERTEX_COL_3F_G 0x00000c64
+
+#define NV10_3D_VERTEX_COL_3F_B 0x00000c68
+
+#define NV10_3D_VERTEX_COL_4I 0x00000c6c
+#define NV10_3D_VERTEX_COL_4I_R__MASK 0x000000ff
+#define NV10_3D_VERTEX_COL_4I_R__SHIFT 0
+#define NV10_3D_VERTEX_COL_4I_G__MASK 0x0000ff00
+#define NV10_3D_VERTEX_COL_4I_G__SHIFT 8
+#define NV10_3D_VERTEX_COL_4I_B__MASK 0x00ff0000
+#define NV10_3D_VERTEX_COL_4I_B__SHIFT 16
+#define NV10_3D_VERTEX_COL_4I_A__MASK 0xff000000
+#define NV10_3D_VERTEX_COL_4I_A__SHIFT 24
+
+#define NV10_3D_VERTEX_COL2_3F 0x00000c80
+
+
+#define NV10_3D_VERTEX_COL2_3F_R 0x00000c80
+
+#define NV10_3D_VERTEX_COL2_3F_G 0x00000c84
+
+#define NV10_3D_VERTEX_COL2_3F_B 0x00000c88
+
+#define NV10_3D_VERTEX_COL2_3I 0x00000c8c
+#define NV10_3D_VERTEX_COL2_3I_R__MASK 0x000000ff
+#define NV10_3D_VERTEX_COL2_3I_R__SHIFT 0
+#define NV10_3D_VERTEX_COL2_3I_G__MASK 0x0000ff00
+#define NV10_3D_VERTEX_COL2_3I_G__SHIFT 8
+#define NV10_3D_VERTEX_COL2_3I_B__MASK 0x00ff0000
+#define NV10_3D_VERTEX_COL2_3I_B__SHIFT 16
+
+#define NV10_3D_VERTEX_TX0_2F 0x00000c90
+
+
+#define NV10_3D_VERTEX_TX0_2F_S 0x00000c90
+
+#define NV10_3D_VERTEX_TX0_2F_T 0x00000c94
+
+#define NV10_3D_VERTEX_TX0_2I 0x00000c98
+#define NV10_3D_VERTEX_TX0_2I_S__MASK 0x0000ffff
+#define NV10_3D_VERTEX_TX0_2I_S__SHIFT 0
+#define NV10_3D_VERTEX_TX0_2I_T__MASK 0xffff0000
+#define NV10_3D_VERTEX_TX0_2I_T__SHIFT 16
+
+#define NV10_3D_VERTEX_TX0_4F 0x00000ca0
+
+
+#define NV10_3D_VERTEX_TX0_4F_S 0x00000ca0
+
+#define NV10_3D_VERTEX_TX0_4F_T 0x00000ca4
+
+#define NV10_3D_VERTEX_TX0_4F_R 0x00000ca8
+
+#define NV10_3D_VERTEX_TX0_4F_Q 0x00000cac
+
+#define NV10_3D_VERTEX_TX0_4I 0x00000cb0
+
+
+#define NV10_3D_VERTEX_TX0_4I_ST 0x00000cb0
+#define NV10_3D_VERTEX_TX0_4I_ST_S__MASK 0x0000ffff
+#define NV10_3D_VERTEX_TX0_4I_ST_S__SHIFT 0
+#define NV10_3D_VERTEX_TX0_4I_ST_T__MASK 0xffff0000
+#define NV10_3D_VERTEX_TX0_4I_ST_T__SHIFT 16
+
+#define NV10_3D_VERTEX_TX0_4I_RQ 0x00000cb4
+#define NV10_3D_VERTEX_TX0_4I_RQ_R__MASK 0x0000ffff
+#define NV10_3D_VERTEX_TX0_4I_RQ_R__SHIFT 0
+#define NV10_3D_VERTEX_TX0_4I_RQ_Q__MASK 0xffff0000
+#define NV10_3D_VERTEX_TX0_4I_RQ_Q__SHIFT 16
+
+#define NV10_3D_VERTEX_TX1_2F 0x00000cb8
+
+
+#define NV10_3D_VERTEX_TX1_2F_S 0x00000cb8
+
+#define NV10_3D_VERTEX_TX1_2F_T 0x00000cbc
+
+#define NV10_3D_VERTEX_TX1_2I 0x00000cc0
+#define NV10_3D_VERTEX_TX1_2I_S__MASK 0x0000ffff
+#define NV10_3D_VERTEX_TX1_2I_S__SHIFT 0
+#define NV10_3D_VERTEX_TX1_2I_T__MASK 0xffff0000
+#define NV10_3D_VERTEX_TX1_2I_T__SHIFT 16
+
+#define NV10_3D_VERTEX_TX1_4F 0x00000cc8
+
+
+#define NV10_3D_VERTEX_TX1_4F_S 0x00000cc8
+
+#define NV10_3D_VERTEX_TX1_4F_T 0x00000ccc
+
+#define NV10_3D_VERTEX_TX1_4F_R 0x00000cd0
+
+#define NV10_3D_VERTEX_TX1_4F_Q 0x00000cd4
+
+#define NV10_3D_VERTEX_TX1_4I 0x00000cd8
+
+
+#define NV10_3D_VERTEX_TX1_4I_ST 0x00000cd8
+#define NV10_3D_VERTEX_TX1_4I_ST_S__MASK 0x0000ffff
+#define NV10_3D_VERTEX_TX1_4I_ST_S__SHIFT 0
+#define NV10_3D_VERTEX_TX1_4I_ST_T__MASK 0xffff0000
+#define NV10_3D_VERTEX_TX1_4I_ST_T__SHIFT 16
+
+#define NV10_3D_VERTEX_TX1_4I_RQ 0x00000cdc
+#define NV10_3D_VERTEX_TX1_4I_RQ_R__MASK 0x0000ffff
+#define NV10_3D_VERTEX_TX1_4I_RQ_R__SHIFT 0
+#define NV10_3D_VERTEX_TX1_4I_RQ_Q__MASK 0xffff0000
+#define NV10_3D_VERTEX_TX1_4I_RQ_Q__SHIFT 16
+
+#define NV10_3D_VERTEX_FOG_1F 0x00000ce0
+
+#define NV10_3D_VERTEX_WGH_1F 0x00000ce4
+
+#define NV10_3D_EDGEFLAG_ENABLE 0x00000cec
+
+
+#define NV10_3D_DMA_VTXBUF 0x0000018c
+
+#define NV10_3D_VTXBUF_VALIDATE 0x00000cf0
+
+
+#define NV10_3D_VTXBUF_OFFSET(i0) (0x00000d00 + 0x8*(i0))
+
+#define NV10_3D_VTXBUF_FMT(i0) (0x00000d04 + 0x8*(i0))
+#define NV10_3D_VTXBUF_FMT_TYPE__MASK 0x0000000f
+#define NV10_3D_VTXBUF_FMT_TYPE__SHIFT 0
+#define NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM 0x00000000
+#define NV10_3D_VTXBUF_FMT_TYPE_V16_SNORM 0x00000001
+#define NV10_3D_VTXBUF_FMT_TYPE_V32_FLOAT 0x00000002
+#define NV10_3D_VTXBUF_FMT_TYPE_U8_UNORM 0x00000004
+#define NV10_3D_VTXBUF_FMT_FIELDS__MASK 0x000000f0
+#define NV10_3D_VTXBUF_FMT_FIELDS__SHIFT 4
+#define NV10_3D_VTXBUF_FMT_STRIDE__MASK 0x0000ff00
+#define NV10_3D_VTXBUF_FMT_STRIDE__SHIFT 8
+#define NV10_3D_VTXBUF_FMT_HOMOGENEOUS 0x01000000
+
+#define NV10_3D_VERTEX_BEGIN_END 0x00000dfc
+#define NV10_3D_VERTEX_BEGIN_END_STOP 0x00000000
+#define NV10_3D_VERTEX_BEGIN_END_POINTS 0x00000001
+#define NV10_3D_VERTEX_BEGIN_END_LINES 0x00000002
+#define NV10_3D_VERTEX_BEGIN_END_LINE_LOOP 0x00000003
+#define NV10_3D_VERTEX_BEGIN_END_LINE_STRIP 0x00000004
+#define NV10_3D_VERTEX_BEGIN_END_TRIANGLES 0x00000005
+#define NV10_3D_VERTEX_BEGIN_END_TRIANGLE_STRIP 0x00000006
+#define NV10_3D_VERTEX_BEGIN_END_TRIANGLE_FAN 0x00000007
+#define NV10_3D_VERTEX_BEGIN_END_QUADS 0x00000008
+#define NV10_3D_VERTEX_BEGIN_END_QUAD_STRIP 0x00000009
+#define NV10_3D_VERTEX_BEGIN_END_POLYGON 0x0000000a
+
+#define NV10_3D_VTXBUF_ELEMENT_U16 0x00000e00
+#define NV10_3D_VTXBUF_ELEMENT_U16_I0__MASK 0x0000ffff
+#define NV10_3D_VTXBUF_ELEMENT_U16_I0__SHIFT 0
+#define NV10_3D_VTXBUF_ELEMENT_U16_I1__MASK 0xffff0000
+#define NV10_3D_VTXBUF_ELEMENT_U16_I1__SHIFT 16
+
+#define NV10_3D_VTXBUF_ELEMENT_U32 0x00001100
+
+#define NV10_3D_VTXBUF_BEGIN_END 0x000013fc
+#define NV10_3D_VTXBUF_BEGIN_END_STOP 0x00000000
+#define NV10_3D_VTXBUF_BEGIN_END_POINTS 0x00000001
+#define NV10_3D_VTXBUF_BEGIN_END_LINES 0x00000002
+#define NV10_3D_VTXBUF_BEGIN_END_LINE_LOOP 0x00000003
+#define NV10_3D_VTXBUF_BEGIN_END_LINE_STRIP 0x00000004
+#define NV10_3D_VTXBUF_BEGIN_END_TRIANGLES 0x00000005
+#define NV10_3D_VTXBUF_BEGIN_END_TRIANGLE_STRIP 0x00000006
+#define NV10_3D_VTXBUF_BEGIN_END_TRIANGLE_FAN 0x00000007
+#define NV10_3D_VTXBUF_BEGIN_END_QUADS 0x00000008
+#define NV10_3D_VTXBUF_BEGIN_END_QUAD_STRIP 0x00000009
+#define NV10_3D_VTXBUF_BEGIN_END_POLYGON 0x0000000a
+
+#define NV10_3D_VTXBUF_BATCH 0x00001400
+#define NV10_3D_VTXBUF_BATCH_FIRST__MASK 0x0000ffff
+#define NV10_3D_VTXBUF_BATCH_FIRST__SHIFT 0
+#define NV10_3D_VTXBUF_BATCH_LAST__MASK 0xff000000
+#define NV10_3D_VTXBUF_BATCH_LAST__SHIFT 24
+
+#define NV10_3D_VTXBUF_DATA 0x00001800
+
+
+#define NV10_3D_VERTEX_WEIGHT_ENABLE 0x00000328
+
+#define NV10_3D_VIEW_MATRIX_ENABLE 0x000003e8
+#define NV10_3D_VIEW_MATRIX_ENABLE_MODELVIEW1 0x00000001
+#define NV10_3D_VIEW_MATRIX_ENABLE_MODELVIEW0 0x00000002
+#define NV10_3D_VIEW_MATRIX_ENABLE_PROJECTION 0x00000004
+
+
+#define NV10_3D_MODELVIEW_MATRIX(i0, i1) (0x00000400 + 0x40*(i0) + 0x4*(i1))
+#define NV10_3D_MODELVIEW_MATRIX__ESIZE 0x00000004
+#define NV10_3D_MODELVIEW_MATRIX__LEN 0x00000010
+
+#define NV10_3D_INVERSE_MODELVIEW_MATRIX(i0, i1) (0x00000480 + 0x40*(i0) + 0x4*(i1))
+#define NV10_3D_INVERSE_MODELVIEW_MATRIX__ESIZE 0x00000004
+#define NV10_3D_INVERSE_MODELVIEW_MATRIX__LEN 0x0000000c
+
+#define NV10_3D_PROJECTION_MATRIX(i0) (0x00000500 + 0x4*(i0))
+#define NV10_3D_PROJECTION_MATRIX__ESIZE 0x00000004
+#define NV10_3D_PROJECTION_MATRIX__LEN 0x00000010
+
+#define NV10_3D_VIEWPORT_TRANSLATE 0x000006e8
+
+
+#define NV10_3D_VIEWPORT_TRANSLATE_X 0x000006e8
+
+#define NV10_3D_VIEWPORT_TRANSLATE_Y 0x000006ec
+
+#define NV10_3D_VIEWPORT_TRANSLATE_Z 0x000006f0
+
+#define NV10_3D_VIEWPORT_TRANSLATE_W 0x000006f4
+
+
+#define NV10_3D_LIGHT_MODEL 0x00000294
+#define NV10_3D_LIGHT_MODEL_VERTEX_SPECULAR 0x00000001
+#define NV10_3D_LIGHT_MODEL_SEPARATE_SPECULAR 0x00000002
+#define NV10_3D_LIGHT_MODEL_LOCAL_VIEWER 0x00010000
+
+#define NV10_3D_COLOR_MATERIAL 0x00000298
+#define NV10_3D_COLOR_MATERIAL_EMISSION 0x00000001
+#define NV10_3D_COLOR_MATERIAL_AMBIENT 0x00000002
+#define NV10_3D_COLOR_MATERIAL_DIFFUSE 0x00000004
+#define NV10_3D_COLOR_MATERIAL_SPECULAR 0x00000008
+
+#define NV10_3D_MATERIAL_FACTOR 0x000003a8
+
+
+#define NV10_3D_MATERIAL_FACTOR_R 0x000003a8
+
+#define NV10_3D_MATERIAL_FACTOR_G 0x000003ac
+
+#define NV10_3D_MATERIAL_FACTOR_B 0x000003b0
+
+#define NV10_3D_MATERIAL_FACTOR_A 0x000003b4
+
+#define NV10_3D_NORMALIZE_ENABLE 0x000003a4
+
+#define NV10_3D_SEPARATE_SPECULAR_ENABLE 0x000003b8
+
+#define NV10_3D_ENABLED_LIGHTS 0x000003bc
+#define NV10_3D_ENABLED_LIGHTS_0__MASK 0x00000003
+#define NV10_3D_ENABLED_LIGHTS_0__SHIFT 0
+#define NV10_3D_ENABLED_LIGHTS_0_DISABLED 0x00000000
+#define NV10_3D_ENABLED_LIGHTS_0_NONPOSITIONAL 0x00000001
+#define NV10_3D_ENABLED_LIGHTS_0_POSITIONAL 0x00000002
+#define NV10_3D_ENABLED_LIGHTS_0_DIRECTIONAL 0x00000003
+#define NV10_3D_ENABLED_LIGHTS_1__MASK 0x0000000c
+#define NV10_3D_ENABLED_LIGHTS_1__SHIFT 2
+#define NV10_3D_ENABLED_LIGHTS_1_DISABLED 0x00000000
+#define NV10_3D_ENABLED_LIGHTS_1_NONPOSITIONAL 0x00000004
+#define NV10_3D_ENABLED_LIGHTS_1_POSITIONAL 0x00000008
+#define NV10_3D_ENABLED_LIGHTS_1_DIRECTIONAL 0x0000000c
+#define NV10_3D_ENABLED_LIGHTS_2__MASK 0x00000030
+#define NV10_3D_ENABLED_LIGHTS_2__SHIFT 4
+#define NV10_3D_ENABLED_LIGHTS_2_DISABLED 0x00000000
+#define NV10_3D_ENABLED_LIGHTS_2_NONPOSITIONAL 0x00000010
+#define NV10_3D_ENABLED_LIGHTS_2_POSITIONAL 0x00000020
+#define NV10_3D_ENABLED_LIGHTS_2_DIRECTIONAL 0x00000030
+#define NV10_3D_ENABLED_LIGHTS_3__MASK 0x000000c0
+#define NV10_3D_ENABLED_LIGHTS_3__SHIFT 6
+#define NV10_3D_ENABLED_LIGHTS_3_DISABLED 0x00000000
+#define NV10_3D_ENABLED_LIGHTS_3_NONPOSITIONAL 0x00000040
+#define NV10_3D_ENABLED_LIGHTS_3_POSITIONAL 0x00000080
+#define NV10_3D_ENABLED_LIGHTS_3_DIRECTIONAL 0x000000c0
+#define NV10_3D_ENABLED_LIGHTS_4__MASK 0x00000300
+#define NV10_3D_ENABLED_LIGHTS_4__SHIFT 8
+#define NV10_3D_ENABLED_LIGHTS_4_DISABLED 0x00000000
+#define NV10_3D_ENABLED_LIGHTS_4_NONPOSITIONAL 0x00000100
+#define NV10_3D_ENABLED_LIGHTS_4_POSITIONAL 0x00000200
+#define NV10_3D_ENABLED_LIGHTS_4_DIRECTIONAL 0x00000300
+#define NV10_3D_ENABLED_LIGHTS_5__MASK 0x00000c00
+#define NV10_3D_ENABLED_LIGHTS_5__SHIFT 10
+#define NV10_3D_ENABLED_LIGHTS_5_DISABLED 0x00000000
+#define NV10_3D_ENABLED_LIGHTS_5_NONPOSITIONAL 0x00000400
+#define NV10_3D_ENABLED_LIGHTS_5_POSITIONAL 0x00000800
+#define NV10_3D_ENABLED_LIGHTS_5_DIRECTIONAL 0x00000c00
+#define NV10_3D_ENABLED_LIGHTS_6__MASK 0x00003000
+#define NV10_3D_ENABLED_LIGHTS_6__SHIFT 12
+#define NV10_3D_ENABLED_LIGHTS_6_DISABLED 0x00000000
+#define NV10_3D_ENABLED_LIGHTS_6_NONPOSITIONAL 0x00001000
+#define NV10_3D_ENABLED_LIGHTS_6_POSITIONAL 0x00002000
+#define NV10_3D_ENABLED_LIGHTS_6_DIRECTIONAL 0x00003000
+#define NV10_3D_ENABLED_LIGHTS_7__MASK 0x0000c000
+#define NV10_3D_ENABLED_LIGHTS_7__SHIFT 14
+#define NV10_3D_ENABLED_LIGHTS_7_DISABLED 0x00000000
+#define NV10_3D_ENABLED_LIGHTS_7_NONPOSITIONAL 0x00004000
+#define NV10_3D_ENABLED_LIGHTS_7_POSITIONAL 0x00008000
+#define NV10_3D_ENABLED_LIGHTS_7_DIRECTIONAL 0x0000c000
+
+#define NV10_3D_MATERIAL_SHININESS(i0) (0x000006a0 + 0x4*(i0))
+#define NV10_3D_MATERIAL_SHININESS__ESIZE 0x00000004
+#define NV10_3D_MATERIAL_SHININESS__LEN 0x00000006
+
+#define NV10_3D_LIGHT_MODEL_AMBIENT 0x000006c4
+
+
+#define NV10_3D_LIGHT_MODEL_AMBIENT_R 0x000006c4
+
+#define NV10_3D_LIGHT_MODEL_AMBIENT_G 0x000006c8
+
+#define NV10_3D_LIGHT_MODEL_AMBIENT_B 0x000006cc
+
+#define NV10_3D_LIGHT(i0) (0x00000800 + 0x80*(i0))
+#define NV10_3D_LIGHT__ESIZE 0x00000080
+#define NV10_3D_LIGHT__LEN 0x00000008
+
+#define NV10_3D_LIGHT_AMBIENT(i0) (0x00000800 + 0x80*(i0))
+
+
+#define NV10_3D_LIGHT_AMBIENT_R(i0) (0x00000800 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_AMBIENT_G(i0) (0x00000804 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_AMBIENT_B(i0) (0x00000808 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_DIFFUSE(i0) (0x0000080c + 0x80*(i0))
+
+
+#define NV10_3D_LIGHT_DIFFUSE_R(i0) (0x0000080c + 0x80*(i0))
+
+#define NV10_3D_LIGHT_DIFFUSE_G(i0) (0x00000810 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_DIFFUSE_B(i0) (0x00000814 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_SPECULAR(i0) (0x00000818 + 0x80*(i0))
+
+
+#define NV10_3D_LIGHT_SPECULAR_R(i0) (0x00000818 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_SPECULAR_G(i0) (0x0000081c + 0x80*(i0))
+
+#define NV10_3D_LIGHT_SPECULAR_B(i0) (0x00000820 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_HALF_VECTOR(i0) (0x00000828 + 0x80*(i0))
+
+
+#define NV10_3D_LIGHT_HALF_VECTOR_X(i0) (0x00000828 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_HALF_VECTOR_Y(i0) (0x0000082c + 0x80*(i0))
+
+#define NV10_3D_LIGHT_HALF_VECTOR_Z(i0) (0x00000830 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_DIRECTION(i0) (0x00000834 + 0x80*(i0))
+
+
+#define NV10_3D_LIGHT_DIRECTION_X(i0) (0x00000834 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_DIRECTION_Y(i0) (0x00000838 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_DIRECTION_Z(i0) (0x0000083c + 0x80*(i0))
+
+#define NV10_3D_LIGHT_SPOT_CUTOFF(i0, i1) (0x00000840 + 0x80*(i0) + 0x4*(i1))
+#define NV10_3D_LIGHT_SPOT_CUTOFF__ESIZE 0x00000004
+#define NV10_3D_LIGHT_SPOT_CUTOFF__LEN 0x00000007
+
+#define NV10_3D_LIGHT_POSITION(i0) (0x0000085c + 0x80*(i0))
+
+
+#define NV10_3D_LIGHT_POSITION_X(i0) (0x0000085c + 0x80*(i0))
+
+#define NV10_3D_LIGHT_POSITION_Y(i0) (0x00000860 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_POSITION_Z(i0) (0x00000864 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_ATTENUATION(i0) (0x00000868 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_ATTENUATION_CONSTANT(i0) (0x00000868 + 0x80*(i0))
+
+#define NV10_3D_LIGHT_ATTENUATION_LINEAR(i0) (0x0000086c + 0x80*(i0))
+
+#define NV10_3D_LIGHT_ATTENUATION_QUADRATIC(i0) (0x00000870 + 0x80*(i0))
+
+
+#define NV10_3D_FOG_MODE 0x0000029c
+#define NV10_3D_FOG_MODE_LINEAR 0x00002601
+#define NV10_3D_FOG_MODE_EXP 0x00000800
+#define NV10_3D_FOG_MODE_EXP_ABS 0x00000802
+#define NV10_3D_FOG_MODE_EXP2 0x00000803
+
+#define NV10_3D_FOG_COORD 0x000002a0
+#define NV10_3D_FOG_COORD_FOG 0x00000000
+#define NV10_3D_FOG_COORD_DIST_RADIAL 0x00000001
+#define NV10_3D_FOG_COORD_DIST_ORTHOGONAL 0x00000002
+#define NV10_3D_FOG_COORD_DIST_ORTHOGONAL_ABS 0x00000003
+
+#define NV10_3D_FOG_ENABLE 0x000002a4
+
+#define NV10_3D_FOG_COLOR 0x000002a8
+#define NV10_3D_FOG_COLOR_R__MASK 0x000000ff
+#define NV10_3D_FOG_COLOR_R__SHIFT 0
+#define NV10_3D_FOG_COLOR_G__MASK 0x0000ff00
+#define NV10_3D_FOG_COLOR_G__SHIFT 8
+#define NV10_3D_FOG_COLOR_B__MASK 0x00ff0000
+#define NV10_3D_FOG_COLOR_B__SHIFT 16
+#define NV10_3D_FOG_COLOR_A__MASK 0xff000000
+#define NV10_3D_FOG_COLOR_A__SHIFT 24
+
+#define NV10_3D_FOG_COEFF(i0) (0x00000680 + 0x4*(i0))
+#define NV10_3D_FOG_COEFF__ESIZE 0x00000004
+#define NV10_3D_FOG_COEFF__LEN 0x00000003
+
+
+
+#define NV10_3D_TEX_GEN_MODE(i0, i1) (0x000003c0 + 0x10*(i0) + 0x4*(i1))
+#define NV10_3D_TEX_GEN_MODE__ESIZE 0x00000004
+#define NV10_3D_TEX_GEN_MODE__LEN 0x00000004
+#define NV10_3D_TEX_GEN_MODE_FALSE 0x00000000
+#define NV10_3D_TEX_GEN_MODE_EYE_LINEAR 0x00002400
+#define NV10_3D_TEX_GEN_MODE_OBJECT_LINEAR 0x00002401
+#define NV10_3D_TEX_GEN_MODE_SPHERE_MAP 0x00002402
+#define NV10_3D_TEX_GEN_MODE_NORMAL_MAP 0x00008511
+#define NV10_3D_TEX_GEN_MODE_REFLECTION_MAP 0x00008512
+
+
+#define NV10_3D_TEX_GEN_COEFF(i0, i1) (0x00000600 + 0x40*(i0) + 0x10*(i1))
+#define NV10_3D_TEX_GEN_COEFF__ESIZE 0x00000010
+#define NV10_3D_TEX_GEN_COEFF__LEN 0x00000004
+
+#define NV10_3D_TEX_GEN_COEFF_A(i0, i1) (0x00000600 + 0x40*(i0) + 0x10*(i1))
+
+#define NV10_3D_TEX_GEN_COEFF_B(i0, i1) (0x00000604 + 0x40*(i0) + 0x10*(i1))
+
+#define NV10_3D_TEX_GEN_COEFF_C(i0, i1) (0x00000608 + 0x40*(i0) + 0x10*(i1))
+
+#define NV10_3D_TEX_GEN_COEFF_D(i0, i1) (0x0000060c + 0x40*(i0) + 0x10*(i1))
+
+#define NV10_3D_TEX_MATRIX_ENABLE(i0) (0x000003e0 + 0x4*(i0))
+#define NV10_3D_TEX_MATRIX_ENABLE__ESIZE 0x00000004
+#define NV10_3D_TEX_MATRIX_ENABLE__LEN 0x00000002
+
+
+#define NV10_3D_TEX_MATRIX(i0, i1) (0x00000540 + 0x40*(i0) + 0x4*(i1))
+#define NV10_3D_TEX_MATRIX__ESIZE 0x00000004
+#define NV10_3D_TEX_MATRIX__LEN 0x00000010
+
+#define NV10_3D_TEX(i0) (0x00000000 + 0x4*(i0))
+#define NV10_3D_TEX__ESIZE 0x00000004
+#define NV10_3D_TEX__LEN 0x00000002
+
+#define NV10_3D_TEX_OFFSET(i0) (0x00000218 + 0x4*(i0))
+
+#define NV10_3D_TEX_FORMAT(i0) (0x00000220 + 0x4*(i0))
+#define NV10_3D_TEX_FORMAT_DMA0 0x00000001
+#define NV10_3D_TEX_FORMAT_DMA1 0x00000002
+#define NV10_3D_TEX_FORMAT_CUBE_MAP 0x00000004
+#define NV10_3D_TEX_FORMAT_FORMAT__MASK 0x00000f80
+#define NV10_3D_TEX_FORMAT_FORMAT__SHIFT 7
+#define NV10_3D_TEX_FORMAT_FORMAT_L8 0x00000000
+#define NV10_3D_TEX_FORMAT_FORMAT_I8 0x00000080
+#define NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5 0x00000100
+#define NV10_3D_TEX_FORMAT_FORMAT_A4R4G4B4 0x00000200
+#define NV10_3D_TEX_FORMAT_FORMAT_R5G6B5 0x00000280
+#define NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8 0x00000300
+#define NV10_3D_TEX_FORMAT_FORMAT_X8R8G8B8 0x00000380
+#define NV10_3D_TEX_FORMAT_FORMAT_INDEX8 0x00000580
+#define NV10_3D_TEX_FORMAT_FORMAT_DXT1 0x00000600
+#define NV10_3D_TEX_FORMAT_FORMAT_DXT3 0x00000700
+#define NV10_3D_TEX_FORMAT_FORMAT_DXT5 0x00000780
+#define NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT 0x00000800
+#define NV10_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT 0x00000880
+#define NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT 0x00000900
+#define NV10_3D_TEX_FORMAT_FORMAT_I8_RECT 0x00000980
+#define NV10_3D_TEX_FORMAT_MIPMAP 0x00008000
+#define NV10_3D_TEX_FORMAT_BASE_SIZE_U__MASK 0x000f0000
+#define NV10_3D_TEX_FORMAT_BASE_SIZE_U__SHIFT 16
+#define NV10_3D_TEX_FORMAT_BASE_SIZE_V__MASK 0x00f00000
+#define NV10_3D_TEX_FORMAT_BASE_SIZE_V__SHIFT 20
+#define NV10_3D_TEX_FORMAT_WRAP_S__MASK 0x0f000000
+#define NV10_3D_TEX_FORMAT_WRAP_S__SHIFT 24
+#define NV10_3D_TEX_FORMAT_WRAP_S_REPEAT 0x01000000
+#define NV10_3D_TEX_FORMAT_WRAP_S_MIRRORED_REPEAT 0x02000000
+#define NV10_3D_TEX_FORMAT_WRAP_S_CLAMP_TO_EDGE 0x03000000
+#define NV10_3D_TEX_FORMAT_WRAP_S_CLAMP_TO_BORDER 0x04000000
+#define NV10_3D_TEX_FORMAT_WRAP_S_CLAMP 0x05000000
+#define NV10_3D_TEX_FORMAT_WRAP_T__MASK 0xf0000000
+#define NV10_3D_TEX_FORMAT_WRAP_T__SHIFT 28
+#define NV10_3D_TEX_FORMAT_WRAP_T_REPEAT 0x10000000
+#define NV10_3D_TEX_FORMAT_WRAP_T_MIRRORED_REPEAT 0x20000000
+#define NV10_3D_TEX_FORMAT_WRAP_T_CLAMP_TO_EDGE 0x30000000
+#define NV10_3D_TEX_FORMAT_WRAP_T_CLAMP_TO_BORDER 0x40000000
+#define NV10_3D_TEX_FORMAT_WRAP_T_CLAMP 0x50000000
+
+#define NV10_3D_TEX_ENABLE(i0) (0x00000228 + 0x4*(i0))
+#define NV10_3D_TEX_ENABLE_CULL__MASK 0x0000000f
+#define NV10_3D_TEX_ENABLE_CULL__SHIFT 0
+#define NV10_3D_TEX_ENABLE_CULL_DISABLED 0x00000000
+#define NV10_3D_TEX_ENABLE_CULL_TEST_ALL 0x00000003
+#define NV10_3D_TEX_ENABLE_CULL_TEST_ALPHA 0x00000004
+#define NV10_3D_TEX_ENABLE_ANISOTROPY__MASK 0x00000030
+#define NV10_3D_TEX_ENABLE_ANISOTROPY__SHIFT 4
+#define NV10_3D_TEX_ENABLE_MIPMAP_MAX_LOD__MASK 0x0003c000
+#define NV10_3D_TEX_ENABLE_MIPMAP_MAX_LOD__SHIFT 14
+#define NV10_3D_TEX_ENABLE_MIPMAP_MIN_LOD__MASK 0x3c000000
+#define NV10_3D_TEX_ENABLE_MIPMAP_MIN_LOD__SHIFT 26
+#define NV10_3D_TEX_ENABLE_ENABLE 0x40000000
+
+#define NV10_3D_TEX_NPOT_PITCH(i0) (0x00000230 + 0x4*(i0))
+#define NV10_3D_TEX_NPOT_PITCH_PITCH__MASK 0xffff0000
+#define NV10_3D_TEX_NPOT_PITCH_PITCH__SHIFT 16
+
+#define NV10_3D_TEX_NPOT_SIZE(i0) (0x00000240 + 0x4*(i0))
+#define NV10_3D_TEX_NPOT_SIZE_H__MASK 0x0000ffff
+#define NV10_3D_TEX_NPOT_SIZE_H__SHIFT 0
+#define NV10_3D_TEX_NPOT_SIZE_W__MASK 0xffff0000
+#define NV10_3D_TEX_NPOT_SIZE_W__SHIFT 16
+
+#define NV10_3D_TEX_FILTER(i0) (0x00000248 + 0x4*(i0))
+#define NV10_3D_TEX_FILTER_LOD_BIAS__MASK 0x00000f00
+#define NV10_3D_TEX_FILTER_LOD_BIAS__SHIFT 8
+#define NV10_3D_TEX_FILTER_MINIFY__MASK 0x0f000000
+#define NV10_3D_TEX_FILTER_MINIFY__SHIFT 24
+#define NV10_3D_TEX_FILTER_MINIFY_NEAREST 0x01000000
+#define NV10_3D_TEX_FILTER_MINIFY_LINEAR 0x02000000
+#define NV10_3D_TEX_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST 0x03000000
+#define NV10_3D_TEX_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST 0x04000000
+#define NV10_3D_TEX_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR 0x05000000
+#define NV10_3D_TEX_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR 0x06000000
+#define NV10_3D_TEX_FILTER_MAGNIFY__MASK 0xf0000000
+#define NV10_3D_TEX_FILTER_MAGNIFY__SHIFT 28
+#define NV10_3D_TEX_FILTER_MAGNIFY_NEAREST 0x10000000
+#define NV10_3D_TEX_FILTER_MAGNIFY_LINEAR 0x20000000
+
+#define NV10_3D_TEX_PALETTE_OFFSET(i0) (0x00000250 + 0x4*(i0))
+
+
+
+#define NV10_3D_RC_IN_ALPHA(i0) (0x00000260 + 0x4*(i0))
+#define NV10_3D_RC_IN_ALPHA_D_INPUT__MASK 0x0000000f
+#define NV10_3D_RC_IN_ALPHA_D_INPUT__SHIFT 0
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0 0x00000001
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1 0x00000002
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_FOG 0x00000003
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR 0x00000004
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR 0x00000005
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_TEXTURE0 0x00000008
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_TEXTURE1 0x00000009
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_TEXTURE2 0x0000000a
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_TEXTURE3 0x0000000b
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_SPARE0 0x0000000c
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_SPARE1 0x0000000d
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV10_3D_RC_IN_ALPHA_D_INPUT_E_TIMES_F 0x0000000f
+#define NV10_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__MASK 0x00000010
+#define NV10_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__SHIFT 4
+#define NV10_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_BLUE 0x00000000
+#define NV10_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_ALPHA 0x00000010
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING__MASK 0x000000e0
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING__SHIFT 5
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT 0x00000020
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL 0x00000040
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE 0x00000060
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY 0x000000c0
+#define NV10_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE 0x000000e0
+#define NV10_3D_RC_IN_ALPHA_C_INPUT__MASK 0x00000f00
+#define NV10_3D_RC_IN_ALPHA_C_INPUT__SHIFT 8
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0 0x00000100
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1 0x00000200
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_FOG 0x00000300
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR 0x00000400
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR 0x00000500
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_TEXTURE0 0x00000800
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_TEXTURE1 0x00000900
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_TEXTURE2 0x00000a00
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_TEXTURE3 0x00000b00
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_SPARE0 0x00000c00
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_SPARE1 0x00000d00
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV10_3D_RC_IN_ALPHA_C_INPUT_E_TIMES_F 0x00000f00
+#define NV10_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__MASK 0x00001000
+#define NV10_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__SHIFT 12
+#define NV10_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_BLUE 0x00000000
+#define NV10_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_ALPHA 0x00001000
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING__MASK 0x0000e000
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING__SHIFT 13
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT 0x00002000
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL 0x00004000
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE 0x00006000
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY 0x0000c000
+#define NV10_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE 0x0000e000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT__MASK 0x000f0000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT__SHIFT 16
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0 0x00010000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1 0x00020000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_FOG 0x00030000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR 0x00040000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR 0x00050000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_TEXTURE0 0x00080000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_TEXTURE1 0x00090000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_TEXTURE2 0x000a0000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_TEXTURE3 0x000b0000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_SPARE0 0x000c0000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_SPARE1 0x000d0000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
+#define NV10_3D_RC_IN_ALPHA_B_INPUT_E_TIMES_F 0x000f0000
+#define NV10_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__MASK 0x00100000
+#define NV10_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__SHIFT 20
+#define NV10_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_BLUE 0x00000000
+#define NV10_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_ALPHA 0x00100000
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING__MASK 0x00e00000
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING__SHIFT 21
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT 0x00200000
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL 0x00400000
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE 0x00600000
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY 0x00c00000
+#define NV10_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE 0x00e00000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT__MASK 0x0f000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT__SHIFT 24
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0 0x01000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1 0x02000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_FOG 0x03000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR 0x04000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR 0x05000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_TEXTURE0 0x08000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_TEXTURE1 0x09000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_TEXTURE2 0x0a000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_TEXTURE3 0x0b000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_SPARE0 0x0c000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_SPARE1 0x0d000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
+#define NV10_3D_RC_IN_ALPHA_A_INPUT_E_TIMES_F 0x0f000000
+#define NV10_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__MASK 0x10000000
+#define NV10_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__SHIFT 28
+#define NV10_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_BLUE 0x00000000
+#define NV10_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_ALPHA 0x10000000
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING__MASK 0xe0000000
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING__SHIFT 29
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT 0x20000000
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL 0x40000000
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE 0x60000000
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY 0xc0000000
+#define NV10_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE 0xe0000000
+
+#define NV10_3D_RC_IN_RGB(i0) (0x00000268 + 0x4*(i0))
+#define NV10_3D_RC_IN_RGB_D_INPUT__MASK 0x0000000f
+#define NV10_3D_RC_IN_RGB_D_INPUT__SHIFT 0
+#define NV10_3D_RC_IN_RGB_D_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0 0x00000001
+#define NV10_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1 0x00000002
+#define NV10_3D_RC_IN_RGB_D_INPUT_FOG 0x00000003
+#define NV10_3D_RC_IN_RGB_D_INPUT_PRIMARY_COLOR 0x00000004
+#define NV10_3D_RC_IN_RGB_D_INPUT_SECONDARY_COLOR 0x00000005
+#define NV10_3D_RC_IN_RGB_D_INPUT_TEXTURE0 0x00000008
+#define NV10_3D_RC_IN_RGB_D_INPUT_TEXTURE1 0x00000009
+#define NV10_3D_RC_IN_RGB_D_INPUT_TEXTURE2 0x0000000a
+#define NV10_3D_RC_IN_RGB_D_INPUT_TEXTURE3 0x0000000b
+#define NV10_3D_RC_IN_RGB_D_INPUT_SPARE0 0x0000000c
+#define NV10_3D_RC_IN_RGB_D_INPUT_SPARE1 0x0000000d
+#define NV10_3D_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV10_3D_RC_IN_RGB_D_INPUT_E_TIMES_F 0x0000000f
+#define NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE__MASK 0x00000010
+#define NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE__SHIFT 4
+#define NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE_ALPHA 0x00000010
+#define NV10_3D_RC_IN_RGB_D_MAPPING__MASK 0x000000e0
+#define NV10_3D_RC_IN_RGB_D_MAPPING__SHIFT 5
+#define NV10_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_INVERT 0x00000020
+#define NV10_3D_RC_IN_RGB_D_MAPPING_EXPAND_NORMAL 0x00000040
+#define NV10_3D_RC_IN_RGB_D_MAPPING_EXPAND_NEGATE 0x00000060
+#define NV10_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
+#define NV10_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
+#define NV10_3D_RC_IN_RGB_D_MAPPING_SIGNED_IDENTITY 0x000000c0
+#define NV10_3D_RC_IN_RGB_D_MAPPING_SIGNED_NEGATE 0x000000e0
+#define NV10_3D_RC_IN_RGB_C_INPUT__MASK 0x00000f00
+#define NV10_3D_RC_IN_RGB_C_INPUT__SHIFT 8
+#define NV10_3D_RC_IN_RGB_C_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR0 0x00000100
+#define NV10_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR1 0x00000200
+#define NV10_3D_RC_IN_RGB_C_INPUT_FOG 0x00000300
+#define NV10_3D_RC_IN_RGB_C_INPUT_PRIMARY_COLOR 0x00000400
+#define NV10_3D_RC_IN_RGB_C_INPUT_SECONDARY_COLOR 0x00000500
+#define NV10_3D_RC_IN_RGB_C_INPUT_TEXTURE0 0x00000800
+#define NV10_3D_RC_IN_RGB_C_INPUT_TEXTURE1 0x00000900
+#define NV10_3D_RC_IN_RGB_C_INPUT_TEXTURE2 0x00000a00
+#define NV10_3D_RC_IN_RGB_C_INPUT_TEXTURE3 0x00000b00
+#define NV10_3D_RC_IN_RGB_C_INPUT_SPARE0 0x00000c00
+#define NV10_3D_RC_IN_RGB_C_INPUT_SPARE1 0x00000d00
+#define NV10_3D_RC_IN_RGB_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV10_3D_RC_IN_RGB_C_INPUT_E_TIMES_F 0x00000f00
+#define NV10_3D_RC_IN_RGB_C_COMPONENT_USAGE__MASK 0x00001000
+#define NV10_3D_RC_IN_RGB_C_COMPONENT_USAGE__SHIFT 12
+#define NV10_3D_RC_IN_RGB_C_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_IN_RGB_C_COMPONENT_USAGE_ALPHA 0x00001000
+#define NV10_3D_RC_IN_RGB_C_MAPPING__MASK 0x0000e000
+#define NV10_3D_RC_IN_RGB_C_MAPPING__SHIFT 13
+#define NV10_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_INVERT 0x00002000
+#define NV10_3D_RC_IN_RGB_C_MAPPING_EXPAND_NORMAL 0x00004000
+#define NV10_3D_RC_IN_RGB_C_MAPPING_EXPAND_NEGATE 0x00006000
+#define NV10_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
+#define NV10_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
+#define NV10_3D_RC_IN_RGB_C_MAPPING_SIGNED_IDENTITY 0x0000c000
+#define NV10_3D_RC_IN_RGB_C_MAPPING_SIGNED_NEGATE 0x0000e000
+#define NV10_3D_RC_IN_RGB_B_INPUT__MASK 0x000f0000
+#define NV10_3D_RC_IN_RGB_B_INPUT__SHIFT 16
+#define NV10_3D_RC_IN_RGB_B_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR0 0x00010000
+#define NV10_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR1 0x00020000
+#define NV10_3D_RC_IN_RGB_B_INPUT_FOG 0x00030000
+#define NV10_3D_RC_IN_RGB_B_INPUT_PRIMARY_COLOR 0x00040000
+#define NV10_3D_RC_IN_RGB_B_INPUT_SECONDARY_COLOR 0x00050000
+#define NV10_3D_RC_IN_RGB_B_INPUT_TEXTURE0 0x00080000
+#define NV10_3D_RC_IN_RGB_B_INPUT_TEXTURE1 0x00090000
+#define NV10_3D_RC_IN_RGB_B_INPUT_TEXTURE2 0x000a0000
+#define NV10_3D_RC_IN_RGB_B_INPUT_TEXTURE3 0x000b0000
+#define NV10_3D_RC_IN_RGB_B_INPUT_SPARE0 0x000c0000
+#define NV10_3D_RC_IN_RGB_B_INPUT_SPARE1 0x000d0000
+#define NV10_3D_RC_IN_RGB_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
+#define NV10_3D_RC_IN_RGB_B_INPUT_E_TIMES_F 0x000f0000
+#define NV10_3D_RC_IN_RGB_B_COMPONENT_USAGE__MASK 0x00100000
+#define NV10_3D_RC_IN_RGB_B_COMPONENT_USAGE__SHIFT 20
+#define NV10_3D_RC_IN_RGB_B_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_IN_RGB_B_COMPONENT_USAGE_ALPHA 0x00100000
+#define NV10_3D_RC_IN_RGB_B_MAPPING__MASK 0x00e00000
+#define NV10_3D_RC_IN_RGB_B_MAPPING__SHIFT 21
+#define NV10_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_INVERT 0x00200000
+#define NV10_3D_RC_IN_RGB_B_MAPPING_EXPAND_NORMAL 0x00400000
+#define NV10_3D_RC_IN_RGB_B_MAPPING_EXPAND_NEGATE 0x00600000
+#define NV10_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
+#define NV10_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
+#define NV10_3D_RC_IN_RGB_B_MAPPING_SIGNED_IDENTITY 0x00c00000
+#define NV10_3D_RC_IN_RGB_B_MAPPING_SIGNED_NEGATE 0x00e00000
+#define NV10_3D_RC_IN_RGB_A_INPUT__MASK 0x0f000000
+#define NV10_3D_RC_IN_RGB_A_INPUT__SHIFT 24
+#define NV10_3D_RC_IN_RGB_A_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR0 0x01000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR1 0x02000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_FOG 0x03000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_PRIMARY_COLOR 0x04000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_SECONDARY_COLOR 0x05000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_TEXTURE0 0x08000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_TEXTURE1 0x09000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_TEXTURE2 0x0a000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_TEXTURE3 0x0b000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_SPARE0 0x0c000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_SPARE1 0x0d000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
+#define NV10_3D_RC_IN_RGB_A_INPUT_E_TIMES_F 0x0f000000
+#define NV10_3D_RC_IN_RGB_A_COMPONENT_USAGE__MASK 0x10000000
+#define NV10_3D_RC_IN_RGB_A_COMPONENT_USAGE__SHIFT 28
+#define NV10_3D_RC_IN_RGB_A_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_IN_RGB_A_COMPONENT_USAGE_ALPHA 0x10000000
+#define NV10_3D_RC_IN_RGB_A_MAPPING__MASK 0xe0000000
+#define NV10_3D_RC_IN_RGB_A_MAPPING__SHIFT 29
+#define NV10_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_INVERT 0x20000000
+#define NV10_3D_RC_IN_RGB_A_MAPPING_EXPAND_NORMAL 0x40000000
+#define NV10_3D_RC_IN_RGB_A_MAPPING_EXPAND_NEGATE 0x60000000
+#define NV10_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
+#define NV10_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
+#define NV10_3D_RC_IN_RGB_A_MAPPING_SIGNED_IDENTITY 0xc0000000
+#define NV10_3D_RC_IN_RGB_A_MAPPING_SIGNED_NEGATE 0xe0000000
+
+#define NV10_3D_RC_COLOR(i0) (0x00000270 + 0x4*(i0))
+#define NV10_3D_RC_COLOR_B__MASK 0x000000ff
+#define NV10_3D_RC_COLOR_B__SHIFT 0
+#define NV10_3D_RC_COLOR_G__MASK 0x0000ff00
+#define NV10_3D_RC_COLOR_G__SHIFT 8
+#define NV10_3D_RC_COLOR_R__MASK 0x00ff0000
+#define NV10_3D_RC_COLOR_R__SHIFT 16
+#define NV10_3D_RC_COLOR_A__MASK 0xff000000
+#define NV10_3D_RC_COLOR_A__SHIFT 24
+
+#define NV10_3D_RC_OUT_ALPHA(i0) (0x00000278 + 0x4*(i0))
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT__MASK 0x0000000f
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT__SHIFT 0
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_ZERO 0x00000000
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0 0x00000001
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1 0x00000002
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_FOG 0x00000003
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR 0x00000004
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR 0x00000005
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0 0x00000008
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1 0x00000009
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2 0x0000000a
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3 0x0000000b
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0 0x0000000c
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE1 0x0000000d
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F 0x0000000f
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT__MASK 0x000000f0
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT__SHIFT 4
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_ZERO 0x00000000
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0 0x00000010
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1 0x00000020
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_FOG 0x00000030
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR 0x00000040
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR 0x00000050
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0 0x00000080
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1 0x00000090
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2 0x000000a0
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3 0x000000b0
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0 0x000000c0
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE1 0x000000d0
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0
+#define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F 0x000000f0
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT__MASK 0x00000f00
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT__SHIFT 8
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_ZERO 0x00000000
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_FOG 0x00000300
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR 0x00000400
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR 0x00000500
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0 0x00000800
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1 0x00000900
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2 0x00000a00
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3 0x00000b00
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0 0x00000c00
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1 0x00000d00
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F 0x00000f00
+#define NV10_3D_RC_OUT_ALPHA_CD_DOT_PRODUCT 0x00001000
+#define NV10_3D_RC_OUT_ALPHA_AB_DOT_PRODUCT 0x00002000
+#define NV10_3D_RC_OUT_ALPHA_MUX_SUM 0x00004000
+#define NV10_3D_RC_OUT_ALPHA_BIAS__MASK 0x00008000
+#define NV10_3D_RC_OUT_ALPHA_BIAS__SHIFT 15
+#define NV10_3D_RC_OUT_ALPHA_BIAS_NONE 0x00000000
+#define NV10_3D_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000
+#define NV10_3D_RC_OUT_ALPHA_SCALE__MASK 0x00030000
+#define NV10_3D_RC_OUT_ALPHA_SCALE__SHIFT 16
+#define NV10_3D_RC_OUT_ALPHA_SCALE_NONE 0x00000000
+#define NV10_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO 0x00010000
+#define NV10_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR 0x00020000
+#define NV10_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF 0x00030000
+
+#define NV10_3D_RC_OUT_RGB(i0) (0x00000280 + 0x4*(i0))
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT__MASK 0x0000000f
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT__SHIFT 0
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_ZERO 0x00000000
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR0 0x00000001
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR1 0x00000002
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_FOG 0x00000003
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_PRIMARY_COLOR 0x00000004
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_SECONDARY_COLOR 0x00000005
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE0 0x00000008
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE1 0x00000009
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE2 0x0000000a
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE3 0x0000000b
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0 0x0000000c
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_SPARE1 0x0000000d
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV10_3D_RC_OUT_RGB_CD_OUTPUT_E_TIMES_F 0x0000000f
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT__MASK 0x000000f0
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT__SHIFT 4
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_ZERO 0x00000000
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR0 0x00000010
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR1 0x00000020
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_FOG 0x00000030
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_PRIMARY_COLOR 0x00000040
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_SECONDARY_COLOR 0x00000050
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE0 0x00000080
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE1 0x00000090
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE2 0x000000a0
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE3 0x000000b0
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0 0x000000c0
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE1 0x000000d0
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0
+#define NV10_3D_RC_OUT_RGB_AB_OUTPUT_E_TIMES_F 0x000000f0
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT__MASK 0x00000f00
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT__SHIFT 8
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_ZERO 0x00000000
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_FOG 0x00000300
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_PRIMARY_COLOR 0x00000400
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SECONDARY_COLOR 0x00000500
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE0 0x00000800
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE1 0x00000900
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE2 0x00000a00
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE3 0x00000b00
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0 0x00000c00
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE1 0x00000d00
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_E_TIMES_F 0x00000f00
+#define NV10_3D_RC_OUT_RGB_CD_DOT_PRODUCT 0x00001000
+#define NV10_3D_RC_OUT_RGB_AB_DOT_PRODUCT 0x00002000
+#define NV10_3D_RC_OUT_RGB_MUX_SUM 0x00004000
+#define NV10_3D_RC_OUT_RGB_BIAS__MASK 0x00008000
+#define NV10_3D_RC_OUT_RGB_BIAS__SHIFT 15
+#define NV10_3D_RC_OUT_RGB_BIAS_NONE 0x00000000
+#define NV10_3D_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000
+#define NV10_3D_RC_OUT_RGB_SCALE__MASK 0x00030000
+#define NV10_3D_RC_OUT_RGB_SCALE__SHIFT 16
+#define NV10_3D_RC_OUT_RGB_SCALE_NONE 0x00000000
+#define NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_TWO 0x00010000
+#define NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_FOUR 0x00020000
+#define NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_ONE_HALF 0x00030000
+#define NV10_3D_RC_OUT_RGB_OPERATION__MASK 0x38000000
+#define NV10_3D_RC_OUT_RGB_OPERATION__SHIFT 27
+
+#define NV10_3D_RC_FINAL0 0x00000288
+#define NV10_3D_RC_FINAL0_D_INPUT__MASK 0x0000000f
+#define NV10_3D_RC_FINAL0_D_INPUT__SHIFT 0
+#define NV10_3D_RC_FINAL0_D_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR0 0x00000001
+#define NV10_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR1 0x00000002
+#define NV10_3D_RC_FINAL0_D_INPUT_FOG 0x00000003
+#define NV10_3D_RC_FINAL0_D_INPUT_PRIMARY_COLOR 0x00000004
+#define NV10_3D_RC_FINAL0_D_INPUT_SECONDARY_COLOR 0x00000005
+#define NV10_3D_RC_FINAL0_D_INPUT_TEXTURE0 0x00000008
+#define NV10_3D_RC_FINAL0_D_INPUT_TEXTURE1 0x00000009
+#define NV10_3D_RC_FINAL0_D_INPUT_TEXTURE2 0x0000000a
+#define NV10_3D_RC_FINAL0_D_INPUT_TEXTURE3 0x0000000b
+#define NV10_3D_RC_FINAL0_D_INPUT_SPARE0 0x0000000c
+#define NV10_3D_RC_FINAL0_D_INPUT_SPARE1 0x0000000d
+#define NV10_3D_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV10_3D_RC_FINAL0_D_INPUT_E_TIMES_F 0x0000000f
+#define NV10_3D_RC_FINAL0_D_COMPONENT_USAGE__MASK 0x00000010
+#define NV10_3D_RC_FINAL0_D_COMPONENT_USAGE__SHIFT 4
+#define NV10_3D_RC_FINAL0_D_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_FINAL0_D_COMPONENT_USAGE_ALPHA 0x00000010
+#define NV10_3D_RC_FINAL0_D_MAPPING__MASK 0x000000e0
+#define NV10_3D_RC_FINAL0_D_MAPPING__SHIFT 5
+#define NV10_3D_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT 0x00000020
+#define NV10_3D_RC_FINAL0_D_MAPPING_EXPAND_NORMAL 0x00000040
+#define NV10_3D_RC_FINAL0_D_MAPPING_EXPAND_NEGATE 0x00000060
+#define NV10_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
+#define NV10_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
+#define NV10_3D_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY 0x000000c0
+#define NV10_3D_RC_FINAL0_D_MAPPING_SIGNED_NEGATE 0x000000e0
+#define NV10_3D_RC_FINAL0_C_INPUT__MASK 0x00000f00
+#define NV10_3D_RC_FINAL0_C_INPUT__SHIFT 8
+#define NV10_3D_RC_FINAL0_C_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR0 0x00000100
+#define NV10_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR1 0x00000200
+#define NV10_3D_RC_FINAL0_C_INPUT_FOG 0x00000300
+#define NV10_3D_RC_FINAL0_C_INPUT_PRIMARY_COLOR 0x00000400
+#define NV10_3D_RC_FINAL0_C_INPUT_SECONDARY_COLOR 0x00000500
+#define NV10_3D_RC_FINAL0_C_INPUT_TEXTURE0 0x00000800
+#define NV10_3D_RC_FINAL0_C_INPUT_TEXTURE1 0x00000900
+#define NV10_3D_RC_FINAL0_C_INPUT_TEXTURE2 0x00000a00
+#define NV10_3D_RC_FINAL0_C_INPUT_TEXTURE3 0x00000b00
+#define NV10_3D_RC_FINAL0_C_INPUT_SPARE0 0x00000c00
+#define NV10_3D_RC_FINAL0_C_INPUT_SPARE1 0x00000d00
+#define NV10_3D_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV10_3D_RC_FINAL0_C_INPUT_E_TIMES_F 0x00000f00
+#define NV10_3D_RC_FINAL0_C_COMPONENT_USAGE__MASK 0x00001000
+#define NV10_3D_RC_FINAL0_C_COMPONENT_USAGE__SHIFT 12
+#define NV10_3D_RC_FINAL0_C_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_FINAL0_C_COMPONENT_USAGE_ALPHA 0x00001000
+#define NV10_3D_RC_FINAL0_C_MAPPING__MASK 0x0000e000
+#define NV10_3D_RC_FINAL0_C_MAPPING__SHIFT 13
+#define NV10_3D_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT 0x00002000
+#define NV10_3D_RC_FINAL0_C_MAPPING_EXPAND_NORMAL 0x00004000
+#define NV10_3D_RC_FINAL0_C_MAPPING_EXPAND_NEGATE 0x00006000
+#define NV10_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
+#define NV10_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
+#define NV10_3D_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY 0x0000c000
+#define NV10_3D_RC_FINAL0_C_MAPPING_SIGNED_NEGATE 0x0000e000
+#define NV10_3D_RC_FINAL0_B_INPUT__MASK 0x000f0000
+#define NV10_3D_RC_FINAL0_B_INPUT__SHIFT 16
+#define NV10_3D_RC_FINAL0_B_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR0 0x00010000
+#define NV10_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR1 0x00020000
+#define NV10_3D_RC_FINAL0_B_INPUT_FOG 0x00030000
+#define NV10_3D_RC_FINAL0_B_INPUT_PRIMARY_COLOR 0x00040000
+#define NV10_3D_RC_FINAL0_B_INPUT_SECONDARY_COLOR 0x00050000
+#define NV10_3D_RC_FINAL0_B_INPUT_TEXTURE0 0x00080000
+#define NV10_3D_RC_FINAL0_B_INPUT_TEXTURE1 0x00090000
+#define NV10_3D_RC_FINAL0_B_INPUT_TEXTURE2 0x000a0000
+#define NV10_3D_RC_FINAL0_B_INPUT_TEXTURE3 0x000b0000
+#define NV10_3D_RC_FINAL0_B_INPUT_SPARE0 0x000c0000
+#define NV10_3D_RC_FINAL0_B_INPUT_SPARE1 0x000d0000
+#define NV10_3D_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
+#define NV10_3D_RC_FINAL0_B_INPUT_E_TIMES_F 0x000f0000
+#define NV10_3D_RC_FINAL0_B_COMPONENT_USAGE__MASK 0x00100000
+#define NV10_3D_RC_FINAL0_B_COMPONENT_USAGE__SHIFT 20
+#define NV10_3D_RC_FINAL0_B_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_FINAL0_B_COMPONENT_USAGE_ALPHA 0x00100000
+#define NV10_3D_RC_FINAL0_B_MAPPING__MASK 0x00e00000
+#define NV10_3D_RC_FINAL0_B_MAPPING__SHIFT 21
+#define NV10_3D_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT 0x00200000
+#define NV10_3D_RC_FINAL0_B_MAPPING_EXPAND_NORMAL 0x00400000
+#define NV10_3D_RC_FINAL0_B_MAPPING_EXPAND_NEGATE 0x00600000
+#define NV10_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
+#define NV10_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
+#define NV10_3D_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY 0x00c00000
+#define NV10_3D_RC_FINAL0_B_MAPPING_SIGNED_NEGATE 0x00e00000
+#define NV10_3D_RC_FINAL0_A_INPUT__MASK 0x0f000000
+#define NV10_3D_RC_FINAL0_A_INPUT__SHIFT 24
+#define NV10_3D_RC_FINAL0_A_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR0 0x01000000
+#define NV10_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR1 0x02000000
+#define NV10_3D_RC_FINAL0_A_INPUT_FOG 0x03000000
+#define NV10_3D_RC_FINAL0_A_INPUT_PRIMARY_COLOR 0x04000000
+#define NV10_3D_RC_FINAL0_A_INPUT_SECONDARY_COLOR 0x05000000
+#define NV10_3D_RC_FINAL0_A_INPUT_TEXTURE0 0x08000000
+#define NV10_3D_RC_FINAL0_A_INPUT_TEXTURE1 0x09000000
+#define NV10_3D_RC_FINAL0_A_INPUT_TEXTURE2 0x0a000000
+#define NV10_3D_RC_FINAL0_A_INPUT_TEXTURE3 0x0b000000
+#define NV10_3D_RC_FINAL0_A_INPUT_SPARE0 0x0c000000
+#define NV10_3D_RC_FINAL0_A_INPUT_SPARE1 0x0d000000
+#define NV10_3D_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
+#define NV10_3D_RC_FINAL0_A_INPUT_E_TIMES_F 0x0f000000
+#define NV10_3D_RC_FINAL0_A_COMPONENT_USAGE__MASK 0x10000000
+#define NV10_3D_RC_FINAL0_A_COMPONENT_USAGE__SHIFT 28
+#define NV10_3D_RC_FINAL0_A_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_FINAL0_A_COMPONENT_USAGE_ALPHA 0x10000000
+#define NV10_3D_RC_FINAL0_A_MAPPING__MASK 0xe0000000
+#define NV10_3D_RC_FINAL0_A_MAPPING__SHIFT 29
+#define NV10_3D_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT 0x20000000
+#define NV10_3D_RC_FINAL0_A_MAPPING_EXPAND_NORMAL 0x40000000
+#define NV10_3D_RC_FINAL0_A_MAPPING_EXPAND_NEGATE 0x60000000
+#define NV10_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
+#define NV10_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
+#define NV10_3D_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY 0xc0000000
+#define NV10_3D_RC_FINAL0_A_MAPPING_SIGNED_NEGATE 0xe0000000
+
+#define NV10_3D_RC_FINAL1 0x0000028c
+#define NV10_3D_RC_FINAL1_COLOR_SUM_CLAMP 0x00000080
+#define NV10_3D_RC_FINAL1_G_INPUT__MASK 0x00000f00
+#define NV10_3D_RC_FINAL1_G_INPUT__SHIFT 8
+#define NV10_3D_RC_FINAL1_G_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR0 0x00000100
+#define NV10_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR1 0x00000200
+#define NV10_3D_RC_FINAL1_G_INPUT_FOG 0x00000300
+#define NV10_3D_RC_FINAL1_G_INPUT_PRIMARY_COLOR 0x00000400
+#define NV10_3D_RC_FINAL1_G_INPUT_SECONDARY_COLOR 0x00000500
+#define NV10_3D_RC_FINAL1_G_INPUT_TEXTURE0 0x00000800
+#define NV10_3D_RC_FINAL1_G_INPUT_TEXTURE1 0x00000900
+#define NV10_3D_RC_FINAL1_G_INPUT_TEXTURE2 0x00000a00
+#define NV10_3D_RC_FINAL1_G_INPUT_TEXTURE3 0x00000b00
+#define NV10_3D_RC_FINAL1_G_INPUT_SPARE0 0x00000c00
+#define NV10_3D_RC_FINAL1_G_INPUT_SPARE1 0x00000d00
+#define NV10_3D_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV10_3D_RC_FINAL1_G_INPUT_E_TIMES_F 0x00000f00
+#define NV10_3D_RC_FINAL1_G_COMPONENT_USAGE__MASK 0x00001000
+#define NV10_3D_RC_FINAL1_G_COMPONENT_USAGE__SHIFT 12
+#define NV10_3D_RC_FINAL1_G_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_FINAL1_G_COMPONENT_USAGE_ALPHA 0x00001000
+#define NV10_3D_RC_FINAL1_G_MAPPING__MASK 0x0000e000
+#define NV10_3D_RC_FINAL1_G_MAPPING__SHIFT 13
+#define NV10_3D_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT 0x00002000
+#define NV10_3D_RC_FINAL1_G_MAPPING_EXPAND_NORMAL 0x00004000
+#define NV10_3D_RC_FINAL1_G_MAPPING_EXPAND_NEGATE 0x00006000
+#define NV10_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL 0x00008000
+#define NV10_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE 0x0000a000
+#define NV10_3D_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY 0x0000c000
+#define NV10_3D_RC_FINAL1_G_MAPPING_SIGNED_NEGATE 0x0000e000
+#define NV10_3D_RC_FINAL1_F_INPUT__MASK 0x000f0000
+#define NV10_3D_RC_FINAL1_F_INPUT__SHIFT 16
+#define NV10_3D_RC_FINAL1_F_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR0 0x00010000
+#define NV10_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR1 0x00020000
+#define NV10_3D_RC_FINAL1_F_INPUT_FOG 0x00030000
+#define NV10_3D_RC_FINAL1_F_INPUT_PRIMARY_COLOR 0x00040000
+#define NV10_3D_RC_FINAL1_F_INPUT_SECONDARY_COLOR 0x00050000
+#define NV10_3D_RC_FINAL1_F_INPUT_TEXTURE0 0x00080000
+#define NV10_3D_RC_FINAL1_F_INPUT_TEXTURE1 0x00090000
+#define NV10_3D_RC_FINAL1_F_INPUT_TEXTURE2 0x000a0000
+#define NV10_3D_RC_FINAL1_F_INPUT_TEXTURE3 0x000b0000
+#define NV10_3D_RC_FINAL1_F_INPUT_SPARE0 0x000c0000
+#define NV10_3D_RC_FINAL1_F_INPUT_SPARE1 0x000d0000
+#define NV10_3D_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
+#define NV10_3D_RC_FINAL1_F_INPUT_E_TIMES_F 0x000f0000
+#define NV10_3D_RC_FINAL1_F_COMPONENT_USAGE__MASK 0x00100000
+#define NV10_3D_RC_FINAL1_F_COMPONENT_USAGE__SHIFT 20
+#define NV10_3D_RC_FINAL1_F_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_FINAL1_F_COMPONENT_USAGE_ALPHA 0x00100000
+#define NV10_3D_RC_FINAL1_F_MAPPING__MASK 0x00e00000
+#define NV10_3D_RC_FINAL1_F_MAPPING__SHIFT 21
+#define NV10_3D_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT 0x00200000
+#define NV10_3D_RC_FINAL1_F_MAPPING_EXPAND_NORMAL 0x00400000
+#define NV10_3D_RC_FINAL1_F_MAPPING_EXPAND_NEGATE 0x00600000
+#define NV10_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL 0x00800000
+#define NV10_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE 0x00a00000
+#define NV10_3D_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY 0x00c00000
+#define NV10_3D_RC_FINAL1_F_MAPPING_SIGNED_NEGATE 0x00e00000
+#define NV10_3D_RC_FINAL1_E_INPUT__MASK 0x0f000000
+#define NV10_3D_RC_FINAL1_E_INPUT__SHIFT 24
+#define NV10_3D_RC_FINAL1_E_INPUT_ZERO 0x00000000
+#define NV10_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR0 0x01000000
+#define NV10_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR1 0x02000000
+#define NV10_3D_RC_FINAL1_E_INPUT_FOG 0x03000000
+#define NV10_3D_RC_FINAL1_E_INPUT_PRIMARY_COLOR 0x04000000
+#define NV10_3D_RC_FINAL1_E_INPUT_SECONDARY_COLOR 0x05000000
+#define NV10_3D_RC_FINAL1_E_INPUT_TEXTURE0 0x08000000
+#define NV10_3D_RC_FINAL1_E_INPUT_TEXTURE1 0x09000000
+#define NV10_3D_RC_FINAL1_E_INPUT_TEXTURE2 0x0a000000
+#define NV10_3D_RC_FINAL1_E_INPUT_TEXTURE3 0x0b000000
+#define NV10_3D_RC_FINAL1_E_INPUT_SPARE0 0x0c000000
+#define NV10_3D_RC_FINAL1_E_INPUT_SPARE1 0x0d000000
+#define NV10_3D_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
+#define NV10_3D_RC_FINAL1_E_INPUT_E_TIMES_F 0x0f000000
+#define NV10_3D_RC_FINAL1_E_COMPONENT_USAGE__MASK 0x10000000
+#define NV10_3D_RC_FINAL1_E_COMPONENT_USAGE__SHIFT 28
+#define NV10_3D_RC_FINAL1_E_COMPONENT_USAGE_RGB 0x00000000
+#define NV10_3D_RC_FINAL1_E_COMPONENT_USAGE_ALPHA 0x10000000
+#define NV10_3D_RC_FINAL1_E_MAPPING__MASK 0xe0000000
+#define NV10_3D_RC_FINAL1_E_MAPPING__SHIFT 29
+#define NV10_3D_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV10_3D_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT 0x20000000
+#define NV10_3D_RC_FINAL1_E_MAPPING_EXPAND_NORMAL 0x40000000
+#define NV10_3D_RC_FINAL1_E_MAPPING_EXPAND_NEGATE 0x60000000
+#define NV10_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL 0x80000000
+#define NV10_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE 0xa0000000
+#define NV10_3D_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY 0xc0000000
+#define NV10_3D_RC_FINAL1_E_MAPPING_SIGNED_NEGATE 0xe0000000
+
+
+#define NV17_3D_DMA_HIERZ 0x000001b0
+
+#define NV17_3D_HIERZ_PITCH 0x00000d5c
+
+#define NV17_3D_HIERZ_OFFSET 0x00000d60
+
+#define NV17_3D_HIERZ_FILL_VALUE 0x00000d68
+
+#define NV17_3D_HIERZ_BUFFER_CLEAR 0x00000d6c
+
+#define NV17_3D_UNK0D74 0x00000d74
+
+#define NV17_3D_UNK0D84 0x00000d84
+
+
+#define NV17_3D_HIERZ_WINDOW 0x00001638
+
+
+#define NV17_3D_HIERZ_WINDOW_X 0x00001638
+
+#define NV17_3D_HIERZ_WINDOW_Y 0x0000163c
+
+#define NV17_3D_HIERZ_WINDOW_Z 0x00001640
+
+#define NV17_3D_HIERZ_WINDOW_W 0x00001644
+
+#define NV17_3D_HIERZ_ENABLE 0x00001658
+
+
+#define NV17_3D_UNK01AC 0x000001ac
+
+#define NV17_3D_UNK0258 0x00000258
+
+#define NV17_3D_UNK025C 0x0000025c
+
+#define NV10_3D_UNK0290 0x00000290
+
+#define NV17_3D_COLOR_MASK_ENABLE 0x000002bc
+
+#define NV10_3D_UNK03F0 0x000003f0
+
+#define NV10_3D_UNK03F4 0x000003f4
+
+#define NV17_3D_ZCLEAR_ENABLE 0x000003f8
+
+#define NV17_3D_ZCLEAR_VALUE 0x000003fc
+#define NV17_3D_ZCLEAR_VALUE_DEPTH__MASK 0xffffff00
+#define NV17_3D_ZCLEAR_VALUE_DEPTH__SHIFT 8
+#define NV17_3D_ZCLEAR_VALUE_SEQUENCE__MASK 0x000000ff
+#define NV17_3D_ZCLEAR_VALUE_SEQUENCE__SHIFT 0
+
+#define NV10_3D_POINT_SIZE 0x000003ec
+
+#define NV10_3D_POINT_PARAMETER(i0) (0x000006f8 + 0x4*(i0))
+#define NV10_3D_POINT_PARAMETER__ESIZE 0x00000004
+#define NV10_3D_POINT_PARAMETER__LEN 0x00000008
+
+#define NV11_3D_COLOR_LOGIC_OP 0x00000d40
+
+#define NV11_3D_COLOR_LOGIC_OP_ENABLE 0x00000d40
+
+#define NV11_3D_COLOR_LOGIC_OP_OP 0x00000d44
+#define NV11_3D_COLOR_LOGIC_OP_OP_CLEAR 0x00001500
+#define NV11_3D_COLOR_LOGIC_OP_OP_AND 0x00001501
+#define NV11_3D_COLOR_LOGIC_OP_OP_AND_REVERSE 0x00001502
+#define NV11_3D_COLOR_LOGIC_OP_OP_COPY 0x00001503
+#define NV11_3D_COLOR_LOGIC_OP_OP_AND_INVERTED 0x00001504
+#define NV11_3D_COLOR_LOGIC_OP_OP_NOOP 0x00001505
+#define NV11_3D_COLOR_LOGIC_OP_OP_XOR 0x00001506
+#define NV11_3D_COLOR_LOGIC_OP_OP_OR 0x00001507
+#define NV11_3D_COLOR_LOGIC_OP_OP_NOR 0x00001508
+#define NV11_3D_COLOR_LOGIC_OP_OP_EQUIV 0x00001509
+#define NV11_3D_COLOR_LOGIC_OP_OP_INVERT 0x0000150a
+#define NV11_3D_COLOR_LOGIC_OP_OP_OR_REVERSE 0x0000150b
+#define NV11_3D_COLOR_LOGIC_OP_OP_COPY_INVERTED 0x0000150c
+#define NV11_3D_COLOR_LOGIC_OP_OP_OR_INVERTED 0x0000150d
+#define NV11_3D_COLOR_LOGIC_OP_OP_NAND 0x0000150e
+#define NV11_3D_COLOR_LOGIC_OP_OP_SET 0x0000150f
+
+
+#endif /* NV10_3D_XML */
diff --git a/src/mesa/drivers/dri/nouveau/nv10_context.c b/src/mesa/drivers/dri/nouveau/nv10_context.c
index fdcb43b771..8074b4bb47 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_context.c
@@ -24,11 +24,13 @@
*
*/
+#include "main/state.h"
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_fbo.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv_object.xml.h"
+#include "nv10_3d.xml.h"
#include "nv04_driver.h"
#include "nv10_driver.h"
@@ -156,9 +158,9 @@ nv17_zclear(struct gl_context *ctx, GLbitfield *buffers)
nfb->base._DepthBuffer->Wrapped)->surface;
/* Clear the hierarchical depth buffer */
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_FILL_VALUE, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_FILL_VALUE, 1);
OUT_RING(chan, pack_zs_f(s->format, ctx->Depth.Clear, 0));
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_BUFFER_CLEAR, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_BUFFER_CLEAR, 1);
OUT_RING(chan, 1);
/* Mark the depth buffer as cleared */
@@ -184,6 +186,9 @@ nv10_clear(struct gl_context *ctx, GLbitfield buffers)
nv17_zclear(ctx, &buffers);
else
nv10_zclear(ctx, &buffers);
+
+ /* Emit the zclear state if it's dirty */
+ _mesa_update_state(ctx);
}
nouveau_clear(ctx, buffers);
@@ -197,33 +202,33 @@ nv10_hwctx_init(struct gl_context *ctx)
struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
int i;
- BEGIN_RING(chan, celsius, NV10TCL_DMA_NOTIFY, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DMA_NOTIFY, 1);
OUT_RING(chan, hw->ntfy->handle);
- BEGIN_RING(chan, celsius, NV10TCL_DMA_IN_MEMORY0, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_DMA_TEXTURE0, 3);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->gart->handle);
OUT_RING(chan, chan->gart->handle);
- BEGIN_RING(chan, celsius, NV10TCL_DMA_IN_MEMORY2, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_DMA_COLOR, 2);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->vram->handle);
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_RT_HORIZ, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_RT_HORIZ, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_HORIZ(0), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_HORIZ(0), 1);
OUT_RING(chan, 0x7ff << 16 | 0x800);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_VERT(0), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_VERT(0), 1);
OUT_RING(chan, 0x7ff << 16 | 0x800);
for (i = 1; i < 8; i++) {
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_HORIZ(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_HORIZ(i), 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_VERT(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_VERT(i), 1);
OUT_RING(chan, 0);
}
@@ -232,18 +237,18 @@ nv10_hwctx_init(struct gl_context *ctx)
BEGIN_RING(chan, celsius, 0x3f4, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
if (context_chipset(ctx) >= 0x17) {
- BEGIN_RING(chan, celsius, NV17TCL_DMA_IN_MEMORY4, 2);
+ BEGIN_RING(chan, celsius, NV17_3D_UNK01AC, 2);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->vram->handle);
BEGIN_RING(chan, celsius, 0xd84, 1);
OUT_RING(chan, 0x3);
- BEGIN_RING(chan, celsius, NV17TCL_COLOR_MASK_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_COLOR_MASK_ENABLE, 1);
OUT_RING(chan, 1);
}
@@ -253,41 +258,41 @@ nv10_hwctx_init(struct gl_context *ctx)
OUT_RING(chan, 1);
OUT_RING(chan, 2);
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
}
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
/* Set state */
- BEGIN_RING(chan, celsius, NV10TCL_FOG_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_ALPHA_FUNC_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_ALPHA_FUNC_FUNC, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_FUNC, 2);
OUT_RING(chan, 0x207);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_TX_ENABLE(0), 2);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_ENABLE(0), 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_FUNC_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_DITHER_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_DITHER_ENABLE, 2);
OUT_RING(chan, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_LINE_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_SMOOTH_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_WEIGHT_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_WEIGHT_ENABLE, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_FUNC_SRC, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_SRC, 4);
OUT_RING(chan, 1);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RING(chan, 0x8006);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_MASK, 8);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_MASK, 8);
OUT_RING(chan, 0xff);
OUT_RING(chan, 0x207);
OUT_RING(chan, 0);
@@ -296,105 +301,105 @@ nv10_hwctx_init(struct gl_context *ctx)
OUT_RING(chan, 0x1e00);
OUT_RING(chan, 0x1e00);
OUT_RING(chan, 0x1d01);
- BEGIN_RING(chan, celsius, NV10TCL_NORMALIZE_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_NORMALIZE_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_FOG_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_ENABLE, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_MODEL, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_MODEL, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_SEPARATE_SPECULAR_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_SEPARATE_SPECULAR_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_ENABLED_LIGHTS, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_ENABLED_LIGHTS, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_OFFSET_POINT_ENABLE, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_POINT_ENABLE, 3);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_FUNC, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_FUNC, 1);
OUT_RING(chan, 0x201);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_WRITE_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_WRITE_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_TEST_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_TEST_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_OFFSET_FACTOR, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_FACTOR, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_POINT_SIZE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_POINT_SIZE, 1);
OUT_RING(chan, 8);
- BEGIN_RING(chan, celsius, NV10TCL_POINT_PARAMETERS_ENABLE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POINT_PARAMETERS_ENABLE, 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_LINE_WIDTH, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_WIDTH, 1);
OUT_RING(chan, 8);
- BEGIN_RING(chan, celsius, NV10TCL_LINE_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_SMOOTH_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_MODE_FRONT, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_MODE_FRONT, 2);
OUT_RING(chan, 0x1b02);
OUT_RING(chan, 0x1b02);
- BEGIN_RING(chan, celsius, NV10TCL_CULL_FACE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE, 2);
OUT_RING(chan, 0x405);
OUT_RING(chan, 0x901);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_SMOOTH_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_CULL_FACE_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE_ENABLE, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_TX_GEN_MODE_S(0), 8);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_GEN_MODE(0, 0), 8);
for (i = 0; i < 8; i++)
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_TX_MATRIX_ENABLE(0), 2);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_MATRIX_ENABLE(0), 2);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_FOG_EQUATION_CONSTANT, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_COEFF(0), 3);
OUT_RING(chan, 0x3fc00000); /* -1.50 */
OUT_RING(chan, 0xbdb8aa0a); /* -0.09 */
OUT_RING(chan, 0); /* 0.00 */
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_FOG_MODE, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_MODE, 2);
OUT_RING(chan, 0x802);
OUT_RING(chan, 2);
/* for some reason VIEW_MATRIX_ENABLE need to be 6 instead of 4 when
* using texturing, except when using the texture matrix
*/
- BEGIN_RING(chan, celsius, NV10TCL_VIEW_MATRIX_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEW_MATRIX_ENABLE, 1);
OUT_RING(chan, 6);
- BEGIN_RING(chan, celsius, NV10TCL_COLOR_MASK, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_COLOR_MASK, 1);
OUT_RING(chan, 0x01010101);
/* Set vertex component */
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_COL_4F_R, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_COL_4F_R, 4);
OUT_RINGf(chan, 1.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 1.0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_COL2_3F_R, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_COL2_3F_R, 3);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_NOR_3F_X, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_NOR_3F_X, 3);
OUT_RING(chan, 0);
OUT_RING(chan, 0);
OUT_RINGf(chan, 1.0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_TX0_4F_S, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_TX0_4F_S, 4);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 1.0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_TX1_4F_S, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_TX1_4F_S, 4);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 1.0);
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_FOG_1F, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VERTEX_FOG_1F, 1);
OUT_RINGf(chan, 0.0);
- BEGIN_RING(chan, celsius, NV10TCL_EDGEFLAG_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_EDGEFLAG_ENABLE, 1);
OUT_RING(chan, 1);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_RANGE_NEAR, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_RANGE_NEAR, 2);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 16777216.0);
@@ -407,7 +412,8 @@ nv10_context_destroy(struct gl_context *ctx)
struct nouveau_context *nctx = to_nouveau_context(ctx);
nv04_surface_takedown(ctx);
- nv10_render_destroy(ctx);
+ nv10_swtnl_destroy(ctx);
+ nv10_vbo_destroy(ctx);
nouveau_grobj_free(&nctx->hw.eng3d);
@@ -451,11 +457,11 @@ nv10_context_create(struct nouveau_screen *screen, const struct gl_config *visua
/* 3D engine. */
if (context_chipset(ctx) >= 0x17)
- celsius_class = NV17TCL;
+ celsius_class = NV17_3D;
else if (context_chipset(ctx) >= 0x11)
- celsius_class = NV11TCL;
+ celsius_class = NV11_3D;
else
- celsius_class = NV10TCL;
+ celsius_class = NV10_3D;
ret = nouveau_grobj_alloc(context_chan(ctx), 0xbeef0001, celsius_class,
&nctx->hw.eng3d);
@@ -463,7 +469,8 @@ nv10_context_create(struct nouveau_screen *screen, const struct gl_config *visua
goto fail;
nv10_hwctx_init(ctx);
- nv10_render_init(ctx);
+ nv10_vbo_init(ctx);
+ nv10_swtnl_init(ctx);
return ctx;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_driver.h b/src/mesa/drivers/dri/nouveau/nv10_driver.h
index dec3d64e7d..6fdc464162 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_driver.h
+++ b/src/mesa/drivers/dri/nouveau/nv10_driver.h
@@ -45,10 +45,16 @@ nv10_transform_depth(struct gl_context *ctx, float z);
/* nv10_render.c */
void
-nv10_render_init(struct gl_context *ctx);
+nv10_vbo_init(struct gl_context *ctx);
void
-nv10_render_destroy(struct gl_context *ctx);
+nv10_vbo_destroy(struct gl_context *ctx);
+
+void
+nv10_swtnl_init(struct gl_context *ctx);
+
+void
+nv10_swtnl_destroy(struct gl_context *ctx);
/* nv10_state_fb.c */
void
diff --git a/src/mesa/drivers/dri/nouveau/nv10_render.c b/src/mesa/drivers/dri/nouveau/nv10_render.c
index a03ace3536..20fb447842 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_render.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_render.c
@@ -26,50 +26,50 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nv10_driver.h"
#define NUM_VERTEX_ATTRS 8
static void
-nv10_emit_material(struct gl_context *ctx, struct nouveau_array_state *a,
+nv10_emit_material(struct gl_context *ctx, struct nouveau_array *a,
const void *v);
/* Vertex attribute format. */
static struct nouveau_attr_info nv10_vertex_attrs[VERT_ATTRIB_MAX] = {
[VERT_ATTRIB_POS] = {
.vbo_index = 0,
- .imm_method = NV10TCL_VERTEX_POS_4F_X,
+ .imm_method = NV10_3D_VERTEX_POS_4F_X,
.imm_fields = 4,
},
[VERT_ATTRIB_COLOR0] = {
.vbo_index = 1,
- .imm_method = NV10TCL_VERTEX_COL_4F_R,
+ .imm_method = NV10_3D_VERTEX_COL_4F_R,
.imm_fields = 4,
},
[VERT_ATTRIB_COLOR1] = {
.vbo_index = 2,
- .imm_method = NV10TCL_VERTEX_COL2_3F_R,
+ .imm_method = NV10_3D_VERTEX_COL2_3F_R,
.imm_fields = 3,
},
[VERT_ATTRIB_TEX0] = {
.vbo_index = 3,
- .imm_method = NV10TCL_VERTEX_TX0_4F_S,
+ .imm_method = NV10_3D_VERTEX_TX0_4F_S,
.imm_fields = 4,
},
[VERT_ATTRIB_TEX1] = {
.vbo_index = 4,
- .imm_method = NV10TCL_VERTEX_TX1_4F_S,
+ .imm_method = NV10_3D_VERTEX_TX1_4F_S,
.imm_fields = 4,
},
[VERT_ATTRIB_NORMAL] = {
.vbo_index = 5,
- .imm_method = NV10TCL_VERTEX_NOR_3F_X,
+ .imm_method = NV10_3D_VERTEX_NOR_3F_X,
.imm_fields = 3,
},
[VERT_ATTRIB_FOG] = {
.vbo_index = 7,
- .imm_method = NV10TCL_VERTEX_FOG_1F,
+ .imm_method = NV10_3D_VERTEX_FOG_1F,
.imm_fields = 1,
},
[VERT_ATTRIB_GENERIC0] = {
@@ -94,12 +94,12 @@ get_hw_format(int type)
{
switch (type) {
case GL_FLOAT:
- return NV10TCL_VTXFMT_TYPE_FLOAT;
+ return NV10_3D_VTXBUF_FMT_TYPE_V32_FLOAT;
case GL_SHORT:
case GL_UNSIGNED_SHORT:
- return NV10TCL_VTXFMT_TYPE_SHORT;
+ return NV10_3D_VTXBUF_FMT_TYPE_V16_SNORM;
case GL_UNSIGNED_BYTE:
- return NV10TCL_VTXFMT_TYPE_BYTE_RGBA;
+ return NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM;
default:
assert(0);
}
@@ -111,26 +111,24 @@ nv10_render_set_format(struct gl_context *ctx)
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- int i, hw_format;
-
- for (i = 0; i < NUM_VERTEX_ATTRS; i++) {
- int attr = render->map[i];
+ int i, attr, hw_format;
+ FOR_EACH_ATTR(render, i, attr) {
if (attr >= 0) {
- struct nouveau_array_state *a = &render->attrs[attr];
+ struct nouveau_array *a = &render->attrs[attr];
hw_format = a->stride << 8 |
a->fields << 4 |
get_hw_format(a->type);
if (attr == VERT_ATTRIB_POS && a->fields == 4)
- hw_format |= NV10TCL_VTXFMT_POS_HOMOGENEOUS;
+ hw_format |= NV10_3D_VTXBUF_FMT_HOMOGENEOUS;
} else {
/* Unused attribute. */
- hw_format = NV10TCL_VTXFMT_TYPE_FLOAT;
+ hw_format = NV10_3D_VTXBUF_FMT_TYPE_V32_FLOAT;
}
- BEGIN_RING(chan, celsius, NV10TCL_VTXFMT(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VTXBUF_FMT(i), 1);
OUT_RING(chan, hw_format);
}
}
@@ -140,55 +138,51 @@ nv10_render_bind_vertices(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_bo_context *bctx = context_bctx(ctx, VERTEX);
- struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- int i;
+ int i, attr;
- for (i = 0; i < NUM_VERTEX_ATTRS; i++) {
- int attr = render->map[i];
-
- if (attr >= 0) {
- struct nouveau_array_state *a = &render->attrs[attr];
+ FOR_EACH_BOUND_ATTR(render, i, attr) {
+ struct nouveau_array *a = &render->attrs[attr];
- nouveau_bo_markl(bctx, celsius,
- NV10TCL_VTXBUF_ADDRESS(i),
- a->bo, a->offset,
- NOUVEAU_BO_GART | NOUVEAU_BO_RD);
- }
+ nouveau_bo_markl(bctx, celsius,
+ NV10_3D_VTXBUF_OFFSET(i),
+ a->bo, a->offset,
+ NOUVEAU_BO_GART | NOUVEAU_BO_RD);
}
-
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_ARRAY_VALIDATE, 1);
- OUT_RING(chan, 0);
}
/* Vertex array rendering defs. */
#define RENDER_LOCALS(ctx) \
struct nouveau_grobj *celsius = context_eng3d(ctx)
+#define BATCH_VALIDATE() \
+ BEGIN_RING(chan, celsius, NV10_3D_VTXBUF_VALIDATE, 1); \
+ OUT_RING(chan, 0)
+
#define BATCH_BEGIN(prim) \
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_BUFFER_BEGIN_END, 1); \
+ BEGIN_RING(chan, celsius, NV10_3D_VTXBUF_BEGIN_END, 1); \
OUT_RING(chan, prim)
#define BATCH_END() \
- BEGIN_RING(chan, celsius, NV10TCL_VERTEX_BUFFER_BEGIN_END, 1); \
+ BEGIN_RING(chan, celsius, NV10_3D_VTXBUF_BEGIN_END, 1); \
OUT_RING(chan, 0)
#define MAX_PACKET 0x400
#define MAX_OUT_L 0x100
#define BATCH_PACKET_L(n) \
- BEGIN_RING_NI(chan, celsius, NV10TCL_VERTEX_BUFFER_DRAW_ARRAYS, n)
+ BEGIN_RING_NI(chan, celsius, NV10_3D_VTXBUF_BATCH, n)
#define BATCH_OUT_L(i, n) \
OUT_RING(chan, ((n) - 1) << 24 | (i))
#define MAX_OUT_I16 0x2
#define BATCH_PACKET_I16(n) \
- BEGIN_RING_NI(chan, celsius, NV10TCL_VB_ELEMENT_U16, n)
+ BEGIN_RING_NI(chan, celsius, NV10_3D_VTXBUF_ELEMENT_U16, n)
#define BATCH_OUT_I16(i0, i1) \
OUT_RING(chan, (i1) << 16 | (i0))
#define MAX_OUT_I32 0x1
#define BATCH_PACKET_I32(n) \
- BEGIN_RING_NI(chan, celsius, NV10TCL_VB_ELEMENT_U32, n)
+ BEGIN_RING_NI(chan, celsius, NV10_3D_VTXBUF_ELEMENT_U32, n)
#define BATCH_OUT_I32(i) \
OUT_RING(chan, i)
@@ -199,3 +193,5 @@ nv10_render_bind_vertices(struct gl_context *ctx)
#define TAG(x) nv10_##x
#include "nouveau_render_t.c"
+#include "nouveau_vbo_t.c"
+#include "nouveau_swtnl_t.c"
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
index d87fe96b1c..0505547421 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
@@ -27,8 +27,9 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_fbo.h"
-#include "nouveau_class.h"
#include "nouveau_util.h"
+#include "nv_object.xml.h"
+#include "nv10_3d.xml.h"
#include "nv10_driver.h"
static inline unsigned
@@ -36,26 +37,26 @@ get_rt_format(gl_format format)
{
switch (format) {
case MESA_FORMAT_XRGB8888:
- return 0x05;
+ return NV10_3D_RT_FORMAT_COLOR_X8R8G8B8;
case MESA_FORMAT_ARGB8888:
- return 0x08;
+ return NV10_3D_RT_FORMAT_COLOR_A8R8G8B8;
case MESA_FORMAT_RGB565:
- return 0x03;
+ return NV10_3D_RT_FORMAT_COLOR_R5G6B5;
case MESA_FORMAT_Z16:
- return 0x10;
+ return NV10_3D_RT_FORMAT_DEPTH_Z16;
case MESA_FORMAT_Z24_S8:
- return 0x0;
+ return NV10_3D_RT_FORMAT_DEPTH_Z24S8;
default:
assert(0);
}
}
static void
-setup_lma_buffer(struct gl_context *ctx)
+setup_hierz_buffer(struct gl_context *ctx)
{
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- struct nouveau_bo_context *bctx = context_bctx(ctx, LMA_DEPTH);
+ struct nouveau_bo_context *bctx = context_bctx(ctx, HIERZ);
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct nouveau_framebuffer *nfb = to_nouveau_framebuffer(fb);
unsigned pitch = align(fb->Width, 128),
@@ -68,20 +69,20 @@ setup_lma_buffer(struct gl_context *ctx)
0, NOUVEAU_BO_TILE_ZETA, &nfb->hierz.bo);
}
- nouveau_bo_markl(bctx, celsius, NV17TCL_LMA_DEPTH_BUFFER_OFFSET,
+ nouveau_bo_markl(bctx, celsius, NV17_3D_HIERZ_OFFSET,
nfb->hierz.bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
WAIT_RING(chan, 9);
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_WINDOW_X, 4);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_WINDOW_X, 4);
OUT_RINGf(chan, - 1792);
OUT_RINGf(chan, - 2304 + fb->Height);
OUT_RINGf(chan, fb->_DepthMaxF / 2);
OUT_RINGf(chan, 0);
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_BUFFER_PITCH, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_PITCH, 1);
OUT_RING(chan, pitch);
- BEGIN_RING(chan, celsius, NV17TCL_LMA_DEPTH_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV17_3D_HIERZ_ENABLE, 1);
OUT_RING(chan, 1);
}
@@ -93,7 +94,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
struct nouveau_bo_context *bctx = context_bctx(ctx, FRAMEBUFFER);
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct nouveau_surface *s;
- unsigned rt_format = NV10TCL_RT_FORMAT_TYPE_LINEAR;
+ unsigned rt_format = NV10_3D_RT_FORMAT_TYPE_LINEAR;
unsigned rt_pitch = 0, zeta_pitch = 0;
unsigned bo_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR;
@@ -106,7 +107,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
int i;
for (i = 0; i < 6; i++) {
- BEGIN_RING(chan, celsius, NV10TCL_NOP, 1);
+ BEGIN_RING(chan, celsius, NV04_GRAPH_NOP, 1);
OUT_RING(chan, 0);
}
}
@@ -119,7 +120,7 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
rt_format |= get_rt_format(s->format);
zeta_pitch = rt_pitch = s->pitch;
- nouveau_bo_markl(bctx, celsius, NV10TCL_COLOR_OFFSET,
+ nouveau_bo_markl(bctx, celsius, NV10_3D_COLOR_OFFSET,
s->bo, 0, bo_flags);
}
@@ -131,16 +132,16 @@ nv10_emit_framebuffer(struct gl_context *ctx, int emit)
rt_format |= get_rt_format(s->format);
zeta_pitch = s->pitch;
- nouveau_bo_markl(bctx, celsius, NV10TCL_ZETA_OFFSET,
+ nouveau_bo_markl(bctx, celsius, NV10_3D_ZETA_OFFSET,
s->bo, 0, bo_flags);
if (context_chipset(ctx) >= 0x17) {
- setup_lma_buffer(ctx);
+ setup_hierz_buffer(ctx);
context_dirty(ctx, ZCLEAR);
}
}
- BEGIN_RING(chan, celsius, NV10TCL_RT_FORMAT, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_RT_FORMAT, 2);
OUT_RING(chan, rt_format);
OUT_RING(chan, zeta_pitch << 16 | rt_pitch);
@@ -162,7 +163,7 @@ nv10_emit_scissor(struct gl_context *ctx, int emit)
get_scissors(ctx->DrawBuffer, &x, &y, &w, &h);
- BEGIN_RING(chan, celsius, NV10TCL_RT_HORIZ, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_RT_HORIZ, 2);
OUT_RING(chan, w << 16 | x);
OUT_RING(chan, h << 16 | y);
}
@@ -182,12 +183,12 @@ nv10_emit_viewport(struct gl_context *ctx, int emit)
if (nv10_use_viewport_zclear(ctx))
a[2] = nv10_transform_depth(ctx, (vp->Far + vp->Near) / 2);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_TRANSLATE_X, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_TRANSLATE_X, 4);
OUT_RINGp(chan, a, 4);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_HORIZ(0), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_HORIZ(0), 1);
OUT_RING(chan, (fb->Width - 1) << 16 | 0x08000800);
- BEGIN_RING(chan, celsius, NV10TCL_VIEWPORT_CLIP_VERT(0), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_VIEWPORT_CLIP_VERT(0), 1);
OUT_RING(chan, (fb->Height - 1) << 16 | 0x08000800);
context_dirty(ctx, PROJECTION);
@@ -203,12 +204,12 @@ nv10_emit_zclear(struct gl_context *ctx, int emit)
to_nouveau_framebuffer(ctx->DrawBuffer);
if (nfb->hierz.bo) {
- BEGIN_RING(chan, celsius, NV17TCL_ZCLEAR_ENABLE, 2);
- OUT_RING(chan, nctx->hierz.clear_blocked ? 0 : 1);
+ BEGIN_RING(chan, celsius, NV17_3D_ZCLEAR_ENABLE, 2);
+ OUT_RINGb(chan, !nctx->hierz.clear_blocked);
OUT_RING(chan, nfb->hierz.clear_value |
(nctx->hierz.clear_seq & 0xff));
} else {
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_RANGE_NEAR, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_RANGE_NEAR, 2);
OUT_RINGf(chan, nv10_transform_depth(ctx, 0));
OUT_RINGf(chan, nv10_transform_depth(ctx, 1));
context_dirty(ctx, VIEWPORT);
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
index 5138c36df7..1adc86086c 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_frag.c
@@ -27,7 +27,7 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nouveau_util.h"
#include "nv10_driver.h"
#include "nv20_driver.h"
@@ -41,24 +41,24 @@
#define RC_IN_SHIFT_G 40
#define RC_IN_SOURCE(source) \
- ((uint64_t)NV10TCL_RC_IN_RGB_D_INPUT_##source)
+ ((uint64_t)NV10_3D_RC_IN_RGB_D_INPUT_##source)
#define RC_IN_USAGE(usage) \
- ((uint64_t)NV10TCL_RC_IN_RGB_D_COMPONENT_USAGE_##usage)
+ ((uint64_t)NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE_##usage)
#define RC_IN_MAPPING(mapping) \
- ((uint64_t)NV10TCL_RC_IN_RGB_D_MAPPING_##mapping)
+ ((uint64_t)NV10_3D_RC_IN_RGB_D_MAPPING_##mapping)
-#define RC_OUT_BIAS NV10TCL_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF
-#define RC_OUT_SCALE_1 NV10TCL_RC_OUT_RGB_SCALE_NONE
-#define RC_OUT_SCALE_2 NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_TWO
-#define RC_OUT_SCALE_4 NV10TCL_RC_OUT_RGB_SCALE_SCALE_BY_FOUR
+#define RC_OUT_BIAS NV10_3D_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF
+#define RC_OUT_SCALE_1 NV10_3D_RC_OUT_RGB_SCALE_NONE
+#define RC_OUT_SCALE_2 NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_TWO
+#define RC_OUT_SCALE_4 NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_FOUR
/* Make the combiner do: spare0_i = A_i * B_i */
-#define RC_OUT_AB NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0
+#define RC_OUT_AB NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0
/* spare0_i = dot3(A, B) */
-#define RC_OUT_DOT_AB (NV10TCL_RC_OUT_RGB_AB_OUTPUT_SPARE0 | \
- NV10TCL_RC_OUT_RGB_AB_DOT_PRODUCT)
+#define RC_OUT_DOT_AB (NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0 | \
+ NV10_3D_RC_OUT_RGB_AB_DOT_PRODUCT)
/* spare0_i = A_i * B_i + C_i * D_i */
-#define RC_OUT_SUM NV10TCL_RC_OUT_RGB_SUM_OUTPUT_SPARE0
+#define RC_OUT_SUM NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0
struct combiner_state {
struct gl_context *ctx;
@@ -383,15 +383,15 @@ nv10_emit_tex_env(struct gl_context *ctx, int emit)
c_out |= 0x3 << 27;
}
- BEGIN_RING(chan, celsius, NV10TCL_RC_IN_ALPHA(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_IN_ALPHA(i), 1);
OUT_RING(chan, a_in);
- BEGIN_RING(chan, celsius, NV10TCL_RC_IN_RGB(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_IN_RGB(i), 1);
OUT_RING(chan, c_in);
- BEGIN_RING(chan, celsius, NV10TCL_RC_COLOR(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_COLOR(i), 1);
OUT_RING(chan, k);
- BEGIN_RING(chan, celsius, NV10TCL_RC_OUT_ALPHA(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_OUT_ALPHA(i), 1);
OUT_RING(chan, a_out);
- BEGIN_RING(chan, celsius, NV10TCL_RC_OUT_RGB(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_OUT_RGB(i), 1);
OUT_RING(chan, c_out);
context_dirty(ctx, FRAG);
@@ -407,7 +407,7 @@ nv10_emit_frag(struct gl_context *ctx, int emit)
nv10_get_final_combiner(ctx, &in, &n);
- BEGIN_RING(chan, celsius, NV10TCL_RC_FINAL0, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_RC_FINAL0, 2);
OUT_RING(chan, in);
OUT_RING(chan, in >> 32);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c b/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
index 4e49b0278c..3f80790483 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_polygon.c
@@ -27,7 +27,8 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
-#include "nouveau_class.h"
+#include "nouveau_util.h"
+#include "nv10_3d.xml.h"
#include "nv10_driver.h"
void
@@ -37,13 +38,13 @@ nv10_emit_cull_face(struct gl_context *ctx, int emit)
struct nouveau_grobj *celsius = context_eng3d(ctx);
GLenum mode = ctx->Polygon.CullFaceMode;
- BEGIN_RING(chan, celsius, NV10TCL_CULL_FACE_ENABLE, 1);
- OUT_RING(chan, ctx->Polygon.CullFlag ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Polygon.CullFlag);
- BEGIN_RING(chan, celsius, NV10TCL_CULL_FACE, 1);
- OUT_RING(chan, (mode == GL_FRONT ? NV10TCL_CULL_FACE_FRONT :
- mode == GL_BACK ? NV10TCL_CULL_FACE_BACK :
- NV10TCL_CULL_FACE_FRONT_AND_BACK));
+ BEGIN_RING(chan, celsius, NV10_3D_CULL_FACE, 1);
+ OUT_RING(chan, (mode == GL_FRONT ? NV10_3D_CULL_FACE_FRONT :
+ mode == GL_BACK ? NV10_3D_CULL_FACE_BACK :
+ NV10_3D_CULL_FACE_FRONT_AND_BACK));
}
void
@@ -52,9 +53,9 @@ nv10_emit_front_face(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_FRONT_FACE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_FRONT_FACE, 1);
OUT_RING(chan, ctx->Polygon.FrontFace == GL_CW ?
- NV10TCL_FRONT_FACE_CW : NV10TCL_FRONT_FACE_CCW);
+ NV10_3D_FRONT_FACE_CW : NV10_3D_FRONT_FACE_CCW);
}
void
@@ -65,11 +66,11 @@ nv10_emit_line_mode(struct gl_context *ctx, int emit)
GLboolean smooth = ctx->Line.SmoothFlag &&
ctx->Hint.LineSmooth == GL_NICEST;
- BEGIN_RING(chan, celsius, NV10TCL_LINE_WIDTH, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_WIDTH, 1);
OUT_RING(chan, MAX2(smooth ? 0 : 1,
ctx->Line.Width) * 8);
- BEGIN_RING(chan, celsius, NV10TCL_LINE_SMOOTH_ENABLE, 1);
- OUT_RING(chan, smooth ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_LINE_SMOOTH_ENABLE, 1);
+ OUT_RINGb(chan, smooth);
}
void
@@ -83,11 +84,11 @@ nv10_emit_point_mode(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_POINT_SIZE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_POINT_SIZE, 1);
OUT_RING(chan, (uint32_t)(ctx->Point.Size * 8));
- BEGIN_RING(chan, celsius, NV10TCL_POINT_SMOOTH_ENABLE, 1);
- OUT_RING(chan, ctx->Point.SmoothFlag ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_POINT_SMOOTH_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Point.SmoothFlag);
}
void
@@ -96,12 +97,12 @@ nv10_emit_polygon_mode(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_MODE_FRONT, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_MODE_FRONT, 2);
OUT_RING(chan, nvgl_polygon_mode(ctx->Polygon.FrontMode));
OUT_RING(chan, nvgl_polygon_mode(ctx->Polygon.BackMode));
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_SMOOTH_ENABLE, 1);
- OUT_RING(chan, ctx->Polygon.SmoothFlag ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_SMOOTH_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Polygon.SmoothFlag);
}
void
@@ -110,12 +111,12 @@ nv10_emit_polygon_offset(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_OFFSET_POINT_ENABLE, 3);
- OUT_RING(chan, ctx->Polygon.OffsetPoint ? 1 : 0);
- OUT_RING(chan, ctx->Polygon.OffsetLine ? 1 : 0);
- OUT_RING(chan, ctx->Polygon.OffsetFill ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_POINT_ENABLE, 3);
+ OUT_RINGb(chan, ctx->Polygon.OffsetPoint);
+ OUT_RINGb(chan, ctx->Polygon.OffsetLine);
+ OUT_RINGb(chan, ctx->Polygon.OffsetFill);
- BEGIN_RING(chan, celsius, NV10TCL_POLYGON_OFFSET_FACTOR, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_POLYGON_OFFSET_FACTOR, 2);
OUT_RINGf(chan, ctx->Polygon.OffsetFactor);
OUT_RINGf(chan, ctx->Polygon.OffsetUnits);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
index 99609844a1..bb1084ed11 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
@@ -27,7 +27,8 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
-#include "nouveau_class.h"
+#include "nouveau_util.h"
+#include "nv10_3d.xml.h"
#include "nv10_driver.h"
void
@@ -36,10 +37,10 @@ nv10_emit_alpha_func(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_ALPHA_FUNC_ENABLE, 1);
- OUT_RING(chan, ctx->Color.AlphaEnabled ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Color.AlphaEnabled);
- BEGIN_RING(chan, celsius, NV10TCL_ALPHA_FUNC_FUNC, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_ALPHA_FUNC_FUNC, 2);
OUT_RING(chan, nvgl_comparison_op(ctx->Color.AlphaFunc));
OUT_RING(chan, FLOAT_TO_UBYTE(ctx->Color.AlphaRef));
}
@@ -50,7 +51,7 @@ nv10_emit_blend_color(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_COLOR, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_COLOR, 1);
OUT_RING(chan, FLOAT_TO_UBYTE(ctx->Color.BlendColor[3]) << 24 |
FLOAT_TO_UBYTE(ctx->Color.BlendColor[0]) << 16 |
FLOAT_TO_UBYTE(ctx->Color.BlendColor[1]) << 8 |
@@ -63,10 +64,10 @@ nv10_emit_blend_equation(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_FUNC_ENABLE, 1);
- OUT_RING(chan, ctx->Color.BlendEnabled ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Color.BlendEnabled);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_EQUATION, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_EQUATION, 1);
OUT_RING(chan, nvgl_blend_eqn(ctx->Color.BlendEquationRGB));
}
@@ -76,7 +77,7 @@ nv10_emit_blend_func(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_BLEND_FUNC_SRC, 2);
+ BEGIN_RING(chan, celsius, NV10_3D_BLEND_FUNC_SRC, 2);
OUT_RING(chan, nvgl_blend_func(ctx->Color.BlendSrcRGB));
OUT_RING(chan, nvgl_blend_func(ctx->Color.BlendDstRGB));
}
@@ -87,7 +88,7 @@ nv10_emit_color_mask(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_COLOR_MASK, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_COLOR_MASK, 1);
OUT_RING(chan, ((ctx->Color.ColorMask[0][3] ? 1 << 24 : 0) |
(ctx->Color.ColorMask[0][0] ? 1 << 16 : 0) |
(ctx->Color.ColorMask[0][1] ? 1 << 8 : 0) |
@@ -100,11 +101,11 @@ nv10_emit_depth(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_TEST_ENABLE, 1);
- OUT_RING(chan, ctx->Depth.Test ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_WRITE_ENABLE, 1);
- OUT_RING(chan, ctx->Depth.Mask ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_DEPTH_FUNC, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_TEST_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Depth.Test);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_WRITE_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Depth.Mask);
+ BEGIN_RING(chan, celsius, NV10_3D_DEPTH_FUNC, 1);
OUT_RING(chan, nvgl_comparison_op(ctx->Depth.Func));
}
@@ -114,8 +115,8 @@ nv10_emit_dither(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_DITHER_ENABLE, 1);
- OUT_RING(chan, ctx->Color.DitherFlag ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_DITHER_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Color.DitherFlag);
}
void
@@ -127,8 +128,8 @@ nv10_emit_logic_opcode(struct gl_context *ctx, int emit)
assert(!ctx->Color.ColorLogicOpEnabled
|| context_chipset(ctx) >= 0x11);
- BEGIN_RING(chan, celsius, NV11TCL_COLOR_LOGIC_OP_ENABLE, 2);
- OUT_RING(chan, ctx->Color.ColorLogicOpEnabled ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV11_3D_COLOR_LOGIC_OP_ENABLE, 2);
+ OUT_RINGb(chan, ctx->Color.ColorLogicOpEnabled);
OUT_RING(chan, nvgl_logicop_func(ctx->Color.LogicOp));
}
@@ -138,9 +139,9 @@ nv10_emit_shade_model(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_SHADE_MODEL, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_SHADE_MODEL, 1);
OUT_RING(chan, ctx->Light.ShadeModel == GL_SMOOTH ?
- NV10TCL_SHADE_MODEL_SMOOTH : NV10TCL_SHADE_MODEL_FLAT);
+ NV10_3D_SHADE_MODEL_SMOOTH : NV10_3D_SHADE_MODEL_FLAT);
}
void
@@ -149,10 +150,10 @@ nv10_emit_stencil_func(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_ENABLE, 1);
- OUT_RING(chan, ctx->Stencil.Enabled ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Stencil.Enabled);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_FUNC_FUNC, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_FUNC_FUNC, 3);
OUT_RING(chan, nvgl_comparison_op(ctx->Stencil.Function[0]));
OUT_RING(chan, ctx->Stencil.Ref[0]);
OUT_RING(chan, ctx->Stencil.ValueMask[0]);
@@ -164,7 +165,7 @@ nv10_emit_stencil_mask(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_MASK, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_MASK, 1);
OUT_RING(chan, ctx->Stencil.WriteMask[0]);
}
@@ -174,7 +175,7 @@ nv10_emit_stencil_op(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *celsius = context_eng3d(ctx);
- BEGIN_RING(chan, celsius, NV10TCL_STENCIL_OP_FAIL, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_STENCIL_OP_FAIL, 3);
OUT_RING(chan, nvgl_stencil_op(ctx->Stencil.FailFunc[0]));
OUT_RING(chan, nvgl_stencil_op(ctx->Stencil.ZFailFunc[0]));
OUT_RING(chan, nvgl_stencil_op(ctx->Stencil.ZPassFunc[0]));
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
index 0092ad0c20..fda67b1507 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tex.c
@@ -28,14 +28,10 @@
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
#include "nouveau_texture.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nouveau_util.h"
#include "nv10_driver.h"
-#define TX_GEN_MODE(i, j) (NV10TCL_TX_GEN_MODE_S(i) + 4 * (j))
-#define TX_GEN_COEFF(i, j) (NV10TCL_TX_GEN_COEFF_S_A(i) + 16 * (j))
-#define TX_MATRIX(i) (NV10TCL_TX0_MATRIX(0) + 64 * (i))
-
void
nv10_emit_tex_gen(struct gl_context *ctx, int emit)
{
@@ -53,15 +49,15 @@ nv10_emit_tex_gen(struct gl_context *ctx, int emit)
if (k) {
BEGIN_RING(chan, celsius,
- TX_GEN_COEFF(i, j), 4);
+ NV10_3D_TEX_GEN_COEFF(i, j), 4);
OUT_RINGp(chan, k, 4);
}
- BEGIN_RING(chan, celsius, TX_GEN_MODE(i, j), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_GEN_MODE(i,j), 1);
OUT_RING(chan, nvgl_texgen_mode(coord->Mode));
} else {
- BEGIN_RING(chan, celsius, TX_GEN_MODE(i, j), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_GEN_MODE(i,j), 1);
OUT_RING(chan, 0);
}
}
@@ -80,14 +76,14 @@ nv10_emit_tex_mat(struct gl_context *ctx, int emit)
if (nctx->fallback == HWTNL &&
((ctx->Texture._TexMatEnabled & 1 << i) ||
ctx->Texture.Unit[i]._GenFlags)) {
- BEGIN_RING(chan, celsius, NV10TCL_TX_MATRIX_ENABLE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_MATRIX_ENABLE(i), 1);
OUT_RING(chan, 1);
- BEGIN_RING(chan, celsius, TX_MATRIX(i), 16);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_MATRIX(i, 0), 16);
OUT_RINGm(chan, ctx->TextureMatrixStack[i].Top->m);
} else {
- BEGIN_RING(chan, celsius, NV10TCL_TX_MATRIX_ENABLE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_MATRIX_ENABLE(i), 1);
OUT_RING(chan, 0);
}
}
@@ -97,29 +93,29 @@ get_tex_format_pot(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
case MESA_FORMAT_ARGB8888:
- return NV10TCL_TX_FORMAT_FORMAT_A8R8G8B8;
+ return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8;
case MESA_FORMAT_XRGB8888:
- return NV10TCL_TX_FORMAT_FORMAT_X8R8G8B8;
+ return NV10_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
case MESA_FORMAT_ARGB1555:
- return NV10TCL_TX_FORMAT_FORMAT_A1R5G5B5;
+ return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5;
case MESA_FORMAT_ARGB4444:
- return NV10TCL_TX_FORMAT_FORMAT_A4R4G4B4;
+ return NV10_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
case MESA_FORMAT_RGB565:
- return NV10TCL_TX_FORMAT_FORMAT_R5G6B5;
+ return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5;
case MESA_FORMAT_A8:
case MESA_FORMAT_I8:
- return NV10TCL_TX_FORMAT_FORMAT_A8;
+ return NV10_3D_TEX_FORMAT_FORMAT_I8;
case MESA_FORMAT_L8:
- return NV10TCL_TX_FORMAT_FORMAT_L8;
+ return NV10_3D_TEX_FORMAT_FORMAT_L8;
case MESA_FORMAT_CI8:
- return NV10TCL_TX_FORMAT_FORMAT_INDEX8;
+ return NV10_3D_TEX_FORMAT_FORMAT_INDEX8;
default:
assert(0);
@@ -131,19 +127,19 @@ get_tex_format_rect(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
case MESA_FORMAT_ARGB1555:
- return NV10TCL_TX_FORMAT_FORMAT_A1R5G5B5_RECT;
+ return NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT;
case MESA_FORMAT_RGB565:
- return NV10TCL_TX_FORMAT_FORMAT_R5G6B5_RECT;
+ return NV10_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
case MESA_FORMAT_ARGB8888:
case MESA_FORMAT_XRGB8888:
- return NV10TCL_TX_FORMAT_FORMAT_A8R8G8B8_RECT;
+ return NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT;
case MESA_FORMAT_A8:
case MESA_FORMAT_L8:
case MESA_FORMAT_I8:
- return NV10TCL_TX_FORMAT_FORMAT_A8_RECT;
+ return NV10_3D_TEX_FORMAT_FORMAT_I8_RECT;
default:
assert(0);
@@ -164,7 +160,7 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit)
uint32_t tx_format, tx_filter, tx_enable;
if (!ctx->Texture.Unit[i]._ReallyEnabled) {
- BEGIN_RING(chan, celsius, NV10TCL_TX_ENABLE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_ENABLE(i), 1);
OUT_RING(chan, 0);
return;
}
@@ -186,13 +182,13 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit)
tx_filter = nvgl_filter_mode(t->MagFilter) << 28
| nvgl_filter_mode(t->MinFilter) << 24;
- tx_enable = NV10TCL_TX_ENABLE_ENABLE
+ tx_enable = NV10_3D_TEX_ENABLE_ENABLE
| log2i(t->MaxAnisotropy) << 4;
if (t->Target == GL_TEXTURE_RECTANGLE) {
- BEGIN_RING(chan, celsius, NV10TCL_TX_NPOT_PITCH(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_NPOT_PITCH(i), 1);
OUT_RING(chan, s->pitch << 16);
- BEGIN_RING(chan, celsius, NV10TCL_TX_NPOT_SIZE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_NPOT_SIZE(i), 1);
OUT_RING(chan, align(s->width, 2) << 16 | s->height);
tx_format |= get_tex_format_rect(ti);
@@ -211,26 +207,26 @@ nv10_emit_tex_obj(struct gl_context *ctx, int emit)
lod_min = CLAMP(lod_min, 0, 15);
lod_bias = CLAMP(lod_bias, 0, 15);
- tx_format |= NV10TCL_TX_FORMAT_MIPMAP;
+ tx_format |= NV10_3D_TEX_FORMAT_MIPMAP;
tx_filter |= lod_bias << 8;
tx_enable |= lod_min << 26
| lod_max << 14;
}
/* Write it to the hardware. */
- nouveau_bo_mark(bctx, celsius, NV10TCL_TX_FORMAT(i),
+ nouveau_bo_mark(bctx, celsius, NV10_3D_TEX_FORMAT(i),
s->bo, tx_format, 0,
- NV10TCL_TX_FORMAT_DMA0,
- NV10TCL_TX_FORMAT_DMA1,
+ NV10_3D_TEX_FORMAT_DMA0,
+ NV10_3D_TEX_FORMAT_DMA1,
bo_flags | NOUVEAU_BO_OR);
- nouveau_bo_markl(bctx, celsius, NV10TCL_TX_OFFSET(i),
+ nouveau_bo_markl(bctx, celsius, NV10_3D_TEX_OFFSET(i),
s->bo, s->offset, bo_flags);
- BEGIN_RING(chan, celsius, NV10TCL_TX_FILTER(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_FILTER(i), 1);
OUT_RING(chan, tx_filter);
- BEGIN_RING(chan, celsius, NV10TCL_TX_ENABLE(i), 1);
+ BEGIN_RING(chan, celsius, NV10_3D_TEX_ENABLE(i), 1);
OUT_RING(chan, tx_enable);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
index 175abfca5c..e8bd12e6e0 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_tnl.c
@@ -28,7 +28,7 @@
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv10_3d.xml.h"
#include "nv10_driver.h"
void
@@ -42,13 +42,13 @@ get_material_bitmask(unsigned m)
unsigned ret = 0;
if (m & MAT_BIT_FRONT_EMISSION)
- ret |= NV10TCL_COLOR_MATERIAL_EMISSION;
+ ret |= NV10_3D_COLOR_MATERIAL_EMISSION;
if (m & MAT_BIT_FRONT_AMBIENT)
- ret |= NV10TCL_COLOR_MATERIAL_AMBIENT;
+ ret |= NV10_3D_COLOR_MATERIAL_AMBIENT;
if (m & MAT_BIT_FRONT_DIFFUSE)
- ret |= NV10TCL_COLOR_MATERIAL_DIFFUSE;
+ ret |= NV10_3D_COLOR_MATERIAL_DIFFUSE;
if (m & MAT_BIT_FRONT_SPECULAR)
- ret |= NV10TCL_COLOR_MATERIAL_SPECULAR;
+ ret |= NV10_3D_COLOR_MATERIAL_SPECULAR;
return ret;
}
@@ -60,7 +60,7 @@ nv10_emit_color_material(struct gl_context *ctx, int emit)
struct nouveau_grobj *celsius = context_eng3d(ctx);
unsigned mask = get_material_bitmask(ctx->Light.ColorMaterialBitmask);
- BEGIN_RING(chan, celsius, NV10TCL_COLOR_MATERIAL, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_COLOR_MATERIAL, 1);
OUT_RING(chan, ctx->Light.ColorMaterialEnabled ? mask : 0);
}
@@ -69,11 +69,11 @@ get_fog_mode(unsigned mode)
{
switch (mode) {
case GL_LINEAR:
- return NV10TCL_FOG_MODE_LINEAR;
+ return NV10_3D_FOG_MODE_LINEAR;
case GL_EXP:
- return NV10TCL_FOG_MODE_EXP;
+ return NV10_3D_FOG_MODE_EXP;
case GL_EXP2:
- return NV10TCL_FOG_MODE_EXP2;
+ return NV10_3D_FOG_MODE_EXP2;
default:
assert(0);
}
@@ -84,9 +84,9 @@ get_fog_source(unsigned source)
{
switch (source) {
case GL_FOG_COORDINATE_EXT:
- return NV10TCL_FOG_COORD_FOG;
+ return NV10_3D_FOG_COORD_FOG;
case GL_FRAGMENT_DEPTH_EXT:
- return NV10TCL_FOG_COORD_DIST_ORTHOGONAL_ABS;
+ return NV10_3D_FOG_COORD_DIST_ORTHOGONAL_ABS;
default:
assert(0);
}
@@ -133,13 +133,13 @@ nv10_emit_fog(struct gl_context *ctx, int emit)
nv10_get_fog_coeff(ctx, k);
- BEGIN_RING(chan, celsius, NV10TCL_FOG_MODE, 4);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_MODE, 4);
OUT_RING(chan, get_fog_mode(f->Mode));
OUT_RING(chan, get_fog_source(source));
- OUT_RING(chan, f->Enabled ? 1 : 0);
+ OUT_RINGb(chan, f->Enabled);
OUT_RING(chan, pack_rgba_f(MESA_FORMAT_RGBA8888_REV, f->Color));
- BEGIN_RING(chan, celsius, NV10TCL_FOG_EQUATION_CONSTANT, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_FOG_COEFF(0), 3);
OUT_RINGp(chan, k, 3);
context_dirty(ctx, FRAG);
@@ -150,13 +150,13 @@ get_light_mode(struct gl_light *l)
{
if (l->Enabled) {
if (l->_Flags & LIGHT_SPOT)
- return NV10TCL_ENABLED_LIGHTS_0_DIRECTIONAL;
+ return NV10_3D_ENABLED_LIGHTS_0_DIRECTIONAL;
else if (l->_Flags & LIGHT_POSITIONAL)
- return NV10TCL_ENABLED_LIGHTS_0_POSITIONAL;
+ return NV10_3D_ENABLED_LIGHTS_0_POSITIONAL;
else
- return NV10TCL_ENABLED_LIGHTS_0_NONPOSITIONAL;
+ return NV10_3D_ENABLED_LIGHTS_0_NONPOSITIONAL;
} else {
- return NV10TCL_ENABLED_LIGHTS_0_DISABLED;
+ return NV10_3D_ENABLED_LIGHTS_0_DISABLED;
}
}
@@ -170,7 +170,7 @@ nv10_emit_light_enable(struct gl_context *ctx, int emit)
int i;
if (nctx->fallback != HWTNL) {
- BEGIN_RING(chan, celsius, NV10TCL_LIGHTING_ENABLE, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHTING_ENABLE, 1);
OUT_RING(chan, 0);
return;
}
@@ -178,12 +178,12 @@ nv10_emit_light_enable(struct gl_context *ctx, int emit)
for (i = 0; i < MAX_LIGHTS; i++)
en_lights |= get_light_mode(&ctx->Light.Light[i]) << 2 * i;
- BEGIN_RING(chan, celsius, NV10TCL_ENABLED_LIGHTS, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_ENABLED_LIGHTS, 1);
OUT_RING(chan, en_lights);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHTING_ENABLE, 1);
- OUT_RING(chan, ctx->Light.Enabled ? 1 : 0);
- BEGIN_RING(chan, celsius, NV10TCL_NORMALIZE_ENABLE, 1);
- OUT_RING(chan, ctx->Transform.Normalize ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHTING_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Light.Enabled);
+ BEGIN_RING(chan, celsius, NV10_3D_NORMALIZE_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Transform.Normalize);
}
void
@@ -193,16 +193,16 @@ nv10_emit_light_model(struct gl_context *ctx, int emit)
struct nouveau_grobj *celsius = context_eng3d(ctx);
struct gl_lightmodel *m = &ctx->Light.Model;
- BEGIN_RING(chan, celsius, NV10TCL_SEPARATE_SPECULAR_ENABLE, 1);
- OUT_RING(chan, m->ColorControl == GL_SEPARATE_SPECULAR_COLOR ? 1 : 0);
+ BEGIN_RING(chan, celsius, NV10_3D_SEPARATE_SPECULAR_ENABLE, 1);
+ OUT_RINGb(chan, m->ColorControl == GL_SEPARATE_SPECULAR_COLOR);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_MODEL, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_MODEL, 1);
OUT_RING(chan, ((m->LocalViewer ?
- NV10TCL_LIGHT_MODEL_LOCAL_VIEWER : 0) |
+ NV10_3D_LIGHT_MODEL_LOCAL_VIEWER : 0) |
(NEED_SECONDARY_COLOR(ctx) ?
- NV10TCL_LIGHT_MODEL_SEPARATE_SPECULAR : 0) |
+ NV10_3D_LIGHT_MODEL_SEPARATE_SPECULAR : 0) |
(!ctx->Light.Enabled && ctx->Fog.ColorSumEnabled ?
- NV10TCL_LIGHT_MODEL_VERTEX_SPECULAR : 0)));
+ NV10_3D_LIGHT_MODEL_VERTEX_SPECULAR : 0)));
}
static float
@@ -281,20 +281,20 @@ nv10_emit_light_source(struct gl_context *ctx, int emit)
struct gl_light *l = &ctx->Light.Light[i];
if (l->_Flags & LIGHT_POSITIONAL) {
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_POSITION_X(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_POSITION_X(i), 3);
OUT_RINGp(chan, l->_Position, 3);
BEGIN_RING(chan, celsius,
- NV10TCL_LIGHT_ATTENUATION_CONSTANT(i), 3);
+ NV10_3D_LIGHT_ATTENUATION_CONSTANT(i), 3);
OUT_RINGf(chan, l->ConstantAttenuation);
OUT_RINGf(chan, l->LinearAttenuation);
OUT_RINGf(chan, l->QuadraticAttenuation);
} else {
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_DIRECTION_X(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_DIRECTION_X(i), 3);
OUT_RINGp(chan, l->_VP_inf_norm, 3);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_HALF_VECTOR_X(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_HALF_VECTOR_X(i), 3);
OUT_RINGp(chan, l->_h_inf_norm, 3);
}
@@ -303,7 +303,7 @@ nv10_emit_light_source(struct gl_context *ctx, int emit)
nv10_get_spot_coeff(l, k);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_SPOT_CUTOFF_A(i), 7);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_SPOT_CUTOFF(i, 0), 7);
OUT_RINGp(chan, k, 7);
}
}
@@ -335,11 +335,11 @@ nv10_emit_material_ambient(struct gl_context *ctx, int emit)
ZERO_3V(c_factor);
}
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_MODEL_AMBIENT_R, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_MODEL_AMBIENT_R, 3);
OUT_RINGp(chan, c_scene, 3);
if (ctx->Light.ColorMaterialEnabled) {
- BEGIN_RING(chan, celsius, NV10TCL_MATERIAL_FACTOR_R, 3);
+ BEGIN_RING(chan, celsius, NV10_3D_MATERIAL_FACTOR_R, 3);
OUT_RINGp(chan, c_factor, 3);
}
@@ -349,7 +349,7 @@ nv10_emit_material_ambient(struct gl_context *ctx, int emit)
l->Ambient :
l->_MatAmbient[0]);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_AMBIENT_R(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_AMBIENT_R(i), 3);
OUT_RINGp(chan, c_light, 3);
}
}
@@ -362,7 +362,7 @@ nv10_emit_material_diffuse(struct gl_context *ctx, int emit)
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
struct gl_light *l;
- BEGIN_RING(chan, celsius, NV10TCL_MATERIAL_FACTOR_A, 1);
+ BEGIN_RING(chan, celsius, NV10_3D_MATERIAL_FACTOR_A, 1);
OUT_RINGf(chan, mat[MAT_ATTRIB_FRONT_DIFFUSE][3]);
foreach(l, &ctx->Light.EnabledList) {
@@ -371,7 +371,7 @@ nv10_emit_material_diffuse(struct gl_context *ctx, int emit)
l->Diffuse :
l->_MatDiffuse[0]);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_DIFFUSE_R(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_DIFFUSE_R(i), 3);
OUT_RINGp(chan, c_light, 3);
}
}
@@ -389,7 +389,7 @@ nv10_emit_material_specular(struct gl_context *ctx, int emit)
l->Specular :
l->_MatSpecular[0]);
- BEGIN_RING(chan, celsius, NV10TCL_LIGHT_SPECULAR_R(i), 3);
+ BEGIN_RING(chan, celsius, NV10_3D_LIGHT_SPECULAR_R(i), 3);
OUT_RINGp(chan, c_light, 3);
}
}
@@ -430,7 +430,7 @@ nv10_emit_material_shininess(struct gl_context *ctx, int emit)
CLAMP(mat[MAT_ATTRIB_FRONT_SHININESS][0], 0, 1024),
k);
- BEGIN_RING(chan, celsius, NV10TCL_MATERIAL_SHININESS(0), 6);
+ BEGIN_RING(chan, celsius, NV10_3D_MATERIAL_SHININESS(0), 6);
OUT_RINGp(chan, k, 6);
}
@@ -447,7 +447,7 @@ nv10_emit_modelview(struct gl_context *ctx, int emit)
if (ctx->Light._NeedEyeCoords || ctx->Fog.Enabled ||
(ctx->Texture._GenFlags & TEXGEN_NEED_EYE_COORD)) {
- BEGIN_RING(chan, celsius, NV10TCL_MODELVIEW0_MATRIX(0), 16);
+ BEGIN_RING(chan, celsius, NV10_3D_MODELVIEW_MATRIX(0, 0), 16);
OUT_RINGm(chan, m->m);
}
@@ -456,7 +456,7 @@ nv10_emit_modelview(struct gl_context *ctx, int emit)
int i, j;
BEGIN_RING(chan, celsius,
- NV10TCL_INVERSE_MODELVIEW0_MATRIX(0), 12);
+ NV10_3D_INVERSE_MODELVIEW_MATRIX(0, 0), 12);
for (i = 0; i < 3; i++)
for (j = 0; j < 4; j++)
OUT_RINGf(chan, m->inv[4*i + j]);
@@ -485,7 +485,7 @@ nv10_emit_projection(struct gl_context *ctx, int emit)
if (nctx->fallback == HWTNL)
_math_matrix_mul_matrix(&m, &m, &ctx->_ModelProjectMatrix);
- BEGIN_RING(chan, celsius, NV10TCL_PROJECTION_MATRIX(0), 16);
+ BEGIN_RING(chan, celsius, NV10_3D_PROJECTION_MATRIX(0), 16);
OUT_RINGm(chan, m.m);
_math_matrix_dtr(&m);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_3d.xml.h b/src/mesa/drivers/dri/nouveau/nv20_3d.xml.h
new file mode 100644
index 0000000000..c8ed861961
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nv20_3d.xml.h
@@ -0,0 +1,2076 @@
+#ifndef NV20_3D_XML
+#define NV20_3D_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv20_3d.xml ( 21073 bytes, from 2010-11-15 02:24:38)
+- copyright.xml ( 6452 bytes, from 2010-11-15 15:10:58)
+- nv10_3d.xml ( 18449 bytes, from 2010-11-15 02:24:38)
+- nv_defs.xml ( 4437 bytes, from 2010-11-01 00:28:46)
+- nv_3ddefs.xml ( 16394 bytes, from 2010-11-01 00:28:46)
+- nv_object.xml ( 11547 bytes, from 2010-11-13 23:32:57)
+- nvchipsets.xml ( 3074 bytes, from 2010-11-13 23:32:57)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+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.
+*/
+
+
+#define NV20_VERTEX_ATTR_POS 0x00000000
+#define NV20_VERTEX_ATTR_NORMAL 0x00000002
+#define NV20_VERTEX_ATTR_COLOR0 0x00000003
+#define NV20_VERTEX_ATTR_COLOR1 0x00000004
+#define NV20_VERTEX_ATTR_FOG 0x00000005
+#define NV20_VERTEX_ATTR_TEX0 0x00000009
+#define NV20_VERTEX_ATTR_TEX1 0x0000000a
+#define NV20_VERTEX_ATTR_TEX2 0x0000000b
+#define NV20_VERTEX_ATTR_TEX3 0x0000000c
+
+
+
+#define NV20_3D_FLIP_SET_READ 0x00000120
+
+#define NV20_3D_FLIP_SET_WRITE 0x00000124
+
+#define NV20_3D_FLIP_MAX 0x00000128
+
+#define NV20_3D_FLIP_INCR_WRITE 0x0000012c
+
+#define NV20_3D_FLIP_WAIT 0x00000130
+
+#define NV20_3D_DMA_NOTIFY 0x00000180
+
+#define NV20_3D_DMA_TEXTURE0 0x00000184
+
+#define NV20_3D_DMA_TEXTURE1 0x00000188
+
+#define NV20_3D_DMA_COLOR 0x00000194
+
+#define NV20_3D_DMA_ZETA 0x00000198
+
+#define NV20_3D_RT_HORIZ 0x00000200
+#define NV20_3D_RT_HORIZ_X__MASK 0x0000ffff
+#define NV20_3D_RT_HORIZ_X__SHIFT 0
+#define NV20_3D_RT_HORIZ_W__MASK 0xffff0000
+#define NV20_3D_RT_HORIZ_W__SHIFT 16
+
+#define NV20_3D_RT_VERT 0x00000204
+#define NV20_3D_RT_VERT_Y__MASK 0x0000ffff
+#define NV20_3D_RT_VERT_Y__SHIFT 0
+#define NV20_3D_RT_VERT_H__MASK 0xffff0000
+#define NV20_3D_RT_VERT_H__SHIFT 16
+
+#define NV20_3D_RT_FORMAT 0x00000208
+#define NV20_3D_RT_FORMAT_TYPE__MASK 0x00000f00
+#define NV20_3D_RT_FORMAT_TYPE__SHIFT 8
+#define NV20_3D_RT_FORMAT_TYPE_LINEAR 0x00000100
+#define NV20_3D_RT_FORMAT_TYPE_SWIZZLED 0x00000200
+#define NV20_3D_RT_FORMAT_DEPTH__MASK 0x00000030
+#define NV20_3D_RT_FORMAT_DEPTH__SHIFT 4
+#define NV20_3D_RT_FORMAT_DEPTH_Z16 0x00000010
+#define NV20_3D_RT_FORMAT_DEPTH_Z24S8 0x00000020
+#define NV20_3D_RT_FORMAT_COLOR__MASK 0x0000000f
+#define NV20_3D_RT_FORMAT_COLOR__SHIFT 0
+#define NV20_3D_RT_FORMAT_COLOR_R5G6B5 0x00000003
+#define NV20_3D_RT_FORMAT_COLOR_X8R8G8B8 0x00000005
+#define NV20_3D_RT_FORMAT_COLOR_A8R8G8B8 0x00000008
+#define NV20_3D_RT_FORMAT_COLOR_B8 0x00000009
+
+#define NV20_3D_RT_PITCH 0x0000020c
+#define NV20_3D_RT_PITCH_COLOR_PITCH__MASK 0x0000ffff
+#define NV20_3D_RT_PITCH_COLOR_PITCH__SHIFT 0
+#define NV20_3D_RT_PITCH_ZETA_PITCH__MASK 0xffff0000
+#define NV20_3D_RT_PITCH_ZETA_PITCH__SHIFT 16
+
+#define NV20_3D_COLOR_OFFSET 0x00000210
+
+#define NV20_3D_ZETA_OFFSET 0x00000214
+
+#define NV20_3D_UNK0290 0x00000290
+
+#define NV20_3D_VIEWPORT_CLIP_MODE 0x000002b4
+
+#define NV20_3D_VIEWPORT_CLIP_HORIZ(i0) (0x000002c0 + 0x4*(i0))
+#define NV20_3D_VIEWPORT_CLIP_HORIZ__ESIZE 0x00000004
+#define NV20_3D_VIEWPORT_CLIP_HORIZ__LEN 0x00000008
+#define NV20_3D_VIEWPORT_CLIP_HORIZ_CLIP_L__MASK 0x000007ff
+#define NV20_3D_VIEWPORT_CLIP_HORIZ_CLIP_L__SHIFT 0
+#define NV20_3D_VIEWPORT_CLIP_HORIZ_CLIP_R__MASK 0x07ff0000
+#define NV20_3D_VIEWPORT_CLIP_HORIZ_CLIP_R__SHIFT 16
+
+#define NV20_3D_VIEWPORT_CLIP_VERT(i0) (0x000002e0 + 0x4*(i0))
+#define NV20_3D_VIEWPORT_CLIP_VERT__ESIZE 0x00000004
+#define NV20_3D_VIEWPORT_CLIP_VERT__LEN 0x00000008
+#define NV20_3D_VIEWPORT_CLIP_VERT_CLIP_T__MASK 0x000007ff
+#define NV20_3D_VIEWPORT_CLIP_VERT_CLIP_T__SHIFT 0
+#define NV20_3D_VIEWPORT_CLIP_VERT_CLIP_B__MASK 0x07ff0000
+#define NV20_3D_VIEWPORT_CLIP_VERT_CLIP_B__SHIFT 16
+
+#define NV20_3D_ALPHA_FUNC_ENABLE 0x00000300
+
+#define NV20_3D_BLEND_FUNC_ENABLE 0x00000304
+
+#define NV20_3D_CULL_FACE_ENABLE 0x00000308
+
+#define NV20_3D_DEPTH_TEST_ENABLE 0x0000030c
+
+#define NV20_3D_DITHER_ENABLE 0x00000310
+
+#define NV20_3D_LIGHTING_ENABLE 0x00000314
+
+#define NV20_3D_POINT_PARAMETERS_ENABLE 0x00000318
+
+#define NV20_3D_POINT_SMOOTH_ENABLE 0x0000031c
+
+#define NV20_3D_LINE_SMOOTH_ENABLE 0x00000320
+
+#define NV20_3D_POLYGON_SMOOTH_ENABLE 0x00000324
+
+#define NV20_3D_STENCIL_ENABLE 0x0000032c
+
+#define NV20_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330
+
+#define NV20_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334
+
+#define NV20_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338
+
+#define NV20_3D_ALPHA_FUNC_FUNC 0x0000033c
+#define NV20_3D_ALPHA_FUNC_FUNC_NEVER 0x00000200
+#define NV20_3D_ALPHA_FUNC_FUNC_LESS 0x00000201
+#define NV20_3D_ALPHA_FUNC_FUNC_EQUAL 0x00000202
+#define NV20_3D_ALPHA_FUNC_FUNC_LEQUAL 0x00000203
+#define NV20_3D_ALPHA_FUNC_FUNC_GREATER 0x00000204
+#define NV20_3D_ALPHA_FUNC_FUNC_NOTEQUAL 0x00000205
+#define NV20_3D_ALPHA_FUNC_FUNC_GEQUAL 0x00000206
+#define NV20_3D_ALPHA_FUNC_FUNC_ALWAYS 0x00000207
+
+#define NV20_3D_ALPHA_FUNC_REF 0x00000340
+
+#define NV20_3D_BLEND_FUNC_SRC 0x00000344
+#define NV20_3D_BLEND_FUNC_SRC_ZERO 0x00000000
+#define NV20_3D_BLEND_FUNC_SRC_ONE 0x00000001
+#define NV20_3D_BLEND_FUNC_SRC_SRC_COLOR 0x00000300
+#define NV20_3D_BLEND_FUNC_SRC_ONE_MINUS_SRC_COLOR 0x00000301
+#define NV20_3D_BLEND_FUNC_SRC_SRC_ALPHA 0x00000302
+#define NV20_3D_BLEND_FUNC_SRC_ONE_MINUS_SRC_ALPHA 0x00000303
+#define NV20_3D_BLEND_FUNC_SRC_DST_ALPHA 0x00000304
+#define NV20_3D_BLEND_FUNC_SRC_ONE_MINUS_DST_ALPHA 0x00000305
+#define NV20_3D_BLEND_FUNC_SRC_DST_COLOR 0x00000306
+#define NV20_3D_BLEND_FUNC_SRC_ONE_MINUS_DST_COLOR 0x00000307
+#define NV20_3D_BLEND_FUNC_SRC_SRC_ALPHA_SATURATE 0x00000308
+#define NV20_3D_BLEND_FUNC_SRC_CONSTANT_COLOR 0x00008001
+#define NV20_3D_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_COLOR 0x00008002
+#define NV20_3D_BLEND_FUNC_SRC_CONSTANT_ALPHA 0x00008003
+#define NV20_3D_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_ALPHA 0x00008004
+
+#define NV20_3D_BLEND_FUNC_DST 0x00000348
+#define NV20_3D_BLEND_FUNC_DST_ZERO 0x00000000
+#define NV20_3D_BLEND_FUNC_DST_ONE 0x00000001
+#define NV20_3D_BLEND_FUNC_DST_SRC_COLOR 0x00000300
+#define NV20_3D_BLEND_FUNC_DST_ONE_MINUS_SRC_COLOR 0x00000301
+#define NV20_3D_BLEND_FUNC_DST_SRC_ALPHA 0x00000302
+#define NV20_3D_BLEND_FUNC_DST_ONE_MINUS_SRC_ALPHA 0x00000303
+#define NV20_3D_BLEND_FUNC_DST_DST_ALPHA 0x00000304
+#define NV20_3D_BLEND_FUNC_DST_ONE_MINUS_DST_ALPHA 0x00000305
+#define NV20_3D_BLEND_FUNC_DST_DST_COLOR 0x00000306
+#define NV20_3D_BLEND_FUNC_DST_ONE_MINUS_DST_COLOR 0x00000307
+#define NV20_3D_BLEND_FUNC_DST_SRC_ALPHA_SATURATE 0x00000308
+#define NV20_3D_BLEND_FUNC_DST_CONSTANT_COLOR 0x00008001
+#define NV20_3D_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_COLOR 0x00008002
+#define NV20_3D_BLEND_FUNC_DST_CONSTANT_ALPHA 0x00008003
+#define NV20_3D_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_ALPHA 0x00008004
+
+#define NV20_3D_BLEND_COLOR 0x0000034c
+#define NV20_3D_BLEND_COLOR_B__MASK 0x000000ff
+#define NV20_3D_BLEND_COLOR_B__SHIFT 0
+#define NV20_3D_BLEND_COLOR_G__MASK 0x0000ff00
+#define NV20_3D_BLEND_COLOR_G__SHIFT 8
+#define NV20_3D_BLEND_COLOR_R__MASK 0x00ff0000
+#define NV20_3D_BLEND_COLOR_R__SHIFT 16
+#define NV20_3D_BLEND_COLOR_A__MASK 0xff000000
+#define NV20_3D_BLEND_COLOR_A__SHIFT 24
+
+#define NV20_3D_BLEND_EQUATION 0x00000350
+#define NV20_3D_BLEND_EQUATION_FUNC_ADD 0x00008006
+#define NV20_3D_BLEND_EQUATION_MIN 0x00008007
+#define NV20_3D_BLEND_EQUATION_MAX 0x00008008
+#define NV20_3D_BLEND_EQUATION_FUNC_SUBTRACT 0x0000800a
+#define NV20_3D_BLEND_EQUATION_FUNC_REVERSE_SUBTRACT 0x0000800b
+
+#define NV20_3D_DEPTH_FUNC 0x00000354
+#define NV20_3D_DEPTH_FUNC_NEVER 0x00000200
+#define NV20_3D_DEPTH_FUNC_LESS 0x00000201
+#define NV20_3D_DEPTH_FUNC_EQUAL 0x00000202
+#define NV20_3D_DEPTH_FUNC_LEQUAL 0x00000203
+#define NV20_3D_DEPTH_FUNC_GREATER 0x00000204
+#define NV20_3D_DEPTH_FUNC_NOTEQUAL 0x00000205
+#define NV20_3D_DEPTH_FUNC_GEQUAL 0x00000206
+#define NV20_3D_DEPTH_FUNC_ALWAYS 0x00000207
+
+#define NV20_3D_COLOR_MASK 0x00000358
+#define NV20_3D_COLOR_MASK_B 0x00000001
+#define NV20_3D_COLOR_MASK_G 0x00000100
+#define NV20_3D_COLOR_MASK_R 0x00010000
+#define NV20_3D_COLOR_MASK_A 0x01000000
+
+#define NV20_3D_DEPTH_WRITE_ENABLE 0x0000035c
+
+#define NV20_3D_STENCIL_MASK 0x00000360
+
+#define NV20_3D_STENCIL_FUNC_FUNC 0x00000364
+#define NV20_3D_STENCIL_FUNC_FUNC_NEVER 0x00000200
+#define NV20_3D_STENCIL_FUNC_FUNC_LESS 0x00000201
+#define NV20_3D_STENCIL_FUNC_FUNC_EQUAL 0x00000202
+#define NV20_3D_STENCIL_FUNC_FUNC_LEQUAL 0x00000203
+#define NV20_3D_STENCIL_FUNC_FUNC_GREATER 0x00000204
+#define NV20_3D_STENCIL_FUNC_FUNC_NOTEQUAL 0x00000205
+#define NV20_3D_STENCIL_FUNC_FUNC_GEQUAL 0x00000206
+#define NV20_3D_STENCIL_FUNC_FUNC_ALWAYS 0x00000207
+
+#define NV20_3D_STENCIL_FUNC_REF 0x00000368
+
+#define NV20_3D_STENCIL_FUNC_MASK 0x0000036c
+
+#define NV20_3D_STENCIL_OP_FAIL 0x00000370
+#define NV20_3D_STENCIL_OP_FAIL_ZERO 0x00000000
+#define NV20_3D_STENCIL_OP_FAIL_INVERT 0x0000150a
+#define NV20_3D_STENCIL_OP_FAIL_KEEP 0x00001e00
+#define NV20_3D_STENCIL_OP_FAIL_REPLACE 0x00001e01
+#define NV20_3D_STENCIL_OP_FAIL_INCR 0x00001e02
+#define NV20_3D_STENCIL_OP_FAIL_DECR 0x00001e03
+#define NV20_3D_STENCIL_OP_FAIL_INCR_WRAP 0x00008507
+#define NV20_3D_STENCIL_OP_FAIL_DECR_WRAP 0x00008508
+
+#define NV20_3D_STENCIL_OP_ZFAIL 0x00000374
+#define NV20_3D_STENCIL_OP_ZFAIL_ZERO 0x00000000
+#define NV20_3D_STENCIL_OP_ZFAIL_INVERT 0x0000150a
+#define NV20_3D_STENCIL_OP_ZFAIL_KEEP 0x00001e00
+#define NV20_3D_STENCIL_OP_ZFAIL_REPLACE 0x00001e01
+#define NV20_3D_STENCIL_OP_ZFAIL_INCR 0x00001e02
+#define NV20_3D_STENCIL_OP_ZFAIL_DECR 0x00001e03
+#define NV20_3D_STENCIL_OP_ZFAIL_INCR_WRAP 0x00008507
+#define NV20_3D_STENCIL_OP_ZFAIL_DECR_WRAP 0x00008508
+
+#define NV20_3D_STENCIL_OP_ZPASS 0x00000378
+#define NV20_3D_STENCIL_OP_ZPASS_ZERO 0x00000000
+#define NV20_3D_STENCIL_OP_ZPASS_INVERT 0x0000150a
+#define NV20_3D_STENCIL_OP_ZPASS_KEEP 0x00001e00
+#define NV20_3D_STENCIL_OP_ZPASS_REPLACE 0x00001e01
+#define NV20_3D_STENCIL_OP_ZPASS_INCR 0x00001e02
+#define NV20_3D_STENCIL_OP_ZPASS_DECR 0x00001e03
+#define NV20_3D_STENCIL_OP_ZPASS_INCR_WRAP 0x00008507
+#define NV20_3D_STENCIL_OP_ZPASS_DECR_WRAP 0x00008508
+
+#define NV20_3D_SHADE_MODEL 0x0000037c
+#define NV20_3D_SHADE_MODEL_FLAT 0x00001d00
+#define NV20_3D_SHADE_MODEL_SMOOTH 0x00001d01
+
+#define NV20_3D_LINE_WIDTH 0x00000380
+
+#define NV20_3D_POLYGON_OFFSET_FACTOR 0x00000384
+
+#define NV20_3D_POLYGON_OFFSET_UNITS 0x00000388
+
+#define NV20_3D_POLYGON_MODE_FRONT 0x0000038c
+#define NV20_3D_POLYGON_MODE_FRONT_POINT 0x00001b00
+#define NV20_3D_POLYGON_MODE_FRONT_LINE 0x00001b01
+#define NV20_3D_POLYGON_MODE_FRONT_FILL 0x00001b02
+
+#define NV20_3D_POLYGON_MODE_BACK 0x00000390
+#define NV20_3D_POLYGON_MODE_BACK_POINT 0x00001b00
+#define NV20_3D_POLYGON_MODE_BACK_LINE 0x00001b01
+#define NV20_3D_POLYGON_MODE_BACK_FILL 0x00001b02
+
+#define NV20_3D_DEPTH_RANGE_NEAR 0x00000394
+
+#define NV20_3D_DEPTH_RANGE_FAR 0x00000398
+
+#define NV20_3D_CULL_FACE 0x0000039c
+#define NV20_3D_CULL_FACE_FRONT 0x00000404
+#define NV20_3D_CULL_FACE_BACK 0x00000405
+#define NV20_3D_CULL_FACE_FRONT_AND_BACK 0x00000408
+
+#define NV20_3D_FRONT_FACE 0x000003a0
+#define NV20_3D_FRONT_FACE_CW 0x00000900
+#define NV20_3D_FRONT_FACE_CCW 0x00000901
+
+#define NV20_3D_DMA_FENCE 0x000001a4
+
+#define NV20_3D_DMA_QUERY 0x000001a8
+
+
+#define NV20_3D_VERTEX_POS_3F 0x00001500
+
+
+#define NV20_3D_VERTEX_POS_3F_X 0x00001500
+
+#define NV20_3D_VERTEX_POS_3F_Y 0x00001504
+
+#define NV20_3D_VERTEX_POS_3F_Z 0x00001508
+
+#define NV20_3D_VERTEX_POS_4F 0x00001518
+
+
+#define NV20_3D_VERTEX_POS_4F_X 0x00001518
+
+#define NV20_3D_VERTEX_POS_4F_Y 0x0000151c
+
+#define NV20_3D_VERTEX_POS_4F_Z 0x00001520
+
+#define NV20_3D_VERTEX_POS_4F_W 0x00001524
+
+#define NV20_3D_VERTEX_POS_3I 0x00001528
+
+
+#define NV20_3D_VERTEX_POS_3I_XY 0x00001528
+#define NV20_3D_VERTEX_POS_3I_XY_X__MASK 0x0000ffff
+#define NV20_3D_VERTEX_POS_3I_XY_X__SHIFT 0
+#define NV20_3D_VERTEX_POS_3I_XY_Y__MASK 0xffff0000
+#define NV20_3D_VERTEX_POS_3I_XY_Y__SHIFT 16
+
+#define NV20_3D_VERTEX_POS_3I_Z 0x0000152c
+#define NV20_3D_VERTEX_POS_3I_Z_Z__MASK 0x0000ffff
+#define NV20_3D_VERTEX_POS_3I_Z_Z__SHIFT 0
+
+#define NV20_3D_VERTEX_NOR_3F 0x00001530
+
+
+#define NV20_3D_VERTEX_NOR_3F_X 0x00001530
+
+#define NV20_3D_VERTEX_NOR_3F_Y 0x00001534
+
+#define NV20_3D_VERTEX_NOR_3F_Z 0x00001538
+
+#define NV20_3D_VERTEX_NOR_3I 0x00001540
+
+
+#define NV20_3D_VERTEX_NOR_3I_XY 0x00001540
+#define NV20_3D_VERTEX_NOR_3I_XY_X__MASK 0x0000ffff
+#define NV20_3D_VERTEX_NOR_3I_XY_X__SHIFT 0
+#define NV20_3D_VERTEX_NOR_3I_XY_Y__MASK 0xffff0000
+#define NV20_3D_VERTEX_NOR_3I_XY_Y__SHIFT 16
+
+#define NV20_3D_VERTEX_NOR_3I_Z 0x00001544
+#define NV20_3D_VERTEX_NOR_3I_Z_Z__MASK 0x0000ffff
+#define NV20_3D_VERTEX_NOR_3I_Z_Z__SHIFT 0
+
+#define NV20_3D_VERTEX_COL_4F 0x00001550
+
+
+#define NV20_3D_VERTEX_COL_4F_R 0x00001550
+
+#define NV20_3D_VERTEX_COL_4F_G 0x00001554
+
+#define NV20_3D_VERTEX_COL_4F_B 0x00001558
+
+#define NV20_3D_VERTEX_COL_4F_A 0x0000155c
+
+#define NV20_3D_VERTEX_COL_3F 0x00001560
+
+
+#define NV20_3D_VERTEX_COL_3F_R 0x00001560
+
+#define NV20_3D_VERTEX_COL_3F_G 0x00001564
+
+#define NV20_3D_VERTEX_COL_3F_B 0x00001568
+
+#define NV20_3D_VERTEX_COL_4I 0x0000156c
+#define NV20_3D_VERTEX_COL_4I_R__MASK 0x000000ff
+#define NV20_3D_VERTEX_COL_4I_R__SHIFT 0
+#define NV20_3D_VERTEX_COL_4I_G__MASK 0x0000ff00
+#define NV20_3D_VERTEX_COL_4I_G__SHIFT 8
+#define NV20_3D_VERTEX_COL_4I_B__MASK 0x00ff0000
+#define NV20_3D_VERTEX_COL_4I_B__SHIFT 16
+#define NV20_3D_VERTEX_COL_4I_A__MASK 0xff000000
+#define NV20_3D_VERTEX_COL_4I_A__SHIFT 24
+
+#define NV20_3D_VERTEX_COL2_3F 0x00001580
+
+
+#define NV20_3D_VERTEX_COL2_3F_R 0x00001580
+
+#define NV20_3D_VERTEX_COL2_3F_G 0x00001584
+
+#define NV20_3D_VERTEX_COL2_3F_B 0x00001588
+
+#define NV20_3D_VERTEX_COL2_3I 0x0000158c
+#define NV20_3D_VERTEX_COL2_3I_R__MASK 0x000000ff
+#define NV20_3D_VERTEX_COL2_3I_R__SHIFT 0
+#define NV20_3D_VERTEX_COL2_3I_G__MASK 0x0000ff00
+#define NV20_3D_VERTEX_COL2_3I_G__SHIFT 8
+#define NV20_3D_VERTEX_COL2_3I_B__MASK 0x00ff0000
+#define NV20_3D_VERTEX_COL2_3I_B__SHIFT 16
+
+#define NV20_3D_VERTEX_TX0_2F 0x00001590
+
+
+#define NV20_3D_VERTEX_TX0_2F_S 0x00001590
+
+#define NV20_3D_VERTEX_TX0_2F_T 0x00001594
+
+#define NV20_3D_VERTEX_TX0_2I 0x00001598
+#define NV20_3D_VERTEX_TX0_2I_S__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX0_2I_S__SHIFT 0
+#define NV20_3D_VERTEX_TX0_2I_T__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX0_2I_T__SHIFT 16
+
+#define NV20_3D_VERTEX_TX0_4F 0x000015a0
+
+
+#define NV20_3D_VERTEX_TX0_4F_S 0x000015a0
+
+#define NV20_3D_VERTEX_TX0_4F_T 0x000015a4
+
+#define NV20_3D_VERTEX_TX0_4F_R 0x000015a8
+
+#define NV20_3D_VERTEX_TX0_4F_Q 0x000015ac
+
+#define NV20_3D_VERTEX_TX0_4I 0x000015b0
+
+
+#define NV20_3D_VERTEX_TX0_4I_ST 0x000015b0
+#define NV20_3D_VERTEX_TX0_4I_ST_S__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX0_4I_ST_S__SHIFT 0
+#define NV20_3D_VERTEX_TX0_4I_ST_T__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX0_4I_ST_T__SHIFT 16
+
+#define NV20_3D_VERTEX_TX0_4I_RQ 0x000015b4
+#define NV20_3D_VERTEX_TX0_4I_RQ_R__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX0_4I_RQ_R__SHIFT 0
+#define NV20_3D_VERTEX_TX0_4I_RQ_Q__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX0_4I_RQ_Q__SHIFT 16
+
+#define NV20_3D_VERTEX_TX1_2F 0x000015b8
+
+
+#define NV20_3D_VERTEX_TX1_2F_S 0x000015b8
+
+#define NV20_3D_VERTEX_TX1_2F_T 0x000015bc
+
+#define NV20_3D_VERTEX_TX1_2I 0x000015c0
+#define NV20_3D_VERTEX_TX1_2I_S__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX1_2I_S__SHIFT 0
+#define NV20_3D_VERTEX_TX1_2I_T__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX1_2I_T__SHIFT 16
+
+#define NV20_3D_VERTEX_TX1_4F 0x000015c8
+
+
+#define NV20_3D_VERTEX_TX1_4F_S 0x000015c8
+
+#define NV20_3D_VERTEX_TX1_4F_T 0x000015cc
+
+#define NV20_3D_VERTEX_TX1_4F_R 0x000015d0
+
+#define NV20_3D_VERTEX_TX1_4F_Q 0x000015d4
+
+#define NV20_3D_VERTEX_TX1_4I 0x000015d8
+
+
+#define NV20_3D_VERTEX_TX1_4I_ST 0x000015d8
+#define NV20_3D_VERTEX_TX1_4I_ST_S__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX1_4I_ST_S__SHIFT 0
+#define NV20_3D_VERTEX_TX1_4I_ST_T__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX1_4I_ST_T__SHIFT 16
+
+#define NV20_3D_VERTEX_TX1_4I_RQ 0x000015dc
+#define NV20_3D_VERTEX_TX1_4I_RQ_R__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX1_4I_RQ_R__SHIFT 0
+#define NV20_3D_VERTEX_TX1_4I_RQ_Q__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX1_4I_RQ_Q__SHIFT 16
+
+#define NV20_3D_VERTEX_TX2_2F 0x000015e0
+
+
+#define NV20_3D_VERTEX_TX2_2F_S 0x000015e0
+
+#define NV20_3D_VERTEX_TX2_2F_T 0x000015e4
+
+#define NV20_3D_VERTEX_TX2_2I 0x000015e8
+#define NV20_3D_VERTEX_TX2_2I_S__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX2_2I_S__SHIFT 0
+#define NV20_3D_VERTEX_TX2_2I_T__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX2_2I_T__SHIFT 16
+
+#define NV20_3D_VERTEX_TX2_4F 0x000015f0
+
+
+#define NV20_3D_VERTEX_TX2_4F_S 0x000015f0
+
+#define NV20_3D_VERTEX_TX2_4F_T 0x000015f4
+
+#define NV20_3D_VERTEX_TX2_4F_R 0x000015f8
+
+#define NV20_3D_VERTEX_TX2_4F_Q 0x000015fc
+
+#define NV20_3D_VERTEX_TX2_4I 0x00001600
+
+
+#define NV20_3D_VERTEX_TX2_4I_ST 0x00001600
+#define NV20_3D_VERTEX_TX2_4I_ST_S__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX2_4I_ST_S__SHIFT 0
+#define NV20_3D_VERTEX_TX2_4I_ST_T__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX2_4I_ST_T__SHIFT 16
+
+#define NV20_3D_VERTEX_TX2_4I_RQ 0x00001604
+#define NV20_3D_VERTEX_TX2_4I_RQ_R__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX2_4I_RQ_R__SHIFT 0
+#define NV20_3D_VERTEX_TX2_4I_RQ_Q__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX2_4I_RQ_Q__SHIFT 16
+
+#define NV20_3D_VERTEX_TX3_2F 0x00001608
+
+
+#define NV20_3D_VERTEX_TX3_2F_S 0x00001608
+
+#define NV20_3D_VERTEX_TX3_2F_T 0x0000160c
+
+#define NV20_3D_VERTEX_TX3_2I 0x00001610
+#define NV20_3D_VERTEX_TX3_2I_S__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX3_2I_S__SHIFT 0
+#define NV20_3D_VERTEX_TX3_2I_T__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX3_2I_T__SHIFT 16
+
+#define NV20_3D_VERTEX_TX3_4F 0x00001620
+
+
+#define NV20_3D_VERTEX_TX3_4F_S 0x00001620
+
+#define NV20_3D_VERTEX_TX3_4F_T 0x00001624
+
+#define NV20_3D_VERTEX_TX3_4F_R 0x00001628
+
+#define NV20_3D_VERTEX_TX3_4F_Q 0x0000162c
+
+#define NV20_3D_VERTEX_TX3_4I 0x00001630
+
+
+#define NV20_3D_VERTEX_TX3_4I_ST 0x00001630
+#define NV20_3D_VERTEX_TX3_4I_ST_S__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX3_4I_ST_S__SHIFT 0
+#define NV20_3D_VERTEX_TX3_4I_ST_T__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX3_4I_ST_T__SHIFT 16
+
+#define NV20_3D_VERTEX_TX3_4I_RQ 0x00001634
+#define NV20_3D_VERTEX_TX3_4I_RQ_R__MASK 0x0000ffff
+#define NV20_3D_VERTEX_TX3_4I_RQ_R__SHIFT 0
+#define NV20_3D_VERTEX_TX3_4I_RQ_Q__MASK 0xffff0000
+#define NV20_3D_VERTEX_TX3_4I_RQ_Q__SHIFT 16
+
+#define NV20_3D_VERTEX_FOG_1F 0x00001698
+
+#define NV20_3D_EDGEFLAG_ENABLE 0x000016bc
+
+#define NV20_3D_VERTEX_ATTR_4F(i0) (0x00001a00 + 0x10*(i0))
+#define NV20_3D_VERTEX_ATTR_4F__ESIZE 0x00000010
+#define NV20_3D_VERTEX_ATTR_4F__LEN 0x00000010
+
+
+#define NV20_3D_VERTEX_ATTR_4F_X(i0) (0x00001a00 + 0x10*(i0))
+
+#define NV20_3D_VERTEX_ATTR_4F_Y(i0) (0x00001a04 + 0x10*(i0))
+
+#define NV20_3D_VERTEX_ATTR_4F_Z(i0) (0x00001a08 + 0x10*(i0))
+
+#define NV20_3D_VERTEX_ATTR_4F_W(i0) (0x00001a0c + 0x10*(i0))
+
+
+#define NV20_3D_DMA_VTXBUF0 0x0000019c
+
+#define NV20_3D_DMA_VTXBUF1 0x000001a0
+
+#define NV20_3D_VTXBUF_VALIDATE 0x00001710
+
+
+#define NV20_3D_VTXBUF_OFFSET(i0) (0x00001720 + 0x4*(i0))
+#define NV20_3D_VTXBUF_OFFSET_DMA1 0x80000000
+#define NV20_3D_VTXBUF_OFFSET_OFFSET__MASK 0x0fffffff
+#define NV20_3D_VTXBUF_OFFSET_OFFSET__SHIFT 0
+
+#define NV20_3D_VTXBUF_FMT(i0) (0x00001760 + 0x4*(i0))
+#define NV20_3D_VTXBUF_FMT_TYPE__MASK 0x0000000f
+#define NV20_3D_VTXBUF_FMT_TYPE__SHIFT 0
+#define NV20_3D_VTXBUF_FMT_TYPE_FLOAT 0x00000002
+#define NV20_3D_VTXBUF_FMT_TYPE_UBYTE 0x00000004
+#define NV20_3D_VTXBUF_FMT_TYPE_USHORT 0x00000005
+#define NV20_3D_VTXBUF_FMT_SIZE__MASK 0x000000f0
+#define NV20_3D_VTXBUF_FMT_SIZE__SHIFT 4
+#define NV20_3D_VTXBUF_FMT_STRIDE__MASK 0x0000ff00
+#define NV20_3D_VTXBUF_FMT_STRIDE__SHIFT 8
+
+#define NV20_3D_VERTEX_BEGIN_END 0x000017fc
+#define NV20_3D_VERTEX_BEGIN_END_STOP 0x00000000
+#define NV20_3D_VERTEX_BEGIN_END_POINTS 0x00000001
+#define NV20_3D_VERTEX_BEGIN_END_LINES 0x00000002
+#define NV20_3D_VERTEX_BEGIN_END_LINE_LOOP 0x00000003
+#define NV20_3D_VERTEX_BEGIN_END_LINE_STRIP 0x00000004
+#define NV20_3D_VERTEX_BEGIN_END_TRIANGLES 0x00000005
+#define NV20_3D_VERTEX_BEGIN_END_TRIANGLE_STRIP 0x00000006
+#define NV20_3D_VERTEX_BEGIN_END_TRIANGLE_FAN 0x00000007
+#define NV20_3D_VERTEX_BEGIN_END_QUADS 0x00000008
+#define NV20_3D_VERTEX_BEGIN_END_QUAD_STRIP 0x00000009
+#define NV20_3D_VERTEX_BEGIN_END_POLYGON 0x0000000a
+
+#define NV20_3D_VTXBUF_ELEMENT_U16 0x00001800
+#define NV20_3D_VTXBUF_ELEMENT_U16_I0__MASK 0x0000ffff
+#define NV20_3D_VTXBUF_ELEMENT_U16_I0__SHIFT 0
+#define NV20_3D_VTXBUF_ELEMENT_U16_I1__MASK 0xffff0000
+#define NV20_3D_VTXBUF_ELEMENT_U16_I1__SHIFT 16
+
+#define NV20_3D_VTXBUF_ELEMENT_U32 0x00001808
+
+#define NV20_3D_VTXBUF_BATCH 0x00001810
+#define NV20_3D_VTXBUF_BATCH_OFFSET__MASK 0x00ffffff
+#define NV20_3D_VTXBUF_BATCH_OFFSET__SHIFT 0
+#define NV20_3D_VTXBUF_BATCH_COUNT__MASK 0xff000000
+#define NV20_3D_VTXBUF_BATCH_COUNT__SHIFT 24
+
+#define NV20_3D_VTXBUF_DATA 0x00001818
+
+
+#define NV20_3D_ENGINE 0x00001e94
+#define NV20_3D_ENGINE_VP 0x00000002
+#define NV20_3D_ENGINE_FIXED 0x00000004
+
+#define NV20_3D_VP_UPLOAD_INST(i0) (0x00000b00 + 0x4*(i0))
+#define NV20_3D_VP_UPLOAD_INST__ESIZE 0x00000004
+#define NV20_3D_VP_UPLOAD_INST__LEN 0x00000004
+
+#define NV20_3D_VP_UPLOAD_CONST(i0) (0x00000b80 + 0x4*(i0))
+#define NV20_3D_VP_UPLOAD_CONST__ESIZE 0x00000004
+#define NV20_3D_VP_UPLOAD_CONST__LEN 0x00000004
+
+#define NV20_3D_VP_UPLOAD_FROM_ID 0x00001e9c
+
+#define NV20_3D_VP_START_FROM_ID 0x00001ea0
+
+#define NV20_3D_VP_UPLOAD_CONST_ID 0x00001ea4
+
+
+
+#define NV20_3D_MODELVIEW_MATRIX(i0, i1) (0x00000480 + 0x40*(i0) + 0x4*(i1))
+#define NV20_3D_MODELVIEW_MATRIX__ESIZE 0x00000004
+#define NV20_3D_MODELVIEW_MATRIX__LEN 0x00000010
+
+#define NV20_3D_INVERSE_MODELVIEW_MATRIX(i0, i1) (0x00000580 + 0x40*(i0) + 0x4*(i1))
+#define NV20_3D_INVERSE_MODELVIEW_MATRIX__ESIZE 0x00000004
+#define NV20_3D_INVERSE_MODELVIEW_MATRIX__LEN 0x00000010
+
+#define NV20_3D_PROJECTION_MATRIX(i0) (0x00000680 + 0x4*(i0))
+#define NV20_3D_PROJECTION_MATRIX__ESIZE 0x00000004
+#define NV20_3D_PROJECTION_MATRIX__LEN 0x00000010
+
+#define NV20_3D_VIEWPORT_TRANSLATE 0x00000a20
+
+
+#define NV20_3D_VIEWPORT_TRANSLATE_X 0x00000a20
+
+#define NV20_3D_VIEWPORT_TRANSLATE_Y 0x00000a24
+
+#define NV20_3D_VIEWPORT_TRANSLATE_Z 0x00000a28
+
+#define NV20_3D_VIEWPORT_TRANSLATE_W 0x00000a2c
+
+#define NV20_3D_VIEWPORT_SCALE 0x00000af0
+
+
+#define NV20_3D_VIEWPORT_SCALE_X 0x00000af0
+
+#define NV20_3D_VIEWPORT_SCALE_Y 0x00000af4
+
+#define NV20_3D_VIEWPORT_SCALE_Z 0x00000af8
+
+#define NV20_3D_VIEWPORT_SCALE_W 0x00000afc
+
+
+#define NV20_3D_NORMALIZE_ENABLE 0x000003a4
+
+#define NV20_3D_SEPARATE_SPECULAR_ENABLE 0x000003b8
+
+#define NV20_3D_LIGHT_MODEL_TWO_SIDE_ENABLE 0x000017c4
+
+#define NV20_3D_LIGHT_MODEL 0x00000294
+#define NV20_3D_LIGHT_MODEL_VIEWER__MASK 0x00030000
+#define NV20_3D_LIGHT_MODEL_VIEWER__SHIFT 16
+#define NV20_3D_LIGHT_MODEL_VIEWER_NONLOCAL 0x00020000
+#define NV20_3D_LIGHT_MODEL_VIEWER_LOCAL 0x00030000
+#define NV20_3D_LIGHT_MODEL_SEPARATE_SPECULAR 0x00000001
+
+#define NV20_3D_ENABLED_LIGHTS 0x000003bc
+#define NV20_3D_ENABLED_LIGHTS_0__MASK 0x00000003
+#define NV20_3D_ENABLED_LIGHTS_0__SHIFT 0
+#define NV20_3D_ENABLED_LIGHTS_0_DISABLED 0x00000000
+#define NV20_3D_ENABLED_LIGHTS_0_NONPOSITIONAL 0x00000001
+#define NV20_3D_ENABLED_LIGHTS_0_POSITIONAL 0x00000002
+#define NV20_3D_ENABLED_LIGHTS_0_DIRECTIONAL 0x00000003
+#define NV20_3D_ENABLED_LIGHTS_1__MASK 0x0000000c
+#define NV20_3D_ENABLED_LIGHTS_1__SHIFT 2
+#define NV20_3D_ENABLED_LIGHTS_1_DISABLED 0x00000000
+#define NV20_3D_ENABLED_LIGHTS_1_NONPOSITIONAL 0x00000004
+#define NV20_3D_ENABLED_LIGHTS_1_POSITIONAL 0x00000008
+#define NV20_3D_ENABLED_LIGHTS_1_DIRECTIONAL 0x0000000c
+#define NV20_3D_ENABLED_LIGHTS_2__MASK 0x00000030
+#define NV20_3D_ENABLED_LIGHTS_2__SHIFT 4
+#define NV20_3D_ENABLED_LIGHTS_2_DISABLED 0x00000000
+#define NV20_3D_ENABLED_LIGHTS_2_NONPOSITIONAL 0x00000010
+#define NV20_3D_ENABLED_LIGHTS_2_POSITIONAL 0x00000020
+#define NV20_3D_ENABLED_LIGHTS_2_DIRECTIONAL 0x00000030
+#define NV20_3D_ENABLED_LIGHTS_3__MASK 0x000000c0
+#define NV20_3D_ENABLED_LIGHTS_3__SHIFT 6
+#define NV20_3D_ENABLED_LIGHTS_3_DISABLED 0x00000000
+#define NV20_3D_ENABLED_LIGHTS_3_NONPOSITIONAL 0x00000040
+#define NV20_3D_ENABLED_LIGHTS_3_POSITIONAL 0x00000080
+#define NV20_3D_ENABLED_LIGHTS_3_DIRECTIONAL 0x000000c0
+#define NV20_3D_ENABLED_LIGHTS_4__MASK 0x00000300
+#define NV20_3D_ENABLED_LIGHTS_4__SHIFT 8
+#define NV20_3D_ENABLED_LIGHTS_4_DISABLED 0x00000000
+#define NV20_3D_ENABLED_LIGHTS_4_NONPOSITIONAL 0x00000100
+#define NV20_3D_ENABLED_LIGHTS_4_POSITIONAL 0x00000200
+#define NV20_3D_ENABLED_LIGHTS_4_DIRECTIONAL 0x00000300
+#define NV20_3D_ENABLED_LIGHTS_5__MASK 0x00000c00
+#define NV20_3D_ENABLED_LIGHTS_5__SHIFT 10
+#define NV20_3D_ENABLED_LIGHTS_5_DISABLED 0x00000000
+#define NV20_3D_ENABLED_LIGHTS_5_NONPOSITIONAL 0x00000400
+#define NV20_3D_ENABLED_LIGHTS_5_POSITIONAL 0x00000800
+#define NV20_3D_ENABLED_LIGHTS_5_DIRECTIONAL 0x00000c00
+#define NV20_3D_ENABLED_LIGHTS_6__MASK 0x00003000
+#define NV20_3D_ENABLED_LIGHTS_6__SHIFT 12
+#define NV20_3D_ENABLED_LIGHTS_6_DISABLED 0x00000000
+#define NV20_3D_ENABLED_LIGHTS_6_NONPOSITIONAL 0x00001000
+#define NV20_3D_ENABLED_LIGHTS_6_POSITIONAL 0x00002000
+#define NV20_3D_ENABLED_LIGHTS_6_DIRECTIONAL 0x00003000
+#define NV20_3D_ENABLED_LIGHTS_7__MASK 0x0000c000
+#define NV20_3D_ENABLED_LIGHTS_7__SHIFT 14
+#define NV20_3D_ENABLED_LIGHTS_7_DISABLED 0x00000000
+#define NV20_3D_ENABLED_LIGHTS_7_NONPOSITIONAL 0x00004000
+#define NV20_3D_ENABLED_LIGHTS_7_POSITIONAL 0x00008000
+#define NV20_3D_ENABLED_LIGHTS_7_DIRECTIONAL 0x0000c000
+
+#define NV20_3D_COLOR_MATERIAL 0x00000298
+#define NV20_3D_COLOR_MATERIAL_FRONT_EMISSION__MASK 0x00000003
+#define NV20_3D_COLOR_MATERIAL_FRONT_EMISSION__SHIFT 0
+#define NV20_3D_COLOR_MATERIAL_FRONT_EMISSION_OFF 0x00000000
+#define NV20_3D_COLOR_MATERIAL_FRONT_EMISSION_COL1 0x00000001
+#define NV20_3D_COLOR_MATERIAL_FRONT_EMISSION_COL2 0x00000002
+#define NV20_3D_COLOR_MATERIAL_FRONT_AMBIENT__MASK 0x0000000c
+#define NV20_3D_COLOR_MATERIAL_FRONT_AMBIENT__SHIFT 2
+#define NV20_3D_COLOR_MATERIAL_FRONT_AMBIENT_OFF 0x00000000
+#define NV20_3D_COLOR_MATERIAL_FRONT_AMBIENT_COL1 0x00000004
+#define NV20_3D_COLOR_MATERIAL_FRONT_AMBIENT_COL2 0x00000008
+#define NV20_3D_COLOR_MATERIAL_FRONT_DIFFUSE__MASK 0x00000030
+#define NV20_3D_COLOR_MATERIAL_FRONT_DIFFUSE__SHIFT 4
+#define NV20_3D_COLOR_MATERIAL_FRONT_DIFFUSE_OFF 0x00000000
+#define NV20_3D_COLOR_MATERIAL_FRONT_DIFFUSE_COL1 0x00000010
+#define NV20_3D_COLOR_MATERIAL_FRONT_DIFFUSE_COL2 0x00000020
+#define NV20_3D_COLOR_MATERIAL_FRONT_SPECULAR__MASK 0x000000c0
+#define NV20_3D_COLOR_MATERIAL_FRONT_SPECULAR__SHIFT 6
+#define NV20_3D_COLOR_MATERIAL_FRONT_SPECULAR_OFF 0x00000000
+#define NV20_3D_COLOR_MATERIAL_FRONT_SPECULAR_COL1 0x00000040
+#define NV20_3D_COLOR_MATERIAL_FRONT_SPECULAR_COL2 0x00000080
+#define NV20_3D_COLOR_MATERIAL_BACK_EMISSION__MASK 0x00000300
+#define NV20_3D_COLOR_MATERIAL_BACK_EMISSION__SHIFT 8
+#define NV20_3D_COLOR_MATERIAL_BACK_EMISSION_OFF 0x00000000
+#define NV20_3D_COLOR_MATERIAL_BACK_EMISSION_COL1 0x00000100
+#define NV20_3D_COLOR_MATERIAL_BACK_EMISSION_COL2 0x00000200
+#define NV20_3D_COLOR_MATERIAL_BACK_AMBIENT__MASK 0x00000c00
+#define NV20_3D_COLOR_MATERIAL_BACK_AMBIENT__SHIFT 10
+#define NV20_3D_COLOR_MATERIAL_BACK_AMBIENT_OFF 0x00000000
+#define NV20_3D_COLOR_MATERIAL_BACK_AMBIENT_COL1 0x00000400
+#define NV20_3D_COLOR_MATERIAL_BACK_AMBIENT_COL2 0x00000800
+#define NV20_3D_COLOR_MATERIAL_BACK_DIFFUSE__MASK 0x00003000
+#define NV20_3D_COLOR_MATERIAL_BACK_DIFFUSE__SHIFT 12
+#define NV20_3D_COLOR_MATERIAL_BACK_DIFFUSE_OFF 0x00000000
+#define NV20_3D_COLOR_MATERIAL_BACK_DIFFUSE_COL1 0x00001000
+#define NV20_3D_COLOR_MATERIAL_BACK_DIFFUSE_COL2 0x00002000
+#define NV20_3D_COLOR_MATERIAL_BACK_SPECULAR__MASK 0x0000c000
+#define NV20_3D_COLOR_MATERIAL_BACK_SPECULAR__SHIFT 14
+#define NV20_3D_COLOR_MATERIAL_BACK_SPECULAR_OFF 0x00000000
+#define NV20_3D_COLOR_MATERIAL_BACK_SPECULAR_COL1 0x00004000
+#define NV20_3D_COLOR_MATERIAL_BACK_SPECULAR_COL2 0x00008000
+
+#define NV20_3D_MATERIAL_FACTOR_FRONT 0x000003a8
+
+
+#define NV20_3D_MATERIAL_FACTOR_FRONT_R 0x000003a8
+
+#define NV20_3D_MATERIAL_FACTOR_FRONT_G 0x000003ac
+
+#define NV20_3D_MATERIAL_FACTOR_FRONT_B 0x000003b0
+
+#define NV20_3D_MATERIAL_FACTOR_BACK 0x000017b0
+
+
+#define NV20_3D_MATERIAL_FACTOR_BACK_R 0x000017b0
+
+#define NV20_3D_MATERIAL_FACTOR_BACK_G 0x000017b4
+
+#define NV20_3D_MATERIAL_FACTOR_BACK_B 0x000017b8
+
+#define NV20_3D_MATERIAL_FACTOR_FRONT_A 0x000003b4
+
+#define NV20_3D_MATERIAL_FACTOR_BACK_A 0x000017ac
+
+#define NV20_3D_LIGHT_MODEL_FRONT_AMBIENT 0x00000a10
+
+
+#define NV20_3D_LIGHT_MODEL_FRONT_AMBIENT_R 0x00000a10
+
+#define NV20_3D_LIGHT_MODEL_FRONT_AMBIENT_G 0x00000a14
+
+#define NV20_3D_LIGHT_MODEL_FRONT_AMBIENT_B 0x00000a18
+
+#define NV20_3D_LIGHT_MODEL_BACK_AMBIENT 0x000017a0
+
+
+#define NV20_3D_LIGHT_MODEL_BACK_AMBIENT_R 0x000017a0
+
+#define NV20_3D_LIGHT_MODEL_BACK_AMBIENT_G 0x000017a4
+
+#define NV20_3D_LIGHT_MODEL_BACK_AMBIENT_B 0x000017a8
+
+#define NV20_3D_FRONT_MATERIAL_SHININESS(i0) (0x000009e0 + 0x4*(i0))
+#define NV20_3D_FRONT_MATERIAL_SHININESS__ESIZE 0x00000004
+#define NV20_3D_FRONT_MATERIAL_SHININESS__LEN 0x00000006
+
+#define NV20_3D_BACK_MATERIAL_SHININESS(i0) (0x00001e28 + 0x4*(i0))
+#define NV20_3D_BACK_MATERIAL_SHININESS__ESIZE 0x00000004
+#define NV20_3D_BACK_MATERIAL_SHININESS__LEN 0x00000006
+
+
+
+#define NV20_3D_LIGHT_FRONT_AMBIENT(i0) (0x00001000 + 0x80*(i0))
+
+
+#define NV20_3D_LIGHT_FRONT_AMBIENT_R(i0) (0x00001000 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_FRONT_AMBIENT_G(i0) (0x00001004 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_FRONT_AMBIENT_B(i0) (0x00001008 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_FRONT_DIFFUSE(i0) (0x0000100c + 0x80*(i0))
+
+
+#define NV20_3D_LIGHT_FRONT_DIFFUSE_R(i0) (0x0000100c + 0x80*(i0))
+
+#define NV20_3D_LIGHT_FRONT_DIFFUSE_G(i0) (0x00001010 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_FRONT_DIFFUSE_B(i0) (0x00001014 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_FRONT_SPECULAR(i0) (0x00001018 + 0x80*(i0))
+
+
+#define NV20_3D_LIGHT_FRONT_SPECULAR_R(i0) (0x00001018 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_FRONT_SPECULAR_G(i0) (0x0000101c + 0x80*(i0))
+
+#define NV20_3D_LIGHT_FRONT_SPECULAR_B(i0) (0x00001020 + 0x80*(i0))
+
+
+#define NV20_3D_LIGHT_BACK_AMBIENT(i0) (0x00000c00 + 0x40*(i0))
+
+
+#define NV20_3D_LIGHT_BACK_AMBIENT_R(i0) (0x00000c00 + 0x40*(i0))
+
+#define NV20_3D_LIGHT_BACK_AMBIENT_G(i0) (0x00000c04 + 0x40*(i0))
+
+#define NV20_3D_LIGHT_BACK_AMBIENT_B(i0) (0x00000c08 + 0x40*(i0))
+
+#define NV20_3D_LIGHT_BACK_DIFFUSE(i0) (0x00000c0c + 0x40*(i0))
+
+
+#define NV20_3D_LIGHT_BACK_DIFFUSE_R(i0) (0x00000c0c + 0x40*(i0))
+
+#define NV20_3D_LIGHT_BACK_DIFFUSE_G(i0) (0x00000c10 + 0x40*(i0))
+
+#define NV20_3D_LIGHT_BACK_DIFFUSE_B(i0) (0x00000c14 + 0x40*(i0))
+
+#define NV20_3D_LIGHT_BACK_SPECULAR(i0) (0x00000c18 + 0x40*(i0))
+
+
+#define NV20_3D_LIGHT_BACK_SPECULAR_R(i0) (0x00000c18 + 0x40*(i0))
+
+#define NV20_3D_LIGHT_BACK_SPECULAR_G(i0) (0x00000c1c + 0x40*(i0))
+
+#define NV20_3D_LIGHT_BACK_SPECULAR_B(i0) (0x00000c20 + 0x40*(i0))
+
+
+#define NV20_3D_LIGHT_HALF_VECTOR(i0) (0x00001028 + 0x80*(i0))
+
+
+#define NV20_3D_LIGHT_HALF_VECTOR_X(i0) (0x00001028 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_HALF_VECTOR_Y(i0) (0x0000102c + 0x80*(i0))
+
+#define NV20_3D_LIGHT_HALF_VECTOR_Z(i0) (0x00001030 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_DIRECTION(i0) (0x00001034 + 0x80*(i0))
+
+
+#define NV20_3D_LIGHT_DIRECTION_X(i0) (0x00001034 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_DIRECTION_Y(i0) (0x00001038 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_DIRECTION_Z(i0) (0x0000103c + 0x80*(i0))
+
+#define NV20_3D_LIGHT_SPOT_CUTOFF(i0, i1) (0x00001040 + 0x80*(i0) + 0x4*(i1))
+#define NV20_3D_LIGHT_SPOT_CUTOFF__ESIZE 0x00000004
+#define NV20_3D_LIGHT_SPOT_CUTOFF__LEN 0x00000007
+
+#define NV20_3D_LIGHT_POSITION(i0) (0x0000105c + 0x80*(i0))
+
+
+#define NV20_3D_LIGHT_POSITION_X(i0) (0x0000105c + 0x80*(i0))
+
+#define NV20_3D_LIGHT_POSITION_Y(i0) (0x00001060 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_POSITION_Z(i0) (0x00001064 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_ATTENUATION(i0) (0x00001068 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_ATTENUATION_CONSTANT(i0) (0x00001068 + 0x80*(i0))
+
+#define NV20_3D_LIGHT_ATTENUATION_LINEAR(i0) (0x0000106c + 0x80*(i0))
+
+#define NV20_3D_LIGHT_ATTENUATION_QUADRATIC(i0) (0x00001070 + 0x80*(i0))
+
+
+#define NV20_3D_FOG_MODE 0x0000029c
+#define NV20_3D_FOG_MODE_LINEAR_UNSIGNED 0x00000804
+#define NV20_3D_FOG_MODE_LINEAR_SIGNED 0x00002601
+#define NV20_3D_FOG_MODE_EXP_UNSIGNED 0x00000802
+#define NV20_3D_FOG_MODE_EXP_SIGNED 0x00000800
+#define NV20_3D_FOG_MODE_EXP2_UNSIGNED 0x00000803
+#define NV20_3D_FOG_MODE_EXP2_SIGNED 0x00000801
+
+#define NV20_3D_FOG_COORD 0x000002a0
+#define NV20_3D_FOG_COORD_DIST_RADIAL 0x00000001
+#define NV20_3D_FOG_COORD_DIST_ORTHOGONAL 0x00000002
+#define NV20_3D_FOG_COORD_DIST_ORTHOGONAL_ABS 0x00000003
+#define NV20_3D_FOG_COORD_FOG 0x00000006
+
+#define NV20_3D_FOG_ENABLE 0x000002a4
+
+#define NV20_3D_FOG_COLOR 0x000002a8
+#define NV20_3D_FOG_COLOR_R__MASK 0x000000ff
+#define NV20_3D_FOG_COLOR_R__SHIFT 0
+#define NV20_3D_FOG_COLOR_G__MASK 0x0000ff00
+#define NV20_3D_FOG_COLOR_G__SHIFT 8
+#define NV20_3D_FOG_COLOR_B__MASK 0x00ff0000
+#define NV20_3D_FOG_COLOR_B__SHIFT 16
+#define NV20_3D_FOG_COLOR_A__MASK 0xff000000
+#define NV20_3D_FOG_COLOR_A__SHIFT 24
+
+#define NV20_3D_FOG_COEFF(i0) (0x000009c0 + 0x4*(i0))
+#define NV20_3D_FOG_COEFF__ESIZE 0x00000004
+#define NV20_3D_FOG_COEFF__LEN 0x00000003
+
+
+
+#define NV20_3D_TEX_GEN_MODE(i0, i1) (0x000003c0 + 0x10*(i0) + 0x4*(i1))
+#define NV20_3D_TEX_GEN_MODE__ESIZE 0x00000004
+#define NV20_3D_TEX_GEN_MODE__LEN 0x00000004
+#define NV20_3D_TEX_GEN_MODE_FALSE 0x00000000
+#define NV20_3D_TEX_GEN_MODE_EYE_LINEAR 0x00002400
+#define NV20_3D_TEX_GEN_MODE_OBJECT_LINEAR 0x00002401
+#define NV20_3D_TEX_GEN_MODE_SPHERE_MAP 0x00002402
+#define NV20_3D_TEX_GEN_MODE_NORMAL_MAP 0x00008511
+#define NV20_3D_TEX_GEN_MODE_REFLECTION_MAP 0x00008512
+
+
+#define NV20_3D_TEX_GEN_COEFF(i0, i1) (0x00000840 + 0x40*(i0) + 0x10*(i1))
+#define NV20_3D_TEX_GEN_COEFF__ESIZE 0x00000010
+#define NV20_3D_TEX_GEN_COEFF__LEN 0x00000004
+
+#define NV20_3D_TEX_GEN_COEFF_A(i0, i1) (0x00000840 + 0x40*(i0) + 0x10*(i1))
+
+#define NV20_3D_TEX_GEN_COEFF_B(i0, i1) (0x00000844 + 0x40*(i0) + 0x10*(i1))
+
+#define NV20_3D_TEX_GEN_COEFF_C(i0, i1) (0x00000848 + 0x40*(i0) + 0x10*(i1))
+
+#define NV20_3D_TEX_GEN_COEFF_D(i0, i1) (0x0000084c + 0x40*(i0) + 0x10*(i1))
+
+#define NV20_3D_TEX_MATRIX_ENABLE(i0) (0x00000420 + 0x4*(i0))
+#define NV20_3D_TEX_MATRIX_ENABLE__ESIZE 0x00000004
+#define NV20_3D_TEX_MATRIX_ENABLE__LEN 0x00000004
+
+
+#define NV20_3D_TEX_MATRIX(i0, i1) (0x000006c0 + 0x40*(i0) + 0x4*(i1))
+#define NV20_3D_TEX_MATRIX__ESIZE 0x00000004
+#define NV20_3D_TEX_MATRIX__LEN 0x00000010
+
+#define NV20_3D_TEX_SHADER_CULL_MODE 0x000017f8
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_S__MASK 0x00000001
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_S__SHIFT 0
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_S_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_S_LESS 0x00000001
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_T__MASK 0x00000002
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_T__SHIFT 1
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_T_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_T_LESS 0x00000002
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_R__MASK 0x00000004
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_R__SHIFT 2
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_R_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_R_LESS 0x00000004
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_Q__MASK 0x00000008
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_Q__SHIFT 3
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_Q_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX0_Q_LESS 0x00000008
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_S__MASK 0x00000010
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_S__SHIFT 4
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_S_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_S_LESS 0x00000010
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_T__MASK 0x00000020
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_T__SHIFT 5
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_T_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_T_LESS 0x00000020
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_R__MASK 0x00000040
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_R__SHIFT 6
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_R_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_R_LESS 0x00000040
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_Q__MASK 0x00000080
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_Q__SHIFT 7
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_Q_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX1_Q_LESS 0x00000080
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_S__MASK 0x00000100
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_S__SHIFT 8
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_S_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_S_LESS 0x00000100
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_T__MASK 0x00000200
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_T__SHIFT 9
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_T_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_T_LESS 0x00000200
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_R__MASK 0x00000400
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_R__SHIFT 10
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_R_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_R_LESS 0x00000400
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_Q__MASK 0x00000800
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_Q__SHIFT 11
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_Q_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX2_Q_LESS 0x00000800
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_S__MASK 0x00001000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_S__SHIFT 12
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_S_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_S_LESS 0x00001000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_T__MASK 0x00002000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_T__SHIFT 13
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_T_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_T_LESS 0x00002000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_R__MASK 0x00004000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_R__SHIFT 14
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_R_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_R_LESS 0x00004000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_Q__MASK 0x00008000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_Q__SHIFT 15
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_Q_GEQUAL 0x00000000
+#define NV20_3D_TEX_SHADER_CULL_MODE_TX3_Q_LESS 0x00008000
+
+#define NV20_3D_TEX_SHADER_CONST_EYE 0x0000181c
+
+
+#define NV20_3D_TEX_SHADER_CONST_EYE_X 0x0000181c
+
+#define NV20_3D_TEX_SHADER_CONST_EYE_Y 0x00001820
+
+#define NV20_3D_TEX_SHADER_CONST_EYE_Z 0x00001824
+
+
+#define NV20_3D_TEX_SHADER_OFFSET_MATRIX(i0, i1) (0x00001b28 + 0x40*(i0) + 0x4*(i1))
+#define NV20_3D_TEX_SHADER_OFFSET_MATRIX__ESIZE 0x00000004
+#define NV20_3D_TEX_SHADER_OFFSET_MATRIX__LEN 0x00000004
+
+#define NV20_3D_TEX_RCOMP 0x00001e6c
+#define NV20_3D_TEX_RCOMP_NEVER 0x00000000
+#define NV20_3D_TEX_RCOMP_GREATER 0x00000001
+#define NV20_3D_TEX_RCOMP_EQUAL 0x00000002
+#define NV20_3D_TEX_RCOMP_GEQUAL 0x00000003
+#define NV20_3D_TEX_RCOMP_LESS 0x00000004
+#define NV20_3D_TEX_RCOMP_NOTEQUAL 0x00000005
+#define NV20_3D_TEX_RCOMP_LEQUAL 0x00000006
+#define NV20_3D_TEX_RCOMP_ALWAYS 0x00000007
+
+#define NV20_3D_TEX_SHADER_OP 0x00001e70
+#define NV20_3D_TEX_SHADER_OP_TX0__MASK 0x0000001f
+#define NV20_3D_TEX_SHADER_OP_TX0__SHIFT 0
+#define NV20_3D_TEX_SHADER_OP_TX0_NONE 0x00000000
+#define NV20_3D_TEX_SHADER_OP_TX0_TEXTURE_2D 0x00000001
+#define NV20_3D_TEX_SHADER_OP_TX0_PASS_THROUGH 0x00000004
+#define NV20_3D_TEX_SHADER_OP_TX0_CULL_FRAGMENT 0x00000005
+#define NV20_3D_TEX_SHADER_OP_TX0_OFFSET_TEXTURE_2D 0x00000006
+#define NV20_3D_TEX_SHADER_OP_TX0_DOT_PRODUCT_TEXTURE_2D 0x00000009
+#define NV20_3D_TEX_SHADER_OP_TX0_DOT_PRODUCT_DEPTH_REPLACE 0x0000000a
+#define NV20_3D_TEX_SHADER_OP_TX0_DEPENDANT_AR_TEXTURE_2D 0x0000000f
+#define NV20_3D_TEX_SHADER_OP_TX0_DEPENDANT_GB_TEXTURE_2D 0x00000010
+#define NV20_3D_TEX_SHADER_OP_TX0_DOT_PRODUCT 0x00000011
+#define NV20_3D_TEX_SHADER_OP_TX1__MASK 0x000003e0
+#define NV20_3D_TEX_SHADER_OP_TX1__SHIFT 5
+#define NV20_3D_TEX_SHADER_OP_TX1_NONE 0x00000000
+#define NV20_3D_TEX_SHADER_OP_TX1_TEXTURE_2D 0x00000020
+#define NV20_3D_TEX_SHADER_OP_TX1_PASS_THROUGH 0x00000080
+#define NV20_3D_TEX_SHADER_OP_TX1_CULL_FRAGMENT 0x000000a0
+#define NV20_3D_TEX_SHADER_OP_TX1_OFFSET_TEXTURE_2D 0x000000c0
+#define NV20_3D_TEX_SHADER_OP_TX1_DOT_PRODUCT_TEXTURE_2D 0x00000120
+#define NV20_3D_TEX_SHADER_OP_TX1_DOT_PRODUCT_DEPTH_REPLACE 0x00000140
+#define NV20_3D_TEX_SHADER_OP_TX1_DEPENDANT_AR_TEXTURE_2D 0x000001e0
+#define NV20_3D_TEX_SHADER_OP_TX1_DEPENDANT_GB_TEXTURE_2D 0x00000200
+#define NV20_3D_TEX_SHADER_OP_TX1_DOT_PRODUCT 0x00000220
+#define NV20_3D_TEX_SHADER_OP_TX2__MASK 0x00007c00
+#define NV20_3D_TEX_SHADER_OP_TX2__SHIFT 10
+#define NV20_3D_TEX_SHADER_OP_TX2_NONE 0x00000000
+#define NV20_3D_TEX_SHADER_OP_TX2_TEXTURE_2D 0x00000400
+#define NV20_3D_TEX_SHADER_OP_TX2_PASS_THROUGH 0x00001000
+#define NV20_3D_TEX_SHADER_OP_TX2_CULL_FRAGMENT 0x00001400
+#define NV20_3D_TEX_SHADER_OP_TX2_OFFSET_TEXTURE_2D 0x00001800
+#define NV20_3D_TEX_SHADER_OP_TX2_DOT_PRODUCT_TEXTURE_2D 0x00002400
+#define NV20_3D_TEX_SHADER_OP_TX2_DOT_PRODUCT_DEPTH_REPLACE 0x00002800
+#define NV20_3D_TEX_SHADER_OP_TX2_DEPENDANT_AR_TEXTURE_2D 0x00003c00
+#define NV20_3D_TEX_SHADER_OP_TX2_DEPENDANT_GB_TEXTURE_2D 0x00004000
+#define NV20_3D_TEX_SHADER_OP_TX2_DOT_PRODUCT 0x00004400
+#define NV20_3D_TEX_SHADER_OP_TX3__MASK 0x000f8000
+#define NV20_3D_TEX_SHADER_OP_TX3__SHIFT 15
+#define NV20_3D_TEX_SHADER_OP_TX3_NONE 0x00000000
+#define NV20_3D_TEX_SHADER_OP_TX3_TEXTURE_2D 0x00008000
+#define NV20_3D_TEX_SHADER_OP_TX3_PASS_THROUGH 0x00020000
+#define NV20_3D_TEX_SHADER_OP_TX3_CULL_FRAGMENT 0x00028000
+#define NV20_3D_TEX_SHADER_OP_TX3_OFFSET_TEXTURE_2D 0x00030000
+#define NV20_3D_TEX_SHADER_OP_TX3_DOT_PRODUCT_TEXTURE_2D 0x00048000
+#define NV20_3D_TEX_SHADER_OP_TX3_DOT_PRODUCT_DEPTH_REPLACE 0x00050000
+#define NV20_3D_TEX_SHADER_OP_TX3_DEPENDANT_AR_TEXTURE_2D 0x00078000
+#define NV20_3D_TEX_SHADER_OP_TX3_DEPENDANT_GB_TEXTURE_2D 0x00080000
+#define NV20_3D_TEX_SHADER_OP_TX3_DOT_PRODUCT 0x00088000
+
+#define NV20_3D_TEX_SHADER_DOTMAPPING 0x00001e74
+#define NV20_3D_TEX_SHADER_DOTMAPPING_TX0__MASK 0x0000000f
+#define NV20_3D_TEX_SHADER_DOTMAPPING_TX0__SHIFT 0
+#define NV20_3D_TEX_SHADER_DOTMAPPING_TX1__MASK 0x000000f0
+#define NV20_3D_TEX_SHADER_DOTMAPPING_TX1__SHIFT 4
+#define NV20_3D_TEX_SHADER_DOTMAPPING_TX2__MASK 0x00000f00
+#define NV20_3D_TEX_SHADER_DOTMAPPING_TX2__SHIFT 8
+#define NV20_3D_TEX_SHADER_DOTMAPPING_TX3__MASK 0x0000f000
+#define NV20_3D_TEX_SHADER_DOTMAPPING_TX3__SHIFT 12
+
+#define NV20_3D_TEX_SHADER_PREVIOUS 0x00001e78
+#define NV20_3D_TEX_SHADER_PREVIOUS_TX0__MASK 0x00000f00
+#define NV20_3D_TEX_SHADER_PREVIOUS_TX0__SHIFT 8
+#define NV20_3D_TEX_SHADER_PREVIOUS_TX1__MASK 0x0000f000
+#define NV20_3D_TEX_SHADER_PREVIOUS_TX1__SHIFT 12
+#define NV20_3D_TEX_SHADER_PREVIOUS_TX2__MASK 0x00030000
+#define NV20_3D_TEX_SHADER_PREVIOUS_TX2__SHIFT 16
+#define NV20_3D_TEX_SHADER_PREVIOUS_TX3__MASK 0x00300000
+#define NV20_3D_TEX_SHADER_PREVIOUS_TX3__SHIFT 20
+
+#define NV20_3D_TEX(i0) (0x00000000 + 0x40*(i0))
+#define NV20_3D_TEX__ESIZE 0x00000040
+#define NV20_3D_TEX__LEN 0x00000004
+
+#define NV20_3D_TEX_OFFSET(i0) (0x00001b00 + 0x40*(i0))
+
+#define NV20_3D_TEX_FORMAT(i0) (0x00001b04 + 0x40*(i0))
+#define NV20_3D_TEX_FORMAT_DMA0 0x00000001
+#define NV20_3D_TEX_FORMAT_DMA1 0x00000002
+#define NV20_3D_TEX_FORMAT_CUBIC 0x00000004
+#define NV20_3D_TEX_FORMAT_NO_BORDER 0x00000008
+#define NV20_3D_TEX_FORMAT_DIMS__MASK 0x000000f0
+#define NV20_3D_TEX_FORMAT_DIMS__SHIFT 4
+#define NV20_3D_TEX_FORMAT_DIMS_1D 0x00000010
+#define NV20_3D_TEX_FORMAT_DIMS_2D 0x00000020
+#define NV20_3D_TEX_FORMAT_DIMS_3D 0x00000030
+#define NV20_3D_TEX_FORMAT_FORMAT__MASK 0x0000ff00
+#define NV20_3D_TEX_FORMAT_FORMAT__SHIFT 8
+#define NV20_3D_TEX_FORMAT_FORMAT_L8 0x00000000
+#define NV20_3D_TEX_FORMAT_FORMAT_I8 0x00000100
+#define NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5 0x00000200
+#define NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4 0x00000400
+#define NV20_3D_TEX_FORMAT_FORMAT_R5G6B5 0x00000500
+#define NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8 0x00000600
+#define NV20_3D_TEX_FORMAT_FORMAT_X8R8G8B8 0x00000700
+#define NV20_3D_TEX_FORMAT_FORMAT_INDEX8 0x00000b00
+#define NV20_3D_TEX_FORMAT_FORMAT_DXT1 0x00000c00
+#define NV20_3D_TEX_FORMAT_FORMAT_DXT3 0x00000e00
+#define NV20_3D_TEX_FORMAT_FORMAT_DXT5 0x00000f00
+#define NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT 0x00001000
+#define NV20_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT 0x00001100
+#define NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT 0x00001200
+#define NV20_3D_TEX_FORMAT_FORMAT_L8_RECT 0x00001300
+#define NV20_3D_TEX_FORMAT_FORMAT_DSDT8_RECT 0x00001700
+#define NV20_3D_TEX_FORMAT_FORMAT_A8L8 0x00001a00
+#define NV20_3D_TEX_FORMAT_FORMAT_I8_RECT 0x00001b00
+#define NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4_RECT 0x00001d00
+#define NV20_3D_TEX_FORMAT_FORMAT_R8G8B8_RECT 0x00001e00
+#define NV20_3D_TEX_FORMAT_FORMAT_A8L8_RECT 0x00002000
+#define NV20_3D_TEX_FORMAT_FORMAT_Z24 0x00002a00
+#define NV20_3D_TEX_FORMAT_FORMAT_Z24_RECT 0x00002b00
+#define NV20_3D_TEX_FORMAT_FORMAT_Z16 0x00002c00
+#define NV20_3D_TEX_FORMAT_FORMAT_Z16_RECT 0x00002d00
+#define NV20_3D_TEX_FORMAT_FORMAT_DSDT8 0x00002800
+#define NV20_3D_TEX_FORMAT_FORMAT_HILO16 0x00003300
+#define NV20_3D_TEX_FORMAT_FORMAT_HILO16_RECT 0x00003600
+#define NV20_3D_TEX_FORMAT_FORMAT_HILO8 0x00004400
+#define NV20_3D_TEX_FORMAT_FORMAT_SIGNED_HILO8 0x00004500
+#define NV20_3D_TEX_FORMAT_FORMAT_HILO8_RECT 0x00004600
+#define NV20_3D_TEX_FORMAT_FORMAT_SIGNED_HILO8_RECT 0x00004700
+#define NV20_3D_TEX_FORMAT_MIPMAP 0x00080000
+#define NV20_3D_TEX_FORMAT_BASE_SIZE_U__MASK 0x00f00000
+#define NV20_3D_TEX_FORMAT_BASE_SIZE_U__SHIFT 20
+#define NV20_3D_TEX_FORMAT_BASE_SIZE_V__MASK 0x0f000000
+#define NV20_3D_TEX_FORMAT_BASE_SIZE_V__SHIFT 24
+#define NV20_3D_TEX_FORMAT_BASE_SIZE_W__MASK 0xf0000000
+#define NV20_3D_TEX_FORMAT_BASE_SIZE_W__SHIFT 28
+
+#define NV20_3D_TEX_WRAP(i0) (0x00001b08 + 0x40*(i0))
+#define NV20_3D_TEX_WRAP_S__MASK 0x000000ff
+#define NV20_3D_TEX_WRAP_S__SHIFT 0
+#define NV20_3D_TEX_WRAP_S_REPEAT 0x00000001
+#define NV20_3D_TEX_WRAP_S_MIRRORED_REPEAT 0x00000002
+#define NV20_3D_TEX_WRAP_S_CLAMP_TO_EDGE 0x00000003
+#define NV20_3D_TEX_WRAP_S_CLAMP_TO_BORDER 0x00000004
+#define NV20_3D_TEX_WRAP_S_CLAMP 0x00000005
+#define NV20_3D_TEX_WRAP_T__MASK 0x00000f00
+#define NV20_3D_TEX_WRAP_T__SHIFT 8
+#define NV20_3D_TEX_WRAP_T_REPEAT 0x00000100
+#define NV20_3D_TEX_WRAP_T_MIRRORED_REPEAT 0x00000200
+#define NV20_3D_TEX_WRAP_T_CLAMP_TO_EDGE 0x00000300
+#define NV20_3D_TEX_WRAP_T_CLAMP_TO_BORDER 0x00000400
+#define NV20_3D_TEX_WRAP_T_CLAMP 0x00000500
+#define NV20_3D_TEX_WRAP_R__MASK 0x000f0000
+#define NV20_3D_TEX_WRAP_R__SHIFT 16
+#define NV20_3D_TEX_WRAP_R_REPEAT 0x00010000
+#define NV20_3D_TEX_WRAP_R_MIRRORED_REPEAT 0x00020000
+#define NV20_3D_TEX_WRAP_R_CLAMP_TO_EDGE 0x00030000
+#define NV20_3D_TEX_WRAP_R_CLAMP_TO_BORDER 0x00040000
+#define NV20_3D_TEX_WRAP_R_CLAMP 0x00050000
+
+#define NV20_3D_TEX_ENABLE(i0) (0x00001b0c + 0x40*(i0))
+#define NV20_3D_TEX_ENABLE_ANISO__MASK 0x00000030
+#define NV20_3D_TEX_ENABLE_ANISO__SHIFT 4
+#define NV20_3D_TEX_ENABLE_ANISO_NONE 0x00000000
+#define NV20_3D_TEX_ENABLE_ANISO_2X 0x00000010
+#define NV20_3D_TEX_ENABLE_ANISO_4X 0x00000020
+#define NV20_3D_TEX_ENABLE_ANISO_8X 0x00000030
+#define NV20_3D_TEX_ENABLE_MIPMAP_MAX_LOD__MASK 0x0003c000
+#define NV20_3D_TEX_ENABLE_MIPMAP_MAX_LOD__SHIFT 14
+#define NV20_3D_TEX_ENABLE_MIPMAP_MIN_LOD__MASK 0x3c000000
+#define NV20_3D_TEX_ENABLE_MIPMAP_MIN_LOD__SHIFT 26
+#define NV20_3D_TEX_ENABLE_ENABLE 0x40000000
+
+#define NV20_3D_TEX_NPOT_PITCH(i0) (0x00001b10 + 0x40*(i0))
+#define NV20_3D_TEX_NPOT_PITCH_PITCH__MASK 0xffff0000
+#define NV20_3D_TEX_NPOT_PITCH_PITCH__SHIFT 16
+
+#define NV20_3D_TEX_FILTER(i0) (0x00001b14 + 0x40*(i0))
+#define NV20_3D_TEX_FILTER_LOD_BIAS__MASK 0x00000f00
+#define NV20_3D_TEX_FILTER_LOD_BIAS__SHIFT 8
+#define NV20_3D_TEX_FILTER_MINIFY__MASK 0x000f0000
+#define NV20_3D_TEX_FILTER_MINIFY__SHIFT 16
+#define NV20_3D_TEX_FILTER_MINIFY_NEAREST 0x00010000
+#define NV20_3D_TEX_FILTER_MINIFY_LINEAR 0x00020000
+#define NV20_3D_TEX_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST 0x00030000
+#define NV20_3D_TEX_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST 0x00040000
+#define NV20_3D_TEX_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR 0x00050000
+#define NV20_3D_TEX_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR 0x00060000
+#define NV20_3D_TEX_FILTER_MAGNIFY__MASK 0x0f000000
+#define NV20_3D_TEX_FILTER_MAGNIFY__SHIFT 24
+#define NV20_3D_TEX_FILTER_MAGNIFY_NEAREST 0x01000000
+#define NV20_3D_TEX_FILTER_MAGNIFY_LINEAR 0x02000000
+
+#define NV20_3D_TEX_NPOT_SIZE(i0) (0x00001b1c + 0x40*(i0))
+#define NV20_3D_TEX_NPOT_SIZE_H__MASK 0x0000ffff
+#define NV20_3D_TEX_NPOT_SIZE_H__SHIFT 0
+#define NV20_3D_TEX_NPOT_SIZE_W__MASK 0xffff0000
+#define NV20_3D_TEX_NPOT_SIZE_W__SHIFT 16
+
+#define NV20_3D_TEX_PALETTE_OFFSET(i0) (0x00001b20 + 0x40*(i0))
+
+#define NV20_3D_TEX_BORDER_COLOR(i0) (0x00001b24 + 0x40*(i0))
+#define NV20_3D_TEX_BORDER_COLOR_B__MASK 0x000000ff
+#define NV20_3D_TEX_BORDER_COLOR_B__SHIFT 0
+#define NV20_3D_TEX_BORDER_COLOR_G__MASK 0x0000ff00
+#define NV20_3D_TEX_BORDER_COLOR_G__SHIFT 8
+#define NV20_3D_TEX_BORDER_COLOR_R__MASK 0x00ff0000
+#define NV20_3D_TEX_BORDER_COLOR_R__SHIFT 16
+#define NV20_3D_TEX_BORDER_COLOR_A__MASK 0xff000000
+#define NV20_3D_TEX_BORDER_COLOR_A__SHIFT 24
+
+
+
+#define NV20_3D_RC_IN_ALPHA(i0) (0x00000260 + 0x4*(i0))
+#define NV20_3D_RC_IN_ALPHA_D_INPUT__MASK 0x0000000f
+#define NV20_3D_RC_IN_ALPHA_D_INPUT__SHIFT 0
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0 0x00000001
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1 0x00000002
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_FOG 0x00000003
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR 0x00000004
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR 0x00000005
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_TEXTURE0 0x00000008
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_TEXTURE1 0x00000009
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_TEXTURE2 0x0000000a
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_TEXTURE3 0x0000000b
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_SPARE0 0x0000000c
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_SPARE1 0x0000000d
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV20_3D_RC_IN_ALPHA_D_INPUT_E_TIMES_F 0x0000000f
+#define NV20_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__MASK 0x00000010
+#define NV20_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__SHIFT 4
+#define NV20_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_BLUE 0x00000000
+#define NV20_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_ALPHA 0x00000010
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING__MASK 0x000000e0
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING__SHIFT 5
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT 0x00000020
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL 0x00000040
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE 0x00000060
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY 0x000000c0
+#define NV20_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE 0x000000e0
+#define NV20_3D_RC_IN_ALPHA_C_INPUT__MASK 0x00000f00
+#define NV20_3D_RC_IN_ALPHA_C_INPUT__SHIFT 8
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0 0x00000100
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1 0x00000200
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_FOG 0x00000300
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR 0x00000400
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR 0x00000500
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_TEXTURE0 0x00000800
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_TEXTURE1 0x00000900
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_TEXTURE2 0x00000a00
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_TEXTURE3 0x00000b00
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_SPARE0 0x00000c00
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_SPARE1 0x00000d00
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV20_3D_RC_IN_ALPHA_C_INPUT_E_TIMES_F 0x00000f00
+#define NV20_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__MASK 0x00001000
+#define NV20_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__SHIFT 12
+#define NV20_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_BLUE 0x00000000
+#define NV20_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_ALPHA 0x00001000
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING__MASK 0x0000e000
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING__SHIFT 13
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT 0x00002000
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL 0x00004000
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE 0x00006000
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY 0x0000c000
+#define NV20_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE 0x0000e000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT__MASK 0x000f0000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT__SHIFT 16
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0 0x00010000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1 0x00020000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_FOG 0x00030000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR 0x00040000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR 0x00050000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_TEXTURE0 0x00080000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_TEXTURE1 0x00090000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_TEXTURE2 0x000a0000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_TEXTURE3 0x000b0000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_SPARE0 0x000c0000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_SPARE1 0x000d0000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
+#define NV20_3D_RC_IN_ALPHA_B_INPUT_E_TIMES_F 0x000f0000
+#define NV20_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__MASK 0x00100000
+#define NV20_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__SHIFT 20
+#define NV20_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_BLUE 0x00000000
+#define NV20_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_ALPHA 0x00100000
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING__MASK 0x00e00000
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING__SHIFT 21
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT 0x00200000
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL 0x00400000
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE 0x00600000
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY 0x00c00000
+#define NV20_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE 0x00e00000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT__MASK 0x0f000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT__SHIFT 24
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0 0x01000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1 0x02000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_FOG 0x03000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR 0x04000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR 0x05000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_TEXTURE0 0x08000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_TEXTURE1 0x09000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_TEXTURE2 0x0a000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_TEXTURE3 0x0b000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_SPARE0 0x0c000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_SPARE1 0x0d000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
+#define NV20_3D_RC_IN_ALPHA_A_INPUT_E_TIMES_F 0x0f000000
+#define NV20_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__MASK 0x10000000
+#define NV20_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__SHIFT 28
+#define NV20_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_BLUE 0x00000000
+#define NV20_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_ALPHA 0x10000000
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING__MASK 0xe0000000
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING__SHIFT 29
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT 0x20000000
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL 0x40000000
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE 0x60000000
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY 0xc0000000
+#define NV20_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE 0xe0000000
+
+#define NV20_3D_RC_IN_RGB(i0) (0x00000ac0 + 0x4*(i0))
+#define NV20_3D_RC_IN_RGB_D_INPUT__MASK 0x0000000f
+#define NV20_3D_RC_IN_RGB_D_INPUT__SHIFT 0
+#define NV20_3D_RC_IN_RGB_D_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0 0x00000001
+#define NV20_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1 0x00000002
+#define NV20_3D_RC_IN_RGB_D_INPUT_FOG 0x00000003
+#define NV20_3D_RC_IN_RGB_D_INPUT_PRIMARY_COLOR 0x00000004
+#define NV20_3D_RC_IN_RGB_D_INPUT_SECONDARY_COLOR 0x00000005
+#define NV20_3D_RC_IN_RGB_D_INPUT_TEXTURE0 0x00000008
+#define NV20_3D_RC_IN_RGB_D_INPUT_TEXTURE1 0x00000009
+#define NV20_3D_RC_IN_RGB_D_INPUT_TEXTURE2 0x0000000a
+#define NV20_3D_RC_IN_RGB_D_INPUT_TEXTURE3 0x0000000b
+#define NV20_3D_RC_IN_RGB_D_INPUT_SPARE0 0x0000000c
+#define NV20_3D_RC_IN_RGB_D_INPUT_SPARE1 0x0000000d
+#define NV20_3D_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV20_3D_RC_IN_RGB_D_INPUT_E_TIMES_F 0x0000000f
+#define NV20_3D_RC_IN_RGB_D_COMPONENT_USAGE__MASK 0x00000010
+#define NV20_3D_RC_IN_RGB_D_COMPONENT_USAGE__SHIFT 4
+#define NV20_3D_RC_IN_RGB_D_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_IN_RGB_D_COMPONENT_USAGE_ALPHA 0x00000010
+#define NV20_3D_RC_IN_RGB_D_MAPPING__MASK 0x000000e0
+#define NV20_3D_RC_IN_RGB_D_MAPPING__SHIFT 5
+#define NV20_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_INVERT 0x00000020
+#define NV20_3D_RC_IN_RGB_D_MAPPING_EXPAND_NORMAL 0x00000040
+#define NV20_3D_RC_IN_RGB_D_MAPPING_EXPAND_NEGATE 0x00000060
+#define NV20_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
+#define NV20_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
+#define NV20_3D_RC_IN_RGB_D_MAPPING_SIGNED_IDENTITY 0x000000c0
+#define NV20_3D_RC_IN_RGB_D_MAPPING_SIGNED_NEGATE 0x000000e0
+#define NV20_3D_RC_IN_RGB_C_INPUT__MASK 0x00000f00
+#define NV20_3D_RC_IN_RGB_C_INPUT__SHIFT 8
+#define NV20_3D_RC_IN_RGB_C_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR0 0x00000100
+#define NV20_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR1 0x00000200
+#define NV20_3D_RC_IN_RGB_C_INPUT_FOG 0x00000300
+#define NV20_3D_RC_IN_RGB_C_INPUT_PRIMARY_COLOR 0x00000400
+#define NV20_3D_RC_IN_RGB_C_INPUT_SECONDARY_COLOR 0x00000500
+#define NV20_3D_RC_IN_RGB_C_INPUT_TEXTURE0 0x00000800
+#define NV20_3D_RC_IN_RGB_C_INPUT_TEXTURE1 0x00000900
+#define NV20_3D_RC_IN_RGB_C_INPUT_TEXTURE2 0x00000a00
+#define NV20_3D_RC_IN_RGB_C_INPUT_TEXTURE3 0x00000b00
+#define NV20_3D_RC_IN_RGB_C_INPUT_SPARE0 0x00000c00
+#define NV20_3D_RC_IN_RGB_C_INPUT_SPARE1 0x00000d00
+#define NV20_3D_RC_IN_RGB_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV20_3D_RC_IN_RGB_C_INPUT_E_TIMES_F 0x00000f00
+#define NV20_3D_RC_IN_RGB_C_COMPONENT_USAGE__MASK 0x00001000
+#define NV20_3D_RC_IN_RGB_C_COMPONENT_USAGE__SHIFT 12
+#define NV20_3D_RC_IN_RGB_C_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_IN_RGB_C_COMPONENT_USAGE_ALPHA 0x00001000
+#define NV20_3D_RC_IN_RGB_C_MAPPING__MASK 0x0000e000
+#define NV20_3D_RC_IN_RGB_C_MAPPING__SHIFT 13
+#define NV20_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_INVERT 0x00002000
+#define NV20_3D_RC_IN_RGB_C_MAPPING_EXPAND_NORMAL 0x00004000
+#define NV20_3D_RC_IN_RGB_C_MAPPING_EXPAND_NEGATE 0x00006000
+#define NV20_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
+#define NV20_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
+#define NV20_3D_RC_IN_RGB_C_MAPPING_SIGNED_IDENTITY 0x0000c000
+#define NV20_3D_RC_IN_RGB_C_MAPPING_SIGNED_NEGATE 0x0000e000
+#define NV20_3D_RC_IN_RGB_B_INPUT__MASK 0x000f0000
+#define NV20_3D_RC_IN_RGB_B_INPUT__SHIFT 16
+#define NV20_3D_RC_IN_RGB_B_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR0 0x00010000
+#define NV20_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR1 0x00020000
+#define NV20_3D_RC_IN_RGB_B_INPUT_FOG 0x00030000
+#define NV20_3D_RC_IN_RGB_B_INPUT_PRIMARY_COLOR 0x00040000
+#define NV20_3D_RC_IN_RGB_B_INPUT_SECONDARY_COLOR 0x00050000
+#define NV20_3D_RC_IN_RGB_B_INPUT_TEXTURE0 0x00080000
+#define NV20_3D_RC_IN_RGB_B_INPUT_TEXTURE1 0x00090000
+#define NV20_3D_RC_IN_RGB_B_INPUT_TEXTURE2 0x000a0000
+#define NV20_3D_RC_IN_RGB_B_INPUT_TEXTURE3 0x000b0000
+#define NV20_3D_RC_IN_RGB_B_INPUT_SPARE0 0x000c0000
+#define NV20_3D_RC_IN_RGB_B_INPUT_SPARE1 0x000d0000
+#define NV20_3D_RC_IN_RGB_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
+#define NV20_3D_RC_IN_RGB_B_INPUT_E_TIMES_F 0x000f0000
+#define NV20_3D_RC_IN_RGB_B_COMPONENT_USAGE__MASK 0x00100000
+#define NV20_3D_RC_IN_RGB_B_COMPONENT_USAGE__SHIFT 20
+#define NV20_3D_RC_IN_RGB_B_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_IN_RGB_B_COMPONENT_USAGE_ALPHA 0x00100000
+#define NV20_3D_RC_IN_RGB_B_MAPPING__MASK 0x00e00000
+#define NV20_3D_RC_IN_RGB_B_MAPPING__SHIFT 21
+#define NV20_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_INVERT 0x00200000
+#define NV20_3D_RC_IN_RGB_B_MAPPING_EXPAND_NORMAL 0x00400000
+#define NV20_3D_RC_IN_RGB_B_MAPPING_EXPAND_NEGATE 0x00600000
+#define NV20_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
+#define NV20_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
+#define NV20_3D_RC_IN_RGB_B_MAPPING_SIGNED_IDENTITY 0x00c00000
+#define NV20_3D_RC_IN_RGB_B_MAPPING_SIGNED_NEGATE 0x00e00000
+#define NV20_3D_RC_IN_RGB_A_INPUT__MASK 0x0f000000
+#define NV20_3D_RC_IN_RGB_A_INPUT__SHIFT 24
+#define NV20_3D_RC_IN_RGB_A_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR0 0x01000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR1 0x02000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_FOG 0x03000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_PRIMARY_COLOR 0x04000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_SECONDARY_COLOR 0x05000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_TEXTURE0 0x08000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_TEXTURE1 0x09000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_TEXTURE2 0x0a000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_TEXTURE3 0x0b000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_SPARE0 0x0c000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_SPARE1 0x0d000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
+#define NV20_3D_RC_IN_RGB_A_INPUT_E_TIMES_F 0x0f000000
+#define NV20_3D_RC_IN_RGB_A_COMPONENT_USAGE__MASK 0x10000000
+#define NV20_3D_RC_IN_RGB_A_COMPONENT_USAGE__SHIFT 28
+#define NV20_3D_RC_IN_RGB_A_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_IN_RGB_A_COMPONENT_USAGE_ALPHA 0x10000000
+#define NV20_3D_RC_IN_RGB_A_MAPPING__MASK 0xe0000000
+#define NV20_3D_RC_IN_RGB_A_MAPPING__SHIFT 29
+#define NV20_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_INVERT 0x20000000
+#define NV20_3D_RC_IN_RGB_A_MAPPING_EXPAND_NORMAL 0x40000000
+#define NV20_3D_RC_IN_RGB_A_MAPPING_EXPAND_NEGATE 0x60000000
+#define NV20_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
+#define NV20_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
+#define NV20_3D_RC_IN_RGB_A_MAPPING_SIGNED_IDENTITY 0xc0000000
+#define NV20_3D_RC_IN_RGB_A_MAPPING_SIGNED_NEGATE 0xe0000000
+
+#define NV20_3D_RC_CONSTANT_COLOR0(i0) (0x00000a60 + 0x4*(i0))
+#define NV20_3D_RC_CONSTANT_COLOR0_B__MASK 0x000000ff
+#define NV20_3D_RC_CONSTANT_COLOR0_B__SHIFT 0
+#define NV20_3D_RC_CONSTANT_COLOR0_G__MASK 0x0000ff00
+#define NV20_3D_RC_CONSTANT_COLOR0_G__SHIFT 8
+#define NV20_3D_RC_CONSTANT_COLOR0_R__MASK 0x00ff0000
+#define NV20_3D_RC_CONSTANT_COLOR0_R__SHIFT 16
+#define NV20_3D_RC_CONSTANT_COLOR0_A__MASK 0xff000000
+#define NV20_3D_RC_CONSTANT_COLOR0_A__SHIFT 24
+
+#define NV20_3D_RC_CONSTANT_COLOR1(i0) (0x00000a80 + 0x4*(i0))
+#define NV20_3D_RC_CONSTANT_COLOR1_B__MASK 0x000000ff
+#define NV20_3D_RC_CONSTANT_COLOR1_B__SHIFT 0
+#define NV20_3D_RC_CONSTANT_COLOR1_G__MASK 0x0000ff00
+#define NV20_3D_RC_CONSTANT_COLOR1_G__SHIFT 8
+#define NV20_3D_RC_CONSTANT_COLOR1_R__MASK 0x00ff0000
+#define NV20_3D_RC_CONSTANT_COLOR1_R__SHIFT 16
+#define NV20_3D_RC_CONSTANT_COLOR1_A__MASK 0xff000000
+#define NV20_3D_RC_CONSTANT_COLOR1_A__SHIFT 24
+
+#define NV20_3D_RC_OUT_ALPHA(i0) (0x00000aa0 + 0x4*(i0))
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT__MASK 0x0000000f
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT__SHIFT 0
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_ZERO 0x00000000
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0 0x00000001
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1 0x00000002
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_FOG 0x00000003
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR 0x00000004
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR 0x00000005
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0 0x00000008
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1 0x00000009
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2 0x0000000a
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3 0x0000000b
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0 0x0000000c
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE1 0x0000000d
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV20_3D_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F 0x0000000f
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT__MASK 0x000000f0
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT__SHIFT 4
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_ZERO 0x00000000
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0 0x00000010
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1 0x00000020
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_FOG 0x00000030
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR 0x00000040
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR 0x00000050
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0 0x00000080
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1 0x00000090
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2 0x000000a0
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3 0x000000b0
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0 0x000000c0
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE1 0x000000d0
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0
+#define NV20_3D_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F 0x000000f0
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT__MASK 0x00000f00
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT__SHIFT 8
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_ZERO 0x00000000
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_FOG 0x00000300
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR 0x00000400
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR 0x00000500
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0 0x00000800
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1 0x00000900
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2 0x00000a00
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3 0x00000b00
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0 0x00000c00
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1 0x00000d00
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV20_3D_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F 0x00000f00
+#define NV20_3D_RC_OUT_ALPHA_CD_DOT_PRODUCT 0x00001000
+#define NV20_3D_RC_OUT_ALPHA_AB_DOT_PRODUCT 0x00002000
+#define NV20_3D_RC_OUT_ALPHA_MUX_SUM 0x00004000
+#define NV20_3D_RC_OUT_ALPHA_BIAS__MASK 0x00008000
+#define NV20_3D_RC_OUT_ALPHA_BIAS__SHIFT 15
+#define NV20_3D_RC_OUT_ALPHA_BIAS_NONE 0x00000000
+#define NV20_3D_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000
+#define NV20_3D_RC_OUT_ALPHA_SCALE__MASK 0x00030000
+#define NV20_3D_RC_OUT_ALPHA_SCALE__SHIFT 16
+#define NV20_3D_RC_OUT_ALPHA_SCALE_NONE 0x00000000
+#define NV20_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO 0x00010000
+#define NV20_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR 0x00020000
+#define NV20_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF 0x00030000
+
+#define NV20_3D_RC_OUT_RGB(i0) (0x00001e40 + 0x4*(i0))
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT__MASK 0x0000000f
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT__SHIFT 0
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_ZERO 0x00000000
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR0 0x00000001
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR1 0x00000002
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_FOG 0x00000003
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_PRIMARY_COLOR 0x00000004
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_SECONDARY_COLOR 0x00000005
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE0 0x00000008
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE1 0x00000009
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE2 0x0000000a
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE3 0x0000000b
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0 0x0000000c
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_SPARE1 0x0000000d
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV20_3D_RC_OUT_RGB_CD_OUTPUT_E_TIMES_F 0x0000000f
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT__MASK 0x000000f0
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT__SHIFT 4
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_ZERO 0x00000000
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR0 0x00000010
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR1 0x00000020
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_FOG 0x00000030
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_PRIMARY_COLOR 0x00000040
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_SECONDARY_COLOR 0x00000050
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE0 0x00000080
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE1 0x00000090
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE2 0x000000a0
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE3 0x000000b0
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0 0x000000c0
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_SPARE1 0x000000d0
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0
+#define NV20_3D_RC_OUT_RGB_AB_OUTPUT_E_TIMES_F 0x000000f0
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT__MASK 0x00000f00
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT__SHIFT 8
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_ZERO 0x00000000
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_FOG 0x00000300
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_PRIMARY_COLOR 0x00000400
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_SECONDARY_COLOR 0x00000500
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE0 0x00000800
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE1 0x00000900
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE2 0x00000a00
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE3 0x00000b00
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0 0x00000c00
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE1 0x00000d00
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV20_3D_RC_OUT_RGB_SUM_OUTPUT_E_TIMES_F 0x00000f00
+#define NV20_3D_RC_OUT_RGB_CD_DOT_PRODUCT 0x00001000
+#define NV20_3D_RC_OUT_RGB_AB_DOT_PRODUCT 0x00002000
+#define NV20_3D_RC_OUT_RGB_MUX_SUM 0x00004000
+#define NV20_3D_RC_OUT_RGB_BIAS__MASK 0x00008000
+#define NV20_3D_RC_OUT_RGB_BIAS__SHIFT 15
+#define NV20_3D_RC_OUT_RGB_BIAS_NONE 0x00000000
+#define NV20_3D_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000
+#define NV20_3D_RC_OUT_RGB_SCALE__MASK 0x00030000
+#define NV20_3D_RC_OUT_RGB_SCALE__SHIFT 16
+#define NV20_3D_RC_OUT_RGB_SCALE_NONE 0x00000000
+#define NV20_3D_RC_OUT_RGB_SCALE_SCALE_BY_TWO 0x00010000
+#define NV20_3D_RC_OUT_RGB_SCALE_SCALE_BY_FOUR 0x00020000
+#define NV20_3D_RC_OUT_RGB_SCALE_SCALE_BY_ONE_HALF 0x00030000
+
+#define NV20_3D_RC_FINAL0 0x00000288
+#define NV20_3D_RC_FINAL0_D_INPUT__MASK 0x0000000f
+#define NV20_3D_RC_FINAL0_D_INPUT__SHIFT 0
+#define NV20_3D_RC_FINAL0_D_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR0 0x00000001
+#define NV20_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR1 0x00000002
+#define NV20_3D_RC_FINAL0_D_INPUT_FOG 0x00000003
+#define NV20_3D_RC_FINAL0_D_INPUT_PRIMARY_COLOR 0x00000004
+#define NV20_3D_RC_FINAL0_D_INPUT_SECONDARY_COLOR 0x00000005
+#define NV20_3D_RC_FINAL0_D_INPUT_TEXTURE0 0x00000008
+#define NV20_3D_RC_FINAL0_D_INPUT_TEXTURE1 0x00000009
+#define NV20_3D_RC_FINAL0_D_INPUT_TEXTURE2 0x0000000a
+#define NV20_3D_RC_FINAL0_D_INPUT_TEXTURE3 0x0000000b
+#define NV20_3D_RC_FINAL0_D_INPUT_SPARE0 0x0000000c
+#define NV20_3D_RC_FINAL0_D_INPUT_SPARE1 0x0000000d
+#define NV20_3D_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e
+#define NV20_3D_RC_FINAL0_D_INPUT_E_TIMES_F 0x0000000f
+#define NV20_3D_RC_FINAL0_D_COMPONENT_USAGE__MASK 0x00000010
+#define NV20_3D_RC_FINAL0_D_COMPONENT_USAGE__SHIFT 4
+#define NV20_3D_RC_FINAL0_D_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_FINAL0_D_COMPONENT_USAGE_ALPHA 0x00000010
+#define NV20_3D_RC_FINAL0_D_MAPPING__MASK 0x000000e0
+#define NV20_3D_RC_FINAL0_D_MAPPING__SHIFT 5
+#define NV20_3D_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT 0x00000020
+#define NV20_3D_RC_FINAL0_D_MAPPING_EXPAND_NORMAL 0x00000040
+#define NV20_3D_RC_FINAL0_D_MAPPING_EXPAND_NEGATE 0x00000060
+#define NV20_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL 0x00000080
+#define NV20_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0
+#define NV20_3D_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY 0x000000c0
+#define NV20_3D_RC_FINAL0_D_MAPPING_SIGNED_NEGATE 0x000000e0
+#define NV20_3D_RC_FINAL0_C_INPUT__MASK 0x00000f00
+#define NV20_3D_RC_FINAL0_C_INPUT__SHIFT 8
+#define NV20_3D_RC_FINAL0_C_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR0 0x00000100
+#define NV20_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR1 0x00000200
+#define NV20_3D_RC_FINAL0_C_INPUT_FOG 0x00000300
+#define NV20_3D_RC_FINAL0_C_INPUT_PRIMARY_COLOR 0x00000400
+#define NV20_3D_RC_FINAL0_C_INPUT_SECONDARY_COLOR 0x00000500
+#define NV20_3D_RC_FINAL0_C_INPUT_TEXTURE0 0x00000800
+#define NV20_3D_RC_FINAL0_C_INPUT_TEXTURE1 0x00000900
+#define NV20_3D_RC_FINAL0_C_INPUT_TEXTURE2 0x00000a00
+#define NV20_3D_RC_FINAL0_C_INPUT_TEXTURE3 0x00000b00
+#define NV20_3D_RC_FINAL0_C_INPUT_SPARE0 0x00000c00
+#define NV20_3D_RC_FINAL0_C_INPUT_SPARE1 0x00000d00
+#define NV20_3D_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV20_3D_RC_FINAL0_C_INPUT_E_TIMES_F 0x00000f00
+#define NV20_3D_RC_FINAL0_C_COMPONENT_USAGE__MASK 0x00001000
+#define NV20_3D_RC_FINAL0_C_COMPONENT_USAGE__SHIFT 12
+#define NV20_3D_RC_FINAL0_C_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_FINAL0_C_COMPONENT_USAGE_ALPHA 0x00001000
+#define NV20_3D_RC_FINAL0_C_MAPPING__MASK 0x0000e000
+#define NV20_3D_RC_FINAL0_C_MAPPING__SHIFT 13
+#define NV20_3D_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT 0x00002000
+#define NV20_3D_RC_FINAL0_C_MAPPING_EXPAND_NORMAL 0x00004000
+#define NV20_3D_RC_FINAL0_C_MAPPING_EXPAND_NEGATE 0x00006000
+#define NV20_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL 0x00008000
+#define NV20_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000
+#define NV20_3D_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY 0x0000c000
+#define NV20_3D_RC_FINAL0_C_MAPPING_SIGNED_NEGATE 0x0000e000
+#define NV20_3D_RC_FINAL0_B_INPUT__MASK 0x000f0000
+#define NV20_3D_RC_FINAL0_B_INPUT__SHIFT 16
+#define NV20_3D_RC_FINAL0_B_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR0 0x00010000
+#define NV20_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR1 0x00020000
+#define NV20_3D_RC_FINAL0_B_INPUT_FOG 0x00030000
+#define NV20_3D_RC_FINAL0_B_INPUT_PRIMARY_COLOR 0x00040000
+#define NV20_3D_RC_FINAL0_B_INPUT_SECONDARY_COLOR 0x00050000
+#define NV20_3D_RC_FINAL0_B_INPUT_TEXTURE0 0x00080000
+#define NV20_3D_RC_FINAL0_B_INPUT_TEXTURE1 0x00090000
+#define NV20_3D_RC_FINAL0_B_INPUT_TEXTURE2 0x000a0000
+#define NV20_3D_RC_FINAL0_B_INPUT_TEXTURE3 0x000b0000
+#define NV20_3D_RC_FINAL0_B_INPUT_SPARE0 0x000c0000
+#define NV20_3D_RC_FINAL0_B_INPUT_SPARE1 0x000d0000
+#define NV20_3D_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
+#define NV20_3D_RC_FINAL0_B_INPUT_E_TIMES_F 0x000f0000
+#define NV20_3D_RC_FINAL0_B_COMPONENT_USAGE__MASK 0x00100000
+#define NV20_3D_RC_FINAL0_B_COMPONENT_USAGE__SHIFT 20
+#define NV20_3D_RC_FINAL0_B_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_FINAL0_B_COMPONENT_USAGE_ALPHA 0x00100000
+#define NV20_3D_RC_FINAL0_B_MAPPING__MASK 0x00e00000
+#define NV20_3D_RC_FINAL0_B_MAPPING__SHIFT 21
+#define NV20_3D_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT 0x00200000
+#define NV20_3D_RC_FINAL0_B_MAPPING_EXPAND_NORMAL 0x00400000
+#define NV20_3D_RC_FINAL0_B_MAPPING_EXPAND_NEGATE 0x00600000
+#define NV20_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL 0x00800000
+#define NV20_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000
+#define NV20_3D_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY 0x00c00000
+#define NV20_3D_RC_FINAL0_B_MAPPING_SIGNED_NEGATE 0x00e00000
+#define NV20_3D_RC_FINAL0_A_INPUT__MASK 0x0f000000
+#define NV20_3D_RC_FINAL0_A_INPUT__SHIFT 24
+#define NV20_3D_RC_FINAL0_A_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR0 0x01000000
+#define NV20_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR1 0x02000000
+#define NV20_3D_RC_FINAL0_A_INPUT_FOG 0x03000000
+#define NV20_3D_RC_FINAL0_A_INPUT_PRIMARY_COLOR 0x04000000
+#define NV20_3D_RC_FINAL0_A_INPUT_SECONDARY_COLOR 0x05000000
+#define NV20_3D_RC_FINAL0_A_INPUT_TEXTURE0 0x08000000
+#define NV20_3D_RC_FINAL0_A_INPUT_TEXTURE1 0x09000000
+#define NV20_3D_RC_FINAL0_A_INPUT_TEXTURE2 0x0a000000
+#define NV20_3D_RC_FINAL0_A_INPUT_TEXTURE3 0x0b000000
+#define NV20_3D_RC_FINAL0_A_INPUT_SPARE0 0x0c000000
+#define NV20_3D_RC_FINAL0_A_INPUT_SPARE1 0x0d000000
+#define NV20_3D_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
+#define NV20_3D_RC_FINAL0_A_INPUT_E_TIMES_F 0x0f000000
+#define NV20_3D_RC_FINAL0_A_COMPONENT_USAGE__MASK 0x10000000
+#define NV20_3D_RC_FINAL0_A_COMPONENT_USAGE__SHIFT 28
+#define NV20_3D_RC_FINAL0_A_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_FINAL0_A_COMPONENT_USAGE_ALPHA 0x10000000
+#define NV20_3D_RC_FINAL0_A_MAPPING__MASK 0xe0000000
+#define NV20_3D_RC_FINAL0_A_MAPPING__SHIFT 29
+#define NV20_3D_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT 0x20000000
+#define NV20_3D_RC_FINAL0_A_MAPPING_EXPAND_NORMAL 0x40000000
+#define NV20_3D_RC_FINAL0_A_MAPPING_EXPAND_NEGATE 0x60000000
+#define NV20_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL 0x80000000
+#define NV20_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000
+#define NV20_3D_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY 0xc0000000
+#define NV20_3D_RC_FINAL0_A_MAPPING_SIGNED_NEGATE 0xe0000000
+
+#define NV20_3D_RC_FINAL1 0x0000028c
+#define NV20_3D_RC_FINAL1_COLOR_SUM_CLAMP 0x00000080
+#define NV20_3D_RC_FINAL1_G_INPUT__MASK 0x00000f00
+#define NV20_3D_RC_FINAL1_G_INPUT__SHIFT 8
+#define NV20_3D_RC_FINAL1_G_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR0 0x00000100
+#define NV20_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR1 0x00000200
+#define NV20_3D_RC_FINAL1_G_INPUT_FOG 0x00000300
+#define NV20_3D_RC_FINAL1_G_INPUT_PRIMARY_COLOR 0x00000400
+#define NV20_3D_RC_FINAL1_G_INPUT_SECONDARY_COLOR 0x00000500
+#define NV20_3D_RC_FINAL1_G_INPUT_TEXTURE0 0x00000800
+#define NV20_3D_RC_FINAL1_G_INPUT_TEXTURE1 0x00000900
+#define NV20_3D_RC_FINAL1_G_INPUT_TEXTURE2 0x00000a00
+#define NV20_3D_RC_FINAL1_G_INPUT_TEXTURE3 0x00000b00
+#define NV20_3D_RC_FINAL1_G_INPUT_SPARE0 0x00000c00
+#define NV20_3D_RC_FINAL1_G_INPUT_SPARE1 0x00000d00
+#define NV20_3D_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00
+#define NV20_3D_RC_FINAL1_G_INPUT_E_TIMES_F 0x00000f00
+#define NV20_3D_RC_FINAL1_G_COMPONENT_USAGE__MASK 0x00001000
+#define NV20_3D_RC_FINAL1_G_COMPONENT_USAGE__SHIFT 12
+#define NV20_3D_RC_FINAL1_G_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_FINAL1_G_COMPONENT_USAGE_ALPHA 0x00001000
+#define NV20_3D_RC_FINAL1_G_MAPPING__MASK 0x0000e000
+#define NV20_3D_RC_FINAL1_G_MAPPING__SHIFT 13
+#define NV20_3D_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT 0x00002000
+#define NV20_3D_RC_FINAL1_G_MAPPING_EXPAND_NORMAL 0x00004000
+#define NV20_3D_RC_FINAL1_G_MAPPING_EXPAND_NEGATE 0x00006000
+#define NV20_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL 0x00008000
+#define NV20_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE 0x0000a000
+#define NV20_3D_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY 0x0000c000
+#define NV20_3D_RC_FINAL1_G_MAPPING_SIGNED_NEGATE 0x0000e000
+#define NV20_3D_RC_FINAL1_F_INPUT__MASK 0x000f0000
+#define NV20_3D_RC_FINAL1_F_INPUT__SHIFT 16
+#define NV20_3D_RC_FINAL1_F_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR0 0x00010000
+#define NV20_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR1 0x00020000
+#define NV20_3D_RC_FINAL1_F_INPUT_FOG 0x00030000
+#define NV20_3D_RC_FINAL1_F_INPUT_PRIMARY_COLOR 0x00040000
+#define NV20_3D_RC_FINAL1_F_INPUT_SECONDARY_COLOR 0x00050000
+#define NV20_3D_RC_FINAL1_F_INPUT_TEXTURE0 0x00080000
+#define NV20_3D_RC_FINAL1_F_INPUT_TEXTURE1 0x00090000
+#define NV20_3D_RC_FINAL1_F_INPUT_TEXTURE2 0x000a0000
+#define NV20_3D_RC_FINAL1_F_INPUT_TEXTURE3 0x000b0000
+#define NV20_3D_RC_FINAL1_F_INPUT_SPARE0 0x000c0000
+#define NV20_3D_RC_FINAL1_F_INPUT_SPARE1 0x000d0000
+#define NV20_3D_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000
+#define NV20_3D_RC_FINAL1_F_INPUT_E_TIMES_F 0x000f0000
+#define NV20_3D_RC_FINAL1_F_COMPONENT_USAGE__MASK 0x00100000
+#define NV20_3D_RC_FINAL1_F_COMPONENT_USAGE__SHIFT 20
+#define NV20_3D_RC_FINAL1_F_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_FINAL1_F_COMPONENT_USAGE_ALPHA 0x00100000
+#define NV20_3D_RC_FINAL1_F_MAPPING__MASK 0x00e00000
+#define NV20_3D_RC_FINAL1_F_MAPPING__SHIFT 21
+#define NV20_3D_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT 0x00200000
+#define NV20_3D_RC_FINAL1_F_MAPPING_EXPAND_NORMAL 0x00400000
+#define NV20_3D_RC_FINAL1_F_MAPPING_EXPAND_NEGATE 0x00600000
+#define NV20_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL 0x00800000
+#define NV20_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE 0x00a00000
+#define NV20_3D_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY 0x00c00000
+#define NV20_3D_RC_FINAL1_F_MAPPING_SIGNED_NEGATE 0x00e00000
+#define NV20_3D_RC_FINAL1_E_INPUT__MASK 0x0f000000
+#define NV20_3D_RC_FINAL1_E_INPUT__SHIFT 24
+#define NV20_3D_RC_FINAL1_E_INPUT_ZERO 0x00000000
+#define NV20_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR0 0x01000000
+#define NV20_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR1 0x02000000
+#define NV20_3D_RC_FINAL1_E_INPUT_FOG 0x03000000
+#define NV20_3D_RC_FINAL1_E_INPUT_PRIMARY_COLOR 0x04000000
+#define NV20_3D_RC_FINAL1_E_INPUT_SECONDARY_COLOR 0x05000000
+#define NV20_3D_RC_FINAL1_E_INPUT_TEXTURE0 0x08000000
+#define NV20_3D_RC_FINAL1_E_INPUT_TEXTURE1 0x09000000
+#define NV20_3D_RC_FINAL1_E_INPUT_TEXTURE2 0x0a000000
+#define NV20_3D_RC_FINAL1_E_INPUT_TEXTURE3 0x0b000000
+#define NV20_3D_RC_FINAL1_E_INPUT_SPARE0 0x0c000000
+#define NV20_3D_RC_FINAL1_E_INPUT_SPARE1 0x0d000000
+#define NV20_3D_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000
+#define NV20_3D_RC_FINAL1_E_INPUT_E_TIMES_F 0x0f000000
+#define NV20_3D_RC_FINAL1_E_COMPONENT_USAGE__MASK 0x10000000
+#define NV20_3D_RC_FINAL1_E_COMPONENT_USAGE__SHIFT 28
+#define NV20_3D_RC_FINAL1_E_COMPONENT_USAGE_RGB 0x00000000
+#define NV20_3D_RC_FINAL1_E_COMPONENT_USAGE_ALPHA 0x10000000
+#define NV20_3D_RC_FINAL1_E_MAPPING__MASK 0xe0000000
+#define NV20_3D_RC_FINAL1_E_MAPPING__SHIFT 29
+#define NV20_3D_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY 0x00000000
+#define NV20_3D_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT 0x20000000
+#define NV20_3D_RC_FINAL1_E_MAPPING_EXPAND_NORMAL 0x40000000
+#define NV20_3D_RC_FINAL1_E_MAPPING_EXPAND_NEGATE 0x60000000
+#define NV20_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL 0x80000000
+#define NV20_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE 0xa0000000
+#define NV20_3D_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY 0xc0000000
+#define NV20_3D_RC_FINAL1_E_MAPPING_SIGNED_NEGATE 0xe0000000
+
+#define NV20_3D_RC_COLOR0 0x00001e20
+#define NV20_3D_RC_COLOR0_B__MASK 0x000000ff
+#define NV20_3D_RC_COLOR0_B__SHIFT 0
+#define NV20_3D_RC_COLOR0_G__MASK 0x0000ff00
+#define NV20_3D_RC_COLOR0_G__SHIFT 8
+#define NV20_3D_RC_COLOR0_R__MASK 0x00ff0000
+#define NV20_3D_RC_COLOR0_R__SHIFT 16
+#define NV20_3D_RC_COLOR0_A__MASK 0xff000000
+#define NV20_3D_RC_COLOR0_A__SHIFT 24
+
+#define NV20_3D_RC_COLOR1 0x00001e24
+#define NV20_3D_RC_COLOR1_B__MASK 0x000000ff
+#define NV20_3D_RC_COLOR1_B__SHIFT 0
+#define NV20_3D_RC_COLOR1_G__MASK 0x0000ff00
+#define NV20_3D_RC_COLOR1_G__SHIFT 8
+#define NV20_3D_RC_COLOR1_R__MASK 0x00ff0000
+#define NV20_3D_RC_COLOR1_R__SHIFT 16
+#define NV20_3D_RC_COLOR1_A__MASK 0xff000000
+#define NV20_3D_RC_COLOR1_A__SHIFT 24
+
+#define NV20_3D_RC_ENABLE 0x00001e60
+#define NV20_3D_RC_ENABLE_NUM_COMBINERS__MASK 0x0000000f
+#define NV20_3D_RC_ENABLE_NUM_COMBINERS__SHIFT 0
+
+
+#define NV20_3D_POINT_SIZE 0x0000043c
+
+#define NV20_3D_POINT_PARAMETER(i0) (0x00000a30 + 0x4*(i0))
+#define NV20_3D_POINT_PARAMETER__ESIZE 0x00000004
+#define NV20_3D_POINT_PARAMETER__LEN 0x00000008
+
+#define NV20_3D_POLYGON_STIPPLE_ENABLE 0x0000147c
+
+#define NV20_3D_POLYGON_STIPPLE_PATTERN(i0) (0x00001480 + 0x4*(i0))
+#define NV20_3D_POLYGON_STIPPLE_PATTERN__ESIZE 0x00000004
+#define NV20_3D_POLYGON_STIPPLE_PATTERN__LEN 0x00000020
+
+#define NV20_3D_COLOR_LOGIC_OP_ENABLE 0x000017bc
+
+#define NV20_3D_COLOR_LOGIC_OP_OP 0x000017c0
+#define NV20_3D_COLOR_LOGIC_OP_OP_CLEAR 0x00001500
+#define NV20_3D_COLOR_LOGIC_OP_OP_AND 0x00001501
+#define NV20_3D_COLOR_LOGIC_OP_OP_AND_REVERSE 0x00001502
+#define NV20_3D_COLOR_LOGIC_OP_OP_COPY 0x00001503
+#define NV20_3D_COLOR_LOGIC_OP_OP_AND_INVERTED 0x00001504
+#define NV20_3D_COLOR_LOGIC_OP_OP_NOOP 0x00001505
+#define NV20_3D_COLOR_LOGIC_OP_OP_XOR 0x00001506
+#define NV20_3D_COLOR_LOGIC_OP_OP_OR 0x00001507
+#define NV20_3D_COLOR_LOGIC_OP_OP_NOR 0x00001508
+#define NV20_3D_COLOR_LOGIC_OP_OP_EQUIV 0x00001509
+#define NV20_3D_COLOR_LOGIC_OP_OP_INVERT 0x0000150a
+#define NV20_3D_COLOR_LOGIC_OP_OP_OR_REVERSE 0x0000150b
+#define NV20_3D_COLOR_LOGIC_OP_OP_COPY_INVERTED 0x0000150c
+#define NV20_3D_COLOR_LOGIC_OP_OP_OR_INVERTED 0x0000150d
+#define NV20_3D_COLOR_LOGIC_OP_OP_NAND 0x0000150e
+#define NV20_3D_COLOR_LOGIC_OP_OP_SET 0x0000150f
+
+#define NV20_3D_DEPTH_CLAMP 0x00001d78
+
+#define NV20_3D_MULTISAMPLE_CONTROL 0x00001d7c
+
+
+#define NV20_3D_CLEAR_DEPTH_VALUE 0x00001d8c
+
+#define NV20_3D_CLEAR_VALUE 0x00001d90
+
+#define NV20_3D_CLEAR_BUFFERS 0x00001d94
+#define NV20_3D_CLEAR_BUFFERS_COLOR_A 0x00000080
+#define NV20_3D_CLEAR_BUFFERS_COLOR_B 0x00000040
+#define NV20_3D_CLEAR_BUFFERS_COLOR_G 0x00000020
+#define NV20_3D_CLEAR_BUFFERS_COLOR_R 0x00000010
+#define NV20_3D_CLEAR_BUFFERS_STENCIL 0x00000002
+#define NV20_3D_CLEAR_BUFFERS_DEPTH 0x00000001
+
+
+#define NV25_3D_DMA_HIERZ 0x000001b0
+
+#define NV25_3D_HIERZ_PITCH 0x0000022c
+
+#define NV25_3D_HIERZ_OFFSET 0x00000230
+
+#define NV20_3D_UNK09F8 0x000009f8
+
+#define NV20_3D_UNK09FC 0x000009fc
+
+#define NV20_3D_UNK17CC 0x000017cc
+
+#define NV20_3D_UNK17E0 0x000017e0
+
+#define NV20_3D_UNK17E4 0x000017e4
+
+#define NV20_3D_UNK17E8 0x000017e8
+
+#define NV20_3D_UNK17EC 0x000017ec
+
+#define NV20_3D_UNK17F0 0x000017f0
+
+#define NV20_3D_UNK17F4 0x000017f4
+
+#define NV20_3D_UNK1D80 0x00001d80
+
+#define NV20_3D_UNK1D84 0x00001d84
+
+#define NV20_3D_UNK1E68 0x00001e68
+
+#define NV20_3D_UNK1E98 0x00001e98
+
+
+#define NV25_3D_UNK01AC 0x000001ac
+
+#define NV25_3D_UNK0A1C 0x00000a1c
+
+#define NV25_3D_UNK1D88 0x00001d88
+
+#define NV25_3D_UNK1DA4 0x00001da4
+
+
+#endif /* NV20_3D_XML */
diff --git a/src/mesa/drivers/dri/nouveau/nv20_context.c b/src/mesa/drivers/dri/nouveau/nv20_context.c
index c6111a2a9a..e0483b261e 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_context.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_context.c
@@ -26,7 +26,10 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
-#include "nouveau_class.h"
+#include "nouveau_fbo.h"
+#include "nouveau_util.h"
+#include "nv_object.xml.h"
+#include "nv20_3d.xml.h"
#include "nv04_driver.h"
#include "nv10_driver.h"
#include "nv20_driver.h"
@@ -40,6 +43,57 @@ static const struct dri_extension nv20_extensions[] = {
};
static void
+nv20_clear(struct gl_context *ctx, GLbitfield buffers)
+{
+ struct nouveau_channel *chan = context_chan(ctx);
+ struct nouveau_grobj *kelvin = context_eng3d(ctx);
+ struct gl_framebuffer *fb = ctx->DrawBuffer;
+ uint32_t clear = 0;
+
+ nouveau_validate_framebuffer(ctx);
+
+ if (buffers & BUFFER_BITS_COLOR) {
+ struct nouveau_surface *s = &to_nouveau_renderbuffer(
+ fb->_ColorDrawBuffers[0])->surface;
+
+ if (ctx->Color.ColorMask[0][RCOMP])
+ clear |= NV20_3D_CLEAR_BUFFERS_COLOR_R;
+ if (ctx->Color.ColorMask[0][GCOMP])
+ clear |= NV20_3D_CLEAR_BUFFERS_COLOR_G;
+ if (ctx->Color.ColorMask[0][BCOMP])
+ clear |= NV20_3D_CLEAR_BUFFERS_COLOR_B;
+ if (ctx->Color.ColorMask[0][ACOMP])
+ clear |= NV20_3D_CLEAR_BUFFERS_COLOR_A;
+
+ BEGIN_RING(chan, kelvin, NV20_3D_CLEAR_VALUE, 1);
+ OUT_RING(chan, pack_rgba_f(s->format, ctx->Color.ClearColor));
+
+ buffers &= ~BUFFER_BITS_COLOR;
+ }
+
+ if (buffers & (BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL)) {
+ struct nouveau_surface *s = &to_nouveau_renderbuffer(
+ fb->_DepthBuffer->Wrapped)->surface;
+
+ if (buffers & BUFFER_BIT_DEPTH && ctx->Depth.Mask)
+ clear |= NV20_3D_CLEAR_BUFFERS_DEPTH;
+ if (buffers & BUFFER_BIT_STENCIL && ctx->Stencil.WriteMask[0])
+ clear |= NV20_3D_CLEAR_BUFFERS_STENCIL;
+
+ BEGIN_RING(chan, kelvin, NV20_3D_CLEAR_DEPTH_VALUE, 1);
+ OUT_RING(chan, pack_zs_f(s->format, ctx->Depth.Clear,
+ ctx->Stencil.Clear));
+
+ buffers &= ~(BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL);
+ }
+
+ BEGIN_RING(chan, kelvin, NV20_3D_CLEAR_BUFFERS, 1);
+ OUT_RING(chan, clear);
+
+ nouveau_clear(ctx, buffers);
+}
+
+static void
nv20_hwctx_init(struct gl_context *ctx)
{
struct nouveau_channel *chan = context_chan(ctx);
@@ -47,38 +101,38 @@ nv20_hwctx_init(struct gl_context *ctx)
struct nouveau_hw_state *hw = &to_nouveau_context(ctx)->hw;
int i;
- BEGIN_RING(chan, kelvin, NV20TCL_DMA_NOTIFY, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_DMA_NOTIFY, 1);
OUT_RING (chan, hw->ntfy->handle);
- BEGIN_RING(chan, kelvin, NV20TCL_DMA_TEXTURE0, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_DMA_TEXTURE0, 2);
OUT_RING (chan, chan->vram->handle);
OUT_RING (chan, chan->gart->handle);
- BEGIN_RING(chan, kelvin, NV20TCL_DMA_COLOR, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_DMA_COLOR, 2);
OUT_RING (chan, chan->vram->handle);
OUT_RING (chan, chan->vram->handle);
- BEGIN_RING(chan, kelvin, NV20TCL_DMA_VTXBUF0, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_DMA_VTXBUF0, 2);
OUT_RING(chan, chan->vram->handle);
OUT_RING(chan, chan->gart->handle);
- BEGIN_RING(chan, kelvin, NV20TCL_DMA_QUERY, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_DMA_QUERY, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_RT_HORIZ, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_RT_HORIZ, 2);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_CLIP_HORIZ(0), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_CLIP_HORIZ(0), 1);
OUT_RING (chan, 0xfff << 16 | 0x0);
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_CLIP_VERT(0), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_CLIP_VERT(0), 1);
OUT_RING (chan, 0xfff << 16 | 0x0);
- for (i = 1; i < NV20TCL_VIEWPORT_CLIP_HORIZ__SIZE; i++) {
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_CLIP_HORIZ(i), 1);
+ for (i = 1; i < NV20_3D_VIEWPORT_CLIP_HORIZ__LEN; i++) {
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_CLIP_HORIZ(i), 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_CLIP_VERT(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_CLIP_VERT(i), 1);
OUT_RING (chan, 0);
}
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_CLIP_MODE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_CLIP_MODE, 1);
OUT_RING (chan, 0);
BEGIN_RING(chan, kelvin, 0x17e0, 3);
@@ -87,13 +141,13 @@ nv20_hwctx_init(struct gl_context *ctx)
OUT_RINGf (chan, 1.0);
if (context_chipset(ctx) >= 0x25) {
- BEGIN_RING(chan, kelvin, NV20TCL_TX_RCOMP, 1);
- OUT_RING (chan, NV20TCL_TX_RCOMP_LEQUAL | 0xdb0);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_RCOMP, 1);
+ OUT_RING (chan, NV20_3D_TEX_RCOMP_LEQUAL | 0xdb0);
} else {
BEGIN_RING(chan, kelvin, 0x1e68, 1);
OUT_RING (chan, 0x4b800000); /* 16777216.000000 */
- BEGIN_RING(chan, kelvin, NV20TCL_TX_RCOMP, 1);
- OUT_RING (chan, NV20TCL_TX_RCOMP_LEQUAL);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_RCOMP, 1);
+ OUT_RING (chan, NV20_3D_TEX_RCOMP_LEQUAL);
}
BEGIN_RING(chan, kelvin, 0x290, 1);
@@ -113,19 +167,19 @@ nv20_hwctx_init(struct gl_context *ctx)
BEGIN_RING(chan, kelvin, 0x1d88, 1);
OUT_RING (chan, 3);
- BEGIN_RING(chan, kelvin, NV25TCL_DMA_IN_MEMORY9, 1);
+ BEGIN_RING(chan, kelvin, NV25_3D_DMA_HIERZ, 1);
OUT_RING (chan, chan->vram->handle);
- BEGIN_RING(chan, kelvin, NV25TCL_DMA_IN_MEMORY8, 1);
+ BEGIN_RING(chan, kelvin, NV25_3D_UNK01AC, 1);
OUT_RING (chan, chan->vram->handle);
}
- BEGIN_RING(chan, kelvin, NV20TCL_DMA_FENCE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_DMA_FENCE, 1);
OUT_RING (chan, 0);
BEGIN_RING(chan, kelvin, 0x1e98, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_NOTIFY, 1);
+ BEGIN_RING(chan, kelvin, NV01_GRAPH_NOTIFY, 1);
OUT_RING (chan, 0);
BEGIN_RING(chan, kelvin, 0x120, 3);
@@ -134,197 +188,193 @@ nv20_hwctx_init(struct gl_context *ctx)
OUT_RING (chan, 2);
if (context_chipset(ctx) >= 0x25) {
- BEGIN_RING(chan, kelvin, 0x022c, 2);
- OUT_RING (chan, 0x280);
- OUT_RING (chan, 0x07d28000);
-
BEGIN_RING(chan, kelvin, 0x1da4, 1);
OUT_RING (chan, 0);
}
- BEGIN_RING(chan, kelvin, NV20TCL_RT_HORIZ, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_RT_HORIZ, 2);
OUT_RING (chan, 0 << 16 | 0);
OUT_RING (chan, 0 << 16 | 0);
- BEGIN_RING(chan, kelvin, NV20TCL_ALPHA_FUNC_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_ALPHA_FUNC_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_ALPHA_FUNC_FUNC, 2);
- OUT_RING (chan, NV20TCL_ALPHA_FUNC_FUNC_ALWAYS);
+ BEGIN_RING(chan, kelvin, NV20_3D_ALPHA_FUNC_FUNC, 2);
+ OUT_RING (chan, NV20_3D_ALPHA_FUNC_FUNC_ALWAYS);
OUT_RING (chan, 0);
- for (i = 0; i < NV20TCL_TX_ENABLE__SIZE; i++) {
- BEGIN_RING(chan, kelvin, NV20TCL_TX_ENABLE(i), 1);
+ for (i = 0; i < NV20_3D_TEX__LEN; i++) {
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_ENABLE(i), 1);
OUT_RING (chan, 0);
}
- BEGIN_RING(chan, kelvin, NV20TCL_TX_SHADER_OP, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_SHADER_OP, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_TX_SHADER_CULL_MODE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_SHADER_CULL_MODE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_IN_ALPHA(0), 4);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_IN_ALPHA(0), 4);
OUT_RING (chan, 0x30d410d0);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_OUT_RGB(0), 4);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_OUT_RGB(0), 4);
OUT_RING (chan, 0x00000c00);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_ENABLE, 1);
OUT_RING (chan, 0x00011101);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_FINAL0, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_FINAL0, 2);
OUT_RING (chan, 0x130e0300);
OUT_RING (chan, 0x0c091c80);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_OUT_ALPHA(0), 4);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_OUT_ALPHA(0), 4);
OUT_RING (chan, 0x00000c00);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_IN_RGB(0), 4);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_IN_RGB(0), 4);
OUT_RING (chan, 0x20c400c0);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_COLOR0, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_COLOR0, 2);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_CONSTANT_COLOR0(0), 4);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_CONSTANT_COLOR0(0), 4);
OUT_RING (chan, 0x035125a0);
OUT_RING (chan, 0);
OUT_RING (chan, 0x40002000);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_MULTISAMPLE_CONTROL, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_MULTISAMPLE_CONTROL, 1);
OUT_RING (chan, 0xffff0000);
- BEGIN_RING(chan, kelvin, NV20TCL_BLEND_FUNC_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_BLEND_FUNC_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_DITHER_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_DITHER_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_STENCIL_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_STENCIL_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_BLEND_FUNC_SRC, 4);
- OUT_RING (chan, NV20TCL_BLEND_FUNC_SRC_ONE);
- OUT_RING (chan, NV20TCL_BLEND_FUNC_DST_ZERO);
+ BEGIN_RING(chan, kelvin, NV20_3D_BLEND_FUNC_SRC, 4);
+ OUT_RING (chan, NV20_3D_BLEND_FUNC_SRC_ONE);
+ OUT_RING (chan, NV20_3D_BLEND_FUNC_DST_ZERO);
OUT_RING (chan, 0);
- OUT_RING (chan, NV20TCL_BLEND_EQUATION_FUNC_ADD);
- BEGIN_RING(chan, kelvin, NV20TCL_STENCIL_MASK, 7);
+ OUT_RING (chan, NV20_3D_BLEND_EQUATION_FUNC_ADD);
+ BEGIN_RING(chan, kelvin, NV20_3D_STENCIL_MASK, 7);
OUT_RING (chan, 0xff);
- OUT_RING (chan, NV20TCL_STENCIL_FUNC_FUNC_ALWAYS);
+ OUT_RING (chan, NV20_3D_STENCIL_FUNC_FUNC_ALWAYS);
OUT_RING (chan, 0);
OUT_RING (chan, 0xff);
- OUT_RING (chan, NV20TCL_STENCIL_OP_FAIL_KEEP);
- OUT_RING (chan, NV20TCL_STENCIL_OP_ZFAIL_KEEP);
- OUT_RING (chan, NV20TCL_STENCIL_OP_ZPASS_KEEP);
+ OUT_RING (chan, NV20_3D_STENCIL_OP_FAIL_KEEP);
+ OUT_RING (chan, NV20_3D_STENCIL_OP_ZFAIL_KEEP);
+ OUT_RING (chan, NV20_3D_STENCIL_OP_ZPASS_KEEP);
- BEGIN_RING(chan, kelvin, NV20TCL_COLOR_LOGIC_OP_ENABLE, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_COLOR_LOGIC_OP_ENABLE, 2);
OUT_RING (chan, 0);
- OUT_RING (chan, NV20TCL_COLOR_LOGIC_OP_OP_COPY);
+ OUT_RING (chan, NV20_3D_COLOR_LOGIC_OP_OP_COPY);
BEGIN_RING(chan, kelvin, 0x17cc, 1);
OUT_RING (chan, 0);
if (context_chipset(ctx) >= 0x25) {
BEGIN_RING(chan, kelvin, 0x1d84, 1);
OUT_RING (chan, 1);
}
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHTING_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHTING_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHT_MODEL, 1);
- OUT_RING (chan, NV20TCL_LIGHT_MODEL_VIEWER_NONLOCAL);
- BEGIN_RING(chan, kelvin, NV20TCL_SEPARATE_SPECULAR_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHT_MODEL, 1);
+ OUT_RING (chan, NV20_3D_LIGHT_MODEL_VIEWER_NONLOCAL);
+ BEGIN_RING(chan, kelvin, NV20_3D_SEPARATE_SPECULAR_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHT_MODEL_TWO_SIDE_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHT_MODEL_TWO_SIDE_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_ENABLED_LIGHTS, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_ENABLED_LIGHTS, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_NORMALIZE_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_NORMALIZE_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_POLYGON_STIPPLE_PATTERN(0),
- NV20TCL_POLYGON_STIPPLE_PATTERN__SIZE);
- for (i = 0; i < NV20TCL_POLYGON_STIPPLE_PATTERN__SIZE; i++) {
+ BEGIN_RING(chan, kelvin, NV20_3D_POLYGON_STIPPLE_PATTERN(0),
+ NV20_3D_POLYGON_STIPPLE_PATTERN__LEN);
+ for (i = 0; i < NV20_3D_POLYGON_STIPPLE_PATTERN__LEN; i++) {
OUT_RING(chan, 0xffffffff);
}
- BEGIN_RING(chan, kelvin, NV20TCL_POLYGON_OFFSET_POINT_ENABLE, 3);
+ BEGIN_RING(chan, kelvin, NV20_3D_POLYGON_OFFSET_POINT_ENABLE, 3);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_DEPTH_FUNC, 1);
- OUT_RING (chan, NV20TCL_DEPTH_FUNC_LESS);
- BEGIN_RING(chan, kelvin, NV20TCL_DEPTH_WRITE_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_DEPTH_FUNC, 1);
+ OUT_RING (chan, NV20_3D_DEPTH_FUNC_LESS);
+ BEGIN_RING(chan, kelvin, NV20_3D_DEPTH_WRITE_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_DEPTH_TEST_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_DEPTH_TEST_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_POLYGON_OFFSET_FACTOR, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_POLYGON_OFFSET_FACTOR, 2);
OUT_RINGf (chan, 0.0);
OUT_RINGf (chan, 0.0);
- BEGIN_RING(chan, kelvin, NV20TCL_DEPTH_UNK17D8, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_DEPTH_CLAMP, 1);
OUT_RING (chan, 1);
if (context_chipset(ctx) < 0x25) {
BEGIN_RING(chan, kelvin, 0x1d84, 1);
OUT_RING (chan, 3);
}
- BEGIN_RING(chan, kelvin, NV20TCL_POINT_SIZE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_POINT_SIZE, 1);
if (context_chipset(ctx) >= 0x25)
OUT_RINGf (chan, 1.0);
else
OUT_RING (chan, 8);
if (context_chipset(ctx) >= 0x25) {
- BEGIN_RING(chan, kelvin, NV20TCL_POINT_PARAMETERS_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_POINT_PARAMETERS_ENABLE, 1);
OUT_RING (chan, 0);
BEGIN_RING(chan, kelvin, 0x0a1c, 1);
OUT_RING (chan, 0x800);
} else {
- BEGIN_RING(chan, kelvin, NV20TCL_POINT_PARAMETERS_ENABLE, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_POINT_PARAMETERS_ENABLE, 2);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
}
- BEGIN_RING(chan, kelvin, NV20TCL_LINE_WIDTH, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_LINE_WIDTH, 1);
OUT_RING (chan, 8);
- BEGIN_RING(chan, kelvin, NV20TCL_LINE_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_LINE_SMOOTH_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_POLYGON_MODE_FRONT, 2);
- OUT_RING (chan, NV20TCL_POLYGON_MODE_FRONT_FILL);
- OUT_RING (chan, NV20TCL_POLYGON_MODE_BACK_FILL);
- BEGIN_RING(chan, kelvin, NV20TCL_CULL_FACE, 2);
- OUT_RING (chan, NV20TCL_CULL_FACE_BACK);
- OUT_RING (chan, NV20TCL_FRONT_FACE_CCW);
- BEGIN_RING(chan, kelvin, NV20TCL_POLYGON_SMOOTH_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_POLYGON_MODE_FRONT, 2);
+ OUT_RING (chan, NV20_3D_POLYGON_MODE_FRONT_FILL);
+ OUT_RING (chan, NV20_3D_POLYGON_MODE_BACK_FILL);
+ BEGIN_RING(chan, kelvin, NV20_3D_CULL_FACE, 2);
+ OUT_RING (chan, NV20_3D_CULL_FACE_BACK);
+ OUT_RING (chan, NV20_3D_FRONT_FACE_CCW);
+ BEGIN_RING(chan, kelvin, NV20_3D_POLYGON_SMOOTH_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_CULL_FACE_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_CULL_FACE_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_SHADE_MODEL, 1);
- OUT_RING (chan, NV20TCL_SHADE_MODEL_SMOOTH);
- BEGIN_RING(chan, kelvin, NV20TCL_POLYGON_STIPPLE_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_SHADE_MODEL, 1);
+ OUT_RING (chan, NV20_3D_SHADE_MODEL_SMOOTH);
+ BEGIN_RING(chan, kelvin, NV20_3D_POLYGON_STIPPLE_ENABLE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_TX_GEN_MODE_S(0),
- 4 * NV20TCL_TX_GEN_MODE_S__SIZE);
- for (i=0; i < 4 * NV20TCL_TX_GEN_MODE_S__SIZE; i++)
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_GEN_MODE(0,0),
+ 4 * NV20_3D_TEX_GEN_MODE__ESIZE);
+ for (i=0; i < 4 * NV20_3D_TEX_GEN_MODE__LEN; i++)
OUT_RING(chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_FOG_EQUATION_CONSTANT, 3);
+ BEGIN_RING(chan, kelvin, NV20_3D_FOG_COEFF(0), 3);
OUT_RINGf (chan, 1.5);
OUT_RINGf (chan, -0.090168);
OUT_RINGf (chan, 0.0);
- BEGIN_RING(chan, kelvin, NV20TCL_FOG_MODE, 2);
- OUT_RING (chan, NV20TCL_FOG_MODE_EXP_SIGNED);
- OUT_RING (chan, NV20TCL_FOG_COORD_FOG);
- BEGIN_RING(chan, kelvin, NV20TCL_FOG_ENABLE, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_FOG_MODE, 2);
+ OUT_RING (chan, NV20_3D_FOG_MODE_EXP_SIGNED);
+ OUT_RING (chan, NV20_3D_FOG_COORD_FOG);
+ BEGIN_RING(chan, kelvin, NV20_3D_FOG_ENABLE, 2);
OUT_RING (chan, 0);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_ENGINE, 1);
- OUT_RING (chan, NV20TCL_ENGINE_FIXED);
+ BEGIN_RING(chan, kelvin, NV20_3D_ENGINE, 1);
+ OUT_RING (chan, NV20_3D_ENGINE_FIXED);
- for (i = 0; i < NV20TCL_TX_MATRIX_ENABLE__SIZE; i++) {
- BEGIN_RING(chan, kelvin, NV20TCL_TX_MATRIX_ENABLE(i), 1);
+ for (i = 0; i < NV20_3D_TEX_MATRIX_ENABLE__LEN; i++) {
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_MATRIX_ENABLE(i), 1);
OUT_RING (chan, 0);
}
- BEGIN_RING(chan, kelvin, NV20TCL_VTX_ATTR_4F_X(1), 4 * 15);
+ BEGIN_RING(chan, kelvin, NV20_3D_VERTEX_ATTR_4F_X(1), 4 * 15);
OUT_RINGf(chan, 1.0);
OUT_RINGf(chan, 0.0);
OUT_RINGf(chan, 0.0);
@@ -344,24 +394,24 @@ nv20_hwctx_init(struct gl_context *ctx)
OUT_RINGf(chan, 1.0);
}
- BEGIN_RING(chan, kelvin, NV20TCL_EDGEFLAG_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_EDGEFLAG_ENABLE, 1);
OUT_RING (chan, 1);
- BEGIN_RING(chan, kelvin, NV20TCL_COLOR_MASK, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_COLOR_MASK, 1);
OUT_RING (chan, 0x00010101);
- BEGIN_RING(chan, kelvin, NV20TCL_CLEAR_VALUE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_CLEAR_VALUE, 1);
OUT_RING (chan, 0);
- BEGIN_RING(chan, kelvin, NV20TCL_DEPTH_RANGE_NEAR, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_DEPTH_RANGE_NEAR, 2);
OUT_RINGf (chan, 0.0);
OUT_RINGf (chan, 16777216.0);
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_TRANSLATE_X, 4);
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_TRANSLATE_X, 4);
OUT_RINGf (chan, 0.0);
OUT_RINGf (chan, 0.0);
OUT_RINGf (chan, 0.0);
OUT_RINGf (chan, 16777215.0);
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_SCALE_X, 4);
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_SCALE_X, 4);
OUT_RINGf (chan, 0.0);
OUT_RINGf (chan, 0.0);
OUT_RINGf (chan, 16777215.0 * 0.5);
@@ -376,7 +426,8 @@ nv20_context_destroy(struct gl_context *ctx)
struct nouveau_context *nctx = to_nouveau_context(ctx);
nv04_surface_takedown(ctx);
- nv20_render_destroy(ctx);
+ nv20_swtnl_destroy(ctx);
+ nv20_vbo_destroy(ctx);
nouveau_grobj_free(&nctx->hw.eng3d);
@@ -410,6 +461,7 @@ nv20_context_create(struct nouveau_screen *screen, const struct gl_config *visua
ctx->Const.MaxTextureUnits = NV20_TEXTURE_UNITS;
ctx->Const.MaxTextureMaxAnisotropy = 8;
ctx->Const.MaxTextureLodBias = 15;
+ ctx->Driver.Clear = nv20_clear;
/* 2D engine. */
ret = nv04_surface_init(ctx);
@@ -418,9 +470,9 @@ nv20_context_create(struct nouveau_screen *screen, const struct gl_config *visua
/* 3D engine. */
if (context_chipset(ctx) >= 0x25)
- kelvin_class = NV25TCL;
+ kelvin_class = NV25_3D;
else
- kelvin_class = NV20TCL;
+ kelvin_class = NV20_3D;
ret = nouveau_grobj_alloc(context_chan(ctx), 0xbeef0001, kelvin_class,
&nctx->hw.eng3d);
@@ -428,7 +480,8 @@ nv20_context_create(struct nouveau_screen *screen, const struct gl_config *visua
goto fail;
nv20_hwctx_init(ctx);
- nv20_render_init(ctx);
+ nv20_vbo_init(ctx);
+ nv20_swtnl_init(ctx);
return ctx;
diff --git a/src/mesa/drivers/dri/nouveau/nv20_driver.h b/src/mesa/drivers/dri/nouveau/nv20_driver.h
index 7fbe6ccfa6..f2a6097b93 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_driver.h
+++ b/src/mesa/drivers/dri/nouveau/nv20_driver.h
@@ -39,10 +39,16 @@ extern const struct nouveau_driver nv20_driver;
/* nv20_render.c */
void
-nv20_render_init(struct gl_context *ctx);
+nv20_vbo_init(struct gl_context *ctx);
void
-nv20_render_destroy(struct gl_context *ctx);
+nv20_vbo_destroy(struct gl_context *ctx);
+
+void
+nv20_swtnl_init(struct gl_context *ctx);
+
+void
+nv20_swtnl_destroy(struct gl_context *ctx);
/* nv20_state_fb.c */
void
diff --git a/src/mesa/drivers/dri/nouveau/nv20_render.c b/src/mesa/drivers/dri/nouveau/nv20_render.c
index 6b66854462..2bdc85cda4 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_render.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_render.c
@@ -26,60 +26,60 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
-#include "nouveau_class.h"
+#include "nv20_3d.xml.h"
#include "nv20_driver.h"
#define NUM_VERTEX_ATTRS 16
static void
-nv20_emit_material(struct gl_context *ctx, struct nouveau_array_state *a,
+nv20_emit_material(struct gl_context *ctx, struct nouveau_array *a,
const void *v);
/* Vertex attribute format. */
static struct nouveau_attr_info nv20_vertex_attrs[VERT_ATTRIB_MAX] = {
[VERT_ATTRIB_POS] = {
.vbo_index = 0,
- .imm_method = NV20TCL_VERTEX_POS_4F_X,
+ .imm_method = NV20_3D_VERTEX_POS_4F_X,
.imm_fields = 4,
},
[VERT_ATTRIB_NORMAL] = {
.vbo_index = 2,
- .imm_method = NV20TCL_VERTEX_NOR_3F_X,
+ .imm_method = NV20_3D_VERTEX_NOR_3F_X,
.imm_fields = 3,
},
[VERT_ATTRIB_COLOR0] = {
.vbo_index = 3,
- .imm_method = NV20TCL_VERTEX_COL_4F_X,
+ .imm_method = NV20_3D_VERTEX_COL_4F,
.imm_fields = 4,
},
[VERT_ATTRIB_COLOR1] = {
.vbo_index = 4,
- .imm_method = NV20TCL_VERTEX_COL2_3F_X,
+ .imm_method = NV20_3D_VERTEX_COL2_3F,
.imm_fields = 3,
},
[VERT_ATTRIB_FOG] = {
.vbo_index = 5,
- .imm_method = NV20TCL_VERTEX_FOG_1F,
+ .imm_method = NV20_3D_VERTEX_FOG_1F,
.imm_fields = 1,
},
[VERT_ATTRIB_TEX0] = {
.vbo_index = 9,
- .imm_method = NV20TCL_VERTEX_TX0_4F_S,
+ .imm_method = NV20_3D_VERTEX_TX0_4F_S,
.imm_fields = 4,
},
[VERT_ATTRIB_TEX1] = {
.vbo_index = 10,
- .imm_method = NV20TCL_VERTEX_TX1_4F_S,
+ .imm_method = NV20_3D_VERTEX_TX1_4F_S,
.imm_fields = 4,
},
[VERT_ATTRIB_TEX2] = {
.vbo_index = 11,
- .imm_method = NV20TCL_VERTEX_TX2_4F_S,
+ .imm_method = NV20_3D_VERTEX_TX2_4F_S,
.imm_fields = 4,
},
[VERT_ATTRIB_TEX3] = {
.vbo_index = 12,
- .imm_method = NV20TCL_VERTEX_TX3_4F_S,
+ .imm_method = NV20_3D_VERTEX_TX3_4F_S,
.imm_fields = 4,
},
[VERT_ATTRIB_GENERIC0] = {
@@ -119,11 +119,11 @@ get_hw_format(int type)
{
switch (type) {
case GL_FLOAT:
- return NV20TCL_VTXFMT_TYPE_FLOAT;
+ return NV20_3D_VTXBUF_FMT_TYPE_FLOAT;
case GL_UNSIGNED_SHORT:
- return NV20TCL_VTXFMT_TYPE_USHORT;
+ return NV20_3D_VTXBUF_FMT_TYPE_USHORT;
case GL_UNSIGNED_BYTE:
- return NV20TCL_VTXFMT_TYPE_UBYTE;
+ return NV20_3D_VTXBUF_FMT_TYPE_UBYTE;
default:
assert(0);
}
@@ -135,13 +135,11 @@ nv20_render_set_format(struct gl_context *ctx)
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
- int i, hw_format;
-
- for (i = 0; i < NUM_VERTEX_ATTRS; i++) {
- int attr = render->map[i];
+ int i, attr, hw_format;
+ FOR_EACH_ATTR(render, i, attr) {
if (attr >= 0) {
- struct nouveau_array_state *a = &render->attrs[attr];
+ struct nouveau_array *a = &render->attrs[attr];
hw_format = a->stride << 8 |
a->fields << 4 |
@@ -149,10 +147,10 @@ nv20_render_set_format(struct gl_context *ctx)
} else {
/* Unused attribute. */
- hw_format = NV10TCL_VTXFMT_TYPE_FLOAT;
+ hw_format = NV20_3D_VTXBUF_FMT_TYPE_FLOAT;
}
- BEGIN_RING(chan, kelvin, NV20TCL_VTXFMT(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_VTXBUF_FMT(i), 1);
OUT_RING(chan, hw_format);
}
}
@@ -162,57 +160,53 @@ nv20_render_bind_vertices(struct gl_context *ctx)
{
struct nouveau_render_state *render = to_render_state(ctx);
struct nouveau_bo_context *bctx = context_bctx(ctx, VERTEX);
- struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
- int i;
+ int i, attr;
- for (i = 0; i < NUM_VERTEX_ATTRS; i++) {
- int attr = render->map[i];
+ FOR_EACH_BOUND_ATTR(render, i, attr) {
+ struct nouveau_array *a = &render->attrs[attr];
- if (attr >= 0) {
- struct nouveau_array_state *a = &render->attrs[attr];
-
- nouveau_bo_mark(bctx, kelvin,
- NV20TCL_VTXBUF_ADDRESS(i),
- a->bo, a->offset, 0,
- 0, NV20TCL_VTXBUF_ADDRESS_DMA1,
- NOUVEAU_BO_LOW | NOUVEAU_BO_OR |
- NOUVEAU_BO_GART | NOUVEAU_BO_RD);
- }
+ nouveau_bo_mark(bctx, kelvin,
+ NV20_3D_VTXBUF_OFFSET(i),
+ a->bo, a->offset, 0,
+ 0, NV20_3D_VTXBUF_OFFSET_DMA1,
+ NOUVEAU_BO_LOW | NOUVEAU_BO_OR |
+ NOUVEAU_BO_GART | NOUVEAU_BO_RD);
}
-
- BEGIN_RING(chan, kelvin, NV20TCL_VTX_CACHE_INVALIDATE, 1);
- OUT_RING(chan, 0);
}
/* Vertex array rendering defs. */
#define RENDER_LOCALS(ctx) \
struct nouveau_grobj *kelvin = context_eng3d(ctx)
+#define BATCH_VALIDATE() \
+ BEGIN_RING(chan, kelvin, NV20_3D_VTXBUF_VALIDATE, 1); \
+ OUT_RING(chan, 0)
+
#define BATCH_BEGIN(prim) \
- BEGIN_RING(chan, kelvin, NV20TCL_VERTEX_BEGIN_END, 1); \
+ BEGIN_RING(chan, kelvin, NV20_3D_VERTEX_BEGIN_END, 1); \
OUT_RING(chan, prim)
#define BATCH_END() \
- BEGIN_RING(chan, kelvin, NV20TCL_VERTEX_BEGIN_END, 1); \
+ BEGIN_RING(chan, kelvin, NV20_3D_VERTEX_BEGIN_END, 1); \
OUT_RING(chan, 0)
#define MAX_PACKET 0x400
#define MAX_OUT_L 0x100
#define BATCH_PACKET_L(n) \
- BEGIN_RING_NI(chan, kelvin, NV20TCL_VB_VERTEX_BATCH, n)
+ BEGIN_RING_NI(chan, kelvin, NV20_3D_VTXBUF_BATCH, n)
#define BATCH_OUT_L(i, n) \
OUT_RING(chan, ((n) - 1) << 24 | (i))
#define MAX_OUT_I16 0x2
#define BATCH_PACKET_I16(n) \
- BEGIN_RING_NI(chan, kelvin, NV20TCL_VB_ELEMENT_U16, n)
+ BEGIN_RING_NI(chan, kelvin, NV20_3D_VTXBUF_ELEMENT_U16, n)
#define BATCH_OUT_I16(i0, i1) \
OUT_RING(chan, (i1) << 16 | (i0))
#define MAX_OUT_I32 0x1
#define BATCH_PACKET_I32(n) \
- BEGIN_RING_NI(chan, kelvin, NV20TCL_VB_ELEMENT_U32, n)
+ BEGIN_RING_NI(chan, kelvin, NV20_3D_VTXBUF_ELEMENT_U32, n)
#define BATCH_OUT_I32(i) \
OUT_RING(chan, i)
@@ -223,3 +217,5 @@ nv20_render_bind_vertices(struct gl_context *ctx)
#define TAG(x) nv20_##x
#include "nouveau_render_t.c"
+#include "nouveau_vbo_t.c"
+#include "nouveau_swtnl_t.c"
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
index 7822ca2a09..cbde74e4fc 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
@@ -29,7 +29,7 @@
#include "nouveau_fbo.h"
#include "nouveau_gldefs.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv20_3d.xml.h"
#include "nv20_driver.h"
static inline unsigned
@@ -37,20 +37,45 @@ get_rt_format(gl_format format)
{
switch (format) {
case MESA_FORMAT_XRGB8888:
- return 0x05;
+ return NV20_3D_RT_FORMAT_COLOR_X8R8G8B8;
case MESA_FORMAT_ARGB8888:
- return 0x08;
+ return NV20_3D_RT_FORMAT_COLOR_A8R8G8B8;
case MESA_FORMAT_RGB565:
- return 0x03;
+ return NV20_3D_RT_FORMAT_COLOR_R5G6B5;
case MESA_FORMAT_Z16:
- return 0x10;
+ return NV20_3D_RT_FORMAT_DEPTH_Z16;
case MESA_FORMAT_Z24_S8:
- return 0x20;
+ return NV20_3D_RT_FORMAT_DEPTH_Z24S8;
default:
assert(0);
}
}
+static void
+setup_hierz_buffer(struct gl_context *ctx)
+{
+ struct nouveau_channel *chan = context_chan(ctx);
+ struct nouveau_grobj *kelvin = context_eng3d(ctx);
+ struct nouveau_bo_context *bctx = context_bctx(ctx, HIERZ);
+ struct gl_framebuffer *fb = ctx->DrawBuffer;
+ struct nouveau_framebuffer *nfb = to_nouveau_framebuffer(fb);
+ unsigned pitch = align(fb->Width, 128),
+ height = align(fb->Height, 2),
+ size = pitch * height;
+
+ if (!nfb->hierz.bo || nfb->hierz.bo->size != size) {
+ nouveau_bo_ref(NULL, &nfb->hierz.bo);
+ nouveau_bo_new(context_dev(ctx), NOUVEAU_BO_VRAM, 0, size,
+ &nfb->hierz.bo);
+ }
+
+ BEGIN_RING(chan, kelvin, NV25_3D_HIERZ_PITCH, 1);
+ OUT_RING(chan, pitch);
+
+ nouveau_bo_markl(bctx, kelvin, NV25_3D_HIERZ_OFFSET, nfb->hierz.bo,
+ 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+}
+
void
nv20_emit_framebuffer(struct gl_context *ctx, int emit)
{
@@ -59,7 +84,7 @@ nv20_emit_framebuffer(struct gl_context *ctx, int emit)
struct nouveau_bo_context *bctx = context_bctx(ctx, FRAMEBUFFER);
struct gl_framebuffer *fb = ctx->DrawBuffer;
struct nouveau_surface *s;
- unsigned rt_format = NV20TCL_RT_FORMAT_TYPE_LINEAR;
+ unsigned rt_format = NV20_3D_RT_FORMAT_TYPE_LINEAR;
unsigned rt_pitch = 0, zeta_pitch = 0;
unsigned bo_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR;
@@ -74,7 +99,7 @@ nv20_emit_framebuffer(struct gl_context *ctx, int emit)
rt_format |= get_rt_format(s->format);
rt_pitch = s->pitch;
- nouveau_bo_markl(bctx, kelvin, NV20TCL_COLOR_OFFSET,
+ nouveau_bo_markl(bctx, kelvin, NV20_3D_COLOR_OFFSET,
s->bo, 0, bo_flags);
}
@@ -86,14 +111,17 @@ nv20_emit_framebuffer(struct gl_context *ctx, int emit)
rt_format |= get_rt_format(s->format);
zeta_pitch = s->pitch;
- nouveau_bo_markl(bctx, kelvin, NV20TCL_ZETA_OFFSET,
+ nouveau_bo_markl(bctx, kelvin, NV20_3D_ZETA_OFFSET,
s->bo, 0, bo_flags);
+
+ if (context_chipset(ctx) >= 0x25)
+ setup_hierz_buffer(ctx);
} else {
rt_format |= get_rt_format(MESA_FORMAT_Z24_S8);
zeta_pitch = rt_pitch;
}
- BEGIN_RING(chan, kelvin, NV20TCL_RT_FORMAT, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_RT_FORMAT, 2);
OUT_RING(chan, rt_format);
OUT_RING(chan, zeta_pitch << 16 | rt_pitch);
@@ -112,12 +140,12 @@ nv20_emit_viewport(struct gl_context *ctx, int emit)
get_viewport_translate(ctx, a);
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_TRANSLATE_X, 4);
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_TRANSLATE_X, 4);
OUT_RINGp(chan, a, 4);
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_CLIP_HORIZ(0), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_CLIP_HORIZ(0), 1);
OUT_RING(chan, (fb->Width - 1) << 16);
- BEGIN_RING(chan, kelvin, NV20TCL_VIEWPORT_CLIP_VERT(0), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_VIEWPORT_CLIP_VERT(0), 1);
OUT_RING(chan, (fb->Height - 1) << 16);
context_dirty(ctx, PROJECTION);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_frag.c b/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
index f9212d8b39..0624de442b 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_frag.c
@@ -26,7 +26,7 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
-#include "nouveau_class.h"
+#include "nv20_3d.xml.h"
#include "nv10_driver.h"
#include "nv20_driver.h"
@@ -40,15 +40,15 @@ nv20_emit_tex_env(struct gl_context *ctx, int emit)
nv10_get_general_combiner(ctx, i, &a_in, &a_out, &c_in, &c_out, &k);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_IN_ALPHA(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_IN_ALPHA(i), 1);
OUT_RING(chan, a_in);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_OUT_ALPHA(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_OUT_ALPHA(i), 1);
OUT_RING(chan, a_out);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_IN_RGB(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_IN_RGB(i), 1);
OUT_RING(chan, c_in);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_OUT_RGB(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_OUT_RGB(i), 1);
OUT_RING(chan, c_out);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_CONSTANT_COLOR0(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_CONSTANT_COLOR0(i), 1);
OUT_RING(chan, k);
context_dirty(ctx, FRAG);
@@ -64,10 +64,10 @@ nv20_emit_frag(struct gl_context *ctx, int emit)
nv10_get_final_combiner(ctx, &in, &n);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_FINAL0, 2);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_FINAL0, 2);
OUT_RING(chan, in);
OUT_RING(chan, in >> 32);
- BEGIN_RING(chan, kelvin, NV20TCL_RC_ENABLE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_RC_ENABLE, 1);
OUT_RING(chan, n);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c b/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c
index a6e237f8c4..85f30dc4d4 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_polygon.c
@@ -27,7 +27,7 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
-#include "nouveau_class.h"
+#include "nv20_3d.xml.h"
#include "nv20_driver.h"
void
@@ -36,7 +36,7 @@ nv20_emit_point_mode(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
- BEGIN_RING(chan, kelvin, NV20TCL_POINT_SIZE, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_POINT_SIZE, 1);
if (context_chipset(ctx) >= 0x25)
OUT_RINGf(chan, ctx->Point.Size);
else
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_raster.c b/src/mesa/drivers/dri/nouveau/nv20_state_raster.c
index 0fc7a3259d..3fb4ecae89 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_raster.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_raster.c
@@ -27,7 +27,8 @@
#include "nouveau_driver.h"
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
-#include "nouveau_class.h"
+#include "nouveau_util.h"
+#include "nv20_3d.xml.h"
#include "nv20_driver.h"
void
@@ -36,7 +37,7 @@ nv20_emit_logic_opcode(struct gl_context *ctx, int emit)
struct nouveau_channel *chan = context_chan(ctx);
struct nouveau_grobj *kelvin = context_eng3d(ctx);
- BEGIN_RING(chan, kelvin, NV20TCL_COLOR_LOGIC_OP_ENABLE, 2);
- OUT_RING(chan, ctx->Color.ColorLogicOpEnabled ? 1 : 0);
+ BEGIN_RING(chan, kelvin, NV20_3D_COLOR_LOGIC_OP_ENABLE, 2);
+ OUT_RINGb(chan, ctx->Color.ColorLogicOpEnabled);
OUT_RING(chan, nvgl_logicop_func(ctx->Color.LogicOp));
}
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
index cfff1fe839..c362aca0fd 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
@@ -28,14 +28,10 @@
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
#include "nouveau_texture.h"
-#include "nouveau_class.h"
+#include "nv20_3d.xml.h"
#include "nouveau_util.h"
#include "nv20_driver.h"
-#define TX_GEN_MODE(i, j) (NV20TCL_TX_GEN_MODE_S(i) + 4 * (j))
-#define TX_GEN_COEFF(i, j) (NV20TCL_TX_GEN_COEFF_S_A(i) + 16 * (j))
-#define TX_MATRIX(i) (NV20TCL_TX0_MATRIX(0) + 64 * (i))
-
void
nv20_emit_tex_gen(struct gl_context *ctx, int emit)
{
@@ -52,15 +48,16 @@ nv20_emit_tex_gen(struct gl_context *ctx, int emit)
float *k = get_texgen_coeff(coord);
if (k) {
- BEGIN_RING(chan, kelvin, TX_GEN_COEFF(i, j), 4);
+ BEGIN_RING(chan, kelvin,
+ NV20_3D_TEX_GEN_COEFF(i, j), 4);
OUT_RINGp(chan, k, 4);
}
- BEGIN_RING(chan, kelvin, TX_GEN_MODE(i, j), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_GEN_MODE(i, j), 1);
OUT_RING(chan, nvgl_texgen_mode(coord->Mode));
} else {
- BEGIN_RING(chan, kelvin, TX_GEN_MODE(i, j), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_GEN_MODE(i, j), 1);
OUT_RING(chan, 0);
}
}
@@ -76,14 +73,14 @@ nv20_emit_tex_mat(struct gl_context *ctx, int emit)
if (nctx->fallback == HWTNL &&
(ctx->Texture._TexMatEnabled & 1 << i)) {
- BEGIN_RING(chan, kelvin, NV20TCL_TX_MATRIX_ENABLE(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_MATRIX_ENABLE(i), 1);
OUT_RING(chan, 1);
- BEGIN_RING(chan, kelvin, TX_MATRIX(i), 16);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_MATRIX(i,0), 16);
OUT_RINGm(chan, ctx->TextureMatrixStack[i].Top->m);
} else {
- BEGIN_RING(chan, kelvin, NV20TCL_TX_MATRIX_ENABLE(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_MATRIX_ENABLE(i), 1);
OUT_RING(chan, 0);
}
}
@@ -93,29 +90,29 @@ get_tex_format_pot(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
case MESA_FORMAT_ARGB8888:
- return NV20TCL_TX_FORMAT_FORMAT_A8R8G8B8;
+ return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8;
case MESA_FORMAT_ARGB1555:
- return NV20TCL_TX_FORMAT_FORMAT_A1R5G5B5;
+ return NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5;
case MESA_FORMAT_ARGB4444:
- return NV20TCL_TX_FORMAT_FORMAT_A4R4G4B4;
+ return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4;
case MESA_FORMAT_XRGB8888:
- return NV20TCL_TX_FORMAT_FORMAT_X8R8G8B8;
+ return NV20_3D_TEX_FORMAT_FORMAT_X8R8G8B8;
case MESA_FORMAT_RGB565:
- return NV20TCL_TX_FORMAT_FORMAT_R5G6B5;
+ return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5;
case MESA_FORMAT_A8:
case MESA_FORMAT_I8:
- return NV20TCL_TX_FORMAT_FORMAT_A8;
+ return NV20_3D_TEX_FORMAT_FORMAT_I8;
case MESA_FORMAT_L8:
- return NV20TCL_TX_FORMAT_FORMAT_L8;
+ return NV20_3D_TEX_FORMAT_FORMAT_L8;
case MESA_FORMAT_CI8:
- return NV20TCL_TX_FORMAT_FORMAT_INDEX8;
+ return NV20_3D_TEX_FORMAT_FORMAT_INDEX8;
default:
assert(0);
@@ -127,26 +124,26 @@ get_tex_format_rect(struct gl_texture_image *ti)
{
switch (ti->TexFormat) {
case MESA_FORMAT_ARGB8888:
- return NV20TCL_TX_FORMAT_FORMAT_A8R8G8B8_RECT;
+ return NV20_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT;
case MESA_FORMAT_ARGB1555:
- return NV20TCL_TX_FORMAT_FORMAT_A1R5G5B5_RECT;
+ return NV20_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT;
case MESA_FORMAT_ARGB4444:
- return NV20TCL_TX_FORMAT_FORMAT_A4R4G4B4_RECT;
+ return NV20_3D_TEX_FORMAT_FORMAT_A4R4G4B4_RECT;
case MESA_FORMAT_XRGB8888:
- return NV20TCL_TX_FORMAT_FORMAT_R8G8B8_RECT;
+ return NV20_3D_TEX_FORMAT_FORMAT_R8G8B8_RECT;
case MESA_FORMAT_RGB565:
- return NV20TCL_TX_FORMAT_FORMAT_R5G6B5_RECT;
+ return NV20_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT;
case MESA_FORMAT_L8:
- return NV20TCL_TX_FORMAT_FORMAT_L8_RECT;
+ return NV20_3D_TEX_FORMAT_FORMAT_L8_RECT;
case MESA_FORMAT_A8:
case MESA_FORMAT_I8:
- return NV20TCL_TX_FORMAT_FORMAT_A8_RECT;
+ return NV20_3D_TEX_FORMAT_FORMAT_I8_RECT;
default:
assert(0);
@@ -167,7 +164,7 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit)
uint32_t tx_format, tx_filter, tx_wrap, tx_enable;
if (!ctx->Texture.Unit[i]._ReallyEnabled) {
- BEGIN_RING(chan, kelvin, NV20TCL_TX_ENABLE(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_ENABLE(i), 1);
OUT_RING(chan, 0);
context_dirty(ctx, TEX_SHADER);
@@ -185,8 +182,8 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit)
tx_format = ti->DepthLog2 << 28
| ti->HeightLog2 << 24
| ti->WidthLog2 << 20
- | NV20TCL_TX_FORMAT_DIMS_2D
- | NV20TCL_TX_FORMAT_NO_BORDER
+ | NV20_3D_TEX_FORMAT_DIMS_2D
+ | NV20_3D_TEX_FORMAT_NO_BORDER
| 1 << 16;
tx_wrap = nvgl_wrap_mode(t->WrapR) << 16
@@ -197,13 +194,13 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit)
| nvgl_filter_mode(t->MinFilter) << 16
| 2 << 12;
- tx_enable = NV20TCL_TX_ENABLE_ENABLE
+ tx_enable = NV20_3D_TEX_ENABLE_ENABLE
| log2i(t->MaxAnisotropy) << 4;
if (t->Target == GL_TEXTURE_RECTANGLE) {
- BEGIN_RING(chan, kelvin, NV20TCL_TX_NPOT_PITCH(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_NPOT_PITCH(i), 1);
OUT_RING(chan, s->pitch << 16);
- BEGIN_RING(chan, kelvin, NV20TCL_TX_NPOT_SIZE(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_NPOT_SIZE(i), 1);
OUT_RING(chan, s->width << 16 | s->height);
tx_format |= get_tex_format_rect(ti);
@@ -222,29 +219,29 @@ nv20_emit_tex_obj(struct gl_context *ctx, int emit)
lod_min = CLAMP(lod_min, 0, 15);
lod_bias = CLAMP(lod_bias, 0, 15);
- tx_format |= NV20TCL_TX_FORMAT_MIPMAP;
+ tx_format |= NV20_3D_TEX_FORMAT_MIPMAP;
tx_filter |= lod_bias << 8;
tx_enable |= lod_min << 26
| lod_max << 14;
}
/* Write it to the hardware. */
- nouveau_bo_mark(bctx, kelvin, NV20TCL_TX_FORMAT(i),
+ nouveau_bo_mark(bctx, kelvin, NV20_3D_TEX_FORMAT(i),
s->bo, tx_format, 0,
- NV20TCL_TX_FORMAT_DMA0,
- NV20TCL_TX_FORMAT_DMA1,
+ NV20_3D_TEX_FORMAT_DMA0,
+ NV20_3D_TEX_FORMAT_DMA1,
bo_flags | NOUVEAU_BO_OR);
- nouveau_bo_markl(bctx, kelvin, NV20TCL_TX_OFFSET(i),
+ nouveau_bo_markl(bctx, kelvin, NV20_3D_TEX_OFFSET(i),
s->bo, s->offset, bo_flags);
- BEGIN_RING(chan, kelvin, NV20TCL_TX_WRAP(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_WRAP(i), 1);
OUT_RING(chan, tx_wrap);
- BEGIN_RING(chan, kelvin, NV20TCL_TX_FILTER(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_FILTER(i), 1);
OUT_RING(chan, tx_filter);
- BEGIN_RING(chan, kelvin, NV20TCL_TX_ENABLE(i), 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_ENABLE(i), 1);
OUT_RING(chan, tx_enable);
context_dirty(ctx, TEX_SHADER);
@@ -262,9 +259,9 @@ nv20_emit_tex_shader(struct gl_context *ctx, int emit)
if (!ctx->Texture.Unit[i]._ReallyEnabled)
continue;
- tx_shader_op |= NV20TCL_TX_SHADER_OP_TX0_TEXTURE_2D << 5 * i;
+ tx_shader_op |= NV20_3D_TEX_SHADER_OP_TX0_TEXTURE_2D << 5 * i;
}
- BEGIN_RING(chan, kelvin, NV20TCL_TX_SHADER_OP, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_TEX_SHADER_OP, 1);
OUT_RING(chan, tx_shader_op);
}
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
index b65cd9ad87..4677198dd0 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tnl.c
@@ -28,31 +28,31 @@
#include "nouveau_context.h"
#include "nouveau_gldefs.h"
#include "nouveau_util.h"
-#include "nouveau_class.h"
+#include "nv20_3d.xml.h"
#include "nv10_driver.h"
#include "nv20_driver.h"
#define LIGHT_MODEL_AMBIENT_R(side) \
- ((side) ? NV20TCL_LIGHT_MODEL_BACK_AMBIENT_R : \
- NV20TCL_LIGHT_MODEL_FRONT_AMBIENT_R)
+ ((side) ? NV20_3D_LIGHT_MODEL_BACK_AMBIENT_R : \
+ NV20_3D_LIGHT_MODEL_FRONT_AMBIENT_R)
#define LIGHT_AMBIENT_R(side, i) \
- ((side) ? NV20TCL_LIGHT_BACK_AMBIENT_R(i) : \
- NV20TCL_LIGHT_FRONT_AMBIENT_R(i))
+ ((side) ? NV20_3D_LIGHT_BACK_AMBIENT_R(i) : \
+ NV20_3D_LIGHT_FRONT_AMBIENT_R(i))
#define LIGHT_DIFFUSE_R(side, i) \
- ((side) ? NV20TCL_LIGHT_BACK_DIFFUSE_R(i) : \
- NV20TCL_LIGHT_FRONT_DIFFUSE_R(i))
+ ((side) ? NV20_3D_LIGHT_BACK_DIFFUSE_R(i) : \
+ NV20_3D_LIGHT_FRONT_DIFFUSE_R(i))
#define LIGHT_SPECULAR_R(side, i) \
- ((side) ? NV20TCL_LIGHT_BACK_SPECULAR_R(i) : \
- NV20TCL_LIGHT_FRONT_SPECULAR_R(i))
+ ((side) ? NV20_3D_LIGHT_BACK_SPECULAR_R(i) : \
+ NV20_3D_LIGHT_FRONT_SPECULAR_R(i))
#define MATERIAL_FACTOR_R(side) \
- ((side) ? NV20TCL_MATERIAL_FACTOR_BACK_R : \
- NV20TCL_MATERIAL_FACTOR_FRONT_R)
+ ((side) ? NV20_3D_MATERIAL_FACTOR_BACK_R : \
+ NV20_3D_MATERIAL_FACTOR_FRONT_R)
#define MATERIAL_FACTOR_A(side) \
- ((side) ? NV20TCL_MATERIAL_FACTOR_BACK_A : \
- NV20TCL_MATERIAL_FACTOR_FRONT_A)
+ ((side) ? NV20_3D_MATERIAL_FACTOR_BACK_A : \
+ NV20_3D_MATERIAL_FACTOR_FRONT_A)
#define MATERIAL_SHININESS(side) \
- ((side) ? NV20TCL_BACK_MATERIAL_SHININESS(0) : \
- NV20TCL_FRONT_MATERIAL_SHININESS(0))
+ ((side) ? NV20_3D_BACK_MATERIAL_SHININESS(0) : \
+ NV20_3D_FRONT_MATERIAL_SHININESS(0))
void
nv20_emit_clip_plane(struct gl_context *ctx, int emit)
@@ -65,22 +65,22 @@ get_material_bitmask(unsigned m)
unsigned ret = 0;
if (m & MAT_BIT_FRONT_EMISSION)
- ret |= NV20TCL_COLOR_MATERIAL_FRONT_EMISSION_COL1;
+ ret |= NV20_3D_COLOR_MATERIAL_FRONT_EMISSION_COL1;
if (m & MAT_BIT_FRONT_AMBIENT)
- ret |= NV20TCL_COLOR_MATERIAL_FRONT_AMBIENT_COL1;
+ ret |= NV20_3D_COLOR_MATERIAL_FRONT_AMBIENT_COL1;
if (m & MAT_BIT_FRONT_DIFFUSE)
- ret |= NV20TCL_COLOR_MATERIAL_FRONT_DIFFUSE_COL1;
+ ret |= NV20_3D_COLOR_MATERIAL_FRONT_DIFFUSE_COL1;
if (m & MAT_BIT_FRONT_SPECULAR)
- ret |= NV20TCL_COLOR_MATERIAL_FRONT_SPECULAR_COL1;
+ ret |= NV20_3D_COLOR_MATERIAL_FRONT_SPECULAR_COL1;
if (m & MAT_BIT_BACK_EMISSION)
- ret |= NV20TCL_COLOR_MATERIAL_BACK_EMISSION_COL1;
+ ret |= NV20_3D_COLOR_MATERIAL_BACK_EMISSION_COL1;
if (m & MAT_BIT_BACK_AMBIENT)
- ret |= NV20TCL_COLOR_MATERIAL_BACK_AMBIENT_COL1;
+ ret |= NV20_3D_COLOR_MATERIAL_BACK_AMBIENT_COL1;
if (m & MAT_BIT_BACK_DIFFUSE)
- ret |= NV20TCL_COLOR_MATERIAL_BACK_DIFFUSE_COL1;
+ ret |= NV20_3D_COLOR_MATERIAL_BACK_DIFFUSE_COL1;
if (m & MAT_BIT_BACK_SPECULAR)
- ret |= NV20TCL_COLOR_MATERIAL_BACK_SPECULAR_COL1;
+ ret |= NV20_3D_COLOR_MATERIAL_BACK_SPECULAR_COL1;
return ret;
}
@@ -92,7 +92,7 @@ nv20_emit_color_material(struct gl_context *ctx, int emit)
struct nouveau_grobj *kelvin = context_eng3d(ctx);
unsigned mask = get_material_bitmask(ctx->Light.ColorMaterialBitmask);
- BEGIN_RING(chan, kelvin, NV20TCL_COLOR_MATERIAL, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_COLOR_MATERIAL, 1);
OUT_RING(chan, ctx->Light.ColorMaterialEnabled ? mask : 0);
}
@@ -101,11 +101,11 @@ get_fog_mode_signed(unsigned mode)
{
switch (mode) {
case GL_LINEAR:
- return NV20TCL_FOG_MODE_LINEAR_SIGNED;
+ return NV20_3D_FOG_MODE_LINEAR_SIGNED;
case GL_EXP:
- return NV20TCL_FOG_MODE_EXP_SIGNED;
+ return NV20_3D_FOG_MODE_EXP_SIGNED;
case GL_EXP2:
- return NV20TCL_FOG_MODE_EXP2_SIGNED;
+ return NV20_3D_FOG_MODE_EXP2_SIGNED;
default:
assert(0);
}
@@ -116,11 +116,11 @@ get_fog_mode_unsigned(unsigned mode)
{
switch (mode) {
case GL_LINEAR:
- return NV20TCL_FOG_MODE_LINEAR_UNSIGNED;
+ return NV20_3D_FOG_MODE_LINEAR_UNSIGNED;
case GL_EXP:
- return NV20TCL_FOG_MODE_EXP_UNSIGNED;
+ return NV20_3D_FOG_MODE_EXP_UNSIGNED;
case GL_EXP2:
- return NV20TCL_FOG_MODE_EXP2_UNSIGNED;
+ return NV20_3D_FOG_MODE_EXP2_UNSIGNED;
default:
assert(0);
}
@@ -131,9 +131,9 @@ get_fog_source(unsigned source)
{
switch (source) {
case GL_FOG_COORDINATE_EXT:
- return NV20TCL_FOG_COORD_FOG;
+ return NV20_3D_FOG_COORD_FOG;
case GL_FRAGMENT_DEPTH_EXT:
- return NV20TCL_FOG_COORD_DIST_ORTHOGONAL_ABS;
+ return NV20_3D_FOG_COORD_DIST_ORTHOGONAL_ABS;
default:
assert(0);
}
@@ -152,15 +152,15 @@ nv20_emit_fog(struct gl_context *ctx, int emit)
nv10_get_fog_coeff(ctx, k);
- BEGIN_RING(chan, kelvin, NV20TCL_FOG_MODE, 4);
+ BEGIN_RING(chan, kelvin, NV20_3D_FOG_MODE, 4);
OUT_RING(chan, (source == GL_FOG_COORDINATE_EXT ?
get_fog_mode_signed(f->Mode) :
get_fog_mode_unsigned(f->Mode)));
OUT_RING(chan, get_fog_source(source));
- OUT_RING(chan, f->Enabled ? 1 : 0);
+ OUT_RINGb(chan, f->Enabled);
OUT_RING(chan, pack_rgba_f(MESA_FORMAT_RGBA8888_REV, f->Color));
- BEGIN_RING(chan, kelvin, NV20TCL_FOG_EQUATION_CONSTANT, 3);
+ BEGIN_RING(chan, kelvin, NV20_3D_FOG_COEFF(0), 3);
OUT_RINGp(chan, k, 3);
}
@@ -171,19 +171,19 @@ nv20_emit_light_model(struct gl_context *ctx, int emit)
struct nouveau_grobj *kelvin = context_eng3d(ctx);
struct gl_lightmodel *m = &ctx->Light.Model;
- BEGIN_RING(chan, kelvin, NV20TCL_SEPARATE_SPECULAR_ENABLE, 1);
- OUT_RING(chan, m->ColorControl == GL_SEPARATE_SPECULAR_COLOR ? 1 : 0);
+ BEGIN_RING(chan, kelvin, NV20_3D_SEPARATE_SPECULAR_ENABLE, 1);
+ OUT_RINGb(chan, m->ColorControl == GL_SEPARATE_SPECULAR_COLOR);
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHT_MODEL, 1);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHT_MODEL, 1);
OUT_RING(chan, ((m->LocalViewer ?
- NV20TCL_LIGHT_MODEL_VIEWER_LOCAL :
- NV20TCL_LIGHT_MODEL_VIEWER_NONLOCAL) |
+ NV20_3D_LIGHT_MODEL_VIEWER_LOCAL :
+ NV20_3D_LIGHT_MODEL_VIEWER_NONLOCAL) |
(NEED_SECONDARY_COLOR(ctx) ?
- NV20TCL_LIGHT_MODEL_SEPARATE_SPECULAR :
+ NV20_3D_LIGHT_MODEL_SEPARATE_SPECULAR :
0)));
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHT_MODEL_TWO_SIDE_ENABLE, 1);
- OUT_RING(chan, ctx->Light.Model.TwoSide ? 1 : 0);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHT_MODEL_TWO_SIDE_ENABLE, 1);
+ OUT_RINGb(chan, ctx->Light.Model.TwoSide);
}
void
@@ -195,19 +195,19 @@ nv20_emit_light_source(struct gl_context *ctx, int emit)
struct gl_light *l = &ctx->Light.Light[i];
if (l->_Flags & LIGHT_POSITIONAL) {
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHT_POSITION_X(i), 3);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHT_POSITION_X(i), 3);
OUT_RINGp(chan, l->_Position, 3);
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHT_ATTENUATION_CONSTANT(i), 3);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHT_ATTENUATION_CONSTANT(i), 3);
OUT_RINGf(chan, l->ConstantAttenuation);
OUT_RINGf(chan, l->LinearAttenuation);
OUT_RINGf(chan, l->QuadraticAttenuation);
} else {
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHT_DIRECTION_X(i), 3);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHT_DIRECTION_X(i), 3);
OUT_RINGp(chan, l->_VP_inf_norm, 3);
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHT_HALF_VECTOR_X(i), 3);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHT_HALF_VECTOR_X(i), 3);
OUT_RINGp(chan, l->_h_inf_norm, 3);
}
@@ -216,7 +216,7 @@ nv20_emit_light_source(struct gl_context *ctx, int emit)
nv10_get_spot_coeff(l, k);
- BEGIN_RING(chan, kelvin, NV20TCL_LIGHT_SPOT_CUTOFF_A(i), 7);
+ BEGIN_RING(chan, kelvin, NV20_3D_LIGHT_SPOT_CUTOFF(i, 0), 7);
OUT_RINGp(chan, k, 7);
}
}
@@ -340,7 +340,7 @@ nv20_emit_modelview(struct gl_context *ctx, int emit)
if (ctx->Light._NeedEyeCoords || ctx->Fog.Enabled ||
(ctx->Texture._GenFlags & TEXGEN_NEED_EYE_COORD)) {
- BEGIN_RING(chan, kelvin, NV20TCL_MODELVIEW0_MATRIX(0), 16);
+ BEGIN_RING(chan, kelvin, NV20_3D_MODELVIEW_MATRIX(0, 0), 16);
OUT_RINGm(chan, m->m);
}
@@ -349,7 +349,7 @@ nv20_emit_modelview(struct gl_context *ctx, int emit)
int i, j;
BEGIN_RING(chan, kelvin,
- NV20TCL_INVERSE_MODELVIEW0_MATRIX(0), 12);
+ NV20_3D_INVERSE_MODELVIEW_MATRIX(0, 0), 12);
for (i = 0; i < 3; i++)
for (j = 0; j < 4; j++)
OUT_RINGf(chan, m->inv[4*i + j]);
@@ -370,7 +370,7 @@ nv20_emit_projection(struct gl_context *ctx, int emit)
if (nctx->fallback == HWTNL)
_math_matrix_mul_matrix(&m, &m, &ctx->_ModelProjectMatrix);
- BEGIN_RING(chan, kelvin, NV20TCL_PROJECTION_MATRIX(0), 16);
+ BEGIN_RING(chan, kelvin, NV20_3D_PROJECTION_MATRIX(0), 16);
OUT_RINGm(chan, m.m);
_math_matrix_dtr(&m);
diff --git a/src/mesa/drivers/dri/nouveau/nv_m2mf.xml.h b/src/mesa/drivers/dri/nouveau/nv_m2mf.xml.h
new file mode 100644
index 0000000000..e370a1ca06
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nv_m2mf.xml.h
@@ -0,0 +1,155 @@
+#ifndef NV_M2MF_XML
+#define NV_M2MF_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv_m2mf.xml ( 2710 bytes, from 2010-11-01 00:28:46)
+- copyright.xml ( 6452 bytes, from 2010-11-15 15:10:58)
+- nv_object.xml ( 11547 bytes, from 2010-11-13 23:32:57)
+- nvchipsets.xml ( 3074 bytes, from 2010-11-13 23:32:57)
+- nv_defs.xml ( 4437 bytes, from 2010-11-01 00:28:46)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+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.
+*/
+
+
+
+#define NV04_M2MF_DMA_NOTIFY 0x00000180
+
+#define NV04_M2MF_DMA_BUFFER_IN 0x00000184
+
+#define NV04_M2MF_DMA_BUFFER_OUT 0x00000188
+
+
+#define NV50_M2MF_LINEAR_IN 0x00000200
+
+#define NV50_M2MF_TILING_MODE_IN 0x00000204
+
+#define NV50_M2MF_TILING_PITCH_IN 0x00000208
+
+#define NV50_M2MF_TILING_HEIGHT_IN 0x0000020c
+
+#define NV50_M2MF_TILING_DEPTH_IN 0x00000210
+
+#define NV50_M2MF_TILING_POSITION_IN_Z 0x00000214
+
+#define NV50_M2MF_TILING_POSITION_IN 0x00000218
+#define NV50_M2MF_TILING_POSITION_IN_X__MASK 0x0000ffff
+#define NV50_M2MF_TILING_POSITION_IN_X__SHIFT 0
+#define NV50_M2MF_TILING_POSITION_IN_Y__MASK 0xffff0000
+#define NV50_M2MF_TILING_POSITION_IN_Y__SHIFT 16
+
+#define NV50_M2MF_LINEAR_OUT 0x0000021c
+
+#define NV50_M2MF_TILING_MODE_OUT 0x00000220
+
+#define NV50_M2MF_TILING_PITCH_OUT 0x00000224
+
+#define NV50_M2MF_TILING_HEIGHT_OUT 0x00000228
+
+#define NV50_M2MF_TILING_DEPTH_OUT 0x0000022c
+
+#define NV50_M2MF_TILING_POSITION_OUT_Z 0x00000230
+
+#define NV50_M2MF_TILING_POSITION_OUT 0x00000234
+#define NV50_M2MF_TILING_POSITION_OUT_X__MASK 0x0000ffff
+#define NV50_M2MF_TILING_POSITION_OUT_X__SHIFT 0
+#define NV50_M2MF_TILING_POSITION_OUT_Y__MASK 0xffff0000
+#define NV50_M2MF_TILING_POSITION_OUT_Y__SHIFT 16
+
+#define NV50_M2MF_OFFSET_IN_HIGH 0x00000238
+
+#define NV50_M2MF_OFFSET_OUT_HIGH 0x0000023c
+
+#define NV04_M2MF_OFFSET_IN 0x0000030c
+
+#define NV04_M2MF_OFFSET_OUT 0x00000310
+
+#define NV04_M2MF_PITCH_IN 0x00000314
+
+#define NV04_M2MF_PITCH_OUT 0x00000318
+
+#define NV04_M2MF_LINE_LENGTH_IN 0x0000031c
+
+#define NV04_M2MF_LINE_COUNT 0x00000320
+
+#define NV04_M2MF_FORMAT 0x00000324
+#define NV04_M2MF_FORMAT_INPUT_INC__MASK 0x000000ff
+#define NV04_M2MF_FORMAT_INPUT_INC__SHIFT 0
+#define NV04_M2MF_FORMAT_INPUT_INC_1 0x00000001
+#define NV04_M2MF_FORMAT_INPUT_INC_2 0x00000002
+#define NV04_M2MF_FORMAT_INPUT_INC_4 0x00000004
+#define NV50_M2MF_FORMAT_INPUT_INC_8 0x00000008
+#define NV50_M2MF_FORMAT_INPUT_INC_16 0x00000010
+#define NV04_M2MF_FORMAT_OUTPUT_INC__MASK 0x0000ff00
+#define NV04_M2MF_FORMAT_OUTPUT_INC__SHIFT 8
+#define NV04_M2MF_FORMAT_OUTPUT_INC_1 0x00000100
+#define NV04_M2MF_FORMAT_OUTPUT_INC_2 0x00000200
+#define NV04_M2MF_FORMAT_OUTPUT_INC_4 0x00000400
+#define NV50_M2MF_FORMAT_OUTPUT_INC_8 0x00000800
+#define NV50_M2MF_FORMAT_OUTPUT_INC_16 0x00001000
+
+#define NV04_M2MF_BUF_NOTIFY 0x00000328
+
+
+#endif /* NV_M2MF_XML */
diff --git a/src/mesa/drivers/dri/nouveau/nv_object.xml.h b/src/mesa/drivers/dri/nouveau/nv_object.xml.h
new file mode 100644
index 0000000000..d5ed4bceb5
--- /dev/null
+++ b/src/mesa/drivers/dri/nouveau/nv_object.xml.h
@@ -0,0 +1,268 @@
+#ifndef NV_OBJECT_XML
+#define NV_OBJECT_XML
+
+/* Autogenerated file, DO NOT EDIT manually!
+
+This file was generated by the rules-ng-ng headergen tool in this git repository:
+http://0x04.net/cgit/index.cgi/rules-ng-ng
+git clone git://0x04.net/rules-ng-ng
+
+The rules-ng-ng source files this header was generated from are:
+- nv_object.xml ( 11547 bytes, from 2010-11-13 23:32:57)
+- copyright.xml ( 6452 bytes, from 2010-11-15 15:10:58)
+- nvchipsets.xml ( 3074 bytes, from 2010-11-13 23:32:57)
+- nv_defs.xml ( 4437 bytes, from 2010-11-01 00:28:46)
+
+Copyright (C) 2006-2010 by the following authors:
+- Artur Huillet <arthur.huillet@free.fr> (ahuillet)
+- Ben Skeggs (darktama, darktama_)
+- B. R. <koala_br@users.sourceforge.net> (koala_br)
+- Carlos Martin <carlosmn@users.sf.net> (carlosmn)
+- Christoph Bumiller <e0425955@student.tuwien.ac.at> (calim, chrisbmr)
+- Dawid Gajownik <gajownik@users.sf.net> (gajownik)
+- Dmitry Baryshkov
+- Dmitry Eremin-Solenikov <lumag@users.sf.net> (lumag)
+- EdB <edb_@users.sf.net> (edb_)
+- Erik Waling <erikwailing@users.sf.net> (erikwaling)
+- Francisco Jerez <currojerez@riseup.net> (curro)
+- imirkin <imirkin@users.sf.net> (imirkin)
+- jb17bsome <jb17bsome@bellsouth.net> (jb17bsome)
+- Jeremy Kolb <kjeremy@users.sf.net> (kjeremy)
+- Laurent Carlier <lordheavym@gmail.com> (lordheavy)
+- Luca Barbieri <luca@luca-barbieri.com> (lb, lb1)
+- Maarten Maathuis <madman2003@gmail.com> (stillunknown)
+- Marcin Kościelnicki <koriakin@0x04.net> (mwk, koriakin)
+- Mark Carey <mark.carey@gmail.com> (careym)
+- Matthieu Castet <matthieu.castet@parrot.com> (mat-c)
+- nvidiaman <nvidiaman@users.sf.net> (nvidiaman)
+- Patrice Mandin <patmandin@gmail.com> (pmandin, pmdata)
+- Pekka Paalanen <pq@iki.fi> (pq, ppaalanen)
+- Peter Popov <ironpeter@users.sf.net> (ironpeter)
+- Richard Hughes <hughsient@users.sf.net> (hughsient)
+- Rudi Cilibrasi <cilibrar@users.sf.net> (cilibrar)
+- Serge Martin
+- Simon Raffeiner
+- Stephane Loeuillet <leroutier@users.sf.net> (leroutier)
+- Stephane Marchesin <stephane.marchesin@gmail.com> (marcheu)
+- sturmflut <sturmflut@users.sf.net> (sturmflut)
+- Sylvain Munaut <tnt@246tNt.com>
+- Victor Stinner <victor.stinner@haypocalc.com> (haypo)
+- Wladmir van der Laan <laanwj@gmail.com> (miathan6)
+- Younes Manton <younes.m@gmail.com> (ymanton)
+
+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.
+*/
+
+
+#define NV01_ROOT 0x00000001
+#define NV01_CONTEXT_DMA 0x00000002
+#define NV01_DEVICE 0x00000003
+#define NV01_TIMER 0x00000004
+#define NV01_NULL 0x00000030
+#define NV01_MEMORY_LOCAL_BANKED 0x0000003d
+#define NV01_MAPPING_SYSTEM 0x0000003e
+#define NV03_MEMORY_LOCAL_CURSOR 0x0000003f
+#define NV01_MEMORY_LOCAL_LINEAR 0x00000040
+#define NV01_MAPPING_LOCAL 0x00000041
+#define NV03_VIDEO_LUT_CURSOR_DAC 0x00000046
+#define NV03_CHANNEL_PIO 0x0000006a
+#define NV03_CHANNEL_DMA 0x0000006b
+#define NV10_VIDEO_DISPLAY 0x0000007c
+#define NV01_CONTEXT_BETA1 0x00000012
+#define NV04_BETA_SOLID 0x00000072
+#define NV01_CONTEXT_COLOR_KEY 0x00000017
+#define NV04_CONTEXT_COLOR_KEY 0x00000057
+#define NV01_CONTEXT_PATTERN 0x00000018
+#define NV01_CONTEXT_CLIP_RECTANGLE 0x00000019
+#define NV03_CONTEXT_ROP 0x00000043
+#define NV04_IMAGE_PATTERN 0x00000044
+#define NV01_RENDER_SOLID_LINE 0x0000001c
+#define NV04_RENDER_SOLID_LINE 0x0000005c
+#define NV30_RENDER_SOLID_LINE 0x0000035c
+#define NV40_RENDER_SOLID_LINE 0x0000305c
+#define NV01_RENDER_SOLID_TRIANGLE 0x0000001d
+#define NV04_RENDER_SOLID_TRIANGLE 0x0000005d
+#define NV01_RENDER_SOLID_RECTANGLE 0x0000001e
+#define NV04_RENDER_SOLID_RECTANGLE 0x0000005e
+#define NV01_IMAGE_BLIT 0x0000001f
+#define NV04_IMAGE_BLIT 0x0000005f
+#define NV11_IMAGE_BLIT 0x0000009f
+#define NV01_IMAGE_FROM_CPU 0x00000021
+#define NV04_IMAGE_FROM_CPU 0x00000061
+#define NV05_IMAGE_FROM_CPU 0x00000065
+#define NV10_IMAGE_FROM_CPU 0x0000008a
+#define NV30_IMAGE_FROM_CPU 0x0000038a
+#define NV40_IMAGE_FROM_CPU 0x0000308a
+#define NV03_STRETCHED_IMAGE_FROM_CPU 0x00000036
+#define NV04_STRETCHED_IMAGE_FROM_CPU 0x00000076
+#define NV05_STRETCHED_IMAGE_FROM_CPU 0x00000066
+#define NV30_STRETCHED_IMAGE_FROM_CPU 0x00000366
+#define NV40_STRETCHED_IMAGE_FROM_CPU 0x00003066
+#define NV03_SCALED_IMAGE_FROM_MEMORY 0x00000037
+#define NV04_SCALED_IMAGE_FROM_MEMORY 0x00000077
+#define NV05_SCALED_IMAGE_FROM_MEMORY 0x00000063
+#define NV10_SCALED_IMAGE_FROM_MEMORY 0x00000089
+#define NV30_SCALED_IMAGE_FROM_MEMORY 0x00000389
+#define NV40_SCALED_IMAGE_FROM_MEMORY 0x00003089
+#define NV50_SCALED_IMAGE_FROM_MEMORY 0x00005089
+#define NV04_DVD_SUBPICTURE 0x00000038
+#define NV10_DVD_SUBPICTURE 0x00000088
+#define NV03_GDI_RECTANGLE_TEXT 0x0000004b
+#define NV04_GDI_RECTANGLE_TEXT 0x0000004a
+#define NV04_SWIZZLED_SURFACE 0x00000052
+#define NV20_SWIZZLED_SURFACE 0x0000009e
+#define NV30_SWIZZLED_SURFACE 0x0000039e
+#define NV40_SWIZZLED_SURFACE 0x0000309e
+#define NV03_CONTEXT_SURFACE_DST 0x00000058
+#define NV03_CONTEXT_SURFACE_SRC 0x00000059
+#define NV04_CONTEXT_SURFACES_2D 0x00000042
+#define NV10_CONTEXT_SURFACES_2D 0x00000062
+#define NV30_CONTEXT_SURFACES_2D 0x00000362
+#define NV40_CONTEXT_SURFACES_2D 0x00003062
+#define NV50_CONTEXT_SURFACES_2D 0x00005062
+#define NV04_INDEXED_IMAGE_FROM_CPU 0x00000060
+#define NV05_INDEXED_IMAGE_FROM_CPU 0x00000064
+#define NV30_INDEXED_IMAGE_FROM_CPU 0x00000364
+#define NV40_INDEXED_IMAGE_FROM_CPU 0x00003064
+#define NV10_TEXTURE_FROM_CPU 0x0000007b
+#define NV30_TEXTURE_FROM_CPU 0x0000037b
+#define NV40_TEXTURE_FROM_CPU 0x0000307b
+#define NV04_M2MF 0x00000039
+#define NV50_M2MF 0x00005039
+#define NVC0_M2MF 0x00009039
+#define NV03_TEXTURED_TRIANGLE 0x00000048
+#define NV04_TEXTURED_TRIANGLE 0x00000054
+#define NV10_TEXTURED_TRIANGLE 0x00000094
+#define NV04_MULTITEX_TRIANGLE 0x00000055
+#define NV10_MULTITEX_TRIANGLE 0x00000095
+#define NV03_CONTEXT_SURFACE_COLOR 0x0000005a
+#define NV03_CONTEXT_SURFACE_ZETA 0x0000005b
+#define NV04_CONTEXT_SURFACES_3D 0x00000053
+#define NV10_CONTEXT_SURFACES_3D 0x00000093
+#define NV10_3D 0x00000056
+#define NV11_3D 0x00000096
+#define NV17_3D 0x00000099
+#define NV20_3D 0x00000097
+#define NV25_3D 0x00000597
+#define NV30_3D 0x00000397
+#define NV35_3D 0x00000497
+#define NV34_3D 0x00000697
+#define NV40_3D 0x00004097
+#define NV44_3D 0x00004497
+#define NV50_3D 0x00005097
+#define NV84_3D 0x00008297
+#define NVA0_3D 0x00008397
+#define NVA3_3D 0x00008597
+#define NVAF_3D 0x00008697
+#define NVC0_3D 0x00009097
+#define NV50_2D 0x0000502d
+#define NVC0_2D 0x0000902d
+#define NV50_COMPUTE 0x000050c0
+#define NVA3_COMPUTE 0x000085c0
+#define NVC0_COMPUTE 0x000090c0
+#define NV84_CRYPT 0x000074c1
+#define NV01_SUBCHAN__SIZE 0x00002000
+#define NV01_SUBCHAN 0x00000000
+
+#define NV01_SUBCHAN_OBJECT 0x00000000
+
+
+#define NV84_SUBCHAN_QUERY_ADDRESS_HIGH 0x00000010
+
+#define NV84_SUBCHAN_QUERY_ADDRESS_LOW 0x00000014
+
+#define NV84_SUBCHAN_QUERY_COUNTER 0x00000018
+
+#define NV84_SUBCHAN_QUERY_GET 0x0000001c
+
+#define NV84_SUBCHAN_QUERY_INTR 0x00000020
+
+#define NV84_SUBCHAN_WRCACHE_FLUSH 0x00000024
+
+#define NV10_SUBCHAN_REF_CNT 0x00000050
+
+
+#define NV11_SUBCHAN_DMA_SEMAPHORE 0x00000060
+
+#define NV11_SUBCHAN_SEMAPHORE_OFFSET 0x00000064
+
+#define NV11_SUBCHAN_SEMAPHORE_ACQUIRE 0x00000068
+
+#define NV11_SUBCHAN_SEMAPHORE_RELEASE 0x0000006c
+
+#define NV40_SUBCHAN_YIELD 0x00000080
+
+#define NV01_GRAPH 0x00000000
+
+#define NV04_GRAPH_NOP 0x00000100
+
+#define NV01_GRAPH_NOTIFY 0x00000104
+#define NV01_GRAPH_NOTIFY_WRITE 0x00000000
+#define NV01_GRAPH_NOTIFY_WRITE_AND_AWAKEN 0x00000001
+
+#define NV50_GRAPH_WAIT_FOR_IDLE 0x00000110
+
+#define NVA3_GRAPH_UNK0120 0x00000120
+
+#define NVA3_GRAPH_UNK0124 0x00000124
+
+#define NV40_GRAPH_PM_TRIGGER 0x00000140
+
+#define NVC0_SUBCHAN__SIZE 0x00008000
+#define NVC0_SUBCHAN 0x00000000
+
+#define NVC0_SUBCHAN_OBJECT 0x00000000
+
+
+#define NVC0_SUBCHAN_QUERY_ADDRESS_HIGH 0x00000010
+
+#define NVC0_SUBCHAN_QUERY_ADDRESS_LOW 0x00000014
+
+#define NVC0_SUBCHAN_QUERY_SEQUENCE 0x00000018
+
+#define NVC0_SUBCHAN_QUERY_GET 0x0000001c
+
+#define NVC0_SUBCHAN_REF_CNT 0x00000050
+
+#define NVC0_GRAPH 0x00000000
+
+#define NVC0_GRAPH_NOP 0x00000100
+
+#define NVC0_GRAPH_NOTIFY_ADDRESS_HIGH 0x00000104
+
+#define NVC0_GRAPH_NOTIFY_ADDRESS_LOW 0x00000108
+
+#define NVC0_GRAPH_NOTIFY 0x0000010c
+#define NVC0_GRAPH_NOTIFY_WRITE 0x00000000
+#define NVC0_GRAPH_NOTIFY_WRITE_AND_AWAKEN 0x00000001
+
+#define NVC0_GRAPH_SERIALIZE 0x00000110
+
+#define NVC0_GRAPH_MACRO_UPLOAD_POS 0x00000114
+
+#define NVC0_GRAPH_MACRO_UPLOAD_DATA 0x00000118
+
+#define NVC0_GRAPH_MACRO_ID 0x0000011c
+
+#define NVC0_GRAPH_MACRO_POS 0x00000120
+
+
+#endif /* NV_OBJECT_XML */
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 723e31401d..5abfc9dac5 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -71,6 +71,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define need_GL_NV_vertex_program
#define need_GL_ARB_point_parameters
#define need_GL_EXT_framebuffer_object
+#define need_GL_OES_EGL_image
+
#include "main/remap_helper.h"
#define DRIVER_DATE "20060602"
@@ -137,6 +139,9 @@ static const struct dri_extension card_extensions[] =
{ "GL_ATI_texture_mirror_once", NULL },
{ "GL_MESA_pack_invert", NULL },
{ "GL_NV_blend_square", NULL },
+#if FEATURE_OES_EGL_image
+ { "GL_OES_EGL_image", GL_OES_EGL_image_functions },
+#endif
{ NULL, NULL }
};
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index 38864162ce..c56a49d5ad 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -319,10 +319,9 @@ static INLINE GLuint reduced_hw_prim( struct gl_context *ctx, GLuint prim)
{
switch (prim) {
case GL_POINTS:
- return (ctx->Point.PointSprite ||
- ((ctx->_TriangleCaps & (DD_POINT_SIZE | DD_POINT_ATTEN)) &&
- !(ctx->_TriangleCaps & (DD_POINT_SMOOTH)))) ?
- R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS;
+ return (((R200_CONTEXT(ctx))->radeon.radeonScreen->drmSupportsPointSprites &&
+ !(ctx->_TriangleCaps & DD_POINT_SMOOTH)) ?
+ R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS);
case GL_LINES:
/* fallthrough */
case GL_LINE_LOOP:
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index 84db7c9d4e..7aed116f0b 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -68,9 +68,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define HAVE_ELTS 1
-#define HW_POINTS ((ctx->Point.PointSprite || \
- ((ctx->_TriangleCaps & (DD_POINT_SIZE | DD_POINT_ATTEN)) && \
- !(ctx->_TriangleCaps & (DD_POINT_SMOOTH)))) ? \
+#define HW_POINTS (((R200_CONTEXT(ctx))->radeon.radeonScreen->drmSupportsPointSprites && \
+ !(ctx->_TriangleCaps & DD_POINT_SMOOTH)) ? \
R200_VF_PRIM_POINT_SPRITES : R200_VF_PRIM_POINTS)
#define HW_LINES R200_VF_PRIM_LINES
#define HW_LINE_LOOP 0
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index 5207c2901a..064324731b 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -537,6 +537,10 @@ void r200InitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *fu
functions->MapTexture = radeonMapTexture;
functions->UnmapTexture = radeonUnmapTexture;
+#if FEATURE_OES_EGL_image
+ functions->EGLImageTargetTexture2D = radeon_image_target_texture_2d;
+#endif
+
driInitTextureFormats();
}
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index 690bec640b..24fb031ecb 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -778,6 +778,7 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
radeonTexObjPtr t;
uint32_t pitch_val;
uint32_t internalFormat, type, format;
+ gl_format texFormat;
type = GL_BGRA;
format = GL_UNSIGNED_BYTE;
@@ -817,10 +818,6 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
radeon_miptree_unreference(&t->mt);
radeon_miptree_unreference(&rImage->mt);
- _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
- rb->base.Width, rb->base.Height, 1, 0, rb->cpp);
- texImage->RowStride = rb->pitch / rb->cpp;
-
rImage->bo = rb->bo;
radeon_bo_ref(rImage->bo);
t->bo = rb->bo;
@@ -832,22 +829,35 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
pitch_val = rb->pitch;
switch (rb->cpp) {
case 4:
- if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
+ if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
+ texFormat = MESA_FORMAT_RGB888;
t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format;
- else
+ }
+ else {
+ texFormat = MESA_FORMAT_ARGB8888;
t->pp_txformat = tx_table_le[MESA_FORMAT_ARGB8888].format;
+ }
t->pp_txfilter |= tx_table_le[MESA_FORMAT_ARGB8888].filter;
break;
case 3:
default:
+ texFormat = MESA_FORMAT_RGB888;
t->pp_txformat = tx_table_le[MESA_FORMAT_RGB888].format;
t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB888].filter;
break;
case 2:
+ texFormat = MESA_FORMAT_RGB565;
t->pp_txformat = tx_table_le[MESA_FORMAT_RGB565].format;
t->pp_txfilter |= tx_table_le[MESA_FORMAT_RGB565].filter;
break;
}
+
+ _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
+ rb->base.Width, rb->base.Height, 1, 0,
+ rb->cpp, texFormat);
+ texImage->RowStride = rb->pitch / rb->cpp;
+
+
t->pp_txsize = ((rb->base.Width - 1) << RADEON_TEX_USIZE_SHIFT)
| ((rb->base.Height - 1) << RADEON_TEX_VSIZE_SHIFT);
t->pp_txformat |= R200_TXFORMAT_NON_POWER2;
diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
index 8be32ea91f..1db8678e89 100644
--- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_emit.c
@@ -76,6 +76,9 @@ static void use_temporary(struct r300_fragment_program_code *code, unsigned int
static unsigned int use_source(struct r300_fragment_program_code* code, struct rc_pair_instruction_source src)
{
+ if (!src.Used)
+ return 0;
+
if (src.File == RC_FILE_CONSTANT) {
return src.Index | (1 << 5);
} else if (src.File == RC_FILE_TEMPORARY) {
diff --git a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
index 2d28b06539..05d3da8a10 100644
--- a/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
+++ b/src/mesa/drivers/dri/r300/compiler/r300_fragprog_swizzle.c
@@ -94,6 +94,7 @@ static const struct swizzle_data* lookup_native_swizzle(unsigned int swizzle)
*/
static int r300_swizzle_is_native(rc_opcode opcode, struct rc_src_register reg)
{
+ const struct swizzle_data* sd;
unsigned int relevant;
int j;
@@ -127,7 +128,8 @@ static int r300_swizzle_is_native(rc_opcode opcode, struct rc_src_register reg)
if ((reg.Negate & relevant) && ((reg.Negate & relevant) != relevant))
return 0;
- if (!lookup_native_swizzle(reg.Swizzle))
+ sd = lookup_native_swizzle(reg.Swizzle);
+ if (!sd || (reg.File == RC_FILE_PRESUB && sd->srcp_stride == 0))
return 0;
return 1;
@@ -201,7 +203,7 @@ unsigned int r300FPTranslateRGBSwizzle(unsigned int src, unsigned int swizzle)
{
const struct swizzle_data* sd = lookup_native_swizzle(swizzle);
- if (!sd) {
+ if (!sd || (src == RC_PAIR_PRESUB_SRC && sd->srcp_stride == 0)) {
fprintf(stderr, "Not a native swizzle: %08x\n", swizzle);
return 0;
}
diff --git a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
index 2f130198d3..7b9c316794 100644
--- a/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
+++ b/src/mesa/drivers/dri/r300/compiler/r3xx_fragprog.c
@@ -137,7 +137,7 @@ void r3xx_compile_fragment_program(struct r300_fragment_program_compiler* c)
/* This pass makes it easier for the scheduler to group TEX
* instructions and reduces the chances of creating too
* many texture indirections.*/
- {"register rename", 1, !is_r500, rc_rename_regs, NULL},
+ {"register rename", 1, !is_r500 || opt, rc_rename_regs, NULL},
{"pair translate", 1, 1, rc_pair_translate, NULL},
{"pair scheduling", 1, 1, rc_pair_schedule, NULL},
{"register allocation", 1, opt, rc_pair_regalloc, NULL},
diff --git a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
index 6f101c68eb..5da82d90f6 100644
--- a/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
+++ b/src/mesa/drivers/dri/r300/compiler/r500_fragprog_emit.c
@@ -45,9 +45,6 @@
#include "radeon_program_pair.h"
-#define MAX_BRANCH_DEPTH_FULL 32
-#define MAX_BRANCH_DEPTH_PARTIAL 4
-
#define PROG_CODE \
struct r500_fragment_program_code *code = &c->code->code.r500
@@ -200,6 +197,9 @@ static void use_temporary(struct r500_fragment_program_code* code, unsigned int
static unsigned int use_source(struct r500_fragment_program_code* code, struct rc_pair_instruction_source src)
{
+ if (!src.Used)
+ return 0;
+
if (src.File == RC_FILE_CONSTANT) {
return src.Index | 0x100;
} else if (src.File == RC_FILE_TEMPORARY) {
@@ -506,7 +506,7 @@ static void emit_flowcontrol(struct emit_state * s, struct rc_instruction * inst
break;
}
case RC_OPCODE_IF:
- if ( s->CurrentBranchDepth >= MAX_BRANCH_DEPTH_FULL) {
+ if ( s->CurrentBranchDepth >= R500_PFS_MAX_BRANCH_DEPTH_FULL) {
rc_error(s->C, "Branch depth exceeds hardware limit");
return;
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_code.h b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
index cfb6df2cd7..b69e81698a 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_code.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
@@ -34,6 +34,8 @@
#define R500_PFS_MAX_INST 512
#define R500_PFS_NUM_TEMP_REGS 128
#define R500_PFS_NUM_CONST_REGS 256
+#define R500_PFS_MAX_BRANCH_DEPTH_FULL 32
+#define R500_PFS_MAX_BRANCH_DEPTH_PARTIAL 4
#define STATE_R300_WINDOW_DIMENSION (STATE_INTERNAL_DRIVER+0)
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c
index 97f4c75849..2b8d284ce9 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.c
@@ -31,6 +31,8 @@
#include "radeon_compiler_util.h"
+#include "radeon_compiler.h"
+#include "radeon_dataflow.h"
/**
*/
unsigned int rc_swizzle_to_writemask(unsigned int swz)
@@ -59,3 +61,123 @@ unsigned int rc_src_reads_dst_mask(
}
return dst_mask & rc_swizzle_to_writemask(src_swz);
}
+
+unsigned int rc_source_type_swz(unsigned int swizzle, unsigned int channels)
+{
+ unsigned int chan;
+ unsigned int swz = RC_SWIZZLE_UNUSED;
+ unsigned int ret = RC_SOURCE_NONE;
+
+ for(chan = 0; chan < channels; chan++) {
+ swz = GET_SWZ(swizzle, chan);
+ if (swz == RC_SWIZZLE_W) {
+ ret |= RC_SOURCE_ALPHA;
+ } else if (swz == RC_SWIZZLE_X || swz == RC_SWIZZLE_Y
+ || swz == RC_SWIZZLE_Z) {
+ ret |= RC_SOURCE_RGB;
+ }
+ }
+ return ret;
+}
+
+unsigned int rc_source_type_mask(unsigned int mask)
+{
+ unsigned int ret = RC_SOURCE_NONE;
+
+ if (mask & RC_MASK_XYZ)
+ ret |= RC_SOURCE_RGB;
+
+ if (mask & RC_MASK_W)
+ ret |= RC_SOURCE_ALPHA;
+
+ return ret;
+}
+
+struct can_use_presub_data {
+ struct rc_src_register RemoveSrcs[3];
+ unsigned int RGBCount;
+ unsigned int AlphaCount;
+};
+
+static void can_use_presub_read_cb(
+ void * userdata,
+ struct rc_instruction * inst,
+ rc_register_file file,
+ unsigned int index,
+ unsigned int mask)
+{
+ struct can_use_presub_data * d = userdata;
+ unsigned int src_type = rc_source_type_mask(mask);
+ unsigned int i;
+
+ if (file == RC_FILE_NONE)
+ return;
+
+ for(i = 0; i < 3; i++) {
+ if (d->RemoveSrcs[i].File == file
+ && d->RemoveSrcs[i].Index == index) {
+ src_type &=
+ ~rc_source_type_swz(d->RemoveSrcs[i].Swizzle, 4);
+ }
+ }
+
+ if (src_type & RC_SOURCE_RGB)
+ d->RGBCount++;
+
+ if (src_type & RC_SOURCE_ALPHA)
+ d->AlphaCount++;
+}
+
+unsigned int rc_inst_can_use_presub(
+ struct rc_instruction * inst,
+ rc_presubtract_op presub_op,
+ unsigned int presub_writemask,
+ struct rc_src_register replace_reg,
+ struct rc_src_register presub_src0,
+ struct rc_src_register presub_src1)
+{
+ struct can_use_presub_data d;
+ unsigned int num_presub_srcs;
+ unsigned int presub_src_type = rc_source_type_mask(presub_writemask);
+ const struct rc_opcode_info * info =
+ rc_get_opcode_info(inst->U.I.Opcode);
+
+ if (presub_op == RC_PRESUB_NONE) {
+ return 1;
+ }
+
+ if (info->HasTexture) {
+ return 0;
+ }
+
+ /* We can't use more than one presubtract value in an
+ * instruction, unless the two prsubtract operations
+ * are the same and read from the same registers.
+ * XXX For now we will limit instructions to only one presubtract
+ * value.*/
+ if (inst->U.I.PreSub.Opcode != RC_PRESUB_NONE) {
+ return 0;
+ }
+
+ memset(&d, 0, sizeof(d));
+ d.RemoveSrcs[0] = replace_reg;
+ d.RemoveSrcs[1] = presub_src0;
+ d.RemoveSrcs[2] = presub_src1;
+
+ rc_for_all_reads_mask(inst, can_use_presub_read_cb, &d);
+
+ num_presub_srcs = rc_presubtract_src_reg_count(presub_op);
+
+ if ((presub_src_type & RC_SOURCE_RGB)
+ && d.RGBCount + num_presub_srcs > 3) {
+ return 0;
+ }
+
+ if ((presub_src_type & RC_SOURCE_ALPHA)
+ && d.AlphaCount + num_presub_srcs > 3) {
+ return 0;
+ }
+
+ return 1;
+}
+
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h
index 1a14e7cb0e..e50dfbd4fb 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler_util.h
@@ -3,6 +3,9 @@
#ifndef RADEON_PROGRAM_UTIL_H
#define RADEON_PROGRAM_UTIL_H
+struct rc_instruction;
+struct rc_src_register;
+
unsigned int rc_swizzle_to_writemask(unsigned int swz);
unsigned int rc_src_reads_dst_mask(
@@ -13,4 +16,16 @@ unsigned int rc_src_reads_dst_mask(
unsigned int dst_idx,
unsigned int dst_mask);
+unsigned int rc_source_type_swz(unsigned int swizzle, unsigned int channels);
+
+unsigned int rc_source_type_mask(unsigned int mask);
+
+unsigned int rc_inst_can_use_presub(
+ struct rc_instruction * inst,
+ rc_presubtract_op presub_op,
+ unsigned int presub_writemask,
+ struct rc_src_register replace_reg,
+ struct rc_src_register presub_src0,
+ struct rc_src_register presub_src1);
+
#endif /* RADEON_PROGRAM_UTIL_H */
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
index 5927498818..9df07edf2b 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.c
@@ -139,7 +139,46 @@ static void pair_sub_for_all_args(
const struct rc_opcode_info * info = rc_get_opcode_info(sub->Opcode);
for(i = 0; i < info->NumSrcRegs; i++) {
- cb(userdata, fullinst, &sub->Arg[i]);
+ unsigned int src_type;
+ unsigned int channels = 0;
+ if (&fullinst->U.P.RGB == sub)
+ channels = 3;
+ else if (&fullinst->U.P.Alpha == sub)
+ channels = 1;
+
+ assert(channels > 0);
+ src_type = rc_source_type_swz(sub->Arg[i].Swizzle, channels);
+
+ if (src_type == RC_SOURCE_NONE)
+ continue;
+
+ if (sub->Arg[i].Source == RC_PAIR_PRESUB_SRC) {
+ unsigned int presub_type;
+ unsigned int presub_src_count;
+ struct rc_pair_instruction_source * src_array;
+ unsigned int j;
+ if (src_type & RC_SOURCE_RGB) {
+ presub_type = fullinst->
+ U.P.RGB.Src[RC_PAIR_PRESUB_SRC].Index;
+ src_array = fullinst->U.P.RGB.Src;
+ } else {
+ presub_type = fullinst->
+ U.P.Alpha.Src[RC_PAIR_PRESUB_SRC].Index;
+ src_array = fullinst->U.P.Alpha.Src;
+ }
+ presub_src_count
+ = rc_presubtract_src_reg_count(presub_type);
+ for(j = 0; j < presub_src_count; j++) {
+ cb(userdata, fullinst, &sub->Arg[i],
+ &src_array[j]);
+ }
+ } else {
+ struct rc_pair_instruction_source * src =
+ rc_pair_get_src(&fullinst->U.P, &sub->Arg[i]);
+ if (src) {
+ cb(userdata, fullinst, &sub->Arg[i], src);
+ }
+ }
}
}
@@ -430,12 +469,29 @@ static rc_opcode get_flow_control_inst(struct rc_instruction * inst)
}
+struct branch_write_mask {
+ unsigned int IfWriteMask:4;
+ unsigned int ElseWriteMask:4;
+ unsigned int HasElse:1;
+};
+
+union get_readers_read_cb {
+ rc_read_src_fn I;
+ rc_pair_read_arg_fn P;
+};
+
struct get_readers_callback_data {
struct radeon_compiler * C;
struct rc_reader_data * ReaderData;
- rc_read_src_fn ReadCB;
+ rc_read_src_fn ReadNormalCB;
+ rc_pair_read_arg_fn ReadPairCB;
rc_read_write_mask_fn WriteCB;
+ rc_register_file DstFile;
+ unsigned int DstIndex;
+ unsigned int DstMask;
unsigned int AliveWriteMask;
+ /* For convenience, this is indexed starting at 1 */
+ struct branch_write_mask BranchMasks[R500_PFS_MAX_BRANCH_DEPTH_FULL + 1];
};
static void add_reader(
@@ -443,7 +499,7 @@ static void add_reader(
struct rc_reader_data * data,
struct rc_instruction * inst,
unsigned int mask,
- struct rc_src_register * src)
+ void * arg_or_src)
{
struct rc_reader * new;
memory_pool_array_reserve(pool, struct rc_reader, data->Readers,
@@ -451,7 +507,74 @@ static void add_reader(
new = &data->Readers[data->ReaderCount++];
new->Inst = inst;
new->WriteMask = mask;
- new->Src = src;
+ if (inst->Type == RC_INSTRUCTION_NORMAL) {
+ new->U.Src = arg_or_src;
+ } else {
+ new->U.Arg = arg_or_src;
+ }
+}
+
+static unsigned int get_readers_read_callback(
+ struct get_readers_callback_data * cb_data,
+ unsigned int has_rel_addr,
+ rc_register_file file,
+ unsigned int index,
+ unsigned int swizzle)
+{
+ unsigned int shared_mask, read_mask;
+
+ if (has_rel_addr) {
+ cb_data->ReaderData->Abort = 1;
+ return RC_MASK_NONE;
+ }
+
+ shared_mask = rc_src_reads_dst_mask(file, index, swizzle,
+ cb_data->DstFile, cb_data->DstIndex, cb_data->AliveWriteMask);
+
+ if (shared_mask == RC_MASK_NONE)
+ return shared_mask;
+
+ /* If we make it this far, it means that this source reads from the
+ * same register written to by d->ReaderData->Writer. */
+
+ read_mask = rc_swizzle_to_writemask(swizzle);
+ if (cb_data->ReaderData->AbortOnRead & read_mask) {
+ cb_data->ReaderData->Abort = 1;
+ return shared_mask;
+ }
+
+ /* XXX The behavior in this case should be configurable. */
+ if ((read_mask & cb_data->AliveWriteMask) != read_mask) {
+ cb_data->ReaderData->Abort = 1;
+ return shared_mask;
+ }
+
+ return shared_mask;
+}
+
+static void get_readers_pair_read_callback(
+ void * userdata,
+ struct rc_instruction * inst,
+ struct rc_pair_instruction_arg * arg,
+ struct rc_pair_instruction_source * src)
+{
+ unsigned int shared_mask;
+ struct get_readers_callback_data * d = userdata;
+
+ shared_mask = get_readers_read_callback(d,
+ 0 /*Pair Instructions don't use RelAddr*/,
+ src->File, src->Index, arg->Swizzle);
+
+ if (shared_mask == RC_MASK_NONE)
+ return;
+
+ if (d->ReadPairCB)
+ d->ReadPairCB(d->ReaderData, inst, arg, src);
+
+ if (d->ReaderData->Abort)
+ return;
+
+ add_reader(&d->C->Pool, d->ReaderData, inst, shared_mask, arg);
}
/**
@@ -464,36 +587,18 @@ static void get_readers_normal_read_callback(
struct rc_src_register * src)
{
struct get_readers_callback_data * d = userdata;
- unsigned int read_mask;
-
- if (src->RelAddr)
- d->ReaderData->Abort = 1;
+ unsigned int shared_mask;
- unsigned int shared_mask = rc_src_reads_dst_mask(src->File, src->Index,
- src->Swizzle,
- d->ReaderData->Writer->U.I.DstReg.File,
- d->ReaderData->Writer->U.I.DstReg.Index,
- d->AliveWriteMask);
+ shared_mask = get_readers_read_callback(d,
+ src->RelAddr, src->File, src->Index, src->Swizzle);
if (shared_mask == RC_MASK_NONE)
return;
+ /* The callback function could potentially clear d->ReaderData->Abort,
+ * so we need to call it before we return. */
+ if (d->ReadNormalCB)
+ d->ReadNormalCB(d->ReaderData, inst, src);
- /* If we make it this far, it means that this source reads from the
- * same register written to by d->ReaderData->Writer. */
-
- if (d->ReaderData->AbortOnRead) {
- d->ReaderData->Abort = 1;
- return;
- }
-
- read_mask = rc_swizzle_to_writemask(src->Swizzle);
- /* XXX The behavior in this case should be configurable. */
- if ((read_mask & d->AliveWriteMask) != read_mask) {
- d->ReaderData->Abort = 1;
- return;
- }
-
- d->ReadCB(d->ReaderData, inst, src);
if (d->ReaderData->Abort)
return;
@@ -514,29 +619,132 @@ static void get_readers_write_callback(
{
struct get_readers_callback_data * d = userdata;
- if (index == d->ReaderData->Writer->U.I.DstReg.Index
- && file == d->ReaderData->Writer->U.I.DstReg.File) {
- unsigned int shared_mask = mask
- & d->ReaderData->Writer->U.I.DstReg.WriteMask;
- if (d->ReaderData->InElse) {
- if (shared_mask & d->AliveWriteMask) {
- /* We set AbortOnRead here because the
- * destination register of d->ReaderData->Writer
- * is written to in both the IF and the
- * ELSE block of this IF/ELSE statement.
- * This means that readers of this
- * destination register that follow this IF/ELSE
- * statement use the value of different
- * instructions depending on the control flow
- * decisions made by the program. */
- d->ReaderData->AbortOnRead = 1;
+ if (index == d->DstIndex && file == d->DstFile) {
+ unsigned int shared_mask = mask & d->DstMask;
+ d->ReaderData->AbortOnRead &= ~shared_mask;
+ d->AliveWriteMask &= ~shared_mask;
+ }
+
+ if(d->WriteCB)
+ d->WriteCB(d->ReaderData, inst, file, index, mask);
+}
+
+static void get_readers_for_single_write(
+ void * userdata,
+ struct rc_instruction * writer,
+ rc_register_file dst_file,
+ unsigned int dst_index,
+ unsigned int dst_mask)
+{
+ struct rc_instruction * tmp;
+ unsigned int branch_depth = 0;
+ struct get_readers_callback_data * d = userdata;
+
+ d->ReaderData->Writer = writer;
+ d->ReaderData->AbortOnRead = 0;
+ d->ReaderData->InElse = 0;
+ d->DstFile = dst_file;
+ d->DstIndex = dst_index;
+ d->DstMask = dst_mask;
+ d->AliveWriteMask = dst_mask;
+ memset(d->BranchMasks, 0, sizeof(d->BranchMasks));
+
+ if (!dst_mask)
+ return;
+
+ for(tmp = writer->Next; tmp != &d->C->Program.Instructions;
+ tmp = tmp->Next){
+ rc_opcode opcode = get_flow_control_inst(tmp);
+ switch(opcode) {
+ case RC_OPCODE_BGNLOOP:
+ /* XXX We can do better when we see a BGNLOOP if we
+ * add a flag called AbortOnWrite to struct
+ * rc_reader_data and leave it set until the next
+ * ENDLOOP. */
+ case RC_OPCODE_ENDLOOP:
+ /* XXX We can do better when we see an ENDLOOP by
+ * searching backwards from writer and looking for
+ * readers of writer's destination index. If we find a
+ * reader before we get to the BGNLOOP, we must abort
+ * unless there is another writer between that reader
+ * and the BGNLOOP. */
+ case RC_OPCODE_BRK:
+ case RC_OPCODE_CONT:
+ d->ReaderData->Abort = 1;
+ return;
+ case RC_OPCODE_IF:
+ branch_depth++;
+ if (branch_depth > R500_PFS_MAX_BRANCH_DEPTH_FULL) {
+ d->ReaderData->Abort = 1;
+ return;
+ }
+ d->BranchMasks[branch_depth].IfWriteMask =
+ d->AliveWriteMask;
+ break;
+ case RC_OPCODE_ELSE:
+ if (branch_depth == 0) {
+ d->ReaderData->InElse = 1;
+ } else {
+ unsigned int temp_mask = d->AliveWriteMask;
+ d->AliveWriteMask =
+ d->BranchMasks[branch_depth].IfWriteMask;
+ d->BranchMasks[branch_depth].ElseWriteMask =
+ temp_mask;
+ d->BranchMasks[branch_depth].HasElse = 1;
+ }
+ break;
+ case RC_OPCODE_ENDIF:
+ if (branch_depth == 0) {
+ d->ReaderData->AbortOnRead = d->AliveWriteMask;
+ d->ReaderData->InElse = 0;
+ }
+ else {
+ struct branch_write_mask * masks =
+ &d->BranchMasks[branch_depth];
+
+ if (masks->HasElse) {
+ d->ReaderData->AbortOnRead |=
+ masks->IfWriteMask
+ & ~masks->ElseWriteMask;
+ d->AliveWriteMask = masks->IfWriteMask
+ ^ ((masks->IfWriteMask ^
+ masks->ElseWriteMask)
+ & (masks->IfWriteMask
+ ^ d->AliveWriteMask));
+ } else {
+ d->ReaderData->AbortOnRead |=
+ masks->IfWriteMask
+ & ~d->AliveWriteMask;
+ d->AliveWriteMask = masks->IfWriteMask;
+
+ }
+ memset(masks, 0,
+ sizeof(struct branch_write_mask));
+ branch_depth--;
}
+ break;
+ default:
+ break;
+ }
+
+ if (d->ReaderData->InElse)
+ continue;
+
+ if (tmp->Type == RC_INSTRUCTION_NORMAL) {
+ rc_for_all_reads_src(tmp,
+ get_readers_normal_read_callback, d);
} else {
- d->AliveWriteMask &= ~shared_mask;
+ rc_pair_for_all_reads_arg(tmp,
+ get_readers_pair_read_callback, d);
}
- }
+ rc_for_all_writes_mask(tmp, get_readers_write_callback, d);
+
+ if (d->ReaderData->Abort)
+ return;
- d->WriteCB(d->ReaderData, inst, file, index, mask);
+ if (branch_depth == 0 && !d->AliveWriteMask)
+ return;
+ }
}
/**
@@ -577,80 +785,26 @@ static void get_readers_write_callback(
* @param write_cb This function will be called for every instruction after
* writer.
*/
-void rc_get_readers_normal(
+void rc_get_readers(
struct radeon_compiler * c,
struct rc_instruction * writer,
struct rc_reader_data * data,
- rc_read_src_fn read_cb,
+ rc_read_src_fn read_normal_cb,
+ rc_pair_read_arg_fn read_pair_cb,
rc_read_write_mask_fn write_cb)
{
- struct rc_instruction * tmp;
struct get_readers_callback_data d;
- unsigned int branch_depth = 0;
- data->Writer = writer;
data->Abort = 0;
- data->AbortOnRead = 0;
- data->InElse = 0;
data->ReaderCount = 0;
data->ReadersReserved = 0;
data->Readers = NULL;
d.C = c;
- d.AliveWriteMask = writer->U.I.DstReg.WriteMask;
d.ReaderData = data;
- d.ReadCB = read_cb;
+ d.ReadNormalCB = read_normal_cb;
+ d.ReadPairCB = read_pair_cb;
d.WriteCB = write_cb;
- if (!writer->U.I.DstReg.WriteMask)
- return;
-
- for(tmp = writer->Next; tmp != &c->Program.Instructions;
- tmp = tmp->Next){
- rc_opcode opcode = get_flow_control_inst(tmp);
- switch(opcode) {
- case RC_OPCODE_BGNLOOP:
- /* XXX We can do better when we see a BGNLOOP if we
- * add a flag called AbortOnWrite to struct
- * rc_reader_data and leave it set until the next
- * ENDLOOP. */
- case RC_OPCODE_ENDLOOP:
- /* XXX We can do better when we see an ENDLOOP by
- * searching backwards from writer and looking for
- * readers of writer's destination index. If we find a
- * reader before we get to the BGNLOOP, we must abort
- * unless there is another writer between that reader
- * and the BGNLOOP. */
- data->Abort = 1;
- return;
- case RC_OPCODE_IF:
- branch_depth++;
- break;
- case RC_OPCODE_ELSE:
- if (branch_depth == 0)
- data->InElse = 1;
- break;
- case RC_OPCODE_ENDIF:
- if (branch_depth == 0) {
- data->AbortOnRead = 1;
- data->InElse = 0;
- }
- else {
- branch_depth--;
- }
- break;
- default:
- break;
- }
-
- if (!data->InElse)
- rc_for_all_reads_src(tmp, get_readers_normal_read_callback, &d);
- rc_for_all_writes_mask(tmp, get_readers_write_callback, &d);
-
- if (data->Abort)
- return;
-
- if (!d.AliveWriteMask)
- return;
- }
+ rc_for_all_writes_mask(writer, get_readers_for_single_write, &d);
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h
index 7de6b98f76..ef971c5b23 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_dataflow.h
@@ -36,6 +36,7 @@ struct rc_instruction;
struct rc_swizzle_caps;
struct rc_src_register;
struct rc_pair_instruction_arg;
+struct rc_pair_instruction_source;
struct rc_compiler;
@@ -59,7 +60,8 @@ void rc_for_all_reads_src(struct rc_instruction * inst, rc_read_src_fn cb,
void * userdata);
typedef void (*rc_pair_read_arg_fn)(void * userdata,
- struct rc_instruction * inst, struct rc_pair_instruction_arg * arg);
+ struct rc_instruction * inst, struct rc_pair_instruction_arg * arg,
+ struct rc_pair_instruction_source * src);
void rc_pair_for_all_reads_arg(struct rc_instruction * inst,
rc_pair_read_arg_fn cb, void * userdata);
@@ -71,7 +73,10 @@ void rc_remap_registers(struct rc_instruction * inst, rc_remap_register_fn cb, v
struct rc_reader {
struct rc_instruction * Inst;
unsigned int WriteMask;
- struct rc_src_register * Src;
+ union {
+ struct rc_src_register * Src;
+ struct rc_pair_instruction_arg * Arg;
+ } U;
};
struct rc_reader_data {
@@ -87,14 +92,13 @@ struct rc_reader_data {
void * CbData;
};
-void rc_get_readers_normal(
+void rc_get_readers(
struct radeon_compiler * c,
- struct rc_instruction * inst,
+ struct rc_instruction * writer,
struct rc_reader_data * data,
- /*XXX: These should be their own function types. */
- rc_read_src_fn read_cb,
+ rc_read_src_fn read_normal_cb,
+ rc_pair_read_arg_fn read_pair_cb,
rc_read_write_mask_fn write_cb);
-
/**
* Compiler passes based on dataflow analysis.
*/
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
index 4d9120ffd0..27b10ffbd6 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_optimize.c
@@ -32,15 +32,14 @@
#include "radeon_compiler_util.h"
#include "radeon_swizzle.h"
-struct peephole_state {
- struct rc_instruction * Inst;
- /** Stores a bitmask of the components that are still "alive" (i.e.
- * they have not been written to since Inst was executed.)
- */
- unsigned int WriteMask;
+struct src_clobbered_reads_cb_data {
+ rc_register_file File;
+ unsigned int Index;
+ unsigned int Mask;
+ struct rc_reader_data * ReaderData;
};
-typedef void (*rc_presub_replace_fn)(struct peephole_state *,
+typedef void (*rc_presub_replace_fn)(struct rc_instruction *,
struct rc_instruction *,
unsigned int);
@@ -67,38 +66,18 @@ static struct rc_src_register chain_srcregs(struct rc_src_register outer, struct
return combine;
}
-struct copy_propagate_state {
- struct radeon_compiler * C;
- struct rc_instruction * Mov;
- unsigned int Conflict:1;
-
- /** Whether Mov's source has been clobbered */
- unsigned int SourceClobbered:1;
-
- /** Which components of Mov's destination register are still from that Mov? */
- unsigned int MovMask:4;
-
- /** Which components of Mov's destination register are clearly *not* from that Mov */
- unsigned int DefinedMask:4;
-
- /** Which components of Mov's source register are sourced */
- unsigned int SourcedMask:4;
-
- /** Branch depth beyond Mov; negative value indicates we left the Mov's block */
- int BranchDepth;
-};
-
static void copy_propagate_scan_read(void * data, struct rc_instruction * inst,
struct rc_src_register * src)
{
rc_register_file file = src->File;
struct rc_reader_data * reader_data = data;
- const struct rc_opcode_info * info = rc_get_opcode_info(inst->U.I.Opcode);
- /* It is possible to do copy propigation in this situation,
- * just not right now, see peephole_add_presub_inv() */
- if (reader_data->Writer->U.I.PreSub.Opcode != RC_PRESUB_NONE &&
- (info->NumSrcRegs > 2 || info->HasTexture)) {
+ if(!rc_inst_can_use_presub(inst,
+ reader_data->Writer->U.I.PreSub.Opcode,
+ rc_swizzle_to_writemask(src->Swizzle),
+ *src,
+ reader_data->Writer->U.I.PreSub.SrcReg[0],
+ reader_data->Writer->U.I.PreSub.SrcReg[1])) {
reader_data->Abort = 1;
return;
}
@@ -123,23 +102,44 @@ static void copy_propagate_scan_read(void * data, struct rc_instruction * inst,
}
}
-static void copy_propagate_scan_write(void * data, struct rc_instruction * inst,
- rc_register_file file, unsigned int index, unsigned int mask)
+static void src_clobbered_reads_cb(
+ void * data,
+ struct rc_instruction * inst,
+ struct rc_src_register * src)
{
- struct rc_reader_data * reader_data = data;
- struct copy_propagate_state * s = reader_data->CbData;
+ struct src_clobbered_reads_cb_data * sc_data = data;
+
+ if (src->File == sc_data->File
+ && src->Index == sc_data->Index
+ && (rc_swizzle_to_writemask(src->Swizzle) & sc_data->Mask)) {
- if (file == reader_data->Writer->U.I.SrcReg[0].File && index == reader_data->Writer->U.I.SrcReg[0].Index) {
- if (mask & s->SourcedMask)
- reader_data->AbortOnRead = 1;
- } else if (s->Mov->U.I.SrcReg[0].RelAddr && file == RC_FILE_ADDRESS) {
- reader_data->AbortOnRead = 1;
+ sc_data->ReaderData->AbortOnRead = RC_MASK_XYZW;
}
+
+ if (src->RelAddr && sc_data->File == RC_FILE_ADDRESS) {
+ sc_data->ReaderData->AbortOnRead = RC_MASK_XYZW;
+ }
+}
+
+static void is_src_clobbered_scan_write(
+ void * data,
+ struct rc_instruction * inst,
+ rc_register_file file,
+ unsigned int index,
+ unsigned int mask)
+{
+ struct src_clobbered_reads_cb_data sc_data;
+ struct rc_reader_data * reader_data = data;
+ sc_data.File = file;
+ sc_data.Index = index;
+ sc_data.Mask = mask;
+ sc_data.ReaderData = reader_data;
+ rc_for_all_reads_src(reader_data->Writer,
+ src_clobbered_reads_cb, &sc_data);
}
static void copy_propagate(struct radeon_compiler * c, struct rc_instruction * inst_mov)
{
- struct copy_propagate_state s;
struct rc_reader_data reader_data;
unsigned int i;
@@ -149,22 +149,10 @@ static void copy_propagate(struct radeon_compiler * c, struct rc_instruction * i
inst_mov->U.I.SaturateMode)
return;
- memset(&s, 0, sizeof(s));
- s.C = c;
- s.Mov = inst_mov;
- s.MovMask = inst_mov->U.I.DstReg.WriteMask;
- s.DefinedMask = RC_MASK_XYZW & ~s.MovMask;
-
- reader_data.CbData = &s;
-
- for(unsigned int chan = 0; chan < 4; ++chan) {
- unsigned int swz = GET_SWZ(inst_mov->U.I.SrcReg[0].Swizzle, chan);
- s.SourcedMask |= (1 << swz) & RC_MASK_XYZW;
- }
-
/* Get a list of all the readers of this MOV instruction. */
- rc_get_readers_normal(c, inst_mov, &reader_data,
- copy_propagate_scan_read, copy_propagate_scan_write);
+ rc_get_readers(c, inst_mov, &reader_data,
+ copy_propagate_scan_read, NULL,
+ is_src_clobbered_scan_write);
if (reader_data.Abort || reader_data.ReaderCount == 0)
return;
@@ -172,10 +160,10 @@ static void copy_propagate(struct radeon_compiler * c, struct rc_instruction * i
/* Propagate the MOV instruction. */
for (i = 0; i < reader_data.ReaderCount; i++) {
struct rc_instruction * inst = reader_data.Readers[i].Inst;
- *reader_data.Readers[i].Src = chain_srcregs(*reader_data.Readers[i].Src, s.Mov->U.I.SrcReg[0]);
+ *reader_data.Readers[i].U.Src = chain_srcregs(*reader_data.Readers[i].U.Src, inst_mov->U.I.SrcReg[0]);
- if (s.Mov->U.I.SrcReg[0].File == RC_FILE_PRESUB)
- inst->U.I.PreSub = s.Mov->U.I.PreSub;
+ if (inst_mov->U.I.SrcReg[0].File == RC_FILE_PRESUB)
+ inst->U.I.PreSub = inst_mov->U.I.PreSub;
}
/* Finally, remove the original MOV instruction */
@@ -222,8 +210,8 @@ static int is_src_uniform_constant(struct rc_src_register src,
static void constant_folding_mad(struct rc_instruction * inst)
{
- rc_swizzle swz;
- unsigned int negate;
+ rc_swizzle swz = 0;
+ unsigned int negate= 0;
if (is_src_uniform_constant(inst->U.I.SrcReg[2], &swz, &negate)) {
if (swz == RC_SWIZZLE_ZERO) {
@@ -263,8 +251,8 @@ static void constant_folding_mad(struct rc_instruction * inst)
static void constant_folding_mul(struct rc_instruction * inst)
{
- rc_swizzle swz;
- unsigned int negate;
+ rc_swizzle swz = 0;
+ unsigned int negate = 0;
if (is_src_uniform_constant(inst->U.I.SrcReg[0], &swz, &negate)) {
if (swz == RC_SWIZZLE_ONE) {
@@ -296,8 +284,8 @@ static void constant_folding_mul(struct rc_instruction * inst)
static void constant_folding_add(struct rc_instruction * inst)
{
- rc_swizzle swz;
- unsigned int negate;
+ rc_swizzle swz = 0;
+ unsigned int negate = 0;
if (is_src_uniform_constant(inst->U.I.SrcReg[0], &swz, &negate)) {
if (swz == RC_SWIZZLE_ZERO) {
@@ -431,132 +419,88 @@ static int src_has_const_swz(struct rc_src_register src) {
return 0;
}
-static void peephole_scan_write(void * data, struct rc_instruction * inst,
- rc_register_file file, unsigned int index, unsigned int mask)
+static void presub_scan_read(
+ void * data,
+ struct rc_instruction * inst,
+ struct rc_src_register * src)
{
- struct peephole_state * s = data;
- if(s->Inst->U.I.DstReg.File == file
- && s->Inst->U.I.DstReg.Index == index) {
- unsigned int common_mask = s->WriteMask & mask;
- s->WriteMask &= ~common_mask;
+ struct rc_reader_data * reader_data = data;
+ rc_presubtract_op * presub_opcode = reader_data->CbData;
+
+ if (!rc_inst_can_use_presub(inst, *presub_opcode,
+ reader_data->Writer->U.I.DstReg.WriteMask,
+ *src,
+ reader_data->Writer->U.I.SrcReg[0],
+ reader_data->Writer->U.I.SrcReg[1])) {
+ reader_data->Abort = 1;
+ return;
}
}
static int presub_helper(
struct radeon_compiler * c,
- struct peephole_state * s,
+ struct rc_instruction * inst_add,
rc_presubtract_op presub_opcode,
rc_presub_replace_fn presub_replace)
{
- struct rc_instruction * inst;
- unsigned int can_remove = 0;
- unsigned int cant_sub = 0;
-
- for(inst = s->Inst->Next; inst != &c->Program.Instructions;
- inst = inst->Next) {
- unsigned int i;
- unsigned char can_use_presub = 1;
- const struct rc_opcode_info * info =
- rc_get_opcode_info(inst->U.I.Opcode);
- /* XXX: There are some situations where instructions
- * with more than 2 src registers can use the
- * presubtract select, but to keep things simple we
- * will disable presubtract on these instructions for
- * now. */
- if (info->NumSrcRegs > 2 || info->HasTexture) {
- can_use_presub = 0;
- }
+ struct rc_reader_data reader_data;
+ unsigned int i;
+ rc_presubtract_op cb_op = presub_opcode;
- /* We can't use more than one presubtract value in an
- * instruction, unless the two prsubtract operations
- * are the same and read from the same registers. */
- if (inst->U.I.PreSub.Opcode != RC_PRESUB_NONE) {
- if (inst->U.I.PreSub.Opcode != presub_opcode
- || inst->U.I.PreSub.SrcReg[0].File !=
- s->Inst->U.I.SrcReg[1].File
- || inst->U.I.PreSub.SrcReg[0].Index !=
- s->Inst->U.I.SrcReg[1].Index) {
- can_use_presub = 0;
- }
- }
+ reader_data.CbData = &cb_op;
+ rc_get_readers(c, inst_add, &reader_data, presub_scan_read, NULL,
+ is_src_clobbered_scan_write);
- /* Even if the instruction can't use a presubtract operation
- * we still need to check if the instruction reads from
- * s->Inst->U.I.DstReg, because if it does we must not
- * remove s->Inst. */
- for(i = 0; i < info->NumSrcRegs; i++) {
- unsigned int mask = src_reads_dst_mask(
- inst->U.I.SrcReg[i], s->Inst->U.I.DstReg);
- /* XXX We could be more aggressive here using
- * presubtract. It is okay if SrcReg[i] only reads
- * from some of the mask components. */
- if(s->Inst->U.I.DstReg.WriteMask != mask) {
- if (s->Inst->U.I.DstReg.WriteMask & mask) {
- can_remove = 0;
- break;
- } else {
- continue;
- }
- }
- if (cant_sub || !can_use_presub) {
- can_remove = 0;
- break;
- }
- presub_replace(s, inst, i);
- can_remove = 1;
- }
- if(!can_remove)
- break;
- rc_for_all_writes_mask(inst, peephole_scan_write, s);
- /* If all components of inst_add's destination register have
- * been written to by subsequent instructions, the original
- * value of the destination register is no longer valid and
- * we can't keep doing substitutions. */
- if (!s->WriteMask){
- break;
- }
- /* Make this instruction doesn't write to the presubtract source. */
- if (inst->U.I.DstReg.WriteMask &
- src_reads_dst_mask(s->Inst->U.I.SrcReg[1],
- inst->U.I.DstReg)
- || src_reads_dst_mask(s->Inst->U.I.SrcReg[0],
- inst->U.I.DstReg)
- || info->IsFlowControl) {
- cant_sub = 1;
+ if (reader_data.Abort || reader_data.ReaderCount == 0)
+ return 0;
+
+ for(i = 0; i < reader_data.ReaderCount; i++) {
+ unsigned int src_index;
+ struct rc_reader reader = reader_data.Readers[i];
+ const struct rc_opcode_info * info =
+ rc_get_opcode_info(reader.Inst->U.I.Opcode);
+
+ for (src_index = 0; src_index < info->NumSrcRegs; src_index++) {
+ if (&reader.Inst->U.I.SrcReg[src_index] == reader.U.Src)
+ presub_replace(inst_add, reader.Inst, src_index);
}
}
- return can_remove;
+ return 1;
}
-/* This function assumes that s->Inst->U.I.SrcReg[0] and
- * s->Inst->U.I.SrcReg[1] aren't both negative. */
-static void presub_replace_add(struct peephole_state *s,
- struct rc_instruction * inst,
- unsigned int src_index)
+/* This function assumes that inst_add->U.I.SrcReg[0] and
+ * inst_add->U.I.SrcReg[1] aren't both negative. */
+static void presub_replace_add(
+ struct rc_instruction * inst_add,
+ struct rc_instruction * inst_reader,
+ unsigned int src_index)
{
rc_presubtract_op presub_opcode;
- if (s->Inst->U.I.SrcReg[1].Negate || s->Inst->U.I.SrcReg[0].Negate)
+ if (inst_add->U.I.SrcReg[1].Negate || inst_add->U.I.SrcReg[0].Negate)
presub_opcode = RC_PRESUB_SUB;
else
presub_opcode = RC_PRESUB_ADD;
- if (s->Inst->U.I.SrcReg[1].Negate) {
- inst->U.I.PreSub.SrcReg[0] = s->Inst->U.I.SrcReg[1];
- inst->U.I.PreSub.SrcReg[1] = s->Inst->U.I.SrcReg[0];
+ if (inst_add->U.I.SrcReg[1].Negate) {
+ inst_reader->U.I.PreSub.SrcReg[0] = inst_add->U.I.SrcReg[1];
+ inst_reader->U.I.PreSub.SrcReg[1] = inst_add->U.I.SrcReg[0];
} else {
- inst->U.I.PreSub.SrcReg[0] = s->Inst->U.I.SrcReg[0];
- inst->U.I.PreSub.SrcReg[1] = s->Inst->U.I.SrcReg[1];
+ inst_reader->U.I.PreSub.SrcReg[0] = inst_add->U.I.SrcReg[0];
+ inst_reader->U.I.PreSub.SrcReg[1] = inst_add->U.I.SrcReg[1];
}
- inst->U.I.PreSub.SrcReg[0].Negate = 0;
- inst->U.I.PreSub.SrcReg[1].Negate = 0;
- inst->U.I.PreSub.Opcode = presub_opcode;
- inst->U.I.SrcReg[src_index] = chain_srcregs(inst->U.I.SrcReg[src_index],
- inst->U.I.PreSub.SrcReg[0]);
- inst->U.I.SrcReg[src_index].File = RC_FILE_PRESUB;
- inst->U.I.SrcReg[src_index].Index = presub_opcode;
+ inst_reader->U.I.PreSub.SrcReg[0].Negate = 0;
+ inst_reader->U.I.PreSub.SrcReg[1].Negate = 0;
+ inst_reader->U.I.PreSub.Opcode = presub_opcode;
+ inst_reader->U.I.SrcReg[src_index] =
+ chain_srcregs(inst_reader->U.I.SrcReg[src_index],
+ inst_reader->U.I.PreSub.SrcReg[0]);
+ inst_reader->U.I.SrcReg[src_index].File = RC_FILE_PRESUB;
+ inst_reader->U.I.SrcReg[src_index].Index = presub_opcode;
}
-static int is_presub_candidate(struct rc_instruction * inst)
+static int is_presub_candidate(
+ struct radeon_compiler * c,
+ struct rc_instruction * inst)
{
const struct rc_opcode_info * info = rc_get_opcode_info(inst->U.I.Opcode);
unsigned int i;
@@ -565,7 +509,12 @@ static int is_presub_candidate(struct rc_instruction * inst)
return 0;
for(i = 0; i < info->NumSrcRegs; i++) {
- if (src_reads_dst_mask(inst->U.I.SrcReg[i], inst->U.I.DstReg))
+ struct rc_src_register src = inst->U.I.SrcReg[i];
+ if (src_reads_dst_mask(src, inst->U.I.DstReg))
+ return 0;
+
+ src.File = RC_FILE_PRESUB;
+ if (!c->SwizzleCaps->IsNative(inst->U.I.Opcode, src))
return 0;
}
return 1;
@@ -578,9 +527,8 @@ static int peephole_add_presub_add(
struct rc_src_register * src0 = NULL;
struct rc_src_register * src1 = NULL;
unsigned int i;
- struct peephole_state s;
- if (!is_presub_candidate(inst_add))
+ if (!is_presub_candidate(c, inst_add))
return 0;
if (inst_add->U.I.SrcReg[0].Swizzle != inst_add->U.I.SrcReg[1].Swizzle)
@@ -604,30 +552,28 @@ static int peephole_add_presub_add(
if (!src1)
return 0;
- s.Inst = inst_add;
- s.WriteMask = inst_add->U.I.DstReg.WriteMask;
- if (presub_helper(c, &s, RC_PRESUB_ADD, presub_replace_add)) {
+ if (presub_helper(c, inst_add, RC_PRESUB_ADD, presub_replace_add)) {
rc_remove_instruction(inst_add);
return 1;
}
return 0;
}
-static void presub_replace_inv(struct peephole_state * s,
- struct rc_instruction * inst,
- unsigned int src_index)
+static void presub_replace_inv(
+ struct rc_instruction * inst_add,
+ struct rc_instruction * inst_reader,
+ unsigned int src_index)
{
- /* We must be careful not to modify s->Inst, since it
- * is possible it will remain part of the program.
- * XXX Maybe pass a struct instead of a pointer for s->Inst.*/
- inst->U.I.PreSub.SrcReg[0] = s->Inst->U.I.SrcReg[1];
- inst->U.I.PreSub.SrcReg[0].Negate = 0;
- inst->U.I.PreSub.Opcode = RC_PRESUB_INV;
- inst->U.I.SrcReg[src_index] = chain_srcregs(inst->U.I.SrcReg[src_index],
- inst->U.I.PreSub.SrcReg[0]);
-
- inst->U.I.SrcReg[src_index].File = RC_FILE_PRESUB;
- inst->U.I.SrcReg[src_index].Index = RC_PRESUB_INV;
+ /* We must be careful not to modify inst_add, since it
+ * is possible it will remain part of the program.*/
+ inst_reader->U.I.PreSub.SrcReg[0] = inst_add->U.I.SrcReg[1];
+ inst_reader->U.I.PreSub.SrcReg[0].Negate = 0;
+ inst_reader->U.I.PreSub.Opcode = RC_PRESUB_INV;
+ inst_reader->U.I.SrcReg[src_index] = chain_srcregs(inst_reader->U.I.SrcReg[src_index],
+ inst_reader->U.I.PreSub.SrcReg[0]);
+
+ inst_reader->U.I.SrcReg[src_index].File = RC_FILE_PRESUB;
+ inst_reader->U.I.SrcReg[src_index].Index = RC_PRESUB_INV;
}
/**
@@ -645,9 +591,8 @@ static int peephole_add_presub_inv(
struct rc_instruction * inst_add)
{
unsigned int i, swz, mask;
- struct peephole_state s;
- if (!is_presub_candidate(inst_add))
+ if (!is_presub_candidate(c, inst_add))
return 0;
mask = inst_add->U.I.DstReg.WriteMask;
@@ -674,11 +619,7 @@ static int peephole_add_presub_inv(
return 0;
}
- /* Setup the peephole_state information. */
- s.Inst = inst_add;
- s.WriteMask = inst_add->U.I.DstReg.WriteMask;
-
- if (presub_helper(c, &s, RC_PRESUB_INV, presub_replace_inv)) {
+ if (presub_helper(c, inst_add, RC_PRESUB_INV, presub_replace_inv)) {
rc_remove_instruction(inst_add);
return 1;
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
index 91524f5ec6..3f880c88fa 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
@@ -66,10 +66,13 @@ struct regalloc_state {
struct hardware_register * HwTemporary;
unsigned int NumHwTemporaries;
/**
- * If an instruction is inside of a loop, end_loop will be the
- * IP of the ENDLOOP instruction, otherwise end_loop will be 0
+ * If an instruction is inside of a loop, EndLoop will be the
+ * IP of the ENDLOOP instruction, and BeginLoop will be the IP
+ * of the BGNLOOP instruction. Otherwise, EndLoop and BeginLoop
+ * will be -1.
*/
- int end_loop;
+ int EndLoop;
+ int BeginLoop;
};
static void print_live_intervals(struct live_intervals * src)
@@ -180,11 +183,13 @@ static void scan_callback(void * data, struct rc_instruction * inst,
reg->Used = 1;
if (file == RC_FILE_INPUT)
reg->Live.Start = -1;
+ else if (s->BeginLoop >= 0)
+ reg->Live.Start = s->BeginLoop;
else
reg->Live.Start = inst->IP;
reg->Live.End = inst->IP;
- } else if (s->end_loop)
- reg->Live.End = s->end_loop;
+ } else if (s->EndLoop >= 0)
+ reg->Live.End = s->EndLoop;
else if (inst->IP > reg->Live.End)
reg->Live.End = inst->IP;
}
@@ -195,6 +200,8 @@ static void compute_live_intervals(struct radeon_compiler *c,
memset(s, 0, sizeof(*s));
s->C = c;
s->NumHwTemporaries = c->max_temp_regs;
+ s->BeginLoop = -1;
+ s->EndLoop = -1;
s->HwTemporary =
memory_pool_malloc(&c->Pool,
s->NumHwTemporaries * sizeof(struct hardware_register));
@@ -207,8 +214,10 @@ static void compute_live_intervals(struct radeon_compiler *c,
inst = inst->Next) {
/* For all instructions inside of a loop, the ENDLOOP
- * instruction is used as the end of the live interval. */
- if (inst->U.I.Opcode == RC_OPCODE_BGNLOOP && !s->end_loop) {
+ * instruction is used as the end of the live interval and
+ * the BGNLOOP instruction is used as the beginning. */
+ if (inst->U.I.Opcode == RC_OPCODE_BGNLOOP && s->EndLoop < 0) {
+ s->BeginLoop = inst->IP;
int loops = 1;
struct rc_instruction * tmp;
for(tmp = inst->Next;
@@ -219,15 +228,17 @@ static void compute_live_intervals(struct radeon_compiler *c,
} else if (tmp->U.I.Opcode
== RC_OPCODE_ENDLOOP) {
if(!--loops) {
- s->end_loop = tmp->IP;
+ s->EndLoop = tmp->IP;
break;
}
}
}
}
- if (inst->IP == s->end_loop)
- s->end_loop = 0;
+ if (inst->IP == s->EndLoop) {
+ s->EndLoop = -1;
+ s->BeginLoop = -1;
+ }
rc_for_all_reads_mask(inst, scan_callback, s);
rc_for_all_writes_mask(inst, scan_callback, s);
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
index d4a38607d9..cbb5ef6237 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_schedule.c
@@ -30,6 +30,7 @@
#include <stdio.h>
#include "radeon_compiler.h"
+#include "radeon_compiler_util.h"
#include "radeon_dataflow.h"
@@ -54,6 +55,11 @@ struct schedule_instruction {
* this instruction can be scheduled.
*/
unsigned int NumDependencies:5;
+
+ /** List of all readers (see rc_get_readers() for the definition of
+ * "all readers"), even those outside the basic block this instruction
+ * lives in. */
+ struct rc_reader_data GlobalReaders;
};
@@ -94,6 +100,16 @@ struct register_state {
struct reg_value * Values[4];
};
+struct remap_reg {
+ struct rc_instruciont * Inst;
+ unsigned int OldIndex:(RC_REGISTER_INDEX_BITS+1);
+ unsigned int OldSwizzle:3;
+ unsigned int NewIndex:(RC_REGISTER_INDEX_BITS+1);
+ unsigned int NewSwizzle:3;
+ unsigned int OnlyTexReads:1;
+ struct remap_reg * Next;
+};
+
struct schedule_state {
struct radeon_compiler * C;
struct schedule_instruction * Current;
@@ -126,15 +142,6 @@ static struct reg_value ** get_reg_valuep(struct schedule_state * s,
return &s->Temporary[index].Values[chan];
}
-static struct reg_value * get_reg_value(struct schedule_state * s,
- rc_register_file file, unsigned int index, unsigned int chan)
-{
- struct reg_value ** pv = get_reg_valuep(s, file, index, chan);
- if (!pv)
- return 0;
- return *pv;
-}
-
static void add_inst_to_list(struct schedule_instruction ** list, struct schedule_instruction * inst)
{
inst->NextReady = *list;
@@ -290,16 +297,17 @@ static int merge_presub_sources(
{
unsigned int srcp_src, srcp_regs, is_rgb, is_alpha;
struct rc_pair_sub_instruction * dst_sub;
+ const struct rc_opcode_info * info;
assert(dst_full->Alpha.Opcode == RC_OPCODE_NOP);
switch(type) {
- case RC_PAIR_SOURCE_RGB:
+ case RC_SOURCE_RGB:
is_rgb = 1;
is_alpha = 0;
dst_sub = &dst_full->RGB;
break;
- case RC_PAIR_SOURCE_ALPHA:
+ case RC_SOURCE_ALPHA:
is_rgb = 0;
is_alpha = 1;
dst_sub = &dst_full->Alpha;
@@ -309,8 +317,8 @@ static int merge_presub_sources(
return 0;
}
- const struct rc_opcode_info * info =
- rc_get_opcode_info(dst_full->RGB.Opcode);
+ info = rc_get_opcode_info(dst_full->RGB.Opcode);
+
if (dst_sub->Src[RC_PAIR_PRESUB_SRC].Used)
return 0;
@@ -340,6 +348,8 @@ static int merge_presub_sources(
continue;
free_source = rc_pair_alloc_source(dst_full, is_rgb,
is_alpha, temp.File, temp.Index);
+ if (free_source < 0)
+ return 0;
one_way = 1;
} else {
dst_sub->Src[free_source] = temp;
@@ -355,11 +365,11 @@ static int merge_presub_sources(
for(arg = 0; arg < info->NumSrcRegs; arg++) {
/*If this arg does not read from an rgb source,
* do nothing. */
- if (!(rc_source_type_that_arg_reads(
- dst_full->RGB.Arg[arg].Source,
- dst_full->RGB.Arg[arg].Swizzle) & type)) {
+ if (!(rc_source_type_swz(dst_full->RGB.Arg[arg].Swizzle,
+ 3) & type)) {
continue;
}
+
if (dst_full->RGB.Arg[arg].Source == srcp_src)
dst_full->RGB.Arg[arg].Source = free_source;
/* We need to do this just in case register
@@ -391,13 +401,13 @@ static int destructive_merge_instructions(
/* Merge the rgb presubtract registers. */
if (alpha->RGB.Src[RC_PAIR_PRESUB_SRC].Used) {
- if (!merge_presub_sources(rgb, alpha->RGB, RC_PAIR_SOURCE_RGB)) {
+ if (!merge_presub_sources(rgb, alpha->RGB, RC_SOURCE_RGB)) {
return 0;
}
}
/* Merge the alpha presubtract registers */
if (alpha->Alpha.Src[RC_PAIR_PRESUB_SRC].Used) {
- if(!merge_presub_sources(rgb, alpha->Alpha, RC_PAIR_SOURCE_ALPHA)){
+ if(!merge_presub_sources(rgb, alpha->Alpha, RC_SOURCE_ALPHA)){
return 0;
}
}
@@ -524,6 +534,222 @@ static void presub_nop(struct rc_instruction * emitted) {
}
}
}
+
+static void rgb_to_alpha_remap (
+ struct rc_instruction * inst,
+ struct rc_pair_instruction_arg * arg,
+ rc_register_file old_file,
+ rc_swizzle old_swz,
+ unsigned int new_index)
+{
+ int new_src_index;
+ unsigned int i;
+ struct rc_pair_instruction_source * old_src =
+ rc_pair_get_src(&inst->U.P, arg);
+ if (!old_src) {
+ return;
+ }
+
+ for (i = 0; i < 3; i++) {
+ if (get_swz(arg->Swizzle, i) == old_swz) {
+ SET_SWZ(arg->Swizzle, i, RC_SWIZZLE_W);
+ }
+ }
+ memset(old_src, 0, sizeof(struct rc_pair_instruction_source));
+ new_src_index = rc_pair_alloc_source(&inst->U.P, 0, 1,
+ old_file, new_index);
+ /* This conversion is not possible, we must have made a mistake in
+ * is_rgb_to_alpha_possible. */
+ if (new_src_index < 0) {
+ assert(0);
+ return;
+ }
+
+ arg->Source = new_src_index;
+}
+
+static int can_remap(unsigned int opcode)
+{
+ switch(opcode) {
+ case RC_OPCODE_DDX:
+ case RC_OPCODE_DDY:
+ return 0;
+ default:
+ return 1;
+ }
+}
+
+static int can_convert_opcode_to_alpha(unsigned int opcode)
+{
+ switch(opcode) {
+ case RC_OPCODE_DDX:
+ case RC_OPCODE_DDY:
+ case RC_OPCODE_DP2:
+ case RC_OPCODE_DP3:
+ case RC_OPCODE_DP4:
+ case RC_OPCODE_DPH:
+ return 0;
+ default:
+ return 1;
+ }
+}
+
+static void is_rgb_to_alpha_possible(
+ void * userdata,
+ struct rc_instruction * inst,
+ struct rc_pair_instruction_arg * arg,
+ struct rc_pair_instruction_source * src)
+{
+ unsigned int chan_count = 0;
+ unsigned int alpha_sources = 0;
+ unsigned int i;
+ struct rc_reader_data * reader_data = userdata;
+
+ if (!can_remap(inst->U.P.RGB.Opcode)
+ || !can_remap(inst->U.P.Alpha.Opcode)) {
+ reader_data->Abort = 1;
+ return;
+ }
+
+ if (!src)
+ return;
+
+ /* XXX There are some cases where we can still do the conversion if
+ * a reader reads from a presubtract source, but for now we'll prevent
+ * it. */
+ if (arg->Source == RC_PAIR_PRESUB_SRC) {
+ reader_data->Abort = 1;
+ return;
+ }
+
+ /* Make sure the source only reads from one component.
+ * XXX We should allow the source to read from the same component twice.
+ * XXX If the index we will be converting to is the same as the
+ * current index, then it is OK to read from more than one component.
+ */
+ for (i = 0; i < 3; i++) {
+ rc_swizzle swz = get_swz(arg->Swizzle, i);
+ switch(swz) {
+ case RC_SWIZZLE_X:
+ case RC_SWIZZLE_Y:
+ case RC_SWIZZLE_Z:
+ case RC_SWIZZLE_W:
+ chan_count++;
+ break;
+ default:
+ break;
+ }
+ }
+ if (chan_count > 1) {
+ reader_data->Abort = 1;
+ return;
+ }
+
+ /* Make sure there are enough alpha sources.
+ * XXX If we know what register all the readers are going
+ * to be remapped to, then in some situations we can still do
+ * the subsitution, even if all 3 alpha sources are being used.*/
+ for (i = 0; i < 3; i++) {
+ if (inst->U.P.Alpha.Src[i].Used) {
+ alpha_sources++;
+ }
+ }
+ if (alpha_sources > 2) {
+ reader_data->Abort = 1;
+ return;
+ }
+}
+
+static int convert_rgb_to_alpha(
+ struct schedule_state * s,
+ struct schedule_instruction * sched_inst)
+{
+ struct rc_pair_instruction * pair_inst = &sched_inst->Instruction->U.P;
+ unsigned int old_mask = pair_inst->RGB.WriteMask;
+ unsigned int old_swz = rc_mask_to_swizzle(old_mask);
+ const struct rc_opcode_info * info =
+ rc_get_opcode_info(pair_inst->RGB.Opcode);
+ int new_index = -1;
+ unsigned int i;
+
+ if (sched_inst->GlobalReaders.Abort)
+ return 0;
+
+ if (!pair_inst->RGB.WriteMask)
+ return 0;
+
+ if (!can_convert_opcode_to_alpha(pair_inst->RGB.Opcode)
+ || !can_convert_opcode_to_alpha(pair_inst->Alpha.Opcode)) {
+ return 0;
+ }
+
+ assert(sched_inst->NumWriteValues == 1);
+
+ if (!sched_inst->WriteValues[0]) {
+ assert(0);
+ return 0;
+ }
+
+ /* We start at the old index, because if we can reuse the same
+ * register and just change the swizzle then it is more likely we
+ * will be able to convert all the readers. */
+ for (i = pair_inst->RGB.DestIndex; i < RC_REGISTER_MAX_INDEX; i++) {
+ struct reg_value ** new_regvalp = get_reg_valuep(
+ s, RC_FILE_TEMPORARY, i, 3);
+ if (!*new_regvalp) {
+ struct reg_value ** old_regvalp =
+ get_reg_valuep(s,
+ RC_FILE_TEMPORARY,
+ pair_inst->RGB.DestIndex,
+ rc_mask_to_swz(old_mask));
+ new_index = i;
+ *new_regvalp = *old_regvalp;
+ *old_regvalp = NULL;
+ new_regvalp = get_reg_valuep(s, RC_FILE_TEMPORARY, i, 3);
+ break;
+ }
+ }
+ if (new_index < 0) {
+ return 0;
+ }
+
+ pair_inst->Alpha.Opcode = pair_inst->RGB.Opcode;
+ pair_inst->Alpha.DestIndex = new_index;
+ pair_inst->Alpha.WriteMask = 1;
+ pair_inst->Alpha.Target = pair_inst->RGB.Target;
+ pair_inst->Alpha.OutputWriteMask = pair_inst->RGB.OutputWriteMask;
+ pair_inst->Alpha.DepthWriteMask = pair_inst->RGB.DepthWriteMask;
+ pair_inst->Alpha.Saturate = pair_inst->RGB.Saturate;
+ memcpy(pair_inst->Alpha.Arg, pair_inst->RGB.Arg,
+ sizeof(pair_inst->Alpha.Arg));
+ /* Move the swizzles into the first chan */
+ for (i = 0; i < info->NumSrcRegs; i++) {
+ unsigned int j;
+ for (j = 0; j < 3; j++) {
+ unsigned int swz = get_swz(pair_inst->Alpha.Arg[i].Swizzle, j);
+ if (swz != RC_SWIZZLE_UNUSED) {
+ pair_inst->Alpha.Arg[i].Swizzle = swz;
+ break;
+ }
+ }
+ }
+ pair_inst->RGB.Opcode = RC_OPCODE_NOP;
+ pair_inst->RGB.DestIndex = 0;
+ pair_inst->RGB.WriteMask = 0;
+ pair_inst->RGB.Target = 0;
+ pair_inst->RGB.OutputWriteMask = 0;
+ pair_inst->RGB.DepthWriteMask = 0;
+ pair_inst->RGB.Saturate = 0;
+ memset(pair_inst->RGB.Arg, 0, sizeof(pair_inst->RGB.Arg));
+
+ for(i = 0; i < sched_inst->GlobalReaders.ReaderCount; i++) {
+ struct rc_reader reader = sched_inst->GlobalReaders.Readers[i];
+ rgb_to_alpha_remap(reader.Inst, reader.U.Arg,
+ RC_FILE_TEMPORARY, old_swz, new_index);
+ }
+ return 1;
+}
+
/**
* Find a good ALU instruction or pair of ALU instruction and emit it.
*
@@ -535,24 +761,16 @@ static void emit_one_alu(struct schedule_state *s, struct rc_instruction * befor
{
struct schedule_instruction * sinst;
- if (s->ReadyFullALU || !(s->ReadyRGB && s->ReadyAlpha)) {
- if (s->ReadyFullALU) {
- sinst = s->ReadyFullALU;
- s->ReadyFullALU = s->ReadyFullALU->NextReady;
- } else if (s->ReadyRGB) {
- sinst = s->ReadyRGB;
- s->ReadyRGB = s->ReadyRGB->NextReady;
- } else {
- sinst = s->ReadyAlpha;
- s->ReadyAlpha = s->ReadyAlpha->NextReady;
- }
-
+ if (s->ReadyFullALU) {
+ sinst = s->ReadyFullALU;
+ s->ReadyFullALU = s->ReadyFullALU->NextReady;
rc_insert_instruction(before->Prev, sinst->Instruction);
commit_alu_instruction(s, sinst);
} else {
struct schedule_instruction **prgb;
struct schedule_instruction **palpha;
-
+ struct schedule_instruction *prev;
+pair:
/* Some pairings might fail because they require too
* many source slots; try all possible pairings if necessary */
for(prgb = &s->ReadyRGB; *prgb; prgb = &(*prgb)->NextReady) {
@@ -571,10 +789,43 @@ static void emit_one_alu(struct schedule_state *s, struct rc_instruction * befor
goto success;
}
}
-
- /* No success in pairing; just take the first RGB instruction */
- sinst = s->ReadyRGB;
- s->ReadyRGB = s->ReadyRGB->NextReady;
+ prev = NULL;
+ /* No success in pairing, now try to convert one of the RGB
+ * instructions to an Alpha so we can pair it with another RGB.
+ */
+ if (s->ReadyRGB && s->ReadyRGB->NextReady) {
+ for(prgb = &s->ReadyRGB; *prgb; prgb = &(*prgb)->NextReady) {
+ if ((*prgb)->NumWriteValues == 1) {
+ struct schedule_instruction * prgb_next;
+ if (!convert_rgb_to_alpha(s, *prgb))
+ goto cont_loop;
+ prgb_next = (*prgb)->NextReady;
+ /* Add instruction to the Alpha ready list. */
+ (*prgb)->NextReady = s->ReadyAlpha;
+ s->ReadyAlpha = *prgb;
+ /* Remove instruction from the RGB ready list.*/
+ if (prev)
+ prev->NextReady = prgb_next;
+ else
+ s->ReadyRGB = prgb_next;
+ goto pair;
+ }
+cont_loop:
+ prev = *prgb;
+ }
+ }
+ /* Still no success in pairing, just take the first RGB
+ * or alpha instruction. */
+ if (s->ReadyRGB) {
+ sinst = s->ReadyRGB;
+ s->ReadyRGB = s->ReadyRGB->NextReady;
+ } else if (s->ReadyAlpha) {
+ sinst = s->ReadyAlpha;
+ s->ReadyAlpha = s->ReadyAlpha->NextReady;
+ } else {
+ /*XXX Something real bad has happened. */
+ assert(0);
+ }
rc_insert_instruction(before->Prev, sinst->Instruction);
commit_alu_instruction(s, sinst);
@@ -590,13 +841,13 @@ static void scan_read(void * data, struct rc_instruction * inst,
rc_register_file file, unsigned int index, unsigned int chan)
{
struct schedule_state * s = data;
- struct reg_value * v = get_reg_value(s, file, index, chan);
+ struct reg_value ** v = get_reg_valuep(s, file, index, chan);
struct reg_value_reader * reader;
if (!v)
return;
- if (v->Writer == s->Current) {
+ if (*v && (*v)->Writer == s->Current) {
/* The instruction reads and writes to a register component.
* In this case, we only want to increment dependencies by one.
*/
@@ -607,16 +858,28 @@ static void scan_read(void * data, struct rc_instruction * inst,
reader = memory_pool_malloc(&s->C->Pool, sizeof(*reader));
reader->Reader = s->Current;
- reader->Next = v->Readers;
- v->Readers = reader;
- v->NumReaders++;
-
- s->Current->NumDependencies++;
+ if (!*v) {
+ /* In this situation, the instruction reads from a register
+ * that hasn't been written to or read from in the current
+ * block. */
+ *v = memory_pool_malloc(&s->C->Pool, sizeof(struct reg_value));
+ memset(*v, 0, sizeof(struct reg_value));
+ (*v)->Readers = reader;
+ } else {
+ reader->Next = (*v)->Readers;
+ (*v)->Readers = reader;
+ /* Only update the current instruction's dependencies if the
+ * register it reads from has been written to in this block. */
+ if ((*v)->Writer) {
+ s->Current->NumDependencies++;
+ }
+ }
+ (*v)->NumReaders++;
if (s->Current->NumReadValues >= 12) {
rc_error(s->C, "%s: NumReadValues overflow\n", __FUNCTION__);
} else {
- s->Current->ReadValues[s->Current->NumReadValues++] = v;
+ s->Current->ReadValues[s->Current->NumReadValues++] = *v;
}
}
@@ -651,6 +914,16 @@ static void scan_write(void * data, struct rc_instruction * inst,
}
}
+static void is_rgb_to_alpha_possible_normal(
+ void * userdata,
+ struct rc_instruction * inst,
+ struct rc_src_register * src)
+{
+ struct rc_reader_data * reader_data = userdata;
+ reader_data->Abort = 1;
+
+}
+
static void schedule_block(struct r300_fragment_program_compiler * c,
struct rc_instruction * begin, struct rc_instruction * end)
{
@@ -682,6 +955,11 @@ static void schedule_block(struct r300_fragment_program_compiler * c,
if (!s.Current->NumDependencies)
instruction_ready(&s, s.Current);
+
+ /* Get global readers for possible RGB->Alpha conversion. */
+ rc_get_readers(s.C, inst, &s.Current->GlobalReaders,
+ is_rgb_to_alpha_possible_normal,
+ is_rgb_to_alpha_possible, NULL);
}
/* Temporarily unlink all instructions */
@@ -710,8 +988,13 @@ static int is_controlflow(struct rc_instruction * inst)
void rc_pair_schedule(struct radeon_compiler *cc, void *user)
{
+ struct schedule_state s;
+
struct r300_fragment_program_compiler *c = (struct r300_fragment_program_compiler*)cc;
struct rc_instruction * inst = c->Base.Program.Instructions.Next;
+
+ memset(&s, 0, sizeof(s));
+ s.C = &c->Base;
while(inst != &c->Base.Program.Instructions) {
struct rc_instruction * first;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c
index c549be5218..fc05366f50 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_translate.c
@@ -280,9 +280,12 @@ static void set_pair_instruction(struct r300_fragment_program_compiler *c,
pair->RGB.DestIndex = inst->DstReg.Index;
pair->RGB.WriteMask |= inst->DstReg.WriteMask & RC_MASK_XYZ;
}
+
if (needalpha) {
- pair->Alpha.DestIndex = inst->DstReg.Index;
pair->Alpha.WriteMask |= GET_BIT(inst->DstReg.WriteMask, 3);
+ if (pair->Alpha.WriteMask) {
+ pair->Alpha.DestIndex = inst->DstReg.Index;
+ }
}
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.c b/src/mesa/drivers/dri/r300/compiler/radeon_program.c
index 24b685fbeb..d7bedc5729 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.c
@@ -30,6 +30,7 @@
#include <stdio.h>
#include "radeon_compiler.h"
+#include "radeon_dataflow.h"
/**
@@ -91,37 +92,98 @@ struct rc_src_register lmul_swizzle(unsigned int swizzle, struct rc_src_register
return tmp;
}
-unsigned int rc_find_free_temporary(struct radeon_compiler * c)
+struct get_used_temporaries_data {
+ unsigned char * Used;
+ unsigned int UsedLength;
+};
+
+static void get_used_temporaries_cb(
+ void * userdata,
+ struct rc_instruction * inst,
+ rc_register_file file,
+ unsigned int index,
+ unsigned int mask)
{
- char used[RC_REGISTER_MAX_INDEX];
- unsigned int i;
- struct rc_instruction * rcinst;
+ struct get_used_temporaries_data * d = userdata;
- memset(used, 0, sizeof(used));
+ if (file != RC_FILE_TEMPORARY)
+ return;
- for (rcinst = c->Program.Instructions.Next; rcinst != &c->Program.Instructions; rcinst = rcinst->Next) {
- const struct rc_sub_instruction *inst = &rcinst->U.I;
- const struct rc_opcode_info *opcode = rc_get_opcode_info(inst->Opcode);
- unsigned int k;
+ if (index >= d->UsedLength)
+ return;
- for (k = 0; k < opcode->NumSrcRegs; k++) {
- if (inst->SrcReg[k].File == RC_FILE_TEMPORARY)
- used[inst->SrcReg[k].Index] = 1;
- }
+ d->Used[index] |= mask;
+}
- if (opcode->HasDstReg) {
- if (inst->DstReg.File == RC_FILE_TEMPORARY)
- used[inst->DstReg.Index] = 1;
- }
+/**
+ * This function fills in the parameter 'used' with a writemask that
+ * represent which components of each temporary register are used by the
+ * program. This is meant to be combined with rc_find_free_temporary_list as a
+ * more efficient version of rc_find_free_temporary.
+ * @param used The function does not initialize this parameter.
+ */
+void rc_get_used_temporaries(
+ struct radeon_compiler * c,
+ unsigned char * used,
+ unsigned int used_length)
+{
+ struct rc_instruction * inst;
+ struct get_used_temporaries_data d;
+ d.Used = used;
+ d.UsedLength = used_length;
+
+ for(inst = c->Program.Instructions.Next;
+ inst != &c->Program.Instructions; inst = inst->Next) {
+
+ rc_for_all_reads_mask(inst, get_used_temporaries_cb, &d);
+ rc_for_all_writes_mask(inst, get_used_temporaries_cb, &d);
}
+}
- for (i = 0; i < RC_REGISTER_MAX_INDEX; i++) {
- if (!used[i])
+/* Search a list of used temporaries for a free one
+ * \sa rc_get_used_temporaries
+ * @note If this functions finds a free temporary, it will mark it as used
+ * in the used temporary list (param 'used')
+ * @param used list of used temporaries
+ * @param used_length number of items in param 'used'
+ * @param mask which components must be free in the temporary index that is
+ * returned.
+ * @return -1 If there are no more free temporaries, otherwise the index of
+ * a temporary register where the components specified in param 'mask' are
+ * not being used.
+ */
+int rc_find_free_temporary_list(
+ struct radeon_compiler * c,
+ unsigned char * used,
+ unsigned int used_length,
+ unsigned int mask)
+{
+ int i;
+ for(i = 0; i < used_length; i++) {
+ if ((~used[i] & mask) == mask) {
+ used[i] |= mask;
return i;
+ }
}
+ return -1;
+}
- rc_error(c, "Ran out of temporary registers\n");
- return 0;
+unsigned int rc_find_free_temporary(struct radeon_compiler * c)
+{
+ unsigned char used[RC_REGISTER_MAX_INDEX];
+ int free;
+
+ memset(used, 0, sizeof(used));
+
+ rc_get_used_temporaries(c, used, RC_REGISTER_MAX_INDEX);
+
+ free = rc_find_free_temporary_list(c, used, RC_REGISTER_MAX_INDEX,
+ RC_MASK_XYZW);
+ if (free < 0) {
+ rc_error(c, "Ran out of temporary registers\n");
+ return 0;
+ }
+ return free;
}
@@ -182,3 +244,14 @@ unsigned int rc_recompute_ips(struct radeon_compiler * c)
return ip;
}
+
+rc_swizzle rc_mask_to_swizzle(unsigned int mask)
+{
+ switch(mask) {
+ case RC_MASK_X: return RC_SWIZZLE_X;
+ case RC_MASK_Y: return RC_SWIZZLE_Y;
+ case RC_MASK_Z: return RC_SWIZZLE_Z;
+ case RC_MASK_W: return RC_SWIZZLE_W;
+ default: return RC_SWIZZLE_UNUSED;
+ }
+}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.h b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
index f0a77d7b53..be078b4f4f 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
@@ -191,6 +191,20 @@ static inline unsigned int combine_swizzles(unsigned int src, unsigned int swz)
return ret;
}
+/**
+ * @param mask Must be either RC_MASK_X, RC_MASK_Y, RC_MASK_Z, or RC_MASK_W
+ */
+static inline rc_swizzle rc_mask_to_swz(unsigned int mask)
+{
+ switch (mask) {
+ case RC_MASK_X: return RC_SWIZZLE_X;
+ case RC_MASK_Y: return RC_SWIZZLE_Y;
+ case RC_MASK_Z: return RC_SWIZZLE_Z;
+ case RC_MASK_W: return RC_SWIZZLE_W;
+ default: assert(0);
+ }
+ return RC_SWIZZLE_UNUSED;
+}
struct rc_src_register lmul_swizzle(unsigned int swizzle, struct rc_src_register srcreg);
static inline void reset_srcreg(struct rc_src_register* reg)
@@ -222,6 +236,17 @@ void rc_local_transform(
struct radeon_compiler *c,
void *user);
+void rc_get_used_temporaries(
+ struct radeon_compiler * c,
+ unsigned char * used,
+ unsigned int used_length);
+
+int rc_find_free_temporary_list(
+ struct radeon_compiler * c,
+ unsigned char * used,
+ unsigned int used_length,
+ unsigned int mask);
+
unsigned int rc_find_free_temporary(struct radeon_compiler * c);
struct rc_instruction *rc_alloc_instruction(struct radeon_compiler * c);
@@ -233,4 +258,5 @@ unsigned int rc_recompute_ips(struct radeon_compiler * c);
void rc_print_program(const struct rc_program *prog);
+rc_swizzle rc_mask_to_swizzle(unsigned int mask);
#endif
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_constants.h b/src/mesa/drivers/dri/r300/compiler/radeon_program_constants.h
index 9dcd44c522..45f79ece5b 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_constants.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_constants.h
@@ -181,4 +181,9 @@ static inline int rc_presubtract_src_reg_count(rc_presubtract_op op){
return 0;
}
}
+
+#define RC_SOURCE_NONE 0x0
+#define RC_SOURCE_RGB 0x1
+#define RC_SOURCE_ALPHA 0x2
+
#endif /* RADEON_PROGRAM_CONSTANTS_H */
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
index a21fe8d3df..5905d26e52 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.c
@@ -27,6 +27,9 @@
#include "radeon_program_pair.h"
+#include "radeon_compiler_util.h"
+
+#include <stdlib.h>
/**
* Return the source slot where we installed the given register access,
@@ -204,24 +207,37 @@ void rc_pair_foreach_source_that_rgb_reads(
}
}
-/*return 0 for rgb, 1 for alpha -1 for error. */
-
-unsigned int rc_source_type_that_arg_reads(
- unsigned int source,
- unsigned int swizzle)
+struct rc_pair_instruction_source * rc_pair_get_src(
+ struct rc_pair_instruction * pair_inst,
+ struct rc_pair_instruction_arg * arg)
{
- unsigned int chan;
- unsigned int swz = RC_SWIZZLE_UNUSED;
- unsigned int ret = RC_PAIR_SOURCE_NONE;
-
- for(chan = 0; chan < 3; chan++) {
- swz = GET_SWZ(swizzle, chan);
- if (swz == RC_SWIZZLE_W) {
- ret |= RC_PAIR_SOURCE_ALPHA;
- } else if (swz == RC_SWIZZLE_X || swz == RC_SWIZZLE_Y
- || swz == RC_SWIZZLE_Z) {
- ret |= RC_PAIR_SOURCE_RGB;
+ unsigned int i, type;
+ unsigned int channels = 0;
+
+ for(i = 0; i < 3; i++) {
+ if (arg == pair_inst->RGB.Arg + i) {
+ channels = 3;
+ break;
}
}
- return ret;
+
+ if (channels == 0) {
+ for (i = 0; i < 3; i++) {
+ if (arg == pair_inst->Alpha.Arg + i) {
+ channels = 1;
+ break;
+ }
+ }
+ }
+
+ assert(channels > 0);
+ type = rc_source_type_swz(arg->Swizzle, channels);
+
+ if (type & RC_SOURCE_RGB) {
+ return &pair_inst->RGB.Src[arg->Source];
+ } else if (type & RC_SOURCE_ALPHA) {
+ return &pair_inst->Alpha.Src[arg->Source];
+ } else {
+ return NULL;
+ }
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
index 54d44a2098..ccf7a0070c 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
@@ -55,10 +55,6 @@ struct radeon_compiler;
*/
#define RC_PAIR_PRESUB_SRC 3
-#define RC_PAIR_SOURCE_NONE 0x0
-#define RC_PAIR_SOURCE_RGB 0x1
-#define RC_PAIR_SOURCE_ALPHA 0x2
-
struct rc_pair_instruction_source {
unsigned int Used:1;
unsigned int File:3;
@@ -115,9 +111,9 @@ void rc_pair_foreach_source_that_rgb_reads(
void * data,
rc_pair_foreach_src_fn cb);
-unsigned int rc_source_type_that_arg_reads(
- unsigned int source,
- unsigned int swizzle);
+struct rc_pair_instruction_source * rc_pair_get_src(
+ struct rc_pair_instruction * pair_inst,
+ struct rc_pair_instruction_arg * arg);
/*@}*/
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c
index 618ab5a099..ae13f6742f 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c
@@ -129,6 +129,7 @@ static char rc_swizzle_char(unsigned int swz)
case RC_SWIZZLE_HALF: return 'H';
case RC_SWIZZLE_UNUSED: return '_';
}
+ fprintf(stderr, "bad swz: %u\n", swz);
return '?';
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c b/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
index 60e228be5b..88165f7895 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_rename_regs.c
@@ -33,100 +33,51 @@
#include "radeon_compiler.h"
#include "radeon_dataflow.h"
-
-struct reg_rename {
- int old_index;
- int new_index;
- int temp_index;
-};
-
-static void rename_reg(void * data, struct rc_instruction * inst,
- rc_register_file * file, unsigned int * index)
-{
- struct reg_rename *r = data;
-
- if(r->old_index == *index && *file == RC_FILE_TEMPORARY) {
- *index = r->new_index;
- }
- else if(r->new_index == *index && *file == RC_FILE_TEMPORARY) {
- *index = r->temp_index;
- }
-}
-
-static void rename_all(
- struct radeon_compiler *c,
- struct rc_instruction * start,
- unsigned int old,
- unsigned int new,
- unsigned int temp)
-{
- struct rc_instruction * inst;
- struct reg_rename r;
- r.old_index = old;
- r.new_index = new;
- r.temp_index = temp;
- for(inst = start; inst != &c->Program.Instructions;
- inst = inst->Next) {
- rc_remap_registers(inst, rename_reg, &r);
- }
-}
+#include "radeon_program.h"
/**
* This function renames registers in an attempt to get the code close to
* SSA form. After this function has completed, most of the register are only
- * written to one time, with a few exceptions. For example, this block of code
- * will not be modified by this function:
- * Mov Temp[0].x Const[0].x
- * Mov Temp[0].y Const[0].y
- * Basically, destination registers will be renamed if:
- * 1. There have been no previous writes to that register
- * or
- * 2. If the instruction is writting to the exact components (no more, no less)
- * of a register that has been written to by previous instructions.
+ * written to one time, with a few exceptions.
*
* This function assumes all the instructions are still of type
* RC_INSTRUCTION_NORMAL.
*/
void rc_rename_regs(struct radeon_compiler *c, void *user)
{
- unsigned int cur_index = 0;
- unsigned int icount;
+ unsigned int i, used_length;
+ int new_index;
struct rc_instruction * inst;
- unsigned int * masks;
+ struct rc_reader_data reader_data;
+ unsigned char * used;
- /* The number of instructions in the program is also the maximum
- * number of temp registers that could potentially be used. */
- icount = rc_recompute_ips(c);
- masks = memory_pool_malloc(&c->Pool, icount * sizeof(unsigned int));
- memset(masks, 0, icount * sizeof(unsigned int));
+ used_length = 2 * rc_recompute_ips(c);
+ used = memory_pool_malloc(&c->Pool, sizeof(unsigned char) * used_length);
+ memset(used, 0, sizeof(unsigned char) * used_length);
+ rc_get_used_temporaries(c, used, used_length);
for(inst = c->Program.Instructions.Next;
inst != &c->Program.Instructions;
inst = inst->Next) {
- const struct rc_opcode_info * info;
- unsigned int old_index, temp_index;
- struct rc_dst_register * dst;
- if(inst->Type != RC_INSTRUCTION_NORMAL) {
- rc_error(c, "%s only works with normal instructions.",
- __FUNCTION__);
- return;
- }
- dst = &inst->U.I.DstReg;
- info = rc_get_opcode_info(inst->U.I.Opcode);
- if(!info->HasDstReg || dst->File != RC_FILE_TEMPORARY) {
+
+ if (inst->U.I.DstReg.File != RC_FILE_TEMPORARY)
continue;
+
+ rc_get_readers(c, inst, &reader_data, NULL, NULL, NULL);
+
+ if (reader_data.Abort || reader_data.ReaderCount == 0)
+ continue;
+
+ new_index = rc_find_free_temporary_list(c, used, used_length,
+ RC_MASK_XYZW);
+ if (new_index < 0) {
+ rc_error(c, "Ran out of temporary registers\n");
+ return;
}
- if(dst->Index >= icount || !masks[dst->Index] ||
- masks[dst->Index] == dst->WriteMask) {
- old_index = dst->Index;
- /* We need to set dst->Index here so get free temporary
- * will work. */
- dst->Index = cur_index++;
- temp_index = rc_find_free_temporary(c);
- rename_all(c, inst->Next, old_index,
- dst->Index, temp_index);
+
+ reader_data.Writer->U.I.DstReg.Index = new_index;
+ for(i = 0; i < reader_data.ReaderCount; i++) {
+ reader_data.Readers[i].U.Src->Index = new_index;
}
- assert(dst->Index < icount);
- masks[dst->Index] |= dst->WriteMask;
}
}
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 9fbd36bfe6..c288834d24 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -86,6 +86,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define need_GL_EXT_stencil_two_side
#define need_GL_ATI_separate_stencil
#define need_GL_NV_vertex_program
+#define need_GL_OES_EGL_image
#include "main/remap_helper.h"
@@ -134,6 +135,9 @@ static const struct dri_extension card_extensions[] = {
{"GL_MESAX_texture_float", NULL},
{"GL_NV_blend_square", NULL},
{"GL_NV_vertex_program", GL_NV_vertex_program_functions},
+#if FEATURE_OES_EGL_image
+ {"GL_OES_EGL_image", GL_OES_EGL_image_functions },
+#endif
{NULL, NULL}
/* *INDENT-ON* */
};
diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c
index 81769e1ee5..0c4d8537c6 100644
--- a/src/mesa/drivers/dri/r300/r300_draw.c
+++ b/src/mesa/drivers/dri/r300/r300_draw.c
@@ -717,6 +717,10 @@ static void r300DrawPrims(struct gl_context *ctx,
GLuint max_index)
{
GLboolean retval;
+ struct r300_context *r300 = R300_CONTEXT(ctx);
+ radeonContextPtr radeon = &r300->radeon;
+
+ radeon_prepare_render(radeon);
/* This check should get folded into just the places that
* min/max index are really needed.
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 821318e7a5..44090ec289 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -327,8 +327,6 @@ void r300RunRenderPrimitive(struct gl_context * ctx, int start, int end, int pri
BATCH_LOCALS(&rmesa->radeon);
int type, num_verts;
- radeon_prepare_render(&rmesa->radeon);
-
type = r300PrimitiveType(rmesa, prim);
num_verts = r300NumVerts(rmesa, end - start, prim);
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index a6bda0e499..de66293999 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -382,5 +382,9 @@ void r300InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *fun
functions->GenerateMipmap = radeonGenerateMipmap;
+#if FEATURE_OES_EGL_image
+ functions->EGLImageTargetTexture2D = radeon_image_target_texture_2d;
+#endif
+
driInitTextureFormats();
}
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index 0116c5d2fa..ed9955b05d 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -428,6 +428,7 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
radeonTexObjPtr t;
uint32_t pitch_val;
uint32_t internalFormat, type, format;
+ gl_format texFormat;
type = GL_BGRA;
format = GL_UNSIGNED_BYTE;
@@ -467,9 +468,6 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
radeon_miptree_unreference(&t->mt);
radeon_miptree_unreference(&rImage->mt);
- _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
- rb->base.Width, rb->base.Height, 1, 0, rb->cpp);
- texImage->RowStride = rb->pitch / rb->cpp;
rImage->bo = rb->bo;
radeon_bo_ref(rImage->bo);
t->bo = rb->bo;
@@ -481,22 +479,35 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_format
pitch_val = rb->pitch;
switch (rb->cpp) {
case 4:
- if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
+ if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
+ texFormat = MESA_FORMAT_RGB888;
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8);
- else
+ }
+ else {
+ texFormat = MESA_FORMAT_ARGB8888;
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8);
+ }
pitch_val /= 4;
break;
case 3:
default:
+ texFormat = MESA_FORMAT_RGB888;
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8);
pitch_val /= 4;
break;
case 2:
+ texFormat = MESA_FORMAT_RGB565;
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5);
pitch_val /= 2;
break;
}
+
+ _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
+ rb->base.Width, rb->base.Height, 1, 0,
+ rb->cpp, texFormat);
+ texImage->RowStride = rb->pitch / rb->cpp;
+
+
pitch_val--;
t->pp_txsize = (((R300_TX_WIDTHMASK_MASK & ((rb->base.Width - 1) << R300_TX_WIDTHMASK_SHIFT)))
| ((R300_TX_HEIGHTMASK_MASK & ((rb->base.Height - 1) << R300_TX_HEIGHTMASK_SHIFT))));
diff --git a/src/mesa/drivers/dri/r600/evergreen_render.c b/src/mesa/drivers/dri/r600/evergreen_render.c
index 0c0eeca1fc..6e51832c87 100644
--- a/src/mesa/drivers/dri/r600/evergreen_render.c
+++ b/src/mesa/drivers/dri/r600/evergreen_render.c
@@ -909,6 +909,10 @@ static void evergreenDrawPrims(struct gl_context *ctx,
{
GLboolean retval = GL_FALSE;
+ context_t *context = EVERGREEN_CONTEXT(ctx);
+ radeonContextPtr radeon = &context->radeon;
+ radeon_prepare_render(radeon);
+
/* This check should get folded into just the places that
* min/max index are really needed.
*/
diff --git a/src/mesa/drivers/dri/r600/evergreen_tex.c b/src/mesa/drivers/dri/r600/evergreen_tex.c
index 58420ed123..3b5448a0e4 100644
--- a/src/mesa/drivers/dri/r600/evergreen_tex.c
+++ b/src/mesa/drivers/dri/r600/evergreen_tex.c
@@ -31,9 +31,7 @@
#include "main/enums.h"
#include "main/image.h"
#include "main/teximage.h"
-#include "main/mipmap.h"
#include "main/simple_list.h"
-#include "main/texstore.h"
#include "main/texobj.h"
#include "texmem.h"
@@ -1024,15 +1022,15 @@ static GLboolean evergreen_setup_hardware_state(struct gl_context * ctx, struct
SETfield(t->SQ_TEX_RESOURCE5, t->maxLod - t->minLod, LAST_LEVEL_shift, LAST_LEVEL_mask);
SETfield(t->SQ_TEX_SAMPLER1,
- EG_S_FIXED(CLAMP(t->base.MinLod - t->minLod, 0, 15), 6),
+ EG_S_FIXED(CLAMP(t->base.MinLod - t->minLod, 0, 15), 8),
EG_SQ_TEX_SAMPLER_WORD1_0__MIN_LOD_shift,
EG_SQ_TEX_SAMPLER_WORD1_0__MIN_LOD_mask);
SETfield(t->SQ_TEX_SAMPLER1,
- EG_S_FIXED(CLAMP(t->base.MaxLod - t->minLod, 0, 15), 6),
+ EG_S_FIXED(CLAMP(t->base.MaxLod - t->minLod, 0, 15), 8),
EG_SQ_TEX_SAMPLER_WORD1_0__MAX_LOD_shift,
EG_SQ_TEX_SAMPLER_WORD1_0__MAX_LOD_mask);
SETfield(t->SQ_TEX_SAMPLER2,
- EG_S_FIXED(CLAMP(ctx->Texture.Unit[unit].LodBias + t->base.LodBias, -16, 16), 6),
+ EG_S_FIXED(CLAMP(ctx->Texture.Unit[unit].LodBias + t->base.LodBias, -16, 16), 8),
EG_SQ_TEX_SAMPLER_WORD2_0__LOD_BIAS_shift,
EG_SQ_TEX_SAMPLER_WORD2_0__LOD_BIAS_mask);
@@ -1152,6 +1150,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur
radeonTexObjPtr t;
uint32_t pitch_val;
uint32_t internalFormat, type, format;
+ gl_format texFormat;
type = GL_BGRA;
format = GL_UNSIGNED_BYTE;
@@ -1191,10 +1190,6 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur
radeon_miptree_unreference(&t->mt);
radeon_miptree_unreference(&rImage->mt);
- _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
- rb->base.Width, rb->base.Height, 1, 0, rb->cpp);
- texImage->RowStride = rb->pitch / rb->cpp;
-
rImage->bo = rb->bo;
radeon_bo_ref(rImage->bo);
t->bo = rb->bo;
@@ -1205,6 +1200,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur
switch (rb->cpp) {
case 4:
if (glx_texture_format == __DRI_TEXTURE_FORMAT_RGB) {
+ texFormat = MESA_FORMAT_RGB888;
SETfield(t->SQ_TEX_RESOURCE7, FMT_8_8_8_8,
EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift,
EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask);
@@ -1218,6 +1214,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur
SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_1,
SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
} else {
+ texFormat = MESA_FORMAT_ARGB8888;
SETfield(t->SQ_TEX_RESOURCE7, FMT_8_8_8_8,
EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift,
EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask);
@@ -1236,6 +1233,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur
case 3:
default:
// FMT_8_8_8 ???
+ texFormat = MESA_FORMAT_RGB888;
SETfield(t->SQ_TEX_RESOURCE7, FMT_8_8_8_8,
EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift,
EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask);
@@ -1251,6 +1249,7 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur
pitch_val /= 4;
break;
case 2:
+ texFormat = MESA_FORMAT_RGB565;
SETfield(t->SQ_TEX_RESOURCE7, FMT_5_6_5,
EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift,
EG_SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask);
@@ -1267,6 +1266,11 @@ void evergreenSetTexBuffer(__DRIcontext *pDRICtx, GLint target, GLint glx_textur
break;
}
+ _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
+ rb->base.Width, rb->base.Height, 1, 0,
+ rb->cpp, texFormat);
+ texImage->RowStride = rb->pitch / rb->cpp;
+
pitch_val = (pitch_val + R700_TEXEL_PITCH_ALIGNMENT_MASK)
& ~R700_TEXEL_PITCH_ALIGNMENT_MASK;
diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c
index c882a9cce9..b6443bf0c5 100644
--- a/src/mesa/drivers/dri/r600/r600_context.c
+++ b/src/mesa/drivers/dri/r600/r600_context.c
@@ -94,6 +94,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define need_GL_EXT_stencil_two_side
#define need_GL_ATI_separate_stencil
#define need_GL_NV_vertex_program
+#define need_GL_OES_EGL_image
#include "main/remap_helper.h"
@@ -148,6 +149,9 @@ static const struct dri_extension card_extensions[] = {
{"GL_NV_vertex_program", GL_NV_vertex_program_functions},
{"GL_ARB_pixel_buffer_object", NULL},
{"GL_ARB_draw_elements_base_vertex", GL_ARB_draw_elements_base_vertex_functions },
+#if FEATURE_OES_EGL_image
+ {"GL_OES_EGL_image", GL_OES_EGL_image_functions},
+#endif
{NULL, NULL}
/* *INDENT-ON* */
};
diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c
index d6a58f410c..c3d68c41e5 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.c
+++ b/src/mesa/drivers/dri/r600/r600_tex.c
@@ -475,5 +475,9 @@ void r600InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *fun
functions->GenerateMipmap = radeonGenerateMipmap;
+#if FEATURE_OES_EGL_image
+ functions->EGLImageTargetTexture2D = radeon_image_target_texture_2d;
+#endif
+
driInitTextureFormats();
}
diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c
index 3869768bf0..aafa687577 100644
--- a/src/mesa/drivers/dri/r600/r600_texstate.c
+++ b/src/mesa/drivers/dri/r600/r600_texstate.c
@@ -1001,6 +1001,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
radeonTexObjPtr t;
uint32_t pitch_val;
uint32_t internalFormat, type, format;
+ gl_format texFormat;
type = GL_BGRA;
format = GL_UNSIGNED_BYTE;
@@ -1046,10 +1047,6 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
radeon_miptree_unreference(&t->mt);
radeon_miptree_unreference(&rImage->mt);
- _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
- rb->base.Width, rb->base.Height, 1, 0, rb->cpp);
- texImage->RowStride = rb->pitch / rb->cpp;
-
rImage->bo = rb->bo;
radeon_bo_ref(rImage->bo);
t->bo = rb->bo;
@@ -1060,6 +1057,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
switch (rb->cpp) {
case 4:
if (glx_texture_format == __DRI_TEXTURE_FORMAT_RGB) {
+ texFormat = MESA_FORMAT_RGB888;
SETfield(t->SQ_TEX_RESOURCE1, FMT_8_8_8_8,
SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
@@ -1072,6 +1070,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
SETfield(t->SQ_TEX_RESOURCE4, SQ_SEL_1,
SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
} else {
+ texFormat = MESA_FORMAT_ARGB8888;
SETfield(t->SQ_TEX_RESOURCE1, FMT_8_8_8_8,
SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
@@ -1089,6 +1088,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
case 3:
default:
// FMT_8_8_8 ???
+ texFormat = MESA_FORMAT_RGB888;
SETfield(t->SQ_TEX_RESOURCE1, FMT_8_8_8_8,
SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
@@ -1103,6 +1103,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
pitch_val /= 4;
break;
case 2:
+ texFormat = MESA_FORMAT_RGB565;
SETfield(t->SQ_TEX_RESOURCE1, FMT_5_6_5,
SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
@@ -1118,6 +1119,11 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
break;
}
+ _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
+ rb->base.Width, rb->base.Height, 1, 0,
+ rb->cpp, texFormat);
+ texImage->RowStride = rb->pitch / rb->cpp;
+
pitch_val = (pitch_val + R700_TEXEL_PITCH_ALIGNMENT_MASK)
& ~R700_TEXEL_PITCH_ALIGNMENT_MASK;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 43a6355ad8..7361adffcf 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -171,6 +171,10 @@ void radeonSetCliprects(radeonContextPtr radeon)
{
__DRIdrawable *const drawable = radeon_get_drawable(radeon);
__DRIdrawable *const readable = radeon_get_readable(radeon);
+
+ if(drawable == NULL && readable == NULL)
+ return;
+
struct radeon_framebuffer *const draw_rfb = drawable->driverPrivate;
struct radeon_framebuffer *const read_rfb = readable->driverPrivate;
int x_off, y_off;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index 40544860b3..fecdd11905 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -39,6 +39,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "drirenderbuffer.h"
#include "drivers/common/meta.h"
#include "main/context.h"
+#include "main/framebuffer.h"
#include "main/renderbuffer.h"
#include "main/state.h"
#include "main/simple_list.h"
@@ -245,16 +246,9 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16;
if (IS_R600_CLASS(radeon->radeonScreen)) {
- int chip_family = radeon->radeonScreen->chip_family;
- if (chip_family >= CHIP_FAMILY_CEDAR) {
- radeon->texture_row_align = 512;
- radeon->texture_rect_row_align = 512;
- radeon->texture_compressed_row_align = 512;
- } else {
- radeon->texture_row_align = 256;
- radeon->texture_rect_row_align = 256;
- radeon->texture_compressed_row_align = 256;
- }
+ radeon->texture_row_align = radeon->radeonScreen->group_bytes;
+ radeon->texture_rect_row_align = radeon->radeonScreen->group_bytes;
+ radeon->texture_compressed_row_align = radeon->radeonScreen->group_bytes;
} else if (IS_R200_CLASS(radeon->radeonScreen) ||
IS_R100_CLASS(radeon->radeonScreen)) {
radeon->texture_row_align = 32;
@@ -379,12 +373,12 @@ GLboolean radeonUnbindContext(__DRIcontext * driContextPriv)
static void
radeon_make_kernel_renderbuffer_current(radeonContextPtr radeon,
- struct radeon_framebuffer *draw)
+ struct gl_framebuffer *draw)
{
/* if radeon->fake */
struct radeon_renderbuffer *rb;
- if ((rb = (void *)draw->base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer)) {
+ if ((rb = (void *)draw->Attachment[BUFFER_FRONT_LEFT].Renderbuffer)) {
if (!rb->bo) {
rb->bo = radeon_bo_open(radeon->radeonScreen->bom,
radeon->radeonScreen->frontOffset,
@@ -396,7 +390,7 @@ radeon_make_kernel_renderbuffer_current(radeonContextPtr radeon,
rb->cpp = radeon->radeonScreen->cpp;
rb->pitch = radeon->radeonScreen->frontPitch * rb->cpp;
}
- if ((rb = (void *)draw->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer)) {
+ if ((rb = (void *)draw->Attachment[BUFFER_BACK_LEFT].Renderbuffer)) {
if (!rb->bo) {
rb->bo = radeon_bo_open(radeon->radeonScreen->bom,
radeon->radeonScreen->backOffset,
@@ -408,7 +402,7 @@ radeon_make_kernel_renderbuffer_current(radeonContextPtr radeon,
rb->cpp = radeon->radeonScreen->cpp;
rb->pitch = radeon->radeonScreen->backPitch * rb->cpp;
}
- if ((rb = (void *)draw->base.Attachment[BUFFER_DEPTH].Renderbuffer)) {
+ if ((rb = (void *)draw->Attachment[BUFFER_DEPTH].Renderbuffer)) {
if (!rb->bo) {
rb->bo = radeon_bo_open(radeon->radeonScreen->bom,
radeon->radeonScreen->depthOffset,
@@ -420,7 +414,7 @@ radeon_make_kernel_renderbuffer_current(radeonContextPtr radeon,
rb->cpp = radeon->radeonScreen->cpp;
rb->pitch = radeon->radeonScreen->depthPitch * rb->cpp;
}
- if ((rb = (void *)draw->base.Attachment[BUFFER_STENCIL].Renderbuffer)) {
+ if ((rb = (void *)draw->Attachment[BUFFER_STENCIL].Renderbuffer)) {
if (!rb->bo) {
rb->bo = radeon_bo_open(radeon->radeonScreen->bom,
radeon->radeonScreen->depthOffset,
@@ -436,7 +430,7 @@ radeon_make_kernel_renderbuffer_current(radeonContextPtr radeon,
static void
radeon_make_renderbuffer_current(radeonContextPtr radeon,
- struct radeon_framebuffer *draw)
+ struct gl_framebuffer *draw)
{
int size = 4096*4096*4;
/* if radeon->fake */
@@ -448,7 +442,7 @@ radeon_make_renderbuffer_current(radeonContextPtr radeon,
}
- if ((rb = (void *)draw->base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer)) {
+ if ((rb = (void *)draw->Attachment[BUFFER_FRONT_LEFT].Renderbuffer)) {
if (!rb->bo) {
rb->bo = radeon_bo_open(radeon->radeonScreen->bom,
radeon->radeonScreen->frontOffset +
@@ -461,7 +455,7 @@ radeon_make_renderbuffer_current(radeonContextPtr radeon,
rb->cpp = radeon->radeonScreen->cpp;
rb->pitch = radeon->radeonScreen->frontPitch * rb->cpp;
}
- if ((rb = (void *)draw->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer)) {
+ if ((rb = (void *)draw->Attachment[BUFFER_BACK_LEFT].Renderbuffer)) {
if (!rb->bo) {
rb->bo = radeon_bo_open(radeon->radeonScreen->bom,
radeon->radeonScreen->backOffset +
@@ -474,7 +468,7 @@ radeon_make_renderbuffer_current(radeonContextPtr radeon,
rb->cpp = radeon->radeonScreen->cpp;
rb->pitch = radeon->radeonScreen->backPitch * rb->cpp;
}
- if ((rb = (void *)draw->base.Attachment[BUFFER_DEPTH].Renderbuffer)) {
+ if ((rb = (void *)draw->Attachment[BUFFER_DEPTH].Renderbuffer)) {
if (!rb->bo) {
rb->bo = radeon_bo_open(radeon->radeonScreen->bom,
radeon->radeonScreen->depthOffset +
@@ -487,7 +481,7 @@ radeon_make_renderbuffer_current(radeonContextPtr radeon,
rb->cpp = radeon->radeonScreen->cpp;
rb->pitch = radeon->radeonScreen->depthPitch * rb->cpp;
}
- if ((rb = (void *)draw->base.Attachment[BUFFER_STENCIL].Renderbuffer)) {
+ if ((rb = (void *)draw->Attachment[BUFFER_STENCIL].Renderbuffer)) {
if (!rb->bo) {
rb->bo = radeon_bo_open(radeon->radeonScreen->bom,
radeon->radeonScreen->depthOffset +
@@ -740,10 +734,9 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
buffers[i].flags);
if (bo == NULL) {
-
fprintf(stderr, "failed to attach %s %d\n",
regname, buffers[i].name);
-
+ continue;
}
ret = radeon_bo_get_tiling(bo, &tiling_flags, &pitch);
@@ -793,8 +786,8 @@ GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv,
__DRIdrawable * driReadPriv)
{
radeonContextPtr radeon;
- struct radeon_framebuffer *drfb;
- struct gl_framebuffer *readfb;
+ struct radeon_framebuffer *rdrfb;
+ struct gl_framebuffer *drfb, *readfb;
if (!driContextPriv) {
if (RADEON_DEBUG & RADEON_DRI)
@@ -804,17 +797,25 @@ GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv,
}
radeon = (radeonContextPtr) driContextPriv->driverPrivate;
- drfb = driDrawPriv->driverPrivate;
- readfb = driReadPriv->driverPrivate;
+
+ if(driDrawPriv == NULL && driReadPriv == NULL) {
+ drfb = _mesa_create_framebuffer(&radeon->glCtx->Visual);
+ readfb = drfb;
+ }
+ else {
+ drfb = driDrawPriv->driverPrivate;
+ readfb = driReadPriv->driverPrivate;
+ }
if (driContextPriv->driScreenPriv->dri2.enabled) {
- radeon_update_renderbuffers(driContextPriv, driDrawPriv, GL_FALSE);
+ if(driDrawPriv)
+ radeon_update_renderbuffers(driContextPriv, driDrawPriv, GL_FALSE);
if (driDrawPriv != driReadPriv)
radeon_update_renderbuffers(driContextPriv, driReadPriv, GL_FALSE);
_mesa_reference_renderbuffer(&radeon->state.color.rb,
- &(radeon_get_renderbuffer(&drfb->base, BUFFER_BACK_LEFT)->base));
+ &(radeon_get_renderbuffer(drfb, BUFFER_BACK_LEFT)->base));
_mesa_reference_renderbuffer(&radeon->state.depth.rb,
- &(radeon_get_renderbuffer(&drfb->base, BUFFER_DEPTH)->base));
+ &(radeon_get_renderbuffer(drfb, BUFFER_DEPTH)->base));
} else {
radeon_make_renderbuffer_current(radeon, drfb);
}
@@ -822,35 +823,40 @@ GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv,
if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "%s ctx %p dfb %p rfb %p\n", __FUNCTION__, radeon->glCtx, drfb, readfb);
- driUpdateFramebufferSize(radeon->glCtx, driDrawPriv);
+ if(driDrawPriv)
+ driUpdateFramebufferSize(radeon->glCtx, driDrawPriv);
if (driReadPriv != driDrawPriv)
driUpdateFramebufferSize(radeon->glCtx, driReadPriv);
- _mesa_make_current(radeon->glCtx, &drfb->base, readfb);
+ _mesa_make_current(radeon->glCtx, drfb, readfb);
+ if (driDrawPriv == NULL && driReadPriv == NULL)
+ _mesa_reference_framebuffer(&drfb, NULL);
_mesa_update_state(radeon->glCtx);
- if (radeon->glCtx->DrawBuffer == &drfb->base) {
- if (driDrawPriv->swap_interval == (unsigned)-1) {
- int i;
- driDrawPriv->vblFlags =
- (radeon->radeonScreen->irq != 0)
- ? driGetDefaultVBlankFlags(&radeon->
- optionCache)
- : VBLANK_FLAG_NO_IRQ;
-
- driDrawableInitVBlank(driDrawPriv);
- drfb->vbl_waited = driDrawPriv->vblSeq;
-
- for (i = 0; i < 2; i++) {
- if (drfb->color_rb[i])
- drfb->color_rb[i]->vbl_pending = driDrawPriv->vblSeq;
+ if (radeon->glCtx->DrawBuffer == drfb) {
+ if(driDrawPriv != NULL) {
+ rdrfb = (struct radeon_framebuffer *)drfb;
+ if (driDrawPriv->swap_interval == (unsigned)-1) {
+ int i;
+ driDrawPriv->vblFlags =
+ (radeon->radeonScreen->irq != 0)
+ ? driGetDefaultVBlankFlags(&radeon->
+ optionCache)
+ : VBLANK_FLAG_NO_IRQ;
+
+ driDrawableInitVBlank(driDrawPriv);
+ rdrfb->vbl_waited = driDrawPriv->vblSeq;
+
+ for (i = 0; i < 2; i++) {
+ if (rdrfb->color_rb[i])
+ rdrfb->color_rb[i]->vbl_pending = driDrawPriv->vblSeq;
+ }
}
-
+ radeon_window_moved(radeon);
}
- radeon_window_moved(radeon);
- radeon_draw_buffer(radeon->glCtx, &drfb->base);
+ radeon_draw_buffer(radeon->glCtx, drfb);
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index cc9590213c..e3de534b5f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -66,6 +66,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define need_GL_EXT_fog_coord
#define need_GL_EXT_secondary_color
#define need_GL_EXT_framebuffer_object
+#define need_GL_OES_EGL_image
#include "main/remap_helper.h"
#define DRIVER_DATE "20061018"
@@ -101,6 +102,9 @@ static const struct dri_extension card_extensions[] =
{ "GL_ATI_texture_mirror_once", NULL },
{ "GL_MESA_ycbcr_texture", NULL },
{ "GL_NV_blend_square", NULL },
+#if FEATURE_OES_EGL_image
+ { "GL_OES_EGL_image", GL_OES_EGL_image_functions },
+#endif
{ NULL, NULL }
};
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 2a6fbaeaf0..a36a1dc94a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -199,6 +199,48 @@ radeon_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffe
}
+#if FEATURE_OES_EGL_image
+static void
+radeon_image_target_renderbuffer_storage(struct gl_context *ctx,
+ struct gl_renderbuffer *rb,
+ void *image_handle)
+{
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
+ struct radeon_renderbuffer *rrb;
+ __DRIscreen *screen;
+ __DRIimage *image;
+
+ screen = radeon->radeonScreen->driScreen;
+ image = screen->dri2.image->lookupEGLImage(screen, image_handle,
+ screen->loaderPrivate);
+ if (image == NULL)
+ return;
+
+ rrb = radeon_renderbuffer(rb);
+
+ if (ctx->Driver.Flush)
+ ctx->Driver.Flush(ctx); /* +r6/r7 */
+
+ if (rrb->bo)
+ radeon_bo_unref(rrb->bo);
+ rrb->bo = image->bo;
+ radeon_bo_ref(rrb->bo);
+ fprintf(stderr, "image->bo: %p, name: %d, rbs: w %d -> p %d\n", image->bo, image->bo->handle,
+ image->width, image->pitch);
+
+ rrb->cpp = image->cpp;
+ rrb->pitch = image->pitch * image->cpp;
+
+ rb->Format = image->format;
+ rb->InternalFormat = image->internal_format;
+ rb->Width = image->width;
+ rb->Height = image->height;
+ rb->Format = image->format;
+ rb->DataType = image->data_type;
+ rb->_BaseFormat = _mesa_base_fbo_format(radeon->glCtx,
+ image->internal_format);
+}
+#endif
/**
* Called for each hardware renderbuffer when a _window_ is resized.
@@ -622,6 +664,10 @@ void radeon_fbo_init(struct radeon_context *radeon)
#if FEATURE_EXT_framebuffer_blit
radeon->glCtx->Driver.BlitFramebuffer = _mesa_meta_BlitFramebuffer;
#endif
+#if FEATURE_OES_EGL_image
+ radeon->glCtx->Driver.EGLImageTargetRenderbufferStorage =
+ radeon_image_target_renderbuffer_storage;
+#endif
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 43ebc81093..b379240579 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -41,12 +41,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/mtypes.h"
#include "main/framebuffer.h"
#include "main/renderbuffer.h"
+#include "main/fbobject.h"
#define STANDALONE_MMIO
#include "radeon_chipset.h"
#include "radeon_macros.h"
#include "radeon_screen.h"
#include "radeon_common.h"
+#include "radeon_common_context.h"
#if defined(RADEON_R100)
#include "radeon_context.h"
#include "radeon_tex.h"
@@ -398,6 +400,188 @@ static const struct __DRI2flushExtensionRec radeonFlushExtension = {
dri2InvalidateDrawable,
};
+static __DRIimage *
+radeon_create_image_from_name(__DRIcontext *context,
+ int width, int height, int format,
+ int name, int pitch, void *loaderPrivate)
+{
+ __DRIimage *image;
+ radeonContextPtr radeon = context->driverPrivate;
+
+ if (name == 0)
+ return NULL;
+
+ image = CALLOC(sizeof *image);
+ if (image == NULL)
+ return NULL;
+
+ switch (format) {
+ case __DRI_IMAGE_FORMAT_RGB565:
+ image->format = MESA_FORMAT_RGB565;
+ image->internal_format = GL_RGB;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
+ case __DRI_IMAGE_FORMAT_XRGB8888:
+ image->format = MESA_FORMAT_XRGB8888;
+ image->internal_format = GL_RGB;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
+ case __DRI_IMAGE_FORMAT_ARGB8888:
+ image->format = MESA_FORMAT_ARGB8888;
+ image->internal_format = GL_RGBA;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
+ default:
+ free(image);
+ return NULL;
+ }
+
+ image->data = loaderPrivate;
+ image->cpp = _mesa_get_format_bytes(image->format);
+ image->width = width;
+ image->pitch = pitch;
+ image->height = height;
+
+ image->bo = radeon_bo_open(radeon->radeonScreen->bom,
+ (uint32_t)name,
+ image->pitch * image->height * image->cpp,
+ 0,
+ RADEON_GEM_DOMAIN_VRAM,
+ 0);
+
+ if (image->bo == NULL) {
+ FREE(image);
+ return NULL;
+ }
+
+ return image;
+}
+
+static __DRIimage *
+radeon_create_image_from_renderbuffer(__DRIcontext *context,
+ int renderbuffer, void *loaderPrivate)
+{
+ __DRIimage *image;
+ radeonContextPtr radeon = context->driverPrivate;
+ struct gl_renderbuffer *rb;
+ struct radeon_renderbuffer *rrb;
+
+ rb = _mesa_lookup_renderbuffer(radeon->glCtx, renderbuffer);
+ if (!rb) {
+ _mesa_error(radeon->glCtx,
+ GL_INVALID_OPERATION, "glRenderbufferExternalMESA");
+ return NULL;
+ }
+
+ rrb = radeon_renderbuffer(rb);
+ image = CALLOC(sizeof *image);
+ if (image == NULL)
+ return NULL;
+
+ image->internal_format = rb->InternalFormat;
+ image->format = rb->Format;
+ image->cpp = rrb->cpp;
+ image->data_type = rb->DataType;
+ image->data = loaderPrivate;
+ radeon_bo_ref(rrb->bo);
+ image->bo = rrb->bo;
+
+ image->width = rb->Width;
+ image->height = rb->Height;
+ image->pitch = rrb->pitch / image->cpp;
+
+ return image;
+}
+
+static void
+radeon_destroy_image(__DRIimage *image)
+{
+ radeon_bo_unref(image->bo);
+ FREE(image);
+}
+
+static __DRIimage *
+radeon_create_image(__DRIscreen *screen,
+ int width, int height, int format,
+ unsigned int use,
+ void *loaderPrivate)
+{
+ __DRIimage *image;
+ radeonScreenPtr radeonScreen = screen->private;
+
+ image = CALLOC(sizeof *image);
+ if (image == NULL)
+ return NULL;
+
+ switch (format) {
+ case __DRI_IMAGE_FORMAT_RGB565:
+ image->format = MESA_FORMAT_RGB565;
+ image->internal_format = GL_RGB;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
+ case __DRI_IMAGE_FORMAT_XRGB8888:
+ image->format = MESA_FORMAT_XRGB8888;
+ image->internal_format = GL_RGB;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
+ case __DRI_IMAGE_FORMAT_ARGB8888:
+ image->format = MESA_FORMAT_ARGB8888;
+ image->internal_format = GL_RGBA;
+ image->data_type = GL_UNSIGNED_BYTE;
+ break;
+ default:
+ free(image);
+ return NULL;
+ }
+
+ image->data = loaderPrivate;
+ image->cpp = _mesa_get_format_bytes(image->format);
+ image->width = width;
+ image->height = height;
+ image->pitch = ((image->cpp * image->width + 255) & ~255) / image->cpp;
+
+ image->bo = radeon_bo_open(radeonScreen->bom,
+ 0,
+ image->pitch * image->height * image->cpp,
+ 0,
+ RADEON_GEM_DOMAIN_VRAM,
+ 0);
+
+ if (image->bo == NULL) {
+ FREE(image);
+ return NULL;
+ }
+
+ return image;
+}
+
+static GLboolean
+radeon_query_image(__DRIimage *image, int attrib, int *value)
+{
+ switch (attrib) {
+ case __DRI_IMAGE_ATTRIB_STRIDE:
+ *value = image->pitch * image->cpp;
+ return GL_TRUE;
+ case __DRI_IMAGE_ATTRIB_HANDLE:
+ *value = image->bo->handle;
+ return GL_TRUE;
+ case __DRI_IMAGE_ATTRIB_NAME:
+ radeon_gem_get_kernel_name(image->bo, (uint32_t *) value);
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+static struct __DRIimageExtensionRec radeonImageExtension = {
+ { __DRI_IMAGE, __DRI_IMAGE_VERSION },
+ radeon_create_image_from_name,
+ radeon_create_image_from_renderbuffer,
+ radeon_destroy_image,
+ radeon_create_image,
+ radeon_query_image
+};
+
static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
{
screen->device_id = device_id;
@@ -1138,6 +1322,12 @@ radeonCreateScreen( __DRIscreen *sPriv )
else
screen->chip_flags |= RADEON_CLASS_R600;
+ /* set group bytes for r6xx+ */
+ if (screen->chip_family >= CHIP_FAMILY_CEDAR)
+ screen->group_bytes = 512;
+ else
+ screen->group_bytes = 256;
+
screen->cpp = dri_priv->bpp / 8;
screen->AGPMode = dri_priv->AGPMode;
@@ -1382,8 +1572,13 @@ radeonCreateScreen2(__DRIscreen *sPriv)
else
screen->chip_flags |= RADEON_CLASS_R600;
- /* r6xx+ tiling */
- if (IS_R600_CLASS(screen) && (sPriv->drm_version.minor >= 6)) {
+ /* r6xx+ tiling, default group bytes */
+ if (screen->chip_family >= CHIP_FAMILY_CEDAR)
+ screen->group_bytes = 512;
+ else
+ screen->group_bytes = 256;
+ if (IS_R600_CLASS(screen) && (sPriv->drm_version.minor >= 6) &&
+ (screen->chip_family < CHIP_FAMILY_CEDAR)) {
ret = radeonGetParam(sPriv, RADEON_INFO_TILE_CONFIG, &temp);
if (ret)
fprintf(stderr, "failed to get tiling info\n");
@@ -1507,6 +1702,7 @@ radeonCreateScreen2(__DRIscreen *sPriv)
#endif
screen->extensions[i++] = &radeonFlushExtension.base;
+ screen->extensions[i++] = &radeonImageExtension.base;
screen->extensions[i++] = NULL;
sPriv->extensions = screen->extensions;
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h b/src/mesa/drivers/dri/radeon/radeon_screen.h
index 2b33201a53..417ebf3b06 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.h
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.h
@@ -121,6 +121,17 @@ typedef struct radeon_screen {
GLint r7xx_bank_op;
} radeonScreenRec, *radeonScreenPtr;
+struct __DRIimageRec {
+ struct radeon_bo *bo;
+ GLenum internal_format;
+ GLuint format;
+ GLenum data_type;
+ int width, height; /* in pixels */
+ int pitch; /* in pixels */
+ int cpp;
+ void *data;
+};
+
#define IS_R100_CLASS(screen) \
((screen->chip_flags & RADEON_CLASS_MASK) == RADEON_CLASS_R100)
#define IS_R200_CLASS(screen) \
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index f5b0df6ef5..ff3506b225 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -412,6 +412,8 @@ static GLboolean radeon_run_render( struct gl_context *ctx,
return GL_TRUE;
radeon_prepare_render(&rmesa->radeon);
+ if (rmesa->radeon.NewGLState)
+ radeonValidateState( ctx );
tnl->Driver.Render.Start( ctx );
diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
index c59b413012..5d2e8f4870 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
@@ -253,6 +253,8 @@ void radeonTclPrimitive( struct gl_context *ctx,
GLuint newprim = hw_prim | RADEON_CP_VC_CNTL_TCL_ENABLE;
radeon_prepare_render(&rmesa->radeon);
+ if (rmesa->radeon.NewGLState)
+ radeonValidateState( ctx );
if (newprim != rmesa->tcl.hw_primitive ||
!discrete_prim[hw_prim&0xf]) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index d5285e24cd..83b1d1b1d7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -465,5 +465,9 @@ void radeonInitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *
functions->MapTexture = radeonMapTexture;
functions->UnmapTexture = radeonUnmapTexture;
+#if FEATURE_OES_EGL_image
+ functions->EGLImageTargetTexture2D = radeon_image_target_texture_2d;
+#endif
+
driInitTextureFormats();
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index dd8ecdd500..32c021cb54 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -653,6 +653,7 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
radeonTexObjPtr t;
uint32_t pitch_val;
uint32_t internalFormat, type, format;
+ gl_format texFormat;
type = GL_BGRA;
format = GL_UNSIGNED_BYTE;
@@ -692,10 +693,6 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
radeon_miptree_unreference(&t->mt);
radeon_miptree_unreference(&rImage->mt);
- _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
- rb->base.Width, rb->base.Height, 1, 0, rb->cpp);
- texImage->RowStride = rb->pitch / rb->cpp;
-
rImage->bo = rb->bo;
radeon_bo_ref(rImage->bo);
t->bo = rb->bo;
@@ -705,23 +702,34 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint texture_form
t->override_offset = 0;
switch (rb->cpp) {
case 4:
- if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
+ if (texture_format == __DRI_TEXTURE_FORMAT_RGB) {
t->pp_txformat = tx_table[MESA_FORMAT_RGB888].format;
- else
+ texFormat = MESA_FORMAT_RGB888;
+ }
+ else {
t->pp_txformat = tx_table[MESA_FORMAT_ARGB8888].format;
+ texFormat = MESA_FORMAT_ARGB8888;
+ }
t->pp_txfilter |= tx_table[MESA_FORMAT_ARGB8888].filter;
break;
case 3:
default:
+ texFormat = MESA_FORMAT_RGB888;
t->pp_txformat = tx_table[MESA_FORMAT_RGB888].format;
t->pp_txfilter |= tx_table[MESA_FORMAT_RGB888].filter;
break;
case 2:
+ texFormat = MESA_FORMAT_RGB565;
t->pp_txformat = tx_table[MESA_FORMAT_RGB565].format;
t->pp_txfilter |= tx_table[MESA_FORMAT_RGB565].filter;
break;
}
+ _mesa_init_teximage_fields(radeon->glCtx, target, texImage,
+ rb->base.Width, rb->base.Height, 1, 0,
+ rb->cpp, texFormat);
+ texImage->RowStride = rb->pitch / rb->cpp;
+
t->pp_txpitch &= (1 << 13) -1;
pitch_val = rb->pitch;
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 18ccb512d7..8b1e34fe76 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -1007,3 +1007,67 @@ unsigned radeonIsFormatRenderable(gl_format mesa_format)
return 0;
}
}
+
+#if FEATURE_OES_EGL_image
+void radeon_image_target_texture_2d(struct gl_context *ctx, GLenum target,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLeglImageOES image_handle)
+{
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
+ radeonTexObj *t = radeon_tex_obj(texObj);
+ radeon_texture_image *radeonImage = get_radeon_texture_image(texImage);
+ __DRIscreen *screen;
+ __DRIimage *image;
+
+ screen = radeon->dri.screen;
+ image = screen->dri2.image->lookupEGLImage(screen, image_handle,
+ screen->loaderPrivate);
+ if (image == NULL)
+ return;
+
+ radeonFreeTexImageData(ctx, texImage);
+
+ texImage->Width = image->width;
+ texImage->Height = image->height;
+ texImage->Depth = 1;
+ texImage->_BaseFormat = GL_RGBA;
+ texImage->TexFormat = image->format;
+ texImage->RowStride = image->pitch;
+ texImage->InternalFormat = image->internal_format;
+
+ if(t->mt)
+ {
+ radeon_miptree_unreference(&t->mt);
+ t->mt = NULL;
+ }
+
+ /* NOTE: The following is *very* ugly and will probably break. But
+ I don't know how to deal with it, without creating a whole new
+ function like radeon_miptree_from_bo() so I'm going with the
+ easy but error-prone way. */
+
+ radeon_try_alloc_miptree(radeon, t);
+
+ radeonImage->mtface = _mesa_tex_target_to_face(target);
+ radeonImage->mtlevel = 0;
+ radeon_miptree_reference(t->mt, &radeonImage->mt);
+
+ if (t->mt == NULL)
+ {
+ radeon_print(RADEON_TEXTURE, RADEON_VERBOSE,
+ "%s Failed to allocate miptree.\n", __func__);
+ return;
+ }
+
+ /* Particularly ugly: this is guaranteed to break, if image->bo is
+ not of the required size for a miptree. */
+ radeon_bo_unref(t->mt->bo);
+ radeon_bo_ref(image->bo);
+ t->mt->bo = image->bo;
+
+ if (!radeon_miptree_matches_image(t->mt, &radeonImage->base,
+ radeonImage->mtface, 0))
+ fprintf(stderr, "miptree doesn't match image\n");
+}
+#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h
index 9138a7d554..a1908c6bc7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.h
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.h
@@ -137,4 +137,11 @@ void radeonCopyTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
unsigned radeonIsFormatRenderable(gl_format mesa_format);
+#if FEATURE_OES_EGL_image
+void radeon_image_target_texture_2d(struct gl_context *ctx, GLenum target,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLeglImageOES image_handle);
+#endif
+
#endif
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index b3aaa0e504..92fb4f4488 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -50,7 +50,6 @@
#include "savagespan.h"
#include "savagetris.h"
#include "savageioctl.h"
-#include "savage_bci.h"
#include "savage_dri.h"
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 52ba3acf65..c7940e9c0d 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -48,7 +48,6 @@
#include "utils.h"
#include "main/teximage.h"
-#include "main/texfetch.h"
#include "main/texformat.h"
#include "main/texstate.h"
@@ -69,6 +68,7 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
uint32_t internalFormat;
+ gl_format texFormat;
dri_ctx = pDRICtx->driverPrivate;
@@ -82,15 +82,13 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
sPriv->swrast_loader->getDrawableInfo(dPriv, &x, &y, &w, &h, dPriv->loaderPrivate);
- _mesa_init_teximage_fields(&dri_ctx->Base, target, texImage,
- w, h, 1, 0, internalFormat);
-
if (texture_format == __DRI_TEXTURE_FORMAT_RGB)
- texImage->TexFormat = MESA_FORMAT_XRGB8888;
+ texFormat = MESA_FORMAT_XRGB8888;
else
- texImage->TexFormat = MESA_FORMAT_ARGB8888;
+ texFormat = MESA_FORMAT_ARGB8888;
- _mesa_set_fetch_functions(texImage, 2);
+ _mesa_init_teximage_fields(&dri_ctx->Base, target, texImage,
+ w, h, 1, 0, internalFormat, texFormat);
sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *)texImage->Data,
dPriv->loaderPrivate);
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_tex.c b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
index 0326b847cb..4cca243d07 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_tex.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_tex.c
@@ -698,8 +698,8 @@ convertPalette(FxU32 data[256], const struct gl_color_table *table)
return GR_TEXTABLE_PALETTE_6666_EXT;
default:
/* XXX fixme: how can this happen? */
- _mesa_error(NULL, GL_INVALID_ENUM, "convertPalette: table->Format == %s",
- _mesa_lookup_enum_by_nr(table->Format));
+ _mesa_error(NULL, GL_INVALID_ENUM, "convertPalette: table->_BaseFormat == %s",
+ _mesa_lookup_enum_by_nr(table->_BaseFormat));
return GR_TEXTABLE_PALETTE;
}
}
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 37dc35cbed..10ba6b7931 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1327,10 +1327,12 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type,
* that converts rendering from CHAN_BITS to the user-requested channel
* size.
*/
- osmesa->rb = new_osmesa_renderbuffer(&osmesa->mesa, osmesa->format, type);
- _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT);
- _mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb);
- assert(osmesa->rb->RefCount == 2);
+ if (!osmesa->rb) {
+ osmesa->rb = new_osmesa_renderbuffer(&osmesa->mesa, osmesa->format, type);
+ _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT);
+ _mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb);
+ assert(osmesa->rb->RefCount == 2);
+ }
/* Set renderbuffer fields. Set width/height = 0 to force
* osmesa_renderbuffer_storage() being called by _mesa_resize_framebuffer()
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index f1e62b6bd4..577e27d4da 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -868,6 +868,7 @@ register_with_display(Display *dpy)
XExtCodes *c = XAddExtension(dpy);
ext = dpy->ext_procs; /* new extension is at head of list */
assert(c->extension == ext->codes.extension);
+ (void) c; /* silence warning */
ext->name = _mesa_strdup(extName);
ext->close_display = close_display_callback;
}
diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c
index 8c3f2730f3..255a37bf29 100644
--- a/src/mesa/drivers/x11/glxapi.c
+++ b/src/mesa/drivers/x11/glxapi.c
@@ -58,7 +58,6 @@ struct display_dispatch {
#ifdef GLX_INDIRECT_RENDERING
#include "glapi/glapitable.h"
-#include "glapi/glapidispatch.h"
#define KEYWORD1 PUBLIC
@@ -69,10 +68,10 @@ struct display_dispatch {
#endif
#define DISPATCH(FUNC, ARGS, MESSAGE) \
- CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+ GET_DISPATCH()->FUNC ARGS
#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
- return CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+ return GET_DISPATCH()->FUNC ARGS
/* skip normal ones */
#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
diff --git a/src/mesa/main/accum.h b/src/mesa/main/accum.h
index def692a73a..9344244497 100644
--- a/src/mesa/main/accum.h
+++ b/src/mesa/main/accum.h
@@ -37,8 +37,11 @@
#ifndef ACCUM_H
#define ACCUM_H
+#include "main/glheader.h"
+#include "main/mfeatures.h"
-#include "main/mtypes.h"
+struct _glapi_table;
+struct gl_context;
#if FEATURE_accum
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index 172c33b47b..c22e18c9fb 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -22,6 +22,14 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+/**
+ * This file implements the glArrayElement() function.
+ * It involves looking at the format/type of all the enabled vertex arrays
+ * and emitting a list of pointers to functions which set the per-vertex
+ * state for the element/index.
+ */
+
+
/* Author:
* Keith Whitwell <keith@tungstengraphics.com>
*/
@@ -70,11 +78,13 @@ typedef struct {
*/
#define TYPE_IDX(t) ( (t) == GL_DOUBLE ? 7 : (t) & 7 )
+#define NUM_TYPES 8
+
#if FEATURE_arrayelt
-static const int ColorFuncs[2][8] = {
+static const int ColorFuncs[2][NUM_TYPES] = {
{
_gloffset_Color3bv,
_gloffset_Color3ubv,
@@ -97,7 +107,7 @@ static const int ColorFuncs[2][8] = {
},
};
-static const int VertexFuncs[3][8] = {
+static const int VertexFuncs[3][NUM_TYPES] = {
{
-1,
-1,
@@ -130,7 +140,7 @@ static const int VertexFuncs[3][8] = {
},
};
-static const int IndexFuncs[8] = {
+static const int IndexFuncs[NUM_TYPES] = {
-1,
_gloffset_Indexubv,
_gloffset_Indexsv,
@@ -141,7 +151,7 @@ static const int IndexFuncs[8] = {
_gloffset_Indexdv,
};
-static const int NormalFuncs[8] = {
+static const int NormalFuncs[NUM_TYPES] = {
_gloffset_Normal3bv,
-1,
_gloffset_Normal3sv,
@@ -153,8 +163,8 @@ static const int NormalFuncs[8] = {
};
/* Note: _gloffset_* for these may not be a compile-time constant. */
-static int SecondaryColorFuncs[8];
-static int FogCoordFuncs[8];
+static int SecondaryColorFuncs[NUM_TYPES];
+static int FogCoordFuncs[NUM_TYPES];
/**
@@ -163,39 +173,46 @@ static int FogCoordFuncs[8];
/* GL_BYTE attributes */
-static void GLAPIENTRY VertexAttrib1NbvNV(GLuint index, const GLbyte *v)
+static void
+VertexAttrib1NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1bvNV(GLuint index, const GLbyte *v)
+static void
+VertexAttrib1bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NbvNV(GLuint index, const GLbyte *v)
+static void
+VertexAttrib2NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2bvNV(GLuint index, const GLbyte *v)
+static void
+VertexAttrib2bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NbvNV(GLuint index, const GLbyte *v)
+static void
+VertexAttrib3NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
BYTE_TO_FLOAT(v[1]),
BYTE_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3bvNV(GLuint index, const GLbyte *v)
+static void
+VertexAttrib3bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NbvNV(GLuint index, const GLbyte *v)
+static void
+VertexAttrib4NbvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
BYTE_TO_FLOAT(v[1]),
@@ -203,94 +220,114 @@ static void GLAPIENTRY VertexAttrib4NbvNV(GLuint index, const GLbyte *v)
BYTE_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4bvNV(GLuint index, const GLbyte *v)
+static void
+VertexAttrib4bvNV(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_UNSIGNED_BYTE attributes */
-static void GLAPIENTRY VertexAttrib1NubvNV(GLuint index, const GLubyte *v)
+static void
+VertexAttrib1NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1ubvNV(GLuint index, const GLubyte *v)
+static void
+VertexAttrib1ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NubvNV(GLuint index, const GLubyte *v)
+static void
+VertexAttrib2NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
- UBYTE_TO_FLOAT(v[1])));
+ UBYTE_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2ubvNV(GLuint index, const GLubyte *v)
+static void
+VertexAttrib2ubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NubvNV(GLuint index, const GLubyte *v)
+static void
+VertexAttrib3NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
UBYTE_TO_FLOAT(v[1]),
UBYTE_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3ubvNV(GLuint index, const GLubyte *v)
+static void
+VertexAttrib3ubvNV(GLuint index, const GLubyte *v)
{
- CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1], (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NubvNV(GLuint index, const GLubyte *v)
+static void
+VertexAttrib4NubvNV(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
- UBYTE_TO_FLOAT(v[1]),
- UBYTE_TO_FLOAT(v[2]),
- UBYTE_TO_FLOAT(v[3])));
+ UBYTE_TO_FLOAT(v[1]),
+ UBYTE_TO_FLOAT(v[2]),
+ UBYTE_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
+static void
+VertexAttrib4ubvNV(GLuint index, const GLubyte *v)
{
- CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
+ CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1], (GLfloat)v[2],
+ (GLfloat)v[3]));
}
/* GL_SHORT attributes */
-static void GLAPIENTRY VertexAttrib1NsvNV(GLuint index, const GLshort *v)
+static void
+VertexAttrib1NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1svNV(GLuint index, const GLshort *v)
+static void
+VertexAttrib1svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NsvNV(GLuint index, const GLshort *v)
+static void
+VertexAttrib2NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
- SHORT_TO_FLOAT(v[1])));
+ SHORT_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2svNV(GLuint index, const GLshort *v)
+static void
+VertexAttrib2svNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NsvNV(GLuint index, const GLshort *v)
+static void
+VertexAttrib3NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
SHORT_TO_FLOAT(v[1]),
SHORT_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3svNV(GLuint index, const GLshort *v)
+static void
+VertexAttrib3svNV(GLuint index, const GLshort *v)
{
- CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NsvNV(GLuint index, const GLshort *v)
+static void
+VertexAttrib4NsvNV(GLuint index, const GLshort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
SHORT_TO_FLOAT(v[1]),
@@ -298,47 +335,58 @@ static void GLAPIENTRY VertexAttrib4NsvNV(GLuint index, const GLshort *v)
SHORT_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4svNV(GLuint index, const GLshort *v)
+static void
+VertexAttrib4svNV(GLuint index, const GLshort *v)
{
- CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
+ CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_UNSIGNED_SHORT attributes */
-static void GLAPIENTRY VertexAttrib1NusvNV(GLuint index, const GLushort *v)
+static void
+VertexAttrib1NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1usvNV(GLuint index, const GLushort *v)
+static void
+VertexAttrib1usvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NusvNV(GLuint index, const GLushort *v)
+static void
+VertexAttrib2NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2usvNV(GLuint index, const GLushort *v)
+static void
+VertexAttrib2usvNV(GLuint index, const GLushort *v)
{
- CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
+ CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NusvNV(GLuint index, const GLushort *v)
+static void
+VertexAttrib3NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1]),
USHORT_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3usvNV(GLuint index, const GLushort *v)
+static void
+VertexAttrib3usvNV(GLuint index, const GLushort *v)
{
- CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NusvNV(GLuint index, const GLushort *v)
+static void
+VertexAttrib4NusvNV(GLuint index, const GLushort *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1]),
@@ -346,95 +394,116 @@ static void GLAPIENTRY VertexAttrib4NusvNV(GLuint index, const GLushort *v)
USHORT_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4usvNV(GLuint index, const GLushort *v)
+static void
+VertexAttrib4usvNV(GLuint index, const GLushort *v)
{
- CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
+ CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_INT attributes */
-static void GLAPIENTRY VertexAttrib1NivNV(GLuint index, const GLint *v)
+static void
+VertexAttrib1NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1ivNV(GLuint index, const GLint *v)
+static void
+VertexAttrib1ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NivNV(GLuint index, const GLint *v)
+static void
+VertexAttrib2NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2ivNV(GLuint index, const GLint *v)
+static void
+VertexAttrib2ivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NivNV(GLuint index, const GLint *v)
+static void
+VertexAttrib3NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1]),
INT_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3ivNV(GLuint index, const GLint *v)
+static void
+VertexAttrib3ivNV(GLuint index, const GLint *v)
{
- CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NivNV(GLuint index, const GLint *v)
+static void
+VertexAttrib4NivNV(GLuint index, const GLint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
- INT_TO_FLOAT(v[1]),
- INT_TO_FLOAT(v[2]),
- INT_TO_FLOAT(v[3])));
+ INT_TO_FLOAT(v[1]),
+ INT_TO_FLOAT(v[2]),
+ INT_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4ivNV(GLuint index, const GLint *v)
+static void
+VertexAttrib4ivNV(GLuint index, const GLint *v)
{
- CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
+ CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_UNSIGNED_INT attributes */
-static void GLAPIENTRY VertexAttrib1NuivNV(GLuint index, const GLuint *v)
+static void
+VertexAttrib1NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1uivNV(GLuint index, const GLuint *v)
+static void
+VertexAttrib1uivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fNV(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NuivNV(GLuint index, const GLuint *v)
+static void
+VertexAttrib2NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
- UINT_TO_FLOAT(v[1])));
+ UINT_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2uivNV(GLuint index, const GLuint *v)
+static void
+VertexAttrib2uivNV(GLuint index, const GLuint *v)
{
- CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
+ CALL_VertexAttrib2fNV(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NuivNV(GLuint index, const GLuint *v)
+static void
+VertexAttrib3NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
UINT_TO_FLOAT(v[1]),
UINT_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3uivNV(GLuint index, const GLuint *v)
+static void
+VertexAttrib3uivNV(GLuint index, const GLuint *v)
{
- CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NuivNV(GLuint index, const GLuint *v)
+static void
+VertexAttrib4NuivNV(GLuint index, const GLuint *v)
{
CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
UINT_TO_FLOAT(v[1]),
@@ -442,51 +511,61 @@ static void GLAPIENTRY VertexAttrib4NuivNV(GLuint index, const GLuint *v)
UINT_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4uivNV(GLuint index, const GLuint *v)
+static void
+VertexAttrib4uivNV(GLuint index, const GLuint *v)
{
- CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
+ CALL_VertexAttrib4fNV(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_FLOAT attributes */
-static void GLAPIENTRY VertexAttrib1fvNV(GLuint index, const GLfloat *v)
+static void
+VertexAttrib1fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib1fvNV(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib2fvNV(GLuint index, const GLfloat *v)
+static void
+VertexAttrib2fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib2fvNV(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib3fvNV(GLuint index, const GLfloat *v)
+static void
+VertexAttrib3fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib3fvNV(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib4fvNV(GLuint index, const GLfloat *v)
+static void
+VertexAttrib4fvNV(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib4fvNV(GET_DISPATCH(), (index, v));
}
/* GL_DOUBLE attributes */
-static void GLAPIENTRY VertexAttrib1dvNV(GLuint index, const GLdouble *v)
+static void
+VertexAttrib1dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib1dvNV(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib2dvNV(GLuint index, const GLdouble *v)
+static void
+VertexAttrib2dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib2dvNV(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib3dvNV(GLuint index, const GLdouble *v)
+static void
+VertexAttrib3dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib3dvNV(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib4dvNV(GLuint index, const GLdouble *v)
+static void
+VertexAttrib4dvNV(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib4dvNV(GET_DISPATCH(), (index, v));
}
@@ -495,7 +574,7 @@ static void GLAPIENTRY VertexAttrib4dvNV(GLuint index, const GLdouble *v)
/*
* Array [size][type] of VertexAttrib functions
*/
-static attrib_func AttribFuncsNV[2][4][8] = {
+static attrib_func AttribFuncsNV[2][4][NUM_TYPES] = {
{
/* non-normalized */
{
@@ -599,39 +678,46 @@ static attrib_func AttribFuncsNV[2][4][8] = {
/* GL_BYTE attributes */
-static void GLAPIENTRY VertexAttrib1NbvARB(GLuint index, const GLbyte *v)
+static void
+VertexAttrib1NbvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1bvARB(GLuint index, const GLbyte *v)
+static void
+VertexAttrib1bvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NbvARB(GLuint index, const GLbyte *v)
+static void
+VertexAttrib2NbvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2bvARB(GLuint index, const GLbyte *v)
+static void
+VertexAttrib2bvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NbvARB(GLuint index, const GLbyte *v)
+static void
+VertexAttrib3NbvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
BYTE_TO_FLOAT(v[1]),
BYTE_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3bvARB(GLuint index, const GLbyte *v)
+static void
+VertexAttrib3bvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NbvARB(GLuint index, const GLbyte *v)
+static void
+VertexAttrib4NbvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]),
BYTE_TO_FLOAT(v[1]),
@@ -639,142 +725,188 @@ static void GLAPIENTRY VertexAttrib4NbvARB(GLuint index, const GLbyte *v)
BYTE_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4bvARB(GLuint index, const GLbyte *v)
+static void
+VertexAttrib4bvARB(GLuint index, const GLbyte *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_UNSIGNED_BYTE attributes */
-static void GLAPIENTRY VertexAttrib1NubvARB(GLuint index, const GLubyte *v)
+static void
+VertexAttrib1NubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1ubvARB(GLuint index, const GLubyte *v)
+static void
+VertexAttrib1ubvARB(GLuint index, const GLubyte *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NubvARB(GLuint index, const GLubyte *v)
+static void
+VertexAttrib2NubvARB(GLuint index, const GLubyte *v)
{
- CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
- UBYTE_TO_FLOAT(v[1])));
+ CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,
+ UBYTE_TO_FLOAT(v[0]),
+ UBYTE_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2ubvARB(GLuint index, const GLubyte *v)
+static void
+VertexAttrib2ubvARB(GLuint index, const GLubyte *v)
{
- CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
+ CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,
+ (GLfloat)v[0], (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NubvARB(GLuint index, const GLubyte *v)
+static void
+VertexAttrib3NubvARB(GLuint index, const GLubyte *v)
{
- CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
- UBYTE_TO_FLOAT(v[1]),
- UBYTE_TO_FLOAT(v[2])));
+ CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,
+ UBYTE_TO_FLOAT(v[0]),
+ UBYTE_TO_FLOAT(v[1]),
+ UBYTE_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3ubvARB(GLuint index, const GLubyte *v)
+static void
+VertexAttrib3ubvARB(GLuint index, const GLubyte *v)
{
- CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,
+ (GLfloat)v[0],
+ (GLfloat)v[1],
+ (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NubvARB(GLuint index, const GLubyte *v)
+static void
+VertexAttrib4NubvARB(GLuint index, const GLubyte *v)
{
- CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]),
- UBYTE_TO_FLOAT(v[1]),
- UBYTE_TO_FLOAT(v[2]),
- UBYTE_TO_FLOAT(v[3])));
+ CALL_VertexAttrib4fARB(GET_DISPATCH(),
+ (index,
+ UBYTE_TO_FLOAT(v[0]),
+ UBYTE_TO_FLOAT(v[1]),
+ UBYTE_TO_FLOAT(v[2]),
+ UBYTE_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4ubvARB(GLuint index, const GLubyte *v)
+static void
+VertexAttrib4ubvARB(GLuint index, const GLubyte *v)
{
- CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
+ CALL_VertexAttrib4fARB(GET_DISPATCH(),
+ (index,
+ (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_SHORT attributes */
-static void GLAPIENTRY VertexAttrib1NsvARB(GLuint index, const GLshort *v)
+static void
+VertexAttrib1NsvARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1svARB(GLuint index, const GLshort *v)
+static void
+VertexAttrib1svARB(GLuint index, const GLshort *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NsvARB(GLuint index, const GLshort *v)
+static void
+VertexAttrib2NsvARB(GLuint index, const GLshort *v)
{
- CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
- SHORT_TO_FLOAT(v[1])));
+ CALL_VertexAttrib2fARB(GET_DISPATCH(),
+ (index, SHORT_TO_FLOAT(v[0]),
+ SHORT_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2svARB(GLuint index, const GLshort *v)
+static void
+VertexAttrib2svARB(GLuint index, const GLshort *v)
{
- CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
+ CALL_VertexAttrib2fARB(GET_DISPATCH(),
+ (index, (GLfloat)v[0], (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NsvARB(GLuint index, const GLshort *v)
+static void
+VertexAttrib3NsvARB(GLuint index, const GLshort *v)
{
- CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
- SHORT_TO_FLOAT(v[1]),
- SHORT_TO_FLOAT(v[2])));
+ CALL_VertexAttrib3fARB(GET_DISPATCH(),
+ (index,
+ SHORT_TO_FLOAT(v[0]),
+ SHORT_TO_FLOAT(v[1]),
+ SHORT_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3svARB(GLuint index, const GLshort *v)
+static void
+VertexAttrib3svARB(GLuint index, const GLshort *v)
{
- CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fARB(GET_DISPATCH(),
+ (index,
+ (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NsvARB(GLuint index, const GLshort *v)
+static void
+VertexAttrib4NsvARB(GLuint index, const GLshort *v)
{
- CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]),
- SHORT_TO_FLOAT(v[1]),
- SHORT_TO_FLOAT(v[2]),
- SHORT_TO_FLOAT(v[3])));
+ CALL_VertexAttrib4fARB(GET_DISPATCH(),
+ (index,
+ SHORT_TO_FLOAT(v[0]),
+ SHORT_TO_FLOAT(v[1]),
+ SHORT_TO_FLOAT(v[2]),
+ SHORT_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4svARB(GLuint index, const GLshort *v)
+static void
+VertexAttrib4svARB(GLuint index, const GLshort *v)
{
- CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
+ CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_UNSIGNED_SHORT attributes */
-static void GLAPIENTRY VertexAttrib1NusvARB(GLuint index, const GLushort *v)
+static void
+VertexAttrib1NusvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1usvARB(GLuint index, const GLushort *v)
+static void
+VertexAttrib1usvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NusvARB(GLuint index, const GLushort *v)
+static void
+VertexAttrib2NusvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2usvARB(GLuint index, const GLushort *v)
+static void
+VertexAttrib2usvARB(GLuint index, const GLushort *v)
{
- CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
+ CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NusvARB(GLuint index, const GLushort *v)
+static void
+VertexAttrib3NusvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1]),
USHORT_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3usvARB(GLuint index, const GLushort *v)
+static void
+VertexAttrib3usvARB(GLuint index, const GLushort *v)
{
- CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1], (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NusvARB(GLuint index, const GLushort *v)
+static void
+VertexAttrib4NusvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]),
USHORT_TO_FLOAT(v[1]),
@@ -782,47 +914,57 @@ static void GLAPIENTRY VertexAttrib4NusvARB(GLuint index, const GLushort *v)
USHORT_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4usvARB(GLuint index, const GLushort *v)
+static void
+VertexAttrib4usvARB(GLuint index, const GLushort *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_INT attributes */
-static void GLAPIENTRY VertexAttrib1NivARB(GLuint index, const GLint *v)
+static void
+VertexAttrib1NivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1ivARB(GLuint index, const GLint *v)
+static void
+VertexAttrib1ivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NivARB(GLuint index, const GLint *v)
+static void
+VertexAttrib2NivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2ivARB(GLuint index, const GLint *v)
+static void
+VertexAttrib2ivARB(GLuint index, const GLint *v)
{
- CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
+ CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NivARB(GLuint index, const GLint *v)
+static void
+VertexAttrib3NivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1]),
INT_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3ivARB(GLuint index, const GLint *v)
+static void
+VertexAttrib3ivARB(GLuint index, const GLint *v)
{
- CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1], (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NivARB(GLuint index, const GLint *v)
+static void
+VertexAttrib4NivARB(GLuint index, const GLint *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]),
INT_TO_FLOAT(v[1]),
@@ -830,108 +972,287 @@ static void GLAPIENTRY VertexAttrib4NivARB(GLuint index, const GLint *v)
INT_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4ivARB(GLuint index, const GLint *v)
+static void
+VertexAttrib4ivARB(GLuint index, const GLint *v)
{
- CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
+ CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_UNSIGNED_INT attributes */
-static void GLAPIENTRY VertexAttrib1NuivARB(GLuint index, const GLuint *v)
+static void
+VertexAttrib1NuivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0])));
}
-static void GLAPIENTRY VertexAttrib1uivARB(GLuint index, const GLuint *v)
+static void
+VertexAttrib1uivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0]));
}
-static void GLAPIENTRY VertexAttrib2NuivARB(GLuint index, const GLuint *v)
+static void
+VertexAttrib2NuivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
- UINT_TO_FLOAT(v[1])));
+ UINT_TO_FLOAT(v[1])));
}
-static void GLAPIENTRY VertexAttrib2uivARB(GLuint index, const GLuint *v)
+static void
+VertexAttrib2uivARB(GLuint index, const GLuint *v)
{
- CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1]));
+ CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1]));
}
-static void GLAPIENTRY VertexAttrib3NuivARB(GLuint index, const GLuint *v)
+static void
+VertexAttrib3NuivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
- UINT_TO_FLOAT(v[1]),
- UINT_TO_FLOAT(v[2])));
+ UINT_TO_FLOAT(v[1]),
+ UINT_TO_FLOAT(v[2])));
}
-static void GLAPIENTRY VertexAttrib3uivARB(GLuint index, const GLuint *v)
+static void
+VertexAttrib3uivARB(GLuint index, const GLuint *v)
{
- CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2]));
+ CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0],
+ (GLfloat)v[1], (GLfloat)v[2]));
}
-static void GLAPIENTRY VertexAttrib4NuivARB(GLuint index, const GLuint *v)
+static void
+VertexAttrib4NuivARB(GLuint index, const GLuint *v)
{
CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]),
- UINT_TO_FLOAT(v[1]),
- UINT_TO_FLOAT(v[2]),
- UINT_TO_FLOAT(v[3])));
+ UINT_TO_FLOAT(v[1]),
+ UINT_TO_FLOAT(v[2]),
+ UINT_TO_FLOAT(v[3])));
}
-static void GLAPIENTRY VertexAttrib4uivARB(GLuint index, const GLuint *v)
+static void
+VertexAttrib4uivARB(GLuint index, const GLuint *v)
{
- CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3]));
+ CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1],
+ (GLfloat)v[2], (GLfloat)v[3]));
}
/* GL_FLOAT attributes */
-static void GLAPIENTRY VertexAttrib1fvARB(GLuint index, const GLfloat *v)
+static void
+VertexAttrib1fvARB(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib1fvARB(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib2fvARB(GLuint index, const GLfloat *v)
+static void
+VertexAttrib2fvARB(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib2fvARB(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib3fvARB(GLuint index, const GLfloat *v)
+static void
+VertexAttrib3fvARB(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib3fvARB(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib4fvARB(GLuint index, const GLfloat *v)
+static void
+VertexAttrib4fvARB(GLuint index, const GLfloat *v)
{
CALL_VertexAttrib4fvARB(GET_DISPATCH(), (index, v));
}
/* GL_DOUBLE attributes */
-static void GLAPIENTRY VertexAttrib1dvARB(GLuint index, const GLdouble *v)
+static void
+VertexAttrib1dvARB(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib1dvARB(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib2dvARB(GLuint index, const GLdouble *v)
+static void
+VertexAttrib2dvARB(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib2dvARB(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib3dvARB(GLuint index, const GLdouble *v)
+static void
+VertexAttrib3dvARB(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib3dvARB(GET_DISPATCH(), (index, v));
}
-static void GLAPIENTRY VertexAttrib4dvARB(GLuint index, const GLdouble *v)
+static void
+VertexAttrib4dvARB(GLuint index, const GLdouble *v)
{
CALL_VertexAttrib4dvARB(GET_DISPATCH(), (index, v));
}
+/**
+ * Integer-valued attributes
+ */
+static void
+VertexAttribI1bv(GLuint index, const GLbyte *v)
+{
+ CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0]));
+}
+
+static void
+VertexAttribI2bv(GLuint index, const GLbyte *v)
+{
+ CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1]));
+}
+
+static void
+VertexAttribI3bv(GLuint index, const GLbyte *v)
+{
+ CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
+}
+
+static void
+VertexAttribI4bv(GLuint index, const GLbyte *v)
+{
+ CALL_VertexAttribI4bvEXT(GET_DISPATCH(), (index, v));
+}
+
+
+static void
+VertexAttribI1ubv(GLuint index, const GLubyte *v)
+{
+ CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0]));
+}
+
+static void
+VertexAttribI2ubv(GLuint index, const GLubyte *v)
+{
+ CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1]));
+}
+
+static void
+VertexAttribI3ubv(GLuint index, const GLubyte *v)
+{
+ CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
+}
+
+static void
+VertexAttribI4ubv(GLuint index, const GLubyte *v)
+{
+ CALL_VertexAttribI4ubvEXT(GET_DISPATCH(), (index, v));
+}
+
+
+
+static void
+VertexAttribI1sv(GLuint index, const GLshort *v)
+{
+ CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0]));
+}
+
+static void
+VertexAttribI2sv(GLuint index, const GLshort *v)
+{
+ CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1]));
+}
+
+static void
+VertexAttribI3sv(GLuint index, const GLshort *v)
+{
+ CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
+}
+
+static void
+VertexAttribI4sv(GLuint index, const GLshort *v)
+{
+ CALL_VertexAttribI4svEXT(GET_DISPATCH(), (index, v));
+}
+
+
+static void
+VertexAttribI1usv(GLuint index, const GLushort *v)
+{
+ CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0]));
+}
+
+static void
+VertexAttribI2usv(GLuint index, const GLushort *v)
+{
+ CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1]));
+}
+
+static void
+VertexAttribI3usv(GLuint index, const GLushort *v)
+{
+ CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
+}
+
+static void
+VertexAttribI4usv(GLuint index, const GLushort *v)
+{
+ CALL_VertexAttribI4usvEXT(GET_DISPATCH(), (index, v));
+}
+
+
+
+static void
+VertexAttribI1iv(GLuint index, const GLint *v)
+{
+ CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0]));
+}
+
+static void
+VertexAttribI2iv(GLuint index, const GLint *v)
+{
+ CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1]));
+}
+
+static void
+VertexAttribI3iv(GLuint index, const GLint *v)
+{
+ CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
+}
+
+static void
+VertexAttribI4iv(GLuint index, const GLint *v)
+{
+ CALL_VertexAttribI4ivEXT(GET_DISPATCH(), (index, v));
+}
+
+
+static void
+VertexAttribI1uiv(GLuint index, const GLuint *v)
+{
+ CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0]));
+}
+
+static void
+VertexAttribI2uiv(GLuint index, const GLuint *v)
+{
+ CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1]));
+}
+
+static void
+VertexAttribI3uiv(GLuint index, const GLuint *v)
+{
+ CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2]));
+}
+
+static void
+VertexAttribI4uiv(GLuint index, const GLuint *v)
+{
+ CALL_VertexAttribI4uivEXT(GET_DISPATCH(), (index, v));
+}
+
+
+
+
/*
- * Array [size][type] of VertexAttrib functions
+ * Array [unnormalized/normalized/integer][size][type] of VertexAttrib
+ * functions
*/
-static attrib_func AttribFuncsARB[2][4][8] = {
+static attrib_func AttribFuncsARB[3][4][NUM_TYPES] = {
{
/* non-normalized */
{
@@ -1025,6 +1346,54 @@ static attrib_func AttribFuncsARB[2][4][8] = {
(attrib_func) VertexAttrib4fvARB,
(attrib_func) VertexAttrib4dvARB
}
+ },
+
+ {
+ /* integer-valued */
+ {
+ /* size 1 */
+ (attrib_func) VertexAttribI1bv,
+ (attrib_func) VertexAttribI1ubv,
+ (attrib_func) VertexAttribI1sv,
+ (attrib_func) VertexAttribI1usv,
+ (attrib_func) VertexAttribI1iv,
+ (attrib_func) VertexAttribI1uiv,
+ NULL, /* GL_FLOAT */
+ NULL /* GL_DOUBLE */
+ },
+ {
+ /* size 2 */
+ (attrib_func) VertexAttribI2bv,
+ (attrib_func) VertexAttribI2ubv,
+ (attrib_func) VertexAttribI2sv,
+ (attrib_func) VertexAttribI2usv,
+ (attrib_func) VertexAttribI2iv,
+ (attrib_func) VertexAttribI2uiv,
+ NULL, /* GL_FLOAT */
+ NULL /* GL_DOUBLE */
+ },
+ {
+ /* size 3 */
+ (attrib_func) VertexAttribI3bv,
+ (attrib_func) VertexAttribI3ubv,
+ (attrib_func) VertexAttribI3sv,
+ (attrib_func) VertexAttribI3usv,
+ (attrib_func) VertexAttribI3iv,
+ (attrib_func) VertexAttribI3uiv,
+ NULL, /* GL_FLOAT */
+ NULL /* GL_DOUBLE */
+ },
+ {
+ /* size 4 */
+ (attrib_func) VertexAttribI4bv,
+ (attrib_func) VertexAttribI4ubv,
+ (attrib_func) VertexAttribI4sv,
+ (attrib_func) VertexAttribI4usv,
+ (attrib_func) VertexAttribI4iv,
+ (attrib_func) VertexAttribI4uiv,
+ NULL, /* GL_FLOAT */
+ NULL /* GL_DOUBLE */
+ }
}
};
@@ -1173,7 +1542,15 @@ static void _ae_update_state( struct gl_context *ctx )
[TYPE_IDX(at->array->Type)];
}
else {
- at->func = AttribFuncsARB[at->array->Normalized]
+ GLint intOrNorm;
+ if (at->array->Integer)
+ intOrNorm = 2;
+ else if (at->array->Normalized)
+ intOrNorm = 1;
+ else
+ intOrNorm = 0;
+
+ at->func = AttribFuncsARB[intOrNorm]
[at->array->Size-1]
[TYPE_IDX(at->array->Type)];
}
@@ -1271,14 +1648,13 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt )
_ae_update_state( ctx );
}
+ /* Determine if w need to map/unmap VBOs */
do_map = actx->nr_vbos && !actx->mapped_vbos;
- /*
- */
if (do_map)
_ae_map_vbos(ctx);
- /* generic attributes */
+ /* emit generic attribute elements */
for (at = actx->attribs; at->func; at++) {
const GLubyte *src
= ADD_POINTERS(at->array->BufferObj->Pointer, at->array->Ptr)
@@ -1286,7 +1662,7 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt )
at->func( at->index, src );
}
- /* conventional arrays */
+ /* emit conventional arrays elements */
for (aa = actx->arrays; aa->offset != -1 ; aa++) {
const GLubyte *src
= ADD_POINTERS(aa->array->BufferObj->Pointer, aa->array->Ptr)
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 2274e54ba0..1427abd107 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -105,46 +105,6 @@
#if FEATURE_GL
-#ifdef _GLAPI_USE_REMAP_TABLE
-
-#define need_MESA_remap_table
-#include "main/remap.h"
-#include "main/remap_helper.h"
-
-/* This is shared across all APIs but We define this here since
- * desktop GL has the biggest remap table. */
-int driDispatchRemapTable[driDispatchRemapTable_size];
-
-/**
- * Map the functions which are already static.
- *
- * When a extension function are incorporated into the ABI, the
- * extension suffix is usually stripped. Mapping such functions
- * makes sure the alternative names are available.
- *
- * Note that functions mapped by _mesa_init_remap_table() are
- * excluded.
- */
-void
-_mesa_map_static_functions(void)
-{
- /* Remap static functions which have alternative names and are in the ABI.
- * This is to be on the safe side. glapi should have defined those names.
- */
- _mesa_map_function_array(MESA_alt_functions);
-}
-
-void
-_mesa_init_remap_table(void)
-{
- _mesa_do_init_remap_table(_mesa_function_pool,
- driDispatchRemapTable_size,
- MESA_remap_table_functions);
-}
-
-#endif /* _GLAPI_USE_REMAP_TABLE */
-
-
/**
* Initialize a dispatch table with pointers to Mesa's immediate-mode
* commands.
@@ -160,7 +120,7 @@ _mesa_create_exec_table(void)
{
struct _glapi_table *exec;
- exec = _mesa_alloc_dispatch_table(sizeof *exec);
+ exec = _mesa_alloc_dispatch_table(_gloffset_COUNT);
if (exec == NULL)
return NULL;
@@ -726,6 +686,27 @@ _mesa_create_exec_table(void)
SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB);
#endif
+ /* GL_EXT_texture_integer */
+ SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT);
+ SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT);
+ SET_GetTexParameterIivEXT(exec, _mesa_GetTexParameterIiv);
+ SET_GetTexParameterIuivEXT(exec, _mesa_GetTexParameterIuiv);
+ SET_TexParameterIivEXT(exec, _mesa_TexParameterIiv);
+ SET_TexParameterIuivEXT(exec, _mesa_TexParameterIuiv);
+
+ /* GL_EXT_gpu_shader4 / OpenGL 3.0 */
+ SET_GetVertexAttribIivEXT(exec, _mesa_GetVertexAttribIiv);
+ SET_GetVertexAttribIuivEXT(exec, _mesa_GetVertexAttribIuiv);
+ SET_VertexAttribIPointerEXT(exec, _mesa_VertexAttribIPointer);
+
+ /* GL 3.0 (functions not covered by other extensions) */
+ SET_ClearBufferiv(exec, _mesa_ClearBufferiv);
+ SET_ClearBufferuiv(exec, _mesa_ClearBufferuiv);
+ SET_ClearBufferfv(exec, _mesa_ClearBufferfv);
+ SET_ClearBufferfi(exec, _mesa_ClearBufferfi);
+ SET_GetStringi(exec, _mesa_GetStringi);
+ SET_ClampColor(exec, _mesa_ClampColorARB);
+
return exec;
}
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c
index d1789069cc..c438307d84 100644
--- a/src/mesa/main/api_loopback.c
+++ b/src/mesa/main/api_loopback.c
@@ -34,9 +34,9 @@
#include "api_loopback.h"
#include "mtypes.h"
#include "glapi/glapi.h"
-#include "glapi/glapitable.h"
#include "glapi/glthread.h"
#include "main/dispatch.h"
+#include "mfeatures.h"
/* KW: A set of functions to convert unusual Color/Normal/Vertex/etc
* calls to a smaller set of driver-provided formats. Currently just
@@ -66,16 +66,24 @@
#define MATERIALFV(a,b,c) CALL_Materialfv(GET_DISPATCH(), (a,b,c))
#define RECTF(a,b,c,d) CALL_Rectf(GET_DISPATCH(), (a,b,c,d))
+#define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x))
+#define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c))
+
#define ATTRIB1NV(index,x) CALL_VertexAttrib1fNV(GET_DISPATCH(), (index,x))
#define ATTRIB2NV(index,x,y) CALL_VertexAttrib2fNV(GET_DISPATCH(), (index,x,y))
#define ATTRIB3NV(index,x,y,z) CALL_VertexAttrib3fNV(GET_DISPATCH(), (index,x,y,z))
#define ATTRIB4NV(index,x,y,z,w) CALL_VertexAttrib4fNV(GET_DISPATCH(), (index,x,y,z,w))
+
#define ATTRIB1ARB(index,x) CALL_VertexAttrib1fARB(GET_DISPATCH(), (index,x))
#define ATTRIB2ARB(index,x,y) CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,x,y))
#define ATTRIB3ARB(index,x,y,z) CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,x,y,z))
#define ATTRIB4ARB(index,x,y,z,w) CALL_VertexAttrib4fARB(GET_DISPATCH(), (index,x,y,z,w))
-#define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x))
-#define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c))
+
+#define ATTRIBI_1I(index,x) CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index,x))
+#define ATTRIBI_1UI(index,x) CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index,x))
+#define ATTRIBI_4I(index,x,y,z,w) CALL_VertexAttribI4iEXT(GET_DISPATCH(), (index,x,y,z,w))
+
+#define ATTRIBI_4UI(index,x,y,z,w) CALL_VertexAttribI4uiEXT(GET_DISPATCH(), (index,x,y,z,w))
#if FEATURE_beginend
@@ -1041,6 +1049,7 @@ loopback_SecondaryColor3ubvEXT_f( const GLubyte *v )
/*
* GL_NV_vertex_program:
* Always loop-back to one of the VertexAttrib[1234]f[v]NV functions.
+ * Note that attribute indexes DO alias conventional vertex attributes.
*/
static void GLAPIENTRY
@@ -1263,6 +1272,7 @@ loopback_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v)
/*
* GL_ARB_vertex_program
* Always loop-back to one of the VertexAttrib[1234]f[v]ARB functions.
+ * Note that attribute indexes do NOT alias conventional attributes.
*/
static void GLAPIENTRY
@@ -1443,136 +1453,50 @@ loopback_VertexAttrib4NuivARB(GLuint index, const GLuint * v)
-/** GL 3.0 Integer-valued attributes **/
-
-static void GLAPIENTRY
-loopback_VertexAttribI1i(GLuint index, GLint x)
-{
- ATTRIB1ARB(index, (GLfloat) x);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI2i(GLuint index, GLint x, GLint y)
-{
- ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
-{
- ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
-{
- ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI1ui(GLuint index, GLuint x)
-{
- ATTRIB1ARB(index, (GLfloat) x);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI2ui(GLuint index, GLuint x, GLuint y)
-{
- ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
-{
- ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
-{
- ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
-}
+/**
+ * GL_EXT_gpu_shader / GL 3.0 signed/unsigned integer-valued attributes.
+ * Note that attribute indexes do NOT alias conventional attributes.
+ */
static void GLAPIENTRY
loopback_VertexAttribI1iv(GLuint index, const GLint *v)
{
- ATTRIB1ARB(index, (GLfloat) v[0]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI2iv (GLuint index, const GLint *v)
-{
- ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI3iv(GLuint index, const GLint *v)
-{
- ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI4iv(GLuint index, const GLint *v)
-{
- ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ ATTRIBI_1I(index, v[0]);
}
static void GLAPIENTRY
loopback_VertexAttribI1uiv(GLuint index, const GLuint *v)
{
- ATTRIB1ARB(index, (GLfloat) v[0]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI2uiv(GLuint index, const GLuint *v)
-{
- ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI3uiv(GLuint index, const GLuint *v)
-{
- ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]);
-}
-
-static void GLAPIENTRY
-loopback_VertexAttribI4uiv(GLuint index, const GLuint *v)
-{
- ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ ATTRIBI_1UI(index, v[0]);
}
static void GLAPIENTRY
loopback_VertexAttribI4bv(GLuint index, const GLbyte *v)
{
- ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ ATTRIBI_4I(index, v[0], v[1], v[2], v[3]);
}
static void GLAPIENTRY
loopback_VertexAttribI4sv(GLuint index, const GLshort *v)
{
- ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ ATTRIBI_4I(index, v[0], v[1], v[2], v[3]);
}
static void GLAPIENTRY
loopback_VertexAttribI4ubv(GLuint index, const GLubyte *v)
{
- ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]);
}
static void GLAPIENTRY
loopback_VertexAttribI4usv(GLuint index, const GLushort *v)
{
- ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1],
- (GLfloat) v[2], (GLfloat) v[3]);
+ ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]);
}
+
/*
* This code never registers handlers for any of the entry points
* listed in vtxfmt.h.
@@ -1788,50 +1712,13 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest )
SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB);
SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB);
- /* GL 3.0 */
-#if 0
- SET_VertexAttribI1i(dest, loopback_VertexAttribI1i);
- SET_VertexAttribI2i(dest, loopback_VertexAttribI2i);
- SET_VertexAttribI3i(dest, loopback_VertexAttribI3i);
- SET_VertexAttribI4i(dest, loopback_VertexAttribI4i);
- SET_VertexAttribI1ui(dest, loopback_VertexAttribI1ui);
- SET_VertexAttribI2ui(dest, loopback_VertexAttribI2ui);
- SET_VertexAttribI3ui(dest, loopback_VertexAttribI3ui);
- SET_VertexAttribI4ui(dest, loopback_VertexAttribI4ui);
- SET_VertexAttribI1iv(dest, loopback_VertexAttribI1iv);
- SET_VertexAttribI2iv(dest, loopback_VertexAttribI2iv);
- SET_VertexAttribI3iv(dest, loopback_VertexAttribI3iv);
- SET_VertexAttribI4iv(dest, loopback_VertexAttribI4iv);
- SET_VertexAttribI1uiv(dest, loopback_VertexAttribI1uiv);
- SET_VertexAttribI2uiv(dest, loopback_VertexAttribI2uiv);
- SET_VertexAttribI3uiv(dest, loopback_VertexAttribI3uiv);
- SET_VertexAttribI4uiv(dest, loopback_VertexAttribI4uiv);
- SET_VertexAttribI4bv(dest, loopback_VertexAttribI4bv);
- SET_VertexAttribI4sv(dest, loopback_VertexAttribI4sv);
- SET_VertexAttribI4ubv(dest, loopback_VertexAttribI4ubv);
- SET_VertexAttribI4usv(dest, loopback_VertexAttribI4usv);
-#else
- (void) loopback_VertexAttribI1i;
- (void) loopback_VertexAttribI2i;
- (void) loopback_VertexAttribI3i;
- (void) loopback_VertexAttribI4i;
- (void) loopback_VertexAttribI1ui;
- (void) loopback_VertexAttribI2ui;
- (void) loopback_VertexAttribI3ui;
- (void) loopback_VertexAttribI4ui;
- (void) loopback_VertexAttribI1iv;
- (void) loopback_VertexAttribI2iv;
- (void) loopback_VertexAttribI3iv;
- (void) loopback_VertexAttribI4iv;
- (void) loopback_VertexAttribI1uiv;
- (void) loopback_VertexAttribI2uiv;
- (void) loopback_VertexAttribI3uiv;
- (void) loopback_VertexAttribI4uiv;
- (void) loopback_VertexAttribI4bv;
- (void) loopback_VertexAttribI4sv;
- (void) loopback_VertexAttribI4ubv;
- (void) loopback_VertexAttribI4usv;
-#endif
+ /* GL_EXT_gpu_shader4, GL 3.0 */
+ SET_VertexAttribI1ivEXT(dest, loopback_VertexAttribI1iv);
+ SET_VertexAttribI1uivEXT(dest, loopback_VertexAttribI1uiv);
+ SET_VertexAttribI4bvEXT(dest, loopback_VertexAttribI4bv);
+ SET_VertexAttribI4svEXT(dest, loopback_VertexAttribI4sv);
+ SET_VertexAttribI4ubvEXT(dest, loopback_VertexAttribI4ubv);
+ SET_VertexAttribI4usvEXT(dest, loopback_VertexAttribI4usv);
}
diff --git a/src/mesa/main/api_loopback.h b/src/mesa/main/api_loopback.h
index 3140eb515e..b9af703ca7 100644
--- a/src/mesa/main/api_loopback.h
+++ b/src/mesa/main/api_loopback.h
@@ -27,7 +27,10 @@
#ifndef API_LOOPBACK_H
#define API_LOOPBACK_H
-#include "main/mtypes.h"
+#include "main/compiler.h"
+#include "main/mfeatures.h"
+
+struct _glapi_table;
#if FEATURE_beginend
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 4929a9310d..ac9709db3f 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -27,6 +27,7 @@
#include "bufferobj.h"
#include "context.h"
#include "imports.h"
+#include "mfeatures.h"
#include "mtypes.h"
#include "vbo/vbo.h"
diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h
index b232a90843..16b9c2b264 100644
--- a/src/mesa/main/api_validate.h
+++ b/src/mesa/main/api_validate.h
@@ -28,7 +28,10 @@
#define API_VALIDATE_H
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_buffer_object;
+struct gl_context;
extern GLuint
diff --git a/src/mesa/main/arrayobj.h b/src/mesa/main/arrayobj.h
index 26e3af19c9..0b5a013037 100644
--- a/src/mesa/main/arrayobj.h
+++ b/src/mesa/main/arrayobj.h
@@ -28,7 +28,9 @@
#ifndef ARRAYOBJ_H
#define ARRAYOBJ_H
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_context;
/**
* \file arrayobj.h
diff --git a/src/mesa/main/atifragshader.h b/src/mesa/main/atifragshader.h
index 6911bba5ae..ade91311b0 100644
--- a/src/mesa/main/atifragshader.h
+++ b/src/mesa/main/atifragshader.h
@@ -8,7 +8,12 @@
#ifndef ATIFRAGSHADER_H
#define ATIFRAGSHADER_H
-#include "main/mtypes.h"
+#include "compiler.h"
+#include "glheader.h"
+#include "mfeatures.h"
+
+struct _glapi_table;
+struct gl_context;
#define MAX_NUM_INSTRUCTIONS_PER_PASS_ATI 8
#define MAX_NUM_PASSES_ATI 2
diff --git a/src/mesa/main/attrib.h b/src/mesa/main/attrib.h
index 777781bdf0..d59d31b9be 100644
--- a/src/mesa/main/attrib.h
+++ b/src/mesa/main/attrib.h
@@ -26,8 +26,12 @@
#define ATTRIB_H
-#include "main/mtypes.h"
+#include "compiler.h"
+#include "glheader.h"
+#include "mfeatures.h"
+struct _glapi_table;
+struct gl_context;
#if FEATURE_attrib_stack
@@ -48,8 +52,6 @@ _mesa_init_attrib_dispatch(struct _glapi_table *disp);
#else /* FEATURE_attrib_stack */
-#include "main/compiler.h"
-
static INLINE void
_mesa_PushClientAttrib( GLbitfield mask )
{
diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h
index 677b01cc9f..f72c779f1a 100644
--- a/src/mesa/main/blend.h
+++ b/src/mesa/main/blend.h
@@ -33,7 +33,9 @@
#define BLEND_H
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_context;
extern void GLAPIENTRY
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 0a68008a10..4d62f54a95 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -55,6 +55,13 @@
/**
+ * Used as a placeholder for buffer objects between glGenBuffers() and
+ * glBindBuffer() so that glIsBuffer() can work correctly.
+ */
+static struct gl_buffer_object DummyBufferObject;
+
+
+/**
* Return pointer to address of a buffer object target.
* \param ctx the GL context
* \param target the buffer object target to be retrieved.
@@ -548,6 +555,9 @@ _mesa_copy_buffer_subdata(struct gl_context *ctx,
void
_mesa_init_buffer_objects( struct gl_context *ctx )
{
+ memset(&DummyBufferObject, 0, sizeof(DummyBufferObject));
+ DummyBufferObject.RefCount = 1000*1000*1000; /* never delete */
+
_mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj,
ctx->Shared->NullBufferObj);
_mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj,
@@ -605,8 +615,10 @@ bind_buffer_object(struct gl_context *ctx, GLenum target, GLuint buffer)
else {
/* non-default buffer object */
newBufObj = _mesa_lookup_bufferobj(ctx, buffer);
- if (!newBufObj) {
- /* if this is a new buffer object id, allocate a buffer object now */
+ if (!newBufObj || newBufObj == &DummyBufferObject) {
+ /* If this is a new buffer object id, or one which was generated but
+ * never used before, allocate a buffer object now.
+ */
ASSERT(ctx->Driver.NewBufferObject);
newBufObj = ctx->Driver.NewBufferObject(ctx, buffer, target);
if (!newBufObj) {
@@ -986,7 +998,7 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
struct gl_array_object *arrayObj = ctx->Array.ArrayObj;
GLuint j;
- ASSERT(bufObj->Name == ids[i]);
+ ASSERT(bufObj->Name == ids[i] || bufObj == &DummyBufferObject);
if (_mesa_bufferobj_mapped(bufObj)) {
/* if mapped, unmap it now */
@@ -1027,7 +1039,7 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids)
}
/* The ID is immediately freed for re-use */
- _mesa_HashRemove(ctx->Shared->BufferObjects, bufObj->Name);
+ _mesa_HashRemove(ctx->Shared->BufferObjects, ids[i]);
_mesa_reference_buffer_object(ctx, &bufObj, NULL);
}
}
@@ -1066,18 +1078,10 @@ _mesa_GenBuffersARB(GLsizei n, GLuint *buffer)
first = _mesa_HashFindFreeKeyBlock(ctx->Shared->BufferObjects, n);
- /* Allocate new, empty buffer objects and return identifiers */
+ /* Insert the ID and pointer to dummy buffer object into hash table */
for (i = 0; i < n; i++) {
- struct gl_buffer_object *bufObj;
- GLuint name = first + i;
- GLenum target = 0;
- bufObj = ctx->Driver.NewBufferObject( ctx, name, target );
- if (!bufObj) {
- _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenBuffersARB");
- return;
- }
- _mesa_HashInsert(ctx->Shared->BufferObjects, first + i, bufObj);
+ _mesa_HashInsert(ctx->Shared->BufferObjects, first + i,
+ &DummyBufferObject);
buffer[i] = first + i;
}
@@ -1103,7 +1107,7 @@ _mesa_IsBufferARB(GLuint id)
bufObj = _mesa_lookup_bufferobj(ctx, id);
_glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
- return bufObj ? GL_TRUE : GL_FALSE;
+ return bufObj && bufObj != &DummyBufferObject;
}
@@ -1189,6 +1193,9 @@ _mesa_BufferSubDataARB(GLenum target, GLintptrARB offset,
return;
}
+ if (size == 0)
+ return;
+
bufObj->Written = GL_TRUE;
ASSERT(ctx->Driver.BufferSubData);
diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h
index 36d6c8b660..1404112c41 100644
--- a/src/mesa/main/buffers.h
+++ b/src/mesa/main/buffers.h
@@ -33,8 +33,9 @@
#define BUFFERS_H
-#include "mtypes.h"
+#include "glheader.h"
+struct gl_context;
extern void GLAPIENTRY
_mesa_DrawBuffer( GLenum mode );
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index b011da04b4..c4c1d96e49 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -96,6 +96,68 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
/**
+ * GL_EXT_texture_integer
+ */
+void GLAPIENTRY
+_mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a)
+{
+ GLfloat tmp[4];
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ tmp[0] = (GLfloat) r;
+ tmp[1] = (GLfloat) g;
+ tmp[2] = (GLfloat) b;
+ tmp[3] = (GLfloat) a;
+
+ if (TEST_EQ_4V(tmp, ctx->Color.ClearColor))
+ return; /* no change */
+
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+
+ /* XXX we should eventually have a float/int/uint union for
+ * the ctx->Color.ClearColor state.
+ */
+ COPY_4V(ctx->Color.ClearColor, tmp);
+
+ if (ctx->Driver.ClearColor) {
+ ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
+ }
+}
+
+
+/**
+ * GL_EXT_texture_integer
+ */
+void GLAPIENTRY
+_mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a)
+{
+ GLfloat tmp[4];
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ tmp[0] = (GLfloat) r;
+ tmp[1] = (GLfloat) g;
+ tmp[2] = (GLfloat) b;
+ tmp[3] = (GLfloat) a;
+
+ if (TEST_EQ_4V(tmp, ctx->Color.ClearColor))
+ return; /* no change */
+
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+
+ /* XXX we should eventually have a float/int/uint union for
+ * the ctx->Color.ClearColor state.
+ */
+ COPY_4V(ctx->Color.ClearColor, tmp);
+
+ if (ctx->Driver.ClearColor) {
+ ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
+ }
+}
+
+
+/**
* Clear buffers.
*
* \param mask bit-mask indicating the buffers to be cleared.
@@ -342,7 +404,7 @@ _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
{
const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer);
if (mask == INVALID_MASK) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)",
+ _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferuiv(drawbuffer=%d)",
drawbuffer);
return;
}
diff --git a/src/mesa/main/clear.h b/src/mesa/main/clear.h
index 6657370c4b..7832719203 100644
--- a/src/mesa/main/clear.h
+++ b/src/mesa/main/clear.h
@@ -38,6 +38,13 @@ _mesa_ClearColor( GLclampf red, GLclampf green,
GLclampf blue, GLclampf alpha );
extern void GLAPIENTRY
+_mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a);
+
+extern void GLAPIENTRY
+_mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a);
+
+
+extern void GLAPIENTRY
_mesa_Clear( GLbitfield mask );
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 6295dc88de..caa95835bc 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -29,6 +29,7 @@
#include "context.h"
#include "image.h"
#include "macros.h"
+#include "pack.h"
#include "state.h"
#include "teximage.h"
#include "texstate.h"
diff --git a/src/mesa/main/colortab.h b/src/mesa/main/colortab.h
index ea3ec870fd..ae46d8d236 100644
--- a/src/mesa/main/colortab.h
+++ b/src/mesa/main/colortab.h
@@ -27,7 +27,12 @@
#define COLORTAB_H
-#include "main/mtypes.h"
+#include "compiler.h"
+#include "glheader.h"
+#include "mfeatures.h"
+
+struct _glapi_table;
+struct gl_color_table;
#if FEATURE_colortable
@@ -46,8 +51,6 @@ _mesa_init_colortable_dispatch(struct _glapi_table *disp);
#else /* FEATURE_colortable */
-#include "main/compiler.h"
-
static INLINE void GLAPIENTRY
_mesa_ColorTable( GLenum target, GLenum internalformat,
GLsizei width, GLenum format, GLenum type,
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 9401e3dcc2..b132030b9b 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -131,6 +131,7 @@
#if _HAVE_FULL_GL
#include "math/m_matrix.h"
#endif
+#include "main/dispatch.h" /* for _gloffset_COUNT */
#ifdef USE_SPARC_ASM
#include "sparc/sparc.h"
@@ -218,7 +219,7 @@ _mesa_create_visual( GLboolean dbFlag,
GLint accumAlphaBits,
GLint numSamples )
{
- struct gl_config *vis = (struct gl_config *) calloc(1, sizeof(struct gl_config));
+ struct gl_config *vis = CALLOC_STRUCT(gl_config);
if (vis) {
if (!_mesa_initialize_visual(vis, dbFlag, stereoFlag,
redBits, greenBits, blueBits, alphaBits,
@@ -233,11 +234,13 @@ _mesa_create_visual( GLboolean dbFlag,
return vis;
}
+
/**
- * Makes some sanity checks and fills in the fields of the
- * struct gl_config object with the given parameters. If the caller needs
- * to set additional fields, he should just probably init the whole struct gl_config
- * object himself.
+ * Makes some sanity checks and fills in the fields of the struct
+ * gl_config object with the given parameters. If the caller needs to
+ * set additional fields, he should just probably init the whole
+ * gl_config object himself.
+ *
* \return GL_TRUE on success, or GL_FALSE on failure.
*
* \sa _mesa_create_visual() above for the parameter description.
@@ -367,6 +370,8 @@ dummy_enum_func(void)
*/
_glthread_DECLARE_STATIC_MUTEX(OneTimeLock);
+
+
/**
* Calls all the various one-time-init functions in Mesa.
*
@@ -379,10 +384,12 @@ _glthread_DECLARE_STATIC_MUTEX(OneTimeLock);
static void
one_time_init( struct gl_context *ctx )
{
- static GLboolean alreadyCalled = GL_FALSE;
- (void) ctx;
+ static GLbitfield api_init_mask = 0x0;
+
_glthread_LOCK_MUTEX(OneTimeLock);
- if (!alreadyCalled) {
+
+ /* truly one-time init */
+ if (!api_init_mask) {
GLuint i;
/* do some implementation tests */
@@ -395,27 +402,9 @@ one_time_init( struct gl_context *ctx )
_mesa_get_cpu_features();
- switch (ctx->API) {
-#if FEATURE_GL
- case API_OPENGL:
- _mesa_init_remap_table();
- break;
-#endif
-#if FEATURE_ES1
- case API_OPENGLES:
- _mesa_init_remap_table_es1();
- break;
-#endif
-#if FEATURE_ES2
- case API_OPENGLES2:
- _mesa_init_remap_table_es2();
- break;
-#endif
- default:
- break;
- }
-
_mesa_init_sqrt_table();
+
+ /* context dependence is never a one-time thing... */
_mesa_init_get_hash(ctx);
for (i = 0; i < 256; i++) {
@@ -423,12 +412,27 @@ one_time_init( struct gl_context *ctx )
}
#if defined(DEBUG) && defined(__DATE__) && defined(__TIME__)
- _mesa_debug(ctx, "Mesa %s DEBUG build %s %s\n",
- MESA_VERSION_STRING, __DATE__, __TIME__);
+ if (MESA_VERBOSE != 0) {
+ _mesa_debug(ctx, "Mesa %s DEBUG build %s %s\n",
+ MESA_VERSION_STRING, __DATE__, __TIME__);
+ }
#endif
+ }
- alreadyCalled = GL_TRUE;
+ /* per-API one-time init */
+ if (!(api_init_mask & (1 << ctx->API))) {
+ /*
+ * This is fine as ES does not use the remap table, but it may not be
+ * future-proof. We cannot always initialize the remap table because
+ * when an app is linked to libGLES*, there are not enough dynamic
+ * entries.
+ */
+ if (ctx->API == API_OPENGL)
+ _mesa_init_remap_table();
}
+
+ api_init_mask |= 1 << ctx->API;
+
_glthread_UNLOCK_MUTEX(OneTimeLock);
/* Hopefully atexit() is widely available. If not, we may need some
@@ -620,6 +624,10 @@ _mesa_init_constants(struct gl_context *ctx)
/* GL 3.2: hard-coded for now: */
ctx->Const.ProfileMask = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT;
+
+ /** GL_EXT_gpu_shader4 */
+ ctx->Const.MinProgramTexelOffset = -8;
+ ctx->Const.MaxProgramTexelOffset = 7;
}
@@ -807,10 +815,13 @@ _mesa_alloc_dispatch_table(int size)
* Mesa we do this to accomodate different versions of libGL and various
* DRI drivers.
*/
- GLint numEntries = MAX2(_glapi_get_dispatch_table_size(),
- size / sizeof(_glapi_proc));
- struct _glapi_table *table =
- (struct _glapi_table *) malloc(numEntries * sizeof(_glapi_proc));
+ GLint numEntries = MAX2(_glapi_get_dispatch_table_size(), _gloffset_COUNT);
+ struct _glapi_table *table;
+
+ /* should never happen, but just in case */
+ numEntries = MAX2(numEntries, size);
+
+ table = (struct _glapi_table *) malloc(numEntries * sizeof(_glapi_proc));
if (table) {
_glapi_proc *entry = (_glapi_proc *) table;
GLint i;
@@ -983,6 +994,10 @@ _mesa_initialize_context_for_api(struct gl_context *ctx,
return GL_TRUE;
}
+
+/**
+ * Initialize an OpenGL context.
+ */
GLboolean
_mesa_initialize_context(struct gl_context *ctx,
const struct gl_config *visual,
@@ -998,6 +1013,7 @@ _mesa_initialize_context(struct gl_context *ctx,
driverContext);
}
+
/**
* Allocate and initialize a struct gl_context structure.
* Note that the driver needs to pass in its dd_function_table here since
@@ -1039,6 +1055,10 @@ _mesa_create_context_for_api(gl_api api,
}
}
+
+/**
+ * Create an OpenGL context.
+ */
struct gl_context *
_mesa_create_context(const struct gl_config *visual,
struct gl_context *share_list,
@@ -1051,6 +1071,7 @@ _mesa_create_context(const struct gl_config *visual,
driverContext);
}
+
/**
* Free the data associated with the given context.
*
@@ -1137,7 +1158,7 @@ _mesa_free_context_data( struct gl_context *ctx )
*
* \param ctx GL context.
*
- * Calls _mesa_free_context_data() and frees the struct gl_context structure itself.
+ * Calls _mesa_free_context_data() and frees the gl_context object itself.
*/
void
_mesa_destroy_context( struct gl_context *ctx )
@@ -1282,14 +1303,12 @@ _mesa_copy_context( const struct gl_context *src, struct gl_context *dst, GLuint
* \return GL_TRUE if compatible, GL_FALSE otherwise.
*/
static GLboolean
-check_compatible(const struct gl_context *ctx, const struct gl_framebuffer *buffer)
+check_compatible(const struct gl_context *ctx,
+ const struct gl_framebuffer *buffer)
{
const struct gl_config *ctxvis = &ctx->Visual;
const struct gl_config *bufvis = &buffer->Visual;
- if (ctxvis == bufvis)
- return GL_TRUE;
-
if (buffer == _mesa_get_incomplete_framebuffer())
return GL_TRUE;
@@ -1376,7 +1395,8 @@ _mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height)
* \param readBuffer the reading framebuffer
*/
GLboolean
-_mesa_make_current( struct gl_context *newCtx, struct gl_framebuffer *drawBuffer,
+_mesa_make_current( struct gl_context *newCtx,
+ struct gl_framebuffer *drawBuffer,
struct gl_framebuffer *readBuffer )
{
if (MESA_VERBOSE & VERBOSE_API)
@@ -1437,7 +1457,8 @@ _mesa_make_current( struct gl_context *newCtx, struct gl_framebuffer *drawBuffer
buffers[i] = newCtx->Color.DrawBuffer[i];
}
- _mesa_drawbuffers(newCtx, newCtx->Const.MaxDrawBuffers, buffers, NULL);
+ _mesa_drawbuffers(newCtx, newCtx->Const.MaxDrawBuffers,
+ buffers, NULL);
}
if (!newCtx->ReadBuffer || newCtx->ReadBuffer->Name == 0) {
_mesa_reference_framebuffer(&newCtx->ReadBuffer, readBuffer);
@@ -1697,11 +1718,10 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
if (ctx->NewState)
_mesa_update_state(ctx);
- if (ctx->Shader.CurrentProgram) {
- struct gl_shader_program *const prog = ctx->Shader.CurrentProgram;
+ if (ctx->Shader.CurrentVertexProgram) {
+ vert_from_glsl_shader = true;
- /* using shaders */
- if (!prog->LinkStatus) {
+ if (!ctx->Shader.CurrentVertexProgram->LinkStatus) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(shader not linked)", where);
return GL_FALSE;
@@ -1709,25 +1729,57 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
#if 0 /* not normally enabled */
{
char errMsg[100];
- if (!_mesa_validate_shader_program(ctx, prog, errMsg)) {
+ if (!_mesa_validate_shader_program(ctx,
+ ctx->Shader.CurrentVertexProgram,
+ errMsg)) {
_mesa_warning(ctx, "Shader program %u is invalid: %s",
- prog->Name, errMsg);
+ ctx->Shader.CurrentVertexProgram->Name, errMsg);
}
}
#endif
+ }
- /* Figure out which shader stages are provided by the GLSL program. For
- * any stages that are not provided, the corresponding assembly shader
- * target will be validated below.
- */
- vert_from_glsl_shader =
- prog->_LinkedShaders[MESA_SHADER_VERTEX] != NULL;
- geom_from_glsl_shader =
- prog->_LinkedShaders[MESA_SHADER_GEOMETRY] != NULL;
- frag_from_glsl_shader =
- prog->_LinkedShaders[MESA_SHADER_FRAGMENT] != NULL;
+ if (ctx->Shader.CurrentGeometryProgram) {
+ geom_from_glsl_shader = true;
+
+ if (!ctx->Shader.CurrentGeometryProgram->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(shader not linked)", where);
+ return GL_FALSE;
+ }
+#if 0 /* not normally enabled */
+ {
+ char errMsg[100];
+ if (!_mesa_validate_shader_program(ctx,
+ ctx->Shader.CurrentGeometryProgram,
+ errMsg)) {
+ _mesa_warning(ctx, "Shader program %u is invalid: %s",
+ ctx->Shader.CurrentGeometryProgram->Name, errMsg);
+ }
+ }
+#endif
}
+ if (ctx->Shader.CurrentFragmentProgram) {
+ frag_from_glsl_shader = true;
+
+ if (!ctx->Shader.CurrentFragmentProgram->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(shader not linked)", where);
+ return GL_FALSE;
+ }
+#if 0 /* not normally enabled */
+ {
+ char errMsg[100];
+ if (!_mesa_validate_shader_program(ctx,
+ ctx->Shader.CurrentFragmentProgram,
+ errMsg)) {
+ _mesa_warning(ctx, "Shader program %u is invalid: %s",
+ ctx->Shader.CurrentFragmentProgram->Name, errMsg);
+ }
+ }
+#endif
+ }
/* Any shader stages that are not supplied by the GLSL shader and have
* assembly shaders enabled must now be validated.
@@ -1744,11 +1796,21 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
*/
(void) geom_from_glsl_shader;
- if (!frag_from_glsl_shader
- && ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(fragment program not valid)", where);
- return GL_FALSE;
+ if (!frag_from_glsl_shader) {
+ if (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(fragment program not valid)", where);
+ return GL_FALSE;
+ }
+
+ /* If drawing to integer-valued color buffers, there must be an
+ * active fragment shader (GL_EXT_texture_integer).
+ */
+ if (ctx->DrawBuffer && ctx->DrawBuffer->_IntegerColor) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "%s(integer format but no fragment shader)", where);
+ return GL_FALSE;
+ }
}
if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
@@ -1759,26 +1821,51 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
#ifdef DEBUG
if (ctx->Shader.Flags & GLSL_LOG) {
- struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
- if (shProg) {
- if (!shProg->_Used) {
- /* This is the first time this shader is being used.
- * Append shader's constants/uniforms to log file.
- */
- GLuint i;
- for (i = 0; i < shProg->NumShaders; i++) {
- struct gl_shader *sh = shProg->Shaders[i];
- if (sh->Type == GL_VERTEX_SHADER) {
- _mesa_append_uniforms_to_file(sh,
- &shProg->VertexProgram->Base);
- }
- else if (sh->Type == GL_FRAGMENT_SHADER) {
- _mesa_append_uniforms_to_file(sh,
- &shProg->FragmentProgram->Base);
- }
- }
- shProg->_Used = GL_TRUE;
- }
+ struct gl_shader_program *shProg[MESA_SHADER_TYPES];
+ unsigned i;
+
+ shProg[MESA_SHADER_VERTEX] = ctx->Shader.CurrentVertexProgram;
+ shProg[MESA_SHADER_GEOMETRY] = ctx->Shader.CurrentGeometryProgram;
+ shProg[MESA_SHADER_FRAGMENT] = ctx->Shader.CurrentFragmentProgram;
+
+ for (i = 0; i < MESA_SHADER_TYPES; i++) {
+ struct gl_shader *sh;
+
+ if (shProg[i] == NULL || shProg[i]->_Used
+ || shProg[i]->_LinkedShaders[i] == NULL)
+ continue;
+
+ /* This is the first time this shader is being used.
+ * Append shader's constants/uniforms to log file.
+ *
+ * The logic is a little odd here. We only want to log data for each
+ * shader target that will actually be used, and we only want to log
+ * it once. It's possible to have a program bound to the vertex
+ * shader target that also supplied a fragment shader. If that
+ * program isn't also bound to the fragment shader target we don't
+ * want to log its fragment data.
+ */
+ sh = shProg[i]->_LinkedShaders[i];
+ switch (sh->Type) {
+ case GL_VERTEX_SHADER:
+ _mesa_append_uniforms_to_file(sh, &shProg[i]->VertexProgram->Base);
+ break;
+
+ case GL_GEOMETRY_SHADER_ARB:
+ _mesa_append_uniforms_to_file(sh,
+ &shProg[i]->GeometryProgram->Base);
+ break;
+
+ case GL_FRAGMENT_SHADER:
+ _mesa_append_uniforms_to_file(sh,
+ &shProg[i]->FragmentProgram->Base);
+ break;
+ }
+ }
+
+ for (i = 0; i < MESA_SHADER_TYPES; i++) {
+ if (shProg[i] != NULL)
+ shProg[i]->_Used = GL_TRUE;
}
}
#endif
diff --git a/src/mesa/main/convolve.h b/src/mesa/main/convolve.h
index 0277917433..7dc0a48b74 100644
--- a/src/mesa/main/convolve.h
+++ b/src/mesa/main/convolve.h
@@ -28,7 +28,10 @@
#define CONVOLVE_H
-#include "main/mtypes.h"
+#include "compiler.h"
+#include "mfeatures.h"
+
+struct _glapi_table;
#if FEATURE_convolve
@@ -38,8 +41,6 @@ _mesa_init_convolve_dispatch(struct _glapi_table *disp);
#else /* FEATURE_convolve */
-#include "main/compiler.h"
-
static INLINE void
_mesa_init_convolve_dispatch(struct _glapi_table *disp)
{
diff --git a/src/mesa/main/core.h b/src/mesa/main/core.h
index ea6e6bf118..542d95b848 100644
--- a/src/mesa/main/core.h
+++ b/src/mesa/main/core.h
@@ -46,8 +46,6 @@
#include "main/imports.h"
#include "main/macros.h"
-#include "main/version.h" /* for MESA_VERSION_STRING */
-#include "main/context.h" /* for _mesa_share_state */
#include "main/mtypes.h"
#ifdef __cplusplus
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 5e006e0ad3..c62969e9b7 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -33,8 +33,20 @@
/* THIS FILE ONLY INCLUDED BY mtypes.h !!!!! */
-struct gl_pixelstore_attrib;
+#include "glheader.h"
+
+struct gl_buffer_object;
+struct gl_context;
struct gl_display_list;
+struct gl_framebuffer;
+struct gl_pixelstore_attrib;
+struct gl_program;
+struct gl_renderbuffer;
+struct gl_renderbuffer_attachment;
+struct gl_shader;
+struct gl_shader_program;
+struct gl_texture_image;
+struct gl_texture_object;
/* GL_ARB_vertex_buffer_object */
/* Modifies GL_MAP_UNSYNCHRONIZED_BIT to allow driver to fail (return
@@ -1105,6 +1117,24 @@ typedef struct {
void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v );
void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w );
void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v );
+
+ /* GL_EXT_gpu_shader4 / GL 3.0 */
+ void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x);
+ void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y);
+ void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z);
+ void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w);
+ void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v);
+ void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v);
+ void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v);
+
+ void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x);
+ void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y);
+ void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z);
+ void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+ void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v);
+ void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v);
+ void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v);
+
/*@}*/
void (GLAPIENTRYP Rectf)( GLfloat, GLfloat, GLfloat, GLfloat );
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index a7e65f8d3a..79aa53585f 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -120,7 +120,7 @@ void
_mesa_print_tri_caps( const char *name, GLuint flags )
{
_mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+ "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s\n",
name,
flags,
(flags & DD_FLATSHADE) ? "flat-shade, " : "",
@@ -133,9 +133,7 @@ _mesa_print_tri_caps( const char *name, GLuint flags )
(flags & DD_TRI_SMOOTH) ? "tri-smooth, " : "",
(flags & DD_LINE_SMOOTH) ? "line-smooth, " : "",
(flags & DD_LINE_STIPPLE) ? "line-stipple, " : "",
- (flags & DD_LINE_WIDTH) ? "line-wide, " : "",
(flags & DD_POINT_SMOOTH) ? "point-smooth, " : "",
- (flags & DD_POINT_SIZE) ? "point-size, " : "",
(flags & DD_POINT_ATTEN) ? "point-atten, " : "",
(flags & DD_TRI_CULL_FRONT_BACK) ? "cull-all, " : ""
);
diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h
index e3bb4dfe81..17aa897e8d 100644
--- a/src/mesa/main/debug.h
+++ b/src/mesa/main/debug.h
@@ -37,7 +37,10 @@
#define _DEBUG_H
#include "glheader.h"
-#include "mtypes.h"
+#include "mfeatures.h"
+
+struct gl_context;
+struct gl_texture_image;
#if _HAVE_FULL_GL
diff --git a/src/mesa/main/depth.h b/src/mesa/main/depth.h
index d61d3b121b..b498a47153 100644
--- a/src/mesa/main/depth.h
+++ b/src/mesa/main/depth.h
@@ -32,7 +32,10 @@
#define DEPTH_H
-#include "mtypes.h"
+#include "glheader.h"
+#include "mfeatures.h"
+
+struct gl_context;
#if _HAVE_FULL_GL
diff --git a/src/mesa/main/depthstencil.h b/src/mesa/main/depthstencil.h
index 4db5868263..ef63c5d7a3 100644
--- a/src/mesa/main/depthstencil.h
+++ b/src/mesa/main/depthstencil.h
@@ -26,7 +26,7 @@
#ifndef DEPTHSTENCIL_H
#define DEPTHSTENCIL_H
-#include "mtypes.h"
+struct gl_context;
extern struct gl_renderbuffer *
_mesa_new_z24_renderbuffer_wrapper(struct gl_context *ctx,
diff --git a/src/mesa/main/dispatch.h b/src/mesa/main/dispatch.h
index 27f80a5062..a597959cf8 100644
--- a/src/mesa/main/dispatch.h
+++ b/src/mesa/main/dispatch.h
@@ -26,12 +26,12 @@
#ifndef _DISPATCH_H
#define _DISPATCH_H
-#ifdef IN_DRI_DRIVER
+#include "main/mfeatures.h"
+
+#if FEATURE_remap_table
#define _GLAPI_USE_REMAP_TABLE
#endif
-#include "glapi/glapitable.h"
-#include "glapi/glapioffsets.h"
-#include "glapi/glapidispatch.h"
+#include "main/glapidispatch.h"
#endif /* _DISPATCH_H */
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index f513f31c56..6c0c556ad8 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -53,6 +53,7 @@
#include "image.h"
#include "light.h"
#include "macros.h"
+#include "pack.h"
#include "queryobj.h"
#include "teximage.h"
#include "mtypes.h"
@@ -410,6 +411,16 @@ typedef enum
OPCODE_BEGIN_TRANSFORM_FEEDBACK,
OPCODE_END_TRANSFORM_FEEDBACK,
+ /* GL_EXT_texture_integer */
+ OPCODE_CLEARCOLOR_I,
+ OPCODE_CLEARCOLOR_UI,
+ OPCODE_TEXPARAMETER_I,
+ OPCODE_TEXPARAMETER_UI,
+
+ /* GL_EXT_separate_shader_objects */
+ OPCODE_ACTIVE_PROGRAM_EXT,
+ OPCODE_USE_SHADER_PROGRAM_EXT,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
@@ -4773,9 +4784,9 @@ save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
static void GLAPIENTRY
save_ProgramParameters4dvNV(GLenum target, GLuint index,
- GLuint num, const GLdouble *params)
+ GLsizei num, const GLdouble *params)
{
- GLuint i;
+ GLint i;
for (i = 0; i < num; i++) {
save_ProgramEnvParameter4dvARB(target, index + i, params + 4 * i);
}
@@ -4784,9 +4795,9 @@ save_ProgramParameters4dvNV(GLenum target, GLuint index,
static void GLAPIENTRY
save_ProgramParameters4fvNV(GLenum target, GLuint index,
- GLuint num, const GLfloat *params)
+ GLsizei num, const GLfloat *params)
{
- GLuint i;
+ GLint i;
for (i = 0; i < num; i++) {
save_ProgramEnvParameter4fvARB(target, index + i, params + 4 * i);
}
@@ -6786,6 +6797,137 @@ save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
}
}
+static void GLAPIENTRY
+save_UseShaderProgramEXT(GLenum type, GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_USE_SHADER_PROGRAM_EXT, 2);
+ if (n) {
+ n[1].ui = type;
+ n[2].ui = program;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_UseShaderProgramEXT(ctx->Exec, (type, program));
+ }
+}
+
+static void GLAPIENTRY
+save_ActiveProgramEXT(GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_ACTIVE_PROGRAM_EXT, 1);
+ if (n) {
+ n[1].ui = program;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ActiveProgramEXT(ctx->Exec, (program));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+save_ClearColorIi(GLint red, GLint green, GLint blue, GLint alpha)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CLEARCOLOR_I, 4);
+ if (n) {
+ n[1].i = red;
+ n[2].i = green;
+ n[3].i = blue;
+ n[4].i = alpha;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ClearColorIiEXT(ctx->Exec, (red, green, blue, alpha));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+save_ClearColorIui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CLEARCOLOR_UI, 4);
+ if (n) {
+ n[1].ui = red;
+ n[2].ui = green;
+ n[3].ui = blue;
+ n[4].ui = alpha;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_ClearColorIuiEXT(ctx->Exec, (red, green, blue, alpha));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+save_TexParameterIiv(GLenum target, GLenum pname, const GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_TEXPARAMETER_I, 6);
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].i = params[0];
+ n[4].i = params[1];
+ n[5].i = params[2];
+ n[6].i = params[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TexParameterIivEXT(ctx->Exec, (target, pname, params));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+save_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_TEXPARAMETER_UI, 6);
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].ui = params[0];
+ n[4].ui = params[1];
+ n[5].ui = params[2];
+ n[6].ui = params[3];
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_TexParameterIuivEXT(ctx->Exec, (target, pname, params));
+ }
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+exec_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ CALL_GetTexParameterIivEXT(ctx->Exec, (target, pname, params));
+}
+
+/** GL_EXT_texture_integer */
+static void GLAPIENTRY
+exec_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VERTICES(ctx, 0);
+ CALL_GetTexParameterIuivEXT(ctx->Exec, (target, pname, params));
+}
+
+
+
/**
@@ -7673,6 +7815,12 @@ execute_list(struct gl_context *ctx, GLuint list)
case OPCODE_USE_PROGRAM:
CALL_UseProgramObjectARB(ctx->Exec, (n[1].ui));
break;
+ case OPCODE_USE_SHADER_PROGRAM_EXT:
+ CALL_UseShaderProgramEXT(ctx->Exec, (n[1].ui, n[2].ui));
+ break;
+ case OPCODE_ACTIVE_PROGRAM_EXT:
+ CALL_ActiveProgramEXT(ctx->Exec, (n[1].ui));
+ break;
case OPCODE_UNIFORM_1F:
CALL_Uniform1fARB(ctx->Exec, (n[1].i, n[2].f));
break;
@@ -7903,6 +8051,35 @@ execute_list(struct gl_context *ctx, GLuint list)
CALL_EvalPoint2(ctx->Exec, (n[1].i, n[2].i));
break;
+ /* GL_EXT_texture_integer */
+ case OPCODE_CLEARCOLOR_I:
+ CALL_ClearColorIiEXT(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i));
+ break;
+ case OPCODE_CLEARCOLOR_UI:
+ CALL_ClearColorIuiEXT(ctx->Exec,
+ (n[1].ui, n[2].ui, n[3].ui, n[4].ui));
+ break;
+ case OPCODE_TEXPARAMETER_I:
+ {
+ GLint params[4];
+ params[0] = n[3].i;
+ params[1] = n[4].i;
+ params[2] = n[5].i;
+ params[3] = n[6].i;
+ CALL_TexParameterIivEXT(ctx->Exec, (n[1].e, n[2].e, params));
+ }
+ break;
+ case OPCODE_TEXPARAMETER_UI:
+ {
+ GLuint params[4];
+ params[0] = n[3].ui;
+ params[1] = n[4].ui;
+ params[2] = n[5].ui;
+ params[3] = n[6].ui;
+ CALL_TexParameterIuivEXT(ctx->Exec, (n[1].e, n[2].e, params));
+ }
+ break;
+
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
break;
@@ -8939,7 +9116,7 @@ _mesa_create_save_table(void)
{
struct _glapi_table *table;
- table = _mesa_alloc_dispatch_table(sizeof *table);
+ table = _mesa_alloc_dispatch_table(_gloffset_COUNT);
if (table == NULL)
return NULL;
@@ -9531,6 +9708,18 @@ _mesa_create_save_table(void)
SET_ObjectUnpurgeableAPPLE(table, _mesa_ObjectUnpurgeableAPPLE);
#endif
+ /* GL_EXT_texture_integer */
+ SET_ClearColorIiEXT(table, save_ClearColorIi);
+ SET_ClearColorIuiEXT(table, save_ClearColorIui);
+ SET_TexParameterIivEXT(table, save_TexParameterIiv);
+ SET_TexParameterIuivEXT(table, save_TexParameterIuiv);
+ SET_GetTexParameterIivEXT(table, exec_GetTexParameterIiv);
+ SET_GetTexParameterIuivEXT(table, exec_GetTexParameterIuiv);
+
+ /* 377. GL_EXT_separate_shader_objects */
+ SET_UseShaderProgramEXT(table, save_UseShaderProgramEXT);
+ SET_ActiveProgramEXT(table, save_ActiveProgramEXT);
+
/* GL 3.0 */
#if 0
SET_ClearBufferiv(table, save_ClearBufferiv);
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index ac92a3fb08..757aae6e70 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -32,23 +32,12 @@
#include "framebuffer.h"
#include "readpix.h"
#include "state.h"
-#include "main/dispatch.h"
+#include "dispatch.h"
#if FEATURE_drawpix
-/**
- * If a fragment program is enabled, check that it's valid.
- * \return GL_TRUE if valid, GL_FALSE otherwise
- */
-static GLboolean
-valid_fragment_program(struct gl_context *ctx)
-{
- return !(ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled);
-}
-
-
/*
* Execute glDrawPixels
*/
@@ -65,33 +54,21 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
}
/* We're not using the current vertex program, and the driver may install
- * it's own.
+ * its own. Note: this may dirty some state.
*/
_mesa_set_vp_override(ctx, GL_TRUE);
- if (ctx->NewState) {
- _mesa_update_state(ctx);
- }
-
- if (!valid_fragment_program(ctx)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glDrawPixels (invalid fragment program)");
- goto end;
+ /* Note: this call does state validation */
+ if (!_mesa_valid_to_render(ctx, "glDrawPixels")) {
+ goto end; /* the error code was recorded */
}
if (_mesa_error_check_format_type(ctx, format, type, GL_TRUE)) {
- /* the error was already recorded */
- goto end;
- }
-
- if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
- "glDrawPixels(incomplete framebuffer)" );
- goto end;
+ goto end; /* the error code was recorded */
}
if (!ctx->Current.RasterPosValid) {
- goto end; /* no-op, not an error */
+ goto end; /* no-op, not an error */
}
if (ctx->RenderMode == GL_RENDER) {
@@ -165,22 +142,17 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
}
/* We're not using the current vertex program, and the driver may install
- * it's own.
+ * it's own. Note: this may dirty some state.
*/
_mesa_set_vp_override(ctx, GL_TRUE);
- if (ctx->NewState) {
- _mesa_update_state(ctx);
+ /* Note: this call does state validation */
+ if (!_mesa_valid_to_render(ctx, "glCopyPixels")) {
+ goto end; /* the error code was recorded */
}
- if (!valid_fragment_program(ctx)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glCopyPixels (invalid fragment program)");
- goto end;
- }
-
- if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT ||
- ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ /* Check read buffer's status (draw buffer was already checked) */
+ if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"glCopyPixels(incomplete framebuffer)" );
goto end;
@@ -241,19 +213,9 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
return; /* do nothing */
}
- if (ctx->NewState) {
- _mesa_update_state(ctx);
- }
-
- if (!valid_fragment_program(ctx)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glBitmap (invalid fragment program)");
- return;
- }
-
- if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
- "glBitmap(incomplete framebuffer)");
+ /* Note: this call does state validation */
+ if (!_mesa_valid_to_render(ctx, "glBitmap")) {
+ /* the error code was recorded */
return;
}
diff --git a/src/mesa/main/drawpix.h b/src/mesa/main/drawpix.h
index 1f95ff5294..31baa192ec 100644
--- a/src/mesa/main/drawpix.h
+++ b/src/mesa/main/drawpix.h
@@ -26,7 +26,10 @@
#define DRAWPIX_H
-#include "main/mtypes.h"
+#include "compiler.h"
+#include "mfeatures.h"
+
+struct _glapi_table;
#if FEATURE_drawpix
diff --git a/src/mesa/main/drawtex.h b/src/mesa/main/drawtex.h
index d7d507566b..13ff6f97e9 100644
--- a/src/mesa/main/drawtex.h
+++ b/src/mesa/main/drawtex.h
@@ -25,7 +25,8 @@
#define DRAWTEX_H
-#include "main/mtypes.h"
+#include "glheader.h"
+#include "mfeatures.h"
#if FEATURE_OES_draw_texture
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index af16c010b9..a038a95c55 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -130,6 +130,7 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
goto invalid_enum_error;
}
var = &ctx->Array.PrimitiveRestart;
+ flag = 0;
break;
default:
diff --git a/src/mesa/main/enable.h b/src/mesa/main/enable.h
index 69e52b1cb2..6d90c170c8 100644
--- a/src/mesa/main/enable.h
+++ b/src/mesa/main/enable.h
@@ -32,7 +32,9 @@
#define ENABLE_H
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_context;
extern void
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 4403945f43..0ce62c0e3c 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -53,6 +53,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ACCUM_RED_BITS\0"
"GL_ACTIVE_ATTRIBUTES\0"
"GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
+ "GL_ACTIVE_PROGRAM_EXT\0"
"GL_ACTIVE_STENCIL_FACE_EXT\0"
"GL_ACTIVE_TEXTURE\0"
"GL_ACTIVE_TEXTURE_ARB\0"
@@ -71,13 +72,20 @@ LONGSTRING static const char enum_string_table[] =
"GL_ALPHA12\0"
"GL_ALPHA12_EXT\0"
"GL_ALPHA16\0"
+ "GL_ALPHA16I_EXT\0"
+ "GL_ALPHA16UI_EXT\0"
"GL_ALPHA16_EXT\0"
+ "GL_ALPHA32I_EXT\0"
+ "GL_ALPHA32UI_EXT\0"
"GL_ALPHA4\0"
"GL_ALPHA4_EXT\0"
"GL_ALPHA8\0"
+ "GL_ALPHA8I_EXT\0"
+ "GL_ALPHA8UI_EXT\0"
"GL_ALPHA8_EXT\0"
"GL_ALPHA_BIAS\0"
"GL_ALPHA_BITS\0"
+ "GL_ALPHA_INTEGER_EXT\0"
"GL_ALPHA_SCALE\0"
"GL_ALPHA_TEST\0"
"GL_ALPHA_TEST_FUNC\0"
@@ -110,6 +118,10 @@ LONGSTRING static const char enum_string_table[] =
"GL_BGR\0"
"GL_BGRA\0"
"GL_BGRA_EXT\0"
+ "GL_BGRA_INTEGER\0"
+ "GL_BGRA_INTEGER_EXT\0"
+ "GL_BGR_INTEGER\0"
+ "GL_BGR_INTEGER_EXT\0"
"GL_BITMAP\0"
"GL_BITMAP_TOKEN\0"
"GL_BLEND\0"
@@ -137,6 +149,8 @@ LONGSTRING static const char enum_string_table[] =
"GL_BLUE\0"
"GL_BLUE_BIAS\0"
"GL_BLUE_BITS\0"
+ "GL_BLUE_INTEGER\0"
+ "GL_BLUE_INTEGER_EXT\0"
"GL_BLUE_SCALE\0"
"GL_BOOL\0"
"GL_BOOL_ARB\0"
@@ -148,11 +162,14 @@ LONGSTRING static const char enum_string_table[] =
"GL_BOOL_VEC4_ARB\0"
"GL_BUFFER_ACCESS\0"
"GL_BUFFER_ACCESS_ARB\0"
+ "GL_BUFFER_ACCESS_FLAGS\0"
"GL_BUFFER_ACCESS_OES\0"
"GL_BUFFER_FLUSHING_UNMAP_APPLE\0"
"GL_BUFFER_MAPPED\0"
"GL_BUFFER_MAPPED_ARB\0"
"GL_BUFFER_MAPPED_OES\0"
+ "GL_BUFFER_MAP_LENGTH\0"
+ "GL_BUFFER_MAP_OFFSET\0"
"GL_BUFFER_MAP_POINTER\0"
"GL_BUFFER_MAP_POINTER_ARB\0"
"GL_BUFFER_MAP_POINTER_OES\0"
@@ -175,6 +192,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_C4UB_V3F\0"
"GL_CCW\0"
"GL_CLAMP\0"
+ "GL_CLAMP_READ_COLOR\0"
"GL_CLAMP_TO_BORDER\0"
"GL_CLAMP_TO_BORDER_ARB\0"
"GL_CLAMP_TO_BORDER_SGIS\0"
@@ -187,6 +205,14 @@ LONGSTRING static const char enum_string_table[] =
"GL_CLIENT_ATTRIB_STACK_DEPTH\0"
"GL_CLIENT_PIXEL_STORE_BIT\0"
"GL_CLIENT_VERTEX_ARRAY_BIT\0"
+ "GL_CLIP_DISTANCE0\0"
+ "GL_CLIP_DISTANCE1\0"
+ "GL_CLIP_DISTANCE2\0"
+ "GL_CLIP_DISTANCE3\0"
+ "GL_CLIP_DISTANCE4\0"
+ "GL_CLIP_DISTANCE5\0"
+ "GL_CLIP_DISTANCE6\0"
+ "GL_CLIP_DISTANCE7\0"
"GL_CLIP_PLANE0\0"
"GL_CLIP_PLANE1\0"
"GL_CLIP_PLANE2\0"
@@ -291,6 +317,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_COMBINE_RGB_ARB\0"
"GL_COMBINE_RGB_EXT\0"
"GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
+ "GL_COMPARE_REF_TO_TEXTURE\0"
"GL_COMPARE_R_TO_TEXTURE\0"
"GL_COMPARE_R_TO_TEXTURE_ARB\0"
"GL_COMPILE\0"
@@ -304,6 +331,8 @@ LONGSTRING static const char enum_string_table[] =
"GL_COMPRESSED_LUMINANCE_ALPHA\0"
"GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
"GL_COMPRESSED_LUMINANCE_ARB\0"
+ "GL_COMPRESSED_RED\0"
+ "GL_COMPRESSED_RG\0"
"GL_COMPRESSED_RGB\0"
"GL_COMPRESSED_RGBA\0"
"GL_COMPRESSED_RGBA_ARB\0"
@@ -329,6 +358,11 @@ LONGSTRING static const char enum_string_table[] =
"GL_CONSTANT_COLOR\0"
"GL_CONSTANT_COLOR_EXT\0"
"GL_CONSTANT_EXT\0"
+ "GL_CONTEXT_COMPATIBILITY_PROFILE_BIT\0"
+ "GL_CONTEXT_CORE_PROFILE_BIT\0"
+ "GL_CONTEXT_FLAGS\0"
+ "GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT\0"
+ "GL_CONTEXT_PROFILE_MASK\0"
"GL_CONVOLUTION_1D\0"
"GL_CONVOLUTION_2D\0"
"GL_CONVOLUTION_BORDER_COLOR\0"
@@ -408,6 +442,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_DEPTH_BITS\0"
"GL_DEPTH_BOUNDS_EXT\0"
"GL_DEPTH_BOUNDS_TEST_EXT\0"
+ "GL_DEPTH_BUFFER\0"
"GL_DEPTH_BUFFER_BIT\0"
"GL_DEPTH_CLAMP\0"
"GL_DEPTH_CLAMP_NV\0"
@@ -547,6 +582,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_FIRST_VERTEX_CONVENTION_EXT\0"
"GL_FIXED\0"
"GL_FIXED_OES\0"
+ "GL_FIXED_ONLY\0"
"GL_FLAT\0"
"GL_FLOAT\0"
"GL_FLOAT_MAT2\0"
@@ -607,6 +643,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE\0"
"GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE\0"
"GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_LAYERED\0"
"GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB\0"
"GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\0"
"GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
@@ -647,6 +684,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES\0"
"GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS\0"
"GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB\0"
"GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\0"
"GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
@@ -680,15 +718,21 @@ LONGSTRING static const char enum_string_table[] =
"GL_GENERATE_MIPMAP_HINT\0"
"GL_GENERATE_MIPMAP_HINT_SGIS\0"
"GL_GENERATE_MIPMAP_SGIS\0"
+ "GL_GEOMETRY_INPUT_TYPE\0"
"GL_GEOMETRY_INPUT_TYPE_ARB\0"
+ "GL_GEOMETRY_OUTPUT_TYPE\0"
"GL_GEOMETRY_OUTPUT_TYPE_ARB\0"
+ "GL_GEOMETRY_SHADER\0"
"GL_GEOMETRY_SHADER_ARB\0"
+ "GL_GEOMETRY_VERTICES_OUT\0"
"GL_GEOMETRY_VERTICES_OUT_ARB\0"
"GL_GEQUAL\0"
"GL_GREATER\0"
"GL_GREEN\0"
"GL_GREEN_BIAS\0"
"GL_GREEN_BITS\0"
+ "GL_GREEN_INTEGER\0"
+ "GL_GREEN_INTEGER_EXT\0"
"GL_GREEN_SCALE\0"
"GL_HALF_FLOAT\0"
"GL_HALF_FLOAT_OES\0"
@@ -742,17 +786,40 @@ LONGSTRING static const char enum_string_table[] =
"GL_INTENSITY12\0"
"GL_INTENSITY12_EXT\0"
"GL_INTENSITY16\0"
+ "GL_INTENSITY16I_EXT\0"
+ "GL_INTENSITY16UI_EXT\0"
"GL_INTENSITY16_EXT\0"
+ "GL_INTENSITY32I_EXT\0"
+ "GL_INTENSITY32UI_EXT\0"
"GL_INTENSITY4\0"
"GL_INTENSITY4_EXT\0"
"GL_INTENSITY8\0"
+ "GL_INTENSITY8I_EXT\0"
+ "GL_INTENSITY8UI_EXT\0"
"GL_INTENSITY8_EXT\0"
"GL_INTENSITY_EXT\0"
+ "GL_INTERLEAVED_ATTRIBS\0"
"GL_INTERLEAVED_ATTRIBS_EXT\0"
"GL_INTERPOLATE\0"
"GL_INTERPOLATE_ARB\0"
"GL_INTERPOLATE_EXT\0"
"GL_INT_10_10_10_2_OES\0"
+ "GL_INT_SAMPLER_1D\0"
+ "GL_INT_SAMPLER_1D_ARRAY\0"
+ "GL_INT_SAMPLER_1D_ARRAY_EXT\0"
+ "GL_INT_SAMPLER_1D_EXT\0"
+ "GL_INT_SAMPLER_2D\0"
+ "GL_INT_SAMPLER_2D_ARRAY\0"
+ "GL_INT_SAMPLER_2D_ARRAY_EXT\0"
+ "GL_INT_SAMPLER_2D_EXT\0"
+ "GL_INT_SAMPLER_2D_RECT\0"
+ "GL_INT_SAMPLER_2D_RECT_EXT\0"
+ "GL_INT_SAMPLER_3D\0"
+ "GL_INT_SAMPLER_3D_EXT\0"
+ "GL_INT_SAMPLER_BUFFER\0"
+ "GL_INT_SAMPLER_BUFFER_EXT\0"
+ "GL_INT_SAMPLER_CUBE\0"
+ "GL_INT_SAMPLER_CUBE_EXT\0"
"GL_INT_VEC2\0"
"GL_INT_VEC2_ARB\0"
"GL_INT_VEC3\0"
@@ -797,6 +864,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_LINEAR_MIPMAP_LINEAR\0"
"GL_LINEAR_MIPMAP_NEAREST\0"
"GL_LINES\0"
+ "GL_LINES_ADJACENCY\0"
"GL_LINES_ADJACENCY_ARB\0"
"GL_LINE_BIT\0"
"GL_LINE_LOOP\0"
@@ -807,6 +875,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_LINE_STIPPLE_PATTERN\0"
"GL_LINE_STIPPLE_REPEAT\0"
"GL_LINE_STRIP\0"
+ "GL_LINE_STRIP_ADJACENCY\0"
"GL_LINE_STRIP_ADJACENCY_ARB\0"
"GL_LINE_TOKEN\0"
"GL_LINE_WIDTH\0"
@@ -831,9 +900,13 @@ LONGSTRING static const char enum_string_table[] =
"GL_LUMINANCE12_ALPHA4_EXT\0"
"GL_LUMINANCE12_EXT\0"
"GL_LUMINANCE16\0"
+ "GL_LUMINANCE16I_EXT\0"
+ "GL_LUMINANCE16UI_EXT\0"
"GL_LUMINANCE16_ALPHA16\0"
"GL_LUMINANCE16_ALPHA16_EXT\0"
"GL_LUMINANCE16_EXT\0"
+ "GL_LUMINANCE32I_EXT\0"
+ "GL_LUMINANCE32UI_EXT\0"
"GL_LUMINANCE4\0"
"GL_LUMINANCE4_ALPHA4\0"
"GL_LUMINANCE4_ALPHA4_EXT\0"
@@ -841,10 +914,21 @@ LONGSTRING static const char enum_string_table[] =
"GL_LUMINANCE6_ALPHA2\0"
"GL_LUMINANCE6_ALPHA2_EXT\0"
"GL_LUMINANCE8\0"
+ "GL_LUMINANCE8I_EXT\0"
+ "GL_LUMINANCE8UI_EXT\0"
"GL_LUMINANCE8_ALPHA8\0"
"GL_LUMINANCE8_ALPHA8_EXT\0"
"GL_LUMINANCE8_EXT\0"
"GL_LUMINANCE_ALPHA\0"
+ "GL_LUMINANCE_ALPHA16I_EXT\0"
+ "GL_LUMINANCE_ALPHA16UI_EXT\0"
+ "GL_LUMINANCE_ALPHA32I_EXT\0"
+ "GL_LUMINANCE_ALPHA32UI_EXT\0"
+ "GL_LUMINANCE_ALPHA8I_EXT\0"
+ "GL_LUMINANCE_ALPHA8UI_EXT\0"
+ "GL_LUMINANCE_ALPHA_INTEGER_EXT\0"
+ "GL_LUMINANCE_INTEGER_EXT\0"
+ "GL_MAJOR_VERSION\0"
"GL_MAP1_COLOR_4\0"
"GL_MAP1_GRID_DOMAIN\0"
"GL_MAP1_GRID_SEGMENTS\0"
@@ -964,11 +1048,13 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX\0"
"GL_MAX_3D_TEXTURE_SIZE\0"
"GL_MAX_3D_TEXTURE_SIZE_OES\0"
+ "GL_MAX_ARRAY_TEXTURE_LAYERS\0"
"GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
"GL_MAX_ATTRIB_STACK_DEPTH\0"
"GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
"GL_MAX_CLIPMAP_DEPTH_SGIX\0"
"GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
+ "GL_MAX_CLIP_DISTANCES\0"
"GL_MAX_CLIP_PLANES\0"
"GL_MAX_COLOR_ATTACHMENTS\0"
"GL_MAX_COLOR_ATTACHMENTS_EXT\0"
@@ -990,12 +1076,19 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_ELEMENTS_VERTICES\0"
"GL_MAX_EVAL_ORDER\0"
"GL_MAX_EXT\0"
+ "GL_MAX_FRAGMENT_INPUT_COMPONENTS\0"
"GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
"GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
"GL_MAX_FRAGMENT_UNIFORM_VECTORS\0"
+ "GL_MAX_GEOMETRY_INPUT_COMPONENTS\0"
+ "GL_MAX_GEOMETRY_OUTPUT_COMPONENTS\0"
+ "GL_MAX_GEOMETRY_OUTPUT_VERTICES\0"
"GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB\0"
+ "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS\0"
"GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB\0"
+ "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS\0"
"GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB\0"
+ "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS\0"
"GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB\0"
"GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB\0"
"GL_MAX_LIGHTS\0"
@@ -1029,9 +1122,12 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
"GL_MAX_PROGRAM_PARAMETERS_ARB\0"
"GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
+ "GL_MAX_PROGRAM_TEXEL_OFFSET\0"
+ "GL_MAX_PROGRAM_TEXEL_OFFSET_EXT\0"
"GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
"GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
"GL_MAX_PROJECTION_STACK_DEPTH\0"
+ "GL_MAX_RECTANGLE_TEXTURE_SIZE\0"
"GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
"GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
"GL_MAX_RENDERBUFFER_SIZE\0"
@@ -1042,6 +1138,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_SERVER_WAIT_TIMEOUT\0"
"GL_MAX_SHININESS_NV\0"
"GL_MAX_SPOT_EXPONENT_NV\0"
+ "GL_MAX_TEXTURE_BUFFER_SIZE\0"
"GL_MAX_TEXTURE_COORDS\0"
"GL_MAX_TEXTURE_COORDS_ARB\0"
"GL_MAX_TEXTURE_IMAGE_UNITS\0"
@@ -1055,8 +1152,11 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_TEXTURE_UNITS_ARB\0"
"GL_MAX_TRACK_MATRICES_NV\0"
"GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS\0"
"GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS\0"
"GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS\0"
"GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT\0"
"GL_MAX_VARYING_COMPONENTS\0"
"GL_MAX_VARYING_FLOATS\0"
@@ -1064,6 +1164,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_VARYING_VECTORS\0"
"GL_MAX_VERTEX_ATTRIBS\0"
"GL_MAX_VERTEX_ATTRIBS_ARB\0"
+ "GL_MAX_VERTEX_OUTPUT_COMPONENTS\0"
"GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
"GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
"GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
@@ -1082,7 +1183,10 @@ LONGSTRING static const char enum_string_table[] =
"GL_MINMAX_FORMAT_EXT\0"
"GL_MINMAX_SINK\0"
"GL_MINMAX_SINK_EXT\0"
+ "GL_MINOR_VERSION\0"
"GL_MIN_EXT\0"
+ "GL_MIN_PROGRAM_TEXEL_OFFSET\0"
+ "GL_MIN_PROGRAM_TEXEL_OFFSET_EXT\0"
"GL_MIRRORED_REPEAT\0"
"GL_MIRRORED_REPEAT_ARB\0"
"GL_MIRRORED_REPEAT_IBM\0"
@@ -1169,6 +1273,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_NO_ERROR\0"
"GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
"GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
+ "GL_NUM_EXTENSIONS\0"
"GL_NUM_PROGRAM_BINARY_FORMATS_OES\0"
"GL_NUM_SHADER_BINARY_FORMATS\0"
"GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
@@ -1368,7 +1473,10 @@ LONGSTRING static const char enum_string_table[] =
"GL_PRIMARY_COLOR\0"
"GL_PRIMARY_COLOR_ARB\0"
"GL_PRIMARY_COLOR_EXT\0"
+ "GL_PRIMITIVES_GENERATED\0"
"GL_PRIMITIVES_GENERATED_EXT\0"
+ "GL_PRIMITIVE_RESTART\0"
+ "GL_PRIMITIVE_RESTART_INDEX\0"
"GL_PRIMITIVE_RESTART_INDEX_NV\0"
"GL_PRIMITIVE_RESTART_NV\0"
"GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
@@ -1396,6 +1504,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_PROGRAM_OBJECT_ARB\0"
"GL_PROGRAM_PARAMETERS_ARB\0"
"GL_PROGRAM_PARAMETER_NV\0"
+ "GL_PROGRAM_POINT_SIZE\0"
"GL_PROGRAM_POINT_SIZE_ARB\0"
"GL_PROGRAM_RESIDENT_NV\0"
"GL_PROGRAM_STRING_ARB\0"
@@ -1417,15 +1526,18 @@ LONGSTRING static const char enum_string_table[] =
"GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
"GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
"GL_PROXY_TEXTURE_1D\0"
+ "GL_PROXY_TEXTURE_1D_ARRAY\0"
"GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
"GL_PROXY_TEXTURE_1D_EXT\0"
"GL_PROXY_TEXTURE_2D\0"
+ "GL_PROXY_TEXTURE_2D_ARRAY\0"
"GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
"GL_PROXY_TEXTURE_2D_EXT\0"
"GL_PROXY_TEXTURE_3D\0"
"GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
"GL_PROXY_TEXTURE_CUBE_MAP\0"
"GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
+ "GL_PROXY_TEXTURE_RECTANGLE\0"
"GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
"GL_PROXY_TEXTURE_RECTANGLE_NV\0"
"GL_PURGEABLE_APPLE\0"
@@ -1436,18 +1548,26 @@ LONGSTRING static const char enum_string_table[] =
"GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT\0"
"GL_QUAD_MESH_SUN\0"
"GL_QUAD_STRIP\0"
+ "GL_QUERY_BY_REGION_NO_WAIT\0"
"GL_QUERY_BY_REGION_NO_WAIT_NV\0"
+ "GL_QUERY_BY_REGION_WAIT\0"
"GL_QUERY_BY_REGION_WAIT_NV\0"
"GL_QUERY_COUNTER_BITS\0"
"GL_QUERY_COUNTER_BITS_ARB\0"
+ "GL_QUERY_NO_WAIT\0"
"GL_QUERY_NO_WAIT_NV\0"
"GL_QUERY_RESULT\0"
"GL_QUERY_RESULT_ARB\0"
"GL_QUERY_RESULT_AVAILABLE\0"
"GL_QUERY_RESULT_AVAILABLE_ARB\0"
+ "GL_QUERY_WAIT\0"
"GL_QUERY_WAIT_NV\0"
"GL_R\0"
+ "GL_R11F_G11F_B10F\0"
+ "GL_R16_SNORM\0"
"GL_R3_G3_B2\0"
+ "GL_R8_SNORM\0"
+ "GL_RASTERIZER_DISCARD\0"
"GL_RASTERIZER_DISCARD_EXT\0"
"GL_RASTER_POSITION_UNCLIPPED_IBM\0"
"GL_READ_BUFFER\0"
@@ -1464,7 +1584,10 @@ LONGSTRING static const char enum_string_table[] =
"GL_REDUCE_EXT\0"
"GL_RED_BIAS\0"
"GL_RED_BITS\0"
+ "GL_RED_INTEGER\0"
+ "GL_RED_INTEGER_EXT\0"
"GL_RED_SCALE\0"
+ "GL_RED_SNORM\0"
"GL_REFLECTION_MAP\0"
"GL_REFLECTION_MAP_ARB\0"
"GL_REFLECTION_MAP_NV\0"
@@ -1510,6 +1633,8 @@ LONGSTRING static const char enum_string_table[] =
"GL_RESCALE_NORMAL_EXT\0"
"GL_RETAINED_APPLE\0"
"GL_RETURN\0"
+ "GL_RG16_SNORM\0"
+ "GL_RG8_SNORM\0"
"GL_RGB\0"
"GL_RGB10\0"
"GL_RGB10_A2\0"
@@ -1518,8 +1643,19 @@ LONGSTRING static const char enum_string_table[] =
"GL_RGB12\0"
"GL_RGB12_EXT\0"
"GL_RGB16\0"
+ "GL_RGB16F\0"
+ "GL_RGB16I\0"
+ "GL_RGB16I_EXT\0"
+ "GL_RGB16UI\0"
+ "GL_RGB16UI_EXT\0"
"GL_RGB16_EXT\0"
+ "GL_RGB16_SNORM\0"
"GL_RGB2_EXT\0"
+ "GL_RGB32F\0"
+ "GL_RGB32I\0"
+ "GL_RGB32I_EXT\0"
+ "GL_RGB32UI\0"
+ "GL_RGB32UI_EXT\0"
"GL_RGB4\0"
"GL_RGB4_EXT\0"
"GL_RGB4_S3TC\0"
@@ -1531,41 +1667,83 @@ LONGSTRING static const char enum_string_table[] =
"GL_RGB5_A1_OES\0"
"GL_RGB5_EXT\0"
"GL_RGB8\0"
+ "GL_RGB8I\0"
+ "GL_RGB8I_EXT\0"
+ "GL_RGB8UI\0"
+ "GL_RGB8UI_EXT\0"
"GL_RGB8_EXT\0"
"GL_RGB8_OES\0"
+ "GL_RGB8_SNORM\0"
+ "GL_RGB9_E5\0"
"GL_RGBA\0"
"GL_RGBA12\0"
"GL_RGBA12_EXT\0"
"GL_RGBA16\0"
+ "GL_RGBA16F\0"
+ "GL_RGBA16I\0"
+ "GL_RGBA16I_EXT\0"
+ "GL_RGBA16UI\0"
+ "GL_RGBA16UI_EXT\0"
"GL_RGBA16_EXT\0"
+ "GL_RGBA16_SNORM\0"
"GL_RGBA2\0"
"GL_RGBA2_EXT\0"
+ "GL_RGBA32F\0"
+ "GL_RGBA32I\0"
+ "GL_RGBA32I_EXT\0"
+ "GL_RGBA32UI\0"
+ "GL_RGBA32UI_EXT\0"
"GL_RGBA4\0"
"GL_RGBA4_DXT5_S3TC\0"
"GL_RGBA4_EXT\0"
"GL_RGBA4_OES\0"
"GL_RGBA4_S3TC\0"
"GL_RGBA8\0"
+ "GL_RGBA8I\0"
+ "GL_RGBA8I_EXT\0"
+ "GL_RGBA8UI\0"
+ "GL_RGBA8UI_EXT\0"
"GL_RGBA8_EXT\0"
"GL_RGBA8_OES\0"
"GL_RGBA8_SNORM\0"
"GL_RGBA_DXT5_S3TC\0"
+ "GL_RGBA_INTEGER\0"
+ "GL_RGBA_INTEGER_EXT\0"
+ "GL_RGBA_INTEGER_MODE_EXT\0"
"GL_RGBA_MODE\0"
"GL_RGBA_S3TC\0"
"GL_RGBA_SNORM\0"
+ "GL_RGB_INTEGER\0"
+ "GL_RGB_INTEGER_EXT\0"
"GL_RGB_S3TC\0"
"GL_RGB_SCALE\0"
"GL_RGB_SCALE_ARB\0"
"GL_RGB_SCALE_EXT\0"
+ "GL_RGB_SNORM\0"
+ "GL_RG_SNORM\0"
"GL_RIGHT\0"
"GL_S\0"
"GL_SAMPLER_1D\0"
+ "GL_SAMPLER_1D_ARRAY\0"
+ "GL_SAMPLER_1D_ARRAY_EXT\0"
+ "GL_SAMPLER_1D_ARRAY_SHADOW\0"
+ "GL_SAMPLER_1D_ARRAY_SHADOW_EXT\0"
"GL_SAMPLER_1D_SHADOW\0"
"GL_SAMPLER_2D\0"
+ "GL_SAMPLER_2D_ARRAY\0"
+ "GL_SAMPLER_2D_ARRAY_EXT\0"
+ "GL_SAMPLER_2D_ARRAY_SHADOW\0"
+ "GL_SAMPLER_2D_ARRAY_SHADOW_EXT\0"
+ "GL_SAMPLER_2D_RECT\0"
+ "GL_SAMPLER_2D_RECT_SHADOW\0"
"GL_SAMPLER_2D_SHADOW\0"
"GL_SAMPLER_3D\0"
"GL_SAMPLER_3D_OES\0"
+ "GL_SAMPLER_BUFFER\0"
+ "GL_SAMPLER_BUFFER_EXT\0"
"GL_SAMPLER_CUBE\0"
+ "GL_SAMPLER_CUBE_SHADOW\0"
+ "GL_SAMPLER_CUBE_SHADOW_EXT\0"
"GL_SAMPLES\0"
"GL_SAMPLES_3DFX\0"
"GL_SAMPLES_ARB\0"
@@ -1598,6 +1776,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_SELECTION_BUFFER_POINTER\0"
"GL_SELECTION_BUFFER_SIZE\0"
"GL_SEPARABLE_2D\0"
+ "GL_SEPARATE_ATTRIBS\0"
"GL_SEPARATE_ATTRIBS_EXT\0"
"GL_SEPARATE_SPECULAR_COLOR\0"
"GL_SEPARATE_SPECULAR_COLOR_EXT\0"
@@ -1689,6 +1868,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_STENCIL_BACK_VALUE_MASK\0"
"GL_STENCIL_BACK_WRITEMASK\0"
"GL_STENCIL_BITS\0"
+ "GL_STENCIL_BUFFER\0"
"GL_STENCIL_BUFFER_BIT\0"
"GL_STENCIL_CLEAR_VALUE\0"
"GL_STENCIL_FAIL\0"
@@ -1807,8 +1987,10 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE9\0"
"GL_TEXTURE9_ARB\0"
"GL_TEXTURE_1D\0"
+ "GL_TEXTURE_1D_ARRAY\0"
"GL_TEXTURE_1D_ARRAY_EXT\0"
"GL_TEXTURE_2D\0"
+ "GL_TEXTURE_2D_ARRAY\0"
"GL_TEXTURE_2D_ARRAY_EXT\0"
"GL_TEXTURE_3D\0"
"GL_TEXTURE_3D_OES\0"
@@ -1816,14 +1998,18 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_ALPHA_SIZE_EXT\0"
"GL_TEXTURE_BASE_LEVEL\0"
"GL_TEXTURE_BINDING_1D\0"
+ "GL_TEXTURE_BINDING_1D_ARRAY\0"
"GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
"GL_TEXTURE_BINDING_2D\0"
+ "GL_TEXTURE_BINDING_2D_ARRAY\0"
"GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
"GL_TEXTURE_BINDING_3D\0"
"GL_TEXTURE_BINDING_3D_OES\0"
+ "GL_TEXTURE_BINDING_BUFFER\0"
"GL_TEXTURE_BINDING_CUBE_MAP\0"
"GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
"GL_TEXTURE_BINDING_CUBE_MAP_OES\0"
+ "GL_TEXTURE_BINDING_RECTANGLE\0"
"GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
"GL_TEXTURE_BINDING_RECTANGLE_NV\0"
"GL_TEXTURE_BIT\0"
@@ -1831,6 +2017,9 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_BLUE_SIZE_EXT\0"
"GL_TEXTURE_BORDER\0"
"GL_TEXTURE_BORDER_COLOR\0"
+ "GL_TEXTURE_BUFFER\0"
+ "GL_TEXTURE_BUFFER_DATA_STORE_BINDING\0"
+ "GL_TEXTURE_BUFFER_FORMAT\0"
"GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
"GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
"GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
@@ -1929,11 +2118,13 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_PRIORITY\0"
"GL_TEXTURE_RANGE_LENGTH_APPLE\0"
"GL_TEXTURE_RANGE_POINTER_APPLE\0"
+ "GL_TEXTURE_RECTANGLE\0"
"GL_TEXTURE_RECTANGLE_ARB\0"
"GL_TEXTURE_RECTANGLE_NV\0"
"GL_TEXTURE_RED_SIZE\0"
"GL_TEXTURE_RED_SIZE_EXT\0"
"GL_TEXTURE_RESIDENT\0"
+ "GL_TEXTURE_SHARED_SIZE\0"
"GL_TEXTURE_STACK_DEPTH\0"
"GL_TEXTURE_STENCIL_SIZE\0"
"GL_TEXTURE_STENCIL_SIZE_EXT\0"
@@ -1952,15 +2143,23 @@ LONGSTRING static const char enum_string_table[] =
"GL_TRANSFORM_BIT\0"
"GL_TRANSFORM_FEEDBACK\0"
"GL_TRANSFORM_FEEDBACK_BINDING\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER\0"
"GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING\0"
"GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT\0"
"GL_TRANSFORM_FEEDBACK_BUFFER_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_MODE\0"
"GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT\0"
"GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE\0"
"GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_START\0"
"GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN\0"
"GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_VARYINGS\0"
"GL_TRANSFORM_FEEDBACK_VARYINGS_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH\0"
"GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT\0"
"GL_TRANSPOSE_COLOR_MATRIX\0"
"GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
@@ -1973,10 +2172,12 @@ LONGSTRING static const char enum_string_table[] =
"GL_TRANSPOSE_TEXTURE_MATRIX\0"
"GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
"GL_TRIANGLES\0"
+ "GL_TRIANGLES_ADJACENCY\0"
"GL_TRIANGLES_ADJACENCY_ARB\0"
"GL_TRIANGLE_FAN\0"
"GL_TRIANGLE_MESH_SUN\0"
"GL_TRIANGLE_STRIP\0"
+ "GL_TRIANGLE_STRIP_ADJACENCY\0"
"GL_TRIANGLE_STRIP_ADJACENCY_ARB\0"
"GL_TRUE\0"
"GL_UNDEFINED_APPLE\0"
@@ -1993,6 +2194,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_UNSIGNED_BYTE_2_3_3_REV\0"
"GL_UNSIGNED_BYTE_3_3_2\0"
"GL_UNSIGNED_INT\0"
+ "GL_UNSIGNED_INT_10F_11F_11F_REV\0"
"GL_UNSIGNED_INT_10_10_10_2\0"
"GL_UNSIGNED_INT_10_10_10_2_OES\0"
"GL_UNSIGNED_INT_24_8\0"
@@ -2001,8 +2203,31 @@ LONGSTRING static const char enum_string_table[] =
"GL_UNSIGNED_INT_24_8_OES\0"
"GL_UNSIGNED_INT_2_10_10_10_REV\0"
"GL_UNSIGNED_INT_2_10_10_10_REV_EXT\0"
+ "GL_UNSIGNED_INT_5_9_9_9_REV\0"
"GL_UNSIGNED_INT_8_8_8_8\0"
"GL_UNSIGNED_INT_8_8_8_8_REV\0"
+ "GL_UNSIGNED_INT_SAMPLER_1D\0"
+ "GL_UNSIGNED_INT_SAMPLER_1D_ARRAY\0"
+ "GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_1D_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_RECT\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_3D\0"
+ "GL_UNSIGNED_INT_SAMPLER_3D_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_BUFFER\0"
+ "GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_CUBE\0"
+ "GL_UNSIGNED_INT_SAMPLER_CUBE_EXT\0"
+ "GL_UNSIGNED_INT_VEC2\0"
+ "GL_UNSIGNED_INT_VEC2_EXT\0"
+ "GL_UNSIGNED_INT_VEC3\0"
+ "GL_UNSIGNED_INT_VEC3_EXT\0"
+ "GL_UNSIGNED_INT_VEC4\0"
+ "GL_UNSIGNED_INT_VEC4_EXT\0"
"GL_UNSIGNED_NORMALIZED\0"
"GL_UNSIGNED_SHORT\0"
"GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
@@ -2052,6 +2277,8 @@ LONGSTRING static const char enum_string_table[] =
"GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
"GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
"GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_INTEGER\0"
+ "GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT\0"
"GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
"GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
"GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
@@ -2105,7 +2332,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[2067] =
+static const enum_elt all_enums[2294] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -2124,3485 +2351,3838 @@ static const enum_elt all_enums[2067] =
{ 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
{ 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
{ 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
- { 276, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
- { 303, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
- { 321, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
- { 343, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
- { 362, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- { 391, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- { 418, 0x00000104 }, /* GL_ADD */
- { 425, 0x00008574 }, /* GL_ADD_SIGNED */
- { 439, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
- { 457, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
- { 475, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
- { 503, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
- { 531, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
- { 550, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
- { 576, 0x00001906 }, /* GL_ALPHA */
- { 585, 0x0000803D }, /* GL_ALPHA12 */
- { 596, 0x0000803D }, /* GL_ALPHA12_EXT */
- { 611, 0x0000803E }, /* GL_ALPHA16 */
- { 622, 0x0000803E }, /* GL_ALPHA16_EXT */
- { 637, 0x0000803B }, /* GL_ALPHA4 */
- { 647, 0x0000803B }, /* GL_ALPHA4_EXT */
- { 661, 0x0000803C }, /* GL_ALPHA8 */
- { 671, 0x0000803C }, /* GL_ALPHA8_EXT */
- { 685, 0x00000D1D }, /* GL_ALPHA_BIAS */
- { 699, 0x00000D55 }, /* GL_ALPHA_BITS */
- { 713, 0x00000D1C }, /* GL_ALPHA_SCALE */
- { 728, 0x00000BC0 }, /* GL_ALPHA_TEST */
- { 742, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
- { 761, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
- { 779, 0x0000911A }, /* GL_ALREADY_SIGNALED */
- { 799, 0x00000207 }, /* GL_ALWAYS */
- { 809, 0x00001200 }, /* GL_AMBIENT */
- { 820, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
- { 843, 0x00001501 }, /* GL_AND */
- { 850, 0x00001504 }, /* GL_AND_INVERTED */
- { 866, 0x00001502 }, /* GL_AND_REVERSE */
- { 881, 0x00008892 }, /* GL_ARRAY_BUFFER */
- { 897, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
- { 921, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
- { 949, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
- { 969, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
- { 996, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
- { 1020, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
- { 1046, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
- { 1070, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
- { 1092, 0x00000D80 }, /* GL_AUTO_NORMAL */
- { 1107, 0x00000409 }, /* GL_AUX0 */
- { 1115, 0x0000040A }, /* GL_AUX1 */
- { 1123, 0x0000040B }, /* GL_AUX2 */
- { 1131, 0x0000040C }, /* GL_AUX3 */
- { 1139, 0x00000C00 }, /* GL_AUX_BUFFERS */
- { 1154, 0x00000405 }, /* GL_BACK */
- { 1162, 0x00000402 }, /* GL_BACK_LEFT */
- { 1175, 0x00000403 }, /* GL_BACK_RIGHT */
- { 1189, 0x000080E0 }, /* GL_BGR */
- { 1196, 0x000080E1 }, /* GL_BGRA */
- { 1204, 0x000080E1 }, /* GL_BGRA_EXT */
- { 1216, 0x00001A00 }, /* GL_BITMAP */
- { 1226, 0x00000704 }, /* GL_BITMAP_TOKEN */
- { 1242, 0x00000BE2 }, /* GL_BLEND */
- { 1251, 0x00008005 }, /* GL_BLEND_COLOR */
- { 1266, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
- { 1285, 0x00000BE0 }, /* GL_BLEND_DST */
- { 1298, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
- { 1317, 0x000080CA }, /* GL_BLEND_DST_ALPHA_OES */
- { 1340, 0x000080C8 }, /* GL_BLEND_DST_RGB */
- { 1357, 0x000080C8 }, /* GL_BLEND_DST_RGB_OES */
- { 1378, 0x00008009 }, /* GL_BLEND_EQUATION */
- { 1396, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
- { 1420, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
- { 1448, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_OES */
- { 1476, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
- { 1498, 0x00008009 }, /* GL_BLEND_EQUATION_OES */
- { 1520, 0x00008009 }, /* GL_BLEND_EQUATION_RGB */
- { 1542, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
- { 1568, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_OES */
- { 1594, 0x00000BE1 }, /* GL_BLEND_SRC */
- { 1607, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
- { 1626, 0x000080CB }, /* GL_BLEND_SRC_ALPHA_OES */
- { 1649, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
- { 1666, 0x000080C9 }, /* GL_BLEND_SRC_RGB_OES */
- { 1687, 0x00001905 }, /* GL_BLUE */
- { 1695, 0x00000D1B }, /* GL_BLUE_BIAS */
- { 1708, 0x00000D54 }, /* GL_BLUE_BITS */
- { 1721, 0x00000D1A }, /* GL_BLUE_SCALE */
- { 1735, 0x00008B56 }, /* GL_BOOL */
- { 1743, 0x00008B56 }, /* GL_BOOL_ARB */
- { 1755, 0x00008B57 }, /* GL_BOOL_VEC2 */
- { 1768, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
- { 1785, 0x00008B58 }, /* GL_BOOL_VEC3 */
- { 1798, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
- { 1815, 0x00008B59 }, /* GL_BOOL_VEC4 */
- { 1828, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
- { 1845, 0x000088BB }, /* GL_BUFFER_ACCESS */
- { 1862, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
- { 1883, 0x000088BB }, /* GL_BUFFER_ACCESS_OES */
- { 1904, 0x00008A13 }, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- { 1935, 0x000088BC }, /* GL_BUFFER_MAPPED */
- { 1952, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
- { 1973, 0x000088BC }, /* GL_BUFFER_MAPPED_OES */
- { 1994, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
- { 2016, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
- { 2042, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_OES */
- { 2068, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */
- { 2091, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
- { 2125, 0x00008764 }, /* GL_BUFFER_SIZE */
- { 2140, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
- { 2159, 0x00008765 }, /* GL_BUFFER_USAGE */
- { 2175, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
- { 2195, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */
- { 2214, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */
- { 2240, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */
- { 2263, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
- { 2291, 0x0000877C }, /* GL_BUMP_TARGET_ATI */
- { 2310, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */
- { 2332, 0x00001400 }, /* GL_BYTE */
- { 2340, 0x00002A24 }, /* GL_C3F_V3F */
- { 2351, 0x00002A26 }, /* GL_C4F_N3F_V3F */
- { 2366, 0x00002A22 }, /* GL_C4UB_V2F */
- { 2378, 0x00002A23 }, /* GL_C4UB_V3F */
- { 2390, 0x00000901 }, /* GL_CCW */
- { 2397, 0x00002900 }, /* GL_CLAMP */
- { 2406, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
- { 2425, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
- { 2448, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
- { 2472, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
- { 2489, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
- { 2511, 0x00001500 }, /* GL_CLEAR */
- { 2520, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
- { 2545, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
- { 2574, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
- { 2600, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
- { 2629, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
- { 2655, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
- { 2682, 0x00003000 }, /* GL_CLIP_PLANE0 */
- { 2697, 0x00003001 }, /* GL_CLIP_PLANE1 */
- { 2712, 0x00003002 }, /* GL_CLIP_PLANE2 */
- { 2727, 0x00003003 }, /* GL_CLIP_PLANE3 */
- { 2742, 0x00003004 }, /* GL_CLIP_PLANE4 */
- { 2757, 0x00003005 }, /* GL_CLIP_PLANE5 */
- { 2772, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- { 2805, 0x00000A00 }, /* GL_COEFF */
- { 2814, 0x00001800 }, /* GL_COLOR */
- { 2823, 0x00008076 }, /* GL_COLOR_ARRAY */
- { 2838, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- { 2868, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 2902, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
- { 2925, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
- { 2945, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
- { 2967, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
- { 2987, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */
- { 3008, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
- { 3033, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_OES */
- { 3058, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */
- { 3079, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */
- { 3101, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
- { 3127, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */
- { 3149, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
- { 3175, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */
- { 3197, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
- { 3223, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */
- { 3245, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
- { 3271, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */
- { 3293, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
- { 3319, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */
- { 3341, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
- { 3367, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
- { 3392, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */
- { 3413, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
- { 3438, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */
- { 3459, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
- { 3484, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */
- { 3505, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
- { 3530, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */
- { 3551, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
- { 3576, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */
- { 3597, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
- { 3622, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */
- { 3643, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
- { 3668, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */
- { 3689, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
- { 3714, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */
- { 3735, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
- { 3760, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
- { 3780, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
- { 3801, 0x00001900 }, /* GL_COLOR_INDEX */
- { 3816, 0x00001603 }, /* GL_COLOR_INDEXES */
- { 3833, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
- { 3851, 0x00000B57 }, /* GL_COLOR_MATERIAL */
- { 3869, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
- { 3892, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
- { 3920, 0x000080B1 }, /* GL_COLOR_MATRIX */
- { 3936, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
- { 3956, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
- { 3984, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 4016, 0x00008458 }, /* GL_COLOR_SUM */
- { 4029, 0x00008458 }, /* GL_COLOR_SUM_ARB */
- { 4046, 0x000080D0 }, /* GL_COLOR_TABLE */
- { 4061, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
- { 4087, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
- { 4117, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
- { 4147, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
- { 4167, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
- { 4191, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
- { 4216, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
- { 4245, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
- { 4274, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
- { 4296, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
- { 4322, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
- { 4348, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
- { 4374, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
- { 4404, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
- { 4434, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
- { 4464, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
- { 4498, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
- { 4532, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- { 4562, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
- { 4596, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
- { 4630, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
- { 4654, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
- { 4682, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
- { 4710, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
- { 4731, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
- { 4756, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
- { 4777, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
- { 4802, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
- { 4827, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
- { 4846, 0x00008570 }, /* GL_COMBINE */
- { 4857, 0x00008503 }, /* GL_COMBINE4 */
- { 4869, 0x00008572 }, /* GL_COMBINE_ALPHA */
- { 4886, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
- { 4907, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
- { 4928, 0x00008570 }, /* GL_COMBINE_ARB */
- { 4943, 0x00008570 }, /* GL_COMBINE_EXT */
- { 4958, 0x00008571 }, /* GL_COMBINE_RGB */
- { 4973, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
- { 4992, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
- { 5011, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
- { 5047, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
- { 5071, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
- { 5099, 0x00001300 }, /* GL_COMPILE */
- { 5110, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
- { 5133, 0x00008B81 }, /* GL_COMPILE_STATUS */
- { 5151, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
- { 5171, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
- { 5195, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
- { 5219, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
- { 5247, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
- { 5271, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- { 5301, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
- { 5335, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
- { 5363, 0x000084ED }, /* GL_COMPRESSED_RGB */
- { 5381, 0x000084EE }, /* GL_COMPRESSED_RGBA */
- { 5400, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
- { 5423, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- { 5452, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- { 5485, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- { 5518, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- { 5551, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
- { 5573, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- { 5601, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- { 5633, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */
- { 5658, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- { 5689, 0x00008C48 }, /* GL_COMPRESSED_SRGB */
- { 5708, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */
- { 5733, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
- { 5763, 0x0000911C }, /* GL_CONDITION_SATISFIED */
- { 5786, 0x00008576 }, /* GL_CONSTANT */
- { 5798, 0x00008003 }, /* GL_CONSTANT_ALPHA */
- { 5816, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
- { 5838, 0x00008576 }, /* GL_CONSTANT_ARB */
- { 5854, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
- { 5878, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
- { 5900, 0x00008001 }, /* GL_CONSTANT_COLOR */
- { 5918, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
- { 5940, 0x00008576 }, /* GL_CONSTANT_EXT */
- { 5956, 0x00008010 }, /* GL_CONVOLUTION_1D */
- { 5974, 0x00008011 }, /* GL_CONVOLUTION_2D */
- { 5992, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
- { 6020, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
- { 6051, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
- { 6078, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
- { 6109, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
- { 6136, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
- { 6167, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
- { 6195, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
- { 6227, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
- { 6249, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
- { 6275, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
- { 6297, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
- { 6323, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
- { 6344, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
- { 6369, 0x00008862 }, /* GL_COORD_REPLACE */
- { 6386, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
- { 6407, 0x00008862 }, /* GL_COORD_REPLACE_NV */
- { 6427, 0x00008862 }, /* GL_COORD_REPLACE_OES */
- { 6448, 0x00001503 }, /* GL_COPY */
- { 6456, 0x0000150C }, /* GL_COPY_INVERTED */
- { 6473, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
- { 6493, 0x00008F36 }, /* GL_COPY_READ_BUFFER */
- { 6513, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */
- { 6534, 0x00000B44 }, /* GL_CULL_FACE */
- { 6547, 0x00000B45 }, /* GL_CULL_FACE_MODE */
- { 6565, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
- { 6584, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- { 6616, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- { 6651, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
- { 6672, 0x00000001 }, /* GL_CURRENT_BIT */
- { 6687, 0x00000B00 }, /* GL_CURRENT_COLOR */
- { 6704, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
- { 6725, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
- { 6751, 0x00000B01 }, /* GL_CURRENT_INDEX */
- { 6768, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
- { 6790, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
- { 6818, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
- { 6839, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- { 6873, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
- { 6906, 0x00000B02 }, /* GL_CURRENT_NORMAL */
- { 6924, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- { 6954, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_OES */
- { 6984, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
- { 7003, 0x00008865 }, /* GL_CURRENT_QUERY */
- { 7020, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
- { 7041, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
- { 7065, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
- { 7092, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
- { 7116, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
- { 7143, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
- { 7176, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
- { 7210, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- { 7243, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
- { 7270, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
- { 7296, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
- { 7321, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
- { 7350, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
- { 7372, 0x00000900 }, /* GL_CW */
- { 7378, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
- { 7399, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
- { 7420, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
- { 7440, 0x00002101 }, /* GL_DECAL */
- { 7449, 0x00001E03 }, /* GL_DECR */
- { 7457, 0x00008508 }, /* GL_DECR_WRAP */
- { 7470, 0x00008508 }, /* GL_DECR_WRAP_EXT */
- { 7487, 0x00008B80 }, /* GL_DELETE_STATUS */
- { 7504, 0x00001801 }, /* GL_DEPTH */
- { 7513, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
- { 7533, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
- { 7557, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_OES */
- { 7581, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
- { 7601, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
- { 7625, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_OES */
- { 7649, 0x00000D1F }, /* GL_DEPTH_BIAS */
- { 7663, 0x00000D56 }, /* GL_DEPTH_BITS */
- { 7677, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
- { 7697, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
- { 7722, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
- { 7742, 0x0000864F }, /* GL_DEPTH_CLAMP */
- { 7757, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
- { 7775, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
- { 7796, 0x00001902 }, /* GL_DEPTH_COMPONENT */
- { 7815, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
- { 7836, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
- { 7861, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_OES */
- { 7886, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
- { 7912, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
- { 7933, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
- { 7958, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_OES */
- { 7983, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
- { 8009, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
- { 8030, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
- { 8055, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_OES */
- { 8080, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
- { 8106, 0x00000B74 }, /* GL_DEPTH_FUNC */
- { 8120, 0x00000B70 }, /* GL_DEPTH_RANGE */
- { 8135, 0x00000D1E }, /* GL_DEPTH_SCALE */
- { 8150, 0x000084F9 }, /* GL_DEPTH_STENCIL */
- { 8167, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
- { 8195, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
- { 8216, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
- { 8236, 0x000084F9 }, /* GL_DEPTH_STENCIL_OES */
- { 8257, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- { 8285, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- { 8313, 0x00000B71 }, /* GL_DEPTH_TEST */
- { 8327, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
- { 8349, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
- { 8375, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
- { 8394, 0x00001201 }, /* GL_DIFFUSE */
- { 8405, 0x00000BD0 }, /* GL_DITHER */
- { 8415, 0x00000A02 }, /* GL_DOMAIN */
- { 8425, 0x00001100 }, /* GL_DONT_CARE */
- { 8438, 0x000086AE }, /* GL_DOT3_RGB */
- { 8450, 0x000086AF }, /* GL_DOT3_RGBA */
- { 8463, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
- { 8480, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
- { 8497, 0x000086AE }, /* GL_DOT3_RGB_ARB */
- { 8513, 0x00008740 }, /* GL_DOT3_RGB_EXT */
- { 8529, 0x0000140A }, /* GL_DOUBLE */
- { 8539, 0x00000C32 }, /* GL_DOUBLEBUFFER */
- { 8555, 0x00000C01 }, /* GL_DRAW_BUFFER */
- { 8570, 0x00008825 }, /* GL_DRAW_BUFFER0 */
- { 8586, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
- { 8606, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
- { 8626, 0x00008826 }, /* GL_DRAW_BUFFER1 */
- { 8642, 0x0000882F }, /* GL_DRAW_BUFFER10 */
- { 8659, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
- { 8680, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
- { 8701, 0x00008830 }, /* GL_DRAW_BUFFER11 */
- { 8718, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
- { 8739, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
- { 8760, 0x00008831 }, /* GL_DRAW_BUFFER12 */
- { 8777, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
- { 8798, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
- { 8819, 0x00008832 }, /* GL_DRAW_BUFFER13 */
- { 8836, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
- { 8857, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
- { 8878, 0x00008833 }, /* GL_DRAW_BUFFER14 */
- { 8895, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
- { 8916, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
- { 8937, 0x00008834 }, /* GL_DRAW_BUFFER15 */
- { 8954, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
- { 8975, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
- { 8996, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
- { 9016, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
- { 9036, 0x00008827 }, /* GL_DRAW_BUFFER2 */
- { 9052, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
- { 9072, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
- { 9092, 0x00008828 }, /* GL_DRAW_BUFFER3 */
- { 9108, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
- { 9128, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
- { 9148, 0x00008829 }, /* GL_DRAW_BUFFER4 */
- { 9164, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
- { 9184, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
- { 9204, 0x0000882A }, /* GL_DRAW_BUFFER5 */
- { 9220, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
- { 9240, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
- { 9260, 0x0000882B }, /* GL_DRAW_BUFFER6 */
- { 9276, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
- { 9296, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
- { 9316, 0x0000882C }, /* GL_DRAW_BUFFER7 */
- { 9332, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
- { 9352, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
- { 9372, 0x0000882D }, /* GL_DRAW_BUFFER8 */
- { 9388, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
- { 9408, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
- { 9428, 0x0000882E }, /* GL_DRAW_BUFFER9 */
- { 9444, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
- { 9464, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
- { 9484, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
- { 9504, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
- { 9532, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- { 9564, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
- { 9588, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
- { 9608, 0x00000304 }, /* GL_DST_ALPHA */
- { 9621, 0x00000306 }, /* GL_DST_COLOR */
- { 9634, 0x0000877A }, /* GL_DU8DV8_ATI */
- { 9648, 0x00008779 }, /* GL_DUDV_ATI */
- { 9660, 0x000088EA }, /* GL_DYNAMIC_COPY */
- { 9676, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
- { 9696, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
- { 9712, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
- { 9732, 0x000088E9 }, /* GL_DYNAMIC_READ */
- { 9748, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
- { 9768, 0x00000B43 }, /* GL_EDGE_FLAG */
- { 9781, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
- { 9800, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- { 9834, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
- { 9872, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
- { 9899, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- { 9925, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
- { 9949, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- { 9981, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
- { 10017, 0x00001600 }, /* GL_EMISSION */
- { 10029, 0x00002000 }, /* GL_ENABLE_BIT */
- { 10043, 0x00000202 }, /* GL_EQUAL */
- { 10052, 0x00001509 }, /* GL_EQUIV */
- { 10061, 0x00010000 }, /* GL_EVAL_BIT */
- { 10073, 0x00000800 }, /* GL_EXP */
- { 10080, 0x00000801 }, /* GL_EXP2 */
- { 10088, 0x00001F03 }, /* GL_EXTENSIONS */
- { 10102, 0x00002400 }, /* GL_EYE_LINEAR */
- { 10116, 0x00002502 }, /* GL_EYE_PLANE */
- { 10129, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
- { 10154, 0x0000855B }, /* GL_EYE_RADIAL_NV */
- { 10171, 0x00000000 }, /* GL_FALSE */
- { 10180, 0x00001101 }, /* GL_FASTEST */
- { 10191, 0x00001C01 }, /* GL_FEEDBACK */
- { 10203, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
- { 10230, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
- { 10254, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
- { 10278, 0x00001B02 }, /* GL_FILL */
- { 10286, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
- { 10313, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
- { 10344, 0x0000140C }, /* GL_FIXED */
- { 10353, 0x0000140C }, /* GL_FIXED_OES */
- { 10366, 0x00001D00 }, /* GL_FLAT */
- { 10374, 0x00001406 }, /* GL_FLOAT */
- { 10383, 0x00008B5A }, /* GL_FLOAT_MAT2 */
- { 10397, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
- { 10415, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
- { 10431, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
- { 10447, 0x00008B5B }, /* GL_FLOAT_MAT3 */
- { 10461, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
- { 10479, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
- { 10495, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
- { 10511, 0x00008B5C }, /* GL_FLOAT_MAT4 */
- { 10525, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
- { 10543, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
- { 10559, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
- { 10575, 0x00008B50 }, /* GL_FLOAT_VEC2 */
- { 10589, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
- { 10607, 0x00008B51 }, /* GL_FLOAT_VEC3 */
- { 10621, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
- { 10639, 0x00008B52 }, /* GL_FLOAT_VEC4 */
- { 10653, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
- { 10671, 0x00000B60 }, /* GL_FOG */
- { 10678, 0x00000080 }, /* GL_FOG_BIT */
- { 10689, 0x00000B66 }, /* GL_FOG_COLOR */
- { 10702, 0x00008451 }, /* GL_FOG_COORD */
- { 10715, 0x00008451 }, /* GL_FOG_COORDINATE */
- { 10733, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
- { 10757, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- { 10796, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
- { 10839, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- { 10871, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- { 10902, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- { 10931, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
- { 10956, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
- { 10975, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
- { 11009, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
- { 11036, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
- { 11062, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
- { 11086, 0x00008450 }, /* GL_FOG_COORD_SRC */
- { 11103, 0x00000B62 }, /* GL_FOG_DENSITY */
- { 11118, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
- { 11142, 0x00000B64 }, /* GL_FOG_END */
- { 11153, 0x00000C54 }, /* GL_FOG_HINT */
- { 11165, 0x00000B61 }, /* GL_FOG_INDEX */
- { 11178, 0x00000B65 }, /* GL_FOG_MODE */
- { 11190, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
- { 11209, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
- { 11234, 0x00000B63 }, /* GL_FOG_START */
- { 11247, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
- { 11265, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
- { 11289, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
- { 11308, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
- { 11331, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- { 11366, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES */
- { 11405, 0x00008D40 }, /* GL_FRAMEBUFFER */
- { 11420, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- { 11457, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- { 11493, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- { 11534, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- { 11575, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- { 11612, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- { 11649, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
- { 11687, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- { 11725, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
- { 11767, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES */
- { 11809, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- { 11847, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
- { 11889, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES */
- { 11931, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- { 11966, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- { 12005, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
- { 12054, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES */
- { 12103, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- { 12151, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
- { 12203, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES */
- { 12255, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- { 12295, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
- { 12339, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- { 12379, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
- { 12423, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES */
- { 12467, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
- { 12490, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
- { 12517, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_OES */
- { 12544, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
- { 12568, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
- { 12596, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_OES */
- { 12624, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
- { 12647, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
- { 12666, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- { 12703, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
- { 12744, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES */
- { 12785, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS */
- { 12822, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- { 12863, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES */
- { 12904, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
- { 12942, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- { 12984, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES */
- { 13026, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- { 13077, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- { 13115, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES */
- { 13153, 0x00008DA9 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
- { 13195, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
- { 13239, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- { 13284, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
- { 13333, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES */
- { 13382, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- { 13420, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
- { 13462, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
- { 13500, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- { 13542, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES */
- { 13584, 0x00008D40 }, /* GL_FRAMEBUFFER_OES */
- { 13603, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- { 13635, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
- { 13660, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
- { 13687, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
- { 13718, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_OES */
- { 13749, 0x00000404 }, /* GL_FRONT */
- { 13758, 0x00000408 }, /* GL_FRONT_AND_BACK */
- { 13776, 0x00000B46 }, /* GL_FRONT_FACE */
- { 13790, 0x00000400 }, /* GL_FRONT_LEFT */
- { 13804, 0x00000401 }, /* GL_FRONT_RIGHT */
- { 13819, 0x00008006 }, /* GL_FUNC_ADD */
- { 13831, 0x00008006 }, /* GL_FUNC_ADD_EXT */
- { 13847, 0x00008006 }, /* GL_FUNC_ADD_OES */
- { 13863, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
- { 13888, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
- { 13917, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_OES */
- { 13946, 0x0000800A }, /* GL_FUNC_SUBTRACT */
- { 13963, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
- { 13984, 0x0000800A }, /* GL_FUNC_SUBTRACT_OES */
- { 14005, 0x00008191 }, /* GL_GENERATE_MIPMAP */
- { 14024, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
- { 14048, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
- { 14077, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
- { 14101, 0x00008DDB }, /* GL_GEOMETRY_INPUT_TYPE_ARB */
- { 14128, 0x00008DDC }, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
- { 14156, 0x00008DD9 }, /* GL_GEOMETRY_SHADER_ARB */
- { 14179, 0x00008DDA }, /* GL_GEOMETRY_VERTICES_OUT_ARB */
- { 14208, 0x00000206 }, /* GL_GEQUAL */
- { 14218, 0x00000204 }, /* GL_GREATER */
- { 14229, 0x00001904 }, /* GL_GREEN */
- { 14238, 0x00000D19 }, /* GL_GREEN_BIAS */
- { 14252, 0x00000D53 }, /* GL_GREEN_BITS */
- { 14266, 0x00000D18 }, /* GL_GREEN_SCALE */
- { 14281, 0x0000140B }, /* GL_HALF_FLOAT */
- { 14295, 0x00008D61 }, /* GL_HALF_FLOAT_OES */
- { 14313, 0x00008DF2 }, /* GL_HIGH_FLOAT */
- { 14327, 0x00008DF5 }, /* GL_HIGH_INT */
- { 14339, 0x00008000 }, /* GL_HINT_BIT */
- { 14351, 0x00008024 }, /* GL_HISTOGRAM */
- { 14364, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
- { 14388, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
- { 14416, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
- { 14439, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
- { 14466, 0x00008024 }, /* GL_HISTOGRAM_EXT */
- { 14483, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
- { 14503, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
- { 14527, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
- { 14551, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
- { 14579, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- { 14607, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
- { 14639, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
- { 14661, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
- { 14687, 0x0000802D }, /* GL_HISTOGRAM_SINK */
- { 14705, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
- { 14727, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
- { 14746, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
- { 14769, 0x0000862A }, /* GL_IDENTITY_NV */
- { 14784, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
- { 14804, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */
- { 14840, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- { 14880, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */
- { 14914, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- { 14952, 0x00001E02 }, /* GL_INCR */
- { 14960, 0x00008507 }, /* GL_INCR_WRAP */
- { 14973, 0x00008507 }, /* GL_INCR_WRAP_EXT */
- { 14990, 0x00008222 }, /* GL_INDEX */
- { 14999, 0x00008077 }, /* GL_INDEX_ARRAY */
- { 15014, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- { 15044, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
- { 15078, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
- { 15101, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
- { 15123, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
- { 15143, 0x00000D51 }, /* GL_INDEX_BITS */
- { 15157, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
- { 15178, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
- { 15196, 0x00000C30 }, /* GL_INDEX_MODE */
- { 15210, 0x00000D13 }, /* GL_INDEX_OFFSET */
- { 15226, 0x00000D12 }, /* GL_INDEX_SHIFT */
- { 15241, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
- { 15260, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
- { 15279, 0x00001404 }, /* GL_INT */
- { 15286, 0x00008049 }, /* GL_INTENSITY */
- { 15299, 0x0000804C }, /* GL_INTENSITY12 */
- { 15314, 0x0000804C }, /* GL_INTENSITY12_EXT */
- { 15333, 0x0000804D }, /* GL_INTENSITY16 */
- { 15348, 0x0000804D }, /* GL_INTENSITY16_EXT */
- { 15367, 0x0000804A }, /* GL_INTENSITY4 */
- { 15381, 0x0000804A }, /* GL_INTENSITY4_EXT */
- { 15399, 0x0000804B }, /* GL_INTENSITY8 */
- { 15413, 0x0000804B }, /* GL_INTENSITY8_EXT */
- { 15431, 0x00008049 }, /* GL_INTENSITY_EXT */
- { 15448, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS_EXT */
- { 15475, 0x00008575 }, /* GL_INTERPOLATE */
- { 15490, 0x00008575 }, /* GL_INTERPOLATE_ARB */
- { 15509, 0x00008575 }, /* GL_INTERPOLATE_EXT */
- { 15528, 0x00008DF7 }, /* GL_INT_10_10_10_2_OES */
- { 15550, 0x00008B53 }, /* GL_INT_VEC2 */
- { 15562, 0x00008B53 }, /* GL_INT_VEC2_ARB */
- { 15578, 0x00008B54 }, /* GL_INT_VEC3 */
- { 15590, 0x00008B54 }, /* GL_INT_VEC3_ARB */
- { 15606, 0x00008B55 }, /* GL_INT_VEC4 */
- { 15618, 0x00008B55 }, /* GL_INT_VEC4_ARB */
- { 15634, 0x00000500 }, /* GL_INVALID_ENUM */
- { 15650, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
- { 15683, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
- { 15720, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_OES */
- { 15757, 0x00000502 }, /* GL_INVALID_OPERATION */
- { 15778, 0x00000501 }, /* GL_INVALID_VALUE */
- { 15795, 0x0000862B }, /* GL_INVERSE_NV */
- { 15809, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
- { 15833, 0x0000150A }, /* GL_INVERT */
- { 15843, 0x00001E00 }, /* GL_KEEP */
- { 15851, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
- { 15877, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
- { 15907, 0x00000406 }, /* GL_LEFT */
- { 15915, 0x00000203 }, /* GL_LEQUAL */
- { 15925, 0x00000201 }, /* GL_LESS */
- { 15933, 0x00004000 }, /* GL_LIGHT0 */
- { 15943, 0x00004001 }, /* GL_LIGHT1 */
- { 15953, 0x00004002 }, /* GL_LIGHT2 */
- { 15963, 0x00004003 }, /* GL_LIGHT3 */
- { 15973, 0x00004004 }, /* GL_LIGHT4 */
- { 15983, 0x00004005 }, /* GL_LIGHT5 */
- { 15993, 0x00004006 }, /* GL_LIGHT6 */
- { 16003, 0x00004007 }, /* GL_LIGHT7 */
- { 16013, 0x00000B50 }, /* GL_LIGHTING */
- { 16025, 0x00000040 }, /* GL_LIGHTING_BIT */
- { 16041, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
- { 16064, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- { 16093, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
- { 16126, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- { 16154, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
- { 16178, 0x00001B01 }, /* GL_LINE */
- { 16186, 0x00002601 }, /* GL_LINEAR */
- { 16196, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
- { 16218, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- { 16248, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- { 16279, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
- { 16303, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
- { 16328, 0x00000001 }, /* GL_LINES */
- { 16337, 0x0000000A }, /* GL_LINES_ADJACENCY_ARB */
- { 16360, 0x00000004 }, /* GL_LINE_BIT */
- { 16372, 0x00000002 }, /* GL_LINE_LOOP */
- { 16385, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
- { 16405, 0x00000B20 }, /* GL_LINE_SMOOTH */
- { 16420, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
- { 16440, 0x00000B24 }, /* GL_LINE_STIPPLE */
- { 16456, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
- { 16480, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
- { 16503, 0x00000003 }, /* GL_LINE_STRIP */
- { 16517, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY_ARB */
- { 16545, 0x00000702 }, /* GL_LINE_TOKEN */
- { 16559, 0x00000B21 }, /* GL_LINE_WIDTH */
- { 16573, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
- { 16599, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
- { 16619, 0x00008B82 }, /* GL_LINK_STATUS */
- { 16634, 0x00000B32 }, /* GL_LIST_BASE */
- { 16647, 0x00020000 }, /* GL_LIST_BIT */
- { 16659, 0x00000B33 }, /* GL_LIST_INDEX */
- { 16673, 0x00000B30 }, /* GL_LIST_MODE */
- { 16686, 0x00000101 }, /* GL_LOAD */
- { 16694, 0x00000BF1 }, /* GL_LOGIC_OP */
- { 16706, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
- { 16723, 0x00008CA1 }, /* GL_LOWER_LEFT */
- { 16737, 0x00008DF0 }, /* GL_LOW_FLOAT */
- { 16750, 0x00008DF3 }, /* GL_LOW_INT */
- { 16761, 0x00001909 }, /* GL_LUMINANCE */
- { 16774, 0x00008041 }, /* GL_LUMINANCE12 */
- { 16789, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
- { 16812, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
- { 16839, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
- { 16861, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
- { 16887, 0x00008041 }, /* GL_LUMINANCE12_EXT */
- { 16906, 0x00008042 }, /* GL_LUMINANCE16 */
- { 16921, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
- { 16944, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
- { 16971, 0x00008042 }, /* GL_LUMINANCE16_EXT */
- { 16990, 0x0000803F }, /* GL_LUMINANCE4 */
- { 17004, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
- { 17025, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
- { 17050, 0x0000803F }, /* GL_LUMINANCE4_EXT */
- { 17068, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
- { 17089, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
- { 17114, 0x00008040 }, /* GL_LUMINANCE8 */
- { 17128, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
- { 17149, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
- { 17174, 0x00008040 }, /* GL_LUMINANCE8_EXT */
- { 17192, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
- { 17211, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
- { 17227, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
- { 17247, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
- { 17269, 0x00000D91 }, /* GL_MAP1_INDEX */
- { 17283, 0x00000D92 }, /* GL_MAP1_NORMAL */
- { 17298, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
- { 17322, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
- { 17346, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
- { 17370, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
- { 17394, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
- { 17411, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
- { 17428, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- { 17456, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- { 17485, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- { 17514, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- { 17543, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- { 17572, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- { 17601, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- { 17630, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- { 17658, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- { 17686, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- { 17714, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- { 17742, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- { 17770, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- { 17798, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- { 17826, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- { 17854, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- { 17882, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
- { 17898, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
- { 17918, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
- { 17940, 0x00000DB1 }, /* GL_MAP2_INDEX */
- { 17954, 0x00000DB2 }, /* GL_MAP2_NORMAL */
- { 17969, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
- { 17993, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
- { 18017, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
- { 18041, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
- { 18065, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
- { 18082, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
- { 18099, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- { 18127, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- { 18156, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- { 18185, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- { 18214, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- { 18243, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- { 18272, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- { 18301, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- { 18329, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- { 18357, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- { 18385, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- { 18413, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- { 18441, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- { 18469, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
- { 18497, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- { 18525, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- { 18553, 0x00000D10 }, /* GL_MAP_COLOR */
- { 18566, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
- { 18592, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
- { 18621, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
- { 18649, 0x00000001 }, /* GL_MAP_READ_BIT */
- { 18665, 0x00000D11 }, /* GL_MAP_STENCIL */
- { 18680, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
- { 18706, 0x00000002 }, /* GL_MAP_WRITE_BIT */
- { 18723, 0x000088C0 }, /* GL_MATRIX0_ARB */
- { 18738, 0x00008630 }, /* GL_MATRIX0_NV */
- { 18752, 0x000088CA }, /* GL_MATRIX10_ARB */
- { 18768, 0x000088CB }, /* GL_MATRIX11_ARB */
- { 18784, 0x000088CC }, /* GL_MATRIX12_ARB */
- { 18800, 0x000088CD }, /* GL_MATRIX13_ARB */
- { 18816, 0x000088CE }, /* GL_MATRIX14_ARB */
- { 18832, 0x000088CF }, /* GL_MATRIX15_ARB */
- { 18848, 0x000088D0 }, /* GL_MATRIX16_ARB */
- { 18864, 0x000088D1 }, /* GL_MATRIX17_ARB */
- { 18880, 0x000088D2 }, /* GL_MATRIX18_ARB */
- { 18896, 0x000088D3 }, /* GL_MATRIX19_ARB */
- { 18912, 0x000088C1 }, /* GL_MATRIX1_ARB */
- { 18927, 0x00008631 }, /* GL_MATRIX1_NV */
- { 18941, 0x000088D4 }, /* GL_MATRIX20_ARB */
- { 18957, 0x000088D5 }, /* GL_MATRIX21_ARB */
- { 18973, 0x000088D6 }, /* GL_MATRIX22_ARB */
- { 18989, 0x000088D7 }, /* GL_MATRIX23_ARB */
- { 19005, 0x000088D8 }, /* GL_MATRIX24_ARB */
- { 19021, 0x000088D9 }, /* GL_MATRIX25_ARB */
- { 19037, 0x000088DA }, /* GL_MATRIX26_ARB */
- { 19053, 0x000088DB }, /* GL_MATRIX27_ARB */
- { 19069, 0x000088DC }, /* GL_MATRIX28_ARB */
- { 19085, 0x000088DD }, /* GL_MATRIX29_ARB */
- { 19101, 0x000088C2 }, /* GL_MATRIX2_ARB */
- { 19116, 0x00008632 }, /* GL_MATRIX2_NV */
- { 19130, 0x000088DE }, /* GL_MATRIX30_ARB */
- { 19146, 0x000088DF }, /* GL_MATRIX31_ARB */
- { 19162, 0x000088C3 }, /* GL_MATRIX3_ARB */
- { 19177, 0x00008633 }, /* GL_MATRIX3_NV */
- { 19191, 0x000088C4 }, /* GL_MATRIX4_ARB */
- { 19206, 0x00008634 }, /* GL_MATRIX4_NV */
- { 19220, 0x000088C5 }, /* GL_MATRIX5_ARB */
- { 19235, 0x00008635 }, /* GL_MATRIX5_NV */
- { 19249, 0x000088C6 }, /* GL_MATRIX6_ARB */
- { 19264, 0x00008636 }, /* GL_MATRIX6_NV */
- { 19278, 0x000088C7 }, /* GL_MATRIX7_ARB */
- { 19293, 0x00008637 }, /* GL_MATRIX7_NV */
- { 19307, 0x000088C8 }, /* GL_MATRIX8_ARB */
- { 19322, 0x000088C9 }, /* GL_MATRIX9_ARB */
- { 19337, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
- { 19363, 0x00008B9E }, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
- { 19404, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_OES */
- { 19430, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- { 19464, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_OES */
- { 19498, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- { 19529, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_OES */
- { 19560, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- { 19593, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_OES */
- { 19626, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- { 19657, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_OES */
- { 19688, 0x00000BA0 }, /* GL_MATRIX_MODE */
- { 19703, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
- { 19725, 0x00008840 }, /* GL_MATRIX_PALETTE_OES */
- { 19747, 0x00008008 }, /* GL_MAX */
- { 19754, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
- { 19777, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE_OES */
- { 19804, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- { 19836, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
- { 19862, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- { 19895, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- { 19921, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 19955, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
- { 19974, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
- { 19999, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
- { 20028, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- { 20060, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 20096, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- { 20132, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
- { 20172, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
- { 20198, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
- { 20228, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
- { 20253, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
- { 20282, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- { 20311, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
- { 20344, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES */
- { 20377, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
- { 20397, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
- { 20421, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
- { 20445, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
- { 20469, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
- { 20494, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
- { 20512, 0x00008008 }, /* GL_MAX_EXT */
- { 20523, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- { 20558, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
- { 20597, 0x00008DFD }, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
- { 20629, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
- { 20665, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
- { 20705, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
- { 20749, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
- { 20788, 0x00008DDD }, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
- { 20827, 0x00000D31 }, /* GL_MAX_LIGHTS */
- { 20841, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
- { 20861, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- { 20899, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- { 20928, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
- { 20952, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
- { 20980, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_OES */
- { 21008, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
- { 21031, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 21068, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 21104, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- { 21131, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- { 21160, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- { 21194, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
- { 21230, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- { 21257, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- { 21289, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- { 21325, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- { 21354, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- { 21383, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
- { 21411, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- { 21449, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 21493, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 21536, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 21570, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 21609, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 21646, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 21684, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 21727, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 21770, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- { 21800, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- { 21831, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 21867, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 21903, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
- { 21933, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- { 21967, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
- { 22000, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
- { 22025, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
- { 22054, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_OES */
- { 22083, 0x00008D57 }, /* GL_MAX_SAMPLES */
- { 22098, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
- { 22117, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- { 22144, 0x00008504 }, /* GL_MAX_SHININESS_NV */
- { 22164, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
- { 22188, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
- { 22210, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
- { 22236, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- { 22263, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
- { 22294, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
- { 22318, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS_EXT */
- { 22346, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- { 22380, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
- { 22400, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
- { 22427, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
- { 22448, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
- { 22473, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
- { 22498, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
- { 22533, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
- { 22586, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
- { 22633, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
- { 22683, 0x00008B4B }, /* GL_MAX_VARYING_COMPONENTS */
- { 22709, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
- { 22731, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
- { 22757, 0x00008DFC }, /* GL_MAX_VARYING_VECTORS */
- { 22780, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
- { 22802, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- { 22828, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- { 22862, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
- { 22900, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- { 22933, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
- { 22970, 0x00008DFB }, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
- { 23000, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
- { 23024, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_OES */
- { 23048, 0x00008DDE }, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
- { 23085, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
- { 23106, 0x00008DF1 }, /* GL_MEDIUM_FLOAT */
- { 23122, 0x00008DF4 }, /* GL_MEDIUM_INT */
- { 23136, 0x00008007 }, /* GL_MIN */
- { 23143, 0x0000802E }, /* GL_MINMAX */
- { 23153, 0x0000802E }, /* GL_MINMAX_EXT */
- { 23167, 0x0000802F }, /* GL_MINMAX_FORMAT */
- { 23184, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
- { 23205, 0x00008030 }, /* GL_MINMAX_SINK */
- { 23220, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
- { 23239, 0x00008007 }, /* GL_MIN_EXT */
- { 23250, 0x00008370 }, /* GL_MIRRORED_REPEAT */
- { 23269, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
- { 23292, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
- { 23315, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
- { 23335, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
- { 23355, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- { 23385, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
- { 23413, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- { 23441, 0x00001700 }, /* GL_MODELVIEW */
- { 23454, 0x00001700 }, /* GL_MODELVIEW0_ARB */
- { 23472, 0x0000872A }, /* GL_MODELVIEW10_ARB */
- { 23491, 0x0000872B }, /* GL_MODELVIEW11_ARB */
- { 23510, 0x0000872C }, /* GL_MODELVIEW12_ARB */
- { 23529, 0x0000872D }, /* GL_MODELVIEW13_ARB */
- { 23548, 0x0000872E }, /* GL_MODELVIEW14_ARB */
- { 23567, 0x0000872F }, /* GL_MODELVIEW15_ARB */
- { 23586, 0x00008730 }, /* GL_MODELVIEW16_ARB */
- { 23605, 0x00008731 }, /* GL_MODELVIEW17_ARB */
- { 23624, 0x00008732 }, /* GL_MODELVIEW18_ARB */
- { 23643, 0x00008733 }, /* GL_MODELVIEW19_ARB */
- { 23662, 0x0000850A }, /* GL_MODELVIEW1_ARB */
- { 23680, 0x00008734 }, /* GL_MODELVIEW20_ARB */
- { 23699, 0x00008735 }, /* GL_MODELVIEW21_ARB */
- { 23718, 0x00008736 }, /* GL_MODELVIEW22_ARB */
- { 23737, 0x00008737 }, /* GL_MODELVIEW23_ARB */
- { 23756, 0x00008738 }, /* GL_MODELVIEW24_ARB */
- { 23775, 0x00008739 }, /* GL_MODELVIEW25_ARB */
- { 23794, 0x0000873A }, /* GL_MODELVIEW26_ARB */
- { 23813, 0x0000873B }, /* GL_MODELVIEW27_ARB */
- { 23832, 0x0000873C }, /* GL_MODELVIEW28_ARB */
- { 23851, 0x0000873D }, /* GL_MODELVIEW29_ARB */
- { 23870, 0x00008722 }, /* GL_MODELVIEW2_ARB */
- { 23888, 0x0000873E }, /* GL_MODELVIEW30_ARB */
- { 23907, 0x0000873F }, /* GL_MODELVIEW31_ARB */
- { 23926, 0x00008723 }, /* GL_MODELVIEW3_ARB */
- { 23944, 0x00008724 }, /* GL_MODELVIEW4_ARB */
- { 23962, 0x00008725 }, /* GL_MODELVIEW5_ARB */
- { 23980, 0x00008726 }, /* GL_MODELVIEW6_ARB */
- { 23998, 0x00008727 }, /* GL_MODELVIEW7_ARB */
- { 24016, 0x00008728 }, /* GL_MODELVIEW8_ARB */
- { 24034, 0x00008729 }, /* GL_MODELVIEW9_ARB */
- { 24052, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
- { 24072, 0x0000898D }, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
- { 24114, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
- { 24141, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
- { 24166, 0x00002100 }, /* GL_MODULATE */
- { 24178, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
- { 24198, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
- { 24225, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
- { 24250, 0x00000103 }, /* GL_MULT */
- { 24258, 0x0000809D }, /* GL_MULTISAMPLE */
- { 24273, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
- { 24293, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
- { 24312, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
- { 24331, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
- { 24355, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
- { 24378, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- { 24408, 0x00002A25 }, /* GL_N3F_V3F */
- { 24419, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
- { 24439, 0x0000150E }, /* GL_NAND */
- { 24447, 0x00002600 }, /* GL_NEAREST */
- { 24458, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- { 24489, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- { 24521, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
- { 24546, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
- { 24572, 0x00000200 }, /* GL_NEVER */
- { 24581, 0x00001102 }, /* GL_NICEST */
- { 24591, 0x00000000 }, /* GL_NONE */
- { 24599, 0x00000000 }, /* GL_NONE_OES */
- { 24611, 0x00001505 }, /* GL_NOOP */
- { 24619, 0x00001508 }, /* GL_NOR */
- { 24626, 0x00000BA1 }, /* GL_NORMALIZE */
- { 24639, 0x00008075 }, /* GL_NORMAL_ARRAY */
- { 24655, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- { 24686, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
- { 24721, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
- { 24745, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
- { 24768, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
- { 24789, 0x00008511 }, /* GL_NORMAL_MAP */
- { 24803, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
- { 24821, 0x00008511 }, /* GL_NORMAL_MAP_NV */
- { 24838, 0x00008511 }, /* GL_NORMAL_MAP_OES */
- { 24856, 0x00000205 }, /* GL_NOTEQUAL */
- { 24868, 0x00000000 }, /* GL_NO_ERROR */
- { 24880, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- { 24914, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
- { 24952, 0x000087FE }, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
- { 24986, 0x00008DF9 }, /* GL_NUM_SHADER_BINARY_FORMATS */
- { 25015, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
- { 25047, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
- { 25089, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
- { 25119, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
- { 25159, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
- { 25190, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
- { 25219, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
- { 25247, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
- { 25277, 0x00002401 }, /* GL_OBJECT_LINEAR */
- { 25294, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
- { 25320, 0x00002501 }, /* GL_OBJECT_PLANE */
- { 25336, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
- { 25371, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
- { 25393, 0x00009112 }, /* GL_OBJECT_TYPE */
- { 25408, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
- { 25427, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
- { 25457, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
- { 25478, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
- { 25506, 0x00000001 }, /* GL_ONE */
- { 25513, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- { 25541, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
- { 25573, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
- { 25601, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
- { 25633, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
- { 25656, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
- { 25679, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
- { 25702, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
- { 25725, 0x00008598 }, /* GL_OPERAND0_ALPHA */
- { 25743, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
- { 25765, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
- { 25787, 0x00008590 }, /* GL_OPERAND0_RGB */
- { 25803, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
- { 25823, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
- { 25843, 0x00008599 }, /* GL_OPERAND1_ALPHA */
- { 25861, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
- { 25883, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
- { 25905, 0x00008591 }, /* GL_OPERAND1_RGB */
- { 25921, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
- { 25941, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
- { 25961, 0x0000859A }, /* GL_OPERAND2_ALPHA */
- { 25979, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
- { 26001, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
- { 26023, 0x00008592 }, /* GL_OPERAND2_RGB */
- { 26039, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
- { 26059, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
- { 26079, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
- { 26100, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
- { 26119, 0x00001507 }, /* GL_OR */
- { 26125, 0x00000A01 }, /* GL_ORDER */
- { 26134, 0x0000150D }, /* GL_OR_INVERTED */
- { 26149, 0x0000150B }, /* GL_OR_REVERSE */
- { 26163, 0x00000505 }, /* GL_OUT_OF_MEMORY */
- { 26180, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
- { 26198, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
- { 26219, 0x00008758 }, /* GL_PACK_INVERT_MESA */
- { 26239, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
- { 26257, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
- { 26276, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
- { 26296, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
- { 26316, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
- { 26334, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
- { 26353, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
- { 26378, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
- { 26402, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
- { 26423, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
- { 26445, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
- { 26467, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
- { 26492, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
- { 26516, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
- { 26537, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
- { 26559, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
- { 26581, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
- { 26603, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
- { 26634, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
- { 26654, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- { 26679, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
- { 26699, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- { 26724, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
- { 26744, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- { 26769, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
- { 26789, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- { 26814, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
- { 26834, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- { 26859, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
- { 26879, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- { 26904, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
- { 26924, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- { 26949, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
- { 26969, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- { 26994, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
- { 27014, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- { 27039, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
- { 27059, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- { 27084, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
- { 27102, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
- { 27123, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
- { 27152, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
- { 27185, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
- { 27210, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
- { 27233, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- { 27264, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
- { 27299, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
- { 27326, 0x00001B00 }, /* GL_POINT */
- { 27335, 0x00000000 }, /* GL_POINTS */
- { 27345, 0x00000002 }, /* GL_POINT_BIT */
- { 27358, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
- { 27388, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
- { 27422, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
- { 27456, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
- { 27491, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
- { 27520, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
- { 27553, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
- { 27586, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
- { 27620, 0x00000B11 }, /* GL_POINT_SIZE */
- { 27634, 0x00008B9F }, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
- { 27673, 0x00008B9C }, /* GL_POINT_SIZE_ARRAY_OES */
- { 27697, 0x0000898C }, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
- { 27729, 0x0000898B }, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
- { 27760, 0x0000898A }, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
- { 27789, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
- { 27815, 0x00008127 }, /* GL_POINT_SIZE_MAX */
- { 27833, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
- { 27855, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
- { 27877, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
- { 27900, 0x00008126 }, /* GL_POINT_SIZE_MIN */
- { 27918, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
- { 27940, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
- { 27962, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
- { 27985, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
- { 28005, 0x00000B10 }, /* GL_POINT_SMOOTH */
- { 28021, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
- { 28042, 0x00008861 }, /* GL_POINT_SPRITE */
- { 28058, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
- { 28078, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
- { 28107, 0x00008861 }, /* GL_POINT_SPRITE_NV */
- { 28126, 0x00008861 }, /* GL_POINT_SPRITE_OES */
- { 28146, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
- { 28172, 0x00000701 }, /* GL_POINT_TOKEN */
- { 28187, 0x00000009 }, /* GL_POLYGON */
- { 28198, 0x00000008 }, /* GL_POLYGON_BIT */
- { 28213, 0x00000B40 }, /* GL_POLYGON_MODE */
- { 28229, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
- { 28252, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
- { 28277, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
- { 28300, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
- { 28323, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
- { 28347, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
- { 28371, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
- { 28389, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
- { 28412, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
- { 28431, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
- { 28454, 0x00000703 }, /* GL_POLYGON_TOKEN */
- { 28471, 0x00001203 }, /* GL_POSITION */
- { 28483, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- { 28515, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
- { 28551, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- { 28584, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
- { 28621, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- { 28652, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
- { 28687, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- { 28719, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
- { 28755, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- { 28788, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- { 28820, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
- { 28856, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- { 28889, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
- { 28926, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- { 28956, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
- { 28990, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- { 29021, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
- { 29056, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- { 29087, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
- { 29122, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- { 29154, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
- { 29190, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- { 29220, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
- { 29254, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- { 29285, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
- { 29320, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- { 29352, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- { 29383, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
- { 29418, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- { 29450, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
- { 29486, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
- { 29515, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
- { 29548, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
- { 29578, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
- { 29612, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- { 29651, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- { 29684, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- { 29724, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- { 29758, 0x00008578 }, /* GL_PREVIOUS */
- { 29770, 0x00008578 }, /* GL_PREVIOUS_ARB */
- { 29786, 0x00008578 }, /* GL_PREVIOUS_EXT */
- { 29802, 0x00008577 }, /* GL_PRIMARY_COLOR */
- { 29819, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
- { 29840, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
- { 29861, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED_EXT */
- { 29889, 0x00008559 }, /* GL_PRIMITIVE_RESTART_INDEX_NV */
- { 29919, 0x00008558 }, /* GL_PRIMITIVE_RESTART_NV */
- { 29943, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 29976, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 30008, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
- { 30031, 0x000087FF }, /* GL_PROGRAM_BINARY_FORMATS_OES */
- { 30061, 0x00008741 }, /* GL_PROGRAM_BINARY_LENGTH_OES */
- { 30090, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
- { 30113, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
- { 30143, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
- { 30172, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
- { 30200, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
- { 30222, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- { 30250, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- { 30278, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
- { 30300, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
- { 30321, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 30361, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 30400, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 30430, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 30465, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 30498, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 30532, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 30571, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 30610, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
- { 30632, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
- { 30658, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
- { 30682, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE_ARB */
- { 30708, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
- { 30731, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
- { 30753, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
- { 30774, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
- { 30795, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
- { 30822, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 30854, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 30886, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- { 30921, 0x00001701 }, /* GL_PROJECTION */
- { 30935, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
- { 30956, 0x0000898E }, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
- { 30999, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
- { 31025, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
- { 31045, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
- { 31069, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
- { 31090, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
- { 31109, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
- { 31132, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- { 31171, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- { 31209, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
- { 31229, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- { 31259, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
- { 31283, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
- { 31303, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- { 31333, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
- { 31357, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
- { 31377, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- { 31410, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
- { 31436, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
- { 31466, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- { 31497, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
- { 31527, 0x00008A1D }, /* GL_PURGEABLE_APPLE */
- { 31546, 0x00002003 }, /* GL_Q */
- { 31551, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
- { 31576, 0x00000007 }, /* GL_QUADS */
- { 31585, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- { 31629, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
- { 31677, 0x00008614 }, /* GL_QUAD_MESH_SUN */
- { 31694, 0x00000008 }, /* GL_QUAD_STRIP */
- { 31708, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
- { 31738, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
- { 31765, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
- { 31787, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
- { 31813, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
- { 31833, 0x00008866 }, /* GL_QUERY_RESULT */
- { 31849, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
- { 31869, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
- { 31895, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
- { 31925, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
- { 31942, 0x00002002 }, /* GL_R */
- { 31947, 0x00002A10 }, /* GL_R3_G3_B2 */
- { 31959, 0x00008C89 }, /* GL_RASTERIZER_DISCARD_EXT */
- { 31985, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- { 32018, 0x00000C02 }, /* GL_READ_BUFFER */
- { 32033, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
- { 32053, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
- { 32081, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- { 32113, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
- { 32137, 0x000088B8 }, /* GL_READ_ONLY */
- { 32150, 0x000088B8 }, /* GL_READ_ONLY_ARB */
- { 32167, 0x000088BA }, /* GL_READ_WRITE */
- { 32181, 0x000088BA }, /* GL_READ_WRITE_ARB */
- { 32199, 0x00001903 }, /* GL_RED */
- { 32206, 0x00008016 }, /* GL_REDUCE */
- { 32216, 0x00008016 }, /* GL_REDUCE_EXT */
- { 32230, 0x00000D15 }, /* GL_RED_BIAS */
- { 32242, 0x00000D52 }, /* GL_RED_BITS */
- { 32254, 0x00000D14 }, /* GL_RED_SCALE */
- { 32267, 0x00008512 }, /* GL_REFLECTION_MAP */
- { 32285, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
- { 32307, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
- { 32328, 0x00008512 }, /* GL_REFLECTION_MAP_OES */
- { 32350, 0x00008A19 }, /* GL_RELEASED_APPLE */
- { 32368, 0x00001C00 }, /* GL_RENDER */
- { 32378, 0x00008D41 }, /* GL_RENDERBUFFER */
- { 32394, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
- { 32421, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE_OES */
- { 32452, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
- { 32476, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
- { 32504, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_OES */
- { 32532, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
- { 32558, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE_OES */
- { 32588, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
- { 32615, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE_OES */
- { 32646, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
- { 32666, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
- { 32693, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE_OES */
- { 32724, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
- { 32747, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
- { 32774, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_OES */
- { 32801, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- { 32833, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
- { 32869, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
- { 32905, 0x00008D41 }, /* GL_RENDERBUFFER_OES */
- { 32925, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
- { 32950, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE_OES */
- { 32979, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
- { 33003, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
- { 33031, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
- { 33060, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE_OES */
- { 33093, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
- { 33115, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
- { 33141, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_OES */
- { 33167, 0x00001F01 }, /* GL_RENDERER */
- { 33179, 0x00000C40 }, /* GL_RENDER_MODE */
- { 33194, 0x00002901 }, /* GL_REPEAT */
- { 33204, 0x00001E01 }, /* GL_REPLACE */
- { 33215, 0x00008062 }, /* GL_REPLACE_EXT */
- { 33230, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
- { 33253, 0x0000803A }, /* GL_RESCALE_NORMAL */
- { 33271, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
- { 33293, 0x00008A1B }, /* GL_RETAINED_APPLE */
- { 33311, 0x00000102 }, /* GL_RETURN */
- { 33321, 0x00001907 }, /* GL_RGB */
- { 33328, 0x00008052 }, /* GL_RGB10 */
- { 33337, 0x00008059 }, /* GL_RGB10_A2 */
- { 33349, 0x00008059 }, /* GL_RGB10_A2_EXT */
- { 33365, 0x00008052 }, /* GL_RGB10_EXT */
- { 33378, 0x00008053 }, /* GL_RGB12 */
- { 33387, 0x00008053 }, /* GL_RGB12_EXT */
- { 33400, 0x00008054 }, /* GL_RGB16 */
- { 33409, 0x00008054 }, /* GL_RGB16_EXT */
- { 33422, 0x0000804E }, /* GL_RGB2_EXT */
- { 33434, 0x0000804F }, /* GL_RGB4 */
- { 33442, 0x0000804F }, /* GL_RGB4_EXT */
- { 33454, 0x000083A1 }, /* GL_RGB4_S3TC */
- { 33467, 0x00008050 }, /* GL_RGB5 */
- { 33475, 0x00008D62 }, /* GL_RGB565 */
- { 33485, 0x00008D62 }, /* GL_RGB565_OES */
- { 33499, 0x00008057 }, /* GL_RGB5_A1 */
- { 33510, 0x00008057 }, /* GL_RGB5_A1_EXT */
- { 33525, 0x00008057 }, /* GL_RGB5_A1_OES */
- { 33540, 0x00008050 }, /* GL_RGB5_EXT */
- { 33552, 0x00008051 }, /* GL_RGB8 */
- { 33560, 0x00008051 }, /* GL_RGB8_EXT */
- { 33572, 0x00008051 }, /* GL_RGB8_OES */
- { 33584, 0x00001908 }, /* GL_RGBA */
- { 33592, 0x0000805A }, /* GL_RGBA12 */
- { 33602, 0x0000805A }, /* GL_RGBA12_EXT */
- { 33616, 0x0000805B }, /* GL_RGBA16 */
- { 33626, 0x0000805B }, /* GL_RGBA16_EXT */
- { 33640, 0x00008055 }, /* GL_RGBA2 */
- { 33649, 0x00008055 }, /* GL_RGBA2_EXT */
- { 33662, 0x00008056 }, /* GL_RGBA4 */
- { 33671, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
- { 33690, 0x00008056 }, /* GL_RGBA4_EXT */
- { 33703, 0x00008056 }, /* GL_RGBA4_OES */
- { 33716, 0x000083A3 }, /* GL_RGBA4_S3TC */
- { 33730, 0x00008058 }, /* GL_RGBA8 */
- { 33739, 0x00008058 }, /* GL_RGBA8_EXT */
- { 33752, 0x00008058 }, /* GL_RGBA8_OES */
- { 33765, 0x00008F97 }, /* GL_RGBA8_SNORM */
- { 33780, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
- { 33798, 0x00000C31 }, /* GL_RGBA_MODE */
- { 33811, 0x000083A2 }, /* GL_RGBA_S3TC */
- { 33824, 0x00008F93 }, /* GL_RGBA_SNORM */
- { 33838, 0x000083A0 }, /* GL_RGB_S3TC */
- { 33850, 0x00008573 }, /* GL_RGB_SCALE */
- { 33863, 0x00008573 }, /* GL_RGB_SCALE_ARB */
- { 33880, 0x00008573 }, /* GL_RGB_SCALE_EXT */
- { 33897, 0x00000407 }, /* GL_RIGHT */
- { 33906, 0x00002000 }, /* GL_S */
- { 33911, 0x00008B5D }, /* GL_SAMPLER_1D */
- { 33925, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
- { 33946, 0x00008B5E }, /* GL_SAMPLER_2D */
- { 33960, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
- { 33981, 0x00008B5F }, /* GL_SAMPLER_3D */
- { 33995, 0x00008B5F }, /* GL_SAMPLER_3D_OES */
- { 34013, 0x00008B60 }, /* GL_SAMPLER_CUBE */
- { 34029, 0x000080A9 }, /* GL_SAMPLES */
- { 34040, 0x000086B4 }, /* GL_SAMPLES_3DFX */
- { 34056, 0x000080A9 }, /* GL_SAMPLES_ARB */
- { 34071, 0x00008914 }, /* GL_SAMPLES_PASSED */
- { 34089, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
- { 34111, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- { 34139, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
- { 34171, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
- { 34194, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
- { 34221, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
- { 34239, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
- { 34262, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
- { 34284, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
- { 34303, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
- { 34326, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
- { 34352, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
- { 34382, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
- { 34407, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
- { 34436, 0x00080000 }, /* GL_SCISSOR_BIT */
- { 34451, 0x00000C10 }, /* GL_SCISSOR_BOX */
- { 34466, 0x00000C11 }, /* GL_SCISSOR_TEST */
- { 34482, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
- { 34507, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- { 34547, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 34591, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- { 34624, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- { 34654, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- { 34686, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- { 34716, 0x00001C02 }, /* GL_SELECT */
- { 34726, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
- { 34754, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
- { 34779, 0x00008012 }, /* GL_SEPARABLE_2D */
- { 34795, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS_EXT */
- { 34819, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
- { 34846, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
- { 34877, 0x0000150F }, /* GL_SET */
- { 34884, 0x00008DF8 }, /* GL_SHADER_BINARY_FORMATS */
- { 34909, 0x00008DFA }, /* GL_SHADER_COMPILER */
- { 34928, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
- { 34949, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
- { 34973, 0x00008B4F }, /* GL_SHADER_TYPE */
- { 34988, 0x00000B54 }, /* GL_SHADE_MODEL */
- { 35003, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
- { 35031, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
- { 35054, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- { 35084, 0x00001601 }, /* GL_SHININESS */
- { 35097, 0x00001402 }, /* GL_SHORT */
- { 35106, 0x00009119 }, /* GL_SIGNALED */
- { 35118, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
- { 35139, 0x000081F9 }, /* GL_SINGLE_COLOR */
- { 35155, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
- { 35175, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
- { 35194, 0x00008C46 }, /* GL_SLUMINANCE */
- { 35208, 0x00008C47 }, /* GL_SLUMINANCE8 */
- { 35223, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
- { 35245, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
- { 35265, 0x00001D01 }, /* GL_SMOOTH */
- { 35275, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
- { 35308, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
- { 35335, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
- { 35368, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
- { 35395, 0x00008588 }, /* GL_SOURCE0_ALPHA */
- { 35412, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
- { 35433, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
- { 35454, 0x00008580 }, /* GL_SOURCE0_RGB */
- { 35469, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
- { 35488, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
- { 35507, 0x00008589 }, /* GL_SOURCE1_ALPHA */
- { 35524, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
- { 35545, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
- { 35566, 0x00008581 }, /* GL_SOURCE1_RGB */
- { 35581, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
- { 35600, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
- { 35619, 0x0000858A }, /* GL_SOURCE2_ALPHA */
- { 35636, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
- { 35657, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
- { 35678, 0x00008582 }, /* GL_SOURCE2_RGB */
- { 35693, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
- { 35712, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
- { 35731, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
- { 35751, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
- { 35769, 0x00001202 }, /* GL_SPECULAR */
- { 35781, 0x00002402 }, /* GL_SPHERE_MAP */
- { 35795, 0x00001206 }, /* GL_SPOT_CUTOFF */
- { 35810, 0x00001204 }, /* GL_SPOT_DIRECTION */
- { 35828, 0x00001205 }, /* GL_SPOT_EXPONENT */
- { 35845, 0x00008588 }, /* GL_SRC0_ALPHA */
- { 35859, 0x00008580 }, /* GL_SRC0_RGB */
- { 35871, 0x00008589 }, /* GL_SRC1_ALPHA */
- { 35885, 0x00008581 }, /* GL_SRC1_RGB */
- { 35897, 0x0000858A }, /* GL_SRC2_ALPHA */
- { 35911, 0x00008582 }, /* GL_SRC2_RGB */
- { 35923, 0x00000302 }, /* GL_SRC_ALPHA */
- { 35936, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
- { 35958, 0x00000300 }, /* GL_SRC_COLOR */
- { 35971, 0x00008C40 }, /* GL_SRGB */
- { 35979, 0x00008C41 }, /* GL_SRGB8 */
- { 35988, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
- { 36004, 0x00008C42 }, /* GL_SRGB_ALPHA */
- { 36018, 0x00000503 }, /* GL_STACK_OVERFLOW */
- { 36036, 0x00000504 }, /* GL_STACK_UNDERFLOW */
- { 36055, 0x000088E6 }, /* GL_STATIC_COPY */
- { 36070, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
- { 36089, 0x000088E4 }, /* GL_STATIC_DRAW */
- { 36104, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
- { 36123, 0x000088E5 }, /* GL_STATIC_READ */
- { 36138, 0x000088E5 }, /* GL_STATIC_READ_ARB */
- { 36157, 0x00001802 }, /* GL_STENCIL */
- { 36168, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
- { 36190, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
- { 36216, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_OES */
- { 36242, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
- { 36263, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
- { 36288, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
- { 36309, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
- { 36334, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- { 36366, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
- { 36402, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- { 36434, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
- { 36470, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
- { 36490, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
- { 36517, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
- { 36543, 0x00000D57 }, /* GL_STENCIL_BITS */
- { 36559, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
- { 36581, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
- { 36604, 0x00000B94 }, /* GL_STENCIL_FAIL */
- { 36620, 0x00000B92 }, /* GL_STENCIL_FUNC */
- { 36636, 0x00001901 }, /* GL_STENCIL_INDEX */
- { 36653, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
- { 36671, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
- { 36690, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
- { 36713, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
- { 36735, 0x00008D46 }, /* GL_STENCIL_INDEX1_OES */
- { 36757, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
- { 36775, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
- { 36797, 0x00008D47 }, /* GL_STENCIL_INDEX4_OES */
- { 36819, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
- { 36837, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
- { 36859, 0x00008D48 }, /* GL_STENCIL_INDEX8_OES */
- { 36881, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
- { 36902, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
- { 36929, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
- { 36956, 0x00000B97 }, /* GL_STENCIL_REF */
- { 36971, 0x00000B90 }, /* GL_STENCIL_TEST */
- { 36987, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- { 37016, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
- { 37038, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
- { 37059, 0x00000C33 }, /* GL_STEREO */
- { 37069, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
- { 37093, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
- { 37118, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
- { 37142, 0x000088E2 }, /* GL_STREAM_COPY */
- { 37157, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
- { 37176, 0x000088E0 }, /* GL_STREAM_DRAW */
- { 37191, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
- { 37210, 0x000088E1 }, /* GL_STREAM_READ */
- { 37225, 0x000088E1 }, /* GL_STREAM_READ_ARB */
- { 37244, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
- { 37261, 0x000084E7 }, /* GL_SUBTRACT */
- { 37273, 0x000084E7 }, /* GL_SUBTRACT_ARB */
- { 37289, 0x00009113 }, /* GL_SYNC_CONDITION */
- { 37307, 0x00009116 }, /* GL_SYNC_FENCE */
- { 37321, 0x00009115 }, /* GL_SYNC_FLAGS */
- { 37335, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
- { 37362, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- { 37392, 0x00009114 }, /* GL_SYNC_STATUS */
- { 37407, 0x00002001 }, /* GL_T */
- { 37412, 0x00002A2A }, /* GL_T2F_C3F_V3F */
- { 37427, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
- { 37446, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
- { 37462, 0x00002A2B }, /* GL_T2F_N3F_V3F */
- { 37477, 0x00002A27 }, /* GL_T2F_V3F */
- { 37488, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
- { 37507, 0x00002A28 }, /* GL_T4F_V4F */
- { 37518, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
- { 37541, 0x00001702 }, /* GL_TEXTURE */
- { 37552, 0x000084C0 }, /* GL_TEXTURE0 */
- { 37564, 0x000084C0 }, /* GL_TEXTURE0_ARB */
- { 37580, 0x000084C1 }, /* GL_TEXTURE1 */
- { 37592, 0x000084CA }, /* GL_TEXTURE10 */
- { 37605, 0x000084CA }, /* GL_TEXTURE10_ARB */
- { 37622, 0x000084CB }, /* GL_TEXTURE11 */
- { 37635, 0x000084CB }, /* GL_TEXTURE11_ARB */
- { 37652, 0x000084CC }, /* GL_TEXTURE12 */
- { 37665, 0x000084CC }, /* GL_TEXTURE12_ARB */
- { 37682, 0x000084CD }, /* GL_TEXTURE13 */
- { 37695, 0x000084CD }, /* GL_TEXTURE13_ARB */
- { 37712, 0x000084CE }, /* GL_TEXTURE14 */
- { 37725, 0x000084CE }, /* GL_TEXTURE14_ARB */
- { 37742, 0x000084CF }, /* GL_TEXTURE15 */
- { 37755, 0x000084CF }, /* GL_TEXTURE15_ARB */
- { 37772, 0x000084D0 }, /* GL_TEXTURE16 */
- { 37785, 0x000084D0 }, /* GL_TEXTURE16_ARB */
- { 37802, 0x000084D1 }, /* GL_TEXTURE17 */
- { 37815, 0x000084D1 }, /* GL_TEXTURE17_ARB */
- { 37832, 0x000084D2 }, /* GL_TEXTURE18 */
- { 37845, 0x000084D2 }, /* GL_TEXTURE18_ARB */
- { 37862, 0x000084D3 }, /* GL_TEXTURE19 */
- { 37875, 0x000084D3 }, /* GL_TEXTURE19_ARB */
- { 37892, 0x000084C1 }, /* GL_TEXTURE1_ARB */
- { 37908, 0x000084C2 }, /* GL_TEXTURE2 */
- { 37920, 0x000084D4 }, /* GL_TEXTURE20 */
- { 37933, 0x000084D4 }, /* GL_TEXTURE20_ARB */
- { 37950, 0x000084D5 }, /* GL_TEXTURE21 */
- { 37963, 0x000084D5 }, /* GL_TEXTURE21_ARB */
- { 37980, 0x000084D6 }, /* GL_TEXTURE22 */
- { 37993, 0x000084D6 }, /* GL_TEXTURE22_ARB */
- { 38010, 0x000084D7 }, /* GL_TEXTURE23 */
- { 38023, 0x000084D7 }, /* GL_TEXTURE23_ARB */
- { 38040, 0x000084D8 }, /* GL_TEXTURE24 */
- { 38053, 0x000084D8 }, /* GL_TEXTURE24_ARB */
- { 38070, 0x000084D9 }, /* GL_TEXTURE25 */
- { 38083, 0x000084D9 }, /* GL_TEXTURE25_ARB */
- { 38100, 0x000084DA }, /* GL_TEXTURE26 */
- { 38113, 0x000084DA }, /* GL_TEXTURE26_ARB */
- { 38130, 0x000084DB }, /* GL_TEXTURE27 */
- { 38143, 0x000084DB }, /* GL_TEXTURE27_ARB */
- { 38160, 0x000084DC }, /* GL_TEXTURE28 */
- { 38173, 0x000084DC }, /* GL_TEXTURE28_ARB */
- { 38190, 0x000084DD }, /* GL_TEXTURE29 */
- { 38203, 0x000084DD }, /* GL_TEXTURE29_ARB */
- { 38220, 0x000084C2 }, /* GL_TEXTURE2_ARB */
- { 38236, 0x000084C3 }, /* GL_TEXTURE3 */
- { 38248, 0x000084DE }, /* GL_TEXTURE30 */
- { 38261, 0x000084DE }, /* GL_TEXTURE30_ARB */
- { 38278, 0x000084DF }, /* GL_TEXTURE31 */
- { 38291, 0x000084DF }, /* GL_TEXTURE31_ARB */
- { 38308, 0x000084C3 }, /* GL_TEXTURE3_ARB */
- { 38324, 0x000084C4 }, /* GL_TEXTURE4 */
- { 38336, 0x000084C4 }, /* GL_TEXTURE4_ARB */
- { 38352, 0x000084C5 }, /* GL_TEXTURE5 */
- { 38364, 0x000084C5 }, /* GL_TEXTURE5_ARB */
- { 38380, 0x000084C6 }, /* GL_TEXTURE6 */
- { 38392, 0x000084C6 }, /* GL_TEXTURE6_ARB */
- { 38408, 0x000084C7 }, /* GL_TEXTURE7 */
- { 38420, 0x000084C7 }, /* GL_TEXTURE7_ARB */
- { 38436, 0x000084C8 }, /* GL_TEXTURE8 */
- { 38448, 0x000084C8 }, /* GL_TEXTURE8_ARB */
- { 38464, 0x000084C9 }, /* GL_TEXTURE9 */
- { 38476, 0x000084C9 }, /* GL_TEXTURE9_ARB */
- { 38492, 0x00000DE0 }, /* GL_TEXTURE_1D */
- { 38506, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
- { 38530, 0x00000DE1 }, /* GL_TEXTURE_2D */
- { 38544, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
- { 38568, 0x0000806F }, /* GL_TEXTURE_3D */
- { 38582, 0x0000806F }, /* GL_TEXTURE_3D_OES */
- { 38600, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
- { 38622, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
- { 38648, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
- { 38670, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
- { 38692, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- { 38724, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
- { 38746, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- { 38778, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
- { 38800, 0x0000806A }, /* GL_TEXTURE_BINDING_3D_OES */
- { 38826, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
- { 38854, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
- { 38886, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_OES */
- { 38918, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- { 38951, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
- { 38983, 0x00040000 }, /* GL_TEXTURE_BIT */
- { 38998, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
- { 39019, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
- { 39044, 0x00001005 }, /* GL_TEXTURE_BORDER */
- { 39062, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
- { 39086, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- { 39117, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- { 39147, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- { 39177, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- { 39212, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- { 39243, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 39281, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
- { 39308, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- { 39340, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- { 39374, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
- { 39398, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
- { 39426, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
- { 39450, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
- { 39478, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- { 39511, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
- { 39535, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
- { 39557, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
- { 39579, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
- { 39605, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
- { 39639, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- { 39672, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
- { 39709, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
- { 39737, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
- { 39769, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
- { 39792, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- { 39830, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
- { 39872, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- { 39903, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- { 39931, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- { 39961, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- { 39989, 0x00008B9D }, /* GL_TEXTURE_CROP_RECT_OES */
- { 40014, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
- { 40034, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
- { 40058, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- { 40089, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
- { 40124, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES */
- { 40159, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- { 40190, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
- { 40225, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES */
- { 40260, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- { 40291, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
- { 40326, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES */
- { 40361, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_OES */
- { 40385, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- { 40416, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
- { 40451, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES */
- { 40486, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- { 40517, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
- { 40552, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES */
- { 40587, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- { 40618, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
- { 40653, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES */
- { 40688, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- { 40717, 0x00008071 }, /* GL_TEXTURE_DEPTH */
- { 40734, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
- { 40756, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
- { 40782, 0x00002300 }, /* GL_TEXTURE_ENV */
- { 40797, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
- { 40818, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
- { 40838, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
- { 40864, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL_EXT */
- { 40894, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
- { 40914, 0x00002500 }, /* GL_TEXTURE_GEN_MODE_OES */
- { 40938, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
- { 40955, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
- { 40972, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
- { 40989, 0x00008D60 }, /* GL_TEXTURE_GEN_STR_OES */
- { 41012, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
- { 41029, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
- { 41054, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
- { 41076, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
- { 41102, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
- { 41120, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
- { 41146, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
- { 41172, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
- { 41202, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
- { 41229, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
- { 41254, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
- { 41274, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
- { 41298, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- { 41325, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- { 41352, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- { 41379, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
- { 41405, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
- { 41435, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
- { 41457, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
- { 41475, 0x0000898F }, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
- { 41515, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- { 41545, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- { 41573, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- { 41601, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- { 41629, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
- { 41650, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
- { 41669, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
- { 41691, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
- { 41710, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
- { 41730, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- { 41760, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- { 41791, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
- { 41816, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
- { 41840, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
- { 41860, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
- { 41884, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
- { 41904, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
- { 41927, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
- { 41951, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
- { 41979, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- { 42009, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
- { 42034, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- { 42068, 0x00001000 }, /* GL_TEXTURE_WIDTH */
- { 42085, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
- { 42103, 0x00008072 }, /* GL_TEXTURE_WRAP_R_OES */
- { 42125, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
- { 42143, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
- { 42161, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
- { 42180, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 42200, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 42219, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 42248, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 42265, 0x00008E22 }, /* GL_TRANSFORM_FEEDBACK */
- { 42287, 0x00008E25 }, /* GL_TRANSFORM_FEEDBACK_BINDING */
- { 42317, 0x00008E24 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
- { 42353, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
- { 42394, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
- { 42427, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
- { 42465, 0x00008E23 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
- { 42501, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
- { 42539, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
- { 42578, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
- { 42623, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
- { 42658, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
- { 42703, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 42729, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 42759, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 42791, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 42821, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 42855, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 42871, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 42902, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 42937, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 42965, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 42997, 0x00000004 }, /* GL_TRIANGLES */
- { 43010, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY_ARB */
- { 43037, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 43053, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 43074, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 43092, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
- { 43124, 0x00000001 }, /* GL_TRUE */
- { 43132, 0x00008A1C }, /* GL_UNDEFINED_APPLE */
- { 43151, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 43171, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 43194, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 43214, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 43235, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 43257, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 43279, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 43299, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 43320, 0x00009118 }, /* GL_UNSIGNALED */
- { 43334, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 43351, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 43378, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 43401, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 43417, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 43444, 0x00008DF6 }, /* GL_UNSIGNED_INT_10_10_10_2_OES */
- { 43475, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
- { 43496, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
- { 43521, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 43545, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_OES */
- { 43570, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 43601, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV_EXT */
- { 43636, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 43660, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 43688, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
- { 43711, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 43729, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 43759, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT */
- { 43793, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 43819, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 43849, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT */
- { 43883, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 43909, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 43933, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 43961, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 43989, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 44016, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 44048, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 44079, 0x00008CA2 }, /* GL_UPPER_LEFT */
- { 44093, 0x00002A20 }, /* GL_V2F */
- { 44100, 0x00002A21 }, /* GL_V3F */
- { 44107, 0x00008B83 }, /* GL_VALIDATE_STATUS */
- { 44126, 0x00001F00 }, /* GL_VENDOR */
- { 44136, 0x00001F02 }, /* GL_VERSION */
- { 44147, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 44163, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
- { 44187, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 44217, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 44248, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 44283, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 44307, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 44328, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 44351, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 44372, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 44399, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 44427, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 44455, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 44483, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 44511, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 44539, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 44567, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 44594, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 44621, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 44648, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 44675, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 44702, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 44729, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 44756, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 44783, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 44810, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 44848, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 44890, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 44921, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 44956, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 44990, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 45028, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 45059, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 45094, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 45122, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 45154, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 45184, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 45218, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 45246, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 45278, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 45298, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 45320, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 45349, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 45370, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 45399, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 45432, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 45464, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 45491, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 45522, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 45552, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 45569, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 45590, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 45617, 0x00000BA2 }, /* GL_VIEWPORT */
- { 45629, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 45645, 0x00008A1A }, /* GL_VOLATILE_APPLE */
- { 45663, 0x0000911D }, /* GL_WAIT_FAILED */
- { 45678, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 45698, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 45729, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 45764, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_OES */
- { 45799, 0x000086AD }, /* GL_WEIGHT_ARRAY_OES */
- { 45819, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 45847, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_OES */
- { 45875, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 45900, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_OES */
- { 45925, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 45952, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_OES */
- { 45979, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 46004, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_OES */
- { 46029, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 46053, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 46072, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 46086, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 46104, 0x000088B9 }, /* GL_WRITE_ONLY_OES */
- { 46122, 0x00001506 }, /* GL_XOR */
- { 46129, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 46148, 0x00008757 }, /* GL_YCBCR_MESA */
- { 46162, 0x00000000 }, /* GL_ZERO */
- { 46170, 0x00000D16 }, /* GL_ZOOM_X */
- { 46180, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 276, 0x00008B8D }, /* GL_ACTIVE_PROGRAM_EXT */
+ { 298, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
+ { 325, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
+ { 343, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
+ { 365, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
+ { 384, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+ { 413, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+ { 440, 0x00000104 }, /* GL_ADD */
+ { 447, 0x00008574 }, /* GL_ADD_SIGNED */
+ { 461, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
+ { 479, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
+ { 497, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
+ { 525, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
+ { 553, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
+ { 572, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
+ { 598, 0x00001906 }, /* GL_ALPHA */
+ { 607, 0x0000803D }, /* GL_ALPHA12 */
+ { 618, 0x0000803D }, /* GL_ALPHA12_EXT */
+ { 633, 0x0000803E }, /* GL_ALPHA16 */
+ { 644, 0x00008D8A }, /* GL_ALPHA16I_EXT */
+ { 660, 0x00008D78 }, /* GL_ALPHA16UI_EXT */
+ { 677, 0x0000803E }, /* GL_ALPHA16_EXT */
+ { 692, 0x00008D84 }, /* GL_ALPHA32I_EXT */
+ { 708, 0x00008D72 }, /* GL_ALPHA32UI_EXT */
+ { 725, 0x0000803B }, /* GL_ALPHA4 */
+ { 735, 0x0000803B }, /* GL_ALPHA4_EXT */
+ { 749, 0x0000803C }, /* GL_ALPHA8 */
+ { 759, 0x00008D90 }, /* GL_ALPHA8I_EXT */
+ { 774, 0x00008D7E }, /* GL_ALPHA8UI_EXT */
+ { 790, 0x0000803C }, /* GL_ALPHA8_EXT */
+ { 804, 0x00000D1D }, /* GL_ALPHA_BIAS */
+ { 818, 0x00000D55 }, /* GL_ALPHA_BITS */
+ { 832, 0x00008D97 }, /* GL_ALPHA_INTEGER_EXT */
+ { 853, 0x00000D1C }, /* GL_ALPHA_SCALE */
+ { 868, 0x00000BC0 }, /* GL_ALPHA_TEST */
+ { 882, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
+ { 901, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
+ { 919, 0x0000911A }, /* GL_ALREADY_SIGNALED */
+ { 939, 0x00000207 }, /* GL_ALWAYS */
+ { 949, 0x00001200 }, /* GL_AMBIENT */
+ { 960, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
+ { 983, 0x00001501 }, /* GL_AND */
+ { 990, 0x00001504 }, /* GL_AND_INVERTED */
+ { 1006, 0x00001502 }, /* GL_AND_REVERSE */
+ { 1021, 0x00008892 }, /* GL_ARRAY_BUFFER */
+ { 1037, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
+ { 1061, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
+ { 1089, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
+ { 1109, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
+ { 1136, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
+ { 1160, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
+ { 1186, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
+ { 1210, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
+ { 1232, 0x00000D80 }, /* GL_AUTO_NORMAL */
+ { 1247, 0x00000409 }, /* GL_AUX0 */
+ { 1255, 0x0000040A }, /* GL_AUX1 */
+ { 1263, 0x0000040B }, /* GL_AUX2 */
+ { 1271, 0x0000040C }, /* GL_AUX3 */
+ { 1279, 0x00000C00 }, /* GL_AUX_BUFFERS */
+ { 1294, 0x00000405 }, /* GL_BACK */
+ { 1302, 0x00000402 }, /* GL_BACK_LEFT */
+ { 1315, 0x00000403 }, /* GL_BACK_RIGHT */
+ { 1329, 0x000080E0 }, /* GL_BGR */
+ { 1336, 0x000080E1 }, /* GL_BGRA */
+ { 1344, 0x000080E1 }, /* GL_BGRA_EXT */
+ { 1356, 0x00008D9B }, /* GL_BGRA_INTEGER */
+ { 1372, 0x00008D9B }, /* GL_BGRA_INTEGER_EXT */
+ { 1392, 0x00008D9A }, /* GL_BGR_INTEGER */
+ { 1407, 0x00008D9A }, /* GL_BGR_INTEGER_EXT */
+ { 1426, 0x00001A00 }, /* GL_BITMAP */
+ { 1436, 0x00000704 }, /* GL_BITMAP_TOKEN */
+ { 1452, 0x00000BE2 }, /* GL_BLEND */
+ { 1461, 0x00008005 }, /* GL_BLEND_COLOR */
+ { 1476, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
+ { 1495, 0x00000BE0 }, /* GL_BLEND_DST */
+ { 1508, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
+ { 1527, 0x000080CA }, /* GL_BLEND_DST_ALPHA_OES */
+ { 1550, 0x000080C8 }, /* GL_BLEND_DST_RGB */
+ { 1567, 0x000080C8 }, /* GL_BLEND_DST_RGB_OES */
+ { 1588, 0x00008009 }, /* GL_BLEND_EQUATION */
+ { 1606, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
+ { 1630, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
+ { 1658, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_OES */
+ { 1686, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
+ { 1708, 0x00008009 }, /* GL_BLEND_EQUATION_OES */
+ { 1730, 0x00008009 }, /* GL_BLEND_EQUATION_RGB */
+ { 1752, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
+ { 1778, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_OES */
+ { 1804, 0x00000BE1 }, /* GL_BLEND_SRC */
+ { 1817, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
+ { 1836, 0x000080CB }, /* GL_BLEND_SRC_ALPHA_OES */
+ { 1859, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
+ { 1876, 0x000080C9 }, /* GL_BLEND_SRC_RGB_OES */
+ { 1897, 0x00001905 }, /* GL_BLUE */
+ { 1905, 0x00000D1B }, /* GL_BLUE_BIAS */
+ { 1918, 0x00000D54 }, /* GL_BLUE_BITS */
+ { 1931, 0x00008D96 }, /* GL_BLUE_INTEGER */
+ { 1947, 0x00008D96 }, /* GL_BLUE_INTEGER_EXT */
+ { 1967, 0x00000D1A }, /* GL_BLUE_SCALE */
+ { 1981, 0x00008B56 }, /* GL_BOOL */
+ { 1989, 0x00008B56 }, /* GL_BOOL_ARB */
+ { 2001, 0x00008B57 }, /* GL_BOOL_VEC2 */
+ { 2014, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
+ { 2031, 0x00008B58 }, /* GL_BOOL_VEC3 */
+ { 2044, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
+ { 2061, 0x00008B59 }, /* GL_BOOL_VEC4 */
+ { 2074, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
+ { 2091, 0x000088BB }, /* GL_BUFFER_ACCESS */
+ { 2108, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
+ { 2129, 0x0000911F }, /* GL_BUFFER_ACCESS_FLAGS */
+ { 2152, 0x000088BB }, /* GL_BUFFER_ACCESS_OES */
+ { 2173, 0x00008A13 }, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
+ { 2204, 0x000088BC }, /* GL_BUFFER_MAPPED */
+ { 2221, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
+ { 2242, 0x000088BC }, /* GL_BUFFER_MAPPED_OES */
+ { 2263, 0x00009120 }, /* GL_BUFFER_MAP_LENGTH */
+ { 2284, 0x00009121 }, /* GL_BUFFER_MAP_OFFSET */
+ { 2305, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
+ { 2327, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
+ { 2353, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_OES */
+ { 2379, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */
+ { 2402, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ { 2436, 0x00008764 }, /* GL_BUFFER_SIZE */
+ { 2451, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
+ { 2470, 0x00008765 }, /* GL_BUFFER_USAGE */
+ { 2486, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
+ { 2506, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */
+ { 2525, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ { 2551, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */
+ { 2574, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ { 2602, 0x0000877C }, /* GL_BUMP_TARGET_ATI */
+ { 2621, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */
+ { 2643, 0x00001400 }, /* GL_BYTE */
+ { 2651, 0x00002A24 }, /* GL_C3F_V3F */
+ { 2662, 0x00002A26 }, /* GL_C4F_N3F_V3F */
+ { 2677, 0x00002A22 }, /* GL_C4UB_V2F */
+ { 2689, 0x00002A23 }, /* GL_C4UB_V3F */
+ { 2701, 0x00000901 }, /* GL_CCW */
+ { 2708, 0x00002900 }, /* GL_CLAMP */
+ { 2717, 0x0000891C }, /* GL_CLAMP_READ_COLOR */
+ { 2737, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
+ { 2756, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
+ { 2779, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
+ { 2803, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
+ { 2820, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
+ { 2842, 0x00001500 }, /* GL_CLEAR */
+ { 2851, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
+ { 2876, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
+ { 2905, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
+ { 2931, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ { 2960, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
+ { 2986, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
+ { 3013, 0x00003000 }, /* GL_CLIP_DISTANCE0 */
+ { 3031, 0x00003001 }, /* GL_CLIP_DISTANCE1 */
+ { 3049, 0x00003002 }, /* GL_CLIP_DISTANCE2 */
+ { 3067, 0x00003003 }, /* GL_CLIP_DISTANCE3 */
+ { 3085, 0x00003004 }, /* GL_CLIP_DISTANCE4 */
+ { 3103, 0x00003005 }, /* GL_CLIP_DISTANCE5 */
+ { 3121, 0x00003006 }, /* GL_CLIP_DISTANCE6 */
+ { 3139, 0x00003007 }, /* GL_CLIP_DISTANCE7 */
+ { 3157, 0x00003000 }, /* GL_CLIP_PLANE0 */
+ { 3172, 0x00003001 }, /* GL_CLIP_PLANE1 */
+ { 3187, 0x00003002 }, /* GL_CLIP_PLANE2 */
+ { 3202, 0x00003003 }, /* GL_CLIP_PLANE3 */
+ { 3217, 0x00003004 }, /* GL_CLIP_PLANE4 */
+ { 3232, 0x00003005 }, /* GL_CLIP_PLANE5 */
+ { 3247, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ { 3280, 0x00000A00 }, /* GL_COEFF */
+ { 3289, 0x00001800 }, /* GL_COLOR */
+ { 3298, 0x00008076 }, /* GL_COLOR_ARRAY */
+ { 3313, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ { 3343, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 3377, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
+ { 3400, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
+ { 3420, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
+ { 3442, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
+ { 3462, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */
+ { 3483, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
+ { 3508, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_OES */
+ { 3533, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */
+ { 3554, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */
+ { 3576, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
+ { 3602, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */
+ { 3624, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
+ { 3650, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */
+ { 3672, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
+ { 3698, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */
+ { 3720, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
+ { 3746, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */
+ { 3768, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
+ { 3794, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */
+ { 3816, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
+ { 3842, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
+ { 3867, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */
+ { 3888, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
+ { 3913, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */
+ { 3934, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
+ { 3959, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */
+ { 3980, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
+ { 4005, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */
+ { 4026, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
+ { 4051, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */
+ { 4072, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
+ { 4097, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */
+ { 4118, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
+ { 4143, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */
+ { 4164, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
+ { 4189, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */
+ { 4210, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
+ { 4235, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
+ { 4255, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
+ { 4276, 0x00001900 }, /* GL_COLOR_INDEX */
+ { 4291, 0x00001603 }, /* GL_COLOR_INDEXES */
+ { 4308, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
+ { 4326, 0x00000B57 }, /* GL_COLOR_MATERIAL */
+ { 4344, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
+ { 4367, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
+ { 4395, 0x000080B1 }, /* GL_COLOR_MATRIX */
+ { 4411, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
+ { 4431, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ { 4459, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 4491, 0x00008458 }, /* GL_COLOR_SUM */
+ { 4504, 0x00008458 }, /* GL_COLOR_SUM_ARB */
+ { 4521, 0x000080D0 }, /* GL_COLOR_TABLE */
+ { 4536, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ { 4562, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
+ { 4592, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
+ { 4622, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
+ { 4642, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
+ { 4666, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
+ { 4691, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
+ { 4720, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
+ { 4749, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
+ { 4771, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
+ { 4797, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
+ { 4823, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
+ { 4849, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
+ { 4879, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
+ { 4909, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ { 4939, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
+ { 4973, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
+ { 5007, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ { 5037, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
+ { 5071, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
+ { 5105, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
+ { 5129, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
+ { 5157, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
+ { 5185, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
+ { 5206, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
+ { 5231, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
+ { 5252, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
+ { 5277, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
+ { 5302, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
+ { 5321, 0x00008570 }, /* GL_COMBINE */
+ { 5332, 0x00008503 }, /* GL_COMBINE4 */
+ { 5344, 0x00008572 }, /* GL_COMBINE_ALPHA */
+ { 5361, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
+ { 5382, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
+ { 5403, 0x00008570 }, /* GL_COMBINE_ARB */
+ { 5418, 0x00008570 }, /* GL_COMBINE_EXT */
+ { 5433, 0x00008571 }, /* GL_COMBINE_RGB */
+ { 5448, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
+ { 5467, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
+ { 5486, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
+ { 5522, 0x0000884E }, /* GL_COMPARE_REF_TO_TEXTURE */
+ { 5548, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
+ { 5572, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
+ { 5600, 0x00001300 }, /* GL_COMPILE */
+ { 5611, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
+ { 5634, 0x00008B81 }, /* GL_COMPILE_STATUS */
+ { 5652, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
+ { 5672, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
+ { 5696, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
+ { 5720, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
+ { 5748, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
+ { 5772, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ { 5802, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
+ { 5836, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
+ { 5864, 0x00008225 }, /* GL_COMPRESSED_RED */
+ { 5882, 0x00008226 }, /* GL_COMPRESSED_RG */
+ { 5899, 0x000084ED }, /* GL_COMPRESSED_RGB */
+ { 5917, 0x000084EE }, /* GL_COMPRESSED_RGBA */
+ { 5936, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
+ { 5959, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ { 5988, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ { 6021, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ { 6054, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ { 6087, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
+ { 6109, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ { 6137, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ { 6169, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */
+ { 6194, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ { 6225, 0x00008C48 }, /* GL_COMPRESSED_SRGB */
+ { 6244, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */
+ { 6269, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ { 6299, 0x0000911C }, /* GL_CONDITION_SATISFIED */
+ { 6322, 0x00008576 }, /* GL_CONSTANT */
+ { 6334, 0x00008003 }, /* GL_CONSTANT_ALPHA */
+ { 6352, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
+ { 6374, 0x00008576 }, /* GL_CONSTANT_ARB */
+ { 6390, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
+ { 6414, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
+ { 6436, 0x00008001 }, /* GL_CONSTANT_COLOR */
+ { 6454, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
+ { 6476, 0x00008576 }, /* GL_CONSTANT_EXT */
+ { 6492, 0x00000002 }, /* GL_CONTEXT_COMPATIBILITY_PROFILE_BIT */
+ { 6529, 0x00000001 }, /* GL_CONTEXT_CORE_PROFILE_BIT */
+ { 6557, 0x0000821E }, /* GL_CONTEXT_FLAGS */
+ { 6574, 0x00000001 }, /* GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */
+ { 6613, 0x00009126 }, /* GL_CONTEXT_PROFILE_MASK */
+ { 6637, 0x00008010 }, /* GL_CONVOLUTION_1D */
+ { 6655, 0x00008011 }, /* GL_CONVOLUTION_2D */
+ { 6673, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
+ { 6701, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
+ { 6732, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
+ { 6759, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
+ { 6790, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
+ { 6817, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
+ { 6848, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
+ { 6876, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
+ { 6908, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
+ { 6930, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
+ { 6956, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
+ { 6978, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
+ { 7004, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
+ { 7025, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
+ { 7050, 0x00008862 }, /* GL_COORD_REPLACE */
+ { 7067, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
+ { 7088, 0x00008862 }, /* GL_COORD_REPLACE_NV */
+ { 7108, 0x00008862 }, /* GL_COORD_REPLACE_OES */
+ { 7129, 0x00001503 }, /* GL_COPY */
+ { 7137, 0x0000150C }, /* GL_COPY_INVERTED */
+ { 7154, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
+ { 7174, 0x00008F36 }, /* GL_COPY_READ_BUFFER */
+ { 7194, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */
+ { 7215, 0x00000B44 }, /* GL_CULL_FACE */
+ { 7228, 0x00000B45 }, /* GL_CULL_FACE_MODE */
+ { 7246, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
+ { 7265, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ { 7297, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ { 7332, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
+ { 7353, 0x00000001 }, /* GL_CURRENT_BIT */
+ { 7368, 0x00000B00 }, /* GL_CURRENT_COLOR */
+ { 7385, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
+ { 7406, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
+ { 7432, 0x00000B01 }, /* GL_CURRENT_INDEX */
+ { 7449, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
+ { 7471, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ { 7499, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
+ { 7520, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ { 7554, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
+ { 7587, 0x00000B02 }, /* GL_CURRENT_NORMAL */
+ { 7605, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ { 7635, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_OES */
+ { 7665, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
+ { 7684, 0x00008865 }, /* GL_CURRENT_QUERY */
+ { 7701, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
+ { 7722, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
+ { 7746, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
+ { 7773, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
+ { 7797, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
+ { 7824, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
+ { 7857, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ { 7891, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ { 7924, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
+ { 7951, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
+ { 7977, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
+ { 8002, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
+ { 8031, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
+ { 8053, 0x00000900 }, /* GL_CW */
+ { 8059, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
+ { 8080, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
+ { 8101, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
+ { 8121, 0x00002101 }, /* GL_DECAL */
+ { 8130, 0x00001E03 }, /* GL_DECR */
+ { 8138, 0x00008508 }, /* GL_DECR_WRAP */
+ { 8151, 0x00008508 }, /* GL_DECR_WRAP_EXT */
+ { 8168, 0x00008B80 }, /* GL_DELETE_STATUS */
+ { 8185, 0x00001801 }, /* GL_DEPTH */
+ { 8194, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
+ { 8214, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
+ { 8238, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_OES */
+ { 8262, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
+ { 8282, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
+ { 8306, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_OES */
+ { 8330, 0x00000D1F }, /* GL_DEPTH_BIAS */
+ { 8344, 0x00000D56 }, /* GL_DEPTH_BITS */
+ { 8358, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
+ { 8378, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ { 8403, 0x00008223 }, /* GL_DEPTH_BUFFER */
+ { 8419, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
+ { 8439, 0x0000864F }, /* GL_DEPTH_CLAMP */
+ { 8454, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
+ { 8472, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
+ { 8493, 0x00001902 }, /* GL_DEPTH_COMPONENT */
+ { 8512, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
+ { 8533, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
+ { 8558, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_OES */
+ { 8583, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
+ { 8609, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
+ { 8630, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
+ { 8655, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_OES */
+ { 8680, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
+ { 8706, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
+ { 8727, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
+ { 8752, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_OES */
+ { 8777, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
+ { 8803, 0x00000B74 }, /* GL_DEPTH_FUNC */
+ { 8817, 0x00000B70 }, /* GL_DEPTH_RANGE */
+ { 8832, 0x00000D1E }, /* GL_DEPTH_SCALE */
+ { 8847, 0x000084F9 }, /* GL_DEPTH_STENCIL */
+ { 8864, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ { 8892, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
+ { 8913, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
+ { 8933, 0x000084F9 }, /* GL_DEPTH_STENCIL_OES */
+ { 8954, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ { 8982, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ { 9010, 0x00000B71 }, /* GL_DEPTH_TEST */
+ { 9024, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
+ { 9046, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
+ { 9072, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
+ { 9091, 0x00001201 }, /* GL_DIFFUSE */
+ { 9102, 0x00000BD0 }, /* GL_DITHER */
+ { 9112, 0x00000A02 }, /* GL_DOMAIN */
+ { 9122, 0x00001100 }, /* GL_DONT_CARE */
+ { 9135, 0x000086AE }, /* GL_DOT3_RGB */
+ { 9147, 0x000086AF }, /* GL_DOT3_RGBA */
+ { 9160, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
+ { 9177, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
+ { 9194, 0x000086AE }, /* GL_DOT3_RGB_ARB */
+ { 9210, 0x00008740 }, /* GL_DOT3_RGB_EXT */
+ { 9226, 0x0000140A }, /* GL_DOUBLE */
+ { 9236, 0x00000C32 }, /* GL_DOUBLEBUFFER */
+ { 9252, 0x00000C01 }, /* GL_DRAW_BUFFER */
+ { 9267, 0x00008825 }, /* GL_DRAW_BUFFER0 */
+ { 9283, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
+ { 9303, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
+ { 9323, 0x00008826 }, /* GL_DRAW_BUFFER1 */
+ { 9339, 0x0000882F }, /* GL_DRAW_BUFFER10 */
+ { 9356, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
+ { 9377, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
+ { 9398, 0x00008830 }, /* GL_DRAW_BUFFER11 */
+ { 9415, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
+ { 9436, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
+ { 9457, 0x00008831 }, /* GL_DRAW_BUFFER12 */
+ { 9474, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
+ { 9495, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
+ { 9516, 0x00008832 }, /* GL_DRAW_BUFFER13 */
+ { 9533, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
+ { 9554, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
+ { 9575, 0x00008833 }, /* GL_DRAW_BUFFER14 */
+ { 9592, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
+ { 9613, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
+ { 9634, 0x00008834 }, /* GL_DRAW_BUFFER15 */
+ { 9651, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
+ { 9672, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
+ { 9693, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
+ { 9713, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
+ { 9733, 0x00008827 }, /* GL_DRAW_BUFFER2 */
+ { 9749, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
+ { 9769, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
+ { 9789, 0x00008828 }, /* GL_DRAW_BUFFER3 */
+ { 9805, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
+ { 9825, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
+ { 9845, 0x00008829 }, /* GL_DRAW_BUFFER4 */
+ { 9861, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
+ { 9881, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
+ { 9901, 0x0000882A }, /* GL_DRAW_BUFFER5 */
+ { 9917, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
+ { 9937, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
+ { 9957, 0x0000882B }, /* GL_DRAW_BUFFER6 */
+ { 9973, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
+ { 9993, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
+ { 10013, 0x0000882C }, /* GL_DRAW_BUFFER7 */
+ { 10029, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
+ { 10049, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
+ { 10069, 0x0000882D }, /* GL_DRAW_BUFFER8 */
+ { 10085, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
+ { 10105, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
+ { 10125, 0x0000882E }, /* GL_DRAW_BUFFER9 */
+ { 10141, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
+ { 10161, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
+ { 10181, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
+ { 10201, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ { 10229, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+ { 10261, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
+ { 10285, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
+ { 10305, 0x00000304 }, /* GL_DST_ALPHA */
+ { 10318, 0x00000306 }, /* GL_DST_COLOR */
+ { 10331, 0x0000877A }, /* GL_DU8DV8_ATI */
+ { 10345, 0x00008779 }, /* GL_DUDV_ATI */
+ { 10357, 0x000088EA }, /* GL_DYNAMIC_COPY */
+ { 10373, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
+ { 10393, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
+ { 10409, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
+ { 10429, 0x000088E9 }, /* GL_DYNAMIC_READ */
+ { 10445, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
+ { 10465, 0x00000B43 }, /* GL_EDGE_FLAG */
+ { 10478, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
+ { 10497, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ { 10531, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
+ { 10569, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ { 10596, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ { 10622, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
+ { 10646, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ { 10678, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
+ { 10714, 0x00001600 }, /* GL_EMISSION */
+ { 10726, 0x00002000 }, /* GL_ENABLE_BIT */
+ { 10740, 0x00000202 }, /* GL_EQUAL */
+ { 10749, 0x00001509 }, /* GL_EQUIV */
+ { 10758, 0x00010000 }, /* GL_EVAL_BIT */
+ { 10770, 0x00000800 }, /* GL_EXP */
+ { 10777, 0x00000801 }, /* GL_EXP2 */
+ { 10785, 0x00001F03 }, /* GL_EXTENSIONS */
+ { 10799, 0x00002400 }, /* GL_EYE_LINEAR */
+ { 10813, 0x00002502 }, /* GL_EYE_PLANE */
+ { 10826, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ { 10851, 0x0000855B }, /* GL_EYE_RADIAL_NV */
+ { 10868, 0x00000000 }, /* GL_FALSE */
+ { 10877, 0x00001101 }, /* GL_FASTEST */
+ { 10888, 0x00001C01 }, /* GL_FEEDBACK */
+ { 10900, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
+ { 10927, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
+ { 10951, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
+ { 10975, 0x00001B02 }, /* GL_FILL */
+ { 10983, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
+ { 11010, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
+ { 11041, 0x0000140C }, /* GL_FIXED */
+ { 11050, 0x0000140C }, /* GL_FIXED_OES */
+ { 11063, 0x0000891D }, /* GL_FIXED_ONLY */
+ { 11077, 0x00001D00 }, /* GL_FLAT */
+ { 11085, 0x00001406 }, /* GL_FLOAT */
+ { 11094, 0x00008B5A }, /* GL_FLOAT_MAT2 */
+ { 11108, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
+ { 11126, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
+ { 11142, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
+ { 11158, 0x00008B5B }, /* GL_FLOAT_MAT3 */
+ { 11172, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
+ { 11190, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
+ { 11206, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
+ { 11222, 0x00008B5C }, /* GL_FLOAT_MAT4 */
+ { 11236, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
+ { 11254, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
+ { 11270, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
+ { 11286, 0x00008B50 }, /* GL_FLOAT_VEC2 */
+ { 11300, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
+ { 11318, 0x00008B51 }, /* GL_FLOAT_VEC3 */
+ { 11332, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
+ { 11350, 0x00008B52 }, /* GL_FLOAT_VEC4 */
+ { 11364, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
+ { 11382, 0x00000B60 }, /* GL_FOG */
+ { 11389, 0x00000080 }, /* GL_FOG_BIT */
+ { 11400, 0x00000B66 }, /* GL_FOG_COLOR */
+ { 11413, 0x00008451 }, /* GL_FOG_COORD */
+ { 11426, 0x00008451 }, /* GL_FOG_COORDINATE */
+ { 11444, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
+ { 11468, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ { 11507, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
+ { 11550, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ { 11582, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ { 11613, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ { 11642, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
+ { 11667, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
+ { 11686, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
+ { 11720, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
+ { 11747, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
+ { 11773, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
+ { 11797, 0x00008450 }, /* GL_FOG_COORD_SRC */
+ { 11814, 0x00000B62 }, /* GL_FOG_DENSITY */
+ { 11829, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
+ { 11853, 0x00000B64 }, /* GL_FOG_END */
+ { 11864, 0x00000C54 }, /* GL_FOG_HINT */
+ { 11876, 0x00000B61 }, /* GL_FOG_INDEX */
+ { 11889, 0x00000B65 }, /* GL_FOG_MODE */
+ { 11901, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
+ { 11920, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
+ { 11945, 0x00000B63 }, /* GL_FOG_START */
+ { 11958, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
+ { 11976, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
+ { 12000, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
+ { 12019, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
+ { 12042, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ { 12077, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES */
+ { 12116, 0x00008D40 }, /* GL_FRAMEBUFFER */
+ { 12131, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ { 12168, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ { 12204, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ { 12245, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ { 12286, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ { 12323, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ { 12360, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED */
+ { 12394, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
+ { 12432, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ { 12470, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+ { 12512, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES */
+ { 12554, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ { 12592, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+ { 12634, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES */
+ { 12676, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ { 12711, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ { 12750, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+ { 12799, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES */
+ { 12848, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ { 12896, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+ { 12948, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES */
+ { 13000, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ { 13040, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+ { 13084, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ { 13124, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+ { 13168, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES */
+ { 13212, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
+ { 13235, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
+ { 13262, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_OES */
+ { 13289, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
+ { 13313, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+ { 13341, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_OES */
+ { 13369, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
+ { 13392, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
+ { 13411, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ { 13448, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+ { 13489, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES */
+ { 13530, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS */
+ { 13567, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ { 13608, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES */
+ { 13649, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ { 13687, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+ { 13729, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES */
+ { 13771, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ { 13822, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ { 13860, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES */
+ { 13898, 0x00008DA9 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
+ { 13940, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS */
+ { 13980, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
+ { 14024, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ { 14069, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+ { 14118, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES */
+ { 14167, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ { 14205, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
+ { 14247, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ { 14285, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+ { 14327, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES */
+ { 14369, 0x00008D40 }, /* GL_FRAMEBUFFER_OES */
+ { 14388, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ { 14420, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
+ { 14445, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ { 14472, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+ { 14503, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_OES */
+ { 14534, 0x00000404 }, /* GL_FRONT */
+ { 14543, 0x00000408 }, /* GL_FRONT_AND_BACK */
+ { 14561, 0x00000B46 }, /* GL_FRONT_FACE */
+ { 14575, 0x00000400 }, /* GL_FRONT_LEFT */
+ { 14589, 0x00000401 }, /* GL_FRONT_RIGHT */
+ { 14604, 0x00008006 }, /* GL_FUNC_ADD */
+ { 14616, 0x00008006 }, /* GL_FUNC_ADD_EXT */
+ { 14632, 0x00008006 }, /* GL_FUNC_ADD_OES */
+ { 14648, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
+ { 14673, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
+ { 14702, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_OES */
+ { 14731, 0x0000800A }, /* GL_FUNC_SUBTRACT */
+ { 14748, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
+ { 14769, 0x0000800A }, /* GL_FUNC_SUBTRACT_OES */
+ { 14790, 0x00008191 }, /* GL_GENERATE_MIPMAP */
+ { 14809, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
+ { 14833, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
+ { 14862, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
+ { 14886, 0x00008917 }, /* GL_GEOMETRY_INPUT_TYPE */
+ { 14909, 0x00008DDB }, /* GL_GEOMETRY_INPUT_TYPE_ARB */
+ { 14936, 0x00008918 }, /* GL_GEOMETRY_OUTPUT_TYPE */
+ { 14960, 0x00008DDC }, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
+ { 14988, 0x00008DD9 }, /* GL_GEOMETRY_SHADER */
+ { 15007, 0x00008DD9 }, /* GL_GEOMETRY_SHADER_ARB */
+ { 15030, 0x00008916 }, /* GL_GEOMETRY_VERTICES_OUT */
+ { 15055, 0x00008DDA }, /* GL_GEOMETRY_VERTICES_OUT_ARB */
+ { 15084, 0x00000206 }, /* GL_GEQUAL */
+ { 15094, 0x00000204 }, /* GL_GREATER */
+ { 15105, 0x00001904 }, /* GL_GREEN */
+ { 15114, 0x00000D19 }, /* GL_GREEN_BIAS */
+ { 15128, 0x00000D53 }, /* GL_GREEN_BITS */
+ { 15142, 0x00008D95 }, /* GL_GREEN_INTEGER */
+ { 15159, 0x00008D95 }, /* GL_GREEN_INTEGER_EXT */
+ { 15180, 0x00000D18 }, /* GL_GREEN_SCALE */
+ { 15195, 0x0000140B }, /* GL_HALF_FLOAT */
+ { 15209, 0x00008D61 }, /* GL_HALF_FLOAT_OES */
+ { 15227, 0x00008DF2 }, /* GL_HIGH_FLOAT */
+ { 15241, 0x00008DF5 }, /* GL_HIGH_INT */
+ { 15253, 0x00008000 }, /* GL_HINT_BIT */
+ { 15265, 0x00008024 }, /* GL_HISTOGRAM */
+ { 15278, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+ { 15302, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+ { 15330, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+ { 15353, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+ { 15380, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+ { 15397, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+ { 15417, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+ { 15441, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+ { 15465, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+ { 15493, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ { 15521, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+ { 15553, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+ { 15575, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+ { 15601, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+ { 15619, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+ { 15641, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+ { 15660, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+ { 15683, 0x0000862A }, /* GL_IDENTITY_NV */
+ { 15698, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+ { 15718, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */
+ { 15754, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ { 15794, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */
+ { 15828, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ { 15866, 0x00001E02 }, /* GL_INCR */
+ { 15874, 0x00008507 }, /* GL_INCR_WRAP */
+ { 15887, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+ { 15904, 0x00008222 }, /* GL_INDEX */
+ { 15913, 0x00008077 }, /* GL_INDEX_ARRAY */
+ { 15928, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ { 15958, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+ { 15992, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+ { 16015, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+ { 16037, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+ { 16057, 0x00000D51 }, /* GL_INDEX_BITS */
+ { 16071, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+ { 16092, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+ { 16110, 0x00000C30 }, /* GL_INDEX_MODE */
+ { 16124, 0x00000D13 }, /* GL_INDEX_OFFSET */
+ { 16140, 0x00000D12 }, /* GL_INDEX_SHIFT */
+ { 16155, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+ { 16174, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+ { 16193, 0x00001404 }, /* GL_INT */
+ { 16200, 0x00008049 }, /* GL_INTENSITY */
+ { 16213, 0x0000804C }, /* GL_INTENSITY12 */
+ { 16228, 0x0000804C }, /* GL_INTENSITY12_EXT */
+ { 16247, 0x0000804D }, /* GL_INTENSITY16 */
+ { 16262, 0x00008D8B }, /* GL_INTENSITY16I_EXT */
+ { 16282, 0x00008D79 }, /* GL_INTENSITY16UI_EXT */
+ { 16303, 0x0000804D }, /* GL_INTENSITY16_EXT */
+ { 16322, 0x00008D85 }, /* GL_INTENSITY32I_EXT */
+ { 16342, 0x00008D73 }, /* GL_INTENSITY32UI_EXT */
+ { 16363, 0x0000804A }, /* GL_INTENSITY4 */
+ { 16377, 0x0000804A }, /* GL_INTENSITY4_EXT */
+ { 16395, 0x0000804B }, /* GL_INTENSITY8 */
+ { 16409, 0x00008D91 }, /* GL_INTENSITY8I_EXT */
+ { 16428, 0x00008D7F }, /* GL_INTENSITY8UI_EXT */
+ { 16448, 0x0000804B }, /* GL_INTENSITY8_EXT */
+ { 16466, 0x00008049 }, /* GL_INTENSITY_EXT */
+ { 16483, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS */
+ { 16506, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS_EXT */
+ { 16533, 0x00008575 }, /* GL_INTERPOLATE */
+ { 16548, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+ { 16567, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+ { 16586, 0x00008DF7 }, /* GL_INT_10_10_10_2_OES */
+ { 16608, 0x00008DC9 }, /* GL_INT_SAMPLER_1D */
+ { 16626, 0x00008DCE }, /* GL_INT_SAMPLER_1D_ARRAY */
+ { 16650, 0x00008DCE }, /* GL_INT_SAMPLER_1D_ARRAY_EXT */
+ { 16678, 0x00008DC9 }, /* GL_INT_SAMPLER_1D_EXT */
+ { 16700, 0x00008DCA }, /* GL_INT_SAMPLER_2D */
+ { 16718, 0x00008DCF }, /* GL_INT_SAMPLER_2D_ARRAY */
+ { 16742, 0x00008DCF }, /* GL_INT_SAMPLER_2D_ARRAY_EXT */
+ { 16770, 0x00008DCA }, /* GL_INT_SAMPLER_2D_EXT */
+ { 16792, 0x00008DCD }, /* GL_INT_SAMPLER_2D_RECT */
+ { 16815, 0x00008DCD }, /* GL_INT_SAMPLER_2D_RECT_EXT */
+ { 16842, 0x00008DCB }, /* GL_INT_SAMPLER_3D */
+ { 16860, 0x00008DCB }, /* GL_INT_SAMPLER_3D_EXT */
+ { 16882, 0x00008DD0 }, /* GL_INT_SAMPLER_BUFFER */
+ { 16904, 0x00008DD0 }, /* GL_INT_SAMPLER_BUFFER_EXT */
+ { 16930, 0x00008DCC }, /* GL_INT_SAMPLER_CUBE */
+ { 16950, 0x00008DCC }, /* GL_INT_SAMPLER_CUBE_EXT */
+ { 16974, 0x00008B53 }, /* GL_INT_VEC2 */
+ { 16986, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+ { 17002, 0x00008B54 }, /* GL_INT_VEC3 */
+ { 17014, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+ { 17030, 0x00008B55 }, /* GL_INT_VEC4 */
+ { 17042, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+ { 17058, 0x00000500 }, /* GL_INVALID_ENUM */
+ { 17074, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ { 17107, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ { 17144, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_OES */
+ { 17181, 0x00000502 }, /* GL_INVALID_OPERATION */
+ { 17202, 0x00000501 }, /* GL_INVALID_VALUE */
+ { 17219, 0x0000862B }, /* GL_INVERSE_NV */
+ { 17233, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+ { 17257, 0x0000150A }, /* GL_INVERT */
+ { 17267, 0x00001E00 }, /* GL_KEEP */
+ { 17275, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
+ { 17301, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
+ { 17331, 0x00000406 }, /* GL_LEFT */
+ { 17339, 0x00000203 }, /* GL_LEQUAL */
+ { 17349, 0x00000201 }, /* GL_LESS */
+ { 17357, 0x00004000 }, /* GL_LIGHT0 */
+ { 17367, 0x00004001 }, /* GL_LIGHT1 */
+ { 17377, 0x00004002 }, /* GL_LIGHT2 */
+ { 17387, 0x00004003 }, /* GL_LIGHT3 */
+ { 17397, 0x00004004 }, /* GL_LIGHT4 */
+ { 17407, 0x00004005 }, /* GL_LIGHT5 */
+ { 17417, 0x00004006 }, /* GL_LIGHT6 */
+ { 17427, 0x00004007 }, /* GL_LIGHT7 */
+ { 17437, 0x00000B50 }, /* GL_LIGHTING */
+ { 17449, 0x00000040 }, /* GL_LIGHTING_BIT */
+ { 17465, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+ { 17488, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ { 17517, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+ { 17550, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ { 17578, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+ { 17602, 0x00001B01 }, /* GL_LINE */
+ { 17610, 0x00002601 }, /* GL_LINEAR */
+ { 17620, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+ { 17642, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ { 17672, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ { 17703, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+ { 17727, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+ { 17752, 0x00000001 }, /* GL_LINES */
+ { 17761, 0x0000000A }, /* GL_LINES_ADJACENCY */
+ { 17780, 0x0000000A }, /* GL_LINES_ADJACENCY_ARB */
+ { 17803, 0x00000004 }, /* GL_LINE_BIT */
+ { 17815, 0x00000002 }, /* GL_LINE_LOOP */
+ { 17828, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+ { 17848, 0x00000B20 }, /* GL_LINE_SMOOTH */
+ { 17863, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+ { 17883, 0x00000B24 }, /* GL_LINE_STIPPLE */
+ { 17899, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+ { 17923, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+ { 17946, 0x00000003 }, /* GL_LINE_STRIP */
+ { 17960, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY */
+ { 17984, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY_ARB */
+ { 18012, 0x00000702 }, /* GL_LINE_TOKEN */
+ { 18026, 0x00000B21 }, /* GL_LINE_WIDTH */
+ { 18040, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+ { 18066, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+ { 18086, 0x00008B82 }, /* GL_LINK_STATUS */
+ { 18101, 0x00000B32 }, /* GL_LIST_BASE */
+ { 18114, 0x00020000 }, /* GL_LIST_BIT */
+ { 18126, 0x00000B33 }, /* GL_LIST_INDEX */
+ { 18140, 0x00000B30 }, /* GL_LIST_MODE */
+ { 18153, 0x00000101 }, /* GL_LOAD */
+ { 18161, 0x00000BF1 }, /* GL_LOGIC_OP */
+ { 18173, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+ { 18190, 0x00008CA1 }, /* GL_LOWER_LEFT */
+ { 18204, 0x00008DF0 }, /* GL_LOW_FLOAT */
+ { 18217, 0x00008DF3 }, /* GL_LOW_INT */
+ { 18228, 0x00001909 }, /* GL_LUMINANCE */
+ { 18241, 0x00008041 }, /* GL_LUMINANCE12 */
+ { 18256, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+ { 18279, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+ { 18306, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+ { 18328, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+ { 18354, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+ { 18373, 0x00008042 }, /* GL_LUMINANCE16 */
+ { 18388, 0x00008D8C }, /* GL_LUMINANCE16I_EXT */
+ { 18408, 0x00008D7A }, /* GL_LUMINANCE16UI_EXT */
+ { 18429, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+ { 18452, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+ { 18479, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+ { 18498, 0x00008D86 }, /* GL_LUMINANCE32I_EXT */
+ { 18518, 0x00008D74 }, /* GL_LUMINANCE32UI_EXT */
+ { 18539, 0x0000803F }, /* GL_LUMINANCE4 */
+ { 18553, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+ { 18574, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+ { 18599, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+ { 18617, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+ { 18638, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+ { 18663, 0x00008040 }, /* GL_LUMINANCE8 */
+ { 18677, 0x00008D92 }, /* GL_LUMINANCE8I_EXT */
+ { 18696, 0x00008D80 }, /* GL_LUMINANCE8UI_EXT */
+ { 18716, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+ { 18737, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+ { 18762, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+ { 18780, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+ { 18799, 0x00008D8D }, /* GL_LUMINANCE_ALPHA16I_EXT */
+ { 18825, 0x00008D7B }, /* GL_LUMINANCE_ALPHA16UI_EXT */
+ { 18852, 0x00008D87 }, /* GL_LUMINANCE_ALPHA32I_EXT */
+ { 18878, 0x00008D75 }, /* GL_LUMINANCE_ALPHA32UI_EXT */
+ { 18905, 0x00008D93 }, /* GL_LUMINANCE_ALPHA8I_EXT */
+ { 18930, 0x00008D81 }, /* GL_LUMINANCE_ALPHA8UI_EXT */
+ { 18956, 0x00008D9D }, /* GL_LUMINANCE_ALPHA_INTEGER_EXT */
+ { 18987, 0x00008D9C }, /* GL_LUMINANCE_INTEGER_EXT */
+ { 19012, 0x0000821B }, /* GL_MAJOR_VERSION */
+ { 19029, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+ { 19045, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+ { 19065, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+ { 19087, 0x00000D91 }, /* GL_MAP1_INDEX */
+ { 19101, 0x00000D92 }, /* GL_MAP1_NORMAL */
+ { 19116, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+ { 19140, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+ { 19164, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+ { 19188, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+ { 19212, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+ { 19229, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+ { 19246, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ { 19274, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ { 19303, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ { 19332, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ { 19361, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ { 19390, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ { 19419, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ { 19448, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ { 19476, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ { 19504, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ { 19532, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ { 19560, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ { 19588, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ { 19616, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ { 19644, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ { 19672, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ { 19700, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+ { 19716, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+ { 19736, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+ { 19758, 0x00000DB1 }, /* GL_MAP2_INDEX */
+ { 19772, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+ { 19787, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+ { 19811, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+ { 19835, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+ { 19859, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+ { 19883, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+ { 19900, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+ { 19917, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ { 19945, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ { 19974, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ { 20003, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ { 20032, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ { 20061, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ { 20090, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ { 20119, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ { 20147, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ { 20175, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ { 20203, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ { 20231, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ { 20259, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ { 20287, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+ { 20315, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ { 20343, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ { 20371, 0x00000D10 }, /* GL_MAP_COLOR */
+ { 20384, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
+ { 20410, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
+ { 20439, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
+ { 20467, 0x00000001 }, /* GL_MAP_READ_BIT */
+ { 20483, 0x00000D11 }, /* GL_MAP_STENCIL */
+ { 20498, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
+ { 20524, 0x00000002 }, /* GL_MAP_WRITE_BIT */
+ { 20541, 0x000088C0 }, /* GL_MATRIX0_ARB */
+ { 20556, 0x00008630 }, /* GL_MATRIX0_NV */
+ { 20570, 0x000088CA }, /* GL_MATRIX10_ARB */
+ { 20586, 0x000088CB }, /* GL_MATRIX11_ARB */
+ { 20602, 0x000088CC }, /* GL_MATRIX12_ARB */
+ { 20618, 0x000088CD }, /* GL_MATRIX13_ARB */
+ { 20634, 0x000088CE }, /* GL_MATRIX14_ARB */
+ { 20650, 0x000088CF }, /* GL_MATRIX15_ARB */
+ { 20666, 0x000088D0 }, /* GL_MATRIX16_ARB */
+ { 20682, 0x000088D1 }, /* GL_MATRIX17_ARB */
+ { 20698, 0x000088D2 }, /* GL_MATRIX18_ARB */
+ { 20714, 0x000088D3 }, /* GL_MATRIX19_ARB */
+ { 20730, 0x000088C1 }, /* GL_MATRIX1_ARB */
+ { 20745, 0x00008631 }, /* GL_MATRIX1_NV */
+ { 20759, 0x000088D4 }, /* GL_MATRIX20_ARB */
+ { 20775, 0x000088D5 }, /* GL_MATRIX21_ARB */
+ { 20791, 0x000088D6 }, /* GL_MATRIX22_ARB */
+ { 20807, 0x000088D7 }, /* GL_MATRIX23_ARB */
+ { 20823, 0x000088D8 }, /* GL_MATRIX24_ARB */
+ { 20839, 0x000088D9 }, /* GL_MATRIX25_ARB */
+ { 20855, 0x000088DA }, /* GL_MATRIX26_ARB */
+ { 20871, 0x000088DB }, /* GL_MATRIX27_ARB */
+ { 20887, 0x000088DC }, /* GL_MATRIX28_ARB */
+ { 20903, 0x000088DD }, /* GL_MATRIX29_ARB */
+ { 20919, 0x000088C2 }, /* GL_MATRIX2_ARB */
+ { 20934, 0x00008632 }, /* GL_MATRIX2_NV */
+ { 20948, 0x000088DE }, /* GL_MATRIX30_ARB */
+ { 20964, 0x000088DF }, /* GL_MATRIX31_ARB */
+ { 20980, 0x000088C3 }, /* GL_MATRIX3_ARB */
+ { 20995, 0x00008633 }, /* GL_MATRIX3_NV */
+ { 21009, 0x000088C4 }, /* GL_MATRIX4_ARB */
+ { 21024, 0x00008634 }, /* GL_MATRIX4_NV */
+ { 21038, 0x000088C5 }, /* GL_MATRIX5_ARB */
+ { 21053, 0x00008635 }, /* GL_MATRIX5_NV */
+ { 21067, 0x000088C6 }, /* GL_MATRIX6_ARB */
+ { 21082, 0x00008636 }, /* GL_MATRIX6_NV */
+ { 21096, 0x000088C7 }, /* GL_MATRIX7_ARB */
+ { 21111, 0x00008637 }, /* GL_MATRIX7_NV */
+ { 21125, 0x000088C8 }, /* GL_MATRIX8_ARB */
+ { 21140, 0x000088C9 }, /* GL_MATRIX9_ARB */
+ { 21155, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ { 21181, 0x00008B9E }, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
+ { 21222, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_OES */
+ { 21248, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ { 21282, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_OES */
+ { 21316, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ { 21347, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_OES */
+ { 21378, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ { 21411, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_OES */
+ { 21444, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ { 21475, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_OES */
+ { 21506, 0x00000BA0 }, /* GL_MATRIX_MODE */
+ { 21521, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+ { 21543, 0x00008840 }, /* GL_MATRIX_PALETTE_OES */
+ { 21565, 0x00008008 }, /* GL_MAX */
+ { 21572, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+ { 21595, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE_OES */
+ { 21622, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS */
+ { 21650, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ { 21682, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ { 21708, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ { 21741, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ { 21767, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 21801, 0x00000D32 }, /* GL_MAX_CLIP_DISTANCES */
+ { 21823, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+ { 21842, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
+ { 21867, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ { 21896, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ { 21928, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 21964, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ { 22000, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+ { 22040, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+ { 22066, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+ { 22096, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+ { 22121, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+ { 22150, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ { 22179, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+ { 22212, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES */
+ { 22245, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+ { 22265, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+ { 22289, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+ { 22313, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+ { 22337, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+ { 22362, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+ { 22380, 0x00008008 }, /* GL_MAX_EXT */
+ { 22391, 0x00009125 }, /* GL_MAX_FRAGMENT_INPUT_COMPONENTS */
+ { 22424, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ { 22459, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+ { 22498, 0x00008DFD }, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+ { 22530, 0x00009123 }, /* GL_MAX_GEOMETRY_INPUT_COMPONENTS */
+ { 22563, 0x00009124 }, /* GL_MAX_GEOMETRY_OUTPUT_COMPONENTS */
+ { 22597, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES */
+ { 22629, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
+ { 22665, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS */
+ { 22701, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
+ { 22741, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS */
+ { 22781, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
+ { 22825, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS */
+ { 22860, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
+ { 22899, 0x00008DDD }, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
+ { 22938, 0x00000D31 }, /* GL_MAX_LIGHTS */
+ { 22952, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+ { 22972, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ { 23010, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ { 23039, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+ { 23063, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+ { 23091, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_OES */
+ { 23119, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+ { 23142, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 23179, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 23215, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ { 23242, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ { 23271, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ { 23305, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ { 23341, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ { 23368, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ { 23400, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ { 23436, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ { 23465, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ { 23494, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ { 23522, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ { 23560, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 23604, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 23647, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 23681, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 23720, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 23757, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 23795, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 23838, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 23881, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ { 23911, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ { 23942, 0x00008905 }, /* GL_MAX_PROGRAM_TEXEL_OFFSET */
+ { 23970, 0x00008905 }, /* GL_MAX_PROGRAM_TEXEL_OFFSET_EXT */
+ { 24002, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 24038, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 24074, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ { 24104, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE */
+ { 24134, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ { 24168, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+ { 24201, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
+ { 24226, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ { 24255, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_OES */
+ { 24284, 0x00008D57 }, /* GL_MAX_SAMPLES */
+ { 24299, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
+ { 24318, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ { 24345, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+ { 24365, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+ { 24389, 0x00008C2B }, /* GL_MAX_TEXTURE_BUFFER_SIZE */
+ { 24416, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+ { 24438, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+ { 24464, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ { 24491, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+ { 24522, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+ { 24546, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS_EXT */
+ { 24574, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 24608, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+ { 24628, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ { 24655, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+ { 24676, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+ { 24701, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+ { 24726, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ { 24761, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS */
+ { 24810, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
+ { 24863, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS */
+ { 24906, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
+ { 24953, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS */
+ { 24999, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
+ { 25049, 0x00008B4B }, /* GL_MAX_VARYING_COMPONENTS */
+ { 25075, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+ { 25097, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+ { 25123, 0x00008DFC }, /* GL_MAX_VARYING_VECTORS */
+ { 25146, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+ { 25168, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+ { 25194, 0x00009122 }, /* GL_MAX_VERTEX_OUTPUT_COMPONENTS */
+ { 25226, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ { 25260, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+ { 25298, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ { 25331, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+ { 25368, 0x00008DFB }, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
+ { 25398, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+ { 25422, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_OES */
+ { 25446, 0x00008DDE }, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
+ { 25483, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+ { 25504, 0x00008DF1 }, /* GL_MEDIUM_FLOAT */
+ { 25520, 0x00008DF4 }, /* GL_MEDIUM_INT */
+ { 25534, 0x00008007 }, /* GL_MIN */
+ { 25541, 0x0000802E }, /* GL_MINMAX */
+ { 25551, 0x0000802E }, /* GL_MINMAX_EXT */
+ { 25565, 0x0000802F }, /* GL_MINMAX_FORMAT */
+ { 25582, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+ { 25603, 0x00008030 }, /* GL_MINMAX_SINK */
+ { 25618, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+ { 25637, 0x0000821C }, /* GL_MINOR_VERSION */
+ { 25654, 0x00008007 }, /* GL_MIN_EXT */
+ { 25665, 0x00008904 }, /* GL_MIN_PROGRAM_TEXEL_OFFSET */
+ { 25693, 0x00008904 }, /* GL_MIN_PROGRAM_TEXEL_OFFSET_EXT */
+ { 25725, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+ { 25744, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+ { 25767, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+ { 25790, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+ { 25810, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+ { 25830, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ { 25860, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+ { 25888, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ { 25916, 0x00001700 }, /* GL_MODELVIEW */
+ { 25929, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+ { 25947, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+ { 25966, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+ { 25985, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+ { 26004, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+ { 26023, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+ { 26042, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+ { 26061, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+ { 26080, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+ { 26099, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+ { 26118, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+ { 26137, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+ { 26155, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+ { 26174, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+ { 26193, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+ { 26212, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+ { 26231, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+ { 26250, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+ { 26269, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+ { 26288, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+ { 26307, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+ { 26326, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+ { 26345, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+ { 26363, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+ { 26382, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+ { 26401, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+ { 26419, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+ { 26437, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+ { 26455, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+ { 26473, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+ { 26491, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+ { 26509, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+ { 26527, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+ { 26547, 0x0000898D }, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 26589, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+ { 26616, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+ { 26641, 0x00002100 }, /* GL_MODULATE */
+ { 26653, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+ { 26673, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+ { 26700, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+ { 26725, 0x00000103 }, /* GL_MULT */
+ { 26733, 0x0000809D }, /* GL_MULTISAMPLE */
+ { 26748, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+ { 26768, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+ { 26787, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+ { 26806, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+ { 26830, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+ { 26853, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ { 26883, 0x00002A25 }, /* GL_N3F_V3F */
+ { 26894, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+ { 26914, 0x0000150E }, /* GL_NAND */
+ { 26922, 0x00002600 }, /* GL_NEAREST */
+ { 26933, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ { 26964, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ { 26996, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+ { 27021, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+ { 27047, 0x00000200 }, /* GL_NEVER */
+ { 27056, 0x00001102 }, /* GL_NICEST */
+ { 27066, 0x00000000 }, /* GL_NONE */
+ { 27074, 0x00000000 }, /* GL_NONE_OES */
+ { 27086, 0x00001505 }, /* GL_NOOP */
+ { 27094, 0x00001508 }, /* GL_NOR */
+ { 27101, 0x00000BA1 }, /* GL_NORMALIZE */
+ { 27114, 0x00008075 }, /* GL_NORMAL_ARRAY */
+ { 27130, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ { 27161, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+ { 27196, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+ { 27220, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+ { 27243, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+ { 27264, 0x00008511 }, /* GL_NORMAL_MAP */
+ { 27278, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+ { 27296, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+ { 27313, 0x00008511 }, /* GL_NORMAL_MAP_OES */
+ { 27331, 0x00000205 }, /* GL_NOTEQUAL */
+ { 27343, 0x00000000 }, /* GL_NO_ERROR */
+ { 27355, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ { 27389, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
+ { 27427, 0x0000821D }, /* GL_NUM_EXTENSIONS */
+ { 27445, 0x000087FE }, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
+ { 27479, 0x00008DF9 }, /* GL_NUM_SHADER_BINARY_FORMATS */
+ { 27508, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+ { 27540, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+ { 27582, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+ { 27612, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+ { 27652, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+ { 27683, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+ { 27712, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+ { 27740, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+ { 27770, 0x00002401 }, /* GL_OBJECT_LINEAR */
+ { 27787, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+ { 27813, 0x00002501 }, /* GL_OBJECT_PLANE */
+ { 27829, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+ { 27864, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+ { 27886, 0x00009112 }, /* GL_OBJECT_TYPE */
+ { 27901, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+ { 27920, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+ { 27950, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+ { 27971, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+ { 27999, 0x00000001 }, /* GL_ONE */
+ { 28006, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ { 28034, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+ { 28066, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ { 28094, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+ { 28126, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+ { 28149, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+ { 28172, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+ { 28195, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+ { 28218, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+ { 28236, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+ { 28258, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+ { 28280, 0x00008590 }, /* GL_OPERAND0_RGB */
+ { 28296, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+ { 28316, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+ { 28336, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+ { 28354, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+ { 28376, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+ { 28398, 0x00008591 }, /* GL_OPERAND1_RGB */
+ { 28414, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+ { 28434, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+ { 28454, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+ { 28472, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+ { 28494, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+ { 28516, 0x00008592 }, /* GL_OPERAND2_RGB */
+ { 28532, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+ { 28552, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+ { 28572, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+ { 28593, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+ { 28612, 0x00001507 }, /* GL_OR */
+ { 28618, 0x00000A01 }, /* GL_ORDER */
+ { 28627, 0x0000150D }, /* GL_OR_INVERTED */
+ { 28642, 0x0000150B }, /* GL_OR_REVERSE */
+ { 28656, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+ { 28673, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+ { 28691, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+ { 28712, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+ { 28732, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+ { 28750, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+ { 28769, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+ { 28789, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+ { 28809, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+ { 28827, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+ { 28846, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+ { 28871, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+ { 28895, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+ { 28916, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+ { 28938, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+ { 28960, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+ { 28985, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+ { 29009, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+ { 29030, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+ { 29052, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+ { 29074, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+ { 29096, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ { 29127, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+ { 29147, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ { 29172, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+ { 29192, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ { 29217, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+ { 29237, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ { 29262, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+ { 29282, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ { 29307, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+ { 29327, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ { 29352, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+ { 29372, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ { 29397, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+ { 29417, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ { 29442, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+ { 29462, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ { 29487, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+ { 29507, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ { 29532, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+ { 29552, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ { 29577, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+ { 29595, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
+ { 29616, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ { 29645, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+ { 29678, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+ { 29703, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
+ { 29726, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ { 29757, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+ { 29792, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+ { 29819, 0x00001B00 }, /* GL_POINT */
+ { 29828, 0x00000000 }, /* GL_POINTS */
+ { 29838, 0x00000002 }, /* GL_POINT_BIT */
+ { 29851, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+ { 29881, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+ { 29915, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+ { 29949, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+ { 29984, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ { 30013, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+ { 30046, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+ { 30079, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+ { 30113, 0x00000B11 }, /* GL_POINT_SIZE */
+ { 30127, 0x00008B9F }, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
+ { 30166, 0x00008B9C }, /* GL_POINT_SIZE_ARRAY_OES */
+ { 30190, 0x0000898C }, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
+ { 30222, 0x0000898B }, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
+ { 30253, 0x0000898A }, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
+ { 30282, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+ { 30308, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+ { 30326, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+ { 30348, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+ { 30370, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+ { 30393, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+ { 30411, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+ { 30433, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+ { 30455, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+ { 30478, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+ { 30498, 0x00000B10 }, /* GL_POINT_SMOOTH */
+ { 30514, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+ { 30535, 0x00008861 }, /* GL_POINT_SPRITE */
+ { 30551, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+ { 30571, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ { 30600, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+ { 30619, 0x00008861 }, /* GL_POINT_SPRITE_OES */
+ { 30639, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+ { 30665, 0x00000701 }, /* GL_POINT_TOKEN */
+ { 30680, 0x00000009 }, /* GL_POLYGON */
+ { 30691, 0x00000008 }, /* GL_POLYGON_BIT */
+ { 30706, 0x00000B40 }, /* GL_POLYGON_MODE */
+ { 30722, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+ { 30745, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+ { 30770, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+ { 30793, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+ { 30816, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+ { 30840, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+ { 30864, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+ { 30882, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+ { 30905, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+ { 30924, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+ { 30947, 0x00000703 }, /* GL_POLYGON_TOKEN */
+ { 30964, 0x00001203 }, /* GL_POSITION */
+ { 30976, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ { 31008, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+ { 31044, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ { 31077, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+ { 31114, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ { 31145, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+ { 31180, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ { 31212, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+ { 31248, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 31281, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ { 31313, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+ { 31349, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ { 31382, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+ { 31419, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ { 31449, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+ { 31483, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ { 31514, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+ { 31549, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ { 31580, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+ { 31615, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ { 31647, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+ { 31683, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ { 31713, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+ { 31747, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ { 31778, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+ { 31813, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ { 31845, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ { 31876, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+ { 31911, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ { 31943, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+ { 31979, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+ { 32008, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+ { 32041, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+ { 32071, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+ { 32105, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ { 32144, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ { 32177, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ { 32217, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ { 32251, 0x00008578 }, /* GL_PREVIOUS */
+ { 32263, 0x00008578 }, /* GL_PREVIOUS_ARB */
+ { 32279, 0x00008578 }, /* GL_PREVIOUS_EXT */
+ { 32295, 0x00008577 }, /* GL_PRIMARY_COLOR */
+ { 32312, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+ { 32333, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+ { 32354, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED */
+ { 32378, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED_EXT */
+ { 32406, 0x00008F9D }, /* GL_PRIMITIVE_RESTART */
+ { 32427, 0x00008F9E }, /* GL_PRIMITIVE_RESTART_INDEX */
+ { 32454, 0x00008559 }, /* GL_PRIMITIVE_RESTART_INDEX_NV */
+ { 32484, 0x00008558 }, /* GL_PRIMITIVE_RESTART_NV */
+ { 32508, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 32541, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 32573, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+ { 32596, 0x000087FF }, /* GL_PROGRAM_BINARY_FORMATS_OES */
+ { 32626, 0x00008741 }, /* GL_PROGRAM_BINARY_LENGTH_OES */
+ { 32655, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+ { 32678, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ { 32708, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+ { 32737, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+ { 32765, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+ { 32787, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ { 32815, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ { 32843, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+ { 32865, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+ { 32886, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 32926, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 32965, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 32995, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 33030, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 33063, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 33097, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 33136, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 33175, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+ { 33197, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+ { 33223, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+ { 33247, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE */
+ { 33269, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE_ARB */
+ { 33295, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+ { 33318, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+ { 33340, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+ { 33361, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+ { 33382, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+ { 33409, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 33441, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 33473, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ { 33508, 0x00001701 }, /* GL_PROJECTION */
+ { 33522, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+ { 33543, 0x0000898E }, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 33586, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+ { 33612, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
+ { 33632, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
+ { 33656, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+ { 33677, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+ { 33696, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+ { 33719, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 33758, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ { 33796, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+ { 33816, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY */
+ { 33842, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ { 33872, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+ { 33896, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+ { 33916, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY */
+ { 33942, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ { 33972, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+ { 33996, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+ { 34016, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ { 34049, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ { 34075, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+ { 34105, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE */
+ { 34132, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ { 34163, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+ { 34193, 0x00008A1D }, /* GL_PURGEABLE_APPLE */
+ { 34212, 0x00002003 }, /* GL_Q */
+ { 34217, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+ { 34242, 0x00000007 }, /* GL_QUADS */
+ { 34251, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ { 34295, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
+ { 34343, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+ { 34360, 0x00000008 }, /* GL_QUAD_STRIP */
+ { 34374, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT */
+ { 34401, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ { 34431, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT */
+ { 34455, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
+ { 34482, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+ { 34504, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+ { 34530, 0x00008E14 }, /* GL_QUERY_NO_WAIT */
+ { 34547, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
+ { 34567, 0x00008866 }, /* GL_QUERY_RESULT */
+ { 34583, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+ { 34603, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+ { 34629, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+ { 34659, 0x00008E13 }, /* GL_QUERY_WAIT */
+ { 34673, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
+ { 34690, 0x00002002 }, /* GL_R */
+ { 34695, 0x00008C3A }, /* GL_R11F_G11F_B10F */
+ { 34713, 0x00008F98 }, /* GL_R16_SNORM */
+ { 34726, 0x00002A10 }, /* GL_R3_G3_B2 */
+ { 34738, 0x00008F94 }, /* GL_R8_SNORM */
+ { 34750, 0x00008C89 }, /* GL_RASTERIZER_DISCARD */
+ { 34772, 0x00008C89 }, /* GL_RASTERIZER_DISCARD_EXT */
+ { 34798, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ { 34831, 0x00000C02 }, /* GL_READ_BUFFER */
+ { 34846, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
+ { 34866, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
+ { 34894, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ { 34926, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+ { 34950, 0x000088B8 }, /* GL_READ_ONLY */
+ { 34963, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+ { 34980, 0x000088BA }, /* GL_READ_WRITE */
+ { 34994, 0x000088BA }, /* GL_READ_WRITE_ARB */
+ { 35012, 0x00001903 }, /* GL_RED */
+ { 35019, 0x00008016 }, /* GL_REDUCE */
+ { 35029, 0x00008016 }, /* GL_REDUCE_EXT */
+ { 35043, 0x00000D15 }, /* GL_RED_BIAS */
+ { 35055, 0x00000D52 }, /* GL_RED_BITS */
+ { 35067, 0x00008D94 }, /* GL_RED_INTEGER */
+ { 35082, 0x00008D94 }, /* GL_RED_INTEGER_EXT */
+ { 35101, 0x00000D14 }, /* GL_RED_SCALE */
+ { 35114, 0x00008F90 }, /* GL_RED_SNORM */
+ { 35127, 0x00008512 }, /* GL_REFLECTION_MAP */
+ { 35145, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+ { 35167, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+ { 35188, 0x00008512 }, /* GL_REFLECTION_MAP_OES */
+ { 35210, 0x00008A19 }, /* GL_RELEASED_APPLE */
+ { 35228, 0x00001C00 }, /* GL_RENDER */
+ { 35238, 0x00008D41 }, /* GL_RENDERBUFFER */
+ { 35254, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ { 35281, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE_OES */
+ { 35312, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
+ { 35336, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+ { 35364, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_OES */
+ { 35392, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
+ { 35418, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE_OES */
+ { 35448, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ { 35475, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE_OES */
+ { 35506, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+ { 35526, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
+ { 35553, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE_OES */
+ { 35584, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
+ { 35607, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ { 35634, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_OES */
+ { 35661, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ { 35693, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ { 35729, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
+ { 35765, 0x00008D41 }, /* GL_RENDERBUFFER_OES */
+ { 35785, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
+ { 35810, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE_OES */
+ { 35839, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
+ { 35863, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
+ { 35891, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ { 35920, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE_OES */
+ { 35953, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
+ { 35975, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+ { 36001, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_OES */
+ { 36027, 0x00001F01 }, /* GL_RENDERER */
+ { 36039, 0x00000C40 }, /* GL_RENDER_MODE */
+ { 36054, 0x00002901 }, /* GL_REPEAT */
+ { 36064, 0x00001E01 }, /* GL_REPLACE */
+ { 36075, 0x00008062 }, /* GL_REPLACE_EXT */
+ { 36090, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+ { 36113, 0x0000803A }, /* GL_RESCALE_NORMAL */
+ { 36131, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+ { 36153, 0x00008A1B }, /* GL_RETAINED_APPLE */
+ { 36171, 0x00000102 }, /* GL_RETURN */
+ { 36181, 0x00008F99 }, /* GL_RG16_SNORM */
+ { 36195, 0x00008F95 }, /* GL_RG8_SNORM */
+ { 36208, 0x00001907 }, /* GL_RGB */
+ { 36215, 0x00008052 }, /* GL_RGB10 */
+ { 36224, 0x00008059 }, /* GL_RGB10_A2 */
+ { 36236, 0x00008059 }, /* GL_RGB10_A2_EXT */
+ { 36252, 0x00008052 }, /* GL_RGB10_EXT */
+ { 36265, 0x00008053 }, /* GL_RGB12 */
+ { 36274, 0x00008053 }, /* GL_RGB12_EXT */
+ { 36287, 0x00008054 }, /* GL_RGB16 */
+ { 36296, 0x0000881B }, /* GL_RGB16F */
+ { 36306, 0x00008D89 }, /* GL_RGB16I */
+ { 36316, 0x00008D89 }, /* GL_RGB16I_EXT */
+ { 36330, 0x00008D77 }, /* GL_RGB16UI */
+ { 36341, 0x00008D77 }, /* GL_RGB16UI_EXT */
+ { 36356, 0x00008054 }, /* GL_RGB16_EXT */
+ { 36369, 0x00008F9A }, /* GL_RGB16_SNORM */
+ { 36384, 0x0000804E }, /* GL_RGB2_EXT */
+ { 36396, 0x00008815 }, /* GL_RGB32F */
+ { 36406, 0x00008D83 }, /* GL_RGB32I */
+ { 36416, 0x00008D83 }, /* GL_RGB32I_EXT */
+ { 36430, 0x00008D71 }, /* GL_RGB32UI */
+ { 36441, 0x00008D71 }, /* GL_RGB32UI_EXT */
+ { 36456, 0x0000804F }, /* GL_RGB4 */
+ { 36464, 0x0000804F }, /* GL_RGB4_EXT */
+ { 36476, 0x000083A1 }, /* GL_RGB4_S3TC */
+ { 36489, 0x00008050 }, /* GL_RGB5 */
+ { 36497, 0x00008D62 }, /* GL_RGB565 */
+ { 36507, 0x00008D62 }, /* GL_RGB565_OES */
+ { 36521, 0x00008057 }, /* GL_RGB5_A1 */
+ { 36532, 0x00008057 }, /* GL_RGB5_A1_EXT */
+ { 36547, 0x00008057 }, /* GL_RGB5_A1_OES */
+ { 36562, 0x00008050 }, /* GL_RGB5_EXT */
+ { 36574, 0x00008051 }, /* GL_RGB8 */
+ { 36582, 0x00008D8F }, /* GL_RGB8I */
+ { 36591, 0x00008D8F }, /* GL_RGB8I_EXT */
+ { 36604, 0x00008D7D }, /* GL_RGB8UI */
+ { 36614, 0x00008D7D }, /* GL_RGB8UI_EXT */
+ { 36628, 0x00008051 }, /* GL_RGB8_EXT */
+ { 36640, 0x00008051 }, /* GL_RGB8_OES */
+ { 36652, 0x00008F96 }, /* GL_RGB8_SNORM */
+ { 36666, 0x00008C3D }, /* GL_RGB9_E5 */
+ { 36677, 0x00001908 }, /* GL_RGBA */
+ { 36685, 0x0000805A }, /* GL_RGBA12 */
+ { 36695, 0x0000805A }, /* GL_RGBA12_EXT */
+ { 36709, 0x0000805B }, /* GL_RGBA16 */
+ { 36719, 0x0000881A }, /* GL_RGBA16F */
+ { 36730, 0x00008D88 }, /* GL_RGBA16I */
+ { 36741, 0x00008D88 }, /* GL_RGBA16I_EXT */
+ { 36756, 0x00008D76 }, /* GL_RGBA16UI */
+ { 36768, 0x00008D76 }, /* GL_RGBA16UI_EXT */
+ { 36784, 0x0000805B }, /* GL_RGBA16_EXT */
+ { 36798, 0x00008F9B }, /* GL_RGBA16_SNORM */
+ { 36814, 0x00008055 }, /* GL_RGBA2 */
+ { 36823, 0x00008055 }, /* GL_RGBA2_EXT */
+ { 36836, 0x00008814 }, /* GL_RGBA32F */
+ { 36847, 0x00008D82 }, /* GL_RGBA32I */
+ { 36858, 0x00008D82 }, /* GL_RGBA32I_EXT */
+ { 36873, 0x00008D70 }, /* GL_RGBA32UI */
+ { 36885, 0x00008D70 }, /* GL_RGBA32UI_EXT */
+ { 36901, 0x00008056 }, /* GL_RGBA4 */
+ { 36910, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+ { 36929, 0x00008056 }, /* GL_RGBA4_EXT */
+ { 36942, 0x00008056 }, /* GL_RGBA4_OES */
+ { 36955, 0x000083A3 }, /* GL_RGBA4_S3TC */
+ { 36969, 0x00008058 }, /* GL_RGBA8 */
+ { 36978, 0x00008D8E }, /* GL_RGBA8I */
+ { 36988, 0x00008D8E }, /* GL_RGBA8I_EXT */
+ { 37002, 0x00008D7C }, /* GL_RGBA8UI */
+ { 37013, 0x00008D7C }, /* GL_RGBA8UI_EXT */
+ { 37028, 0x00008058 }, /* GL_RGBA8_EXT */
+ { 37041, 0x00008058 }, /* GL_RGBA8_OES */
+ { 37054, 0x00008F97 }, /* GL_RGBA8_SNORM */
+ { 37069, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+ { 37087, 0x00008D99 }, /* GL_RGBA_INTEGER */
+ { 37103, 0x00008D99 }, /* GL_RGBA_INTEGER_EXT */
+ { 37123, 0x00008D9E }, /* GL_RGBA_INTEGER_MODE_EXT */
+ { 37148, 0x00000C31 }, /* GL_RGBA_MODE */
+ { 37161, 0x000083A2 }, /* GL_RGBA_S3TC */
+ { 37174, 0x00008F93 }, /* GL_RGBA_SNORM */
+ { 37188, 0x00008D98 }, /* GL_RGB_INTEGER */
+ { 37203, 0x00008D98 }, /* GL_RGB_INTEGER_EXT */
+ { 37222, 0x000083A0 }, /* GL_RGB_S3TC */
+ { 37234, 0x00008573 }, /* GL_RGB_SCALE */
+ { 37247, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+ { 37264, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+ { 37281, 0x00008F92 }, /* GL_RGB_SNORM */
+ { 37294, 0x00008F91 }, /* GL_RG_SNORM */
+ { 37306, 0x00000407 }, /* GL_RIGHT */
+ { 37315, 0x00002000 }, /* GL_S */
+ { 37320, 0x00008B5D }, /* GL_SAMPLER_1D */
+ { 37334, 0x00008DC0 }, /* GL_SAMPLER_1D_ARRAY */
+ { 37354, 0x00008DC0 }, /* GL_SAMPLER_1D_ARRAY_EXT */
+ { 37378, 0x00008DC3 }, /* GL_SAMPLER_1D_ARRAY_SHADOW */
+ { 37405, 0x00008DC3 }, /* GL_SAMPLER_1D_ARRAY_SHADOW_EXT */
+ { 37436, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+ { 37457, 0x00008B5E }, /* GL_SAMPLER_2D */
+ { 37471, 0x00008DC1 }, /* GL_SAMPLER_2D_ARRAY */
+ { 37491, 0x00008DC1 }, /* GL_SAMPLER_2D_ARRAY_EXT */
+ { 37515, 0x00008DC4 }, /* GL_SAMPLER_2D_ARRAY_SHADOW */
+ { 37542, 0x00008DC4 }, /* GL_SAMPLER_2D_ARRAY_SHADOW_EXT */
+ { 37573, 0x00008B63 }, /* GL_SAMPLER_2D_RECT */
+ { 37592, 0x00008B64 }, /* GL_SAMPLER_2D_RECT_SHADOW */
+ { 37618, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+ { 37639, 0x00008B5F }, /* GL_SAMPLER_3D */
+ { 37653, 0x00008B5F }, /* GL_SAMPLER_3D_OES */
+ { 37671, 0x00008DC2 }, /* GL_SAMPLER_BUFFER */
+ { 37689, 0x00008DC2 }, /* GL_SAMPLER_BUFFER_EXT */
+ { 37711, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+ { 37727, 0x00008DC5 }, /* GL_SAMPLER_CUBE_SHADOW */
+ { 37750, 0x00008DC5 }, /* GL_SAMPLER_CUBE_SHADOW_EXT */
+ { 37777, 0x000080A9 }, /* GL_SAMPLES */
+ { 37788, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+ { 37804, 0x000080A9 }, /* GL_SAMPLES_ARB */
+ { 37819, 0x00008914 }, /* GL_SAMPLES_PASSED */
+ { 37837, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+ { 37859, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ { 37887, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+ { 37919, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+ { 37942, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+ { 37969, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+ { 37987, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+ { 38010, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+ { 38032, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+ { 38051, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+ { 38074, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+ { 38100, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+ { 38130, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+ { 38155, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+ { 38184, 0x00080000 }, /* GL_SCISSOR_BIT */
+ { 38199, 0x00000C10 }, /* GL_SCISSOR_BOX */
+ { 38214, 0x00000C11 }, /* GL_SCISSOR_TEST */
+ { 38230, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+ { 38255, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ { 38295, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 38339, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ { 38372, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ { 38402, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ { 38434, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ { 38464, 0x00001C02 }, /* GL_SELECT */
+ { 38474, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+ { 38502, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+ { 38527, 0x00008012 }, /* GL_SEPARABLE_2D */
+ { 38543, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS */
+ { 38563, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS_EXT */
+ { 38587, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+ { 38614, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+ { 38645, 0x0000150F }, /* GL_SET */
+ { 38652, 0x00008DF8 }, /* GL_SHADER_BINARY_FORMATS */
+ { 38677, 0x00008DFA }, /* GL_SHADER_COMPILER */
+ { 38696, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+ { 38717, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+ { 38741, 0x00008B4F }, /* GL_SHADER_TYPE */
+ { 38756, 0x00000B54 }, /* GL_SHADE_MODEL */
+ { 38771, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+ { 38799, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+ { 38822, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ { 38852, 0x00001601 }, /* GL_SHININESS */
+ { 38865, 0x00001402 }, /* GL_SHORT */
+ { 38874, 0x00009119 }, /* GL_SIGNALED */
+ { 38886, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
+ { 38907, 0x000081F9 }, /* GL_SINGLE_COLOR */
+ { 38923, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+ { 38943, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+ { 38962, 0x00008C46 }, /* GL_SLUMINANCE */
+ { 38976, 0x00008C47 }, /* GL_SLUMINANCE8 */
+ { 38991, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
+ { 39013, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
+ { 39033, 0x00001D01 }, /* GL_SMOOTH */
+ { 39043, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+ { 39076, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+ { 39103, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+ { 39136, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+ { 39163, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+ { 39180, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+ { 39201, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+ { 39222, 0x00008580 }, /* GL_SOURCE0_RGB */
+ { 39237, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+ { 39256, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+ { 39275, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+ { 39292, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+ { 39313, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+ { 39334, 0x00008581 }, /* GL_SOURCE1_RGB */
+ { 39349, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+ { 39368, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+ { 39387, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+ { 39404, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+ { 39425, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+ { 39446, 0x00008582 }, /* GL_SOURCE2_RGB */
+ { 39461, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+ { 39480, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+ { 39499, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+ { 39519, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+ { 39537, 0x00001202 }, /* GL_SPECULAR */
+ { 39549, 0x00002402 }, /* GL_SPHERE_MAP */
+ { 39563, 0x00001206 }, /* GL_SPOT_CUTOFF */
+ { 39578, 0x00001204 }, /* GL_SPOT_DIRECTION */
+ { 39596, 0x00001205 }, /* GL_SPOT_EXPONENT */
+ { 39613, 0x00008588 }, /* GL_SRC0_ALPHA */
+ { 39627, 0x00008580 }, /* GL_SRC0_RGB */
+ { 39639, 0x00008589 }, /* GL_SRC1_ALPHA */
+ { 39653, 0x00008581 }, /* GL_SRC1_RGB */
+ { 39665, 0x0000858A }, /* GL_SRC2_ALPHA */
+ { 39679, 0x00008582 }, /* GL_SRC2_RGB */
+ { 39691, 0x00000302 }, /* GL_SRC_ALPHA */
+ { 39704, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+ { 39726, 0x00000300 }, /* GL_SRC_COLOR */
+ { 39739, 0x00008C40 }, /* GL_SRGB */
+ { 39747, 0x00008C41 }, /* GL_SRGB8 */
+ { 39756, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
+ { 39772, 0x00008C42 }, /* GL_SRGB_ALPHA */
+ { 39786, 0x00000503 }, /* GL_STACK_OVERFLOW */
+ { 39804, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+ { 39823, 0x000088E6 }, /* GL_STATIC_COPY */
+ { 39838, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+ { 39857, 0x000088E4 }, /* GL_STATIC_DRAW */
+ { 39872, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+ { 39891, 0x000088E5 }, /* GL_STATIC_READ */
+ { 39906, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+ { 39925, 0x00001802 }, /* GL_STENCIL */
+ { 39936, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
+ { 39958, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+ { 39984, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_OES */
+ { 40010, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+ { 40031, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
+ { 40056, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+ { 40077, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
+ { 40102, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ { 40134, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
+ { 40170, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ { 40202, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
+ { 40238, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+ { 40258, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+ { 40285, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+ { 40311, 0x00000D57 }, /* GL_STENCIL_BITS */
+ { 40327, 0x00008224 }, /* GL_STENCIL_BUFFER */
+ { 40345, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+ { 40367, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+ { 40390, 0x00000B94 }, /* GL_STENCIL_FAIL */
+ { 40406, 0x00000B92 }, /* GL_STENCIL_FUNC */
+ { 40422, 0x00001901 }, /* GL_STENCIL_INDEX */
+ { 40439, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
+ { 40457, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
+ { 40476, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+ { 40499, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+ { 40521, 0x00008D46 }, /* GL_STENCIL_INDEX1_OES */
+ { 40543, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
+ { 40561, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+ { 40583, 0x00008D47 }, /* GL_STENCIL_INDEX4_OES */
+ { 40605, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
+ { 40623, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+ { 40645, 0x00008D48 }, /* GL_STENCIL_INDEX8_OES */
+ { 40667, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+ { 40688, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ { 40715, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+ { 40742, 0x00000B97 }, /* GL_STENCIL_REF */
+ { 40757, 0x00000B90 }, /* GL_STENCIL_TEST */
+ { 40773, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ { 40802, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+ { 40824, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+ { 40845, 0x00000C33 }, /* GL_STEREO */
+ { 40855, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
+ { 40879, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
+ { 40904, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
+ { 40928, 0x000088E2 }, /* GL_STREAM_COPY */
+ { 40943, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+ { 40962, 0x000088E0 }, /* GL_STREAM_DRAW */
+ { 40977, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+ { 40996, 0x000088E1 }, /* GL_STREAM_READ */
+ { 41011, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+ { 41030, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+ { 41047, 0x000084E7 }, /* GL_SUBTRACT */
+ { 41059, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+ { 41075, 0x00009113 }, /* GL_SYNC_CONDITION */
+ { 41093, 0x00009116 }, /* GL_SYNC_FENCE */
+ { 41107, 0x00009115 }, /* GL_SYNC_FLAGS */
+ { 41121, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
+ { 41148, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ { 41178, 0x00009114 }, /* GL_SYNC_STATUS */
+ { 41193, 0x00002001 }, /* GL_T */
+ { 41198, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+ { 41213, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+ { 41232, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+ { 41248, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+ { 41263, 0x00002A27 }, /* GL_T2F_V3F */
+ { 41274, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+ { 41293, 0x00002A28 }, /* GL_T4F_V4F */
+ { 41304, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+ { 41327, 0x00001702 }, /* GL_TEXTURE */
+ { 41338, 0x000084C0 }, /* GL_TEXTURE0 */
+ { 41350, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+ { 41366, 0x000084C1 }, /* GL_TEXTURE1 */
+ { 41378, 0x000084CA }, /* GL_TEXTURE10 */
+ { 41391, 0x000084CA }, /* GL_TEXTURE10_ARB */
+ { 41408, 0x000084CB }, /* GL_TEXTURE11 */
+ { 41421, 0x000084CB }, /* GL_TEXTURE11_ARB */
+ { 41438, 0x000084CC }, /* GL_TEXTURE12 */
+ { 41451, 0x000084CC }, /* GL_TEXTURE12_ARB */
+ { 41468, 0x000084CD }, /* GL_TEXTURE13 */
+ { 41481, 0x000084CD }, /* GL_TEXTURE13_ARB */
+ { 41498, 0x000084CE }, /* GL_TEXTURE14 */
+ { 41511, 0x000084CE }, /* GL_TEXTURE14_ARB */
+ { 41528, 0x000084CF }, /* GL_TEXTURE15 */
+ { 41541, 0x000084CF }, /* GL_TEXTURE15_ARB */
+ { 41558, 0x000084D0 }, /* GL_TEXTURE16 */
+ { 41571, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+ { 41588, 0x000084D1 }, /* GL_TEXTURE17 */
+ { 41601, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+ { 41618, 0x000084D2 }, /* GL_TEXTURE18 */
+ { 41631, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+ { 41648, 0x000084D3 }, /* GL_TEXTURE19 */
+ { 41661, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+ { 41678, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+ { 41694, 0x000084C2 }, /* GL_TEXTURE2 */
+ { 41706, 0x000084D4 }, /* GL_TEXTURE20 */
+ { 41719, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+ { 41736, 0x000084D5 }, /* GL_TEXTURE21 */
+ { 41749, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+ { 41766, 0x000084D6 }, /* GL_TEXTURE22 */
+ { 41779, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+ { 41796, 0x000084D7 }, /* GL_TEXTURE23 */
+ { 41809, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+ { 41826, 0x000084D8 }, /* GL_TEXTURE24 */
+ { 41839, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+ { 41856, 0x000084D9 }, /* GL_TEXTURE25 */
+ { 41869, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+ { 41886, 0x000084DA }, /* GL_TEXTURE26 */
+ { 41899, 0x000084DA }, /* GL_TEXTURE26_ARB */
+ { 41916, 0x000084DB }, /* GL_TEXTURE27 */
+ { 41929, 0x000084DB }, /* GL_TEXTURE27_ARB */
+ { 41946, 0x000084DC }, /* GL_TEXTURE28 */
+ { 41959, 0x000084DC }, /* GL_TEXTURE28_ARB */
+ { 41976, 0x000084DD }, /* GL_TEXTURE29 */
+ { 41989, 0x000084DD }, /* GL_TEXTURE29_ARB */
+ { 42006, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+ { 42022, 0x000084C3 }, /* GL_TEXTURE3 */
+ { 42034, 0x000084DE }, /* GL_TEXTURE30 */
+ { 42047, 0x000084DE }, /* GL_TEXTURE30_ARB */
+ { 42064, 0x000084DF }, /* GL_TEXTURE31 */
+ { 42077, 0x000084DF }, /* GL_TEXTURE31_ARB */
+ { 42094, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+ { 42110, 0x000084C4 }, /* GL_TEXTURE4 */
+ { 42122, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+ { 42138, 0x000084C5 }, /* GL_TEXTURE5 */
+ { 42150, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+ { 42166, 0x000084C6 }, /* GL_TEXTURE6 */
+ { 42178, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+ { 42194, 0x000084C7 }, /* GL_TEXTURE7 */
+ { 42206, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+ { 42222, 0x000084C8 }, /* GL_TEXTURE8 */
+ { 42234, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+ { 42250, 0x000084C9 }, /* GL_TEXTURE9 */
+ { 42262, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+ { 42278, 0x00000DE0 }, /* GL_TEXTURE_1D */
+ { 42292, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY */
+ { 42312, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
+ { 42336, 0x00000DE1 }, /* GL_TEXTURE_2D */
+ { 42350, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY */
+ { 42370, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
+ { 42394, 0x0000806F }, /* GL_TEXTURE_3D */
+ { 42408, 0x0000806F }, /* GL_TEXTURE_3D_OES */
+ { 42426, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+ { 42448, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+ { 42474, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+ { 42496, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+ { 42518, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY */
+ { 42546, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ { 42578, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+ { 42600, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY */
+ { 42628, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ { 42660, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+ { 42682, 0x0000806A }, /* GL_TEXTURE_BINDING_3D_OES */
+ { 42708, 0x00008C2C }, /* GL_TEXTURE_BINDING_BUFFER */
+ { 42734, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ { 42762, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+ { 42794, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_OES */
+ { 42826, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE */
+ { 42855, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ { 42888, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+ { 42920, 0x00040000 }, /* GL_TEXTURE_BIT */
+ { 42935, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+ { 42956, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+ { 42981, 0x00001005 }, /* GL_TEXTURE_BORDER */
+ { 42999, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+ { 43023, 0x00008C2A }, /* GL_TEXTURE_BUFFER */
+ { 43041, 0x00008C2D }, /* GL_TEXTURE_BUFFER_DATA_STORE_BINDING */
+ { 43078, 0x00008C2E }, /* GL_TEXTURE_BUFFER_FORMAT */
+ { 43103, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ { 43134, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ { 43164, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ { 43194, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ { 43229, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ { 43260, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 43298, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ { 43325, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ { 43357, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ { 43391, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+ { 43415, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+ { 43443, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+ { 43467, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+ { 43495, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ { 43528, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+ { 43552, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+ { 43574, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+ { 43596, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+ { 43622, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 43656, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ { 43689, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+ { 43726, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+ { 43754, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+ { 43786, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+ { 43809, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ { 43847, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+ { 43889, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ { 43920, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ { 43948, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ { 43978, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ { 44006, 0x00008B9D }, /* GL_TEXTURE_CROP_RECT_OES */
+ { 44031, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+ { 44051, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+ { 44075, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ { 44106, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+ { 44141, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES */
+ { 44176, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ { 44207, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+ { 44242, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES */
+ { 44277, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ { 44308, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+ { 44343, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES */
+ { 44378, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_OES */
+ { 44402, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ { 44433, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+ { 44468, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES */
+ { 44503, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ { 44534, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+ { 44569, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES */
+ { 44604, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ { 44635, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+ { 44670, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES */
+ { 44705, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ { 44734, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+ { 44751, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+ { 44773, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+ { 44799, 0x00002300 }, /* GL_TEXTURE_ENV */
+ { 44814, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+ { 44835, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+ { 44855, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+ { 44881, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL_EXT */
+ { 44911, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+ { 44931, 0x00002500 }, /* GL_TEXTURE_GEN_MODE_OES */
+ { 44955, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+ { 44972, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+ { 44989, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+ { 45006, 0x00008D60 }, /* GL_TEXTURE_GEN_STR_OES */
+ { 45029, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+ { 45046, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ { 45071, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+ { 45093, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+ { 45119, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+ { 45137, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ { 45163, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+ { 45189, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+ { 45219, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+ { 45246, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ { 45271, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+ { 45291, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+ { 45315, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ { 45342, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ { 45369, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ { 45396, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+ { 45422, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+ { 45452, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+ { 45474, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+ { 45492, 0x0000898F }, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 45532, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 45562, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ { 45590, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ { 45618, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ { 45646, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+ { 45667, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+ { 45686, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+ { 45708, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+ { 45727, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+ { 45747, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ { 45777, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ { 45808, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE */
+ { 45829, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+ { 45854, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+ { 45878, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+ { 45898, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+ { 45922, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+ { 45942, 0x00008C3F }, /* GL_TEXTURE_SHARED_SIZE */
+ { 45965, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+ { 45988, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
+ { 46012, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
+ { 46040, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ { 46070, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+ { 46095, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ { 46129, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+ { 46146, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+ { 46164, 0x00008072 }, /* GL_TEXTURE_WRAP_R_OES */
+ { 46186, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+ { 46204, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+ { 46222, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
+ { 46241, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 46261, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 46280, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 46309, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 46326, 0x00008E22 }, /* GL_TRANSFORM_FEEDBACK */
+ { 46348, 0x00008E25 }, /* GL_TRANSFORM_FEEDBACK_BINDING */
+ { 46378, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER */
+ { 46407, 0x00008E24 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+ { 46443, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING */
+ { 46480, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
+ { 46521, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
+ { 46554, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE */
+ { 46588, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
+ { 46626, 0x00008E23 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+ { 46662, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE */
+ { 46696, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
+ { 46734, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START */
+ { 46769, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
+ { 46808, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN */
+ { 46849, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
+ { 46894, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS */
+ { 46925, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
+ { 46960, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH */
+ { 47001, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
+ { 47046, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 47072, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 47102, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 47134, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 47164, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 47198, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 47214, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 47245, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 47280, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 47308, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 47340, 0x00000004 }, /* GL_TRIANGLES */
+ { 47353, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY */
+ { 47376, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY_ARB */
+ { 47403, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 47419, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 47440, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 47458, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY */
+ { 47486, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
+ { 47518, 0x00000001 }, /* GL_TRUE */
+ { 47526, 0x00008A1C }, /* GL_UNDEFINED_APPLE */
+ { 47545, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 47565, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 47588, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 47608, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 47629, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 47651, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 47673, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 47693, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 47714, 0x00009118 }, /* GL_UNSIGNALED */
+ { 47728, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 47745, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 47772, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 47795, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 47811, 0x00008C3B }, /* GL_UNSIGNED_INT_10F_11F_11F_REV */
+ { 47843, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 47870, 0x00008DF6 }, /* GL_UNSIGNED_INT_10_10_10_2_OES */
+ { 47901, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
+ { 47922, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
+ { 47947, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 47971, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_OES */
+ { 47996, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 48027, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV_EXT */
+ { 48062, 0x00008C3E }, /* GL_UNSIGNED_INT_5_9_9_9_REV */
+ { 48090, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 48114, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 48142, 0x00008DD1 }, /* GL_UNSIGNED_INT_SAMPLER_1D */
+ { 48169, 0x00008DD6 }, /* GL_UNSIGNED_INT_SAMPLER_1D_ARRAY */
+ { 48202, 0x00008DD6 }, /* GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT */
+ { 48239, 0x00008DD1 }, /* GL_UNSIGNED_INT_SAMPLER_1D_EXT */
+ { 48270, 0x00008DD2 }, /* GL_UNSIGNED_INT_SAMPLER_2D */
+ { 48297, 0x00008DD7 }, /* GL_UNSIGNED_INT_SAMPLER_2D_ARRAY */
+ { 48330, 0x00008DD7 }, /* GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT */
+ { 48367, 0x00008DD2 }, /* GL_UNSIGNED_INT_SAMPLER_2D_EXT */
+ { 48398, 0x00008DD5 }, /* GL_UNSIGNED_INT_SAMPLER_2D_RECT */
+ { 48430, 0x00008DD5 }, /* GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT */
+ { 48466, 0x00008DD3 }, /* GL_UNSIGNED_INT_SAMPLER_3D */
+ { 48493, 0x00008DD3 }, /* GL_UNSIGNED_INT_SAMPLER_3D_EXT */
+ { 48524, 0x00008DD8 }, /* GL_UNSIGNED_INT_SAMPLER_BUFFER */
+ { 48555, 0x00008DD8 }, /* GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT */
+ { 48590, 0x00008DD4 }, /* GL_UNSIGNED_INT_SAMPLER_CUBE */
+ { 48619, 0x00008DD4 }, /* GL_UNSIGNED_INT_SAMPLER_CUBE_EXT */
+ { 48652, 0x00008DC6 }, /* GL_UNSIGNED_INT_VEC2 */
+ { 48673, 0x00008DC6 }, /* GL_UNSIGNED_INT_VEC2_EXT */
+ { 48698, 0x00008DC7 }, /* GL_UNSIGNED_INT_VEC3 */
+ { 48719, 0x00008DC7 }, /* GL_UNSIGNED_INT_VEC3_EXT */
+ { 48744, 0x00008DC8 }, /* GL_UNSIGNED_INT_VEC4 */
+ { 48765, 0x00008DC8 }, /* GL_UNSIGNED_INT_VEC4_EXT */
+ { 48790, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
+ { 48813, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 48831, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 48861, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT */
+ { 48895, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 48921, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 48951, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT */
+ { 48985, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 49011, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 49035, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 49063, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 49091, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 49118, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 49150, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 49181, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 49195, 0x00002A20 }, /* GL_V2F */
+ { 49202, 0x00002A21 }, /* GL_V3F */
+ { 49209, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 49228, 0x00001F00 }, /* GL_VENDOR */
+ { 49238, 0x00001F02 }, /* GL_VERSION */
+ { 49249, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 49265, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
+ { 49289, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 49319, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 49350, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 49385, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 49409, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 49430, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 49453, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 49474, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 49501, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 49529, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 49557, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 49585, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 49613, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 49641, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 49669, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 49696, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 49723, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 49750, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 49777, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 49804, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 49831, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 49858, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 49885, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 49912, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 49950, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 49992, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 50023, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 50058, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */
+ { 50089, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT */
+ { 50124, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 50158, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 50196, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 50227, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 50262, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 50290, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 50322, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 50352, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 50386, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 50414, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 50446, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 50466, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 50488, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 50517, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 50538, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 50567, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 50600, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 50632, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 50659, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 50690, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 50720, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 50737, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 50758, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 50785, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 50797, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 50813, 0x00008A1A }, /* GL_VOLATILE_APPLE */
+ { 50831, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 50846, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 50866, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 50897, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 50932, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_OES */
+ { 50967, 0x000086AD }, /* GL_WEIGHT_ARRAY_OES */
+ { 50987, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 51015, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_OES */
+ { 51043, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 51068, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_OES */
+ { 51093, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 51120, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_OES */
+ { 51147, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 51172, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_OES */
+ { 51197, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 51221, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 51240, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 51254, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 51272, 0x000088B9 }, /* GL_WRITE_ONLY_OES */
+ { 51290, 0x00001506 }, /* GL_XOR */
+ { 51297, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 51316, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 51330, 0x00000000 }, /* GL_ZERO */
+ { 51338, 0x00000D16 }, /* GL_ZOOM_X */
+ { 51348, 0x00000D17 }, /* GL_ZOOM_Y */
};
-static const unsigned reduced_enums[1425] =
+static const unsigned reduced_enums[1551] =
{
- 500, /* GL_FALSE */
- 760, /* GL_LINES */
- 763, /* GL_LINE_LOOP */
- 770, /* GL_LINE_STRIP */
- 1936, /* GL_TRIANGLES */
- 1940, /* GL_TRIANGLE_STRIP */
- 1938, /* GL_TRIANGLE_FAN */
- 1395, /* GL_QUADS */
- 1399, /* GL_QUAD_STRIP */
- 1273, /* GL_POLYGON */
- 761, /* GL_LINES_ADJACENCY_ARB */
- 771, /* GL_LINE_STRIP_ADJACENCY_ARB */
- 1937, /* GL_TRIANGLES_ADJACENCY_ARB */
- 1941, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
- 1285, /* GL_POLYGON_STIPPLE_BIT */
- 1228, /* GL_PIXEL_MODE_BIT */
- 747, /* GL_LIGHTING_BIT */
- 532, /* GL_FOG_BIT */
+ 535, /* GL_FALSE */
+ 827, /* GL_LINES */
+ 831, /* GL_LINE_LOOP */
+ 838, /* GL_LINE_STRIP */
+ 2135, /* GL_TRIANGLES */
+ 2140, /* GL_TRIANGLE_STRIP */
+ 2138, /* GL_TRIANGLE_FAN */
+ 1507, /* GL_QUADS */
+ 1511, /* GL_QUAD_STRIP */
+ 1378, /* GL_POLYGON */
+ 828, /* GL_LINES_ADJACENCY */
+ 839, /* GL_LINE_STRIP_ADJACENCY */
+ 2136, /* GL_TRIANGLES_ADJACENCY */
+ 2141, /* GL_TRIANGLE_STRIP_ADJACENCY */
+ 1390, /* GL_POLYGON_STIPPLE_BIT */
+ 1333, /* GL_PIXEL_MODE_BIT */
+ 814, /* GL_LIGHTING_BIT */
+ 568, /* GL_FOG_BIT */
8, /* GL_ACCUM */
- 781, /* GL_LOAD */
- 1473, /* GL_RETURN */
- 1096, /* GL_MULT */
- 23, /* GL_ADD */
- 1112, /* GL_NEVER */
- 737, /* GL_LESS */
- 490, /* GL_EQUAL */
- 736, /* GL_LEQUAL */
- 649, /* GL_GREATER */
- 1129, /* GL_NOTEQUAL */
- 648, /* GL_GEQUAL */
- 47, /* GL_ALWAYS */
- 1624, /* GL_SRC_COLOR */
- 1161, /* GL_ONE_MINUS_SRC_COLOR */
- 1622, /* GL_SRC_ALPHA */
- 1160, /* GL_ONE_MINUS_SRC_ALPHA */
- 469, /* GL_DST_ALPHA */
- 1158, /* GL_ONE_MINUS_DST_ALPHA */
- 470, /* GL_DST_COLOR */
- 1159, /* GL_ONE_MINUS_DST_COLOR */
- 1623, /* GL_SRC_ALPHA_SATURATE */
- 629, /* GL_FRONT_LEFT */
- 630, /* GL_FRONT_RIGHT */
- 69, /* GL_BACK_LEFT */
- 70, /* GL_BACK_RIGHT */
- 626, /* GL_FRONT */
- 68, /* GL_BACK */
- 735, /* GL_LEFT */
- 1521, /* GL_RIGHT */
- 627, /* GL_FRONT_AND_BACK */
- 63, /* GL_AUX0 */
- 64, /* GL_AUX1 */
- 65, /* GL_AUX2 */
- 66, /* GL_AUX3 */
- 723, /* GL_INVALID_ENUM */
- 728, /* GL_INVALID_VALUE */
- 727, /* GL_INVALID_OPERATION */
- 1629, /* GL_STACK_OVERFLOW */
- 1630, /* GL_STACK_UNDERFLOW */
- 1186, /* GL_OUT_OF_MEMORY */
- 724, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ 850, /* GL_LOAD */
+ 1596, /* GL_RETURN */
+ 1200, /* GL_MULT */
+ 24, /* GL_ADD */
+ 1216, /* GL_NEVER */
+ 804, /* GL_LESS */
+ 525, /* GL_EQUAL */
+ 803, /* GL_LEQUAL */
+ 691, /* GL_GREATER */
+ 1233, /* GL_NOTEQUAL */
+ 690, /* GL_GEQUAL */
+ 55, /* GL_ALWAYS */
+ 1803, /* GL_SRC_COLOR */
+ 1266, /* GL_ONE_MINUS_SRC_COLOR */
+ 1801, /* GL_SRC_ALPHA */
+ 1265, /* GL_ONE_MINUS_SRC_ALPHA */
+ 504, /* GL_DST_ALPHA */
+ 1263, /* GL_ONE_MINUS_DST_ALPHA */
+ 505, /* GL_DST_COLOR */
+ 1264, /* GL_ONE_MINUS_DST_COLOR */
+ 1802, /* GL_SRC_ALPHA_SATURATE */
+ 667, /* GL_FRONT_LEFT */
+ 668, /* GL_FRONT_RIGHT */
+ 77, /* GL_BACK_LEFT */
+ 78, /* GL_BACK_RIGHT */
+ 664, /* GL_FRONT */
+ 76, /* GL_BACK */
+ 802, /* GL_LEFT */
+ 1685, /* GL_RIGHT */
+ 665, /* GL_FRONT_AND_BACK */
+ 71, /* GL_AUX0 */
+ 72, /* GL_AUX1 */
+ 73, /* GL_AUX2 */
+ 74, /* GL_AUX3 */
+ 790, /* GL_INVALID_ENUM */
+ 795, /* GL_INVALID_VALUE */
+ 794, /* GL_INVALID_OPERATION */
+ 1808, /* GL_STACK_OVERFLOW */
+ 1809, /* GL_STACK_UNDERFLOW */
+ 1291, /* GL_OUT_OF_MEMORY */
+ 791, /* GL_INVALID_FRAMEBUFFER_OPERATION */
0, /* GL_2D */
2, /* GL_3D */
3, /* GL_3D_COLOR */
4, /* GL_3D_COLOR_TEXTURE */
6, /* GL_4D_COLOR_TEXTURE */
- 1206, /* GL_PASS_THROUGH_TOKEN */
- 1272, /* GL_POINT_TOKEN */
- 772, /* GL_LINE_TOKEN */
- 1286, /* GL_POLYGON_TOKEN */
- 75, /* GL_BITMAP_TOKEN */
- 468, /* GL_DRAW_PIXEL_TOKEN */
- 315, /* GL_COPY_PIXEL_TOKEN */
- 764, /* GL_LINE_RESET_TOKEN */
- 493, /* GL_EXP */
- 494, /* GL_EXP2 */
- 352, /* GL_CW */
- 137, /* GL_CCW */
- 158, /* GL_COEFF */
- 1183, /* GL_ORDER */
- 405, /* GL_DOMAIN */
- 325, /* GL_CURRENT_COLOR */
- 328, /* GL_CURRENT_INDEX */
- 334, /* GL_CURRENT_NORMAL */
- 348, /* GL_CURRENT_TEXTURE_COORDS */
- 340, /* GL_CURRENT_RASTER_COLOR */
- 342, /* GL_CURRENT_RASTER_INDEX */
- 346, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
- 343, /* GL_CURRENT_RASTER_POSITION */
- 344, /* GL_CURRENT_RASTER_POSITION_VALID */
- 341, /* GL_CURRENT_RASTER_DISTANCE */
- 1264, /* GL_POINT_SMOOTH */
- 1248, /* GL_POINT_SIZE */
- 1263, /* GL_POINT_SIZE_RANGE */
- 1254, /* GL_POINT_SIZE_GRANULARITY */
- 765, /* GL_LINE_SMOOTH */
- 773, /* GL_LINE_WIDTH */
- 775, /* GL_LINE_WIDTH_RANGE */
- 774, /* GL_LINE_WIDTH_GRANULARITY */
- 767, /* GL_LINE_STIPPLE */
- 768, /* GL_LINE_STIPPLE_PATTERN */
- 769, /* GL_LINE_STIPPLE_REPEAT */
- 780, /* GL_LIST_MODE */
- 963, /* GL_MAX_LIST_NESTING */
- 777, /* GL_LIST_BASE */
- 779, /* GL_LIST_INDEX */
- 1275, /* GL_POLYGON_MODE */
- 1282, /* GL_POLYGON_SMOOTH */
- 1284, /* GL_POLYGON_STIPPLE */
- 479, /* GL_EDGE_FLAG */
- 318, /* GL_CULL_FACE */
- 319, /* GL_CULL_FACE_MODE */
- 628, /* GL_FRONT_FACE */
- 746, /* GL_LIGHTING */
- 751, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- 752, /* GL_LIGHT_MODEL_TWO_SIDE */
- 748, /* GL_LIGHT_MODEL_AMBIENT */
- 1571, /* GL_SHADE_MODEL */
- 206, /* GL_COLOR_MATERIAL_FACE */
- 207, /* GL_COLOR_MATERIAL_PARAMETER */
- 205, /* GL_COLOR_MATERIAL */
- 531, /* GL_FOG */
- 553, /* GL_FOG_INDEX */
- 549, /* GL_FOG_DENSITY */
- 557, /* GL_FOG_START */
- 551, /* GL_FOG_END */
- 554, /* GL_FOG_MODE */
- 533, /* GL_FOG_COLOR */
- 390, /* GL_DEPTH_RANGE */
- 399, /* GL_DEPTH_TEST */
- 402, /* GL_DEPTH_WRITEMASK */
- 375, /* GL_DEPTH_CLEAR_VALUE */
- 389, /* GL_DEPTH_FUNC */
+ 1311, /* GL_PASS_THROUGH_TOKEN */
+ 1377, /* GL_POINT_TOKEN */
+ 841, /* GL_LINE_TOKEN */
+ 1391, /* GL_POLYGON_TOKEN */
+ 87, /* GL_BITMAP_TOKEN */
+ 503, /* GL_DRAW_PIXEL_TOKEN */
+ 349, /* GL_COPY_PIXEL_TOKEN */
+ 832, /* GL_LINE_RESET_TOKEN */
+ 528, /* GL_EXP */
+ 529, /* GL_EXP2 */
+ 386, /* GL_CW */
+ 154, /* GL_CCW */
+ 184, /* GL_COEFF */
+ 1288, /* GL_ORDER */
+ 440, /* GL_DOMAIN */
+ 359, /* GL_CURRENT_COLOR */
+ 362, /* GL_CURRENT_INDEX */
+ 368, /* GL_CURRENT_NORMAL */
+ 382, /* GL_CURRENT_TEXTURE_COORDS */
+ 374, /* GL_CURRENT_RASTER_COLOR */
+ 376, /* GL_CURRENT_RASTER_INDEX */
+ 380, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ 377, /* GL_CURRENT_RASTER_POSITION */
+ 378, /* GL_CURRENT_RASTER_POSITION_VALID */
+ 375, /* GL_CURRENT_RASTER_DISTANCE */
+ 1369, /* GL_POINT_SMOOTH */
+ 1353, /* GL_POINT_SIZE */
+ 1368, /* GL_POINT_SIZE_RANGE */
+ 1359, /* GL_POINT_SIZE_GRANULARITY */
+ 833, /* GL_LINE_SMOOTH */
+ 842, /* GL_LINE_WIDTH */
+ 844, /* GL_LINE_WIDTH_RANGE */
+ 843, /* GL_LINE_WIDTH_GRANULARITY */
+ 835, /* GL_LINE_STIPPLE */
+ 836, /* GL_LINE_STIPPLE_PATTERN */
+ 837, /* GL_LINE_STIPPLE_REPEAT */
+ 849, /* GL_LIST_MODE */
+ 1056, /* GL_MAX_LIST_NESTING */
+ 846, /* GL_LIST_BASE */
+ 848, /* GL_LIST_INDEX */
+ 1380, /* GL_POLYGON_MODE */
+ 1387, /* GL_POLYGON_SMOOTH */
+ 1389, /* GL_POLYGON_STIPPLE */
+ 514, /* GL_EDGE_FLAG */
+ 352, /* GL_CULL_FACE */
+ 353, /* GL_CULL_FACE_MODE */
+ 666, /* GL_FRONT_FACE */
+ 813, /* GL_LIGHTING */
+ 818, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ 819, /* GL_LIGHT_MODEL_TWO_SIDE */
+ 815, /* GL_LIGHT_MODEL_AMBIENT */
+ 1750, /* GL_SHADE_MODEL */
+ 232, /* GL_COLOR_MATERIAL_FACE */
+ 233, /* GL_COLOR_MATERIAL_PARAMETER */
+ 231, /* GL_COLOR_MATERIAL */
+ 567, /* GL_FOG */
+ 589, /* GL_FOG_INDEX */
+ 585, /* GL_FOG_DENSITY */
+ 593, /* GL_FOG_START */
+ 587, /* GL_FOG_END */
+ 590, /* GL_FOG_MODE */
+ 569, /* GL_FOG_COLOR */
+ 425, /* GL_DEPTH_RANGE */
+ 434, /* GL_DEPTH_TEST */
+ 437, /* GL_DEPTH_WRITEMASK */
+ 410, /* GL_DEPTH_CLEAR_VALUE */
+ 424, /* GL_DEPTH_FUNC */
12, /* GL_ACCUM_CLEAR_VALUE */
- 1673, /* GL_STENCIL_TEST */
- 1654, /* GL_STENCIL_CLEAR_VALUE */
- 1656, /* GL_STENCIL_FUNC */
- 1675, /* GL_STENCIL_VALUE_MASK */
- 1655, /* GL_STENCIL_FAIL */
- 1670, /* GL_STENCIL_PASS_DEPTH_FAIL */
- 1671, /* GL_STENCIL_PASS_DEPTH_PASS */
- 1672, /* GL_STENCIL_REF */
- 1676, /* GL_STENCIL_WRITEMASK */
- 922, /* GL_MATRIX_MODE */
- 1118, /* GL_NORMALIZE */
- 2039, /* GL_VIEWPORT */
- 1091, /* GL_MODELVIEW_STACK_DEPTH */
- 1372, /* GL_PROJECTION_STACK_DEPTH */
- 1898, /* GL_TEXTURE_STACK_DEPTH */
- 1088, /* GL_MODELVIEW_MATRIX */
- 1370, /* GL_PROJECTION_MATRIX */
- 1880, /* GL_TEXTURE_MATRIX */
- 61, /* GL_ATTRIB_STACK_DEPTH */
- 148, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
- 43, /* GL_ALPHA_TEST */
- 44, /* GL_ALPHA_TEST_FUNC */
- 45, /* GL_ALPHA_TEST_REF */
- 404, /* GL_DITHER */
- 79, /* GL_BLEND_DST */
- 93, /* GL_BLEND_SRC */
- 76, /* GL_BLEND */
- 783, /* GL_LOGIC_OP_MODE */
- 695, /* GL_INDEX_LOGIC_OP */
- 204, /* GL_COLOR_LOGIC_OP */
- 67, /* GL_AUX_BUFFERS */
- 415, /* GL_DRAW_BUFFER */
- 1414, /* GL_READ_BUFFER */
- 1549, /* GL_SCISSOR_BOX */
- 1550, /* GL_SCISSOR_TEST */
- 694, /* GL_INDEX_CLEAR_VALUE */
- 699, /* GL_INDEX_WRITEMASK */
- 201, /* GL_COLOR_CLEAR_VALUE */
- 243, /* GL_COLOR_WRITEMASK */
- 696, /* GL_INDEX_MODE */
- 1514, /* GL_RGBA_MODE */
- 414, /* GL_DOUBLEBUFFER */
- 1677, /* GL_STEREO */
- 1465, /* GL_RENDER_MODE */
- 1207, /* GL_PERSPECTIVE_CORRECTION_HINT */
- 1265, /* GL_POINT_SMOOTH_HINT */
- 766, /* GL_LINE_SMOOTH_HINT */
- 1283, /* GL_POLYGON_SMOOTH_HINT */
- 552, /* GL_FOG_HINT */
- 1860, /* GL_TEXTURE_GEN_S */
- 1862, /* GL_TEXTURE_GEN_T */
- 1859, /* GL_TEXTURE_GEN_R */
- 1858, /* GL_TEXTURE_GEN_Q */
- 1220, /* GL_PIXEL_MAP_I_TO_I */
- 1226, /* GL_PIXEL_MAP_S_TO_S */
- 1222, /* GL_PIXEL_MAP_I_TO_R */
- 1218, /* GL_PIXEL_MAP_I_TO_G */
- 1216, /* GL_PIXEL_MAP_I_TO_B */
- 1214, /* GL_PIXEL_MAP_I_TO_A */
- 1224, /* GL_PIXEL_MAP_R_TO_R */
- 1212, /* GL_PIXEL_MAP_G_TO_G */
- 1210, /* GL_PIXEL_MAP_B_TO_B */
- 1208, /* GL_PIXEL_MAP_A_TO_A */
- 1221, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- 1227, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- 1223, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- 1219, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- 1217, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- 1215, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- 1225, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- 1213, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- 1211, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- 1209, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- 1951, /* GL_UNPACK_SWAP_BYTES */
- 1946, /* GL_UNPACK_LSB_FIRST */
- 1947, /* GL_UNPACK_ROW_LENGTH */
- 1950, /* GL_UNPACK_SKIP_ROWS */
- 1949, /* GL_UNPACK_SKIP_PIXELS */
- 1944, /* GL_UNPACK_ALIGNMENT */
- 1195, /* GL_PACK_SWAP_BYTES */
- 1190, /* GL_PACK_LSB_FIRST */
- 1191, /* GL_PACK_ROW_LENGTH */
- 1194, /* GL_PACK_SKIP_ROWS */
- 1193, /* GL_PACK_SKIP_PIXELS */
- 1187, /* GL_PACK_ALIGNMENT */
- 863, /* GL_MAP_COLOR */
- 868, /* GL_MAP_STENCIL */
- 698, /* GL_INDEX_SHIFT */
- 697, /* GL_INDEX_OFFSET */
- 1428, /* GL_RED_SCALE */
- 1426, /* GL_RED_BIAS */
- 2065, /* GL_ZOOM_X */
- 2066, /* GL_ZOOM_Y */
- 653, /* GL_GREEN_SCALE */
- 651, /* GL_GREEN_BIAS */
- 101, /* GL_BLUE_SCALE */
- 99, /* GL_BLUE_BIAS */
- 42, /* GL_ALPHA_SCALE */
- 40, /* GL_ALPHA_BIAS */
- 391, /* GL_DEPTH_SCALE */
- 368, /* GL_DEPTH_BIAS */
- 952, /* GL_MAX_EVAL_ORDER */
- 962, /* GL_MAX_LIGHTS */
- 933, /* GL_MAX_CLIP_PLANES */
- 1013, /* GL_MAX_TEXTURE_SIZE */
- 969, /* GL_MAX_PIXEL_MAP_TABLE */
- 929, /* GL_MAX_ATTRIB_STACK_DEPTH */
- 965, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- 966, /* GL_MAX_NAME_STACK_DEPTH */
- 995, /* GL_MAX_PROJECTION_STACK_DEPTH */
- 1014, /* GL_MAX_TEXTURE_STACK_DEPTH */
- 1036, /* GL_MAX_VIEWPORT_DIMS */
- 930, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- 1687, /* GL_SUBPIXEL_BITS */
- 693, /* GL_INDEX_BITS */
- 1427, /* GL_RED_BITS */
- 652, /* GL_GREEN_BITS */
- 100, /* GL_BLUE_BITS */
- 41, /* GL_ALPHA_BITS */
- 369, /* GL_DEPTH_BITS */
- 1652, /* GL_STENCIL_BITS */
+ 1853, /* GL_STENCIL_TEST */
+ 1834, /* GL_STENCIL_CLEAR_VALUE */
+ 1836, /* GL_STENCIL_FUNC */
+ 1855, /* GL_STENCIL_VALUE_MASK */
+ 1835, /* GL_STENCIL_FAIL */
+ 1850, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ 1851, /* GL_STENCIL_PASS_DEPTH_PASS */
+ 1852, /* GL_STENCIL_REF */
+ 1856, /* GL_STENCIL_WRITEMASK */
+ 1006, /* GL_MATRIX_MODE */
+ 1222, /* GL_NORMALIZE */
+ 2266, /* GL_VIEWPORT */
+ 1195, /* GL_MODELVIEW_STACK_DEPTH */
+ 1481, /* GL_PROJECTION_STACK_DEPTH */
+ 2089, /* GL_TEXTURE_STACK_DEPTH */
+ 1192, /* GL_MODELVIEW_MATRIX */
+ 1479, /* GL_PROJECTION_MATRIX */
+ 2069, /* GL_TEXTURE_MATRIX */
+ 69, /* GL_ATTRIB_STACK_DEPTH */
+ 166, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ 51, /* GL_ALPHA_TEST */
+ 52, /* GL_ALPHA_TEST_FUNC */
+ 53, /* GL_ALPHA_TEST_REF */
+ 439, /* GL_DITHER */
+ 91, /* GL_BLEND_DST */
+ 105, /* GL_BLEND_SRC */
+ 88, /* GL_BLEND */
+ 852, /* GL_LOGIC_OP_MODE */
+ 739, /* GL_INDEX_LOGIC_OP */
+ 230, /* GL_COLOR_LOGIC_OP */
+ 75, /* GL_AUX_BUFFERS */
+ 450, /* GL_DRAW_BUFFER */
+ 1534, /* GL_READ_BUFFER */
+ 1727, /* GL_SCISSOR_BOX */
+ 1728, /* GL_SCISSOR_TEST */
+ 738, /* GL_INDEX_CLEAR_VALUE */
+ 743, /* GL_INDEX_WRITEMASK */
+ 227, /* GL_COLOR_CLEAR_VALUE */
+ 269, /* GL_COLOR_WRITEMASK */
+ 740, /* GL_INDEX_MODE */
+ 1674, /* GL_RGBA_MODE */
+ 449, /* GL_DOUBLEBUFFER */
+ 1857, /* GL_STEREO */
+ 1588, /* GL_RENDER_MODE */
+ 1312, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ 1370, /* GL_POINT_SMOOTH_HINT */
+ 834, /* GL_LINE_SMOOTH_HINT */
+ 1388, /* GL_POLYGON_SMOOTH_HINT */
+ 588, /* GL_FOG_HINT */
+ 2049, /* GL_TEXTURE_GEN_S */
+ 2051, /* GL_TEXTURE_GEN_T */
+ 2048, /* GL_TEXTURE_GEN_R */
+ 2047, /* GL_TEXTURE_GEN_Q */
+ 1325, /* GL_PIXEL_MAP_I_TO_I */
+ 1331, /* GL_PIXEL_MAP_S_TO_S */
+ 1327, /* GL_PIXEL_MAP_I_TO_R */
+ 1323, /* GL_PIXEL_MAP_I_TO_G */
+ 1321, /* GL_PIXEL_MAP_I_TO_B */
+ 1319, /* GL_PIXEL_MAP_I_TO_A */
+ 1329, /* GL_PIXEL_MAP_R_TO_R */
+ 1317, /* GL_PIXEL_MAP_G_TO_G */
+ 1315, /* GL_PIXEL_MAP_B_TO_B */
+ 1313, /* GL_PIXEL_MAP_A_TO_A */
+ 1326, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ 1332, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ 1328, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ 1324, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ 1322, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ 1320, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ 1330, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ 1318, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ 1316, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ 1314, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ 2152, /* GL_UNPACK_SWAP_BYTES */
+ 2147, /* GL_UNPACK_LSB_FIRST */
+ 2148, /* GL_UNPACK_ROW_LENGTH */
+ 2151, /* GL_UNPACK_SKIP_ROWS */
+ 2150, /* GL_UNPACK_SKIP_PIXELS */
+ 2145, /* GL_UNPACK_ALIGNMENT */
+ 1300, /* GL_PACK_SWAP_BYTES */
+ 1295, /* GL_PACK_LSB_FIRST */
+ 1296, /* GL_PACK_ROW_LENGTH */
+ 1299, /* GL_PACK_SKIP_ROWS */
+ 1298, /* GL_PACK_SKIP_PIXELS */
+ 1292, /* GL_PACK_ALIGNMENT */
+ 947, /* GL_MAP_COLOR */
+ 952, /* GL_MAP_STENCIL */
+ 742, /* GL_INDEX_SHIFT */
+ 741, /* GL_INDEX_OFFSET */
+ 1550, /* GL_RED_SCALE */
+ 1546, /* GL_RED_BIAS */
+ 2292, /* GL_ZOOM_X */
+ 2293, /* GL_ZOOM_Y */
+ 697, /* GL_GREEN_SCALE */
+ 693, /* GL_GREEN_BIAS */
+ 115, /* GL_BLUE_SCALE */
+ 111, /* GL_BLUE_BIAS */
+ 50, /* GL_ALPHA_SCALE */
+ 47, /* GL_ALPHA_BIAS */
+ 426, /* GL_DEPTH_SCALE */
+ 402, /* GL_DEPTH_BIAS */
+ 1038, /* GL_MAX_EVAL_ORDER */
+ 1055, /* GL_MAX_LIGHTS */
+ 1018, /* GL_MAX_CLIP_DISTANCES */
+ 1110, /* GL_MAX_TEXTURE_SIZE */
+ 1062, /* GL_MAX_PIXEL_MAP_TABLE */
+ 1014, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ 1058, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ 1059, /* GL_MAX_NAME_STACK_DEPTH */
+ 1090, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ 1111, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ 1137, /* GL_MAX_VIEWPORT_DIMS */
+ 1015, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ 1867, /* GL_SUBPIXEL_BITS */
+ 737, /* GL_INDEX_BITS */
+ 1547, /* GL_RED_BITS */
+ 694, /* GL_GREEN_BITS */
+ 112, /* GL_BLUE_BITS */
+ 48, /* GL_ALPHA_BITS */
+ 403, /* GL_DEPTH_BITS */
+ 1831, /* GL_STENCIL_BITS */
14, /* GL_ACCUM_RED_BITS */
13, /* GL_ACCUM_GREEN_BITS */
10, /* GL_ACCUM_BLUE_BITS */
9, /* GL_ACCUM_ALPHA_BITS */
- 1105, /* GL_NAME_STACK_DEPTH */
- 62, /* GL_AUTO_NORMAL */
- 809, /* GL_MAP1_COLOR_4 */
- 812, /* GL_MAP1_INDEX */
- 813, /* GL_MAP1_NORMAL */
- 814, /* GL_MAP1_TEXTURE_COORD_1 */
- 815, /* GL_MAP1_TEXTURE_COORD_2 */
- 816, /* GL_MAP1_TEXTURE_COORD_3 */
- 817, /* GL_MAP1_TEXTURE_COORD_4 */
- 818, /* GL_MAP1_VERTEX_3 */
- 819, /* GL_MAP1_VERTEX_4 */
- 836, /* GL_MAP2_COLOR_4 */
- 839, /* GL_MAP2_INDEX */
- 840, /* GL_MAP2_NORMAL */
- 841, /* GL_MAP2_TEXTURE_COORD_1 */
- 842, /* GL_MAP2_TEXTURE_COORD_2 */
- 843, /* GL_MAP2_TEXTURE_COORD_3 */
- 844, /* GL_MAP2_TEXTURE_COORD_4 */
- 845, /* GL_MAP2_VERTEX_3 */
- 846, /* GL_MAP2_VERTEX_4 */
- 810, /* GL_MAP1_GRID_DOMAIN */
- 811, /* GL_MAP1_GRID_SEGMENTS */
- 837, /* GL_MAP2_GRID_DOMAIN */
- 838, /* GL_MAP2_GRID_SEGMENTS */
- 1770, /* GL_TEXTURE_1D */
- 1772, /* GL_TEXTURE_2D */
- 503, /* GL_FEEDBACK_BUFFER_POINTER */
- 504, /* GL_FEEDBACK_BUFFER_SIZE */
- 505, /* GL_FEEDBACK_BUFFER_TYPE */
- 1559, /* GL_SELECTION_BUFFER_POINTER */
- 1560, /* GL_SELECTION_BUFFER_SIZE */
- 1904, /* GL_TEXTURE_WIDTH */
- 1866, /* GL_TEXTURE_HEIGHT */
- 1810, /* GL_TEXTURE_COMPONENTS */
- 1794, /* GL_TEXTURE_BORDER_COLOR */
- 1793, /* GL_TEXTURE_BORDER */
- 406, /* GL_DONT_CARE */
- 501, /* GL_FASTEST */
- 1113, /* GL_NICEST */
- 48, /* GL_AMBIENT */
- 403, /* GL_DIFFUSE */
- 1611, /* GL_SPECULAR */
- 1287, /* GL_POSITION */
- 1614, /* GL_SPOT_DIRECTION */
- 1615, /* GL_SPOT_EXPONENT */
- 1613, /* GL_SPOT_CUTOFF */
- 288, /* GL_CONSTANT_ATTENUATION */
- 755, /* GL_LINEAR_ATTENUATION */
- 1394, /* GL_QUADRATIC_ATTENUATION */
- 257, /* GL_COMPILE */
- 258, /* GL_COMPILE_AND_EXECUTE */
- 132, /* GL_BYTE */
- 1953, /* GL_UNSIGNED_BYTE */
- 1576, /* GL_SHORT */
- 1968, /* GL_UNSIGNED_SHORT */
- 701, /* GL_INT */
- 1956, /* GL_UNSIGNED_INT */
- 512, /* GL_FLOAT */
+ 1209, /* GL_NAME_STACK_DEPTH */
+ 70, /* GL_AUTO_NORMAL */
+ 893, /* GL_MAP1_COLOR_4 */
+ 896, /* GL_MAP1_INDEX */
+ 897, /* GL_MAP1_NORMAL */
+ 898, /* GL_MAP1_TEXTURE_COORD_1 */
+ 899, /* GL_MAP1_TEXTURE_COORD_2 */
+ 900, /* GL_MAP1_TEXTURE_COORD_3 */
+ 901, /* GL_MAP1_TEXTURE_COORD_4 */
+ 902, /* GL_MAP1_VERTEX_3 */
+ 903, /* GL_MAP1_VERTEX_4 */
+ 920, /* GL_MAP2_COLOR_4 */
+ 923, /* GL_MAP2_INDEX */
+ 924, /* GL_MAP2_NORMAL */
+ 925, /* GL_MAP2_TEXTURE_COORD_1 */
+ 926, /* GL_MAP2_TEXTURE_COORD_2 */
+ 927, /* GL_MAP2_TEXTURE_COORD_3 */
+ 928, /* GL_MAP2_TEXTURE_COORD_4 */
+ 929, /* GL_MAP2_VERTEX_3 */
+ 930, /* GL_MAP2_VERTEX_4 */
+ 894, /* GL_MAP1_GRID_DOMAIN */
+ 895, /* GL_MAP1_GRID_SEGMENTS */
+ 921, /* GL_MAP2_GRID_DOMAIN */
+ 922, /* GL_MAP2_GRID_SEGMENTS */
+ 1950, /* GL_TEXTURE_1D */
+ 1953, /* GL_TEXTURE_2D */
+ 538, /* GL_FEEDBACK_BUFFER_POINTER */
+ 539, /* GL_FEEDBACK_BUFFER_SIZE */
+ 540, /* GL_FEEDBACK_BUFFER_TYPE */
+ 1737, /* GL_SELECTION_BUFFER_POINTER */
+ 1738, /* GL_SELECTION_BUFFER_SIZE */
+ 2095, /* GL_TEXTURE_WIDTH */
+ 2055, /* GL_TEXTURE_HEIGHT */
+ 1999, /* GL_TEXTURE_COMPONENTS */
+ 1980, /* GL_TEXTURE_BORDER_COLOR */
+ 1979, /* GL_TEXTURE_BORDER */
+ 441, /* GL_DONT_CARE */
+ 536, /* GL_FASTEST */
+ 1217, /* GL_NICEST */
+ 56, /* GL_AMBIENT */
+ 438, /* GL_DIFFUSE */
+ 1790, /* GL_SPECULAR */
+ 1392, /* GL_POSITION */
+ 1793, /* GL_SPOT_DIRECTION */
+ 1794, /* GL_SPOT_EXPONENT */
+ 1792, /* GL_SPOT_CUTOFF */
+ 317, /* GL_CONSTANT_ATTENUATION */
+ 822, /* GL_LINEAR_ATTENUATION */
+ 1506, /* GL_QUADRATIC_ATTENUATION */
+ 284, /* GL_COMPILE */
+ 285, /* GL_COMPILE_AND_EXECUTE */
+ 149, /* GL_BYTE */
+ 2154, /* GL_UNSIGNED_BYTE */
+ 1755, /* GL_SHORT */
+ 2193, /* GL_UNSIGNED_SHORT */
+ 745, /* GL_INT */
+ 2157, /* GL_UNSIGNED_INT */
+ 548, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
7, /* GL_4_BYTES */
- 413, /* GL_DOUBLE */
- 654, /* GL_HALF_FLOAT */
- 509, /* GL_FIXED */
- 144, /* GL_CLEAR */
- 50, /* GL_AND */
- 52, /* GL_AND_REVERSE */
- 313, /* GL_COPY */
- 51, /* GL_AND_INVERTED */
- 1116, /* GL_NOOP */
- 2061, /* GL_XOR */
- 1182, /* GL_OR */
- 1117, /* GL_NOR */
- 491, /* GL_EQUIV */
- 731, /* GL_INVERT */
- 1185, /* GL_OR_REVERSE */
- 314, /* GL_COPY_INVERTED */
- 1184, /* GL_OR_INVERTED */
- 1106, /* GL_NAND */
- 1565, /* GL_SET */
- 488, /* GL_EMISSION */
- 1575, /* GL_SHININESS */
- 49, /* GL_AMBIENT_AND_DIFFUSE */
- 203, /* GL_COLOR_INDEXES */
- 1055, /* GL_MODELVIEW */
- 1369, /* GL_PROJECTION */
- 1705, /* GL_TEXTURE */
- 159, /* GL_COLOR */
- 361, /* GL_DEPTH */
- 1637, /* GL_STENCIL */
- 202, /* GL_COLOR_INDEX */
- 1657, /* GL_STENCIL_INDEX */
- 376, /* GL_DEPTH_COMPONENT */
- 1423, /* GL_RED */
- 650, /* GL_GREEN */
- 98, /* GL_BLUE */
- 31, /* GL_ALPHA */
- 1474, /* GL_RGB */
- 1497, /* GL_RGBA */
- 787, /* GL_LUMINANCE */
- 808, /* GL_LUMINANCE_ALPHA */
- 74, /* GL_BITMAP */
- 1237, /* GL_POINT */
- 753, /* GL_LINE */
- 506, /* GL_FILL */
- 1434, /* GL_RENDER */
- 502, /* GL_FEEDBACK */
- 1558, /* GL_SELECT */
- 511, /* GL_FLAT */
- 1586, /* GL_SMOOTH */
- 732, /* GL_KEEP */
- 1467, /* GL_REPLACE */
- 683, /* GL_INCR */
- 357, /* GL_DECR */
- 1985, /* GL_VENDOR */
- 1464, /* GL_RENDERER */
- 1986, /* GL_VERSION */
- 495, /* GL_EXTENSIONS */
- 1522, /* GL_S */
- 1696, /* GL_T */
- 1410, /* GL_R */
- 1393, /* GL_Q */
- 1092, /* GL_MODULATE */
- 356, /* GL_DECAL */
- 1853, /* GL_TEXTURE_ENV_MODE */
- 1852, /* GL_TEXTURE_ENV_COLOR */
- 1851, /* GL_TEXTURE_ENV */
- 496, /* GL_EYE_LINEAR */
- 1143, /* GL_OBJECT_LINEAR */
- 1612, /* GL_SPHERE_MAP */
- 1856, /* GL_TEXTURE_GEN_MODE */
- 1145, /* GL_OBJECT_PLANE */
- 497, /* GL_EYE_PLANE */
- 1107, /* GL_NEAREST */
- 754, /* GL_LINEAR */
- 1111, /* GL_NEAREST_MIPMAP_NEAREST */
- 759, /* GL_LINEAR_MIPMAP_NEAREST */
- 1110, /* GL_NEAREST_MIPMAP_LINEAR */
- 758, /* GL_LINEAR_MIPMAP_LINEAR */
- 1879, /* GL_TEXTURE_MAG_FILTER */
- 1888, /* GL_TEXTURE_MIN_FILTER */
- 1907, /* GL_TEXTURE_WRAP_S */
- 1908, /* GL_TEXTURE_WRAP_T */
- 138, /* GL_CLAMP */
- 1466, /* GL_REPEAT */
- 1281, /* GL_POLYGON_OFFSET_UNITS */
- 1280, /* GL_POLYGON_OFFSET_POINT */
- 1279, /* GL_POLYGON_OFFSET_LINE */
- 1411, /* GL_R3_G3_B2 */
- 1982, /* GL_V2F */
- 1983, /* GL_V3F */
- 135, /* GL_C4UB_V2F */
- 136, /* GL_C4UB_V3F */
- 133, /* GL_C3F_V3F */
- 1104, /* GL_N3F_V3F */
- 134, /* GL_C4F_N3F_V3F */
- 1701, /* GL_T2F_V3F */
- 1703, /* GL_T4F_V4F */
- 1699, /* GL_T2F_C4UB_V3F */
- 1697, /* GL_T2F_C3F_V3F */
- 1700, /* GL_T2F_N3F_V3F */
- 1698, /* GL_T2F_C4F_N3F_V3F */
- 1702, /* GL_T4F_C4F_N3F_V4F */
- 151, /* GL_CLIP_PLANE0 */
- 152, /* GL_CLIP_PLANE1 */
- 153, /* GL_CLIP_PLANE2 */
- 154, /* GL_CLIP_PLANE3 */
- 155, /* GL_CLIP_PLANE4 */
- 156, /* GL_CLIP_PLANE5 */
- 738, /* GL_LIGHT0 */
- 739, /* GL_LIGHT1 */
- 740, /* GL_LIGHT2 */
- 741, /* GL_LIGHT3 */
- 742, /* GL_LIGHT4 */
- 743, /* GL_LIGHT5 */
- 744, /* GL_LIGHT6 */
- 745, /* GL_LIGHT7 */
- 658, /* GL_HINT_BIT */
- 290, /* GL_CONSTANT_COLOR */
- 1156, /* GL_ONE_MINUS_CONSTANT_COLOR */
- 285, /* GL_CONSTANT_ALPHA */
- 1154, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- 77, /* GL_BLEND_COLOR */
- 631, /* GL_FUNC_ADD */
- 1039, /* GL_MIN */
- 925, /* GL_MAX */
- 84, /* GL_BLEND_EQUATION */
- 637, /* GL_FUNC_SUBTRACT */
- 634, /* GL_FUNC_REVERSE_SUBTRACT */
- 293, /* GL_CONVOLUTION_1D */
- 294, /* GL_CONVOLUTION_2D */
- 1561, /* GL_SEPARABLE_2D */
- 297, /* GL_CONVOLUTION_BORDER_MODE */
- 301, /* GL_CONVOLUTION_FILTER_SCALE */
- 299, /* GL_CONVOLUTION_FILTER_BIAS */
- 1424, /* GL_REDUCE */
- 303, /* GL_CONVOLUTION_FORMAT */
- 307, /* GL_CONVOLUTION_WIDTH */
- 305, /* GL_CONVOLUTION_HEIGHT */
- 942, /* GL_MAX_CONVOLUTION_WIDTH */
- 940, /* GL_MAX_CONVOLUTION_HEIGHT */
- 1320, /* GL_POST_CONVOLUTION_RED_SCALE */
- 1316, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- 1311, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- 1307, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- 1318, /* GL_POST_CONVOLUTION_RED_BIAS */
- 1314, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- 1309, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- 1305, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- 659, /* GL_HISTOGRAM */
- 1376, /* GL_PROXY_HISTOGRAM */
- 675, /* GL_HISTOGRAM_WIDTH */
- 665, /* GL_HISTOGRAM_FORMAT */
- 671, /* GL_HISTOGRAM_RED_SIZE */
- 667, /* GL_HISTOGRAM_GREEN_SIZE */
- 662, /* GL_HISTOGRAM_BLUE_SIZE */
- 660, /* GL_HISTOGRAM_ALPHA_SIZE */
- 669, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- 673, /* GL_HISTOGRAM_SINK */
- 1040, /* GL_MINMAX */
- 1042, /* GL_MINMAX_FORMAT */
- 1044, /* GL_MINMAX_SINK */
- 1704, /* GL_TABLE_TOO_LARGE_EXT */
- 1955, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1971, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1974, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1965, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1957, /* GL_UNSIGNED_INT_10_10_10_2 */
- 1278, /* GL_POLYGON_OFFSET_FILL */
- 1277, /* GL_POLYGON_OFFSET_FACTOR */
- 1276, /* GL_POLYGON_OFFSET_BIAS */
- 1470, /* GL_RESCALE_NORMAL */
- 36, /* GL_ALPHA4 */
- 38, /* GL_ALPHA8 */
- 32, /* GL_ALPHA12 */
- 34, /* GL_ALPHA16 */
- 798, /* GL_LUMINANCE4 */
- 804, /* GL_LUMINANCE8 */
- 788, /* GL_LUMINANCE12 */
- 794, /* GL_LUMINANCE16 */
- 799, /* GL_LUMINANCE4_ALPHA4 */
- 802, /* GL_LUMINANCE6_ALPHA2 */
- 805, /* GL_LUMINANCE8_ALPHA8 */
- 791, /* GL_LUMINANCE12_ALPHA4 */
- 789, /* GL_LUMINANCE12_ALPHA12 */
- 795, /* GL_LUMINANCE16_ALPHA16 */
- 702, /* GL_INTENSITY */
- 707, /* GL_INTENSITY4 */
- 709, /* GL_INTENSITY8 */
- 703, /* GL_INTENSITY12 */
- 705, /* GL_INTENSITY16 */
- 1483, /* GL_RGB2_EXT */
- 1484, /* GL_RGB4 */
- 1487, /* GL_RGB5 */
- 1494, /* GL_RGB8 */
- 1475, /* GL_RGB10 */
- 1479, /* GL_RGB12 */
- 1481, /* GL_RGB16 */
- 1502, /* GL_RGBA2 */
- 1504, /* GL_RGBA4 */
- 1490, /* GL_RGB5_A1 */
- 1509, /* GL_RGBA8 */
- 1476, /* GL_RGB10_A2 */
- 1498, /* GL_RGBA12 */
- 1500, /* GL_RGBA16 */
- 1895, /* GL_TEXTURE_RED_SIZE */
- 1864, /* GL_TEXTURE_GREEN_SIZE */
- 1791, /* GL_TEXTURE_BLUE_SIZE */
- 1776, /* GL_TEXTURE_ALPHA_SIZE */
- 1877, /* GL_TEXTURE_LUMINANCE_SIZE */
- 1868, /* GL_TEXTURE_INTENSITY_SIZE */
- 1468, /* GL_REPLACE_EXT */
- 1380, /* GL_PROXY_TEXTURE_1D */
- 1383, /* GL_PROXY_TEXTURE_2D */
- 1902, /* GL_TEXTURE_TOO_LARGE_EXT */
- 1890, /* GL_TEXTURE_PRIORITY */
- 1897, /* GL_TEXTURE_RESIDENT */
- 1779, /* GL_TEXTURE_BINDING_1D */
- 1781, /* GL_TEXTURE_BINDING_2D */
- 1783, /* GL_TEXTURE_BINDING_3D */
- 1192, /* GL_PACK_SKIP_IMAGES */
- 1188, /* GL_PACK_IMAGE_HEIGHT */
- 1948, /* GL_UNPACK_SKIP_IMAGES */
- 1945, /* GL_UNPACK_IMAGE_HEIGHT */
- 1774, /* GL_TEXTURE_3D */
- 1386, /* GL_PROXY_TEXTURE_3D */
- 1848, /* GL_TEXTURE_DEPTH */
- 1905, /* GL_TEXTURE_WRAP_R */
- 926, /* GL_MAX_3D_TEXTURE_SIZE */
- 1987, /* GL_VERTEX_ARRAY */
- 1119, /* GL_NORMAL_ARRAY */
- 160, /* GL_COLOR_ARRAY */
- 687, /* GL_INDEX_ARRAY */
- 1818, /* GL_TEXTURE_COORD_ARRAY */
- 480, /* GL_EDGE_FLAG_ARRAY */
- 1993, /* GL_VERTEX_ARRAY_SIZE */
- 1995, /* GL_VERTEX_ARRAY_TYPE */
- 1994, /* GL_VERTEX_ARRAY_STRIDE */
- 1124, /* GL_NORMAL_ARRAY_TYPE */
- 1123, /* GL_NORMAL_ARRAY_STRIDE */
- 164, /* GL_COLOR_ARRAY_SIZE */
- 166, /* GL_COLOR_ARRAY_TYPE */
- 165, /* GL_COLOR_ARRAY_STRIDE */
- 692, /* GL_INDEX_ARRAY_TYPE */
- 691, /* GL_INDEX_ARRAY_STRIDE */
- 1822, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- 1824, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- 1823, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- 484, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1992, /* GL_VERTEX_ARRAY_POINTER */
- 1122, /* GL_NORMAL_ARRAY_POINTER */
- 163, /* GL_COLOR_ARRAY_POINTER */
- 690, /* GL_INDEX_ARRAY_POINTER */
- 1821, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- 483, /* GL_EDGE_FLAG_ARRAY_POINTER */
- 1097, /* GL_MULTISAMPLE */
- 1535, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- 1537, /* GL_SAMPLE_ALPHA_TO_ONE */
- 1542, /* GL_SAMPLE_COVERAGE */
- 1539, /* GL_SAMPLE_BUFFERS */
- 1530, /* GL_SAMPLES */
- 1546, /* GL_SAMPLE_COVERAGE_VALUE */
- 1544, /* GL_SAMPLE_COVERAGE_INVERT */
- 208, /* GL_COLOR_MATRIX */
- 210, /* GL_COLOR_MATRIX_STACK_DEPTH */
- 936, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- 1303, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- 1299, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- 1294, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- 1290, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- 1301, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- 1297, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- 1292, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- 1288, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- 1801, /* GL_TEXTURE_COLOR_TABLE_SGI */
- 1387, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- 1803, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- 82, /* GL_BLEND_DST_RGB */
- 96, /* GL_BLEND_SRC_RGB */
- 80, /* GL_BLEND_DST_ALPHA */
- 94, /* GL_BLEND_SRC_ALPHA */
- 214, /* GL_COLOR_TABLE */
- 1313, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- 1296, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- 1375, /* GL_PROXY_COLOR_TABLE */
- 1379, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- 1378, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- 238, /* GL_COLOR_TABLE_SCALE */
- 218, /* GL_COLOR_TABLE_BIAS */
- 223, /* GL_COLOR_TABLE_FORMAT */
- 240, /* GL_COLOR_TABLE_WIDTH */
- 235, /* GL_COLOR_TABLE_RED_SIZE */
- 226, /* GL_COLOR_TABLE_GREEN_SIZE */
- 220, /* GL_COLOR_TABLE_BLUE_SIZE */
- 215, /* GL_COLOR_TABLE_ALPHA_SIZE */
- 232, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
- 229, /* GL_COLOR_TABLE_INTENSITY_SIZE */
- 71, /* GL_BGR */
- 72, /* GL_BGRA */
- 951, /* GL_MAX_ELEMENTS_VERTICES */
- 950, /* GL_MAX_ELEMENTS_INDICES */
- 1867, /* GL_TEXTURE_INDEX_SIZE_EXT */
- 157, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- 1259, /* GL_POINT_SIZE_MIN */
- 1255, /* GL_POINT_SIZE_MAX */
- 1244, /* GL_POINT_FADE_THRESHOLD_SIZE */
- 1240, /* GL_POINT_DISTANCE_ATTENUATION */
- 139, /* GL_CLAMP_TO_BORDER */
- 142, /* GL_CLAMP_TO_EDGE */
- 1889, /* GL_TEXTURE_MIN_LOD */
- 1887, /* GL_TEXTURE_MAX_LOD */
- 1778, /* GL_TEXTURE_BASE_LEVEL */
- 1886, /* GL_TEXTURE_MAX_LEVEL */
- 678, /* GL_IGNORE_BORDER_HP */
- 289, /* GL_CONSTANT_BORDER_HP */
- 1469, /* GL_REPLICATE_BORDER_HP */
- 295, /* GL_CONVOLUTION_BORDER_COLOR */
- 1151, /* GL_OCCLUSION_TEST_HP */
- 1152, /* GL_OCCLUSION_TEST_RESULT_HP */
- 756, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- 1795, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- 1797, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- 1799, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- 1800, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1798, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- 1796, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- 931, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- 932, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1323, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- 1325, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- 1322, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- 1324, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- 1875, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- 1876, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- 1874, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- 640, /* GL_GENERATE_MIPMAP */
- 641, /* GL_GENERATE_MIPMAP_HINT */
- 555, /* GL_FOG_OFFSET_SGIX */
- 556, /* GL_FOG_OFFSET_VALUE_SGIX */
- 1809, /* GL_TEXTURE_COMPARE_SGIX */
- 1808, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- 1871, /* GL_TEXTURE_LEQUAL_R_SGIX */
- 1863, /* GL_TEXTURE_GEQUAL_R_SGIX */
- 377, /* GL_DEPTH_COMPONENT16 */
- 381, /* GL_DEPTH_COMPONENT24 */
- 385, /* GL_DEPTH_COMPONENT32 */
- 320, /* GL_CULL_VERTEX_EXT */
- 322, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
- 321, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 2057, /* GL_WRAP_BORDER_SUN */
- 1802, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- 749, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- 1579, /* GL_SINGLE_COLOR */
- 1563, /* GL_SEPARATE_SPECULAR_COLOR */
- 1574, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- 567, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- 568, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- 578, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- 570, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- 566, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- 565, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- 569, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- 579, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- 596, /* GL_FRAMEBUFFER_DEFAULT */
- 622, /* GL_FRAMEBUFFER_UNDEFINED */
- 393, /* GL_DEPTH_STENCIL_ATTACHMENT */
- 686, /* GL_INDEX */
- 1954, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1975, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1976, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1972, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1969, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1966, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1963, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- 1884, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- 1885, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- 1883, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- 1047, /* GL_MIRRORED_REPEAT */
- 1517, /* GL_RGB_S3TC */
- 1486, /* GL_RGB4_S3TC */
- 1515, /* GL_RGBA_S3TC */
- 1508, /* GL_RGBA4_S3TC */
- 1513, /* GL_RGBA_DXT5_S3TC */
- 1505, /* GL_RGBA4_DXT5_S3TC */
- 277, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
- 272, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
- 273, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
- 274, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- 1109, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- 1108, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- 757, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- 542, /* GL_FOG_COORDINATE_SOURCE */
- 534, /* GL_FOG_COORD */
- 558, /* GL_FRAGMENT_DEPTH */
- 326, /* GL_CURRENT_FOG_COORD */
- 541, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- 540, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- 539, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- 536, /* GL_FOG_COORDINATE_ARRAY */
- 212, /* GL_COLOR_SUM */
- 347, /* GL_CURRENT_SECONDARY_COLOR */
- 1555, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- 1557, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- 1556, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- 1554, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- 1551, /* GL_SECONDARY_COLOR_ARRAY */
- 345, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
- 28, /* GL_ALIASED_POINT_SIZE_RANGE */
- 27, /* GL_ALIASED_LINE_WIDTH_RANGE */
- 1706, /* GL_TEXTURE0 */
- 1708, /* GL_TEXTURE1 */
- 1730, /* GL_TEXTURE2 */
- 1752, /* GL_TEXTURE3 */
- 1758, /* GL_TEXTURE4 */
- 1760, /* GL_TEXTURE5 */
- 1762, /* GL_TEXTURE6 */
- 1764, /* GL_TEXTURE7 */
- 1766, /* GL_TEXTURE8 */
- 1768, /* GL_TEXTURE9 */
- 1709, /* GL_TEXTURE10 */
- 1711, /* GL_TEXTURE11 */
- 1713, /* GL_TEXTURE12 */
- 1715, /* GL_TEXTURE13 */
- 1717, /* GL_TEXTURE14 */
- 1719, /* GL_TEXTURE15 */
- 1721, /* GL_TEXTURE16 */
- 1723, /* GL_TEXTURE17 */
- 1725, /* GL_TEXTURE18 */
- 1727, /* GL_TEXTURE19 */
- 1731, /* GL_TEXTURE20 */
- 1733, /* GL_TEXTURE21 */
- 1735, /* GL_TEXTURE22 */
- 1737, /* GL_TEXTURE23 */
- 1739, /* GL_TEXTURE24 */
- 1741, /* GL_TEXTURE25 */
- 1743, /* GL_TEXTURE26 */
- 1745, /* GL_TEXTURE27 */
- 1747, /* GL_TEXTURE28 */
- 1749, /* GL_TEXTURE29 */
- 1753, /* GL_TEXTURE30 */
- 1755, /* GL_TEXTURE31 */
- 18, /* GL_ACTIVE_TEXTURE */
- 145, /* GL_CLIENT_ACTIVE_TEXTURE */
- 1015, /* GL_MAX_TEXTURE_UNITS */
- 1929, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1932, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1934, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1926, /* GL_TRANSPOSE_COLOR_MATRIX */
- 1688, /* GL_SUBTRACT */
- 998, /* GL_MAX_RENDERBUFFER_SIZE */
- 260, /* GL_COMPRESSED_ALPHA */
- 264, /* GL_COMPRESSED_LUMINANCE */
- 265, /* GL_COMPRESSED_LUMINANCE_ALPHA */
- 262, /* GL_COMPRESSED_INTENSITY */
- 268, /* GL_COMPRESSED_RGB */
- 269, /* GL_COMPRESSED_RGBA */
- 1816, /* GL_TEXTURE_COMPRESSION_HINT */
- 1893, /* GL_TEXTURE_RECTANGLE_ARB */
- 1788, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- 1390, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- 996, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- 392, /* GL_DEPTH_STENCIL */
- 1959, /* GL_UNSIGNED_INT_24_8 */
- 1010, /* GL_MAX_TEXTURE_LOD_BIAS */
- 1882, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- 1012, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- 1854, /* GL_TEXTURE_FILTER_CONTROL */
- 1872, /* GL_TEXTURE_LOD_BIAS */
- 245, /* GL_COMBINE4 */
- 1004, /* GL_MAX_SHININESS_NV */
- 1005, /* GL_MAX_SPOT_EXPONENT_NV */
- 684, /* GL_INCR_WRAP */
- 358, /* GL_DECR_WRAP */
- 1067, /* GL_MODELVIEW1_ARB */
- 1125, /* GL_NORMAL_MAP */
- 1429, /* GL_REFLECTION_MAP */
- 1826, /* GL_TEXTURE_CUBE_MAP */
- 1785, /* GL_TEXTURE_BINDING_CUBE_MAP */
- 1838, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- 1828, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- 1841, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- 1831, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- 1844, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- 1834, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- 1388, /* GL_PROXY_TEXTURE_CUBE_MAP */
- 944, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- 1103, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- 1334, /* GL_PRIMITIVE_RESTART_NV */
- 1333, /* GL_PRIMITIVE_RESTART_INDEX_NV */
- 550, /* GL_FOG_DISTANCE_MODE_NV */
- 499, /* GL_EYE_RADIAL_NV */
- 498, /* GL_EYE_PLANE_ABSOLUTE_NV */
- 244, /* GL_COMBINE */
- 251, /* GL_COMBINE_RGB */
- 246, /* GL_COMBINE_ALPHA */
- 1518, /* GL_RGB_SCALE */
- 24, /* GL_ADD_SIGNED */
- 713, /* GL_INTERPOLATE */
- 284, /* GL_CONSTANT */
- 1329, /* GL_PRIMARY_COLOR */
- 1326, /* GL_PREVIOUS */
- 1594, /* GL_SOURCE0_RGB */
- 1600, /* GL_SOURCE1_RGB */
- 1606, /* GL_SOURCE2_RGB */
- 1610, /* GL_SOURCE3_RGB_NV */
- 1591, /* GL_SOURCE0_ALPHA */
- 1597, /* GL_SOURCE1_ALPHA */
- 1603, /* GL_SOURCE2_ALPHA */
- 1609, /* GL_SOURCE3_ALPHA_NV */
- 1165, /* GL_OPERAND0_RGB */
- 1171, /* GL_OPERAND1_RGB */
- 1177, /* GL_OPERAND2_RGB */
- 1181, /* GL_OPERAND3_RGB_NV */
- 1162, /* GL_OPERAND0_ALPHA */
- 1168, /* GL_OPERAND1_ALPHA */
- 1174, /* GL_OPERAND2_ALPHA */
- 1180, /* GL_OPERAND3_ALPHA_NV */
- 120, /* GL_BUFFER_OBJECT_APPLE */
- 1988, /* GL_VERTEX_ARRAY_BINDING */
- 1891, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- 1892, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 2062, /* GL_YCBCR_422_APPLE */
- 1977, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1979, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- 1901, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- 1679, /* GL_STORAGE_PRIVATE_APPLE */
- 1678, /* GL_STORAGE_CACHED_APPLE */
- 1680, /* GL_STORAGE_SHARED_APPLE */
- 1581, /* GL_SLICE_ACCUM_SUN */
- 1398, /* GL_QUAD_MESH_SUN */
- 1939, /* GL_TRIANGLE_MESH_SUN */
- 2027, /* GL_VERTEX_PROGRAM_ARB */
- 2038, /* GL_VERTEX_STATE_PROGRAM_NV */
- 2014, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 2020, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 2022, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 2024, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- 349, /* GL_CURRENT_VERTEX_ATTRIB */
- 1347, /* GL_PROGRAM_LENGTH_ARB */
- 1362, /* GL_PROGRAM_STRING_ARB */
- 1090, /* GL_MODELVIEW_PROJECTION_NV */
- 677, /* GL_IDENTITY_NV */
- 729, /* GL_INVERSE_NV */
- 1931, /* GL_TRANSPOSE_NV */
- 730, /* GL_INVERSE_TRANSPOSE_NV */
- 982, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- 981, /* GL_MAX_PROGRAM_MATRICES_ARB */
- 872, /* GL_MATRIX0_NV */
- 884, /* GL_MATRIX1_NV */
- 896, /* GL_MATRIX2_NV */
- 900, /* GL_MATRIX3_NV */
- 902, /* GL_MATRIX4_NV */
- 904, /* GL_MATRIX5_NV */
- 906, /* GL_MATRIX6_NV */
- 908, /* GL_MATRIX7_NV */
- 332, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
- 329, /* GL_CURRENT_MATRIX_ARB */
- 2030, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- 2033, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- 1359, /* GL_PROGRAM_PARAMETER_NV */
- 2018, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- 1364, /* GL_PROGRAM_TARGET_NV */
- 1361, /* GL_PROGRAM_RESIDENT_NV */
- 1911, /* GL_TRACK_MATRIX_NV */
- 1912, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 2028, /* GL_VERTEX_PROGRAM_BINDING_NV */
- 1341, /* GL_PROGRAM_ERROR_POSITION_ARB */
- 373, /* GL_DEPTH_CLAMP */
- 1996, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 2003, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 2004, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 2005, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 2006, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 2007, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 2008, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 2009, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 2010, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 2011, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1997, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1998, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1999, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 2000, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 2001, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 2002, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- 820, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- 827, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- 828, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- 829, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- 830, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- 831, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- 832, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- 833, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- 834, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- 835, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- 821, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- 822, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- 823, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- 824, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- 825, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- 826, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- 847, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- 854, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- 855, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- 856, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- 857, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- 858, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- 859, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- 1340, /* GL_PROGRAM_BINDING_ARB */
- 861, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- 862, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- 848, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- 849, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- 850, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- 851, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- 852, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- 853, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- 1814, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- 1811, /* GL_TEXTURE_COMPRESSED */
- 1131, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- 282, /* GL_COMPRESSED_TEXTURE_FORMATS */
- 1033, /* GL_MAX_VERTEX_UNITS_ARB */
- 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 2056, /* GL_WEIGHT_SUM_UNITY_ARB */
- 2026, /* GL_VERTEX_BLEND_ARB */
- 351, /* GL_CURRENT_WEIGHT_ARB */
- 2054, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 2052, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 2050, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 2048, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 2043, /* GL_WEIGHT_ARRAY_ARB */
- 407, /* GL_DOT3_RGB */
- 408, /* GL_DOT3_RGBA */
- 276, /* GL_COMPRESSED_RGB_FXT1_3DFX */
- 271, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- 1098, /* GL_MULTISAMPLE_3DFX */
- 1540, /* GL_SAMPLE_BUFFERS_3DFX */
- 1531, /* GL_SAMPLES_3DFX */
- 1078, /* GL_MODELVIEW2_ARB */
- 1081, /* GL_MODELVIEW3_ARB */
- 1082, /* GL_MODELVIEW4_ARB */
- 1083, /* GL_MODELVIEW5_ARB */
- 1084, /* GL_MODELVIEW6_ARB */
- 1085, /* GL_MODELVIEW7_ARB */
- 1086, /* GL_MODELVIEW8_ARB */
- 1087, /* GL_MODELVIEW9_ARB */
- 1057, /* GL_MODELVIEW10_ARB */
- 1058, /* GL_MODELVIEW11_ARB */
- 1059, /* GL_MODELVIEW12_ARB */
- 1060, /* GL_MODELVIEW13_ARB */
- 1061, /* GL_MODELVIEW14_ARB */
- 1062, /* GL_MODELVIEW15_ARB */
- 1063, /* GL_MODELVIEW16_ARB */
- 1064, /* GL_MODELVIEW17_ARB */
- 1065, /* GL_MODELVIEW18_ARB */
- 1066, /* GL_MODELVIEW19_ARB */
- 1068, /* GL_MODELVIEW20_ARB */
- 1069, /* GL_MODELVIEW21_ARB */
- 1070, /* GL_MODELVIEW22_ARB */
- 1071, /* GL_MODELVIEW23_ARB */
- 1072, /* GL_MODELVIEW24_ARB */
- 1073, /* GL_MODELVIEW25_ARB */
- 1074, /* GL_MODELVIEW26_ARB */
- 1075, /* GL_MODELVIEW27_ARB */
- 1076, /* GL_MODELVIEW28_ARB */
- 1077, /* GL_MODELVIEW29_ARB */
- 1079, /* GL_MODELVIEW30_ARB */
- 1080, /* GL_MODELVIEW31_ARB */
- 412, /* GL_DOT3_RGB_EXT */
- 410, /* GL_DOT3_RGBA_EXT */
- 1051, /* GL_MIRROR_CLAMP_EXT */
- 1054, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- 1093, /* GL_MODULATE_ADD_ATI */
- 1094, /* GL_MODULATE_SIGNED_ADD_ATI */
- 1095, /* GL_MODULATE_SUBTRACT_ATI */
- 2063, /* GL_YCBCR_MESA */
- 1189, /* GL_PACK_INVERT_MESA */
- 354, /* GL_DEBUG_OBJECT_MESA */
- 355, /* GL_DEBUG_PRINT_MESA */
- 353, /* GL_DEBUG_ASSERT_MESA */
- 122, /* GL_BUFFER_SIZE */
- 124, /* GL_BUFFER_USAGE */
- 128, /* GL_BUMP_ROT_MATRIX_ATI */
- 129, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
- 127, /* GL_BUMP_NUM_TEX_UNITS_ATI */
- 131, /* GL_BUMP_TEX_UNITS_ATI */
- 472, /* GL_DUDV_ATI */
- 471, /* GL_DU8DV8_ATI */
- 126, /* GL_BUMP_ENVMAP_ATI */
- 130, /* GL_BUMP_TARGET_ATI */
- 1133, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
- 1338, /* GL_PROGRAM_BINARY_FORMATS_OES */
- 1643, /* GL_STENCIL_BACK_FUNC */
- 1641, /* GL_STENCIL_BACK_FAIL */
- 1645, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- 1647, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- 559, /* GL_FRAGMENT_PROGRAM_ARB */
- 1336, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 1367, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 1366, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- 1350, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 1356, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 1355, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 971, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 994, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 993, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- 984, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 990, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 989, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 947, /* GL_MAX_DRAW_BUFFERS */
- 416, /* GL_DRAW_BUFFER0 */
- 419, /* GL_DRAW_BUFFER1 */
- 440, /* GL_DRAW_BUFFER2 */
- 443, /* GL_DRAW_BUFFER3 */
- 446, /* GL_DRAW_BUFFER4 */
- 449, /* GL_DRAW_BUFFER5 */
- 452, /* GL_DRAW_BUFFER6 */
- 455, /* GL_DRAW_BUFFER7 */
- 458, /* GL_DRAW_BUFFER8 */
- 461, /* GL_DRAW_BUFFER9 */
- 420, /* GL_DRAW_BUFFER10 */
- 423, /* GL_DRAW_BUFFER11 */
- 426, /* GL_DRAW_BUFFER12 */
- 429, /* GL_DRAW_BUFFER13 */
- 432, /* GL_DRAW_BUFFER14 */
- 435, /* GL_DRAW_BUFFER15 */
- 85, /* GL_BLEND_EQUATION_ALPHA */
- 923, /* GL_MATRIX_PALETTE_ARB */
- 964, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- 967, /* GL_MAX_PALETTE_MATRICES_ARB */
- 335, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- 911, /* GL_MATRIX_INDEX_ARRAY_ARB */
- 330, /* GL_CURRENT_MATRIX_INDEX_ARB */
- 916, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- 920, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- 918, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- 914, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- 1849, /* GL_TEXTURE_DEPTH_SIZE */
- 400, /* GL_DEPTH_TEXTURE_MODE */
- 1806, /* GL_TEXTURE_COMPARE_MODE */
- 1804, /* GL_TEXTURE_COMPARE_FUNC */
- 255, /* GL_COMPARE_R_TO_TEXTURE */
- 1266, /* GL_POINT_SPRITE */
- 309, /* GL_COORD_REPLACE */
- 1271, /* GL_POINT_SPRITE_R_MODE_NV */
- 1402, /* GL_QUERY_COUNTER_BITS */
- 338, /* GL_CURRENT_QUERY */
- 1405, /* GL_QUERY_RESULT */
- 1407, /* GL_QUERY_RESULT_AVAILABLE */
- 1026, /* GL_MAX_VERTEX_ATTRIBS */
- 2016, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- 398, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- 397, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- 1006, /* GL_MAX_TEXTURE_COORDS */
- 1008, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- 1343, /* GL_PROGRAM_ERROR_STRING_ARB */
- 1345, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- 1344, /* GL_PROGRAM_FORMAT_ARB */
- 1903, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- 371, /* GL_DEPTH_BOUNDS_TEST_EXT */
- 370, /* GL_DEPTH_BOUNDS_EXT */
- 53, /* GL_ARRAY_BUFFER */
- 485, /* GL_ELEMENT_ARRAY_BUFFER */
- 54, /* GL_ARRAY_BUFFER_BINDING */
- 486, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1990, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- 1120, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- 161, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- 688, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- 1819, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- 481, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- 1552, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- 537, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 2044, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 2012, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- 1346, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- 977, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- 1352, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 986, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 1365, /* GL_PROGRAM_TEMPORARIES_ARB */
- 992, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- 1354, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 988, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 1358, /* GL_PROGRAM_PARAMETERS_ARB */
- 991, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- 1353, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- 987, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- 1337, /* GL_PROGRAM_ATTRIBS_ARB */
- 972, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- 1351, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- 985, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- 1335, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- 970, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- 1349, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 983, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 978, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- 974, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- 1368, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- 1928, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- 1419, /* GL_READ_ONLY */
- 2058, /* GL_WRITE_ONLY */
- 1421, /* GL_READ_WRITE */
- 110, /* GL_BUFFER_ACCESS */
- 114, /* GL_BUFFER_MAPPED */
- 117, /* GL_BUFFER_MAP_POINTER */
- 1910, /* GL_TIME_ELAPSED_EXT */
- 871, /* GL_MATRIX0_ARB */
- 883, /* GL_MATRIX1_ARB */
- 895, /* GL_MATRIX2_ARB */
- 899, /* GL_MATRIX3_ARB */
- 901, /* GL_MATRIX4_ARB */
- 903, /* GL_MATRIX5_ARB */
- 905, /* GL_MATRIX6_ARB */
- 907, /* GL_MATRIX7_ARB */
- 909, /* GL_MATRIX8_ARB */
- 910, /* GL_MATRIX9_ARB */
- 873, /* GL_MATRIX10_ARB */
- 874, /* GL_MATRIX11_ARB */
- 875, /* GL_MATRIX12_ARB */
- 876, /* GL_MATRIX13_ARB */
- 877, /* GL_MATRIX14_ARB */
- 878, /* GL_MATRIX15_ARB */
- 879, /* GL_MATRIX16_ARB */
- 880, /* GL_MATRIX17_ARB */
- 881, /* GL_MATRIX18_ARB */
- 882, /* GL_MATRIX19_ARB */
- 885, /* GL_MATRIX20_ARB */
- 886, /* GL_MATRIX21_ARB */
- 887, /* GL_MATRIX22_ARB */
- 888, /* GL_MATRIX23_ARB */
- 889, /* GL_MATRIX24_ARB */
- 890, /* GL_MATRIX25_ARB */
- 891, /* GL_MATRIX26_ARB */
- 892, /* GL_MATRIX27_ARB */
- 893, /* GL_MATRIX28_ARB */
- 894, /* GL_MATRIX29_ARB */
- 897, /* GL_MATRIX30_ARB */
- 898, /* GL_MATRIX31_ARB */
- 1683, /* GL_STREAM_DRAW */
- 1685, /* GL_STREAM_READ */
- 1681, /* GL_STREAM_COPY */
- 1633, /* GL_STATIC_DRAW */
- 1635, /* GL_STATIC_READ */
- 1631, /* GL_STATIC_COPY */
- 475, /* GL_DYNAMIC_DRAW */
- 477, /* GL_DYNAMIC_READ */
- 473, /* GL_DYNAMIC_COPY */
- 1229, /* GL_PIXEL_PACK_BUFFER */
- 1233, /* GL_PIXEL_UNPACK_BUFFER */
- 1230, /* GL_PIXEL_PACK_BUFFER_BINDING */
- 1234, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- 362, /* GL_DEPTH24_STENCIL8 */
- 1899, /* GL_TEXTURE_STENCIL_SIZE */
- 1847, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- 973, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- 976, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- 980, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- 979, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- 928, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- 1674, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- 17, /* GL_ACTIVE_STENCIL_FACE_EXT */
- 1052, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- 1533, /* GL_SAMPLES_PASSED */
- 1253, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
- 1252, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
- 1251, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
- 1089, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
- 1371, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
- 1881, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
- 121, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
- 113, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- 1433, /* GL_RELEASED_APPLE */
- 2041, /* GL_VOLATILE_APPLE */
- 1472, /* GL_RETAINED_APPLE */
- 1943, /* GL_UNDEFINED_APPLE */
- 1392, /* GL_PURGEABLE_APPLE */
- 560, /* GL_FRAGMENT_SHADER */
- 2036, /* GL_VERTEX_SHADER */
- 1357, /* GL_PROGRAM_OBJECT_ARB */
- 1568, /* GL_SHADER_OBJECT_ARB */
- 954, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- 1030, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- 1023, /* GL_MAX_VARYING_FLOATS */
- 1028, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- 938, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- 1149, /* GL_OBJECT_TYPE_ARB */
- 1570, /* GL_SHADER_TYPE */
- 525, /* GL_FLOAT_VEC2 */
- 527, /* GL_FLOAT_VEC3 */
- 529, /* GL_FLOAT_VEC4 */
- 717, /* GL_INT_VEC2 */
- 719, /* GL_INT_VEC3 */
- 721, /* GL_INT_VEC4 */
- 102, /* GL_BOOL */
- 104, /* GL_BOOL_VEC2 */
- 106, /* GL_BOOL_VEC3 */
- 108, /* GL_BOOL_VEC4 */
- 513, /* GL_FLOAT_MAT2 */
- 517, /* GL_FLOAT_MAT3 */
- 521, /* GL_FLOAT_MAT4 */
- 1523, /* GL_SAMPLER_1D */
- 1525, /* GL_SAMPLER_2D */
- 1527, /* GL_SAMPLER_3D */
- 1529, /* GL_SAMPLER_CUBE */
- 1524, /* GL_SAMPLER_1D_SHADOW */
- 1526, /* GL_SAMPLER_2D_SHADOW */
- 515, /* GL_FLOAT_MAT2x3 */
- 516, /* GL_FLOAT_MAT2x4 */
- 519, /* GL_FLOAT_MAT3x2 */
- 520, /* GL_FLOAT_MAT3x4 */
- 523, /* GL_FLOAT_MAT4x2 */
- 524, /* GL_FLOAT_MAT4x3 */
- 360, /* GL_DELETE_STATUS */
- 259, /* GL_COMPILE_STATUS */
- 776, /* GL_LINK_STATUS */
- 1984, /* GL_VALIDATE_STATUS */
- 700, /* GL_INFO_LOG_LENGTH */
- 56, /* GL_ATTACHED_SHADERS */
- 20, /* GL_ACTIVE_UNIFORMS */
- 21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- 1569, /* GL_SHADER_SOURCE_LENGTH */
+ 448, /* GL_DOUBLE */
+ 698, /* GL_HALF_FLOAT */
+ 544, /* GL_FIXED */
+ 162, /* GL_CLEAR */
+ 58, /* GL_AND */
+ 60, /* GL_AND_REVERSE */
+ 347, /* GL_COPY */
+ 59, /* GL_AND_INVERTED */
+ 1220, /* GL_NOOP */
+ 2288, /* GL_XOR */
+ 1287, /* GL_OR */
+ 1221, /* GL_NOR */
+ 526, /* GL_EQUIV */
+ 798, /* GL_INVERT */
+ 1290, /* GL_OR_REVERSE */
+ 348, /* GL_COPY_INVERTED */
+ 1289, /* GL_OR_INVERTED */
+ 1210, /* GL_NAND */
+ 1744, /* GL_SET */
+ 523, /* GL_EMISSION */
+ 1754, /* GL_SHININESS */
+ 57, /* GL_AMBIENT_AND_DIFFUSE */
+ 229, /* GL_COLOR_INDEXES */
+ 1159, /* GL_MODELVIEW */
+ 1478, /* GL_PROJECTION */
+ 1885, /* GL_TEXTURE */
+ 185, /* GL_COLOR */
+ 395, /* GL_DEPTH */
+ 1816, /* GL_STENCIL */
+ 228, /* GL_COLOR_INDEX */
+ 1837, /* GL_STENCIL_INDEX */
+ 411, /* GL_DEPTH_COMPONENT */
+ 1543, /* GL_RED */
+ 692, /* GL_GREEN */
+ 110, /* GL_BLUE */
+ 32, /* GL_ALPHA */
+ 1599, /* GL_RGB */
+ 1639, /* GL_RGBA */
+ 856, /* GL_LUMINANCE */
+ 883, /* GL_LUMINANCE_ALPHA */
+ 86, /* GL_BITMAP */
+ 1342, /* GL_POINT */
+ 820, /* GL_LINE */
+ 541, /* GL_FILL */
+ 1557, /* GL_RENDER */
+ 537, /* GL_FEEDBACK */
+ 1736, /* GL_SELECT */
+ 547, /* GL_FLAT */
+ 1765, /* GL_SMOOTH */
+ 799, /* GL_KEEP */
+ 1590, /* GL_REPLACE */
+ 727, /* GL_INCR */
+ 391, /* GL_DECR */
+ 2210, /* GL_VENDOR */
+ 1587, /* GL_RENDERER */
+ 2211, /* GL_VERSION */
+ 530, /* GL_EXTENSIONS */
+ 1686, /* GL_S */
+ 1876, /* GL_T */
+ 1526, /* GL_R */
+ 1505, /* GL_Q */
+ 1196, /* GL_MODULATE */
+ 390, /* GL_DECAL */
+ 2042, /* GL_TEXTURE_ENV_MODE */
+ 2041, /* GL_TEXTURE_ENV_COLOR */
+ 2040, /* GL_TEXTURE_ENV */
+ 531, /* GL_EYE_LINEAR */
+ 1248, /* GL_OBJECT_LINEAR */
+ 1791, /* GL_SPHERE_MAP */
+ 2045, /* GL_TEXTURE_GEN_MODE */
+ 1250, /* GL_OBJECT_PLANE */
+ 532, /* GL_EYE_PLANE */
+ 1211, /* GL_NEAREST */
+ 821, /* GL_LINEAR */
+ 1215, /* GL_NEAREST_MIPMAP_NEAREST */
+ 826, /* GL_LINEAR_MIPMAP_NEAREST */
+ 1214, /* GL_NEAREST_MIPMAP_LINEAR */
+ 825, /* GL_LINEAR_MIPMAP_LINEAR */
+ 2068, /* GL_TEXTURE_MAG_FILTER */
+ 2077, /* GL_TEXTURE_MIN_FILTER */
+ 2098, /* GL_TEXTURE_WRAP_S */
+ 2099, /* GL_TEXTURE_WRAP_T */
+ 155, /* GL_CLAMP */
+ 1589, /* GL_REPEAT */
+ 1386, /* GL_POLYGON_OFFSET_UNITS */
+ 1385, /* GL_POLYGON_OFFSET_POINT */
+ 1384, /* GL_POLYGON_OFFSET_LINE */
+ 1529, /* GL_R3_G3_B2 */
+ 2207, /* GL_V2F */
+ 2208, /* GL_V3F */
+ 152, /* GL_C4UB_V2F */
+ 153, /* GL_C4UB_V3F */
+ 150, /* GL_C3F_V3F */
+ 1208, /* GL_N3F_V3F */
+ 151, /* GL_C4F_N3F_V3F */
+ 1881, /* GL_T2F_V3F */
+ 1883, /* GL_T4F_V4F */
+ 1879, /* GL_T2F_C4UB_V3F */
+ 1877, /* GL_T2F_C3F_V3F */
+ 1880, /* GL_T2F_N3F_V3F */
+ 1878, /* GL_T2F_C4F_N3F_V3F */
+ 1882, /* GL_T4F_C4F_N3F_V4F */
+ 169, /* GL_CLIP_DISTANCE0 */
+ 170, /* GL_CLIP_DISTANCE1 */
+ 171, /* GL_CLIP_DISTANCE2 */
+ 172, /* GL_CLIP_DISTANCE3 */
+ 173, /* GL_CLIP_DISTANCE4 */
+ 174, /* GL_CLIP_DISTANCE5 */
+ 175, /* GL_CLIP_DISTANCE6 */
+ 176, /* GL_CLIP_DISTANCE7 */
+ 805, /* GL_LIGHT0 */
+ 806, /* GL_LIGHT1 */
+ 807, /* GL_LIGHT2 */
+ 808, /* GL_LIGHT3 */
+ 809, /* GL_LIGHT4 */
+ 810, /* GL_LIGHT5 */
+ 811, /* GL_LIGHT6 */
+ 812, /* GL_LIGHT7 */
+ 702, /* GL_HINT_BIT */
+ 319, /* GL_CONSTANT_COLOR */
+ 1261, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 314, /* GL_CONSTANT_ALPHA */
+ 1259, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 89, /* GL_BLEND_COLOR */
+ 669, /* GL_FUNC_ADD */
+ 1140, /* GL_MIN */
+ 1009, /* GL_MAX */
+ 96, /* GL_BLEND_EQUATION */
+ 675, /* GL_FUNC_SUBTRACT */
+ 672, /* GL_FUNC_REVERSE_SUBTRACT */
+ 327, /* GL_CONVOLUTION_1D */
+ 328, /* GL_CONVOLUTION_2D */
+ 1739, /* GL_SEPARABLE_2D */
+ 331, /* GL_CONVOLUTION_BORDER_MODE */
+ 335, /* GL_CONVOLUTION_FILTER_SCALE */
+ 333, /* GL_CONVOLUTION_FILTER_BIAS */
+ 1544, /* GL_REDUCE */
+ 337, /* GL_CONVOLUTION_FORMAT */
+ 341, /* GL_CONVOLUTION_WIDTH */
+ 339, /* GL_CONVOLUTION_HEIGHT */
+ 1028, /* GL_MAX_CONVOLUTION_WIDTH */
+ 1026, /* GL_MAX_CONVOLUTION_HEIGHT */
+ 1425, /* GL_POST_CONVOLUTION_RED_SCALE */
+ 1421, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ 1416, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ 1412, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ 1423, /* GL_POST_CONVOLUTION_RED_BIAS */
+ 1419, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ 1414, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ 1410, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ 703, /* GL_HISTOGRAM */
+ 1485, /* GL_PROXY_HISTOGRAM */
+ 719, /* GL_HISTOGRAM_WIDTH */
+ 709, /* GL_HISTOGRAM_FORMAT */
+ 715, /* GL_HISTOGRAM_RED_SIZE */
+ 711, /* GL_HISTOGRAM_GREEN_SIZE */
+ 706, /* GL_HISTOGRAM_BLUE_SIZE */
+ 704, /* GL_HISTOGRAM_ALPHA_SIZE */
+ 713, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ 717, /* GL_HISTOGRAM_SINK */
+ 1141, /* GL_MINMAX */
+ 1143, /* GL_MINMAX_FORMAT */
+ 1145, /* GL_MINMAX_SINK */
+ 1884, /* GL_TABLE_TOO_LARGE_EXT */
+ 2156, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 2196, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 2199, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 2168, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 2159, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1383, /* GL_POLYGON_OFFSET_FILL */
+ 1382, /* GL_POLYGON_OFFSET_FACTOR */
+ 1381, /* GL_POLYGON_OFFSET_BIAS */
+ 1593, /* GL_RESCALE_NORMAL */
+ 41, /* GL_ALPHA4 */
+ 43, /* GL_ALPHA8 */
+ 33, /* GL_ALPHA12 */
+ 35, /* GL_ALPHA16 */
+ 871, /* GL_LUMINANCE4 */
+ 877, /* GL_LUMINANCE8 */
+ 857, /* GL_LUMINANCE12 */
+ 863, /* GL_LUMINANCE16 */
+ 872, /* GL_LUMINANCE4_ALPHA4 */
+ 875, /* GL_LUMINANCE6_ALPHA2 */
+ 880, /* GL_LUMINANCE8_ALPHA8 */
+ 860, /* GL_LUMINANCE12_ALPHA4 */
+ 858, /* GL_LUMINANCE12_ALPHA12 */
+ 866, /* GL_LUMINANCE16_ALPHA16 */
+ 746, /* GL_INTENSITY */
+ 755, /* GL_INTENSITY4 */
+ 757, /* GL_INTENSITY8 */
+ 747, /* GL_INTENSITY12 */
+ 749, /* GL_INTENSITY16 */
+ 1614, /* GL_RGB2_EXT */
+ 1620, /* GL_RGB4 */
+ 1623, /* GL_RGB5 */
+ 1630, /* GL_RGB8 */
+ 1600, /* GL_RGB10 */
+ 1604, /* GL_RGB12 */
+ 1606, /* GL_RGB16 */
+ 1650, /* GL_RGBA2 */
+ 1657, /* GL_RGBA4 */
+ 1626, /* GL_RGB5_A1 */
+ 1662, /* GL_RGBA8 */
+ 1601, /* GL_RGB10_A2 */
+ 1640, /* GL_RGBA12 */
+ 1642, /* GL_RGBA16 */
+ 2085, /* GL_TEXTURE_RED_SIZE */
+ 2053, /* GL_TEXTURE_GREEN_SIZE */
+ 1977, /* GL_TEXTURE_BLUE_SIZE */
+ 1958, /* GL_TEXTURE_ALPHA_SIZE */
+ 2066, /* GL_TEXTURE_LUMINANCE_SIZE */
+ 2057, /* GL_TEXTURE_INTENSITY_SIZE */
+ 1591, /* GL_REPLACE_EXT */
+ 1489, /* GL_PROXY_TEXTURE_1D */
+ 1493, /* GL_PROXY_TEXTURE_2D */
+ 2093, /* GL_TEXTURE_TOO_LARGE_EXT */
+ 2079, /* GL_TEXTURE_PRIORITY */
+ 2087, /* GL_TEXTURE_RESIDENT */
+ 1961, /* GL_TEXTURE_BINDING_1D */
+ 1964, /* GL_TEXTURE_BINDING_2D */
+ 1967, /* GL_TEXTURE_BINDING_3D */
+ 1297, /* GL_PACK_SKIP_IMAGES */
+ 1293, /* GL_PACK_IMAGE_HEIGHT */
+ 2149, /* GL_UNPACK_SKIP_IMAGES */
+ 2146, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1956, /* GL_TEXTURE_3D */
+ 1497, /* GL_PROXY_TEXTURE_3D */
+ 2037, /* GL_TEXTURE_DEPTH */
+ 2096, /* GL_TEXTURE_WRAP_R */
+ 1010, /* GL_MAX_3D_TEXTURE_SIZE */
+ 2212, /* GL_VERTEX_ARRAY */
+ 1223, /* GL_NORMAL_ARRAY */
+ 186, /* GL_COLOR_ARRAY */
+ 731, /* GL_INDEX_ARRAY */
+ 2007, /* GL_TEXTURE_COORD_ARRAY */
+ 515, /* GL_EDGE_FLAG_ARRAY */
+ 2218, /* GL_VERTEX_ARRAY_SIZE */
+ 2220, /* GL_VERTEX_ARRAY_TYPE */
+ 2219, /* GL_VERTEX_ARRAY_STRIDE */
+ 1228, /* GL_NORMAL_ARRAY_TYPE */
+ 1227, /* GL_NORMAL_ARRAY_STRIDE */
+ 190, /* GL_COLOR_ARRAY_SIZE */
+ 192, /* GL_COLOR_ARRAY_TYPE */
+ 191, /* GL_COLOR_ARRAY_STRIDE */
+ 736, /* GL_INDEX_ARRAY_TYPE */
+ 735, /* GL_INDEX_ARRAY_STRIDE */
+ 2011, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ 2013, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ 2012, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ 519, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ 2217, /* GL_VERTEX_ARRAY_POINTER */
+ 1226, /* GL_NORMAL_ARRAY_POINTER */
+ 189, /* GL_COLOR_ARRAY_POINTER */
+ 734, /* GL_INDEX_ARRAY_POINTER */
+ 2010, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ 518, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ 1201, /* GL_MULTISAMPLE */
+ 1713, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ 1715, /* GL_SAMPLE_ALPHA_TO_ONE */
+ 1720, /* GL_SAMPLE_COVERAGE */
+ 1717, /* GL_SAMPLE_BUFFERS */
+ 1708, /* GL_SAMPLES */
+ 1724, /* GL_SAMPLE_COVERAGE_VALUE */
+ 1722, /* GL_SAMPLE_COVERAGE_INVERT */
+ 234, /* GL_COLOR_MATRIX */
+ 236, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ 1022, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ 1408, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ 1404, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ 1399, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ 1395, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ 1406, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ 1402, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ 1397, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ 1393, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ 1990, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ 1498, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ 1992, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ 94, /* GL_BLEND_DST_RGB */
+ 108, /* GL_BLEND_SRC_RGB */
+ 92, /* GL_BLEND_DST_ALPHA */
+ 106, /* GL_BLEND_SRC_ALPHA */
+ 240, /* GL_COLOR_TABLE */
+ 1418, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ 1401, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1484, /* GL_PROXY_COLOR_TABLE */
+ 1488, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ 1487, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ 264, /* GL_COLOR_TABLE_SCALE */
+ 244, /* GL_COLOR_TABLE_BIAS */
+ 249, /* GL_COLOR_TABLE_FORMAT */
+ 266, /* GL_COLOR_TABLE_WIDTH */
+ 261, /* GL_COLOR_TABLE_RED_SIZE */
+ 252, /* GL_COLOR_TABLE_GREEN_SIZE */
+ 246, /* GL_COLOR_TABLE_BLUE_SIZE */
+ 241, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ 258, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ 255, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ 79, /* GL_BGR */
+ 80, /* GL_BGRA */
+ 1037, /* GL_MAX_ELEMENTS_VERTICES */
+ 1036, /* GL_MAX_ELEMENTS_INDICES */
+ 2056, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 183, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ 1364, /* GL_POINT_SIZE_MIN */
+ 1360, /* GL_POINT_SIZE_MAX */
+ 1349, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1345, /* GL_POINT_DISTANCE_ATTENUATION */
+ 157, /* GL_CLAMP_TO_BORDER */
+ 160, /* GL_CLAMP_TO_EDGE */
+ 2078, /* GL_TEXTURE_MIN_LOD */
+ 2076, /* GL_TEXTURE_MAX_LOD */
+ 1960, /* GL_TEXTURE_BASE_LEVEL */
+ 2075, /* GL_TEXTURE_MAX_LEVEL */
+ 722, /* GL_IGNORE_BORDER_HP */
+ 318, /* GL_CONSTANT_BORDER_HP */
+ 1592, /* GL_REPLICATE_BORDER_HP */
+ 329, /* GL_CONVOLUTION_BORDER_COLOR */
+ 1256, /* GL_OCCLUSION_TEST_HP */
+ 1257, /* GL_OCCLUSION_TEST_RESULT_HP */
+ 823, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ 1984, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ 1986, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ 1988, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ 1989, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1987, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ 1985, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ 1016, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ 1017, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1428, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ 1430, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ 1427, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ 1429, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ 2064, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ 2065, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ 2063, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ 678, /* GL_GENERATE_MIPMAP */
+ 679, /* GL_GENERATE_MIPMAP_HINT */
+ 591, /* GL_FOG_OFFSET_SGIX */
+ 592, /* GL_FOG_OFFSET_VALUE_SGIX */
+ 1998, /* GL_TEXTURE_COMPARE_SGIX */
+ 1997, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ 2060, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ 2052, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ 412, /* GL_DEPTH_COMPONENT16 */
+ 416, /* GL_DEPTH_COMPONENT24 */
+ 420, /* GL_DEPTH_COMPONENT32 */
+ 354, /* GL_CULL_VERTEX_EXT */
+ 356, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ 355, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ 2284, /* GL_WRAP_BORDER_SUN */
+ 1991, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ 816, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ 1758, /* GL_SINGLE_COLOR */
+ 1742, /* GL_SEPARATE_SPECULAR_COLOR */
+ 1753, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ 603, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ 604, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ 615, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ 606, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ 602, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ 601, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ 605, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ 616, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ 633, /* GL_FRAMEBUFFER_DEFAULT */
+ 660, /* GL_FRAMEBUFFER_UNDEFINED */
+ 428, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ 892, /* GL_MAJOR_VERSION */
+ 1147, /* GL_MINOR_VERSION */
+ 1237, /* GL_NUM_EXTENSIONS */
+ 324, /* GL_CONTEXT_FLAGS */
+ 730, /* GL_INDEX */
+ 406, /* GL_DEPTH_BUFFER */
+ 1832, /* GL_STENCIL_BUFFER */
+ 295, /* GL_COMPRESSED_RED */
+ 296, /* GL_COMPRESSED_RG */
+ 2155, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 2200, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 2201, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 2197, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 2194, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 2169, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 2165, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 2073, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ 2074, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ 2072, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ 1151, /* GL_MIRRORED_REPEAT */
+ 1679, /* GL_RGB_S3TC */
+ 1622, /* GL_RGB4_S3TC */
+ 1675, /* GL_RGBA_S3TC */
+ 1661, /* GL_RGBA4_S3TC */
+ 1670, /* GL_RGBA_DXT5_S3TC */
+ 1658, /* GL_RGBA4_DXT5_S3TC */
+ 306, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ 301, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ 302, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ 303, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ 1213, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ 1212, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ 824, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ 578, /* GL_FOG_COORDINATE_SOURCE */
+ 570, /* GL_FOG_COORD */
+ 594, /* GL_FRAGMENT_DEPTH */
+ 360, /* GL_CURRENT_FOG_COORD */
+ 577, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ 576, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ 575, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ 572, /* GL_FOG_COORDINATE_ARRAY */
+ 238, /* GL_COLOR_SUM */
+ 381, /* GL_CURRENT_SECONDARY_COLOR */
+ 1733, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ 1735, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ 1734, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ 1732, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ 1729, /* GL_SECONDARY_COLOR_ARRAY */
+ 379, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ 29, /* GL_ALIASED_POINT_SIZE_RANGE */
+ 28, /* GL_ALIASED_LINE_WIDTH_RANGE */
+ 1886, /* GL_TEXTURE0 */
+ 1888, /* GL_TEXTURE1 */
+ 1910, /* GL_TEXTURE2 */
+ 1932, /* GL_TEXTURE3 */
+ 1938, /* GL_TEXTURE4 */
+ 1940, /* GL_TEXTURE5 */
+ 1942, /* GL_TEXTURE6 */
+ 1944, /* GL_TEXTURE7 */
+ 1946, /* GL_TEXTURE8 */
+ 1948, /* GL_TEXTURE9 */
+ 1889, /* GL_TEXTURE10 */
+ 1891, /* GL_TEXTURE11 */
+ 1893, /* GL_TEXTURE12 */
+ 1895, /* GL_TEXTURE13 */
+ 1897, /* GL_TEXTURE14 */
+ 1899, /* GL_TEXTURE15 */
+ 1901, /* GL_TEXTURE16 */
+ 1903, /* GL_TEXTURE17 */
+ 1905, /* GL_TEXTURE18 */
+ 1907, /* GL_TEXTURE19 */
+ 1911, /* GL_TEXTURE20 */
+ 1913, /* GL_TEXTURE21 */
+ 1915, /* GL_TEXTURE22 */
+ 1917, /* GL_TEXTURE23 */
+ 1919, /* GL_TEXTURE24 */
+ 1921, /* GL_TEXTURE25 */
+ 1923, /* GL_TEXTURE26 */
+ 1925, /* GL_TEXTURE27 */
+ 1927, /* GL_TEXTURE28 */
+ 1929, /* GL_TEXTURE29 */
+ 1933, /* GL_TEXTURE30 */
+ 1935, /* GL_TEXTURE31 */
+ 19, /* GL_ACTIVE_TEXTURE */
+ 163, /* GL_CLIENT_ACTIVE_TEXTURE */
+ 1112, /* GL_MAX_TEXTURE_UNITS */
+ 2128, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 2131, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 2133, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 2125, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1868, /* GL_SUBTRACT */
+ 1094, /* GL_MAX_RENDERBUFFER_SIZE */
+ 287, /* GL_COMPRESSED_ALPHA */
+ 291, /* GL_COMPRESSED_LUMINANCE */
+ 292, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ 289, /* GL_COMPRESSED_INTENSITY */
+ 297, /* GL_COMPRESSED_RGB */
+ 298, /* GL_COMPRESSED_RGBA */
+ 2005, /* GL_TEXTURE_COMPRESSION_HINT */
+ 2082, /* GL_TEXTURE_RECTANGLE */
+ 1973, /* GL_TEXTURE_BINDING_RECTANGLE */
+ 1501, /* GL_PROXY_TEXTURE_RECTANGLE */
+ 1091, /* GL_MAX_RECTANGLE_TEXTURE_SIZE */
+ 427, /* GL_DEPTH_STENCIL */
+ 2161, /* GL_UNSIGNED_INT_24_8 */
+ 1107, /* GL_MAX_TEXTURE_LOD_BIAS */
+ 2071, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1109, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ 2043, /* GL_TEXTURE_FILTER_CONTROL */
+ 2061, /* GL_TEXTURE_LOD_BIAS */
+ 271, /* GL_COMBINE4 */
+ 1100, /* GL_MAX_SHININESS_NV */
+ 1101, /* GL_MAX_SPOT_EXPONENT_NV */
+ 728, /* GL_INCR_WRAP */
+ 392, /* GL_DECR_WRAP */
+ 1171, /* GL_MODELVIEW1_ARB */
+ 1229, /* GL_NORMAL_MAP */
+ 1552, /* GL_REFLECTION_MAP */
+ 2015, /* GL_TEXTURE_CUBE_MAP */
+ 1970, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ 2027, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ 2017, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ 2030, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ 2020, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ 2033, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ 2023, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ 1499, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ 1030, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ 1207, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ 1442, /* GL_PRIMITIVE_RESTART_NV */
+ 1441, /* GL_PRIMITIVE_RESTART_INDEX_NV */
+ 586, /* GL_FOG_DISTANCE_MODE_NV */
+ 534, /* GL_EYE_RADIAL_NV */
+ 533, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ 270, /* GL_COMBINE */
+ 277, /* GL_COMBINE_RGB */
+ 272, /* GL_COMBINE_ALPHA */
+ 1680, /* GL_RGB_SCALE */
+ 25, /* GL_ADD_SIGNED */
+ 764, /* GL_INTERPOLATE */
+ 313, /* GL_CONSTANT */
+ 1434, /* GL_PRIMARY_COLOR */
+ 1431, /* GL_PREVIOUS */
+ 1773, /* GL_SOURCE0_RGB */
+ 1779, /* GL_SOURCE1_RGB */
+ 1785, /* GL_SOURCE2_RGB */
+ 1789, /* GL_SOURCE3_RGB_NV */
+ 1770, /* GL_SOURCE0_ALPHA */
+ 1776, /* GL_SOURCE1_ALPHA */
+ 1782, /* GL_SOURCE2_ALPHA */
+ 1788, /* GL_SOURCE3_ALPHA_NV */
+ 1270, /* GL_OPERAND0_RGB */
+ 1276, /* GL_OPERAND1_RGB */
+ 1282, /* GL_OPERAND2_RGB */
+ 1286, /* GL_OPERAND3_RGB_NV */
+ 1267, /* GL_OPERAND0_ALPHA */
+ 1273, /* GL_OPERAND1_ALPHA */
+ 1279, /* GL_OPERAND2_ALPHA */
+ 1285, /* GL_OPERAND3_ALPHA_NV */
+ 137, /* GL_BUFFER_OBJECT_APPLE */
+ 2213, /* GL_VERTEX_ARRAY_BINDING */
+ 2080, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ 2081, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ 2289, /* GL_YCBCR_422_APPLE */
+ 2202, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 2204, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 2092, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ 1859, /* GL_STORAGE_PRIVATE_APPLE */
+ 1858, /* GL_STORAGE_CACHED_APPLE */
+ 1860, /* GL_STORAGE_SHARED_APPLE */
+ 1760, /* GL_SLICE_ACCUM_SUN */
+ 1510, /* GL_QUAD_MESH_SUN */
+ 2139, /* GL_TRIANGLE_MESH_SUN */
+ 2254, /* GL_VERTEX_PROGRAM_ARB */
+ 2265, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 2239, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 2247, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 2249, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 2251, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 383, /* GL_CURRENT_VERTEX_ATTRIB */
+ 1455, /* GL_PROGRAM_LENGTH_ARB */
+ 1471, /* GL_PROGRAM_STRING_ARB */
+ 1194, /* GL_MODELVIEW_PROJECTION_NV */
+ 721, /* GL_IDENTITY_NV */
+ 796, /* GL_INVERSE_NV */
+ 2130, /* GL_TRANSPOSE_NV */
+ 797, /* GL_INVERSE_TRANSPOSE_NV */
+ 1075, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ 1074, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ 956, /* GL_MATRIX0_NV */
+ 968, /* GL_MATRIX1_NV */
+ 980, /* GL_MATRIX2_NV */
+ 984, /* GL_MATRIX3_NV */
+ 986, /* GL_MATRIX4_NV */
+ 988, /* GL_MATRIX5_NV */
+ 990, /* GL_MATRIX6_NV */
+ 992, /* GL_MATRIX7_NV */
+ 366, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ 363, /* GL_CURRENT_MATRIX_ARB */
+ 1468, /* GL_PROGRAM_POINT_SIZE */
+ 2260, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1467, /* GL_PROGRAM_PARAMETER_NV */
+ 2245, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1473, /* GL_PROGRAM_TARGET_NV */
+ 1470, /* GL_PROGRAM_RESIDENT_NV */
+ 2102, /* GL_TRACK_MATRIX_NV */
+ 2103, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 2255, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1449, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ 408, /* GL_DEPTH_CLAMP */
+ 2221, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 2228, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 2229, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 2230, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 2231, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 2232, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 2233, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 2234, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 2235, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 2236, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 2222, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 2223, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 2224, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 2225, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 2226, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 2227, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 904, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ 911, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ 912, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ 913, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ 914, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ 915, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ 916, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ 917, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ 918, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ 919, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ 905, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ 906, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ 907, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ 908, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ 909, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ 910, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ 931, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ 938, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ 939, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ 940, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ 941, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ 942, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ 943, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ 1448, /* GL_PROGRAM_BINDING_ARB */
+ 945, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ 946, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ 932, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ 933, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ 934, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ 935, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ 936, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ 937, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ 2003, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ 2000, /* GL_TEXTURE_COMPRESSED */
+ 1235, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ 311, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ 1134, /* GL_MAX_VERTEX_UNITS_ARB */
+ 23, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+ 2283, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 2253, /* GL_VERTEX_BLEND_ARB */
+ 385, /* GL_CURRENT_WEIGHT_ARB */
+ 2281, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 2279, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 2277, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 2275, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 2270, /* GL_WEIGHT_ARRAY_ARB */
+ 442, /* GL_DOT3_RGB */
+ 443, /* GL_DOT3_RGBA */
+ 305, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ 300, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ 1202, /* GL_MULTISAMPLE_3DFX */
+ 1718, /* GL_SAMPLE_BUFFERS_3DFX */
+ 1709, /* GL_SAMPLES_3DFX */
+ 1182, /* GL_MODELVIEW2_ARB */
+ 1185, /* GL_MODELVIEW3_ARB */
+ 1186, /* GL_MODELVIEW4_ARB */
+ 1187, /* GL_MODELVIEW5_ARB */
+ 1188, /* GL_MODELVIEW6_ARB */
+ 1189, /* GL_MODELVIEW7_ARB */
+ 1190, /* GL_MODELVIEW8_ARB */
+ 1191, /* GL_MODELVIEW9_ARB */
+ 1161, /* GL_MODELVIEW10_ARB */
+ 1162, /* GL_MODELVIEW11_ARB */
+ 1163, /* GL_MODELVIEW12_ARB */
+ 1164, /* GL_MODELVIEW13_ARB */
+ 1165, /* GL_MODELVIEW14_ARB */
+ 1166, /* GL_MODELVIEW15_ARB */
+ 1167, /* GL_MODELVIEW16_ARB */
+ 1168, /* GL_MODELVIEW17_ARB */
+ 1169, /* GL_MODELVIEW18_ARB */
+ 1170, /* GL_MODELVIEW19_ARB */
+ 1172, /* GL_MODELVIEW20_ARB */
+ 1173, /* GL_MODELVIEW21_ARB */
+ 1174, /* GL_MODELVIEW22_ARB */
+ 1175, /* GL_MODELVIEW23_ARB */
+ 1176, /* GL_MODELVIEW24_ARB */
+ 1177, /* GL_MODELVIEW25_ARB */
+ 1178, /* GL_MODELVIEW26_ARB */
+ 1179, /* GL_MODELVIEW27_ARB */
+ 1180, /* GL_MODELVIEW28_ARB */
+ 1181, /* GL_MODELVIEW29_ARB */
+ 1183, /* GL_MODELVIEW30_ARB */
+ 1184, /* GL_MODELVIEW31_ARB */
+ 447, /* GL_DOT3_RGB_EXT */
+ 445, /* GL_DOT3_RGBA_EXT */
+ 1155, /* GL_MIRROR_CLAMP_EXT */
+ 1158, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ 1197, /* GL_MODULATE_ADD_ATI */
+ 1198, /* GL_MODULATE_SIGNED_ADD_ATI */
+ 1199, /* GL_MODULATE_SUBTRACT_ATI */
+ 2290, /* GL_YCBCR_MESA */
+ 1294, /* GL_PACK_INVERT_MESA */
+ 388, /* GL_DEBUG_OBJECT_MESA */
+ 389, /* GL_DEBUG_PRINT_MESA */
+ 387, /* GL_DEBUG_ASSERT_MESA */
+ 139, /* GL_BUFFER_SIZE */
+ 141, /* GL_BUFFER_USAGE */
+ 145, /* GL_BUMP_ROT_MATRIX_ATI */
+ 146, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ 144, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ 148, /* GL_BUMP_TEX_UNITS_ATI */
+ 507, /* GL_DUDV_ATI */
+ 506, /* GL_DU8DV8_ATI */
+ 143, /* GL_BUMP_ENVMAP_ATI */
+ 147, /* GL_BUMP_TARGET_ATI */
+ 1238, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
+ 1446, /* GL_PROGRAM_BINARY_FORMATS_OES */
+ 1822, /* GL_STENCIL_BACK_FUNC */
+ 1820, /* GL_STENCIL_BACK_FAIL */
+ 1824, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ 1826, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ 595, /* GL_FRAGMENT_PROGRAM_ARB */
+ 1444, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1476, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1475, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1458, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1464, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1463, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 1064, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1089, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1088, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1077, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1083, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1082, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 1652, /* GL_RGBA32F */
+ 1615, /* GL_RGB32F */
+ 1643, /* GL_RGBA16F */
+ 1607, /* GL_RGB16F */
+ 1033, /* GL_MAX_DRAW_BUFFERS */
+ 451, /* GL_DRAW_BUFFER0 */
+ 454, /* GL_DRAW_BUFFER1 */
+ 475, /* GL_DRAW_BUFFER2 */
+ 478, /* GL_DRAW_BUFFER3 */
+ 481, /* GL_DRAW_BUFFER4 */
+ 484, /* GL_DRAW_BUFFER5 */
+ 487, /* GL_DRAW_BUFFER6 */
+ 490, /* GL_DRAW_BUFFER7 */
+ 493, /* GL_DRAW_BUFFER8 */
+ 496, /* GL_DRAW_BUFFER9 */
+ 455, /* GL_DRAW_BUFFER10 */
+ 458, /* GL_DRAW_BUFFER11 */
+ 461, /* GL_DRAW_BUFFER12 */
+ 464, /* GL_DRAW_BUFFER13 */
+ 467, /* GL_DRAW_BUFFER14 */
+ 470, /* GL_DRAW_BUFFER15 */
+ 97, /* GL_BLEND_EQUATION_ALPHA */
+ 1007, /* GL_MATRIX_PALETTE_ARB */
+ 1057, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 1060, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 369, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ 995, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 364, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ 1000, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ 1004, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ 1002, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ 998, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ 2038, /* GL_TEXTURE_DEPTH_SIZE */
+ 435, /* GL_DEPTH_TEXTURE_MODE */
+ 1995, /* GL_TEXTURE_COMPARE_MODE */
+ 1993, /* GL_TEXTURE_COMPARE_FUNC */
+ 281, /* GL_COMPARE_REF_TO_TEXTURE */
+ 1371, /* GL_POINT_SPRITE */
+ 343, /* GL_COORD_REPLACE */
+ 1376, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1516, /* GL_QUERY_COUNTER_BITS */
+ 372, /* GL_CURRENT_QUERY */
+ 1520, /* GL_QUERY_RESULT */
+ 1522, /* GL_QUERY_RESULT_AVAILABLE */
+ 1126, /* GL_MAX_VERTEX_ATTRIBS */
+ 2243, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 433, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ 432, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ 1103, /* GL_MAX_TEXTURE_COORDS */
+ 1105, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ 1451, /* GL_PROGRAM_ERROR_STRING_ARB */
+ 1453, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ 1452, /* GL_PROGRAM_FORMAT_ARB */
+ 2094, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ 405, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ 404, /* GL_DEPTH_BOUNDS_EXT */
+ 61, /* GL_ARRAY_BUFFER */
+ 520, /* GL_ELEMENT_ARRAY_BUFFER */
+ 62, /* GL_ARRAY_BUFFER_BINDING */
+ 521, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ 2215, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1224, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 187, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ 732, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ 2008, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ 516, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ 1730, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ 573, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ 2271, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 2237, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1454, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ 1070, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ 1460, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1079, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1474, /* GL_PROGRAM_TEMPORARIES_ARB */
+ 1085, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ 1462, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1081, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1466, /* GL_PROGRAM_PARAMETERS_ARB */
+ 1084, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ 1461, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1080, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1445, /* GL_PROGRAM_ATTRIBS_ARB */
+ 1065, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ 1459, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1078, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1443, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1063, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1457, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 1076, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 1071, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ 1067, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ 1477, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ 2127, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1539, /* GL_READ_ONLY */
+ 2285, /* GL_WRITE_ONLY */
+ 1541, /* GL_READ_WRITE */
+ 124, /* GL_BUFFER_ACCESS */
+ 129, /* GL_BUFFER_MAPPED */
+ 134, /* GL_BUFFER_MAP_POINTER */
+ 2101, /* GL_TIME_ELAPSED_EXT */
+ 955, /* GL_MATRIX0_ARB */
+ 967, /* GL_MATRIX1_ARB */
+ 979, /* GL_MATRIX2_ARB */
+ 983, /* GL_MATRIX3_ARB */
+ 985, /* GL_MATRIX4_ARB */
+ 987, /* GL_MATRIX5_ARB */
+ 989, /* GL_MATRIX6_ARB */
+ 991, /* GL_MATRIX7_ARB */
+ 993, /* GL_MATRIX8_ARB */
+ 994, /* GL_MATRIX9_ARB */
+ 957, /* GL_MATRIX10_ARB */
+ 958, /* GL_MATRIX11_ARB */
+ 959, /* GL_MATRIX12_ARB */
+ 960, /* GL_MATRIX13_ARB */
+ 961, /* GL_MATRIX14_ARB */
+ 962, /* GL_MATRIX15_ARB */
+ 963, /* GL_MATRIX16_ARB */
+ 964, /* GL_MATRIX17_ARB */
+ 965, /* GL_MATRIX18_ARB */
+ 966, /* GL_MATRIX19_ARB */
+ 969, /* GL_MATRIX20_ARB */
+ 970, /* GL_MATRIX21_ARB */
+ 971, /* GL_MATRIX22_ARB */
+ 972, /* GL_MATRIX23_ARB */
+ 973, /* GL_MATRIX24_ARB */
+ 974, /* GL_MATRIX25_ARB */
+ 975, /* GL_MATRIX26_ARB */
+ 976, /* GL_MATRIX27_ARB */
+ 977, /* GL_MATRIX28_ARB */
+ 978, /* GL_MATRIX29_ARB */
+ 981, /* GL_MATRIX30_ARB */
+ 982, /* GL_MATRIX31_ARB */
+ 1863, /* GL_STREAM_DRAW */
+ 1865, /* GL_STREAM_READ */
+ 1861, /* GL_STREAM_COPY */
+ 1812, /* GL_STATIC_DRAW */
+ 1814, /* GL_STATIC_READ */
+ 1810, /* GL_STATIC_COPY */
+ 510, /* GL_DYNAMIC_DRAW */
+ 512, /* GL_DYNAMIC_READ */
+ 508, /* GL_DYNAMIC_COPY */
+ 1334, /* GL_PIXEL_PACK_BUFFER */
+ 1338, /* GL_PIXEL_UNPACK_BUFFER */
+ 1335, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ 1339, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 396, /* GL_DEPTH24_STENCIL8 */
+ 2090, /* GL_TEXTURE_STENCIL_SIZE */
+ 2036, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ 1066, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ 1069, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ 1073, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ 1072, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ 2241, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */
+ 1012, /* GL_MAX_ARRAY_TEXTURE_LAYERS */
+ 1149, /* GL_MIN_PROGRAM_TEXEL_OFFSET */
+ 1086, /* GL_MAX_PROGRAM_TEXEL_OFFSET */
+ 1854, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ 18, /* GL_ACTIVE_STENCIL_FACE_EXT */
+ 1156, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1711, /* GL_SAMPLES_PASSED */
+ 688, /* GL_GEOMETRY_VERTICES_OUT */
+ 682, /* GL_GEOMETRY_INPUT_TYPE */
+ 684, /* GL_GEOMETRY_OUTPUT_TYPE */
+ 156, /* GL_CLAMP_READ_COLOR */
+ 546, /* GL_FIXED_ONLY */
+ 1358, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
+ 1357, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
+ 1356, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
+ 1193, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 1480, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 2070, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 138, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ 128, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
+ 1556, /* GL_RELEASED_APPLE */
+ 2268, /* GL_VOLATILE_APPLE */
+ 1595, /* GL_RETAINED_APPLE */
+ 2144, /* GL_UNDEFINED_APPLE */
+ 1504, /* GL_PURGEABLE_APPLE */
+ 596, /* GL_FRAGMENT_SHADER */
+ 2263, /* GL_VERTEX_SHADER */
+ 1465, /* GL_PROGRAM_OBJECT_ARB */
+ 1747, /* GL_SHADER_OBJECT_ARB */
+ 1041, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ 1131, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ 1122, /* GL_MAX_VARYING_COMPONENTS */
+ 1129, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ 1024, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ 1254, /* GL_OBJECT_TYPE_ARB */
+ 1749, /* GL_SHADER_TYPE */
+ 561, /* GL_FLOAT_VEC2 */
+ 563, /* GL_FLOAT_VEC3 */
+ 565, /* GL_FLOAT_VEC4 */
+ 784, /* GL_INT_VEC2 */
+ 786, /* GL_INT_VEC3 */
+ 788, /* GL_INT_VEC4 */
+ 116, /* GL_BOOL */
+ 118, /* GL_BOOL_VEC2 */
+ 120, /* GL_BOOL_VEC3 */
+ 122, /* GL_BOOL_VEC4 */
+ 549, /* GL_FLOAT_MAT2 */
+ 553, /* GL_FLOAT_MAT3 */
+ 557, /* GL_FLOAT_MAT4 */
+ 1687, /* GL_SAMPLER_1D */
+ 1693, /* GL_SAMPLER_2D */
+ 1701, /* GL_SAMPLER_3D */
+ 1705, /* GL_SAMPLER_CUBE */
+ 1692, /* GL_SAMPLER_1D_SHADOW */
+ 1700, /* GL_SAMPLER_2D_SHADOW */
+ 1698, /* GL_SAMPLER_2D_RECT */
+ 1699, /* GL_SAMPLER_2D_RECT_SHADOW */
+ 551, /* GL_FLOAT_MAT2x3 */
+ 552, /* GL_FLOAT_MAT2x4 */
+ 555, /* GL_FLOAT_MAT3x2 */
+ 556, /* GL_FLOAT_MAT3x4 */
+ 559, /* GL_FLOAT_MAT4x2 */
+ 560, /* GL_FLOAT_MAT4x3 */
+ 394, /* GL_DELETE_STATUS */
+ 286, /* GL_COMPILE_STATUS */
+ 845, /* GL_LINK_STATUS */
+ 2209, /* GL_VALIDATE_STATUS */
+ 744, /* GL_INFO_LOG_LENGTH */
+ 64, /* GL_ATTACHED_SHADERS */
+ 21, /* GL_ACTIVE_UNIFORMS */
+ 22, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+ 1748, /* GL_SHADER_SOURCE_LENGTH */
15, /* GL_ACTIVE_ATTRIBUTES */
16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
- 562, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- 1572, /* GL_SHADING_LANGUAGE_VERSION */
- 337, /* GL_CURRENT_PROGRAM */
- 1198, /* GL_PALETTE4_RGB8_OES */
- 1200, /* GL_PALETTE4_RGBA8_OES */
- 1196, /* GL_PALETTE4_R5_G6_B5_OES */
- 1199, /* GL_PALETTE4_RGBA4_OES */
- 1197, /* GL_PALETTE4_RGB5_A1_OES */
- 1203, /* GL_PALETTE8_RGB8_OES */
- 1205, /* GL_PALETTE8_RGBA8_OES */
- 1201, /* GL_PALETTE8_R5_G6_B5_OES */
- 1204, /* GL_PALETTE8_RGBA4_OES */
- 1202, /* GL_PALETTE8_RGB5_A1_OES */
- 682, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- 680, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- 1250, /* GL_POINT_SIZE_ARRAY_OES */
- 1825, /* GL_TEXTURE_CROP_RECT_OES */
- 912, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
- 1249, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
- 1967, /* GL_UNSIGNED_NORMALIZED */
- 1771, /* GL_TEXTURE_1D_ARRAY_EXT */
- 1381, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- 1773, /* GL_TEXTURE_2D_ARRAY_EXT */
- 1384, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- 1780, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- 1782, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- 958, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
- 1625, /* GL_SRGB */
- 1626, /* GL_SRGB8 */
- 1628, /* GL_SRGB_ALPHA */
- 1627, /* GL_SRGB8_ALPHA8 */
- 1585, /* GL_SLUMINANCE_ALPHA */
- 1584, /* GL_SLUMINANCE8_ALPHA8 */
- 1582, /* GL_SLUMINANCE */
- 1583, /* GL_SLUMINANCE8 */
- 280, /* GL_COMPRESSED_SRGB */
- 281, /* GL_COMPRESSED_SRGB_ALPHA */
- 278, /* GL_COMPRESSED_SLUMINANCE */
- 279, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- 1925, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
- 1919, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
- 1021, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
- 1924, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
- 1922, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
- 1921, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
- 1332, /* GL_PRIMITIVES_GENERATED_EXT */
- 1923, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
- 1412, /* GL_RASTERIZER_DISCARD_EXT */
- 1019, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
- 1020, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
- 712, /* GL_INTERLEAVED_ATTRIBS_EXT */
- 1562, /* GL_SEPARATE_ATTRIBS_EXT */
- 1918, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
- 1917, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
- 1268, /* GL_POINT_SPRITE_COORD_ORIGIN */
- 784, /* GL_LOWER_LEFT */
- 1981, /* GL_UPPER_LEFT */
- 1649, /* GL_STENCIL_BACK_REF */
- 1650, /* GL_STENCIL_BACK_VALUE_MASK */
- 1651, /* GL_STENCIL_BACK_WRITEMASK */
- 465, /* GL_DRAW_FRAMEBUFFER_BINDING */
- 1438, /* GL_RENDERBUFFER_BINDING */
- 1415, /* GL_READ_FRAMEBUFFER */
- 464, /* GL_DRAW_FRAMEBUFFER */
- 1416, /* GL_READ_FRAMEBUFFER_BINDING */
- 1457, /* GL_RENDERBUFFER_SAMPLES */
- 575, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- 572, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- 587, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- 582, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- 585, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- 593, /* GL_FRAMEBUFFER_COMPLETE */
- 598, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- 612, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- 607, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- 602, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- 608, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- 604, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
- 617, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
- 623, /* GL_FRAMEBUFFER_UNSUPPORTED */
- 621, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- 934, /* GL_MAX_COLOR_ATTACHMENTS */
- 167, /* GL_COLOR_ATTACHMENT0 */
- 170, /* GL_COLOR_ATTACHMENT1 */
- 184, /* GL_COLOR_ATTACHMENT2 */
- 186, /* GL_COLOR_ATTACHMENT3 */
- 188, /* GL_COLOR_ATTACHMENT4 */
- 190, /* GL_COLOR_ATTACHMENT5 */
- 192, /* GL_COLOR_ATTACHMENT6 */
- 194, /* GL_COLOR_ATTACHMENT7 */
- 196, /* GL_COLOR_ATTACHMENT8 */
- 198, /* GL_COLOR_ATTACHMENT9 */
- 171, /* GL_COLOR_ATTACHMENT10 */
- 173, /* GL_COLOR_ATTACHMENT11 */
- 175, /* GL_COLOR_ATTACHMENT12 */
- 177, /* GL_COLOR_ATTACHMENT13 */
- 179, /* GL_COLOR_ATTACHMENT14 */
- 181, /* GL_COLOR_ATTACHMENT15 */
- 365, /* GL_DEPTH_ATTACHMENT */
- 1638, /* GL_STENCIL_ATTACHMENT */
- 564, /* GL_FRAMEBUFFER */
- 1435, /* GL_RENDERBUFFER */
- 1461, /* GL_RENDERBUFFER_WIDTH */
- 1448, /* GL_RENDERBUFFER_HEIGHT */
- 1451, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- 1669, /* GL_STENCIL_INDEX_EXT */
- 1658, /* GL_STENCIL_INDEX1 */
- 1663, /* GL_STENCIL_INDEX4 */
- 1666, /* GL_STENCIL_INDEX8 */
- 1659, /* GL_STENCIL_INDEX16 */
- 1455, /* GL_RENDERBUFFER_RED_SIZE */
- 1446, /* GL_RENDERBUFFER_GREEN_SIZE */
- 1441, /* GL_RENDERBUFFER_BLUE_SIZE */
- 1436, /* GL_RENDERBUFFER_ALPHA_SIZE */
- 1443, /* GL_RENDERBUFFER_DEPTH_SIZE */
- 1459, /* GL_RENDERBUFFER_STENCIL_SIZE */
- 615, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- 1001, /* GL_MAX_SAMPLES */
- 1861, /* GL_TEXTURE_GEN_STR_OES */
- 655, /* GL_HALF_FLOAT_OES */
- 1489, /* GL_RGB565_OES */
- 571, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
- 611, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
- 610, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
- 646, /* GL_GEOMETRY_SHADER_ARB */
- 647, /* GL_GEOMETRY_VERTICES_OUT_ARB */
- 644, /* GL_GEOMETRY_INPUT_TYPE_ARB */
- 645, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
- 961, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
- 1035, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
- 960, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
- 957, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
- 959, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
- 785, /* GL_LOW_FLOAT */
- 1037, /* GL_MEDIUM_FLOAT */
- 656, /* GL_HIGH_FLOAT */
- 786, /* GL_LOW_INT */
- 1038, /* GL_MEDIUM_INT */
- 657, /* GL_HIGH_INT */
- 1958, /* GL_UNSIGNED_INT_10_10_10_2_OES */
- 716, /* GL_INT_10_10_10_2_OES */
- 1566, /* GL_SHADER_BINARY_FORMATS */
- 1134, /* GL_NUM_SHADER_BINARY_FORMATS */
- 1567, /* GL_SHADER_COMPILER */
- 1032, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
- 1025, /* GL_MAX_VARYING_VECTORS */
- 956, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
- 1409, /* GL_QUERY_WAIT_NV */
- 1404, /* GL_QUERY_NO_WAIT_NV */
- 1401, /* GL_QUERY_BY_REGION_WAIT_NV */
- 1400, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
- 1914, /* GL_TRANSFORM_FEEDBACK */
- 1920, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
- 1916, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
- 1915, /* GL_TRANSFORM_FEEDBACK_BINDING */
- 1396, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- 507, /* GL_FIRST_VERTEX_CONVENTION */
- 733, /* GL_LAST_VERTEX_CONVENTION */
- 1373, /* GL_PROVOKING_VERTEX */
- 316, /* GL_COPY_READ_BUFFER */
- 317, /* GL_COPY_WRITE_BUFFER */
- 1516, /* GL_RGBA_SNORM */
- 1512, /* GL_RGBA8_SNORM */
- 1578, /* GL_SIGNED_NORMALIZED */
- 1003, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- 1148, /* GL_OBJECT_TYPE */
- 1690, /* GL_SYNC_CONDITION */
- 1695, /* GL_SYNC_STATUS */
- 1692, /* GL_SYNC_FLAGS */
- 1691, /* GL_SYNC_FENCE */
- 1694, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- 1952, /* GL_UNSIGNALED */
- 1577, /* GL_SIGNALED */
- 46, /* GL_ALREADY_SIGNALED */
- 1909, /* GL_TIMEOUT_EXPIRED */
- 283, /* GL_CONDITION_SATISFIED */
- 2042, /* GL_WAIT_FAILED */
- 492, /* GL_EVAL_BIT */
- 1413, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- 778, /* GL_LIST_BIT */
- 1790, /* GL_TEXTURE_BIT */
- 1548, /* GL_SCISSOR_BIT */
- 29, /* GL_ALL_ATTRIB_BITS */
- 1100, /* GL_MULTISAMPLE_BIT */
- 30, /* GL_ALL_CLIENT_ATTRIB_BITS */
+ 598, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ 1751, /* GL_SHADING_LANGUAGE_VERSION */
+ 371, /* GL_CURRENT_PROGRAM */
+ 1303, /* GL_PALETTE4_RGB8_OES */
+ 1305, /* GL_PALETTE4_RGBA8_OES */
+ 1301, /* GL_PALETTE4_R5_G6_B5_OES */
+ 1304, /* GL_PALETTE4_RGBA4_OES */
+ 1302, /* GL_PALETTE4_RGB5_A1_OES */
+ 1308, /* GL_PALETTE8_RGB8_OES */
+ 1310, /* GL_PALETTE8_RGBA8_OES */
+ 1306, /* GL_PALETTE8_R5_G6_B5_OES */
+ 1309, /* GL_PALETTE8_RGBA4_OES */
+ 1307, /* GL_PALETTE8_RGB5_A1_OES */
+ 726, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ 724, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ 1355, /* GL_POINT_SIZE_ARRAY_OES */
+ 2014, /* GL_TEXTURE_CROP_RECT_OES */
+ 996, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
+ 1354, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
+ 2192, /* GL_UNSIGNED_NORMALIZED */
+ 1951, /* GL_TEXTURE_1D_ARRAY */
+ 1490, /* GL_PROXY_TEXTURE_1D_ARRAY */
+ 1954, /* GL_TEXTURE_2D_ARRAY */
+ 1494, /* GL_PROXY_TEXTURE_2D_ARRAY */
+ 1962, /* GL_TEXTURE_BINDING_1D_ARRAY */
+ 1965, /* GL_TEXTURE_BINDING_2D_ARRAY */
+ 1048, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS */
+ 1981, /* GL_TEXTURE_BUFFER */
+ 1102, /* GL_MAX_TEXTURE_BUFFER_SIZE */
+ 1969, /* GL_TEXTURE_BINDING_BUFFER */
+ 1982, /* GL_TEXTURE_BUFFER_DATA_STORE_BINDING */
+ 1983, /* GL_TEXTURE_BUFFER_FORMAT */
+ 1527, /* GL_R11F_G11F_B10F */
+ 2158, /* GL_UNSIGNED_INT_10F_11F_11F_REV */
+ 1638, /* GL_RGB9_E5 */
+ 2167, /* GL_UNSIGNED_INT_5_9_9_9_REV */
+ 2088, /* GL_TEXTURE_SHARED_SIZE */
+ 1804, /* GL_SRGB */
+ 1805, /* GL_SRGB8 */
+ 1807, /* GL_SRGB_ALPHA */
+ 1806, /* GL_SRGB8_ALPHA8 */
+ 1764, /* GL_SLUMINANCE_ALPHA */
+ 1763, /* GL_SLUMINANCE8_ALPHA8 */
+ 1761, /* GL_SLUMINANCE */
+ 1762, /* GL_SLUMINANCE8 */
+ 309, /* GL_COMPRESSED_SRGB */
+ 310, /* GL_COMPRESSED_SRGB_ALPHA */
+ 307, /* GL_COMPRESSED_SLUMINANCE */
+ 308, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ 2123, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH */
+ 2112, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE */
+ 1120, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS */
+ 2121, /* GL_TRANSFORM_FEEDBACK_VARYINGS */
+ 2117, /* GL_TRANSFORM_FEEDBACK_BUFFER_START */
+ 2115, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE */
+ 1437, /* GL_PRIMITIVES_GENERATED */
+ 2119, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN */
+ 1531, /* GL_RASTERIZER_DISCARD */
+ 1116, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS */
+ 1118, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS */
+ 762, /* GL_INTERLEAVED_ATTRIBS */
+ 1740, /* GL_SEPARATE_ATTRIBS */
+ 2107, /* GL_TRANSFORM_FEEDBACK_BUFFER */
+ 2109, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING */
+ 1373, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ 853, /* GL_LOWER_LEFT */
+ 2206, /* GL_UPPER_LEFT */
+ 1828, /* GL_STENCIL_BACK_REF */
+ 1829, /* GL_STENCIL_BACK_VALUE_MASK */
+ 1830, /* GL_STENCIL_BACK_WRITEMASK */
+ 500, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ 1561, /* GL_RENDERBUFFER_BINDING */
+ 1535, /* GL_READ_FRAMEBUFFER */
+ 499, /* GL_DRAW_FRAMEBUFFER */
+ 1536, /* GL_READ_FRAMEBUFFER_BINDING */
+ 1580, /* GL_RENDERBUFFER_SAMPLES */
+ 612, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ 609, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ 624, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ 619, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ 622, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ 630, /* GL_FRAMEBUFFER_COMPLETE */
+ 635, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ 650, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ 644, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ 639, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ 645, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ 641, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ 655, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ 661, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ 659, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ 1020, /* GL_MAX_COLOR_ATTACHMENTS */
+ 193, /* GL_COLOR_ATTACHMENT0 */
+ 196, /* GL_COLOR_ATTACHMENT1 */
+ 210, /* GL_COLOR_ATTACHMENT2 */
+ 212, /* GL_COLOR_ATTACHMENT3 */
+ 214, /* GL_COLOR_ATTACHMENT4 */
+ 216, /* GL_COLOR_ATTACHMENT5 */
+ 218, /* GL_COLOR_ATTACHMENT6 */
+ 220, /* GL_COLOR_ATTACHMENT7 */
+ 222, /* GL_COLOR_ATTACHMENT8 */
+ 224, /* GL_COLOR_ATTACHMENT9 */
+ 197, /* GL_COLOR_ATTACHMENT10 */
+ 199, /* GL_COLOR_ATTACHMENT11 */
+ 201, /* GL_COLOR_ATTACHMENT12 */
+ 203, /* GL_COLOR_ATTACHMENT13 */
+ 205, /* GL_COLOR_ATTACHMENT14 */
+ 207, /* GL_COLOR_ATTACHMENT15 */
+ 399, /* GL_DEPTH_ATTACHMENT */
+ 1817, /* GL_STENCIL_ATTACHMENT */
+ 600, /* GL_FRAMEBUFFER */
+ 1558, /* GL_RENDERBUFFER */
+ 1584, /* GL_RENDERBUFFER_WIDTH */
+ 1571, /* GL_RENDERBUFFER_HEIGHT */
+ 1574, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ 1849, /* GL_STENCIL_INDEX_EXT */
+ 1838, /* GL_STENCIL_INDEX1 */
+ 1843, /* GL_STENCIL_INDEX4 */
+ 1846, /* GL_STENCIL_INDEX8 */
+ 1839, /* GL_STENCIL_INDEX16 */
+ 1578, /* GL_RENDERBUFFER_RED_SIZE */
+ 1569, /* GL_RENDERBUFFER_GREEN_SIZE */
+ 1564, /* GL_RENDERBUFFER_BLUE_SIZE */
+ 1559, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ 1566, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ 1582, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ 653, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ 1097, /* GL_MAX_SAMPLES */
+ 2050, /* GL_TEXTURE_GEN_STR_OES */
+ 699, /* GL_HALF_FLOAT_OES */
+ 1625, /* GL_RGB565_OES */
+ 1655, /* GL_RGBA32UI */
+ 1618, /* GL_RGB32UI */
+ 40, /* GL_ALPHA32UI_EXT */
+ 754, /* GL_INTENSITY32UI_EXT */
+ 870, /* GL_LUMINANCE32UI_EXT */
+ 887, /* GL_LUMINANCE_ALPHA32UI_EXT */
+ 1646, /* GL_RGBA16UI */
+ 1610, /* GL_RGB16UI */
+ 37, /* GL_ALPHA16UI_EXT */
+ 751, /* GL_INTENSITY16UI_EXT */
+ 865, /* GL_LUMINANCE16UI_EXT */
+ 885, /* GL_LUMINANCE_ALPHA16UI_EXT */
+ 1665, /* GL_RGBA8UI */
+ 1633, /* GL_RGB8UI */
+ 45, /* GL_ALPHA8UI_EXT */
+ 759, /* GL_INTENSITY8UI_EXT */
+ 879, /* GL_LUMINANCE8UI_EXT */
+ 889, /* GL_LUMINANCE_ALPHA8UI_EXT */
+ 1653, /* GL_RGBA32I */
+ 1616, /* GL_RGB32I */
+ 39, /* GL_ALPHA32I_EXT */
+ 753, /* GL_INTENSITY32I_EXT */
+ 869, /* GL_LUMINANCE32I_EXT */
+ 886, /* GL_LUMINANCE_ALPHA32I_EXT */
+ 1644, /* GL_RGBA16I */
+ 1608, /* GL_RGB16I */
+ 36, /* GL_ALPHA16I_EXT */
+ 750, /* GL_INTENSITY16I_EXT */
+ 864, /* GL_LUMINANCE16I_EXT */
+ 884, /* GL_LUMINANCE_ALPHA16I_EXT */
+ 1663, /* GL_RGBA8I */
+ 1631, /* GL_RGB8I */
+ 44, /* GL_ALPHA8I_EXT */
+ 758, /* GL_INTENSITY8I_EXT */
+ 878, /* GL_LUMINANCE8I_EXT */
+ 888, /* GL_LUMINANCE_ALPHA8I_EXT */
+ 1548, /* GL_RED_INTEGER */
+ 695, /* GL_GREEN_INTEGER */
+ 113, /* GL_BLUE_INTEGER */
+ 49, /* GL_ALPHA_INTEGER_EXT */
+ 1677, /* GL_RGB_INTEGER */
+ 1671, /* GL_RGBA_INTEGER */
+ 84, /* GL_BGR_INTEGER */
+ 82, /* GL_BGRA_INTEGER */
+ 891, /* GL_LUMINANCE_INTEGER_EXT */
+ 890, /* GL_LUMINANCE_ALPHA_INTEGER_EXT */
+ 1673, /* GL_RGBA_INTEGER_MODE_EXT */
+ 607, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED */
+ 648, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS */
+ 647, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
+ 1688, /* GL_SAMPLER_1D_ARRAY */
+ 1694, /* GL_SAMPLER_2D_ARRAY */
+ 1703, /* GL_SAMPLER_BUFFER */
+ 1690, /* GL_SAMPLER_1D_ARRAY_SHADOW */
+ 1696, /* GL_SAMPLER_2D_ARRAY_SHADOW */
+ 1706, /* GL_SAMPLER_CUBE_SHADOW */
+ 2186, /* GL_UNSIGNED_INT_VEC2 */
+ 2188, /* GL_UNSIGNED_INT_VEC3 */
+ 2190, /* GL_UNSIGNED_INT_VEC4 */
+ 768, /* GL_INT_SAMPLER_1D */
+ 772, /* GL_INT_SAMPLER_2D */
+ 778, /* GL_INT_SAMPLER_3D */
+ 782, /* GL_INT_SAMPLER_CUBE */
+ 776, /* GL_INT_SAMPLER_2D_RECT */
+ 769, /* GL_INT_SAMPLER_1D_ARRAY */
+ 773, /* GL_INT_SAMPLER_2D_ARRAY */
+ 780, /* GL_INT_SAMPLER_BUFFER */
+ 2170, /* GL_UNSIGNED_INT_SAMPLER_1D */
+ 2174, /* GL_UNSIGNED_INT_SAMPLER_2D */
+ 2180, /* GL_UNSIGNED_INT_SAMPLER_3D */
+ 2184, /* GL_UNSIGNED_INT_SAMPLER_CUBE */
+ 2178, /* GL_UNSIGNED_INT_SAMPLER_2D_RECT */
+ 2171, /* GL_UNSIGNED_INT_SAMPLER_1D_ARRAY */
+ 2175, /* GL_UNSIGNED_INT_SAMPLER_2D_ARRAY */
+ 2182, /* GL_UNSIGNED_INT_SAMPLER_BUFFER */
+ 686, /* GL_GEOMETRY_SHADER */
+ 689, /* GL_GEOMETRY_VERTICES_OUT_ARB */
+ 683, /* GL_GEOMETRY_INPUT_TYPE_ARB */
+ 685, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
+ 1054, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
+ 1136, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
+ 1052, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS */
+ 1046, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES */
+ 1050, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS */
+ 854, /* GL_LOW_FLOAT */
+ 1138, /* GL_MEDIUM_FLOAT */
+ 700, /* GL_HIGH_FLOAT */
+ 855, /* GL_LOW_INT */
+ 1139, /* GL_MEDIUM_INT */
+ 701, /* GL_HIGH_INT */
+ 2160, /* GL_UNSIGNED_INT_10_10_10_2_OES */
+ 767, /* GL_INT_10_10_10_2_OES */
+ 1745, /* GL_SHADER_BINARY_FORMATS */
+ 1239, /* GL_NUM_SHADER_BINARY_FORMATS */
+ 1746, /* GL_SHADER_COMPILER */
+ 1133, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
+ 1125, /* GL_MAX_VARYING_VECTORS */
+ 1043, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+ 1524, /* GL_QUERY_WAIT */
+ 1518, /* GL_QUERY_NO_WAIT */
+ 1514, /* GL_QUERY_BY_REGION_WAIT */
+ 1512, /* GL_QUERY_BY_REGION_NO_WAIT */
+ 2105, /* GL_TRANSFORM_FEEDBACK */
+ 2114, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+ 2108, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+ 2106, /* GL_TRANSFORM_FEEDBACK_BINDING */
+ 1508, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ 542, /* GL_FIRST_VERTEX_CONVENTION */
+ 800, /* GL_LAST_VERTEX_CONVENTION */
+ 1482, /* GL_PROVOKING_VERTEX */
+ 350, /* GL_COPY_READ_BUFFER */
+ 351, /* GL_COPY_WRITE_BUFFER */
+ 1551, /* GL_RED_SNORM */
+ 1684, /* GL_RG_SNORM */
+ 1683, /* GL_RGB_SNORM */
+ 1676, /* GL_RGBA_SNORM */
+ 1530, /* GL_R8_SNORM */
+ 1598, /* GL_RG8_SNORM */
+ 1637, /* GL_RGB8_SNORM */
+ 1669, /* GL_RGBA8_SNORM */
+ 1528, /* GL_R16_SNORM */
+ 1597, /* GL_RG16_SNORM */
+ 1613, /* GL_RGB16_SNORM */
+ 1649, /* GL_RGBA16_SNORM */
+ 1757, /* GL_SIGNED_NORMALIZED */
+ 1439, /* GL_PRIMITIVE_RESTART */
+ 1440, /* GL_PRIMITIVE_RESTART_INDEX */
+ 1099, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ 1253, /* GL_OBJECT_TYPE */
+ 1870, /* GL_SYNC_CONDITION */
+ 1875, /* GL_SYNC_STATUS */
+ 1872, /* GL_SYNC_FLAGS */
+ 1871, /* GL_SYNC_FENCE */
+ 1874, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ 2153, /* GL_UNSIGNALED */
+ 1756, /* GL_SIGNALED */
+ 54, /* GL_ALREADY_SIGNALED */
+ 2100, /* GL_TIMEOUT_EXPIRED */
+ 312, /* GL_CONDITION_SATISFIED */
+ 2269, /* GL_WAIT_FAILED */
+ 126, /* GL_BUFFER_ACCESS_FLAGS */
+ 132, /* GL_BUFFER_MAP_LENGTH */
+ 133, /* GL_BUFFER_MAP_OFFSET */
+ 1128, /* GL_MAX_VERTEX_OUTPUT_COMPONENTS */
+ 1044, /* GL_MAX_GEOMETRY_INPUT_COMPONENTS */
+ 1045, /* GL_MAX_GEOMETRY_OUTPUT_COMPONENTS */
+ 1040, /* GL_MAX_FRAGMENT_INPUT_COMPONENTS */
+ 326, /* GL_CONTEXT_PROFILE_MASK */
+ 527, /* GL_EVAL_BIT */
+ 1533, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ 847, /* GL_LIST_BIT */
+ 1976, /* GL_TEXTURE_BIT */
+ 1726, /* GL_SCISSOR_BIT */
+ 30, /* GL_ALL_ATTRIB_BITS */
+ 1204, /* GL_MULTISAMPLE_BIT */
+ 31, /* GL_ALL_CLIENT_ATTRIB_BITS */
};
typedef int (*cfunc)(const void *, const void *);
diff --git a/src/mesa/main/enums.h b/src/mesa/main/enums.h
index b5f69001b8..c03cd34da9 100644
--- a/src/mesa/main/enums.h
+++ b/src/mesa/main/enums.h
@@ -36,6 +36,7 @@
#ifndef _ENUMS_H_
#define _ENUMS_H_
+#include "mfeatures.h"
#if defined(_HAVE_FULL_GL) && _HAVE_FULL_GL
diff --git a/src/mesa/main/es_generator.py b/src/mesa/main/es_generator.py
index ecb34bb5cd..aa8dab7a74 100644
--- a/src/mesa/main/es_generator.py
+++ b/src/mesa/main/es_generator.py
@@ -191,6 +191,8 @@ print """
#include "%s"
#include "%s"
#include "main/mfeatures.h"
+#include "main/compiler.h"
+#include "main/api_exec.h"
#if FEATURE_%s
""" % (versionHeader, versionExtHeader, shortname.upper())
@@ -206,50 +208,7 @@ typedef double GLclampd;
/* Mesa error handling requires these */
extern void *_mesa_get_current_context(void);
extern void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... );
-
-#include "main/compiler.h"
-#include "main/api_exec.h"
-#include "main/remap.h"
-
-/* cannot include main/dispatch.h here */
-#ifdef IN_DRI_DRIVER
-#define _GLAPI_USE_REMAP_TABLE
-#endif
-/* glapi uses GLAPIENTRY while GLES headers define GL_APIENTRY */
-#ifndef GLAPIENTRY
-#define GLAPIENTRY GL_APIENTRY
-#endif
-#include "%sapi/glapi/glapitable.h"
-#include "%sapi/glapi/glapioffsets.h"
-#include "%sapi/glapi/glapidispatch.h"
-
-#if FEATURE_remap_table
-
-#if !FEATURE_GL
-int driDispatchRemapTable[driDispatchRemapTable_size];
-#endif
-
-#define need_MESA_remap_table
-
-#include "%sapi/main/remap_helper.h"
-
-void
-_mesa_init_remap_table_%s(void)
-{
- _mesa_do_init_remap_table(_mesa_function_pool,
- driDispatchRemapTable_size,
- MESA_remap_table_functions);
-}
-
-void
-_mesa_map_static_functions_%s(void)
-{
-}
-
-#endif
-
-typedef void (*_glapi_proc)(void); /* generic function pointer */
-""" % (shortname, shortname, shortname, shortname, shortname, shortname);
+"""
# Finally we get to the all-important functions
print """/*************************************************************
@@ -713,15 +672,73 @@ for funcName in keys:
# end for each function
print """
+#include "glapi/glapi.h"
+
+#if FEATURE_remap_table
+
+/* cannot include main/dispatch.h here */
+#define _GLAPI_USE_REMAP_TABLE
+#include "%sapi/main/glapidispatch.h"
+
+#define need_MESA_remap_table
+#include "%sapi/main/remap_helper.h"
+
+/* force SET_* macros to use the local remap table */
+#define driDispatchRemapTable remap_table
+static int remap_table[driDispatchRemapTable_size];
+
+static void
+init_remap_table(void)
+{
+ _glthread_DECLARE_STATIC_MUTEX(mutex);
+ static GLboolean initialized = GL_FALSE;
+ const struct gl_function_pool_remap *remap = MESA_remap_table_functions;
+ int i;
+
+ _glthread_LOCK_MUTEX(mutex);
+ if (initialized) {
+ _glthread_UNLOCK_MUTEX(mutex);
+ return;
+ }
+
+ for (i = 0; i < driDispatchRemapTable_size; i++) {
+ GLint offset;
+ const char *spec;
+
+ /* sanity check */
+ ASSERT(i == remap[i].remap_index);
+ spec = _mesa_function_pool + remap[i].pool_index;
+
+ offset = _mesa_map_function_spec(spec);
+ remap_table[i] = offset;
+ }
+ initialized = GL_TRUE;
+ _glthread_UNLOCK_MUTEX(mutex);
+}
+
+#else /* FEATURE_remap_table */
+
+/* cannot include main/dispatch.h here */
+#include "%sapi/main/glapidispatch.h"
+
+static INLINE void
+init_remap_table(void)
+{
+}
+
+#endif /* FEATURE_remap_table */
+
struct _glapi_table *
_mesa_create_exec_table_%s(void)
{
struct _glapi_table *exec;
- exec = _mesa_alloc_dispatch_table(sizeof *exec);
+
+ exec = _mesa_alloc_dispatch_table(_gloffset_COUNT);
if (exec == NULL)
return NULL;
-""" % shortname
+ init_remap_table();
+""" % (shortname, shortname, shortname, shortname)
for func in keys:
prefix = "_es_" if func not in allSpecials else "_check_"
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index bc8cbef132..3d5830c01c 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -128,6 +128,7 @@ static const struct {
{ OFF, "GL_EXT_framebuffer_sRGB", F(EXT_framebuffer_sRGB) },
{ OFF, "GL_EXT_fog_coord", F(EXT_fog_coord) },
{ OFF, "GL_EXT_gpu_program_parameters", F(EXT_gpu_program_parameters) },
+ { OFF, "GL_EXT_gpu_shader4", F(EXT_gpu_shader4) },
{ ON, "GL_EXT_multi_draw_arrays", F(EXT_multi_draw_arrays) },
{ OFF, "GL_EXT_packed_depth_stencil", F(EXT_packed_depth_stencil) },
{ OFF, "GL_EXT_packed_float", F(EXT_packed_float) },
@@ -139,6 +140,7 @@ static const struct {
{ OFF, "GL_EXT_provoking_vertex", F(EXT_provoking_vertex) },
{ ON, "GL_EXT_rescale_normal", F(EXT_rescale_normal) },
{ OFF, "GL_EXT_secondary_color", F(EXT_secondary_color) },
+ { OFF, "GL_EXT_separate_shader_objects", F(EXT_separate_shader_objects) },
{ ON, "GL_EXT_separate_specular_color", F(EXT_separate_specular_color) },
{ OFF, "GL_EXT_shadow_funcs", F(EXT_shadow_funcs) },
{ OFF, "GL_EXT_shared_texture_palette", F(EXT_shared_texture_palette) },
@@ -260,6 +262,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.ARB_point_sprite = GL_TRUE;
#if FEATURE_ARB_shader_objects
ctx->Extensions.ARB_shader_objects = GL_TRUE;
+ ctx->Extensions.EXT_separate_shader_objects = GL_TRUE;
#endif
#if FEATURE_ARB_shading_language_100
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
diff --git a/src/mesa/main/extensions.h b/src/mesa/main/extensions.h
index 6eb8539396..a9ed41f86b 100644
--- a/src/mesa/main/extensions.h
+++ b/src/mesa/main/extensions.h
@@ -36,7 +36,10 @@
#ifndef _EXTENSIONS_H_
#define _EXTENSIONS_H_
-#include "mtypes.h"
+#include "glheader.h"
+#include "mfeatures.h"
+
+struct gl_context;
#if _HAVE_FULL_GL
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 3dc78f2bf5..7c3357043f 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -255,7 +255,8 @@ _mesa_get_fb0_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
* point. Update reference counts, etc.
*/
void
-_mesa_remove_attachment(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
+_mesa_remove_attachment(struct gl_context *ctx,
+ struct gl_renderbuffer_attachment *att)
{
if (att->Type == GL_TEXTURE) {
ASSERT(att->Texture);
@@ -340,7 +341,8 @@ _mesa_set_renderbuffer_attachment(struct gl_context *ctx,
* Attach a renderbuffer object to a framebuffer object.
*/
void
-_mesa_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
+_mesa_framebuffer_renderbuffer(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
GLenum attachment, struct gl_renderbuffer *rb)
{
struct gl_renderbuffer_attachment *att;
@@ -397,6 +399,44 @@ fbo_incomplete(const char *msg, int index)
}
+/**
+ * Is the given base format a legal format for a color renderbuffer?
+ */
+static GLboolean
+is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat)
+{
+ switch (baseFormat) {
+ case GL_RGB:
+ case GL_RGBA:
+ return GL_TRUE;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE_ALPHA:
+ case GL_INTENSITY:
+ case GL_ALPHA:
+ return ctx->Extensions.ARB_framebuffer_object;
+ case GL_RED:
+ case GL_RG:
+ return ctx->Extensions.ARB_texture_rg;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Is the given base format a legal format for a depth/stencil renderbuffer?
+ */
+static GLboolean
+is_legal_depth_format(const struct gl_context *ctx, GLenum baseFormat)
+{
+ switch (baseFormat) {
+ case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_STENCIL_EXT:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
/**
@@ -448,14 +488,7 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
if (format == GL_COLOR) {
- if (baseFormat != GL_RGB &&
- baseFormat != GL_RGBA &&
- (!ctx->Extensions.ARB_framebuffer_object ||
- baseFormat != GL_ALPHA) &&
- (!ctx->Extensions.ARB_texture_rg ||
- baseFormat != GL_RED) &&
- (!ctx->Extensions.ARB_texture_rg ||
- baseFormat != GL_RG)) {
+ if (!is_legal_color_format(ctx, baseFormat)) {
att_incomplete("bad format");
att->Complete = GL_FALSE;
return;
@@ -563,7 +596,8 @@ test_attachment_completeness(const struct gl_context *ctx, GLenum format,
* framebuffer is complete.
*/
void
-_mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffer *fb)
+_mesa_test_framebuffer_completeness(struct gl_context *ctx,
+ struct gl_framebuffer *fb)
{
GLuint numImages;
GLenum intFormat = GL_NONE; /* color buffers' internal format */
@@ -586,6 +620,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffe
for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
struct gl_renderbuffer_attachment *att;
GLenum f;
+ gl_format mesaFormat;
/*
* XXX for ARB_fbo, only check color buffers that are named by
@@ -632,12 +667,10 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffe
minHeight = MIN2(minHeight, texImg->Height);
maxHeight = MAX2(maxHeight, texImg->Height);
f = texImg->_BaseFormat;
+ mesaFormat = texImg->TexFormat;
numImages++;
- if (f != GL_RGB && f != GL_RGBA && f != GL_DEPTH_COMPONENT
- && f != GL_DEPTH_STENCIL_EXT
- && (!ctx->Extensions.ARB_framebuffer_object || f != GL_ALPHA)
- && (!ctx->Extensions.ARB_texture_rg || f != GL_RED)
- && (!ctx->Extensions.ARB_texture_rg || f != GL_RG)) {
+ if (!is_legal_color_format(ctx, f) &&
+ !is_legal_depth_format(ctx, f)) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
fbo_incomplete("texture attachment incomplete", -1);
return;
@@ -649,6 +682,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffe
minHeight = MIN2(minHeight, att->Renderbuffer->Height);
maxHeight = MAX2(minHeight, att->Renderbuffer->Height);
f = att->Renderbuffer->InternalFormat;
+ mesaFormat = att->Renderbuffer->Format;
numImages++;
}
else {
@@ -661,6 +695,9 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffe
numSamples = att->Renderbuffer->NumSamples;
}
+ /* check if integer color */
+ fb->_IntegerColor = _mesa_is_format_integer_color(mesaFormat);
+
/* Error-check width, height, format, samples
*/
if (numImages == 1) {
diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h
index 9e18e538a6..2aace2ebd4 100644
--- a/src/mesa/main/fbobject.h
+++ b/src/mesa/main/fbobject.h
@@ -26,7 +26,10 @@
#ifndef FBOBJECT_H
#define FBOBJECT_H
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_context;
+struct gl_texture_object;
extern void
_mesa_init_fbobjects(struct gl_context *ctx);
diff --git a/src/mesa/main/ffvertex_prog.h b/src/mesa/main/ffvertex_prog.h
index 72cd6ea115..837a15efca 100644
--- a/src/mesa/main/ffvertex_prog.h
+++ b/src/mesa/main/ffvertex_prog.h
@@ -30,7 +30,7 @@
#define FFVERTEX_PROG_H
-#include "main/mtypes.h"
+struct gl_context;
struct gl_vertex_program *
_mesa_get_fixed_func_vertex_program(struct gl_context *ctx);
diff --git a/src/mesa/main/fog.h b/src/mesa/main/fog.h
index 7df4f0b673..9191a4a54c 100644
--- a/src/mesa/main/fog.h
+++ b/src/mesa/main/fog.h
@@ -37,7 +37,10 @@
#define FOG_H
-#include "mtypes.h"
+#include "glheader.h"
+#include "mfeatures.h"
+
+struct gl_context;
#if _HAVE_FULL_GL
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 654ea038a5..88a04e888e 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -945,6 +945,7 @@ _mesa_get_format_bits(gl_format format, GLenum pname)
* GL_UNSIGNED_NORMALIZED = unsigned int representing [0,1]
* GL_SIGNED_NORMALIZED = signed int representing [-1, 1]
* GL_UNSIGNED_INT = an ordinary unsigned integer
+ * GL_INT = an ordinary signed integer
* GL_FLOAT = an ordinary float
*/
GLenum
@@ -1007,6 +1008,20 @@ _mesa_is_format_packed_depth_stencil(gl_format format)
/**
+ * Is the given format a signed/unsigned integer color format?
+ */
+GLboolean
+_mesa_is_format_integer_color(gl_format format)
+{
+ const struct gl_format_info *info = _mesa_get_format_info(format);
+ return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT) &&
+ info->BaseFormat != GL_DEPTH_COMPONENT &&
+ info->BaseFormat != GL_DEPTH_STENCIL &&
+ info->BaseFormat != GL_STENCIL_INDEX;
+}
+
+
+/**
* Return color encoding for given format.
* \return GL_LINEAR or GL_SRGB
*/
@@ -1179,6 +1194,7 @@ _mesa_format_to_type_and_comps(gl_format format,
case MESA_FORMAT_ARGB8888:
case MESA_FORMAT_ARGB8888_REV:
case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_XRGB8888_REV:
*datatype = GL_UNSIGNED_BYTE;
*comps = 4;
return;
@@ -1205,6 +1221,11 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 4;
return;
+ case MESA_FORMAT_RGBA5551:
+ *datatype = GL_UNSIGNED_SHORT_5_5_5_1;
+ *comps = 4;
+ return;
+
case MESA_FORMAT_AL88:
case MESA_FORMAT_AL88_REV:
case MESA_FORMAT_RG88:
@@ -1236,6 +1257,7 @@ _mesa_format_to_type_and_comps(gl_format format,
case MESA_FORMAT_I8:
case MESA_FORMAT_CI8:
case MESA_FORMAT_R8:
+ case MESA_FORMAT_S8:
*datatype = GL_UNSIGNED_BYTE;
*comps = 1;
return;
@@ -1281,12 +1303,26 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 2;
return;
+ case MESA_FORMAT_SIGNED_R8:
+ *datatype = GL_BYTE;
+ *comps = 1;
+ return;
+ case MESA_FORMAT_SIGNED_RG88:
+ *datatype = GL_BYTE;
+ *comps = 2;
+ return;
case MESA_FORMAT_SIGNED_RGBA8888:
case MESA_FORMAT_SIGNED_RGBA8888_REV:
+ case MESA_FORMAT_SIGNED_RGBX8888:
*datatype = GL_BYTE;
*comps = 4;
return;
+ case MESA_FORMAT_RGBA_16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 4;
+ return;
+
case MESA_FORMAT_SIGNED_R_16:
*datatype = GL_SHORT;
*comps = 1;
@@ -1411,9 +1447,14 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 4;
return;
-
+ case MESA_FORMAT_NONE:
+ case MESA_FORMAT_COUNT:
+ /* For debug builds, warn if any formats are not handled */
+#ifndef DEBUG
default:
- _mesa_problem(NULL, "bad format in _mesa_format_to_type_and_comps");
+#endif
+ _mesa_problem(NULL, "bad format %s in _mesa_format_to_type_and_comps",
+ _mesa_get_format_name(format));
*datatype = 0;
*comps = 1;
}
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 7674d8eaa4..eeb460dabe 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -199,6 +199,9 @@ _mesa_is_format_compressed(gl_format format);
extern GLboolean
_mesa_is_format_packed_depth_stencil(gl_format format);
+extern GLboolean
+_mesa_is_format_integer_color(gl_format format);
+
extern GLenum
_mesa_get_format_color_encoding(gl_format format);
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
index 7d55a84dfc..5530c51c89 100644
--- a/src/mesa/main/framebuffer.c
+++ b/src/mesa/main/framebuffer.c
@@ -875,6 +875,16 @@ _mesa_source_buffer_exists(struct gl_context *ctx, GLenum format)
case GL_BGRA:
case GL_ABGR_EXT:
case GL_COLOR_INDEX:
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
if (ctx->ReadBuffer->_ColorReadBuffer == NULL) {
return GL_FALSE;
}
@@ -951,6 +961,16 @@ _mesa_dest_buffer_exists(struct gl_context *ctx, GLenum format)
case GL_BGRA:
case GL_ABGR_EXT:
case GL_COLOR_INDEX:
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
/* Nothing special since GL_DRAW_BUFFER could be GL_NONE. */
/* Could assert that colorbuffer has RedBits > 0 */
break;
diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h
index 13722ea457..20e3ff56b5 100644
--- a/src/mesa/main/framebuffer.h
+++ b/src/mesa/main/framebuffer.h
@@ -26,7 +26,10 @@
#ifndef FRAMEBUFFER_H
#define FRAMEBUFFER_H
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_config;
+struct gl_context;
extern struct gl_framebuffer *
_mesa_create_framebuffer(const struct gl_config *visual);
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 29a21deebc..b54af6ee86 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -173,6 +173,7 @@ union value {
#define BUFFER_INT(field) BUFFER_FIELD(field, TYPE_INT)
#define BUFFER_ENUM(field) BUFFER_FIELD(field, TYPE_ENUM)
+#define BUFFER_BOOL(field) BUFFER_FIELD(field, TYPE_BOOLEAN)
#define CONTEXT_INT(field) CONTEXT_FIELD(field, TYPE_INT)
#define CONTEXT_INT2(field) CONTEXT_FIELD(field, TYPE_INT_2)
@@ -260,6 +261,17 @@ static const int extra_EXT_fog_coord_flush_current[] = {
EXTRA_END
};
+static const int extra_EXT_texture_integer[] = {
+ EXT(EXT_texture_integer),
+ EXTRA_END
+};
+
+static const int extra_EXT_gpu_shader4[] = {
+ EXT(EXT_gpu_shader4),
+ EXTRA_END
+};
+
+
EXTRA_EXT(ARB_multitexture);
EXTRA_EXT(ARB_texture_cube_map);
EXTRA_EXT(MESA_texture_array);
@@ -285,7 +297,7 @@ EXTRA_EXT(ARB_shader_objects);
EXTRA_EXT(EXT_provoking_vertex);
EXTRA_EXT(ARB_fragment_shader);
EXTRA_EXT(ARB_fragment_program);
-EXTRA_EXT(ARB_framebuffer_object);
+EXTRA_EXT2(ARB_framebuffer_object, EXT_framebuffer_multisample);
EXTRA_EXT(EXT_framebuffer_object);
EXTRA_EXT(APPLE_vertex_array_object);
EXTRA_EXT(ARB_seamless_cube_map);
@@ -1130,7 +1142,7 @@ static const struct value_desc values[] = {
/* GL_ARB_framebuffer_object */
{ GL_MAX_SAMPLES, CONTEXT_INT(Const.MaxSamples),
- extra_ARB_framebuffer_object },
+ extra_ARB_framebuffer_object_EXT_framebuffer_multisample },
/* GL_APPLE_vertex_array_object */
{ GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name),
@@ -1144,6 +1156,10 @@ static const struct value_desc values[] = {
{ GL_MAX_SERVER_WAIT_TIMEOUT,
CONTEXT_INT64(Const.MaxServerWaitTimeout), extra_ARB_sync },
+ /* GL_EXT_texture_integer */
+ { GL_RGBA_INTEGER_MODE_EXT, BUFFER_BOOL(_IntegerColor),
+ extra_EXT_texture_integer },
+
/* GL_EXT_transform_feedback */
{ GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, LOC_CUSTOM, TYPE_INT, 0,
extra_EXT_transform_feedback },
@@ -1187,6 +1203,14 @@ static const struct value_desc values[] = {
CONTEXT_INT(Const.GeometryProgram.MaxVertexVaryingComponents),
extra_ARB_geometry_shader4 },
+ /* GL_EXT_gpu_shader4 / GL 3.0 */
+ { GL_MIN_PROGRAM_TEXEL_OFFSET,
+ CONTEXT_INT(Const.MinProgramTexelOffset),
+ extra_EXT_gpu_shader4 },
+ { GL_MAX_PROGRAM_TEXEL_OFFSET,
+ CONTEXT_INT(Const.MaxProgramTexelOffset),
+ extra_EXT_gpu_shader4 },
+
/* GL 3.0 */
{ GL_NUM_EXTENSIONS, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 },
{ GL_MAJOR_VERSION, CONTEXT_INT(VersionMajor), extra_version_30 },
@@ -1568,7 +1592,7 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
break;
case GL_CURRENT_PROGRAM:
v->value_int =
- ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0;
+ ctx->Shader.ActiveProgram ? ctx->Shader.ActiveProgram->Name : 0;
break;
case GL_READ_FRAMEBUFFER_BINDING_EXT:
v->value_int = ctx->ReadBuffer->Name;
diff --git a/src/mesa/main/glapidispatch.h b/src/mesa/main/glapidispatch.h
new file mode 100644
index 0000000000..87784269c5
--- /dev/null
+++ b/src/mesa/main/glapidispatch.h
@@ -0,0 +1,4548 @@
+/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */
+
+/*
+ * (C) Copyright IBM Corporation 2005
+ * 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
+ * IBM,
+ * 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.
+ */
+
+#if !defined( _GLAPI_DISPATCH_H_ )
+# define _GLAPI_DISPATCH_H_
+
+
+/* this file should not be included directly in mesa */
+
+/**
+ * \file glapidispatch.h
+ * Macros for handling GL dispatch tables.
+ *
+ * For each known GL function, there are 3 macros in this file. The first
+ * macro is named CALL_FuncName and is used to call that GL function using
+ * the specified dispatch table. The other 2 macros, called GET_FuncName
+ * can SET_FuncName, are used to get and set the dispatch pointer for the
+ * named function in the specified dispatch table.
+ */
+
+#define CALL_by_offset(disp, cast, offset, parameters) \
+ (*(cast (GET_by_offset(disp, offset)))) parameters
+#define GET_by_offset(disp, offset) \
+ (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL
+#define SET_by_offset(disp, offset, fn) \
+ do { \
+ if ( (offset) < 0 ) { \
+ /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\n", */ \
+ /* __func__, __LINE__, disp, offset, # fn); */ \
+ /* abort(); */ \
+ } \
+ else { \
+ ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \
+ } \
+ } while(0)
+
+/* total number of offsets below */
+#define _gloffset_COUNT 881
+
+#define _gloffset_NewList 0
+#define _gloffset_EndList 1
+#define _gloffset_CallList 2
+#define _gloffset_CallLists 3
+#define _gloffset_DeleteLists 4
+#define _gloffset_GenLists 5
+#define _gloffset_ListBase 6
+#define _gloffset_Begin 7
+#define _gloffset_Bitmap 8
+#define _gloffset_Color3b 9
+#define _gloffset_Color3bv 10
+#define _gloffset_Color3d 11
+#define _gloffset_Color3dv 12
+#define _gloffset_Color3f 13
+#define _gloffset_Color3fv 14
+#define _gloffset_Color3i 15
+#define _gloffset_Color3iv 16
+#define _gloffset_Color3s 17
+#define _gloffset_Color3sv 18
+#define _gloffset_Color3ub 19
+#define _gloffset_Color3ubv 20
+#define _gloffset_Color3ui 21
+#define _gloffset_Color3uiv 22
+#define _gloffset_Color3us 23
+#define _gloffset_Color3usv 24
+#define _gloffset_Color4b 25
+#define _gloffset_Color4bv 26
+#define _gloffset_Color4d 27
+#define _gloffset_Color4dv 28
+#define _gloffset_Color4f 29
+#define _gloffset_Color4fv 30
+#define _gloffset_Color4i 31
+#define _gloffset_Color4iv 32
+#define _gloffset_Color4s 33
+#define _gloffset_Color4sv 34
+#define _gloffset_Color4ub 35
+#define _gloffset_Color4ubv 36
+#define _gloffset_Color4ui 37
+#define _gloffset_Color4uiv 38
+#define _gloffset_Color4us 39
+#define _gloffset_Color4usv 40
+#define _gloffset_EdgeFlag 41
+#define _gloffset_EdgeFlagv 42
+#define _gloffset_End 43
+#define _gloffset_Indexd 44
+#define _gloffset_Indexdv 45
+#define _gloffset_Indexf 46
+#define _gloffset_Indexfv 47
+#define _gloffset_Indexi 48
+#define _gloffset_Indexiv 49
+#define _gloffset_Indexs 50
+#define _gloffset_Indexsv 51
+#define _gloffset_Normal3b 52
+#define _gloffset_Normal3bv 53
+#define _gloffset_Normal3d 54
+#define _gloffset_Normal3dv 55
+#define _gloffset_Normal3f 56
+#define _gloffset_Normal3fv 57
+#define _gloffset_Normal3i 58
+#define _gloffset_Normal3iv 59
+#define _gloffset_Normal3s 60
+#define _gloffset_Normal3sv 61
+#define _gloffset_RasterPos2d 62
+#define _gloffset_RasterPos2dv 63
+#define _gloffset_RasterPos2f 64
+#define _gloffset_RasterPos2fv 65
+#define _gloffset_RasterPos2i 66
+#define _gloffset_RasterPos2iv 67
+#define _gloffset_RasterPos2s 68
+#define _gloffset_RasterPos2sv 69
+#define _gloffset_RasterPos3d 70
+#define _gloffset_RasterPos3dv 71
+#define _gloffset_RasterPos3f 72
+#define _gloffset_RasterPos3fv 73
+#define _gloffset_RasterPos3i 74
+#define _gloffset_RasterPos3iv 75
+#define _gloffset_RasterPos3s 76
+#define _gloffset_RasterPos3sv 77
+#define _gloffset_RasterPos4d 78
+#define _gloffset_RasterPos4dv 79
+#define _gloffset_RasterPos4f 80
+#define _gloffset_RasterPos4fv 81
+#define _gloffset_RasterPos4i 82
+#define _gloffset_RasterPos4iv 83
+#define _gloffset_RasterPos4s 84
+#define _gloffset_RasterPos4sv 85
+#define _gloffset_Rectd 86
+#define _gloffset_Rectdv 87
+#define _gloffset_Rectf 88
+#define _gloffset_Rectfv 89
+#define _gloffset_Recti 90
+#define _gloffset_Rectiv 91
+#define _gloffset_Rects 92
+#define _gloffset_Rectsv 93
+#define _gloffset_TexCoord1d 94
+#define _gloffset_TexCoord1dv 95
+#define _gloffset_TexCoord1f 96
+#define _gloffset_TexCoord1fv 97
+#define _gloffset_TexCoord1i 98
+#define _gloffset_TexCoord1iv 99
+#define _gloffset_TexCoord1s 100
+#define _gloffset_TexCoord1sv 101
+#define _gloffset_TexCoord2d 102
+#define _gloffset_TexCoord2dv 103
+#define _gloffset_TexCoord2f 104
+#define _gloffset_TexCoord2fv 105
+#define _gloffset_TexCoord2i 106
+#define _gloffset_TexCoord2iv 107
+#define _gloffset_TexCoord2s 108
+#define _gloffset_TexCoord2sv 109
+#define _gloffset_TexCoord3d 110
+#define _gloffset_TexCoord3dv 111
+#define _gloffset_TexCoord3f 112
+#define _gloffset_TexCoord3fv 113
+#define _gloffset_TexCoord3i 114
+#define _gloffset_TexCoord3iv 115
+#define _gloffset_TexCoord3s 116
+#define _gloffset_TexCoord3sv 117
+#define _gloffset_TexCoord4d 118
+#define _gloffset_TexCoord4dv 119
+#define _gloffset_TexCoord4f 120
+#define _gloffset_TexCoord4fv 121
+#define _gloffset_TexCoord4i 122
+#define _gloffset_TexCoord4iv 123
+#define _gloffset_TexCoord4s 124
+#define _gloffset_TexCoord4sv 125
+#define _gloffset_Vertex2d 126
+#define _gloffset_Vertex2dv 127
+#define _gloffset_Vertex2f 128
+#define _gloffset_Vertex2fv 129
+#define _gloffset_Vertex2i 130
+#define _gloffset_Vertex2iv 131
+#define _gloffset_Vertex2s 132
+#define _gloffset_Vertex2sv 133
+#define _gloffset_Vertex3d 134
+#define _gloffset_Vertex3dv 135
+#define _gloffset_Vertex3f 136
+#define _gloffset_Vertex3fv 137
+#define _gloffset_Vertex3i 138
+#define _gloffset_Vertex3iv 139
+#define _gloffset_Vertex3s 140
+#define _gloffset_Vertex3sv 141
+#define _gloffset_Vertex4d 142
+#define _gloffset_Vertex4dv 143
+#define _gloffset_Vertex4f 144
+#define _gloffset_Vertex4fv 145
+#define _gloffset_Vertex4i 146
+#define _gloffset_Vertex4iv 147
+#define _gloffset_Vertex4s 148
+#define _gloffset_Vertex4sv 149
+#define _gloffset_ClipPlane 150
+#define _gloffset_ColorMaterial 151
+#define _gloffset_CullFace 152
+#define _gloffset_Fogf 153
+#define _gloffset_Fogfv 154
+#define _gloffset_Fogi 155
+#define _gloffset_Fogiv 156
+#define _gloffset_FrontFace 157
+#define _gloffset_Hint 158
+#define _gloffset_Lightf 159
+#define _gloffset_Lightfv 160
+#define _gloffset_Lighti 161
+#define _gloffset_Lightiv 162
+#define _gloffset_LightModelf 163
+#define _gloffset_LightModelfv 164
+#define _gloffset_LightModeli 165
+#define _gloffset_LightModeliv 166
+#define _gloffset_LineStipple 167
+#define _gloffset_LineWidth 168
+#define _gloffset_Materialf 169
+#define _gloffset_Materialfv 170
+#define _gloffset_Materiali 171
+#define _gloffset_Materialiv 172
+#define _gloffset_PointSize 173
+#define _gloffset_PolygonMode 174
+#define _gloffset_PolygonStipple 175
+#define _gloffset_Scissor 176
+#define _gloffset_ShadeModel 177
+#define _gloffset_TexParameterf 178
+#define _gloffset_TexParameterfv 179
+#define _gloffset_TexParameteri 180
+#define _gloffset_TexParameteriv 181
+#define _gloffset_TexImage1D 182
+#define _gloffset_TexImage2D 183
+#define _gloffset_TexEnvf 184
+#define _gloffset_TexEnvfv 185
+#define _gloffset_TexEnvi 186
+#define _gloffset_TexEnviv 187
+#define _gloffset_TexGend 188
+#define _gloffset_TexGendv 189
+#define _gloffset_TexGenf 190
+#define _gloffset_TexGenfv 191
+#define _gloffset_TexGeni 192
+#define _gloffset_TexGeniv 193
+#define _gloffset_FeedbackBuffer 194
+#define _gloffset_SelectBuffer 195
+#define _gloffset_RenderMode 196
+#define _gloffset_InitNames 197
+#define _gloffset_LoadName 198
+#define _gloffset_PassThrough 199
+#define _gloffset_PopName 200
+#define _gloffset_PushName 201
+#define _gloffset_DrawBuffer 202
+#define _gloffset_Clear 203
+#define _gloffset_ClearAccum 204
+#define _gloffset_ClearIndex 205
+#define _gloffset_ClearColor 206
+#define _gloffset_ClearStencil 207
+#define _gloffset_ClearDepth 208
+#define _gloffset_StencilMask 209
+#define _gloffset_ColorMask 210
+#define _gloffset_DepthMask 211
+#define _gloffset_IndexMask 212
+#define _gloffset_Accum 213
+#define _gloffset_Disable 214
+#define _gloffset_Enable 215
+#define _gloffset_Finish 216
+#define _gloffset_Flush 217
+#define _gloffset_PopAttrib 218
+#define _gloffset_PushAttrib 219
+#define _gloffset_Map1d 220
+#define _gloffset_Map1f 221
+#define _gloffset_Map2d 222
+#define _gloffset_Map2f 223
+#define _gloffset_MapGrid1d 224
+#define _gloffset_MapGrid1f 225
+#define _gloffset_MapGrid2d 226
+#define _gloffset_MapGrid2f 227
+#define _gloffset_EvalCoord1d 228
+#define _gloffset_EvalCoord1dv 229
+#define _gloffset_EvalCoord1f 230
+#define _gloffset_EvalCoord1fv 231
+#define _gloffset_EvalCoord2d 232
+#define _gloffset_EvalCoord2dv 233
+#define _gloffset_EvalCoord2f 234
+#define _gloffset_EvalCoord2fv 235
+#define _gloffset_EvalMesh1 236
+#define _gloffset_EvalPoint1 237
+#define _gloffset_EvalMesh2 238
+#define _gloffset_EvalPoint2 239
+#define _gloffset_AlphaFunc 240
+#define _gloffset_BlendFunc 241
+#define _gloffset_LogicOp 242
+#define _gloffset_StencilFunc 243
+#define _gloffset_StencilOp 244
+#define _gloffset_DepthFunc 245
+#define _gloffset_PixelZoom 246
+#define _gloffset_PixelTransferf 247
+#define _gloffset_PixelTransferi 248
+#define _gloffset_PixelStoref 249
+#define _gloffset_PixelStorei 250
+#define _gloffset_PixelMapfv 251
+#define _gloffset_PixelMapuiv 252
+#define _gloffset_PixelMapusv 253
+#define _gloffset_ReadBuffer 254
+#define _gloffset_CopyPixels 255
+#define _gloffset_ReadPixels 256
+#define _gloffset_DrawPixels 257
+#define _gloffset_GetBooleanv 258
+#define _gloffset_GetClipPlane 259
+#define _gloffset_GetDoublev 260
+#define _gloffset_GetError 261
+#define _gloffset_GetFloatv 262
+#define _gloffset_GetIntegerv 263
+#define _gloffset_GetLightfv 264
+#define _gloffset_GetLightiv 265
+#define _gloffset_GetMapdv 266
+#define _gloffset_GetMapfv 267
+#define _gloffset_GetMapiv 268
+#define _gloffset_GetMaterialfv 269
+#define _gloffset_GetMaterialiv 270
+#define _gloffset_GetPixelMapfv 271
+#define _gloffset_GetPixelMapuiv 272
+#define _gloffset_GetPixelMapusv 273
+#define _gloffset_GetPolygonStipple 274
+#define _gloffset_GetString 275
+#define _gloffset_GetTexEnvfv 276
+#define _gloffset_GetTexEnviv 277
+#define _gloffset_GetTexGendv 278
+#define _gloffset_GetTexGenfv 279
+#define _gloffset_GetTexGeniv 280
+#define _gloffset_GetTexImage 281
+#define _gloffset_GetTexParameterfv 282
+#define _gloffset_GetTexParameteriv 283
+#define _gloffset_GetTexLevelParameterfv 284
+#define _gloffset_GetTexLevelParameteriv 285
+#define _gloffset_IsEnabled 286
+#define _gloffset_IsList 287
+#define _gloffset_DepthRange 288
+#define _gloffset_Frustum 289
+#define _gloffset_LoadIdentity 290
+#define _gloffset_LoadMatrixf 291
+#define _gloffset_LoadMatrixd 292
+#define _gloffset_MatrixMode 293
+#define _gloffset_MultMatrixf 294
+#define _gloffset_MultMatrixd 295
+#define _gloffset_Ortho 296
+#define _gloffset_PopMatrix 297
+#define _gloffset_PushMatrix 298
+#define _gloffset_Rotated 299
+#define _gloffset_Rotatef 300
+#define _gloffset_Scaled 301
+#define _gloffset_Scalef 302
+#define _gloffset_Translated 303
+#define _gloffset_Translatef 304
+#define _gloffset_Viewport 305
+#define _gloffset_ArrayElement 306
+#define _gloffset_BindTexture 307
+#define _gloffset_ColorPointer 308
+#define _gloffset_DisableClientState 309
+#define _gloffset_DrawArrays 310
+#define _gloffset_DrawElements 311
+#define _gloffset_EdgeFlagPointer 312
+#define _gloffset_EnableClientState 313
+#define _gloffset_IndexPointer 314
+#define _gloffset_Indexub 315
+#define _gloffset_Indexubv 316
+#define _gloffset_InterleavedArrays 317
+#define _gloffset_NormalPointer 318
+#define _gloffset_PolygonOffset 319
+#define _gloffset_TexCoordPointer 320
+#define _gloffset_VertexPointer 321
+#define _gloffset_AreTexturesResident 322
+#define _gloffset_CopyTexImage1D 323
+#define _gloffset_CopyTexImage2D 324
+#define _gloffset_CopyTexSubImage1D 325
+#define _gloffset_CopyTexSubImage2D 326
+#define _gloffset_DeleteTextures 327
+#define _gloffset_GenTextures 328
+#define _gloffset_GetPointerv 329
+#define _gloffset_IsTexture 330
+#define _gloffset_PrioritizeTextures 331
+#define _gloffset_TexSubImage1D 332
+#define _gloffset_TexSubImage2D 333
+#define _gloffset_PopClientAttrib 334
+#define _gloffset_PushClientAttrib 335
+#define _gloffset_BlendColor 336
+#define _gloffset_BlendEquation 337
+#define _gloffset_DrawRangeElements 338
+#define _gloffset_ColorTable 339
+#define _gloffset_ColorTableParameterfv 340
+#define _gloffset_ColorTableParameteriv 341
+#define _gloffset_CopyColorTable 342
+#define _gloffset_GetColorTable 343
+#define _gloffset_GetColorTableParameterfv 344
+#define _gloffset_GetColorTableParameteriv 345
+#define _gloffset_ColorSubTable 346
+#define _gloffset_CopyColorSubTable 347
+#define _gloffset_ConvolutionFilter1D 348
+#define _gloffset_ConvolutionFilter2D 349
+#define _gloffset_ConvolutionParameterf 350
+#define _gloffset_ConvolutionParameterfv 351
+#define _gloffset_ConvolutionParameteri 352
+#define _gloffset_ConvolutionParameteriv 353
+#define _gloffset_CopyConvolutionFilter1D 354
+#define _gloffset_CopyConvolutionFilter2D 355
+#define _gloffset_GetConvolutionFilter 356
+#define _gloffset_GetConvolutionParameterfv 357
+#define _gloffset_GetConvolutionParameteriv 358
+#define _gloffset_GetSeparableFilter 359
+#define _gloffset_SeparableFilter2D 360
+#define _gloffset_GetHistogram 361
+#define _gloffset_GetHistogramParameterfv 362
+#define _gloffset_GetHistogramParameteriv 363
+#define _gloffset_GetMinmax 364
+#define _gloffset_GetMinmaxParameterfv 365
+#define _gloffset_GetMinmaxParameteriv 366
+#define _gloffset_Histogram 367
+#define _gloffset_Minmax 368
+#define _gloffset_ResetHistogram 369
+#define _gloffset_ResetMinmax 370
+#define _gloffset_TexImage3D 371
+#define _gloffset_TexSubImage3D 372
+#define _gloffset_CopyTexSubImage3D 373
+#define _gloffset_ActiveTextureARB 374
+#define _gloffset_ClientActiveTextureARB 375
+#define _gloffset_MultiTexCoord1dARB 376
+#define _gloffset_MultiTexCoord1dvARB 377
+#define _gloffset_MultiTexCoord1fARB 378
+#define _gloffset_MultiTexCoord1fvARB 379
+#define _gloffset_MultiTexCoord1iARB 380
+#define _gloffset_MultiTexCoord1ivARB 381
+#define _gloffset_MultiTexCoord1sARB 382
+#define _gloffset_MultiTexCoord1svARB 383
+#define _gloffset_MultiTexCoord2dARB 384
+#define _gloffset_MultiTexCoord2dvARB 385
+#define _gloffset_MultiTexCoord2fARB 386
+#define _gloffset_MultiTexCoord2fvARB 387
+#define _gloffset_MultiTexCoord2iARB 388
+#define _gloffset_MultiTexCoord2ivARB 389
+#define _gloffset_MultiTexCoord2sARB 390
+#define _gloffset_MultiTexCoord2svARB 391
+#define _gloffset_MultiTexCoord3dARB 392
+#define _gloffset_MultiTexCoord3dvARB 393
+#define _gloffset_MultiTexCoord3fARB 394
+#define _gloffset_MultiTexCoord3fvARB 395
+#define _gloffset_MultiTexCoord3iARB 396
+#define _gloffset_MultiTexCoord3ivARB 397
+#define _gloffset_MultiTexCoord3sARB 398
+#define _gloffset_MultiTexCoord3svARB 399
+#define _gloffset_MultiTexCoord4dARB 400
+#define _gloffset_MultiTexCoord4dvARB 401
+#define _gloffset_MultiTexCoord4fARB 402
+#define _gloffset_MultiTexCoord4fvARB 403
+#define _gloffset_MultiTexCoord4iARB 404
+#define _gloffset_MultiTexCoord4ivARB 405
+#define _gloffset_MultiTexCoord4sARB 406
+#define _gloffset_MultiTexCoord4svARB 407
+
+#if !defined(_GLAPI_USE_REMAP_TABLE)
+
+#define _gloffset_AttachShader 408
+#define _gloffset_CreateProgram 409
+#define _gloffset_CreateShader 410
+#define _gloffset_DeleteProgram 411
+#define _gloffset_DeleteShader 412
+#define _gloffset_DetachShader 413
+#define _gloffset_GetAttachedShaders 414
+#define _gloffset_GetProgramInfoLog 415
+#define _gloffset_GetProgramiv 416
+#define _gloffset_GetShaderInfoLog 417
+#define _gloffset_GetShaderiv 418
+#define _gloffset_IsProgram 419
+#define _gloffset_IsShader 420
+#define _gloffset_StencilFuncSeparate 421
+#define _gloffset_StencilMaskSeparate 422
+#define _gloffset_StencilOpSeparate 423
+#define _gloffset_UniformMatrix2x3fv 424
+#define _gloffset_UniformMatrix2x4fv 425
+#define _gloffset_UniformMatrix3x2fv 426
+#define _gloffset_UniformMatrix3x4fv 427
+#define _gloffset_UniformMatrix4x2fv 428
+#define _gloffset_UniformMatrix4x3fv 429
+#define _gloffset_ClampColor 430
+#define _gloffset_ClearBufferfi 431
+#define _gloffset_ClearBufferfv 432
+#define _gloffset_ClearBufferiv 433
+#define _gloffset_ClearBufferuiv 434
+#define _gloffset_GetStringi 435
+#define _gloffset_TexBuffer 436
+#define _gloffset_FramebufferTexture 437
+#define _gloffset_GetBufferParameteri64v 438
+#define _gloffset_GetInteger64i_v 439
+#define _gloffset_VertexAttribDivisor 440
+#define _gloffset_LoadTransposeMatrixdARB 441
+#define _gloffset_LoadTransposeMatrixfARB 442
+#define _gloffset_MultTransposeMatrixdARB 443
+#define _gloffset_MultTransposeMatrixfARB 444
+#define _gloffset_SampleCoverageARB 445
+#define _gloffset_CompressedTexImage1DARB 446
+#define _gloffset_CompressedTexImage2DARB 447
+#define _gloffset_CompressedTexImage3DARB 448
+#define _gloffset_CompressedTexSubImage1DARB 449
+#define _gloffset_CompressedTexSubImage2DARB 450
+#define _gloffset_CompressedTexSubImage3DARB 451
+#define _gloffset_GetCompressedTexImageARB 452
+#define _gloffset_DisableVertexAttribArrayARB 453
+#define _gloffset_EnableVertexAttribArrayARB 454
+#define _gloffset_GetProgramEnvParameterdvARB 455
+#define _gloffset_GetProgramEnvParameterfvARB 456
+#define _gloffset_GetProgramLocalParameterdvARB 457
+#define _gloffset_GetProgramLocalParameterfvARB 458
+#define _gloffset_GetProgramStringARB 459
+#define _gloffset_GetProgramivARB 460
+#define _gloffset_GetVertexAttribdvARB 461
+#define _gloffset_GetVertexAttribfvARB 462
+#define _gloffset_GetVertexAttribivARB 463
+#define _gloffset_ProgramEnvParameter4dARB 464
+#define _gloffset_ProgramEnvParameter4dvARB 465
+#define _gloffset_ProgramEnvParameter4fARB 466
+#define _gloffset_ProgramEnvParameter4fvARB 467
+#define _gloffset_ProgramLocalParameter4dARB 468
+#define _gloffset_ProgramLocalParameter4dvARB 469
+#define _gloffset_ProgramLocalParameter4fARB 470
+#define _gloffset_ProgramLocalParameter4fvARB 471
+#define _gloffset_ProgramStringARB 472
+#define _gloffset_VertexAttrib1dARB 473
+#define _gloffset_VertexAttrib1dvARB 474
+#define _gloffset_VertexAttrib1fARB 475
+#define _gloffset_VertexAttrib1fvARB 476
+#define _gloffset_VertexAttrib1sARB 477
+#define _gloffset_VertexAttrib1svARB 478
+#define _gloffset_VertexAttrib2dARB 479
+#define _gloffset_VertexAttrib2dvARB 480
+#define _gloffset_VertexAttrib2fARB 481
+#define _gloffset_VertexAttrib2fvARB 482
+#define _gloffset_VertexAttrib2sARB 483
+#define _gloffset_VertexAttrib2svARB 484
+#define _gloffset_VertexAttrib3dARB 485
+#define _gloffset_VertexAttrib3dvARB 486
+#define _gloffset_VertexAttrib3fARB 487
+#define _gloffset_VertexAttrib3fvARB 488
+#define _gloffset_VertexAttrib3sARB 489
+#define _gloffset_VertexAttrib3svARB 490
+#define _gloffset_VertexAttrib4NbvARB 491
+#define _gloffset_VertexAttrib4NivARB 492
+#define _gloffset_VertexAttrib4NsvARB 493
+#define _gloffset_VertexAttrib4NubARB 494
+#define _gloffset_VertexAttrib4NubvARB 495
+#define _gloffset_VertexAttrib4NuivARB 496
+#define _gloffset_VertexAttrib4NusvARB 497
+#define _gloffset_VertexAttrib4bvARB 498
+#define _gloffset_VertexAttrib4dARB 499
+#define _gloffset_VertexAttrib4dvARB 500
+#define _gloffset_VertexAttrib4fARB 501
+#define _gloffset_VertexAttrib4fvARB 502
+#define _gloffset_VertexAttrib4ivARB 503
+#define _gloffset_VertexAttrib4sARB 504
+#define _gloffset_VertexAttrib4svARB 505
+#define _gloffset_VertexAttrib4ubvARB 506
+#define _gloffset_VertexAttrib4uivARB 507
+#define _gloffset_VertexAttrib4usvARB 508
+#define _gloffset_VertexAttribPointerARB 509
+#define _gloffset_BindBufferARB 510
+#define _gloffset_BufferDataARB 511
+#define _gloffset_BufferSubDataARB 512
+#define _gloffset_DeleteBuffersARB 513
+#define _gloffset_GenBuffersARB 514
+#define _gloffset_GetBufferParameterivARB 515
+#define _gloffset_GetBufferPointervARB 516
+#define _gloffset_GetBufferSubDataARB 517
+#define _gloffset_IsBufferARB 518
+#define _gloffset_MapBufferARB 519
+#define _gloffset_UnmapBufferARB 520
+#define _gloffset_BeginQueryARB 521
+#define _gloffset_DeleteQueriesARB 522
+#define _gloffset_EndQueryARB 523
+#define _gloffset_GenQueriesARB 524
+#define _gloffset_GetQueryObjectivARB 525
+#define _gloffset_GetQueryObjectuivARB 526
+#define _gloffset_GetQueryivARB 527
+#define _gloffset_IsQueryARB 528
+#define _gloffset_AttachObjectARB 529
+#define _gloffset_CompileShaderARB 530
+#define _gloffset_CreateProgramObjectARB 531
+#define _gloffset_CreateShaderObjectARB 532
+#define _gloffset_DeleteObjectARB 533
+#define _gloffset_DetachObjectARB 534
+#define _gloffset_GetActiveUniformARB 535
+#define _gloffset_GetAttachedObjectsARB 536
+#define _gloffset_GetHandleARB 537
+#define _gloffset_GetInfoLogARB 538
+#define _gloffset_GetObjectParameterfvARB 539
+#define _gloffset_GetObjectParameterivARB 540
+#define _gloffset_GetShaderSourceARB 541
+#define _gloffset_GetUniformLocationARB 542
+#define _gloffset_GetUniformfvARB 543
+#define _gloffset_GetUniformivARB 544
+#define _gloffset_LinkProgramARB 545
+#define _gloffset_ShaderSourceARB 546
+#define _gloffset_Uniform1fARB 547
+#define _gloffset_Uniform1fvARB 548
+#define _gloffset_Uniform1iARB 549
+#define _gloffset_Uniform1ivARB 550
+#define _gloffset_Uniform2fARB 551
+#define _gloffset_Uniform2fvARB 552
+#define _gloffset_Uniform2iARB 553
+#define _gloffset_Uniform2ivARB 554
+#define _gloffset_Uniform3fARB 555
+#define _gloffset_Uniform3fvARB 556
+#define _gloffset_Uniform3iARB 557
+#define _gloffset_Uniform3ivARB 558
+#define _gloffset_Uniform4fARB 559
+#define _gloffset_Uniform4fvARB 560
+#define _gloffset_Uniform4iARB 561
+#define _gloffset_Uniform4ivARB 562
+#define _gloffset_UniformMatrix2fvARB 563
+#define _gloffset_UniformMatrix3fvARB 564
+#define _gloffset_UniformMatrix4fvARB 565
+#define _gloffset_UseProgramObjectARB 566
+#define _gloffset_ValidateProgramARB 567
+#define _gloffset_BindAttribLocationARB 568
+#define _gloffset_GetActiveAttribARB 569
+#define _gloffset_GetAttribLocationARB 570
+#define _gloffset_DrawBuffersARB 571
+#define _gloffset_DrawArraysInstancedARB 572
+#define _gloffset_DrawElementsInstancedARB 573
+#define _gloffset_RenderbufferStorageMultisample 574
+#define _gloffset_FramebufferTextureARB 575
+#define _gloffset_FramebufferTextureFaceARB 576
+#define _gloffset_ProgramParameteriARB 577
+#define _gloffset_FlushMappedBufferRange 578
+#define _gloffset_MapBufferRange 579
+#define _gloffset_BindVertexArray 580
+#define _gloffset_GenVertexArrays 581
+#define _gloffset_CopyBufferSubData 582
+#define _gloffset_ClientWaitSync 583
+#define _gloffset_DeleteSync 584
+#define _gloffset_FenceSync 585
+#define _gloffset_GetInteger64v 586
+#define _gloffset_GetSynciv 587
+#define _gloffset_IsSync 588
+#define _gloffset_WaitSync 589
+#define _gloffset_DrawElementsBaseVertex 590
+#define _gloffset_DrawRangeElementsBaseVertex 591
+#define _gloffset_MultiDrawElementsBaseVertex 592
+#define _gloffset_BindTransformFeedback 593
+#define _gloffset_DeleteTransformFeedbacks 594
+#define _gloffset_DrawTransformFeedback 595
+#define _gloffset_GenTransformFeedbacks 596
+#define _gloffset_IsTransformFeedback 597
+#define _gloffset_PauseTransformFeedback 598
+#define _gloffset_ResumeTransformFeedback 599
+#define _gloffset_PolygonOffsetEXT 600
+#define _gloffset_GetPixelTexGenParameterfvSGIS 601
+#define _gloffset_GetPixelTexGenParameterivSGIS 602
+#define _gloffset_PixelTexGenParameterfSGIS 603
+#define _gloffset_PixelTexGenParameterfvSGIS 604
+#define _gloffset_PixelTexGenParameteriSGIS 605
+#define _gloffset_PixelTexGenParameterivSGIS 606
+#define _gloffset_SampleMaskSGIS 607
+#define _gloffset_SamplePatternSGIS 608
+#define _gloffset_ColorPointerEXT 609
+#define _gloffset_EdgeFlagPointerEXT 610
+#define _gloffset_IndexPointerEXT 611
+#define _gloffset_NormalPointerEXT 612
+#define _gloffset_TexCoordPointerEXT 613
+#define _gloffset_VertexPointerEXT 614
+#define _gloffset_PointParameterfEXT 615
+#define _gloffset_PointParameterfvEXT 616
+#define _gloffset_LockArraysEXT 617
+#define _gloffset_UnlockArraysEXT 618
+#define _gloffset_SecondaryColor3bEXT 619
+#define _gloffset_SecondaryColor3bvEXT 620
+#define _gloffset_SecondaryColor3dEXT 621
+#define _gloffset_SecondaryColor3dvEXT 622
+#define _gloffset_SecondaryColor3fEXT 623
+#define _gloffset_SecondaryColor3fvEXT 624
+#define _gloffset_SecondaryColor3iEXT 625
+#define _gloffset_SecondaryColor3ivEXT 626
+#define _gloffset_SecondaryColor3sEXT 627
+#define _gloffset_SecondaryColor3svEXT 628
+#define _gloffset_SecondaryColor3ubEXT 629
+#define _gloffset_SecondaryColor3ubvEXT 630
+#define _gloffset_SecondaryColor3uiEXT 631
+#define _gloffset_SecondaryColor3uivEXT 632
+#define _gloffset_SecondaryColor3usEXT 633
+#define _gloffset_SecondaryColor3usvEXT 634
+#define _gloffset_SecondaryColorPointerEXT 635
+#define _gloffset_MultiDrawArraysEXT 636
+#define _gloffset_MultiDrawElementsEXT 637
+#define _gloffset_FogCoordPointerEXT 638
+#define _gloffset_FogCoorddEXT 639
+#define _gloffset_FogCoorddvEXT 640
+#define _gloffset_FogCoordfEXT 641
+#define _gloffset_FogCoordfvEXT 642
+#define _gloffset_PixelTexGenSGIX 643
+#define _gloffset_BlendFuncSeparateEXT 644
+#define _gloffset_FlushVertexArrayRangeNV 645
+#define _gloffset_VertexArrayRangeNV 646
+#define _gloffset_CombinerInputNV 647
+#define _gloffset_CombinerOutputNV 648
+#define _gloffset_CombinerParameterfNV 649
+#define _gloffset_CombinerParameterfvNV 650
+#define _gloffset_CombinerParameteriNV 651
+#define _gloffset_CombinerParameterivNV 652
+#define _gloffset_FinalCombinerInputNV 653
+#define _gloffset_GetCombinerInputParameterfvNV 654
+#define _gloffset_GetCombinerInputParameterivNV 655
+#define _gloffset_GetCombinerOutputParameterfvNV 656
+#define _gloffset_GetCombinerOutputParameterivNV 657
+#define _gloffset_GetFinalCombinerInputParameterfvNV 658
+#define _gloffset_GetFinalCombinerInputParameterivNV 659
+#define _gloffset_ResizeBuffersMESA 660
+#define _gloffset_WindowPos2dMESA 661
+#define _gloffset_WindowPos2dvMESA 662
+#define _gloffset_WindowPos2fMESA 663
+#define _gloffset_WindowPos2fvMESA 664
+#define _gloffset_WindowPos2iMESA 665
+#define _gloffset_WindowPos2ivMESA 666
+#define _gloffset_WindowPos2sMESA 667
+#define _gloffset_WindowPos2svMESA 668
+#define _gloffset_WindowPos3dMESA 669
+#define _gloffset_WindowPos3dvMESA 670
+#define _gloffset_WindowPos3fMESA 671
+#define _gloffset_WindowPos3fvMESA 672
+#define _gloffset_WindowPos3iMESA 673
+#define _gloffset_WindowPos3ivMESA 674
+#define _gloffset_WindowPos3sMESA 675
+#define _gloffset_WindowPos3svMESA 676
+#define _gloffset_WindowPos4dMESA 677
+#define _gloffset_WindowPos4dvMESA 678
+#define _gloffset_WindowPos4fMESA 679
+#define _gloffset_WindowPos4fvMESA 680
+#define _gloffset_WindowPos4iMESA 681
+#define _gloffset_WindowPos4ivMESA 682
+#define _gloffset_WindowPos4sMESA 683
+#define _gloffset_WindowPos4svMESA 684
+#define _gloffset_MultiModeDrawArraysIBM 685
+#define _gloffset_MultiModeDrawElementsIBM 686
+#define _gloffset_DeleteFencesNV 687
+#define _gloffset_FinishFenceNV 688
+#define _gloffset_GenFencesNV 689
+#define _gloffset_GetFenceivNV 690
+#define _gloffset_IsFenceNV 691
+#define _gloffset_SetFenceNV 692
+#define _gloffset_TestFenceNV 693
+#define _gloffset_AreProgramsResidentNV 694
+#define _gloffset_BindProgramNV 695
+#define _gloffset_DeleteProgramsNV 696
+#define _gloffset_ExecuteProgramNV 697
+#define _gloffset_GenProgramsNV 698
+#define _gloffset_GetProgramParameterdvNV 699
+#define _gloffset_GetProgramParameterfvNV 700
+#define _gloffset_GetProgramStringNV 701
+#define _gloffset_GetProgramivNV 702
+#define _gloffset_GetTrackMatrixivNV 703
+#define _gloffset_GetVertexAttribPointervNV 704
+#define _gloffset_GetVertexAttribdvNV 705
+#define _gloffset_GetVertexAttribfvNV 706
+#define _gloffset_GetVertexAttribivNV 707
+#define _gloffset_IsProgramNV 708
+#define _gloffset_LoadProgramNV 709
+#define _gloffset_ProgramParameters4dvNV 710
+#define _gloffset_ProgramParameters4fvNV 711
+#define _gloffset_RequestResidentProgramsNV 712
+#define _gloffset_TrackMatrixNV 713
+#define _gloffset_VertexAttrib1dNV 714
+#define _gloffset_VertexAttrib1dvNV 715
+#define _gloffset_VertexAttrib1fNV 716
+#define _gloffset_VertexAttrib1fvNV 717
+#define _gloffset_VertexAttrib1sNV 718
+#define _gloffset_VertexAttrib1svNV 719
+#define _gloffset_VertexAttrib2dNV 720
+#define _gloffset_VertexAttrib2dvNV 721
+#define _gloffset_VertexAttrib2fNV 722
+#define _gloffset_VertexAttrib2fvNV 723
+#define _gloffset_VertexAttrib2sNV 724
+#define _gloffset_VertexAttrib2svNV 725
+#define _gloffset_VertexAttrib3dNV 726
+#define _gloffset_VertexAttrib3dvNV 727
+#define _gloffset_VertexAttrib3fNV 728
+#define _gloffset_VertexAttrib3fvNV 729
+#define _gloffset_VertexAttrib3sNV 730
+#define _gloffset_VertexAttrib3svNV 731
+#define _gloffset_VertexAttrib4dNV 732
+#define _gloffset_VertexAttrib4dvNV 733
+#define _gloffset_VertexAttrib4fNV 734
+#define _gloffset_VertexAttrib4fvNV 735
+#define _gloffset_VertexAttrib4sNV 736
+#define _gloffset_VertexAttrib4svNV 737
+#define _gloffset_VertexAttrib4ubNV 738
+#define _gloffset_VertexAttrib4ubvNV 739
+#define _gloffset_VertexAttribPointerNV 740
+#define _gloffset_VertexAttribs1dvNV 741
+#define _gloffset_VertexAttribs1fvNV 742
+#define _gloffset_VertexAttribs1svNV 743
+#define _gloffset_VertexAttribs2dvNV 744
+#define _gloffset_VertexAttribs2fvNV 745
+#define _gloffset_VertexAttribs2svNV 746
+#define _gloffset_VertexAttribs3dvNV 747
+#define _gloffset_VertexAttribs3fvNV 748
+#define _gloffset_VertexAttribs3svNV 749
+#define _gloffset_VertexAttribs4dvNV 750
+#define _gloffset_VertexAttribs4fvNV 751
+#define _gloffset_VertexAttribs4svNV 752
+#define _gloffset_VertexAttribs4ubvNV 753
+#define _gloffset_GetTexBumpParameterfvATI 754
+#define _gloffset_GetTexBumpParameterivATI 755
+#define _gloffset_TexBumpParameterfvATI 756
+#define _gloffset_TexBumpParameterivATI 757
+#define _gloffset_AlphaFragmentOp1ATI 758
+#define _gloffset_AlphaFragmentOp2ATI 759
+#define _gloffset_AlphaFragmentOp3ATI 760
+#define _gloffset_BeginFragmentShaderATI 761
+#define _gloffset_BindFragmentShaderATI 762
+#define _gloffset_ColorFragmentOp1ATI 763
+#define _gloffset_ColorFragmentOp2ATI 764
+#define _gloffset_ColorFragmentOp3ATI 765
+#define _gloffset_DeleteFragmentShaderATI 766
+#define _gloffset_EndFragmentShaderATI 767
+#define _gloffset_GenFragmentShadersATI 768
+#define _gloffset_PassTexCoordATI 769
+#define _gloffset_SampleMapATI 770
+#define _gloffset_SetFragmentShaderConstantATI 771
+#define _gloffset_PointParameteriNV 772
+#define _gloffset_PointParameterivNV 773
+#define _gloffset_ActiveStencilFaceEXT 774
+#define _gloffset_BindVertexArrayAPPLE 775
+#define _gloffset_DeleteVertexArraysAPPLE 776
+#define _gloffset_GenVertexArraysAPPLE 777
+#define _gloffset_IsVertexArrayAPPLE 778
+#define _gloffset_GetProgramNamedParameterdvNV 779
+#define _gloffset_GetProgramNamedParameterfvNV 780
+#define _gloffset_ProgramNamedParameter4dNV 781
+#define _gloffset_ProgramNamedParameter4dvNV 782
+#define _gloffset_ProgramNamedParameter4fNV 783
+#define _gloffset_ProgramNamedParameter4fvNV 784
+#define _gloffset_PrimitiveRestartIndexNV 785
+#define _gloffset_PrimitiveRestartNV 786
+#define _gloffset_DepthBoundsEXT 787
+#define _gloffset_BlendEquationSeparateEXT 788
+#define _gloffset_BindFramebufferEXT 789
+#define _gloffset_BindRenderbufferEXT 790
+#define _gloffset_CheckFramebufferStatusEXT 791
+#define _gloffset_DeleteFramebuffersEXT 792
+#define _gloffset_DeleteRenderbuffersEXT 793
+#define _gloffset_FramebufferRenderbufferEXT 794
+#define _gloffset_FramebufferTexture1DEXT 795
+#define _gloffset_FramebufferTexture2DEXT 796
+#define _gloffset_FramebufferTexture3DEXT 797
+#define _gloffset_GenFramebuffersEXT 798
+#define _gloffset_GenRenderbuffersEXT 799
+#define _gloffset_GenerateMipmapEXT 800
+#define _gloffset_GetFramebufferAttachmentParameterivEXT 801
+#define _gloffset_GetRenderbufferParameterivEXT 802
+#define _gloffset_IsFramebufferEXT 803
+#define _gloffset_IsRenderbufferEXT 804
+#define _gloffset_RenderbufferStorageEXT 805
+#define _gloffset_BlitFramebufferEXT 806
+#define _gloffset_BufferParameteriAPPLE 807
+#define _gloffset_FlushMappedBufferRangeAPPLE 808
+#define _gloffset_BindFragDataLocationEXT 809
+#define _gloffset_GetFragDataLocationEXT 810
+#define _gloffset_GetUniformuivEXT 811
+#define _gloffset_GetVertexAttribIivEXT 812
+#define _gloffset_GetVertexAttribIuivEXT 813
+#define _gloffset_Uniform1uiEXT 814
+#define _gloffset_Uniform1uivEXT 815
+#define _gloffset_Uniform2uiEXT 816
+#define _gloffset_Uniform2uivEXT 817
+#define _gloffset_Uniform3uiEXT 818
+#define _gloffset_Uniform3uivEXT 819
+#define _gloffset_Uniform4uiEXT 820
+#define _gloffset_Uniform4uivEXT 821
+#define _gloffset_VertexAttribI1iEXT 822
+#define _gloffset_VertexAttribI1ivEXT 823
+#define _gloffset_VertexAttribI1uiEXT 824
+#define _gloffset_VertexAttribI1uivEXT 825
+#define _gloffset_VertexAttribI2iEXT 826
+#define _gloffset_VertexAttribI2ivEXT 827
+#define _gloffset_VertexAttribI2uiEXT 828
+#define _gloffset_VertexAttribI2uivEXT 829
+#define _gloffset_VertexAttribI3iEXT 830
+#define _gloffset_VertexAttribI3ivEXT 831
+#define _gloffset_VertexAttribI3uiEXT 832
+#define _gloffset_VertexAttribI3uivEXT 833
+#define _gloffset_VertexAttribI4bvEXT 834
+#define _gloffset_VertexAttribI4iEXT 835
+#define _gloffset_VertexAttribI4ivEXT 836
+#define _gloffset_VertexAttribI4svEXT 837
+#define _gloffset_VertexAttribI4ubvEXT 838
+#define _gloffset_VertexAttribI4uiEXT 839
+#define _gloffset_VertexAttribI4uivEXT 840
+#define _gloffset_VertexAttribI4usvEXT 841
+#define _gloffset_VertexAttribIPointerEXT 842
+#define _gloffset_FramebufferTextureLayerEXT 843
+#define _gloffset_ColorMaskIndexedEXT 844
+#define _gloffset_DisableIndexedEXT 845
+#define _gloffset_EnableIndexedEXT 846
+#define _gloffset_GetBooleanIndexedvEXT 847
+#define _gloffset_GetIntegerIndexedvEXT 848
+#define _gloffset_IsEnabledIndexedEXT 849
+#define _gloffset_ClearColorIiEXT 850
+#define _gloffset_ClearColorIuiEXT 851
+#define _gloffset_GetTexParameterIivEXT 852
+#define _gloffset_GetTexParameterIuivEXT 853
+#define _gloffset_TexParameterIivEXT 854
+#define _gloffset_TexParameterIuivEXT 855
+#define _gloffset_BeginConditionalRenderNV 856
+#define _gloffset_EndConditionalRenderNV 857
+#define _gloffset_BeginTransformFeedbackEXT 858
+#define _gloffset_BindBufferBaseEXT 859
+#define _gloffset_BindBufferOffsetEXT 860
+#define _gloffset_BindBufferRangeEXT 861
+#define _gloffset_EndTransformFeedbackEXT 862
+#define _gloffset_GetTransformFeedbackVaryingEXT 863
+#define _gloffset_TransformFeedbackVaryingsEXT 864
+#define _gloffset_ProvokingVertexEXT 865
+#define _gloffset_GetTexParameterPointervAPPLE 866
+#define _gloffset_TextureRangeAPPLE 867
+#define _gloffset_GetObjectParameterivAPPLE 868
+#define _gloffset_ObjectPurgeableAPPLE 869
+#define _gloffset_ObjectUnpurgeableAPPLE 870
+#define _gloffset_ActiveProgramEXT 871
+#define _gloffset_CreateShaderProgramEXT 872
+#define _gloffset_UseShaderProgramEXT 873
+#define _gloffset_StencilFuncSeparateATI 874
+#define _gloffset_ProgramEnvParameters4fvEXT 875
+#define _gloffset_ProgramLocalParameters4fvEXT 876
+#define _gloffset_GetQueryObjecti64vEXT 877
+#define _gloffset_GetQueryObjectui64vEXT 878
+#define _gloffset_EGLImageTargetRenderbufferStorageOES 879
+#define _gloffset_EGLImageTargetTexture2DOES 880
+
+#else /* !_GLAPI_USE_REMAP_TABLE */
+
+#define driDispatchRemapTable_size 473
+extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
+
+#define AttachShader_remap_index 0
+#define CreateProgram_remap_index 1
+#define CreateShader_remap_index 2
+#define DeleteProgram_remap_index 3
+#define DeleteShader_remap_index 4
+#define DetachShader_remap_index 5
+#define GetAttachedShaders_remap_index 6
+#define GetProgramInfoLog_remap_index 7
+#define GetProgramiv_remap_index 8
+#define GetShaderInfoLog_remap_index 9
+#define GetShaderiv_remap_index 10
+#define IsProgram_remap_index 11
+#define IsShader_remap_index 12
+#define StencilFuncSeparate_remap_index 13
+#define StencilMaskSeparate_remap_index 14
+#define StencilOpSeparate_remap_index 15
+#define UniformMatrix2x3fv_remap_index 16
+#define UniformMatrix2x4fv_remap_index 17
+#define UniformMatrix3x2fv_remap_index 18
+#define UniformMatrix3x4fv_remap_index 19
+#define UniformMatrix4x2fv_remap_index 20
+#define UniformMatrix4x3fv_remap_index 21
+#define ClampColor_remap_index 22
+#define ClearBufferfi_remap_index 23
+#define ClearBufferfv_remap_index 24
+#define ClearBufferiv_remap_index 25
+#define ClearBufferuiv_remap_index 26
+#define GetStringi_remap_index 27
+#define TexBuffer_remap_index 28
+#define FramebufferTexture_remap_index 29
+#define GetBufferParameteri64v_remap_index 30
+#define GetInteger64i_v_remap_index 31
+#define VertexAttribDivisor_remap_index 32
+#define LoadTransposeMatrixdARB_remap_index 33
+#define LoadTransposeMatrixfARB_remap_index 34
+#define MultTransposeMatrixdARB_remap_index 35
+#define MultTransposeMatrixfARB_remap_index 36
+#define SampleCoverageARB_remap_index 37
+#define CompressedTexImage1DARB_remap_index 38
+#define CompressedTexImage2DARB_remap_index 39
+#define CompressedTexImage3DARB_remap_index 40
+#define CompressedTexSubImage1DARB_remap_index 41
+#define CompressedTexSubImage2DARB_remap_index 42
+#define CompressedTexSubImage3DARB_remap_index 43
+#define GetCompressedTexImageARB_remap_index 44
+#define DisableVertexAttribArrayARB_remap_index 45
+#define EnableVertexAttribArrayARB_remap_index 46
+#define GetProgramEnvParameterdvARB_remap_index 47
+#define GetProgramEnvParameterfvARB_remap_index 48
+#define GetProgramLocalParameterdvARB_remap_index 49
+#define GetProgramLocalParameterfvARB_remap_index 50
+#define GetProgramStringARB_remap_index 51
+#define GetProgramivARB_remap_index 52
+#define GetVertexAttribdvARB_remap_index 53
+#define GetVertexAttribfvARB_remap_index 54
+#define GetVertexAttribivARB_remap_index 55
+#define ProgramEnvParameter4dARB_remap_index 56
+#define ProgramEnvParameter4dvARB_remap_index 57
+#define ProgramEnvParameter4fARB_remap_index 58
+#define ProgramEnvParameter4fvARB_remap_index 59
+#define ProgramLocalParameter4dARB_remap_index 60
+#define ProgramLocalParameter4dvARB_remap_index 61
+#define ProgramLocalParameter4fARB_remap_index 62
+#define ProgramLocalParameter4fvARB_remap_index 63
+#define ProgramStringARB_remap_index 64
+#define VertexAttrib1dARB_remap_index 65
+#define VertexAttrib1dvARB_remap_index 66
+#define VertexAttrib1fARB_remap_index 67
+#define VertexAttrib1fvARB_remap_index 68
+#define VertexAttrib1sARB_remap_index 69
+#define VertexAttrib1svARB_remap_index 70
+#define VertexAttrib2dARB_remap_index 71
+#define VertexAttrib2dvARB_remap_index 72
+#define VertexAttrib2fARB_remap_index 73
+#define VertexAttrib2fvARB_remap_index 74
+#define VertexAttrib2sARB_remap_index 75
+#define VertexAttrib2svARB_remap_index 76
+#define VertexAttrib3dARB_remap_index 77
+#define VertexAttrib3dvARB_remap_index 78
+#define VertexAttrib3fARB_remap_index 79
+#define VertexAttrib3fvARB_remap_index 80
+#define VertexAttrib3sARB_remap_index 81
+#define VertexAttrib3svARB_remap_index 82
+#define VertexAttrib4NbvARB_remap_index 83
+#define VertexAttrib4NivARB_remap_index 84
+#define VertexAttrib4NsvARB_remap_index 85
+#define VertexAttrib4NubARB_remap_index 86
+#define VertexAttrib4NubvARB_remap_index 87
+#define VertexAttrib4NuivARB_remap_index 88
+#define VertexAttrib4NusvARB_remap_index 89
+#define VertexAttrib4bvARB_remap_index 90
+#define VertexAttrib4dARB_remap_index 91
+#define VertexAttrib4dvARB_remap_index 92
+#define VertexAttrib4fARB_remap_index 93
+#define VertexAttrib4fvARB_remap_index 94
+#define VertexAttrib4ivARB_remap_index 95
+#define VertexAttrib4sARB_remap_index 96
+#define VertexAttrib4svARB_remap_index 97
+#define VertexAttrib4ubvARB_remap_index 98
+#define VertexAttrib4uivARB_remap_index 99
+#define VertexAttrib4usvARB_remap_index 100
+#define VertexAttribPointerARB_remap_index 101
+#define BindBufferARB_remap_index 102
+#define BufferDataARB_remap_index 103
+#define BufferSubDataARB_remap_index 104
+#define DeleteBuffersARB_remap_index 105
+#define GenBuffersARB_remap_index 106
+#define GetBufferParameterivARB_remap_index 107
+#define GetBufferPointervARB_remap_index 108
+#define GetBufferSubDataARB_remap_index 109
+#define IsBufferARB_remap_index 110
+#define MapBufferARB_remap_index 111
+#define UnmapBufferARB_remap_index 112
+#define BeginQueryARB_remap_index 113
+#define DeleteQueriesARB_remap_index 114
+#define EndQueryARB_remap_index 115
+#define GenQueriesARB_remap_index 116
+#define GetQueryObjectivARB_remap_index 117
+#define GetQueryObjectuivARB_remap_index 118
+#define GetQueryivARB_remap_index 119
+#define IsQueryARB_remap_index 120
+#define AttachObjectARB_remap_index 121
+#define CompileShaderARB_remap_index 122
+#define CreateProgramObjectARB_remap_index 123
+#define CreateShaderObjectARB_remap_index 124
+#define DeleteObjectARB_remap_index 125
+#define DetachObjectARB_remap_index 126
+#define GetActiveUniformARB_remap_index 127
+#define GetAttachedObjectsARB_remap_index 128
+#define GetHandleARB_remap_index 129
+#define GetInfoLogARB_remap_index 130
+#define GetObjectParameterfvARB_remap_index 131
+#define GetObjectParameterivARB_remap_index 132
+#define GetShaderSourceARB_remap_index 133
+#define GetUniformLocationARB_remap_index 134
+#define GetUniformfvARB_remap_index 135
+#define GetUniformivARB_remap_index 136
+#define LinkProgramARB_remap_index 137
+#define ShaderSourceARB_remap_index 138
+#define Uniform1fARB_remap_index 139
+#define Uniform1fvARB_remap_index 140
+#define Uniform1iARB_remap_index 141
+#define Uniform1ivARB_remap_index 142
+#define Uniform2fARB_remap_index 143
+#define Uniform2fvARB_remap_index 144
+#define Uniform2iARB_remap_index 145
+#define Uniform2ivARB_remap_index 146
+#define Uniform3fARB_remap_index 147
+#define Uniform3fvARB_remap_index 148
+#define Uniform3iARB_remap_index 149
+#define Uniform3ivARB_remap_index 150
+#define Uniform4fARB_remap_index 151
+#define Uniform4fvARB_remap_index 152
+#define Uniform4iARB_remap_index 153
+#define Uniform4ivARB_remap_index 154
+#define UniformMatrix2fvARB_remap_index 155
+#define UniformMatrix3fvARB_remap_index 156
+#define UniformMatrix4fvARB_remap_index 157
+#define UseProgramObjectARB_remap_index 158
+#define ValidateProgramARB_remap_index 159
+#define BindAttribLocationARB_remap_index 160
+#define GetActiveAttribARB_remap_index 161
+#define GetAttribLocationARB_remap_index 162
+#define DrawBuffersARB_remap_index 163
+#define DrawArraysInstancedARB_remap_index 164
+#define DrawElementsInstancedARB_remap_index 165
+#define RenderbufferStorageMultisample_remap_index 166
+#define FramebufferTextureARB_remap_index 167
+#define FramebufferTextureFaceARB_remap_index 168
+#define ProgramParameteriARB_remap_index 169
+#define FlushMappedBufferRange_remap_index 170
+#define MapBufferRange_remap_index 171
+#define BindVertexArray_remap_index 172
+#define GenVertexArrays_remap_index 173
+#define CopyBufferSubData_remap_index 174
+#define ClientWaitSync_remap_index 175
+#define DeleteSync_remap_index 176
+#define FenceSync_remap_index 177
+#define GetInteger64v_remap_index 178
+#define GetSynciv_remap_index 179
+#define IsSync_remap_index 180
+#define WaitSync_remap_index 181
+#define DrawElementsBaseVertex_remap_index 182
+#define DrawRangeElementsBaseVertex_remap_index 183
+#define MultiDrawElementsBaseVertex_remap_index 184
+#define BindTransformFeedback_remap_index 185
+#define DeleteTransformFeedbacks_remap_index 186
+#define DrawTransformFeedback_remap_index 187
+#define GenTransformFeedbacks_remap_index 188
+#define IsTransformFeedback_remap_index 189
+#define PauseTransformFeedback_remap_index 190
+#define ResumeTransformFeedback_remap_index 191
+#define PolygonOffsetEXT_remap_index 192
+#define GetPixelTexGenParameterfvSGIS_remap_index 193
+#define GetPixelTexGenParameterivSGIS_remap_index 194
+#define PixelTexGenParameterfSGIS_remap_index 195
+#define PixelTexGenParameterfvSGIS_remap_index 196
+#define PixelTexGenParameteriSGIS_remap_index 197
+#define PixelTexGenParameterivSGIS_remap_index 198
+#define SampleMaskSGIS_remap_index 199
+#define SamplePatternSGIS_remap_index 200
+#define ColorPointerEXT_remap_index 201
+#define EdgeFlagPointerEXT_remap_index 202
+#define IndexPointerEXT_remap_index 203
+#define NormalPointerEXT_remap_index 204
+#define TexCoordPointerEXT_remap_index 205
+#define VertexPointerEXT_remap_index 206
+#define PointParameterfEXT_remap_index 207
+#define PointParameterfvEXT_remap_index 208
+#define LockArraysEXT_remap_index 209
+#define UnlockArraysEXT_remap_index 210
+#define SecondaryColor3bEXT_remap_index 211
+#define SecondaryColor3bvEXT_remap_index 212
+#define SecondaryColor3dEXT_remap_index 213
+#define SecondaryColor3dvEXT_remap_index 214
+#define SecondaryColor3fEXT_remap_index 215
+#define SecondaryColor3fvEXT_remap_index 216
+#define SecondaryColor3iEXT_remap_index 217
+#define SecondaryColor3ivEXT_remap_index 218
+#define SecondaryColor3sEXT_remap_index 219
+#define SecondaryColor3svEXT_remap_index 220
+#define SecondaryColor3ubEXT_remap_index 221
+#define SecondaryColor3ubvEXT_remap_index 222
+#define SecondaryColor3uiEXT_remap_index 223
+#define SecondaryColor3uivEXT_remap_index 224
+#define SecondaryColor3usEXT_remap_index 225
+#define SecondaryColor3usvEXT_remap_index 226
+#define SecondaryColorPointerEXT_remap_index 227
+#define MultiDrawArraysEXT_remap_index 228
+#define MultiDrawElementsEXT_remap_index 229
+#define FogCoordPointerEXT_remap_index 230
+#define FogCoorddEXT_remap_index 231
+#define FogCoorddvEXT_remap_index 232
+#define FogCoordfEXT_remap_index 233
+#define FogCoordfvEXT_remap_index 234
+#define PixelTexGenSGIX_remap_index 235
+#define BlendFuncSeparateEXT_remap_index 236
+#define FlushVertexArrayRangeNV_remap_index 237
+#define VertexArrayRangeNV_remap_index 238
+#define CombinerInputNV_remap_index 239
+#define CombinerOutputNV_remap_index 240
+#define CombinerParameterfNV_remap_index 241
+#define CombinerParameterfvNV_remap_index 242
+#define CombinerParameteriNV_remap_index 243
+#define CombinerParameterivNV_remap_index 244
+#define FinalCombinerInputNV_remap_index 245
+#define GetCombinerInputParameterfvNV_remap_index 246
+#define GetCombinerInputParameterivNV_remap_index 247
+#define GetCombinerOutputParameterfvNV_remap_index 248
+#define GetCombinerOutputParameterivNV_remap_index 249
+#define GetFinalCombinerInputParameterfvNV_remap_index 250
+#define GetFinalCombinerInputParameterivNV_remap_index 251
+#define ResizeBuffersMESA_remap_index 252
+#define WindowPos2dMESA_remap_index 253
+#define WindowPos2dvMESA_remap_index 254
+#define WindowPos2fMESA_remap_index 255
+#define WindowPos2fvMESA_remap_index 256
+#define WindowPos2iMESA_remap_index 257
+#define WindowPos2ivMESA_remap_index 258
+#define WindowPos2sMESA_remap_index 259
+#define WindowPos2svMESA_remap_index 260
+#define WindowPos3dMESA_remap_index 261
+#define WindowPos3dvMESA_remap_index 262
+#define WindowPos3fMESA_remap_index 263
+#define WindowPos3fvMESA_remap_index 264
+#define WindowPos3iMESA_remap_index 265
+#define WindowPos3ivMESA_remap_index 266
+#define WindowPos3sMESA_remap_index 267
+#define WindowPos3svMESA_remap_index 268
+#define WindowPos4dMESA_remap_index 269
+#define WindowPos4dvMESA_remap_index 270
+#define WindowPos4fMESA_remap_index 271
+#define WindowPos4fvMESA_remap_index 272
+#define WindowPos4iMESA_remap_index 273
+#define WindowPos4ivMESA_remap_index 274
+#define WindowPos4sMESA_remap_index 275
+#define WindowPos4svMESA_remap_index 276
+#define MultiModeDrawArraysIBM_remap_index 277
+#define MultiModeDrawElementsIBM_remap_index 278
+#define DeleteFencesNV_remap_index 279
+#define FinishFenceNV_remap_index 280
+#define GenFencesNV_remap_index 281
+#define GetFenceivNV_remap_index 282
+#define IsFenceNV_remap_index 283
+#define SetFenceNV_remap_index 284
+#define TestFenceNV_remap_index 285
+#define AreProgramsResidentNV_remap_index 286
+#define BindProgramNV_remap_index 287
+#define DeleteProgramsNV_remap_index 288
+#define ExecuteProgramNV_remap_index 289
+#define GenProgramsNV_remap_index 290
+#define GetProgramParameterdvNV_remap_index 291
+#define GetProgramParameterfvNV_remap_index 292
+#define GetProgramStringNV_remap_index 293
+#define GetProgramivNV_remap_index 294
+#define GetTrackMatrixivNV_remap_index 295
+#define GetVertexAttribPointervNV_remap_index 296
+#define GetVertexAttribdvNV_remap_index 297
+#define GetVertexAttribfvNV_remap_index 298
+#define GetVertexAttribivNV_remap_index 299
+#define IsProgramNV_remap_index 300
+#define LoadProgramNV_remap_index 301
+#define ProgramParameters4dvNV_remap_index 302
+#define ProgramParameters4fvNV_remap_index 303
+#define RequestResidentProgramsNV_remap_index 304
+#define TrackMatrixNV_remap_index 305
+#define VertexAttrib1dNV_remap_index 306
+#define VertexAttrib1dvNV_remap_index 307
+#define VertexAttrib1fNV_remap_index 308
+#define VertexAttrib1fvNV_remap_index 309
+#define VertexAttrib1sNV_remap_index 310
+#define VertexAttrib1svNV_remap_index 311
+#define VertexAttrib2dNV_remap_index 312
+#define VertexAttrib2dvNV_remap_index 313
+#define VertexAttrib2fNV_remap_index 314
+#define VertexAttrib2fvNV_remap_index 315
+#define VertexAttrib2sNV_remap_index 316
+#define VertexAttrib2svNV_remap_index 317
+#define VertexAttrib3dNV_remap_index 318
+#define VertexAttrib3dvNV_remap_index 319
+#define VertexAttrib3fNV_remap_index 320
+#define VertexAttrib3fvNV_remap_index 321
+#define VertexAttrib3sNV_remap_index 322
+#define VertexAttrib3svNV_remap_index 323
+#define VertexAttrib4dNV_remap_index 324
+#define VertexAttrib4dvNV_remap_index 325
+#define VertexAttrib4fNV_remap_index 326
+#define VertexAttrib4fvNV_remap_index 327
+#define VertexAttrib4sNV_remap_index 328
+#define VertexAttrib4svNV_remap_index 329
+#define VertexAttrib4ubNV_remap_index 330
+#define VertexAttrib4ubvNV_remap_index 331
+#define VertexAttribPointerNV_remap_index 332
+#define VertexAttribs1dvNV_remap_index 333
+#define VertexAttribs1fvNV_remap_index 334
+#define VertexAttribs1svNV_remap_index 335
+#define VertexAttribs2dvNV_remap_index 336
+#define VertexAttribs2fvNV_remap_index 337
+#define VertexAttribs2svNV_remap_index 338
+#define VertexAttribs3dvNV_remap_index 339
+#define VertexAttribs3fvNV_remap_index 340
+#define VertexAttribs3svNV_remap_index 341
+#define VertexAttribs4dvNV_remap_index 342
+#define VertexAttribs4fvNV_remap_index 343
+#define VertexAttribs4svNV_remap_index 344
+#define VertexAttribs4ubvNV_remap_index 345
+#define GetTexBumpParameterfvATI_remap_index 346
+#define GetTexBumpParameterivATI_remap_index 347
+#define TexBumpParameterfvATI_remap_index 348
+#define TexBumpParameterivATI_remap_index 349
+#define AlphaFragmentOp1ATI_remap_index 350
+#define AlphaFragmentOp2ATI_remap_index 351
+#define AlphaFragmentOp3ATI_remap_index 352
+#define BeginFragmentShaderATI_remap_index 353
+#define BindFragmentShaderATI_remap_index 354
+#define ColorFragmentOp1ATI_remap_index 355
+#define ColorFragmentOp2ATI_remap_index 356
+#define ColorFragmentOp3ATI_remap_index 357
+#define DeleteFragmentShaderATI_remap_index 358
+#define EndFragmentShaderATI_remap_index 359
+#define GenFragmentShadersATI_remap_index 360
+#define PassTexCoordATI_remap_index 361
+#define SampleMapATI_remap_index 362
+#define SetFragmentShaderConstantATI_remap_index 363
+#define PointParameteriNV_remap_index 364
+#define PointParameterivNV_remap_index 365
+#define ActiveStencilFaceEXT_remap_index 366
+#define BindVertexArrayAPPLE_remap_index 367
+#define DeleteVertexArraysAPPLE_remap_index 368
+#define GenVertexArraysAPPLE_remap_index 369
+#define IsVertexArrayAPPLE_remap_index 370
+#define GetProgramNamedParameterdvNV_remap_index 371
+#define GetProgramNamedParameterfvNV_remap_index 372
+#define ProgramNamedParameter4dNV_remap_index 373
+#define ProgramNamedParameter4dvNV_remap_index 374
+#define ProgramNamedParameter4fNV_remap_index 375
+#define ProgramNamedParameter4fvNV_remap_index 376
+#define PrimitiveRestartIndexNV_remap_index 377
+#define PrimitiveRestartNV_remap_index 378
+#define DepthBoundsEXT_remap_index 379
+#define BlendEquationSeparateEXT_remap_index 380
+#define BindFramebufferEXT_remap_index 381
+#define BindRenderbufferEXT_remap_index 382
+#define CheckFramebufferStatusEXT_remap_index 383
+#define DeleteFramebuffersEXT_remap_index 384
+#define DeleteRenderbuffersEXT_remap_index 385
+#define FramebufferRenderbufferEXT_remap_index 386
+#define FramebufferTexture1DEXT_remap_index 387
+#define FramebufferTexture2DEXT_remap_index 388
+#define FramebufferTexture3DEXT_remap_index 389
+#define GenFramebuffersEXT_remap_index 390
+#define GenRenderbuffersEXT_remap_index 391
+#define GenerateMipmapEXT_remap_index 392
+#define GetFramebufferAttachmentParameterivEXT_remap_index 393
+#define GetRenderbufferParameterivEXT_remap_index 394
+#define IsFramebufferEXT_remap_index 395
+#define IsRenderbufferEXT_remap_index 396
+#define RenderbufferStorageEXT_remap_index 397
+#define BlitFramebufferEXT_remap_index 398
+#define BufferParameteriAPPLE_remap_index 399
+#define FlushMappedBufferRangeAPPLE_remap_index 400
+#define BindFragDataLocationEXT_remap_index 401
+#define GetFragDataLocationEXT_remap_index 402
+#define GetUniformuivEXT_remap_index 403
+#define GetVertexAttribIivEXT_remap_index 404
+#define GetVertexAttribIuivEXT_remap_index 405
+#define Uniform1uiEXT_remap_index 406
+#define Uniform1uivEXT_remap_index 407
+#define Uniform2uiEXT_remap_index 408
+#define Uniform2uivEXT_remap_index 409
+#define Uniform3uiEXT_remap_index 410
+#define Uniform3uivEXT_remap_index 411
+#define Uniform4uiEXT_remap_index 412
+#define Uniform4uivEXT_remap_index 413
+#define VertexAttribI1iEXT_remap_index 414
+#define VertexAttribI1ivEXT_remap_index 415
+#define VertexAttribI1uiEXT_remap_index 416
+#define VertexAttribI1uivEXT_remap_index 417
+#define VertexAttribI2iEXT_remap_index 418
+#define VertexAttribI2ivEXT_remap_index 419
+#define VertexAttribI2uiEXT_remap_index 420
+#define VertexAttribI2uivEXT_remap_index 421
+#define VertexAttribI3iEXT_remap_index 422
+#define VertexAttribI3ivEXT_remap_index 423
+#define VertexAttribI3uiEXT_remap_index 424
+#define VertexAttribI3uivEXT_remap_index 425
+#define VertexAttribI4bvEXT_remap_index 426
+#define VertexAttribI4iEXT_remap_index 427
+#define VertexAttribI4ivEXT_remap_index 428
+#define VertexAttribI4svEXT_remap_index 429
+#define VertexAttribI4ubvEXT_remap_index 430
+#define VertexAttribI4uiEXT_remap_index 431
+#define VertexAttribI4uivEXT_remap_index 432
+#define VertexAttribI4usvEXT_remap_index 433
+#define VertexAttribIPointerEXT_remap_index 434
+#define FramebufferTextureLayerEXT_remap_index 435
+#define ColorMaskIndexedEXT_remap_index 436
+#define DisableIndexedEXT_remap_index 437
+#define EnableIndexedEXT_remap_index 438
+#define GetBooleanIndexedvEXT_remap_index 439
+#define GetIntegerIndexedvEXT_remap_index 440
+#define IsEnabledIndexedEXT_remap_index 441
+#define ClearColorIiEXT_remap_index 442
+#define ClearColorIuiEXT_remap_index 443
+#define GetTexParameterIivEXT_remap_index 444
+#define GetTexParameterIuivEXT_remap_index 445
+#define TexParameterIivEXT_remap_index 446
+#define TexParameterIuivEXT_remap_index 447
+#define BeginConditionalRenderNV_remap_index 448
+#define EndConditionalRenderNV_remap_index 449
+#define BeginTransformFeedbackEXT_remap_index 450
+#define BindBufferBaseEXT_remap_index 451
+#define BindBufferOffsetEXT_remap_index 452
+#define BindBufferRangeEXT_remap_index 453
+#define EndTransformFeedbackEXT_remap_index 454
+#define GetTransformFeedbackVaryingEXT_remap_index 455
+#define TransformFeedbackVaryingsEXT_remap_index 456
+#define ProvokingVertexEXT_remap_index 457
+#define GetTexParameterPointervAPPLE_remap_index 458
+#define TextureRangeAPPLE_remap_index 459
+#define GetObjectParameterivAPPLE_remap_index 460
+#define ObjectPurgeableAPPLE_remap_index 461
+#define ObjectUnpurgeableAPPLE_remap_index 462
+#define ActiveProgramEXT_remap_index 463
+#define CreateShaderProgramEXT_remap_index 464
+#define UseShaderProgramEXT_remap_index 465
+#define StencilFuncSeparateATI_remap_index 466
+#define ProgramEnvParameters4fvEXT_remap_index 467
+#define ProgramLocalParameters4fvEXT_remap_index 468
+#define GetQueryObjecti64vEXT_remap_index 469
+#define GetQueryObjectui64vEXT_remap_index 470
+#define EGLImageTargetRenderbufferStorageOES_remap_index 471
+#define EGLImageTargetTexture2DOES_remap_index 472
+
+#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index]
+#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index]
+#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index]
+#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index]
+#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index]
+#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index]
+#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index]
+#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index]
+#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index]
+#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index]
+#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index]
+#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index]
+#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index]
+#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index]
+#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index]
+#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index]
+#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index]
+#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index]
+#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index]
+#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index]
+#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index]
+#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index]
+#define _gloffset_ClampColor driDispatchRemapTable[ClampColor_remap_index]
+#define _gloffset_ClearBufferfi driDispatchRemapTable[ClearBufferfi_remap_index]
+#define _gloffset_ClearBufferfv driDispatchRemapTable[ClearBufferfv_remap_index]
+#define _gloffset_ClearBufferiv driDispatchRemapTable[ClearBufferiv_remap_index]
+#define _gloffset_ClearBufferuiv driDispatchRemapTable[ClearBufferuiv_remap_index]
+#define _gloffset_GetStringi driDispatchRemapTable[GetStringi_remap_index]
+#define _gloffset_TexBuffer driDispatchRemapTable[TexBuffer_remap_index]
+#define _gloffset_FramebufferTexture driDispatchRemapTable[FramebufferTexture_remap_index]
+#define _gloffset_GetBufferParameteri64v driDispatchRemapTable[GetBufferParameteri64v_remap_index]
+#define _gloffset_GetInteger64i_v driDispatchRemapTable[GetInteger64i_v_remap_index]
+#define _gloffset_VertexAttribDivisor driDispatchRemapTable[VertexAttribDivisor_remap_index]
+#define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index]
+#define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index]
+#define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index]
+#define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index]
+#define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index]
+#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index]
+#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index]
+#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index]
+#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index]
+#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index]
+#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index]
+#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index]
+#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index]
+#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index]
+#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index]
+#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index]
+#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index]
+#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index]
+#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index]
+#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index]
+#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index]
+#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index]
+#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index]
+#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index]
+#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index]
+#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index]
+#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index]
+#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index]
+#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index]
+#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index]
+#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index]
+#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index]
+#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index]
+#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index]
+#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index]
+#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index]
+#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index]
+#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index]
+#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index]
+#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index]
+#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index]
+#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index]
+#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index]
+#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index]
+#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index]
+#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index]
+#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index]
+#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index]
+#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index]
+#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index]
+#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index]
+#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index]
+#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index]
+#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index]
+#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index]
+#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index]
+#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index]
+#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index]
+#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index]
+#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index]
+#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index]
+#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index]
+#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index]
+#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index]
+#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index]
+#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index]
+#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index]
+#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index]
+#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index]
+#define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index]
+#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index]
+#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index]
+#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index]
+#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index]
+#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index]
+#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index]
+#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index]
+#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index]
+#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index]
+#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index]
+#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index]
+#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index]
+#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index]
+#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index]
+#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index]
+#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index]
+#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index]
+#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index]
+#define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index]
+#define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index]
+#define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index]
+#define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index]
+#define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index]
+#define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index]
+#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index]
+#define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index]
+#define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index]
+#define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index]
+#define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index]
+#define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index]
+#define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index]
+#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index]
+#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index]
+#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index]
+#define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index]
+#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index]
+#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index]
+#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index]
+#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index]
+#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index]
+#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index]
+#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index]
+#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index]
+#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index]
+#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index]
+#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index]
+#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index]
+#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index]
+#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index]
+#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index]
+#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index]
+#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index]
+#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index]
+#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index]
+#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index]
+#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index]
+#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index]
+#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index]
+#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index]
+#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index]
+#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index]
+#define _gloffset_DrawArraysInstancedARB driDispatchRemapTable[DrawArraysInstancedARB_remap_index]
+#define _gloffset_DrawElementsInstancedARB driDispatchRemapTable[DrawElementsInstancedARB_remap_index]
+#define _gloffset_RenderbufferStorageMultisample driDispatchRemapTable[RenderbufferStorageMultisample_remap_index]
+#define _gloffset_FramebufferTextureARB driDispatchRemapTable[FramebufferTextureARB_remap_index]
+#define _gloffset_FramebufferTextureFaceARB driDispatchRemapTable[FramebufferTextureFaceARB_remap_index]
+#define _gloffset_ProgramParameteriARB driDispatchRemapTable[ProgramParameteriARB_remap_index]
+#define _gloffset_FlushMappedBufferRange driDispatchRemapTable[FlushMappedBufferRange_remap_index]
+#define _gloffset_MapBufferRange driDispatchRemapTable[MapBufferRange_remap_index]
+#define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index]
+#define _gloffset_GenVertexArrays driDispatchRemapTable[GenVertexArrays_remap_index]
+#define _gloffset_CopyBufferSubData driDispatchRemapTable[CopyBufferSubData_remap_index]
+#define _gloffset_ClientWaitSync driDispatchRemapTable[ClientWaitSync_remap_index]
+#define _gloffset_DeleteSync driDispatchRemapTable[DeleteSync_remap_index]
+#define _gloffset_FenceSync driDispatchRemapTable[FenceSync_remap_index]
+#define _gloffset_GetInteger64v driDispatchRemapTable[GetInteger64v_remap_index]
+#define _gloffset_GetSynciv driDispatchRemapTable[GetSynciv_remap_index]
+#define _gloffset_IsSync driDispatchRemapTable[IsSync_remap_index]
+#define _gloffset_WaitSync driDispatchRemapTable[WaitSync_remap_index]
+#define _gloffset_DrawElementsBaseVertex driDispatchRemapTable[DrawElementsBaseVertex_remap_index]
+#define _gloffset_DrawRangeElementsBaseVertex driDispatchRemapTable[DrawRangeElementsBaseVertex_remap_index]
+#define _gloffset_MultiDrawElementsBaseVertex driDispatchRemapTable[MultiDrawElementsBaseVertex_remap_index]
+#define _gloffset_BindTransformFeedback driDispatchRemapTable[BindTransformFeedback_remap_index]
+#define _gloffset_DeleteTransformFeedbacks driDispatchRemapTable[DeleteTransformFeedbacks_remap_index]
+#define _gloffset_DrawTransformFeedback driDispatchRemapTable[DrawTransformFeedback_remap_index]
+#define _gloffset_GenTransformFeedbacks driDispatchRemapTable[GenTransformFeedbacks_remap_index]
+#define _gloffset_IsTransformFeedback driDispatchRemapTable[IsTransformFeedback_remap_index]
+#define _gloffset_PauseTransformFeedback driDispatchRemapTable[PauseTransformFeedback_remap_index]
+#define _gloffset_ResumeTransformFeedback driDispatchRemapTable[ResumeTransformFeedback_remap_index]
+#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index]
+#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index]
+#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index]
+#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index]
+#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index]
+#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index]
+#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index]
+#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index]
+#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index]
+#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index]
+#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index]
+#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index]
+#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index]
+#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index]
+#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index]
+#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index]
+#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index]
+#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index]
+#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index]
+#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index]
+#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index]
+#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index]
+#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index]
+#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index]
+#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index]
+#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index]
+#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index]
+#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index]
+#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index]
+#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index]
+#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index]
+#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index]
+#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index]
+#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index]
+#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index]
+#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index]
+#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index]
+#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index]
+#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index]
+#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index]
+#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index]
+#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index]
+#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index]
+#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index]
+#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index]
+#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index]
+#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index]
+#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index]
+#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index]
+#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index]
+#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index]
+#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index]
+#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index]
+#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index]
+#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index]
+#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index]
+#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index]
+#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index]
+#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index]
+#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index]
+#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index]
+#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index]
+#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index]
+#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index]
+#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index]
+#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index]
+#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index]
+#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index]
+#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index]
+#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index]
+#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index]
+#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index]
+#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index]
+#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index]
+#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index]
+#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index]
+#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index]
+#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index]
+#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index]
+#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index]
+#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index]
+#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index]
+#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index]
+#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index]
+#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index]
+#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index]
+#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index]
+#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index]
+#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index]
+#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index]
+#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index]
+#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index]
+#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index]
+#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index]
+#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index]
+#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index]
+#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index]
+#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index]
+#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index]
+#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index]
+#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index]
+#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index]
+#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index]
+#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index]
+#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index]
+#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index]
+#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index]
+#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index]
+#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index]
+#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index]
+#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index]
+#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index]
+#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index]
+#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index]
+#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index]
+#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index]
+#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index]
+#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index]
+#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index]
+#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index]
+#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index]
+#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index]
+#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index]
+#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index]
+#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index]
+#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index]
+#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index]
+#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index]
+#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index]
+#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index]
+#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index]
+#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index]
+#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index]
+#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index]
+#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index]
+#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index]
+#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index]
+#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index]
+#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index]
+#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index]
+#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index]
+#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index]
+#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index]
+#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index]
+#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index]
+#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index]
+#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index]
+#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index]
+#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index]
+#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index]
+#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index]
+#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index]
+#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index]
+#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index]
+#define _gloffset_GetTexBumpParameterfvATI driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index]
+#define _gloffset_GetTexBumpParameterivATI driDispatchRemapTable[GetTexBumpParameterivATI_remap_index]
+#define _gloffset_TexBumpParameterfvATI driDispatchRemapTable[TexBumpParameterfvATI_remap_index]
+#define _gloffset_TexBumpParameterivATI driDispatchRemapTable[TexBumpParameterivATI_remap_index]
+#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index]
+#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index]
+#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index]
+#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index]
+#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index]
+#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index]
+#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index]
+#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index]
+#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index]
+#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index]
+#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index]
+#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index]
+#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index]
+#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index]
+#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index]
+#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index]
+#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index]
+#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index]
+#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index]
+#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index]
+#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index]
+#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index]
+#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index]
+#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index]
+#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index]
+#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index]
+#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index]
+#define _gloffset_PrimitiveRestartIndexNV driDispatchRemapTable[PrimitiveRestartIndexNV_remap_index]
+#define _gloffset_PrimitiveRestartNV driDispatchRemapTable[PrimitiveRestartNV_remap_index]
+#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index]
+#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index]
+#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index]
+#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index]
+#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index]
+#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index]
+#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index]
+#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index]
+#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index]
+#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index]
+#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index]
+#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index]
+#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index]
+#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index]
+#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index]
+#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index]
+#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index]
+#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index]
+#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index]
+#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index]
+#define _gloffset_BufferParameteriAPPLE driDispatchRemapTable[BufferParameteriAPPLE_remap_index]
+#define _gloffset_FlushMappedBufferRangeAPPLE driDispatchRemapTable[FlushMappedBufferRangeAPPLE_remap_index]
+#define _gloffset_BindFragDataLocationEXT driDispatchRemapTable[BindFragDataLocationEXT_remap_index]
+#define _gloffset_GetFragDataLocationEXT driDispatchRemapTable[GetFragDataLocationEXT_remap_index]
+#define _gloffset_GetUniformuivEXT driDispatchRemapTable[GetUniformuivEXT_remap_index]
+#define _gloffset_GetVertexAttribIivEXT driDispatchRemapTable[GetVertexAttribIivEXT_remap_index]
+#define _gloffset_GetVertexAttribIuivEXT driDispatchRemapTable[GetVertexAttribIuivEXT_remap_index]
+#define _gloffset_Uniform1uiEXT driDispatchRemapTable[Uniform1uiEXT_remap_index]
+#define _gloffset_Uniform1uivEXT driDispatchRemapTable[Uniform1uivEXT_remap_index]
+#define _gloffset_Uniform2uiEXT driDispatchRemapTable[Uniform2uiEXT_remap_index]
+#define _gloffset_Uniform2uivEXT driDispatchRemapTable[Uniform2uivEXT_remap_index]
+#define _gloffset_Uniform3uiEXT driDispatchRemapTable[Uniform3uiEXT_remap_index]
+#define _gloffset_Uniform3uivEXT driDispatchRemapTable[Uniform3uivEXT_remap_index]
+#define _gloffset_Uniform4uiEXT driDispatchRemapTable[Uniform4uiEXT_remap_index]
+#define _gloffset_Uniform4uivEXT driDispatchRemapTable[Uniform4uivEXT_remap_index]
+#define _gloffset_VertexAttribI1iEXT driDispatchRemapTable[VertexAttribI1iEXT_remap_index]
+#define _gloffset_VertexAttribI1ivEXT driDispatchRemapTable[VertexAttribI1ivEXT_remap_index]
+#define _gloffset_VertexAttribI1uiEXT driDispatchRemapTable[VertexAttribI1uiEXT_remap_index]
+#define _gloffset_VertexAttribI1uivEXT driDispatchRemapTable[VertexAttribI1uivEXT_remap_index]
+#define _gloffset_VertexAttribI2iEXT driDispatchRemapTable[VertexAttribI2iEXT_remap_index]
+#define _gloffset_VertexAttribI2ivEXT driDispatchRemapTable[VertexAttribI2ivEXT_remap_index]
+#define _gloffset_VertexAttribI2uiEXT driDispatchRemapTable[VertexAttribI2uiEXT_remap_index]
+#define _gloffset_VertexAttribI2uivEXT driDispatchRemapTable[VertexAttribI2uivEXT_remap_index]
+#define _gloffset_VertexAttribI3iEXT driDispatchRemapTable[VertexAttribI3iEXT_remap_index]
+#define _gloffset_VertexAttribI3ivEXT driDispatchRemapTable[VertexAttribI3ivEXT_remap_index]
+#define _gloffset_VertexAttribI3uiEXT driDispatchRemapTable[VertexAttribI3uiEXT_remap_index]
+#define _gloffset_VertexAttribI3uivEXT driDispatchRemapTable[VertexAttribI3uivEXT_remap_index]
+#define _gloffset_VertexAttribI4bvEXT driDispatchRemapTable[VertexAttribI4bvEXT_remap_index]
+#define _gloffset_VertexAttribI4iEXT driDispatchRemapTable[VertexAttribI4iEXT_remap_index]
+#define _gloffset_VertexAttribI4ivEXT driDispatchRemapTable[VertexAttribI4ivEXT_remap_index]
+#define _gloffset_VertexAttribI4svEXT driDispatchRemapTable[VertexAttribI4svEXT_remap_index]
+#define _gloffset_VertexAttribI4ubvEXT driDispatchRemapTable[VertexAttribI4ubvEXT_remap_index]
+#define _gloffset_VertexAttribI4uiEXT driDispatchRemapTable[VertexAttribI4uiEXT_remap_index]
+#define _gloffset_VertexAttribI4uivEXT driDispatchRemapTable[VertexAttribI4uivEXT_remap_index]
+#define _gloffset_VertexAttribI4usvEXT driDispatchRemapTable[VertexAttribI4usvEXT_remap_index]
+#define _gloffset_VertexAttribIPointerEXT driDispatchRemapTable[VertexAttribIPointerEXT_remap_index]
+#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index]
+#define _gloffset_ColorMaskIndexedEXT driDispatchRemapTable[ColorMaskIndexedEXT_remap_index]
+#define _gloffset_DisableIndexedEXT driDispatchRemapTable[DisableIndexedEXT_remap_index]
+#define _gloffset_EnableIndexedEXT driDispatchRemapTable[EnableIndexedEXT_remap_index]
+#define _gloffset_GetBooleanIndexedvEXT driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index]
+#define _gloffset_GetIntegerIndexedvEXT driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index]
+#define _gloffset_IsEnabledIndexedEXT driDispatchRemapTable[IsEnabledIndexedEXT_remap_index]
+#define _gloffset_ClearColorIiEXT driDispatchRemapTable[ClearColorIiEXT_remap_index]
+#define _gloffset_ClearColorIuiEXT driDispatchRemapTable[ClearColorIuiEXT_remap_index]
+#define _gloffset_GetTexParameterIivEXT driDispatchRemapTable[GetTexParameterIivEXT_remap_index]
+#define _gloffset_GetTexParameterIuivEXT driDispatchRemapTable[GetTexParameterIuivEXT_remap_index]
+#define _gloffset_TexParameterIivEXT driDispatchRemapTable[TexParameterIivEXT_remap_index]
+#define _gloffset_TexParameterIuivEXT driDispatchRemapTable[TexParameterIuivEXT_remap_index]
+#define _gloffset_BeginConditionalRenderNV driDispatchRemapTable[BeginConditionalRenderNV_remap_index]
+#define _gloffset_EndConditionalRenderNV driDispatchRemapTable[EndConditionalRenderNV_remap_index]
+#define _gloffset_BeginTransformFeedbackEXT driDispatchRemapTable[BeginTransformFeedbackEXT_remap_index]
+#define _gloffset_BindBufferBaseEXT driDispatchRemapTable[BindBufferBaseEXT_remap_index]
+#define _gloffset_BindBufferOffsetEXT driDispatchRemapTable[BindBufferOffsetEXT_remap_index]
+#define _gloffset_BindBufferRangeEXT driDispatchRemapTable[BindBufferRangeEXT_remap_index]
+#define _gloffset_EndTransformFeedbackEXT driDispatchRemapTable[EndTransformFeedbackEXT_remap_index]
+#define _gloffset_GetTransformFeedbackVaryingEXT driDispatchRemapTable[GetTransformFeedbackVaryingEXT_remap_index]
+#define _gloffset_TransformFeedbackVaryingsEXT driDispatchRemapTable[TransformFeedbackVaryingsEXT_remap_index]
+#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_ActiveProgramEXT driDispatchRemapTable[ActiveProgramEXT_remap_index]
+#define _gloffset_CreateShaderProgramEXT driDispatchRemapTable[CreateShaderProgramEXT_remap_index]
+#define _gloffset_UseShaderProgramEXT driDispatchRemapTable[UseShaderProgramEXT_remap_index]
+#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index]
+#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index]
+#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index]
+#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index]
+#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index]
+#define _gloffset_EGLImageTargetRenderbufferStorageOES driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index]
+#define _gloffset_EGLImageTargetTexture2DOES driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index]
+
+#endif /* _GLAPI_USE_REMAP_TABLE */
+
+#define CALL_NewList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_NewList, parameters)
+#define GET_NewList(disp) GET_by_offset(disp, _gloffset_NewList)
+#define SET_NewList(disp, fn) SET_by_offset(disp, _gloffset_NewList, fn)
+#define CALL_EndList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndList, parameters)
+#define GET_EndList(disp) GET_by_offset(disp, _gloffset_EndList)
+#define SET_EndList(disp, fn) SET_by_offset(disp, _gloffset_EndList, fn)
+#define CALL_CallList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_CallList, parameters)
+#define GET_CallList(disp) GET_by_offset(disp, _gloffset_CallList)
+#define SET_CallList(disp, fn) SET_by_offset(disp, _gloffset_CallList, fn)
+#define CALL_CallLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, const GLvoid *)), _gloffset_CallLists, parameters)
+#define GET_CallLists(disp) GET_by_offset(disp, _gloffset_CallLists)
+#define SET_CallLists(disp, fn) SET_by_offset(disp, _gloffset_CallLists, fn)
+#define CALL_DeleteLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei)), _gloffset_DeleteLists, parameters)
+#define GET_DeleteLists(disp) GET_by_offset(disp, _gloffset_DeleteLists)
+#define SET_DeleteLists(disp, fn) SET_by_offset(disp, _gloffset_DeleteLists, fn)
+#define CALL_GenLists(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLsizei)), _gloffset_GenLists, parameters)
+#define GET_GenLists(disp) GET_by_offset(disp, _gloffset_GenLists)
+#define SET_GenLists(disp, fn) SET_by_offset(disp, _gloffset_GenLists, fn)
+#define CALL_ListBase(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ListBase, parameters)
+#define GET_ListBase(disp) GET_by_offset(disp, _gloffset_ListBase)
+#define SET_ListBase(disp, fn) SET_by_offset(disp, _gloffset_ListBase, fn)
+#define CALL_Begin(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Begin, parameters)
+#define GET_Begin(disp) GET_by_offset(disp, _gloffset_Begin)
+#define SET_Begin(disp, fn) SET_by_offset(disp, _gloffset_Begin, fn)
+#define CALL_Bitmap(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *)), _gloffset_Bitmap, parameters)
+#define GET_Bitmap(disp) GET_by_offset(disp, _gloffset_Bitmap)
+#define SET_Bitmap(disp, fn) SET_by_offset(disp, _gloffset_Bitmap, fn)
+#define CALL_Color3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Color3b, parameters)
+#define GET_Color3b(disp) GET_by_offset(disp, _gloffset_Color3b)
+#define SET_Color3b(disp, fn) SET_by_offset(disp, _gloffset_Color3b, fn)
+#define CALL_Color3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color3bv, parameters)
+#define GET_Color3bv(disp) GET_by_offset(disp, _gloffset_Color3bv)
+#define SET_Color3bv(disp, fn) SET_by_offset(disp, _gloffset_Color3bv, fn)
+#define CALL_Color3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Color3d, parameters)
+#define GET_Color3d(disp) GET_by_offset(disp, _gloffset_Color3d)
+#define SET_Color3d(disp, fn) SET_by_offset(disp, _gloffset_Color3d, fn)
+#define CALL_Color3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color3dv, parameters)
+#define GET_Color3dv(disp) GET_by_offset(disp, _gloffset_Color3dv)
+#define SET_Color3dv(disp, fn) SET_by_offset(disp, _gloffset_Color3dv, fn)
+#define CALL_Color3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Color3f, parameters)
+#define GET_Color3f(disp) GET_by_offset(disp, _gloffset_Color3f)
+#define SET_Color3f(disp, fn) SET_by_offset(disp, _gloffset_Color3f, fn)
+#define CALL_Color3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color3fv, parameters)
+#define GET_Color3fv(disp) GET_by_offset(disp, _gloffset_Color3fv)
+#define SET_Color3fv(disp, fn) SET_by_offset(disp, _gloffset_Color3fv, fn)
+#define CALL_Color3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Color3i, parameters)
+#define GET_Color3i(disp) GET_by_offset(disp, _gloffset_Color3i)
+#define SET_Color3i(disp, fn) SET_by_offset(disp, _gloffset_Color3i, fn)
+#define CALL_Color3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color3iv, parameters)
+#define GET_Color3iv(disp) GET_by_offset(disp, _gloffset_Color3iv)
+#define SET_Color3iv(disp, fn) SET_by_offset(disp, _gloffset_Color3iv, fn)
+#define CALL_Color3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Color3s, parameters)
+#define GET_Color3s(disp) GET_by_offset(disp, _gloffset_Color3s)
+#define SET_Color3s(disp, fn) SET_by_offset(disp, _gloffset_Color3s, fn)
+#define CALL_Color3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color3sv, parameters)
+#define GET_Color3sv(disp) GET_by_offset(disp, _gloffset_Color3sv)
+#define SET_Color3sv(disp, fn) SET_by_offset(disp, _gloffset_Color3sv, fn)
+#define CALL_Color3ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_Color3ub, parameters)
+#define GET_Color3ub(disp) GET_by_offset(disp, _gloffset_Color3ub)
+#define SET_Color3ub(disp, fn) SET_by_offset(disp, _gloffset_Color3ub, fn)
+#define CALL_Color3ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color3ubv, parameters)
+#define GET_Color3ubv(disp) GET_by_offset(disp, _gloffset_Color3ubv)
+#define SET_Color3ubv(disp, fn) SET_by_offset(disp, _gloffset_Color3ubv, fn)
+#define CALL_Color3ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_Color3ui, parameters)
+#define GET_Color3ui(disp) GET_by_offset(disp, _gloffset_Color3ui)
+#define SET_Color3ui(disp, fn) SET_by_offset(disp, _gloffset_Color3ui, fn)
+#define CALL_Color3uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color3uiv, parameters)
+#define GET_Color3uiv(disp) GET_by_offset(disp, _gloffset_Color3uiv)
+#define SET_Color3uiv(disp, fn) SET_by_offset(disp, _gloffset_Color3uiv, fn)
+#define CALL_Color3us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_Color3us, parameters)
+#define GET_Color3us(disp) GET_by_offset(disp, _gloffset_Color3us)
+#define SET_Color3us(disp, fn) SET_by_offset(disp, _gloffset_Color3us, fn)
+#define CALL_Color3usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color3usv, parameters)
+#define GET_Color3usv(disp) GET_by_offset(disp, _gloffset_Color3usv)
+#define SET_Color3usv(disp, fn) SET_by_offset(disp, _gloffset_Color3usv, fn)
+#define CALL_Color4b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte, GLbyte)), _gloffset_Color4b, parameters)
+#define GET_Color4b(disp) GET_by_offset(disp, _gloffset_Color4b)
+#define SET_Color4b(disp, fn) SET_by_offset(disp, _gloffset_Color4b, fn)
+#define CALL_Color4bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color4bv, parameters)
+#define GET_Color4bv(disp) GET_by_offset(disp, _gloffset_Color4bv)
+#define SET_Color4bv(disp, fn) SET_by_offset(disp, _gloffset_Color4bv, fn)
+#define CALL_Color4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Color4d, parameters)
+#define GET_Color4d(disp) GET_by_offset(disp, _gloffset_Color4d)
+#define SET_Color4d(disp, fn) SET_by_offset(disp, _gloffset_Color4d, fn)
+#define CALL_Color4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color4dv, parameters)
+#define GET_Color4dv(disp) GET_by_offset(disp, _gloffset_Color4dv)
+#define SET_Color4dv(disp, fn) SET_by_offset(disp, _gloffset_Color4dv, fn)
+#define CALL_Color4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Color4f, parameters)
+#define GET_Color4f(disp) GET_by_offset(disp, _gloffset_Color4f)
+#define SET_Color4f(disp, fn) SET_by_offset(disp, _gloffset_Color4f, fn)
+#define CALL_Color4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color4fv, parameters)
+#define GET_Color4fv(disp) GET_by_offset(disp, _gloffset_Color4fv)
+#define SET_Color4fv(disp, fn) SET_by_offset(disp, _gloffset_Color4fv, fn)
+#define CALL_Color4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Color4i, parameters)
+#define GET_Color4i(disp) GET_by_offset(disp, _gloffset_Color4i)
+#define SET_Color4i(disp, fn) SET_by_offset(disp, _gloffset_Color4i, fn)
+#define CALL_Color4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color4iv, parameters)
+#define GET_Color4iv(disp) GET_by_offset(disp, _gloffset_Color4iv)
+#define SET_Color4iv(disp, fn) SET_by_offset(disp, _gloffset_Color4iv, fn)
+#define CALL_Color4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Color4s, parameters)
+#define GET_Color4s(disp) GET_by_offset(disp, _gloffset_Color4s)
+#define SET_Color4s(disp, fn) SET_by_offset(disp, _gloffset_Color4s, fn)
+#define CALL_Color4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color4sv, parameters)
+#define GET_Color4sv(disp) GET_by_offset(disp, _gloffset_Color4sv)
+#define SET_Color4sv(disp, fn) SET_by_offset(disp, _gloffset_Color4sv, fn)
+#define CALL_Color4ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_Color4ub, parameters)
+#define GET_Color4ub(disp) GET_by_offset(disp, _gloffset_Color4ub)
+#define SET_Color4ub(disp, fn) SET_by_offset(disp, _gloffset_Color4ub, fn)
+#define CALL_Color4ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color4ubv, parameters)
+#define GET_Color4ubv(disp) GET_by_offset(disp, _gloffset_Color4ubv)
+#define SET_Color4ubv(disp, fn) SET_by_offset(disp, _gloffset_Color4ubv, fn)
+#define CALL_Color4ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_Color4ui, parameters)
+#define GET_Color4ui(disp) GET_by_offset(disp, _gloffset_Color4ui)
+#define SET_Color4ui(disp, fn) SET_by_offset(disp, _gloffset_Color4ui, fn)
+#define CALL_Color4uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color4uiv, parameters)
+#define GET_Color4uiv(disp) GET_by_offset(disp, _gloffset_Color4uiv)
+#define SET_Color4uiv(disp, fn) SET_by_offset(disp, _gloffset_Color4uiv, fn)
+#define CALL_Color4us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort, GLushort)), _gloffset_Color4us, parameters)
+#define GET_Color4us(disp) GET_by_offset(disp, _gloffset_Color4us)
+#define SET_Color4us(disp, fn) SET_by_offset(disp, _gloffset_Color4us, fn)
+#define CALL_Color4usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color4usv, parameters)
+#define GET_Color4usv(disp) GET_by_offset(disp, _gloffset_Color4usv)
+#define SET_Color4usv(disp, fn) SET_by_offset(disp, _gloffset_Color4usv, fn)
+#define CALL_EdgeFlag(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_EdgeFlag, parameters)
+#define GET_EdgeFlag(disp) GET_by_offset(disp, _gloffset_EdgeFlag)
+#define SET_EdgeFlag(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlag, fn)
+#define CALL_EdgeFlagv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLboolean *)), _gloffset_EdgeFlagv, parameters)
+#define GET_EdgeFlagv(disp) GET_by_offset(disp, _gloffset_EdgeFlagv)
+#define SET_EdgeFlagv(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagv, fn)
+#define CALL_End(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_End, parameters)
+#define GET_End(disp) GET_by_offset(disp, _gloffset_End)
+#define SET_End(disp, fn) SET_by_offset(disp, _gloffset_End, fn)
+#define CALL_Indexd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_Indexd, parameters)
+#define GET_Indexd(disp) GET_by_offset(disp, _gloffset_Indexd)
+#define SET_Indexd(disp, fn) SET_by_offset(disp, _gloffset_Indexd, fn)
+#define CALL_Indexdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Indexdv, parameters)
+#define GET_Indexdv(disp) GET_by_offset(disp, _gloffset_Indexdv)
+#define SET_Indexdv(disp, fn) SET_by_offset(disp, _gloffset_Indexdv, fn)
+#define CALL_Indexf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_Indexf, parameters)
+#define GET_Indexf(disp) GET_by_offset(disp, _gloffset_Indexf)
+#define SET_Indexf(disp, fn) SET_by_offset(disp, _gloffset_Indexf, fn)
+#define CALL_Indexfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Indexfv, parameters)
+#define GET_Indexfv(disp) GET_by_offset(disp, _gloffset_Indexfv)
+#define SET_Indexfv(disp, fn) SET_by_offset(disp, _gloffset_Indexfv, fn)
+#define CALL_Indexi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_Indexi, parameters)
+#define GET_Indexi(disp) GET_by_offset(disp, _gloffset_Indexi)
+#define SET_Indexi(disp, fn) SET_by_offset(disp, _gloffset_Indexi, fn)
+#define CALL_Indexiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Indexiv, parameters)
+#define GET_Indexiv(disp) GET_by_offset(disp, _gloffset_Indexiv)
+#define SET_Indexiv(disp, fn) SET_by_offset(disp, _gloffset_Indexiv, fn)
+#define CALL_Indexs(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_Indexs, parameters)
+#define GET_Indexs(disp) GET_by_offset(disp, _gloffset_Indexs)
+#define SET_Indexs(disp, fn) SET_by_offset(disp, _gloffset_Indexs, fn)
+#define CALL_Indexsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Indexsv, parameters)
+#define GET_Indexsv(disp) GET_by_offset(disp, _gloffset_Indexsv)
+#define SET_Indexsv(disp, fn) SET_by_offset(disp, _gloffset_Indexsv, fn)
+#define CALL_Normal3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Normal3b, parameters)
+#define GET_Normal3b(disp) GET_by_offset(disp, _gloffset_Normal3b)
+#define SET_Normal3b(disp, fn) SET_by_offset(disp, _gloffset_Normal3b, fn)
+#define CALL_Normal3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Normal3bv, parameters)
+#define GET_Normal3bv(disp) GET_by_offset(disp, _gloffset_Normal3bv)
+#define SET_Normal3bv(disp, fn) SET_by_offset(disp, _gloffset_Normal3bv, fn)
+#define CALL_Normal3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Normal3d, parameters)
+#define GET_Normal3d(disp) GET_by_offset(disp, _gloffset_Normal3d)
+#define SET_Normal3d(disp, fn) SET_by_offset(disp, _gloffset_Normal3d, fn)
+#define CALL_Normal3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Normal3dv, parameters)
+#define GET_Normal3dv(disp) GET_by_offset(disp, _gloffset_Normal3dv)
+#define SET_Normal3dv(disp, fn) SET_by_offset(disp, _gloffset_Normal3dv, fn)
+#define CALL_Normal3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Normal3f, parameters)
+#define GET_Normal3f(disp) GET_by_offset(disp, _gloffset_Normal3f)
+#define SET_Normal3f(disp, fn) SET_by_offset(disp, _gloffset_Normal3f, fn)
+#define CALL_Normal3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Normal3fv, parameters)
+#define GET_Normal3fv(disp) GET_by_offset(disp, _gloffset_Normal3fv)
+#define SET_Normal3fv(disp, fn) SET_by_offset(disp, _gloffset_Normal3fv, fn)
+#define CALL_Normal3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Normal3i, parameters)
+#define GET_Normal3i(disp) GET_by_offset(disp, _gloffset_Normal3i)
+#define SET_Normal3i(disp, fn) SET_by_offset(disp, _gloffset_Normal3i, fn)
+#define CALL_Normal3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Normal3iv, parameters)
+#define GET_Normal3iv(disp) GET_by_offset(disp, _gloffset_Normal3iv)
+#define SET_Normal3iv(disp, fn) SET_by_offset(disp, _gloffset_Normal3iv, fn)
+#define CALL_Normal3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Normal3s, parameters)
+#define GET_Normal3s(disp) GET_by_offset(disp, _gloffset_Normal3s)
+#define SET_Normal3s(disp, fn) SET_by_offset(disp, _gloffset_Normal3s, fn)
+#define CALL_Normal3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Normal3sv, parameters)
+#define GET_Normal3sv(disp) GET_by_offset(disp, _gloffset_Normal3sv)
+#define SET_Normal3sv(disp, fn) SET_by_offset(disp, _gloffset_Normal3sv, fn)
+#define CALL_RasterPos2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_RasterPos2d, parameters)
+#define GET_RasterPos2d(disp) GET_by_offset(disp, _gloffset_RasterPos2d)
+#define SET_RasterPos2d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2d, fn)
+#define CALL_RasterPos2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos2dv, parameters)
+#define GET_RasterPos2dv(disp) GET_by_offset(disp, _gloffset_RasterPos2dv)
+#define SET_RasterPos2dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2dv, fn)
+#define CALL_RasterPos2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_RasterPos2f, parameters)
+#define GET_RasterPos2f(disp) GET_by_offset(disp, _gloffset_RasterPos2f)
+#define SET_RasterPos2f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2f, fn)
+#define CALL_RasterPos2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos2fv, parameters)
+#define GET_RasterPos2fv(disp) GET_by_offset(disp, _gloffset_RasterPos2fv)
+#define SET_RasterPos2fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2fv, fn)
+#define CALL_RasterPos2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_RasterPos2i, parameters)
+#define GET_RasterPos2i(disp) GET_by_offset(disp, _gloffset_RasterPos2i)
+#define SET_RasterPos2i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2i, fn)
+#define CALL_RasterPos2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos2iv, parameters)
+#define GET_RasterPos2iv(disp) GET_by_offset(disp, _gloffset_RasterPos2iv)
+#define SET_RasterPos2iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2iv, fn)
+#define CALL_RasterPos2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_RasterPos2s, parameters)
+#define GET_RasterPos2s(disp) GET_by_offset(disp, _gloffset_RasterPos2s)
+#define SET_RasterPos2s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2s, fn)
+#define CALL_RasterPos2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos2sv, parameters)
+#define GET_RasterPos2sv(disp) GET_by_offset(disp, _gloffset_RasterPos2sv)
+#define SET_RasterPos2sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2sv, fn)
+#define CALL_RasterPos3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos3d, parameters)
+#define GET_RasterPos3d(disp) GET_by_offset(disp, _gloffset_RasterPos3d)
+#define SET_RasterPos3d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3d, fn)
+#define CALL_RasterPos3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos3dv, parameters)
+#define GET_RasterPos3dv(disp) GET_by_offset(disp, _gloffset_RasterPos3dv)
+#define SET_RasterPos3dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3dv, fn)
+#define CALL_RasterPos3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos3f, parameters)
+#define GET_RasterPos3f(disp) GET_by_offset(disp, _gloffset_RasterPos3f)
+#define SET_RasterPos3f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3f, fn)
+#define CALL_RasterPos3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos3fv, parameters)
+#define GET_RasterPos3fv(disp) GET_by_offset(disp, _gloffset_RasterPos3fv)
+#define SET_RasterPos3fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3fv, fn)
+#define CALL_RasterPos3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_RasterPos3i, parameters)
+#define GET_RasterPos3i(disp) GET_by_offset(disp, _gloffset_RasterPos3i)
+#define SET_RasterPos3i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3i, fn)
+#define CALL_RasterPos3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos3iv, parameters)
+#define GET_RasterPos3iv(disp) GET_by_offset(disp, _gloffset_RasterPos3iv)
+#define SET_RasterPos3iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3iv, fn)
+#define CALL_RasterPos3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_RasterPos3s, parameters)
+#define GET_RasterPos3s(disp) GET_by_offset(disp, _gloffset_RasterPos3s)
+#define SET_RasterPos3s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3s, fn)
+#define CALL_RasterPos3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos3sv, parameters)
+#define GET_RasterPos3sv(disp) GET_by_offset(disp, _gloffset_RasterPos3sv)
+#define SET_RasterPos3sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3sv, fn)
+#define CALL_RasterPos4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos4d, parameters)
+#define GET_RasterPos4d(disp) GET_by_offset(disp, _gloffset_RasterPos4d)
+#define SET_RasterPos4d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4d, fn)
+#define CALL_RasterPos4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos4dv, parameters)
+#define GET_RasterPos4dv(disp) GET_by_offset(disp, _gloffset_RasterPos4dv)
+#define SET_RasterPos4dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4dv, fn)
+#define CALL_RasterPos4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos4f, parameters)
+#define GET_RasterPos4f(disp) GET_by_offset(disp, _gloffset_RasterPos4f)
+#define SET_RasterPos4f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4f, fn)
+#define CALL_RasterPos4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos4fv, parameters)
+#define GET_RasterPos4fv(disp) GET_by_offset(disp, _gloffset_RasterPos4fv)
+#define SET_RasterPos4fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4fv, fn)
+#define CALL_RasterPos4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_RasterPos4i, parameters)
+#define GET_RasterPos4i(disp) GET_by_offset(disp, _gloffset_RasterPos4i)
+#define SET_RasterPos4i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4i, fn)
+#define CALL_RasterPos4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos4iv, parameters)
+#define GET_RasterPos4iv(disp) GET_by_offset(disp, _gloffset_RasterPos4iv)
+#define SET_RasterPos4iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4iv, fn)
+#define CALL_RasterPos4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_RasterPos4s, parameters)
+#define GET_RasterPos4s(disp) GET_by_offset(disp, _gloffset_RasterPos4s)
+#define SET_RasterPos4s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4s, fn)
+#define CALL_RasterPos4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos4sv, parameters)
+#define GET_RasterPos4sv(disp) GET_by_offset(disp, _gloffset_RasterPos4sv)
+#define SET_RasterPos4sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4sv, fn)
+#define CALL_Rectd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rectd, parameters)
+#define GET_Rectd(disp) GET_by_offset(disp, _gloffset_Rectd)
+#define SET_Rectd(disp, fn) SET_by_offset(disp, _gloffset_Rectd, fn)
+#define CALL_Rectdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *, const GLdouble *)), _gloffset_Rectdv, parameters)
+#define GET_Rectdv(disp) GET_by_offset(disp, _gloffset_Rectdv)
+#define SET_Rectdv(disp, fn) SET_by_offset(disp, _gloffset_Rectdv, fn)
+#define CALL_Rectf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rectf, parameters)
+#define GET_Rectf(disp) GET_by_offset(disp, _gloffset_Rectf)
+#define SET_Rectf(disp, fn) SET_by_offset(disp, _gloffset_Rectf, fn)
+#define CALL_Rectfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *, const GLfloat *)), _gloffset_Rectfv, parameters)
+#define GET_Rectfv(disp) GET_by_offset(disp, _gloffset_Rectfv)
+#define SET_Rectfv(disp, fn) SET_by_offset(disp, _gloffset_Rectfv, fn)
+#define CALL_Recti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Recti, parameters)
+#define GET_Recti(disp) GET_by_offset(disp, _gloffset_Recti)
+#define SET_Recti(disp, fn) SET_by_offset(disp, _gloffset_Recti, fn)
+#define CALL_Rectiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *, const GLint *)), _gloffset_Rectiv, parameters)
+#define GET_Rectiv(disp) GET_by_offset(disp, _gloffset_Rectiv)
+#define SET_Rectiv(disp, fn) SET_by_offset(disp, _gloffset_Rectiv, fn)
+#define CALL_Rects(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Rects, parameters)
+#define GET_Rects(disp) GET_by_offset(disp, _gloffset_Rects)
+#define SET_Rects(disp, fn) SET_by_offset(disp, _gloffset_Rects, fn)
+#define CALL_Rectsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *, const GLshort *)), _gloffset_Rectsv, parameters)
+#define GET_Rectsv(disp) GET_by_offset(disp, _gloffset_Rectsv)
+#define SET_Rectsv(disp, fn) SET_by_offset(disp, _gloffset_Rectsv, fn)
+#define CALL_TexCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_TexCoord1d, parameters)
+#define GET_TexCoord1d(disp) GET_by_offset(disp, _gloffset_TexCoord1d)
+#define SET_TexCoord1d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1d, fn)
+#define CALL_TexCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord1dv, parameters)
+#define GET_TexCoord1dv(disp) GET_by_offset(disp, _gloffset_TexCoord1dv)
+#define SET_TexCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1dv, fn)
+#define CALL_TexCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_TexCoord1f, parameters)
+#define GET_TexCoord1f(disp) GET_by_offset(disp, _gloffset_TexCoord1f)
+#define SET_TexCoord1f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1f, fn)
+#define CALL_TexCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord1fv, parameters)
+#define GET_TexCoord1fv(disp) GET_by_offset(disp, _gloffset_TexCoord1fv)
+#define SET_TexCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1fv, fn)
+#define CALL_TexCoord1i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_TexCoord1i, parameters)
+#define GET_TexCoord1i(disp) GET_by_offset(disp, _gloffset_TexCoord1i)
+#define SET_TexCoord1i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1i, fn)
+#define CALL_TexCoord1iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord1iv, parameters)
+#define GET_TexCoord1iv(disp) GET_by_offset(disp, _gloffset_TexCoord1iv)
+#define SET_TexCoord1iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1iv, fn)
+#define CALL_TexCoord1s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_TexCoord1s, parameters)
+#define GET_TexCoord1s(disp) GET_by_offset(disp, _gloffset_TexCoord1s)
+#define SET_TexCoord1s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1s, fn)
+#define CALL_TexCoord1sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord1sv, parameters)
+#define GET_TexCoord1sv(disp) GET_by_offset(disp, _gloffset_TexCoord1sv)
+#define SET_TexCoord1sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1sv, fn)
+#define CALL_TexCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_TexCoord2d, parameters)
+#define GET_TexCoord2d(disp) GET_by_offset(disp, _gloffset_TexCoord2d)
+#define SET_TexCoord2d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2d, fn)
+#define CALL_TexCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord2dv, parameters)
+#define GET_TexCoord2dv(disp) GET_by_offset(disp, _gloffset_TexCoord2dv)
+#define SET_TexCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2dv, fn)
+#define CALL_TexCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_TexCoord2f, parameters)
+#define GET_TexCoord2f(disp) GET_by_offset(disp, _gloffset_TexCoord2f)
+#define SET_TexCoord2f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2f, fn)
+#define CALL_TexCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord2fv, parameters)
+#define GET_TexCoord2fv(disp) GET_by_offset(disp, _gloffset_TexCoord2fv)
+#define SET_TexCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2fv, fn)
+#define CALL_TexCoord2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_TexCoord2i, parameters)
+#define GET_TexCoord2i(disp) GET_by_offset(disp, _gloffset_TexCoord2i)
+#define SET_TexCoord2i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2i, fn)
+#define CALL_TexCoord2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord2iv, parameters)
+#define GET_TexCoord2iv(disp) GET_by_offset(disp, _gloffset_TexCoord2iv)
+#define SET_TexCoord2iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2iv, fn)
+#define CALL_TexCoord2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_TexCoord2s, parameters)
+#define GET_TexCoord2s(disp) GET_by_offset(disp, _gloffset_TexCoord2s)
+#define SET_TexCoord2s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2s, fn)
+#define CALL_TexCoord2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord2sv, parameters)
+#define GET_TexCoord2sv(disp) GET_by_offset(disp, _gloffset_TexCoord2sv)
+#define SET_TexCoord2sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2sv, fn)
+#define CALL_TexCoord3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord3d, parameters)
+#define GET_TexCoord3d(disp) GET_by_offset(disp, _gloffset_TexCoord3d)
+#define SET_TexCoord3d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3d, fn)
+#define CALL_TexCoord3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord3dv, parameters)
+#define GET_TexCoord3dv(disp) GET_by_offset(disp, _gloffset_TexCoord3dv)
+#define SET_TexCoord3dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3dv, fn)
+#define CALL_TexCoord3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord3f, parameters)
+#define GET_TexCoord3f(disp) GET_by_offset(disp, _gloffset_TexCoord3f)
+#define SET_TexCoord3f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3f, fn)
+#define CALL_TexCoord3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord3fv, parameters)
+#define GET_TexCoord3fv(disp) GET_by_offset(disp, _gloffset_TexCoord3fv)
+#define SET_TexCoord3fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3fv, fn)
+#define CALL_TexCoord3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_TexCoord3i, parameters)
+#define GET_TexCoord3i(disp) GET_by_offset(disp, _gloffset_TexCoord3i)
+#define SET_TexCoord3i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3i, fn)
+#define CALL_TexCoord3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord3iv, parameters)
+#define GET_TexCoord3iv(disp) GET_by_offset(disp, _gloffset_TexCoord3iv)
+#define SET_TexCoord3iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3iv, fn)
+#define CALL_TexCoord3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_TexCoord3s, parameters)
+#define GET_TexCoord3s(disp) GET_by_offset(disp, _gloffset_TexCoord3s)
+#define SET_TexCoord3s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3s, fn)
+#define CALL_TexCoord3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord3sv, parameters)
+#define GET_TexCoord3sv(disp) GET_by_offset(disp, _gloffset_TexCoord3sv)
+#define SET_TexCoord3sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3sv, fn)
+#define CALL_TexCoord4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord4d, parameters)
+#define GET_TexCoord4d(disp) GET_by_offset(disp, _gloffset_TexCoord4d)
+#define SET_TexCoord4d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4d, fn)
+#define CALL_TexCoord4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord4dv, parameters)
+#define GET_TexCoord4dv(disp) GET_by_offset(disp, _gloffset_TexCoord4dv)
+#define SET_TexCoord4dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4dv, fn)
+#define CALL_TexCoord4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord4f, parameters)
+#define GET_TexCoord4f(disp) GET_by_offset(disp, _gloffset_TexCoord4f)
+#define SET_TexCoord4f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4f, fn)
+#define CALL_TexCoord4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord4fv, parameters)
+#define GET_TexCoord4fv(disp) GET_by_offset(disp, _gloffset_TexCoord4fv)
+#define SET_TexCoord4fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4fv, fn)
+#define CALL_TexCoord4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_TexCoord4i, parameters)
+#define GET_TexCoord4i(disp) GET_by_offset(disp, _gloffset_TexCoord4i)
+#define SET_TexCoord4i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4i, fn)
+#define CALL_TexCoord4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord4iv, parameters)
+#define GET_TexCoord4iv(disp) GET_by_offset(disp, _gloffset_TexCoord4iv)
+#define SET_TexCoord4iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4iv, fn)
+#define CALL_TexCoord4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_TexCoord4s, parameters)
+#define GET_TexCoord4s(disp) GET_by_offset(disp, _gloffset_TexCoord4s)
+#define SET_TexCoord4s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4s, fn)
+#define CALL_TexCoord4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord4sv, parameters)
+#define GET_TexCoord4sv(disp) GET_by_offset(disp, _gloffset_TexCoord4sv)
+#define SET_TexCoord4sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4sv, fn)
+#define CALL_Vertex2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_Vertex2d, parameters)
+#define GET_Vertex2d(disp) GET_by_offset(disp, _gloffset_Vertex2d)
+#define SET_Vertex2d(disp, fn) SET_by_offset(disp, _gloffset_Vertex2d, fn)
+#define CALL_Vertex2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex2dv, parameters)
+#define GET_Vertex2dv(disp) GET_by_offset(disp, _gloffset_Vertex2dv)
+#define SET_Vertex2dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2dv, fn)
+#define CALL_Vertex2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_Vertex2f, parameters)
+#define GET_Vertex2f(disp) GET_by_offset(disp, _gloffset_Vertex2f)
+#define SET_Vertex2f(disp, fn) SET_by_offset(disp, _gloffset_Vertex2f, fn)
+#define CALL_Vertex2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex2fv, parameters)
+#define GET_Vertex2fv(disp) GET_by_offset(disp, _gloffset_Vertex2fv)
+#define SET_Vertex2fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2fv, fn)
+#define CALL_Vertex2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Vertex2i, parameters)
+#define GET_Vertex2i(disp) GET_by_offset(disp, _gloffset_Vertex2i)
+#define SET_Vertex2i(disp, fn) SET_by_offset(disp, _gloffset_Vertex2i, fn)
+#define CALL_Vertex2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex2iv, parameters)
+#define GET_Vertex2iv(disp) GET_by_offset(disp, _gloffset_Vertex2iv)
+#define SET_Vertex2iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2iv, fn)
+#define CALL_Vertex2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_Vertex2s, parameters)
+#define GET_Vertex2s(disp) GET_by_offset(disp, _gloffset_Vertex2s)
+#define SET_Vertex2s(disp, fn) SET_by_offset(disp, _gloffset_Vertex2s, fn)
+#define CALL_Vertex2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex2sv, parameters)
+#define GET_Vertex2sv(disp) GET_by_offset(disp, _gloffset_Vertex2sv)
+#define SET_Vertex2sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2sv, fn)
+#define CALL_Vertex3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Vertex3d, parameters)
+#define GET_Vertex3d(disp) GET_by_offset(disp, _gloffset_Vertex3d)
+#define SET_Vertex3d(disp, fn) SET_by_offset(disp, _gloffset_Vertex3d, fn)
+#define CALL_Vertex3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex3dv, parameters)
+#define GET_Vertex3dv(disp) GET_by_offset(disp, _gloffset_Vertex3dv)
+#define SET_Vertex3dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3dv, fn)
+#define CALL_Vertex3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Vertex3f, parameters)
+#define GET_Vertex3f(disp) GET_by_offset(disp, _gloffset_Vertex3f)
+#define SET_Vertex3f(disp, fn) SET_by_offset(disp, _gloffset_Vertex3f, fn)
+#define CALL_Vertex3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex3fv, parameters)
+#define GET_Vertex3fv(disp) GET_by_offset(disp, _gloffset_Vertex3fv)
+#define SET_Vertex3fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3fv, fn)
+#define CALL_Vertex3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Vertex3i, parameters)
+#define GET_Vertex3i(disp) GET_by_offset(disp, _gloffset_Vertex3i)
+#define SET_Vertex3i(disp, fn) SET_by_offset(disp, _gloffset_Vertex3i, fn)
+#define CALL_Vertex3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex3iv, parameters)
+#define GET_Vertex3iv(disp) GET_by_offset(disp, _gloffset_Vertex3iv)
+#define SET_Vertex3iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3iv, fn)
+#define CALL_Vertex3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Vertex3s, parameters)
+#define GET_Vertex3s(disp) GET_by_offset(disp, _gloffset_Vertex3s)
+#define SET_Vertex3s(disp, fn) SET_by_offset(disp, _gloffset_Vertex3s, fn)
+#define CALL_Vertex3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex3sv, parameters)
+#define GET_Vertex3sv(disp) GET_by_offset(disp, _gloffset_Vertex3sv)
+#define SET_Vertex3sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3sv, fn)
+#define CALL_Vertex4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Vertex4d, parameters)
+#define GET_Vertex4d(disp) GET_by_offset(disp, _gloffset_Vertex4d)
+#define SET_Vertex4d(disp, fn) SET_by_offset(disp, _gloffset_Vertex4d, fn)
+#define CALL_Vertex4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex4dv, parameters)
+#define GET_Vertex4dv(disp) GET_by_offset(disp, _gloffset_Vertex4dv)
+#define SET_Vertex4dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4dv, fn)
+#define CALL_Vertex4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Vertex4f, parameters)
+#define GET_Vertex4f(disp) GET_by_offset(disp, _gloffset_Vertex4f)
+#define SET_Vertex4f(disp, fn) SET_by_offset(disp, _gloffset_Vertex4f, fn)
+#define CALL_Vertex4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex4fv, parameters)
+#define GET_Vertex4fv(disp) GET_by_offset(disp, _gloffset_Vertex4fv)
+#define SET_Vertex4fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4fv, fn)
+#define CALL_Vertex4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Vertex4i, parameters)
+#define GET_Vertex4i(disp) GET_by_offset(disp, _gloffset_Vertex4i)
+#define SET_Vertex4i(disp, fn) SET_by_offset(disp, _gloffset_Vertex4i, fn)
+#define CALL_Vertex4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex4iv, parameters)
+#define GET_Vertex4iv(disp) GET_by_offset(disp, _gloffset_Vertex4iv)
+#define SET_Vertex4iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4iv, fn)
+#define CALL_Vertex4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Vertex4s, parameters)
+#define GET_Vertex4s(disp) GET_by_offset(disp, _gloffset_Vertex4s)
+#define SET_Vertex4s(disp, fn) SET_by_offset(disp, _gloffset_Vertex4s, fn)
+#define CALL_Vertex4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex4sv, parameters)
+#define GET_Vertex4sv(disp) GET_by_offset(disp, _gloffset_Vertex4sv)
+#define SET_Vertex4sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4sv, fn)
+#define CALL_ClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_ClipPlane, parameters)
+#define GET_ClipPlane(disp) GET_by_offset(disp, _gloffset_ClipPlane)
+#define SET_ClipPlane(disp, fn) SET_by_offset(disp, _gloffset_ClipPlane, fn)
+#define CALL_ColorMaterial(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ColorMaterial, parameters)
+#define GET_ColorMaterial(disp) GET_by_offset(disp, _gloffset_ColorMaterial)
+#define SET_ColorMaterial(disp, fn) SET_by_offset(disp, _gloffset_ColorMaterial, fn)
+#define CALL_CullFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_CullFace, parameters)
+#define GET_CullFace(disp) GET_by_offset(disp, _gloffset_CullFace)
+#define SET_CullFace(disp, fn) SET_by_offset(disp, _gloffset_CullFace, fn)
+#define CALL_Fogf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Fogf, parameters)
+#define GET_Fogf(disp) GET_by_offset(disp, _gloffset_Fogf)
+#define SET_Fogf(disp, fn) SET_by_offset(disp, _gloffset_Fogf, fn)
+#define CALL_Fogfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_Fogfv, parameters)
+#define GET_Fogfv(disp) GET_by_offset(disp, _gloffset_Fogfv)
+#define SET_Fogfv(disp, fn) SET_by_offset(disp, _gloffset_Fogfv, fn)
+#define CALL_Fogi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_Fogi, parameters)
+#define GET_Fogi(disp) GET_by_offset(disp, _gloffset_Fogi)
+#define SET_Fogi(disp, fn) SET_by_offset(disp, _gloffset_Fogi, fn)
+#define CALL_Fogiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_Fogiv, parameters)
+#define GET_Fogiv(disp) GET_by_offset(disp, _gloffset_Fogiv)
+#define SET_Fogiv(disp, fn) SET_by_offset(disp, _gloffset_Fogiv, fn)
+#define CALL_FrontFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_FrontFace, parameters)
+#define GET_FrontFace(disp) GET_by_offset(disp, _gloffset_FrontFace)
+#define SET_FrontFace(disp, fn) SET_by_offset(disp, _gloffset_FrontFace, fn)
+#define CALL_Hint(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_Hint, parameters)
+#define GET_Hint(disp) GET_by_offset(disp, _gloffset_Hint)
+#define SET_Hint(disp, fn) SET_by_offset(disp, _gloffset_Hint, fn)
+#define CALL_Lightf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Lightf, parameters)
+#define GET_Lightf(disp) GET_by_offset(disp, _gloffset_Lightf)
+#define SET_Lightf(disp, fn) SET_by_offset(disp, _gloffset_Lightf, fn)
+#define CALL_Lightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Lightfv, parameters)
+#define GET_Lightfv(disp) GET_by_offset(disp, _gloffset_Lightfv)
+#define SET_Lightfv(disp, fn) SET_by_offset(disp, _gloffset_Lightfv, fn)
+#define CALL_Lighti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Lighti, parameters)
+#define GET_Lighti(disp) GET_by_offset(disp, _gloffset_Lighti)
+#define SET_Lighti(disp, fn) SET_by_offset(disp, _gloffset_Lighti, fn)
+#define CALL_Lightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Lightiv, parameters)
+#define GET_Lightiv(disp) GET_by_offset(disp, _gloffset_Lightiv)
+#define SET_Lightiv(disp, fn) SET_by_offset(disp, _gloffset_Lightiv, fn)
+#define CALL_LightModelf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_LightModelf, parameters)
+#define GET_LightModelf(disp) GET_by_offset(disp, _gloffset_LightModelf)
+#define SET_LightModelf(disp, fn) SET_by_offset(disp, _gloffset_LightModelf, fn)
+#define CALL_LightModelfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_LightModelfv, parameters)
+#define GET_LightModelfv(disp) GET_by_offset(disp, _gloffset_LightModelfv)
+#define SET_LightModelfv(disp, fn) SET_by_offset(disp, _gloffset_LightModelfv, fn)
+#define CALL_LightModeli(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_LightModeli, parameters)
+#define GET_LightModeli(disp) GET_by_offset(disp, _gloffset_LightModeli)
+#define SET_LightModeli(disp, fn) SET_by_offset(disp, _gloffset_LightModeli, fn)
+#define CALL_LightModeliv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_LightModeliv, parameters)
+#define GET_LightModeliv(disp) GET_by_offset(disp, _gloffset_LightModeliv)
+#define SET_LightModeliv(disp, fn) SET_by_offset(disp, _gloffset_LightModeliv, fn)
+#define CALL_LineStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLushort)), _gloffset_LineStipple, parameters)
+#define GET_LineStipple(disp) GET_by_offset(disp, _gloffset_LineStipple)
+#define SET_LineStipple(disp, fn) SET_by_offset(disp, _gloffset_LineStipple, fn)
+#define CALL_LineWidth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_LineWidth, parameters)
+#define GET_LineWidth(disp) GET_by_offset(disp, _gloffset_LineWidth)
+#define SET_LineWidth(disp, fn) SET_by_offset(disp, _gloffset_LineWidth, fn)
+#define CALL_Materialf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Materialf, parameters)
+#define GET_Materialf(disp) GET_by_offset(disp, _gloffset_Materialf)
+#define SET_Materialf(disp, fn) SET_by_offset(disp, _gloffset_Materialf, fn)
+#define CALL_Materialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Materialfv, parameters)
+#define GET_Materialfv(disp) GET_by_offset(disp, _gloffset_Materialfv)
+#define SET_Materialfv(disp, fn) SET_by_offset(disp, _gloffset_Materialfv, fn)
+#define CALL_Materiali(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Materiali, parameters)
+#define GET_Materiali(disp) GET_by_offset(disp, _gloffset_Materiali)
+#define SET_Materiali(disp, fn) SET_by_offset(disp, _gloffset_Materiali, fn)
+#define CALL_Materialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Materialiv, parameters)
+#define GET_Materialiv(disp) GET_by_offset(disp, _gloffset_Materialiv)
+#define SET_Materialiv(disp, fn) SET_by_offset(disp, _gloffset_Materialiv, fn)
+#define CALL_PointSize(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PointSize, parameters)
+#define GET_PointSize(disp) GET_by_offset(disp, _gloffset_PointSize)
+#define SET_PointSize(disp, fn) SET_by_offset(disp, _gloffset_PointSize, fn)
+#define CALL_PolygonMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_PolygonMode, parameters)
+#define GET_PolygonMode(disp) GET_by_offset(disp, _gloffset_PolygonMode)
+#define SET_PolygonMode(disp, fn) SET_by_offset(disp, _gloffset_PolygonMode, fn)
+#define CALL_PolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_PolygonStipple, parameters)
+#define GET_PolygonStipple(disp) GET_by_offset(disp, _gloffset_PolygonStipple)
+#define SET_PolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_PolygonStipple, fn)
+#define CALL_Scissor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Scissor, parameters)
+#define GET_Scissor(disp) GET_by_offset(disp, _gloffset_Scissor)
+#define SET_Scissor(disp, fn) SET_by_offset(disp, _gloffset_Scissor, fn)
+#define CALL_ShadeModel(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ShadeModel, parameters)
+#define GET_ShadeModel(disp) GET_by_offset(disp, _gloffset_ShadeModel)
+#define SET_ShadeModel(disp, fn) SET_by_offset(disp, _gloffset_ShadeModel, fn)
+#define CALL_TexParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexParameterf, parameters)
+#define GET_TexParameterf(disp) GET_by_offset(disp, _gloffset_TexParameterf)
+#define SET_TexParameterf(disp, fn) SET_by_offset(disp, _gloffset_TexParameterf, fn)
+#define CALL_TexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexParameterfv, parameters)
+#define GET_TexParameterfv(disp) GET_by_offset(disp, _gloffset_TexParameterfv)
+#define SET_TexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_TexParameterfv, fn)
+#define CALL_TexParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexParameteri, parameters)
+#define GET_TexParameteri(disp) GET_by_offset(disp, _gloffset_TexParameteri)
+#define SET_TexParameteri(disp, fn) SET_by_offset(disp, _gloffset_TexParameteri, fn)
+#define CALL_TexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameteriv, parameters)
+#define GET_TexParameteriv(disp) GET_by_offset(disp, _gloffset_TexParameteriv)
+#define SET_TexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_TexParameteriv, fn)
+#define CALL_TexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage1D, parameters)
+#define GET_TexImage1D(disp) GET_by_offset(disp, _gloffset_TexImage1D)
+#define SET_TexImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexImage1D, fn)
+#define CALL_TexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage2D, parameters)
+#define GET_TexImage2D(disp) GET_by_offset(disp, _gloffset_TexImage2D)
+#define SET_TexImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexImage2D, fn)
+#define CALL_TexEnvf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexEnvf, parameters)
+#define GET_TexEnvf(disp) GET_by_offset(disp, _gloffset_TexEnvf)
+#define SET_TexEnvf(disp, fn) SET_by_offset(disp, _gloffset_TexEnvf, fn)
+#define CALL_TexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexEnvfv, parameters)
+#define GET_TexEnvfv(disp) GET_by_offset(disp, _gloffset_TexEnvfv)
+#define SET_TexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_TexEnvfv, fn)
+#define CALL_TexEnvi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexEnvi, parameters)
+#define GET_TexEnvi(disp) GET_by_offset(disp, _gloffset_TexEnvi)
+#define SET_TexEnvi(disp, fn) SET_by_offset(disp, _gloffset_TexEnvi, fn)
+#define CALL_TexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexEnviv, parameters)
+#define GET_TexEnviv(disp) GET_by_offset(disp, _gloffset_TexEnviv)
+#define SET_TexEnviv(disp, fn) SET_by_offset(disp, _gloffset_TexEnviv, fn)
+#define CALL_TexGend(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble)), _gloffset_TexGend, parameters)
+#define GET_TexGend(disp) GET_by_offset(disp, _gloffset_TexGend)
+#define SET_TexGend(disp, fn) SET_by_offset(disp, _gloffset_TexGend, fn)
+#define CALL_TexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLdouble *)), _gloffset_TexGendv, parameters)
+#define GET_TexGendv(disp) GET_by_offset(disp, _gloffset_TexGendv)
+#define SET_TexGendv(disp, fn) SET_by_offset(disp, _gloffset_TexGendv, fn)
+#define CALL_TexGenf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexGenf, parameters)
+#define GET_TexGenf(disp) GET_by_offset(disp, _gloffset_TexGenf)
+#define SET_TexGenf(disp, fn) SET_by_offset(disp, _gloffset_TexGenf, fn)
+#define CALL_TexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexGenfv, parameters)
+#define GET_TexGenfv(disp) GET_by_offset(disp, _gloffset_TexGenfv)
+#define SET_TexGenfv(disp, fn) SET_by_offset(disp, _gloffset_TexGenfv, fn)
+#define CALL_TexGeni(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexGeni, parameters)
+#define GET_TexGeni(disp) GET_by_offset(disp, _gloffset_TexGeni)
+#define SET_TexGeni(disp, fn) SET_by_offset(disp, _gloffset_TexGeni, fn)
+#define CALL_TexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexGeniv, parameters)
+#define GET_TexGeniv(disp) GET_by_offset(disp, _gloffset_TexGeniv)
+#define SET_TexGeniv(disp, fn) SET_by_offset(disp, _gloffset_TexGeniv, fn)
+#define CALL_FeedbackBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, GLfloat *)), _gloffset_FeedbackBuffer, parameters)
+#define GET_FeedbackBuffer(disp) GET_by_offset(disp, _gloffset_FeedbackBuffer)
+#define SET_FeedbackBuffer(disp, fn) SET_by_offset(disp, _gloffset_FeedbackBuffer, fn)
+#define CALL_SelectBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_SelectBuffer, parameters)
+#define GET_SelectBuffer(disp) GET_by_offset(disp, _gloffset_SelectBuffer)
+#define SET_SelectBuffer(disp, fn) SET_by_offset(disp, _gloffset_SelectBuffer, fn)
+#define CALL_RenderMode(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLenum)), _gloffset_RenderMode, parameters)
+#define GET_RenderMode(disp) GET_by_offset(disp, _gloffset_RenderMode)
+#define SET_RenderMode(disp, fn) SET_by_offset(disp, _gloffset_RenderMode, fn)
+#define CALL_InitNames(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_InitNames, parameters)
+#define GET_InitNames(disp) GET_by_offset(disp, _gloffset_InitNames)
+#define SET_InitNames(disp, fn) SET_by_offset(disp, _gloffset_InitNames, fn)
+#define CALL_LoadName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_LoadName, parameters)
+#define GET_LoadName(disp) GET_by_offset(disp, _gloffset_LoadName)
+#define SET_LoadName(disp, fn) SET_by_offset(disp, _gloffset_LoadName, fn)
+#define CALL_PassThrough(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PassThrough, parameters)
+#define GET_PassThrough(disp) GET_by_offset(disp, _gloffset_PassThrough)
+#define SET_PassThrough(disp, fn) SET_by_offset(disp, _gloffset_PassThrough, fn)
+#define CALL_PopName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopName, parameters)
+#define GET_PopName(disp) GET_by_offset(disp, _gloffset_PopName)
+#define SET_PopName(disp, fn) SET_by_offset(disp, _gloffset_PopName, fn)
+#define CALL_PushName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PushName, parameters)
+#define GET_PushName(disp) GET_by_offset(disp, _gloffset_PushName)
+#define SET_PushName(disp, fn) SET_by_offset(disp, _gloffset_PushName, fn)
+#define CALL_DrawBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DrawBuffer, parameters)
+#define GET_DrawBuffer(disp) GET_by_offset(disp, _gloffset_DrawBuffer)
+#define SET_DrawBuffer(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffer, fn)
+#define CALL_Clear(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_Clear, parameters)
+#define GET_Clear(disp) GET_by_offset(disp, _gloffset_Clear)
+#define SET_Clear(disp, fn) SET_by_offset(disp, _gloffset_Clear, fn)
+#define CALL_ClearAccum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ClearAccum, parameters)
+#define GET_ClearAccum(disp) GET_by_offset(disp, _gloffset_ClearAccum)
+#define SET_ClearAccum(disp, fn) SET_by_offset(disp, _gloffset_ClearAccum, fn)
+#define CALL_ClearIndex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_ClearIndex, parameters)
+#define GET_ClearIndex(disp) GET_by_offset(disp, _gloffset_ClearIndex)
+#define SET_ClearIndex(disp, fn) SET_by_offset(disp, _gloffset_ClearIndex, fn)
+#define CALL_ClearColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_ClearColor, parameters)
+#define GET_ClearColor(disp) GET_by_offset(disp, _gloffset_ClearColor)
+#define SET_ClearColor(disp, fn) SET_by_offset(disp, _gloffset_ClearColor, fn)
+#define CALL_ClearStencil(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ClearStencil, parameters)
+#define GET_ClearStencil(disp) GET_by_offset(disp, _gloffset_ClearStencil)
+#define SET_ClearStencil(disp, fn) SET_by_offset(disp, _gloffset_ClearStencil, fn)
+#define CALL_ClearDepth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd)), _gloffset_ClearDepth, parameters)
+#define GET_ClearDepth(disp) GET_by_offset(disp, _gloffset_ClearDepth)
+#define SET_ClearDepth(disp, fn) SET_by_offset(disp, _gloffset_ClearDepth, fn)
+#define CALL_StencilMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_StencilMask, parameters)
+#define GET_StencilMask(disp) GET_by_offset(disp, _gloffset_StencilMask)
+#define SET_StencilMask(disp, fn) SET_by_offset(disp, _gloffset_StencilMask, fn)
+#define CALL_ColorMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMask, parameters)
+#define GET_ColorMask(disp) GET_by_offset(disp, _gloffset_ColorMask)
+#define SET_ColorMask(disp, fn) SET_by_offset(disp, _gloffset_ColorMask, fn)
+#define CALL_DepthMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_DepthMask, parameters)
+#define GET_DepthMask(disp) GET_by_offset(disp, _gloffset_DepthMask)
+#define SET_DepthMask(disp, fn) SET_by_offset(disp, _gloffset_DepthMask, fn)
+#define CALL_IndexMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_IndexMask, parameters)
+#define GET_IndexMask(disp) GET_by_offset(disp, _gloffset_IndexMask)
+#define SET_IndexMask(disp, fn) SET_by_offset(disp, _gloffset_IndexMask, fn)
+#define CALL_Accum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Accum, parameters)
+#define GET_Accum(disp) GET_by_offset(disp, _gloffset_Accum)
+#define SET_Accum(disp, fn) SET_by_offset(disp, _gloffset_Accum, fn)
+#define CALL_Disable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Disable, parameters)
+#define GET_Disable(disp) GET_by_offset(disp, _gloffset_Disable)
+#define SET_Disable(disp, fn) SET_by_offset(disp, _gloffset_Disable, fn)
+#define CALL_Enable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Enable, parameters)
+#define GET_Enable(disp) GET_by_offset(disp, _gloffset_Enable)
+#define SET_Enable(disp, fn) SET_by_offset(disp, _gloffset_Enable, fn)
+#define CALL_Finish(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Finish, parameters)
+#define GET_Finish(disp) GET_by_offset(disp, _gloffset_Finish)
+#define SET_Finish(disp, fn) SET_by_offset(disp, _gloffset_Finish, fn)
+#define CALL_Flush(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Flush, parameters)
+#define GET_Flush(disp) GET_by_offset(disp, _gloffset_Flush)
+#define SET_Flush(disp, fn) SET_by_offset(disp, _gloffset_Flush, fn)
+#define CALL_PopAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopAttrib, parameters)
+#define GET_PopAttrib(disp) GET_by_offset(disp, _gloffset_PopAttrib)
+#define SET_PopAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopAttrib, fn)
+#define CALL_PushAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushAttrib, parameters)
+#define GET_PushAttrib(disp) GET_by_offset(disp, _gloffset_PushAttrib)
+#define SET_PushAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushAttrib, fn)
+#define CALL_Map1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map1d, parameters)
+#define GET_Map1d(disp) GET_by_offset(disp, _gloffset_Map1d)
+#define SET_Map1d(disp, fn) SET_by_offset(disp, _gloffset_Map1d, fn)
+#define CALL_Map1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map1f, parameters)
+#define GET_Map1f(disp) GET_by_offset(disp, _gloffset_Map1f)
+#define SET_Map1f(disp, fn) SET_by_offset(disp, _gloffset_Map1f, fn)
+#define CALL_Map2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map2d, parameters)
+#define GET_Map2d(disp) GET_by_offset(disp, _gloffset_Map2d)
+#define SET_Map2d(disp, fn) SET_by_offset(disp, _gloffset_Map2d, fn)
+#define CALL_Map2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map2f, parameters)
+#define GET_Map2f(disp) GET_by_offset(disp, _gloffset_Map2f)
+#define SET_Map2f(disp, fn) SET_by_offset(disp, _gloffset_Map2f, fn)
+#define CALL_MapGrid1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble)), _gloffset_MapGrid1d, parameters)
+#define GET_MapGrid1d(disp) GET_by_offset(disp, _gloffset_MapGrid1d)
+#define SET_MapGrid1d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1d, fn)
+#define CALL_MapGrid1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_MapGrid1f, parameters)
+#define GET_MapGrid1f(disp) GET_by_offset(disp, _gloffset_MapGrid1f)
+#define SET_MapGrid1f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1f, fn)
+#define CALL_MapGrid2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble)), _gloffset_MapGrid2d, parameters)
+#define GET_MapGrid2d(disp) GET_by_offset(disp, _gloffset_MapGrid2d)
+#define SET_MapGrid2d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2d, fn)
+#define CALL_MapGrid2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat)), _gloffset_MapGrid2f, parameters)
+#define GET_MapGrid2f(disp) GET_by_offset(disp, _gloffset_MapGrid2f)
+#define SET_MapGrid2f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2f, fn)
+#define CALL_EvalCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_EvalCoord1d, parameters)
+#define GET_EvalCoord1d(disp) GET_by_offset(disp, _gloffset_EvalCoord1d)
+#define SET_EvalCoord1d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1d, fn)
+#define CALL_EvalCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord1dv, parameters)
+#define GET_EvalCoord1dv(disp) GET_by_offset(disp, _gloffset_EvalCoord1dv)
+#define SET_EvalCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1dv, fn)
+#define CALL_EvalCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_EvalCoord1f, parameters)
+#define GET_EvalCoord1f(disp) GET_by_offset(disp, _gloffset_EvalCoord1f)
+#define SET_EvalCoord1f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1f, fn)
+#define CALL_EvalCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord1fv, parameters)
+#define GET_EvalCoord1fv(disp) GET_by_offset(disp, _gloffset_EvalCoord1fv)
+#define SET_EvalCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1fv, fn)
+#define CALL_EvalCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_EvalCoord2d, parameters)
+#define GET_EvalCoord2d(disp) GET_by_offset(disp, _gloffset_EvalCoord2d)
+#define SET_EvalCoord2d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2d, fn)
+#define CALL_EvalCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord2dv, parameters)
+#define GET_EvalCoord2dv(disp) GET_by_offset(disp, _gloffset_EvalCoord2dv)
+#define SET_EvalCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2dv, fn)
+#define CALL_EvalCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_EvalCoord2f, parameters)
+#define GET_EvalCoord2f(disp) GET_by_offset(disp, _gloffset_EvalCoord2f)
+#define SET_EvalCoord2f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2f, fn)
+#define CALL_EvalCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord2fv, parameters)
+#define GET_EvalCoord2fv(disp) GET_by_offset(disp, _gloffset_EvalCoord2fv)
+#define SET_EvalCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2fv, fn)
+#define CALL_EvalMesh1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_EvalMesh1, parameters)
+#define GET_EvalMesh1(disp) GET_by_offset(disp, _gloffset_EvalMesh1)
+#define SET_EvalMesh1(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh1, fn)
+#define CALL_EvalPoint1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_EvalPoint1, parameters)
+#define GET_EvalPoint1(disp) GET_by_offset(disp, _gloffset_EvalPoint1)
+#define SET_EvalPoint1(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint1, fn)
+#define CALL_EvalMesh2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_EvalMesh2, parameters)
+#define GET_EvalMesh2(disp) GET_by_offset(disp, _gloffset_EvalMesh2)
+#define SET_EvalMesh2(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh2, fn)
+#define CALL_EvalPoint2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_EvalPoint2, parameters)
+#define GET_EvalPoint2(disp) GET_by_offset(disp, _gloffset_EvalPoint2)
+#define SET_EvalPoint2(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint2, fn)
+#define CALL_AlphaFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLclampf)), _gloffset_AlphaFunc, parameters)
+#define GET_AlphaFunc(disp) GET_by_offset(disp, _gloffset_AlphaFunc)
+#define SET_AlphaFunc(disp, fn) SET_by_offset(disp, _gloffset_AlphaFunc, fn)
+#define CALL_BlendFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendFunc, parameters)
+#define GET_BlendFunc(disp) GET_by_offset(disp, _gloffset_BlendFunc)
+#define SET_BlendFunc(disp, fn) SET_by_offset(disp, _gloffset_BlendFunc, fn)
+#define CALL_LogicOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_LogicOp, parameters)
+#define GET_LogicOp(disp) GET_by_offset(disp, _gloffset_LogicOp)
+#define SET_LogicOp(disp, fn) SET_by_offset(disp, _gloffset_LogicOp, fn)
+#define CALL_StencilFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLuint)), _gloffset_StencilFunc, parameters)
+#define GET_StencilFunc(disp) GET_by_offset(disp, _gloffset_StencilFunc)
+#define SET_StencilFunc(disp, fn) SET_by_offset(disp, _gloffset_StencilFunc, fn)
+#define CALL_StencilOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum)), _gloffset_StencilOp, parameters)
+#define GET_StencilOp(disp) GET_by_offset(disp, _gloffset_StencilOp)
+#define SET_StencilOp(disp, fn) SET_by_offset(disp, _gloffset_StencilOp, fn)
+#define CALL_DepthFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DepthFunc, parameters)
+#define GET_DepthFunc(disp) GET_by_offset(disp, _gloffset_DepthFunc)
+#define SET_DepthFunc(disp, fn) SET_by_offset(disp, _gloffset_DepthFunc, fn)
+#define CALL_PixelZoom(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PixelZoom, parameters)
+#define GET_PixelZoom(disp) GET_by_offset(disp, _gloffset_PixelZoom)
+#define SET_PixelZoom(disp, fn) SET_by_offset(disp, _gloffset_PixelZoom, fn)
+#define CALL_PixelTransferf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTransferf, parameters)
+#define GET_PixelTransferf(disp) GET_by_offset(disp, _gloffset_PixelTransferf)
+#define SET_PixelTransferf(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferf, fn)
+#define CALL_PixelTransferi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTransferi, parameters)
+#define GET_PixelTransferi(disp) GET_by_offset(disp, _gloffset_PixelTransferi)
+#define SET_PixelTransferi(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferi, fn)
+#define CALL_PixelStoref(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelStoref, parameters)
+#define GET_PixelStoref(disp) GET_by_offset(disp, _gloffset_PixelStoref)
+#define SET_PixelStoref(disp, fn) SET_by_offset(disp, _gloffset_PixelStoref, fn)
+#define CALL_PixelStorei(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelStorei, parameters)
+#define GET_PixelStorei(disp) GET_by_offset(disp, _gloffset_PixelStorei)
+#define SET_PixelStorei(disp, fn) SET_by_offset(disp, _gloffset_PixelStorei, fn)
+#define CALL_PixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLfloat *)), _gloffset_PixelMapfv, parameters)
+#define GET_PixelMapfv(disp) GET_by_offset(disp, _gloffset_PixelMapfv)
+#define SET_PixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapfv, fn)
+#define CALL_PixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLuint *)), _gloffset_PixelMapuiv, parameters)
+#define GET_PixelMapuiv(disp) GET_by_offset(disp, _gloffset_PixelMapuiv)
+#define SET_PixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapuiv, fn)
+#define CALL_PixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLushort *)), _gloffset_PixelMapusv, parameters)
+#define GET_PixelMapusv(disp) GET_by_offset(disp, _gloffset_PixelMapusv)
+#define SET_PixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapusv, fn)
+#define CALL_ReadBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ReadBuffer, parameters)
+#define GET_ReadBuffer(disp) GET_by_offset(disp, _gloffset_ReadBuffer)
+#define SET_ReadBuffer(disp, fn) SET_by_offset(disp, _gloffset_ReadBuffer, fn)
+#define CALL_CopyPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum)), _gloffset_CopyPixels, parameters)
+#define GET_CopyPixels(disp) GET_by_offset(disp, _gloffset_CopyPixels)
+#define SET_CopyPixels(disp, fn) SET_by_offset(disp, _gloffset_CopyPixels, fn)
+#define CALL_ReadPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)), _gloffset_ReadPixels, parameters)
+#define GET_ReadPixels(disp) GET_by_offset(disp, _gloffset_ReadPixels)
+#define SET_ReadPixels(disp, fn) SET_by_offset(disp, _gloffset_ReadPixels, fn)
+#define CALL_DrawPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_DrawPixels, parameters)
+#define GET_DrawPixels(disp) GET_by_offset(disp, _gloffset_DrawPixels)
+#define SET_DrawPixels(disp, fn) SET_by_offset(disp, _gloffset_DrawPixels, fn)
+#define CALL_GetBooleanv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean *)), _gloffset_GetBooleanv, parameters)
+#define GET_GetBooleanv(disp) GET_by_offset(disp, _gloffset_GetBooleanv)
+#define SET_GetBooleanv(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanv, fn)
+#define CALL_GetClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetClipPlane, parameters)
+#define GET_GetClipPlane(disp) GET_by_offset(disp, _gloffset_GetClipPlane)
+#define SET_GetClipPlane(disp, fn) SET_by_offset(disp, _gloffset_GetClipPlane, fn)
+#define CALL_GetDoublev(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetDoublev, parameters)
+#define GET_GetDoublev(disp) GET_by_offset(disp, _gloffset_GetDoublev)
+#define SET_GetDoublev(disp, fn) SET_by_offset(disp, _gloffset_GetDoublev, fn)
+#define CALL_GetError(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(void)), _gloffset_GetError, parameters)
+#define GET_GetError(disp) GET_by_offset(disp, _gloffset_GetError)
+#define SET_GetError(disp, fn) SET_by_offset(disp, _gloffset_GetError, fn)
+#define CALL_GetFloatv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetFloatv, parameters)
+#define GET_GetFloatv(disp) GET_by_offset(disp, _gloffset_GetFloatv)
+#define SET_GetFloatv(disp, fn) SET_by_offset(disp, _gloffset_GetFloatv, fn)
+#define CALL_GetIntegerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetIntegerv, parameters)
+#define GET_GetIntegerv(disp) GET_by_offset(disp, _gloffset_GetIntegerv)
+#define SET_GetIntegerv(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerv, fn)
+#define CALL_GetLightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetLightfv, parameters)
+#define GET_GetLightfv(disp) GET_by_offset(disp, _gloffset_GetLightfv)
+#define SET_GetLightfv(disp, fn) SET_by_offset(disp, _gloffset_GetLightfv, fn)
+#define CALL_GetLightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetLightiv, parameters)
+#define GET_GetLightiv(disp) GET_by_offset(disp, _gloffset_GetLightiv)
+#define SET_GetLightiv(disp, fn) SET_by_offset(disp, _gloffset_GetLightiv, fn)
+#define CALL_GetMapdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetMapdv, parameters)
+#define GET_GetMapdv(disp) GET_by_offset(disp, _gloffset_GetMapdv)
+#define SET_GetMapdv(disp, fn) SET_by_offset(disp, _gloffset_GetMapdv, fn)
+#define CALL_GetMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMapfv, parameters)
+#define GET_GetMapfv(disp) GET_by_offset(disp, _gloffset_GetMapfv)
+#define SET_GetMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetMapfv, fn)
+#define CALL_GetMapiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMapiv, parameters)
+#define GET_GetMapiv(disp) GET_by_offset(disp, _gloffset_GetMapiv)
+#define SET_GetMapiv(disp, fn) SET_by_offset(disp, _gloffset_GetMapiv, fn)
+#define CALL_GetMaterialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMaterialfv, parameters)
+#define GET_GetMaterialfv(disp) GET_by_offset(disp, _gloffset_GetMaterialfv)
+#define SET_GetMaterialfv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialfv, fn)
+#define CALL_GetMaterialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMaterialiv, parameters)
+#define GET_GetMaterialiv(disp) GET_by_offset(disp, _gloffset_GetMaterialiv)
+#define SET_GetMaterialiv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialiv, fn)
+#define CALL_GetPixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelMapfv, parameters)
+#define GET_GetPixelMapfv(disp) GET_by_offset(disp, _gloffset_GetPixelMapfv)
+#define SET_GetPixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapfv, fn)
+#define CALL_GetPixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint *)), _gloffset_GetPixelMapuiv, parameters)
+#define GET_GetPixelMapuiv(disp) GET_by_offset(disp, _gloffset_GetPixelMapuiv)
+#define SET_GetPixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapuiv, fn)
+#define CALL_GetPixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLushort *)), _gloffset_GetPixelMapusv, parameters)
+#define GET_GetPixelMapusv(disp) GET_by_offset(disp, _gloffset_GetPixelMapusv)
+#define SET_GetPixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapusv, fn)
+#define CALL_GetPolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte *)), _gloffset_GetPolygonStipple, parameters)
+#define GET_GetPolygonStipple(disp) GET_by_offset(disp, _gloffset_GetPolygonStipple)
+#define SET_GetPolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_GetPolygonStipple, fn)
+#define CALL_GetString(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum)), _gloffset_GetString, parameters)
+#define GET_GetString(disp) GET_by_offset(disp, _gloffset_GetString)
+#define SET_GetString(disp, fn) SET_by_offset(disp, _gloffset_GetString, fn)
+#define CALL_GetTexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexEnvfv, parameters)
+#define GET_GetTexEnvfv(disp) GET_by_offset(disp, _gloffset_GetTexEnvfv)
+#define SET_GetTexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnvfv, fn)
+#define CALL_GetTexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexEnviv, parameters)
+#define GET_GetTexEnviv(disp) GET_by_offset(disp, _gloffset_GetTexEnviv)
+#define SET_GetTexEnviv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnviv, fn)
+#define CALL_GetTexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetTexGendv, parameters)
+#define GET_GetTexGendv(disp) GET_by_offset(disp, _gloffset_GetTexGendv)
+#define SET_GetTexGendv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGendv, fn)
+#define CALL_GetTexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexGenfv, parameters)
+#define GET_GetTexGenfv(disp) GET_by_offset(disp, _gloffset_GetTexGenfv)
+#define SET_GetTexGenfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGenfv, fn)
+#define CALL_GetTexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexGeniv, parameters)
+#define GET_GetTexGeniv(disp) GET_by_offset(disp, _gloffset_GetTexGeniv)
+#define SET_GetTexGeniv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGeniv, fn)
+#define CALL_GetTexImage(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLenum, GLvoid *)), _gloffset_GetTexImage, parameters)
+#define GET_GetTexImage(disp) GET_by_offset(disp, _gloffset_GetTexImage)
+#define SET_GetTexImage(disp, fn) SET_by_offset(disp, _gloffset_GetTexImage, fn)
+#define CALL_GetTexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexParameterfv, parameters)
+#define GET_GetTexParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexParameterfv)
+#define SET_GetTexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterfv, fn)
+#define CALL_GetTexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameteriv, parameters)
+#define GET_GetTexParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexParameteriv)
+#define SET_GetTexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameteriv, fn)
+#define CALL_GetTexLevelParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLfloat *)), _gloffset_GetTexLevelParameterfv, parameters)
+#define GET_GetTexLevelParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameterfv)
+#define SET_GetTexLevelParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameterfv, fn)
+#define CALL_GetTexLevelParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint *)), _gloffset_GetTexLevelParameteriv, parameters)
+#define GET_GetTexLevelParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameteriv)
+#define SET_GetTexLevelParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameteriv, fn)
+#define CALL_IsEnabled(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_IsEnabled, parameters)
+#define GET_IsEnabled(disp) GET_by_offset(disp, _gloffset_IsEnabled)
+#define SET_IsEnabled(disp, fn) SET_by_offset(disp, _gloffset_IsEnabled, fn)
+#define CALL_IsList(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsList, parameters)
+#define GET_IsList(disp) GET_by_offset(disp, _gloffset_IsList)
+#define SET_IsList(disp, fn) SET_by_offset(disp, _gloffset_IsList, fn)
+#define CALL_DepthRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthRange, parameters)
+#define GET_DepthRange(disp) GET_by_offset(disp, _gloffset_DepthRange)
+#define SET_DepthRange(disp, fn) SET_by_offset(disp, _gloffset_DepthRange, fn)
+#define CALL_Frustum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Frustum, parameters)
+#define GET_Frustum(disp) GET_by_offset(disp, _gloffset_Frustum)
+#define SET_Frustum(disp, fn) SET_by_offset(disp, _gloffset_Frustum, fn)
+#define CALL_LoadIdentity(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_LoadIdentity, parameters)
+#define GET_LoadIdentity(disp) GET_by_offset(disp, _gloffset_LoadIdentity)
+#define SET_LoadIdentity(disp, fn) SET_by_offset(disp, _gloffset_LoadIdentity, fn)
+#define CALL_LoadMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadMatrixf, parameters)
+#define GET_LoadMatrixf(disp) GET_by_offset(disp, _gloffset_LoadMatrixf)
+#define SET_LoadMatrixf(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixf, fn)
+#define CALL_LoadMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadMatrixd, parameters)
+#define GET_LoadMatrixd(disp) GET_by_offset(disp, _gloffset_LoadMatrixd)
+#define SET_LoadMatrixd(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixd, fn)
+#define CALL_MatrixMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_MatrixMode, parameters)
+#define GET_MatrixMode(disp) GET_by_offset(disp, _gloffset_MatrixMode)
+#define SET_MatrixMode(disp, fn) SET_by_offset(disp, _gloffset_MatrixMode, fn)
+#define CALL_MultMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultMatrixf, parameters)
+#define GET_MultMatrixf(disp) GET_by_offset(disp, _gloffset_MultMatrixf)
+#define SET_MultMatrixf(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixf, fn)
+#define CALL_MultMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultMatrixd, parameters)
+#define GET_MultMatrixd(disp) GET_by_offset(disp, _gloffset_MultMatrixd)
+#define SET_MultMatrixd(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixd, fn)
+#define CALL_Ortho(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Ortho, parameters)
+#define GET_Ortho(disp) GET_by_offset(disp, _gloffset_Ortho)
+#define SET_Ortho(disp, fn) SET_by_offset(disp, _gloffset_Ortho, fn)
+#define CALL_PopMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopMatrix, parameters)
+#define GET_PopMatrix(disp) GET_by_offset(disp, _gloffset_PopMatrix)
+#define SET_PopMatrix(disp, fn) SET_by_offset(disp, _gloffset_PopMatrix, fn)
+#define CALL_PushMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PushMatrix, parameters)
+#define GET_PushMatrix(disp) GET_by_offset(disp, _gloffset_PushMatrix)
+#define SET_PushMatrix(disp, fn) SET_by_offset(disp, _gloffset_PushMatrix, fn)
+#define CALL_Rotated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rotated, parameters)
+#define GET_Rotated(disp) GET_by_offset(disp, _gloffset_Rotated)
+#define SET_Rotated(disp, fn) SET_by_offset(disp, _gloffset_Rotated, fn)
+#define CALL_Rotatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rotatef, parameters)
+#define GET_Rotatef(disp) GET_by_offset(disp, _gloffset_Rotatef)
+#define SET_Rotatef(disp, fn) SET_by_offset(disp, _gloffset_Rotatef, fn)
+#define CALL_Scaled(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Scaled, parameters)
+#define GET_Scaled(disp) GET_by_offset(disp, _gloffset_Scaled)
+#define SET_Scaled(disp, fn) SET_by_offset(disp, _gloffset_Scaled, fn)
+#define CALL_Scalef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Scalef, parameters)
+#define GET_Scalef(disp) GET_by_offset(disp, _gloffset_Scalef)
+#define SET_Scalef(disp, fn) SET_by_offset(disp, _gloffset_Scalef, fn)
+#define CALL_Translated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Translated, parameters)
+#define GET_Translated(disp) GET_by_offset(disp, _gloffset_Translated)
+#define SET_Translated(disp, fn) SET_by_offset(disp, _gloffset_Translated, fn)
+#define CALL_Translatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Translatef, parameters)
+#define GET_Translatef(disp) GET_by_offset(disp, _gloffset_Translatef)
+#define SET_Translatef(disp, fn) SET_by_offset(disp, _gloffset_Translatef, fn)
+#define CALL_Viewport(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Viewport, parameters)
+#define GET_Viewport(disp) GET_by_offset(disp, _gloffset_Viewport)
+#define SET_Viewport(disp, fn) SET_by_offset(disp, _gloffset_Viewport, fn)
+#define CALL_ArrayElement(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ArrayElement, parameters)
+#define GET_ArrayElement(disp) GET_by_offset(disp, _gloffset_ArrayElement)
+#define SET_ArrayElement(disp, fn) SET_by_offset(disp, _gloffset_ArrayElement, fn)
+#define CALL_BindTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTexture, parameters)
+#define GET_BindTexture(disp) GET_by_offset(disp, _gloffset_BindTexture)
+#define SET_BindTexture(disp, fn) SET_by_offset(disp, _gloffset_BindTexture, fn)
+#define CALL_ColorPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_ColorPointer, parameters)
+#define GET_ColorPointer(disp) GET_by_offset(disp, _gloffset_ColorPointer)
+#define SET_ColorPointer(disp, fn) SET_by_offset(disp, _gloffset_ColorPointer, fn)
+#define CALL_DisableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DisableClientState, parameters)
+#define GET_DisableClientState(disp) GET_by_offset(disp, _gloffset_DisableClientState)
+#define SET_DisableClientState(disp, fn) SET_by_offset(disp, _gloffset_DisableClientState, fn)
+#define CALL_DrawArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei)), _gloffset_DrawArrays, parameters)
+#define GET_DrawArrays(disp) GET_by_offset(disp, _gloffset_DrawArrays)
+#define SET_DrawArrays(disp, fn) SET_by_offset(disp, _gloffset_DrawArrays, fn)
+#define CALL_DrawElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawElements, parameters)
+#define GET_DrawElements(disp) GET_by_offset(disp, _gloffset_DrawElements)
+#define SET_DrawElements(disp, fn) SET_by_offset(disp, _gloffset_DrawElements, fn)
+#define CALL_EdgeFlagPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_EdgeFlagPointer, parameters)
+#define GET_EdgeFlagPointer(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointer)
+#define SET_EdgeFlagPointer(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointer, fn)
+#define CALL_EnableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EnableClientState, parameters)
+#define GET_EnableClientState(disp) GET_by_offset(disp, _gloffset_EnableClientState)
+#define SET_EnableClientState(disp, fn) SET_by_offset(disp, _gloffset_EnableClientState, fn)
+#define CALL_IndexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_IndexPointer, parameters)
+#define GET_IndexPointer(disp) GET_by_offset(disp, _gloffset_IndexPointer)
+#define SET_IndexPointer(disp, fn) SET_by_offset(disp, _gloffset_IndexPointer, fn)
+#define CALL_Indexub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte)), _gloffset_Indexub, parameters)
+#define GET_Indexub(disp) GET_by_offset(disp, _gloffset_Indexub)
+#define SET_Indexub(disp, fn) SET_by_offset(disp, _gloffset_Indexub, fn)
+#define CALL_Indexubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Indexubv, parameters)
+#define GET_Indexubv(disp) GET_by_offset(disp, _gloffset_Indexubv)
+#define SET_Indexubv(disp, fn) SET_by_offset(disp, _gloffset_Indexubv, fn)
+#define CALL_InterleavedArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_InterleavedArrays, parameters)
+#define GET_InterleavedArrays(disp) GET_by_offset(disp, _gloffset_InterleavedArrays)
+#define SET_InterleavedArrays(disp, fn) SET_by_offset(disp, _gloffset_InterleavedArrays, fn)
+#define CALL_NormalPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_NormalPointer, parameters)
+#define GET_NormalPointer(disp) GET_by_offset(disp, _gloffset_NormalPointer)
+#define SET_NormalPointer(disp, fn) SET_by_offset(disp, _gloffset_NormalPointer, fn)
+#define CALL_PolygonOffset(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffset, parameters)
+#define GET_PolygonOffset(disp) GET_by_offset(disp, _gloffset_PolygonOffset)
+#define SET_PolygonOffset(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffset, fn)
+#define CALL_TexCoordPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_TexCoordPointer, parameters)
+#define GET_TexCoordPointer(disp) GET_by_offset(disp, _gloffset_TexCoordPointer)
+#define SET_TexCoordPointer(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointer, fn)
+#define CALL_VertexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexPointer, parameters)
+#define GET_VertexPointer(disp) GET_by_offset(disp, _gloffset_VertexPointer)
+#define SET_VertexPointer(disp, fn) SET_by_offset(disp, _gloffset_VertexPointer, fn)
+#define CALL_AreTexturesResident(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreTexturesResident, parameters)
+#define GET_AreTexturesResident(disp) GET_by_offset(disp, _gloffset_AreTexturesResident)
+#define SET_AreTexturesResident(disp, fn) SET_by_offset(disp, _gloffset_AreTexturesResident, fn)
+#define CALL_CopyTexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)), _gloffset_CopyTexImage1D, parameters)
+#define GET_CopyTexImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexImage1D)
+#define SET_CopyTexImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage1D, fn)
+#define CALL_CopyTexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)), _gloffset_CopyTexImage2D, parameters)
+#define GET_CopyTexImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexImage2D)
+#define SET_CopyTexImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage2D, fn)
+#define CALL_CopyTexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei)), _gloffset_CopyTexSubImage1D, parameters)
+#define GET_CopyTexSubImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage1D)
+#define SET_CopyTexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage1D, fn)
+#define CALL_CopyTexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage2D, parameters)
+#define GET_CopyTexSubImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage2D)
+#define SET_CopyTexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn)
+#define CALL_DeleteTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTextures, parameters)
+#define GET_DeleteTextures(disp) GET_by_offset(disp, _gloffset_DeleteTextures)
+#define SET_DeleteTextures(disp, fn) SET_by_offset(disp, _gloffset_DeleteTextures, fn)
+#define CALL_GenTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTextures, parameters)
+#define GET_GenTextures(disp) GET_by_offset(disp, _gloffset_GenTextures)
+#define SET_GenTextures(disp, fn) SET_by_offset(disp, _gloffset_GenTextures, fn)
+#define CALL_GetPointerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid **)), _gloffset_GetPointerv, parameters)
+#define GET_GetPointerv(disp) GET_by_offset(disp, _gloffset_GetPointerv)
+#define SET_GetPointerv(disp, fn) SET_by_offset(disp, _gloffset_GetPointerv, fn)
+#define CALL_IsTexture(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTexture, parameters)
+#define GET_IsTexture(disp) GET_by_offset(disp, _gloffset_IsTexture)
+#define SET_IsTexture(disp, fn) SET_by_offset(disp, _gloffset_IsTexture, fn)
+#define CALL_PrioritizeTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, const GLclampf *)), _gloffset_PrioritizeTextures, parameters)
+#define GET_PrioritizeTextures(disp) GET_by_offset(disp, _gloffset_PrioritizeTextures)
+#define SET_PrioritizeTextures(disp, fn) SET_by_offset(disp, _gloffset_PrioritizeTextures, fn)
+#define CALL_TexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage1D, parameters)
+#define GET_TexSubImage1D(disp) GET_by_offset(disp, _gloffset_TexSubImage1D)
+#define SET_TexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage1D, fn)
+#define CALL_TexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage2D, parameters)
+#define GET_TexSubImage2D(disp) GET_by_offset(disp, _gloffset_TexSubImage2D)
+#define SET_TexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage2D, fn)
+#define CALL_PopClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopClientAttrib, parameters)
+#define GET_PopClientAttrib(disp) GET_by_offset(disp, _gloffset_PopClientAttrib)
+#define SET_PopClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopClientAttrib, fn)
+#define CALL_PushClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushClientAttrib, parameters)
+#define GET_PushClientAttrib(disp) GET_by_offset(disp, _gloffset_PushClientAttrib)
+#define SET_PushClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushClientAttrib, fn)
+#define CALL_BlendColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_BlendColor, parameters)
+#define GET_BlendColor(disp) GET_by_offset(disp, _gloffset_BlendColor)
+#define SET_BlendColor(disp, fn) SET_by_offset(disp, _gloffset_BlendColor, fn)
+#define CALL_BlendEquation(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BlendEquation, parameters)
+#define GET_BlendEquation(disp) GET_by_offset(disp, _gloffset_BlendEquation)
+#define SET_BlendEquation(disp, fn) SET_by_offset(disp, _gloffset_BlendEquation, fn)
+#define CALL_DrawRangeElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawRangeElements, parameters)
+#define GET_DrawRangeElements(disp) GET_by_offset(disp, _gloffset_DrawRangeElements)
+#define SET_DrawRangeElements(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElements, fn)
+#define CALL_ColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorTable, parameters)
+#define GET_ColorTable(disp) GET_by_offset(disp, _gloffset_ColorTable)
+#define SET_ColorTable(disp, fn) SET_by_offset(disp, _gloffset_ColorTable, fn)
+#define CALL_ColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ColorTableParameterfv, parameters)
+#define GET_ColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_ColorTableParameterfv)
+#define SET_ColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameterfv, fn)
+#define CALL_ColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ColorTableParameteriv, parameters)
+#define GET_ColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_ColorTableParameteriv)
+#define SET_ColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameteriv, fn)
+#define CALL_CopyColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyColorTable, parameters)
+#define GET_CopyColorTable(disp) GET_by_offset(disp, _gloffset_CopyColorTable)
+#define SET_CopyColorTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorTable, fn)
+#define CALL_GetColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetColorTable, parameters)
+#define GET_GetColorTable(disp) GET_by_offset(disp, _gloffset_GetColorTable)
+#define SET_GetColorTable(disp, fn) SET_by_offset(disp, _gloffset_GetColorTable, fn)
+#define CALL_GetColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetColorTableParameterfv, parameters)
+#define GET_GetColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameterfv)
+#define SET_GetColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameterfv, fn)
+#define CALL_GetColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetColorTableParameteriv, parameters)
+#define GET_GetColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameteriv)
+#define SET_GetColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameteriv, fn)
+#define CALL_ColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorSubTable, parameters)
+#define GET_ColorSubTable(disp) GET_by_offset(disp, _gloffset_ColorSubTable)
+#define SET_ColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_ColorSubTable, fn)
+#define CALL_CopyColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLint, GLint, GLsizei)), _gloffset_CopyColorSubTable, parameters)
+#define GET_CopyColorSubTable(disp) GET_by_offset(disp, _gloffset_CopyColorSubTable)
+#define SET_CopyColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorSubTable, fn)
+#define CALL_ConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter1D, parameters)
+#define GET_ConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter1D)
+#define SET_ConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter1D, fn)
+#define CALL_ConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter2D, parameters)
+#define GET_ConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter2D)
+#define SET_ConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter2D, fn)
+#define CALL_ConvolutionParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_ConvolutionParameterf, parameters)
+#define GET_ConvolutionParameterf(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterf)
+#define SET_ConvolutionParameterf(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterf, fn)
+#define CALL_ConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ConvolutionParameterfv, parameters)
+#define GET_ConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterfv)
+#define SET_ConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterfv, fn)
+#define CALL_ConvolutionParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_ConvolutionParameteri, parameters)
+#define GET_ConvolutionParameteri(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteri)
+#define SET_ConvolutionParameteri(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteri, fn)
+#define CALL_ConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ConvolutionParameteriv, parameters)
+#define GET_ConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteriv)
+#define SET_ConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteriv, fn)
+#define CALL_CopyConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyConvolutionFilter1D, parameters)
+#define GET_CopyConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter1D)
+#define SET_CopyConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter1D, fn)
+#define CALL_CopyConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyConvolutionFilter2D, parameters)
+#define GET_CopyConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter2D)
+#define SET_CopyConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter2D, fn)
+#define CALL_GetConvolutionFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetConvolutionFilter, parameters)
+#define GET_GetConvolutionFilter(disp) GET_by_offset(disp, _gloffset_GetConvolutionFilter)
+#define SET_GetConvolutionFilter(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionFilter, fn)
+#define CALL_GetConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetConvolutionParameterfv, parameters)
+#define GET_GetConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameterfv)
+#define SET_GetConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameterfv, fn)
+#define CALL_GetConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetConvolutionParameteriv, parameters)
+#define GET_GetConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameteriv)
+#define SET_GetConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameteriv, fn)
+#define CALL_GetSeparableFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)), _gloffset_GetSeparableFilter, parameters)
+#define GET_GetSeparableFilter(disp) GET_by_offset(disp, _gloffset_GetSeparableFilter)
+#define SET_GetSeparableFilter(disp, fn) SET_by_offset(disp, _gloffset_GetSeparableFilter, fn)
+#define CALL_SeparableFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)), _gloffset_SeparableFilter2D, parameters)
+#define GET_SeparableFilter2D(disp) GET_by_offset(disp, _gloffset_SeparableFilter2D)
+#define SET_SeparableFilter2D(disp, fn) SET_by_offset(disp, _gloffset_SeparableFilter2D, fn)
+#define CALL_GetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetHistogram, parameters)
+#define GET_GetHistogram(disp) GET_by_offset(disp, _gloffset_GetHistogram)
+#define SET_GetHistogram(disp, fn) SET_by_offset(disp, _gloffset_GetHistogram, fn)
+#define CALL_GetHistogramParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetHistogramParameterfv, parameters)
+#define GET_GetHistogramParameterfv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameterfv)
+#define SET_GetHistogramParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameterfv, fn)
+#define CALL_GetHistogramParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetHistogramParameteriv, parameters)
+#define GET_GetHistogramParameteriv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameteriv)
+#define SET_GetHistogramParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameteriv, fn)
+#define CALL_GetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetMinmax, parameters)
+#define GET_GetMinmax(disp) GET_by_offset(disp, _gloffset_GetMinmax)
+#define SET_GetMinmax(disp, fn) SET_by_offset(disp, _gloffset_GetMinmax, fn)
+#define CALL_GetMinmaxParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMinmaxParameterfv, parameters)
+#define GET_GetMinmaxParameterfv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameterfv)
+#define SET_GetMinmaxParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameterfv, fn)
+#define CALL_GetMinmaxParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMinmaxParameteriv, parameters)
+#define GET_GetMinmaxParameteriv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameteriv)
+#define SET_GetMinmaxParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameteriv, fn)
+#define CALL_Histogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLboolean)), _gloffset_Histogram, parameters)
+#define GET_Histogram(disp) GET_by_offset(disp, _gloffset_Histogram)
+#define SET_Histogram(disp, fn) SET_by_offset(disp, _gloffset_Histogram, fn)
+#define CALL_Minmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLboolean)), _gloffset_Minmax, parameters)
+#define GET_Minmax(disp) GET_by_offset(disp, _gloffset_Minmax)
+#define SET_Minmax(disp, fn) SET_by_offset(disp, _gloffset_Minmax, fn)
+#define CALL_ResetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetHistogram, parameters)
+#define GET_ResetHistogram(disp) GET_by_offset(disp, _gloffset_ResetHistogram)
+#define SET_ResetHistogram(disp, fn) SET_by_offset(disp, _gloffset_ResetHistogram, fn)
+#define CALL_ResetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetMinmax, parameters)
+#define GET_ResetMinmax(disp) GET_by_offset(disp, _gloffset_ResetMinmax)
+#define SET_ResetMinmax(disp, fn) SET_by_offset(disp, _gloffset_ResetMinmax, fn)
+#define CALL_TexImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage3D, parameters)
+#define GET_TexImage3D(disp) GET_by_offset(disp, _gloffset_TexImage3D)
+#define SET_TexImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexImage3D, fn)
+#define CALL_TexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage3D, parameters)
+#define GET_TexSubImage3D(disp) GET_by_offset(disp, _gloffset_TexSubImage3D)
+#define SET_TexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage3D, fn)
+#define CALL_CopyTexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage3D, parameters)
+#define GET_CopyTexSubImage3D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage3D)
+#define SET_CopyTexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn)
+#define CALL_ActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveTextureARB, parameters)
+#define GET_ActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ActiveTextureARB)
+#define SET_ActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ActiveTextureARB, fn)
+#define CALL_ClientActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ClientActiveTextureARB, parameters)
+#define GET_ClientActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ClientActiveTextureARB)
+#define SET_ClientActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ClientActiveTextureARB, fn)
+#define CALL_MultiTexCoord1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble)), _gloffset_MultiTexCoord1dARB, parameters)
+#define GET_MultiTexCoord1dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dARB)
+#define SET_MultiTexCoord1dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dARB, fn)
+#define CALL_MultiTexCoord1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord1dvARB, parameters)
+#define GET_MultiTexCoord1dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dvARB)
+#define SET_MultiTexCoord1dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dvARB, fn)
+#define CALL_MultiTexCoord1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_MultiTexCoord1fARB, parameters)
+#define GET_MultiTexCoord1fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fARB)
+#define SET_MultiTexCoord1fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fARB, fn)
+#define CALL_MultiTexCoord1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord1fvARB, parameters)
+#define GET_MultiTexCoord1fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fvARB)
+#define SET_MultiTexCoord1fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fvARB, fn)
+#define CALL_MultiTexCoord1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_MultiTexCoord1iARB, parameters)
+#define GET_MultiTexCoord1iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1iARB)
+#define SET_MultiTexCoord1iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1iARB, fn)
+#define CALL_MultiTexCoord1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord1ivARB, parameters)
+#define GET_MultiTexCoord1ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1ivARB)
+#define SET_MultiTexCoord1ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1ivARB, fn)
+#define CALL_MultiTexCoord1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort)), _gloffset_MultiTexCoord1sARB, parameters)
+#define GET_MultiTexCoord1sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1sARB)
+#define SET_MultiTexCoord1sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1sARB, fn)
+#define CALL_MultiTexCoord1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord1svARB, parameters)
+#define GET_MultiTexCoord1svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1svARB)
+#define SET_MultiTexCoord1svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1svARB, fn)
+#define CALL_MultiTexCoord2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble)), _gloffset_MultiTexCoord2dARB, parameters)
+#define GET_MultiTexCoord2dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dARB)
+#define SET_MultiTexCoord2dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dARB, fn)
+#define CALL_MultiTexCoord2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord2dvARB, parameters)
+#define GET_MultiTexCoord2dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dvARB)
+#define SET_MultiTexCoord2dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dvARB, fn)
+#define CALL_MultiTexCoord2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat)), _gloffset_MultiTexCoord2fARB, parameters)
+#define GET_MultiTexCoord2fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fARB)
+#define SET_MultiTexCoord2fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fARB, fn)
+#define CALL_MultiTexCoord2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord2fvARB, parameters)
+#define GET_MultiTexCoord2fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fvARB)
+#define SET_MultiTexCoord2fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fvARB, fn)
+#define CALL_MultiTexCoord2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_MultiTexCoord2iARB, parameters)
+#define GET_MultiTexCoord2iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2iARB)
+#define SET_MultiTexCoord2iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2iARB, fn)
+#define CALL_MultiTexCoord2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord2ivARB, parameters)
+#define GET_MultiTexCoord2ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2ivARB)
+#define SET_MultiTexCoord2ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2ivARB, fn)
+#define CALL_MultiTexCoord2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort)), _gloffset_MultiTexCoord2sARB, parameters)
+#define GET_MultiTexCoord2sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2sARB)
+#define SET_MultiTexCoord2sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2sARB, fn)
+#define CALL_MultiTexCoord2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord2svARB, parameters)
+#define GET_MultiTexCoord2svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2svARB)
+#define SET_MultiTexCoord2svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2svARB, fn)
+#define CALL_MultiTexCoord3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord3dARB, parameters)
+#define GET_MultiTexCoord3dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dARB)
+#define SET_MultiTexCoord3dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dARB, fn)
+#define CALL_MultiTexCoord3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord3dvARB, parameters)
+#define GET_MultiTexCoord3dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dvARB)
+#define SET_MultiTexCoord3dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dvARB, fn)
+#define CALL_MultiTexCoord3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord3fARB, parameters)
+#define GET_MultiTexCoord3fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fARB)
+#define SET_MultiTexCoord3fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fARB, fn)
+#define CALL_MultiTexCoord3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord3fvARB, parameters)
+#define GET_MultiTexCoord3fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fvARB)
+#define SET_MultiTexCoord3fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fvARB, fn)
+#define CALL_MultiTexCoord3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint)), _gloffset_MultiTexCoord3iARB, parameters)
+#define GET_MultiTexCoord3iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3iARB)
+#define SET_MultiTexCoord3iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3iARB, fn)
+#define CALL_MultiTexCoord3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord3ivARB, parameters)
+#define GET_MultiTexCoord3ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3ivARB)
+#define SET_MultiTexCoord3ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3ivARB, fn)
+#define CALL_MultiTexCoord3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord3sARB, parameters)
+#define GET_MultiTexCoord3sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3sARB)
+#define SET_MultiTexCoord3sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3sARB, fn)
+#define CALL_MultiTexCoord3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord3svARB, parameters)
+#define GET_MultiTexCoord3svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3svARB)
+#define SET_MultiTexCoord3svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3svARB, fn)
+#define CALL_MultiTexCoord4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord4dARB, parameters)
+#define GET_MultiTexCoord4dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dARB)
+#define SET_MultiTexCoord4dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dARB, fn)
+#define CALL_MultiTexCoord4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord4dvARB, parameters)
+#define GET_MultiTexCoord4dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dvARB)
+#define SET_MultiTexCoord4dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dvARB, fn)
+#define CALL_MultiTexCoord4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord4fARB, parameters)
+#define GET_MultiTexCoord4fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fARB)
+#define SET_MultiTexCoord4fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fARB, fn)
+#define CALL_MultiTexCoord4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord4fvARB, parameters)
+#define GET_MultiTexCoord4fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fvARB)
+#define SET_MultiTexCoord4fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fvARB, fn)
+#define CALL_MultiTexCoord4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_MultiTexCoord4iARB, parameters)
+#define GET_MultiTexCoord4iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4iARB)
+#define SET_MultiTexCoord4iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4iARB, fn)
+#define CALL_MultiTexCoord4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord4ivARB, parameters)
+#define GET_MultiTexCoord4ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4ivARB)
+#define SET_MultiTexCoord4ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4ivARB, fn)
+#define CALL_MultiTexCoord4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord4sARB, parameters)
+#define GET_MultiTexCoord4sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4sARB)
+#define SET_MultiTexCoord4sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4sARB, fn)
+#define CALL_MultiTexCoord4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord4svARB, parameters)
+#define GET_MultiTexCoord4svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4svARB)
+#define SET_MultiTexCoord4svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4svARB, fn)
+#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_AttachShader, parameters)
+#define GET_AttachShader(disp) GET_by_offset(disp, _gloffset_AttachShader)
+#define SET_AttachShader(disp, fn) SET_by_offset(disp, _gloffset_AttachShader, fn)
+#define CALL_CreateProgram(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(void)), _gloffset_CreateProgram, parameters)
+#define GET_CreateProgram(disp) GET_by_offset(disp, _gloffset_CreateProgram)
+#define SET_CreateProgram(disp, fn) SET_by_offset(disp, _gloffset_CreateProgram, fn)
+#define CALL_CreateShader(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum)), _gloffset_CreateShader, parameters)
+#define GET_CreateShader(disp) GET_by_offset(disp, _gloffset_CreateShader)
+#define SET_CreateShader(disp, fn) SET_by_offset(disp, _gloffset_CreateShader, fn)
+#define CALL_DeleteProgram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteProgram, parameters)
+#define GET_DeleteProgram(disp) GET_by_offset(disp, _gloffset_DeleteProgram)
+#define SET_DeleteProgram(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgram, fn)
+#define CALL_DeleteShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteShader, parameters)
+#define GET_DeleteShader(disp) GET_by_offset(disp, _gloffset_DeleteShader)
+#define SET_DeleteShader(disp, fn) SET_by_offset(disp, _gloffset_DeleteShader, fn)
+#define CALL_DetachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_DetachShader, parameters)
+#define GET_DetachShader(disp) GET_by_offset(disp, _gloffset_DetachShader)
+#define SET_DetachShader(disp, fn) SET_by_offset(disp, _gloffset_DetachShader, fn)
+#define CALL_GetAttachedShaders(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLuint *)), _gloffset_GetAttachedShaders, parameters)
+#define GET_GetAttachedShaders(disp) GET_by_offset(disp, _gloffset_GetAttachedShaders)
+#define SET_GetAttachedShaders(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedShaders, fn)
+#define CALL_GetProgramInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetProgramInfoLog, parameters)
+#define GET_GetProgramInfoLog(disp) GET_by_offset(disp, _gloffset_GetProgramInfoLog)
+#define SET_GetProgramInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn)
+#define CALL_GetProgramiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramiv, parameters)
+#define GET_GetProgramiv(disp) GET_by_offset(disp, _gloffset_GetProgramiv)
+#define SET_GetProgramiv(disp, fn) SET_by_offset(disp, _gloffset_GetProgramiv, fn)
+#define CALL_GetShaderInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetShaderInfoLog, parameters)
+#define GET_GetShaderInfoLog(disp) GET_by_offset(disp, _gloffset_GetShaderInfoLog)
+#define SET_GetShaderInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn)
+#define CALL_GetShaderiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetShaderiv, parameters)
+#define GET_GetShaderiv(disp) GET_by_offset(disp, _gloffset_GetShaderiv)
+#define SET_GetShaderiv(disp, fn) SET_by_offset(disp, _gloffset_GetShaderiv, fn)
+#define CALL_IsProgram(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgram, parameters)
+#define GET_IsProgram(disp) GET_by_offset(disp, _gloffset_IsProgram)
+#define SET_IsProgram(disp, fn) SET_by_offset(disp, _gloffset_IsProgram, fn)
+#define CALL_IsShader(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsShader, parameters)
+#define GET_IsShader(disp) GET_by_offset(disp, _gloffset_IsShader)
+#define SET_IsShader(disp, fn) SET_by_offset(disp, _gloffset_IsShader, fn)
+#define CALL_StencilFuncSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparate, parameters)
+#define GET_StencilFuncSeparate(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparate)
+#define SET_StencilFuncSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn)
+#define CALL_StencilMaskSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_StencilMaskSeparate, parameters)
+#define GET_StencilMaskSeparate(disp) GET_by_offset(disp, _gloffset_StencilMaskSeparate)
+#define SET_StencilMaskSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn)
+#define CALL_StencilOpSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_StencilOpSeparate, parameters)
+#define GET_StencilOpSeparate(disp) GET_by_offset(disp, _gloffset_StencilOpSeparate)
+#define SET_StencilOpSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilOpSeparate, fn)
+#define CALL_UniformMatrix2x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x3fv, parameters)
+#define GET_UniformMatrix2x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x3fv)
+#define SET_UniformMatrix2x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x3fv, fn)
+#define CALL_UniformMatrix2x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x4fv, parameters)
+#define GET_UniformMatrix2x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x4fv)
+#define SET_UniformMatrix2x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x4fv, fn)
+#define CALL_UniformMatrix3x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x2fv, parameters)
+#define GET_UniformMatrix3x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x2fv)
+#define SET_UniformMatrix3x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x2fv, fn)
+#define CALL_UniformMatrix3x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x4fv, parameters)
+#define GET_UniformMatrix3x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x4fv)
+#define SET_UniformMatrix3x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x4fv, fn)
+#define CALL_UniformMatrix4x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x2fv, parameters)
+#define GET_UniformMatrix4x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x2fv)
+#define SET_UniformMatrix4x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x2fv, fn)
+#define CALL_UniformMatrix4x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x3fv, parameters)
+#define GET_UniformMatrix4x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x3fv)
+#define SET_UniformMatrix4x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x3fv, fn)
+#define CALL_ClampColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColor, parameters)
+#define GET_ClampColor(disp) GET_by_offset(disp, _gloffset_ClampColor)
+#define SET_ClampColor(disp, fn) SET_by_offset(disp, _gloffset_ClampColor, fn)
+#define CALL_ClearBufferfi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat, const GLint)), _gloffset_ClearBufferfi, parameters)
+#define GET_ClearBufferfi(disp) GET_by_offset(disp, _gloffset_ClearBufferfi)
+#define SET_ClearBufferfi(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfi, fn)
+#define CALL_ClearBufferfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat *)), _gloffset_ClearBufferfv, parameters)
+#define GET_ClearBufferfv(disp) GET_by_offset(disp, _gloffset_ClearBufferfv)
+#define SET_ClearBufferfv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfv, fn)
+#define CALL_ClearBufferiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLint *)), _gloffset_ClearBufferiv, parameters)
+#define GET_ClearBufferiv(disp) GET_by_offset(disp, _gloffset_ClearBufferiv)
+#define SET_ClearBufferiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferiv, fn)
+#define CALL_ClearBufferuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLuint *)), _gloffset_ClearBufferuiv, parameters)
+#define GET_ClearBufferuiv(disp) GET_by_offset(disp, _gloffset_ClearBufferuiv)
+#define SET_ClearBufferuiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferuiv, fn)
+#define CALL_GetStringi(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_GetStringi, parameters)
+#define GET_GetStringi(disp) GET_by_offset(disp, _gloffset_GetStringi)
+#define SET_GetStringi(disp, fn) SET_by_offset(disp, _gloffset_GetStringi, fn)
+#define CALL_TexBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint)), _gloffset_TexBuffer, parameters)
+#define GET_TexBuffer(disp) GET_by_offset(disp, _gloffset_TexBuffer)
+#define SET_TexBuffer(disp, fn) SET_by_offset(disp, _gloffset_TexBuffer, fn)
+#define CALL_FramebufferTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture, parameters)
+#define GET_FramebufferTexture(disp) GET_by_offset(disp, _gloffset_FramebufferTexture)
+#define SET_FramebufferTexture(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture, fn)
+#define CALL_GetBufferParameteri64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint64 *)), _gloffset_GetBufferParameteri64v, parameters)
+#define GET_GetBufferParameteri64v(disp) GET_by_offset(disp, _gloffset_GetBufferParameteri64v)
+#define SET_GetBufferParameteri64v(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameteri64v, fn)
+#define CALL_GetInteger64i_v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint64 *)), _gloffset_GetInteger64i_v, parameters)
+#define GET_GetInteger64i_v(disp) GET_by_offset(disp, _gloffset_GetInteger64i_v)
+#define SET_GetInteger64i_v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64i_v, fn)
+#define CALL_VertexAttribDivisor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisor, parameters)
+#define GET_VertexAttribDivisor(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisor)
+#define SET_VertexAttribDivisor(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisor, fn)
+#define CALL_LoadTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadTransposeMatrixdARB, parameters)
+#define GET_LoadTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB)
+#define SET_LoadTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB, fn)
+#define CALL_LoadTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadTransposeMatrixfARB, parameters)
+#define GET_LoadTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB)
+#define SET_LoadTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB, fn)
+#define CALL_MultTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultTransposeMatrixdARB, parameters)
+#define GET_MultTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixdARB)
+#define SET_MultTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixdARB, fn)
+#define CALL_MultTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultTransposeMatrixfARB, parameters)
+#define GET_MultTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixfARB)
+#define SET_MultTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixfARB, fn)
+#define CALL_SampleCoverageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleCoverageARB, parameters)
+#define GET_SampleCoverageARB(disp) GET_by_offset(disp, _gloffset_SampleCoverageARB)
+#define SET_SampleCoverageARB(disp, fn) SET_by_offset(disp, _gloffset_SampleCoverageARB, fn)
+#define CALL_CompressedTexImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage1DARB, parameters)
+#define GET_CompressedTexImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage1DARB)
+#define SET_CompressedTexImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage1DARB, fn)
+#define CALL_CompressedTexImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage2DARB, parameters)
+#define GET_CompressedTexImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage2DARB)
+#define SET_CompressedTexImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage2DARB, fn)
+#define CALL_CompressedTexImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage3DARB, parameters)
+#define GET_CompressedTexImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage3DARB)
+#define SET_CompressedTexImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage3DARB, fn)
+#define CALL_CompressedTexSubImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage1DARB, parameters)
+#define GET_CompressedTexSubImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB)
+#define SET_CompressedTexSubImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB, fn)
+#define CALL_CompressedTexSubImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage2DARB, parameters)
+#define GET_CompressedTexSubImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB)
+#define SET_CompressedTexSubImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB, fn)
+#define CALL_CompressedTexSubImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage3DARB, parameters)
+#define GET_CompressedTexSubImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB)
+#define SET_CompressedTexSubImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB, fn)
+#define CALL_GetCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLvoid *)), _gloffset_GetCompressedTexImageARB, parameters)
+#define GET_GetCompressedTexImageARB(disp) GET_by_offset(disp, _gloffset_GetCompressedTexImageARB)
+#define SET_GetCompressedTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetCompressedTexImageARB, fn)
+#define CALL_DisableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DisableVertexAttribArrayARB, parameters)
+#define GET_DisableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB)
+#define SET_DisableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB, fn)
+#define CALL_EnableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_EnableVertexAttribArrayARB, parameters)
+#define GET_EnableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB)
+#define SET_EnableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB, fn)
+#define CALL_GetProgramEnvParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramEnvParameterdvARB, parameters)
+#define GET_GetProgramEnvParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB)
+#define SET_GetProgramEnvParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB, fn)
+#define CALL_GetProgramEnvParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramEnvParameterfvARB, parameters)
+#define GET_GetProgramEnvParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB)
+#define SET_GetProgramEnvParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB, fn)
+#define CALL_GetProgramLocalParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramLocalParameterdvARB, parameters)
+#define GET_GetProgramLocalParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB)
+#define SET_GetProgramLocalParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB, fn)
+#define CALL_GetProgramLocalParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramLocalParameterfvARB, parameters)
+#define GET_GetProgramLocalParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB)
+#define SET_GetProgramLocalParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB, fn)
+#define CALL_GetProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid *)), _gloffset_GetProgramStringARB, parameters)
+#define GET_GetProgramStringARB(disp) GET_by_offset(disp, _gloffset_GetProgramStringARB)
+#define SET_GetProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringARB, fn)
+#define CALL_GetProgramivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetProgramivARB, parameters)
+#define GET_GetProgramivARB(disp) GET_by_offset(disp, _gloffset_GetProgramivARB)
+#define SET_GetProgramivARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivARB, fn)
+#define CALL_GetVertexAttribdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvARB, parameters)
+#define GET_GetVertexAttribdvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvARB)
+#define SET_GetVertexAttribdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvARB, fn)
+#define CALL_GetVertexAttribfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvARB, parameters)
+#define GET_GetVertexAttribfvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvARB)
+#define SET_GetVertexAttribfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvARB, fn)
+#define CALL_GetVertexAttribivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivARB, parameters)
+#define GET_GetVertexAttribivARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivARB)
+#define SET_GetVertexAttribivARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivARB, fn)
+#define CALL_ProgramEnvParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramEnvParameter4dARB, parameters)
+#define GET_ProgramEnvParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB)
+#define SET_ProgramEnvParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB, fn)
+#define CALL_ProgramEnvParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramEnvParameter4dvARB, parameters)
+#define GET_ProgramEnvParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB)
+#define SET_ProgramEnvParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB, fn)
+#define CALL_ProgramEnvParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramEnvParameter4fARB, parameters)
+#define GET_ProgramEnvParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB)
+#define SET_ProgramEnvParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB, fn)
+#define CALL_ProgramEnvParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramEnvParameter4fvARB, parameters)
+#define GET_ProgramEnvParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB)
+#define SET_ProgramEnvParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB, fn)
+#define CALL_ProgramLocalParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramLocalParameter4dARB, parameters)
+#define GET_ProgramLocalParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB)
+#define SET_ProgramLocalParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB, fn)
+#define CALL_ProgramLocalParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramLocalParameter4dvARB, parameters)
+#define GET_ProgramLocalParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB)
+#define SET_ProgramLocalParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB, fn)
+#define CALL_ProgramLocalParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramLocalParameter4fARB, parameters)
+#define GET_ProgramLocalParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB)
+#define SET_ProgramLocalParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB, fn)
+#define CALL_ProgramLocalParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramLocalParameter4fvARB, parameters)
+#define GET_ProgramLocalParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB)
+#define SET_ProgramLocalParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB, fn)
+#define CALL_ProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, const GLvoid *)), _gloffset_ProgramStringARB, parameters)
+#define GET_ProgramStringARB(disp) GET_by_offset(disp, _gloffset_ProgramStringARB)
+#define SET_ProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramStringARB, fn)
+#define CALL_VertexAttrib1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dARB, parameters)
+#define GET_VertexAttrib1dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dARB)
+#define SET_VertexAttrib1dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dARB, fn)
+#define CALL_VertexAttrib1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvARB, parameters)
+#define GET_VertexAttrib1dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvARB)
+#define SET_VertexAttrib1dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvARB, fn)
+#define CALL_VertexAttrib1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fARB, parameters)
+#define GET_VertexAttrib1fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fARB)
+#define SET_VertexAttrib1fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fARB, fn)
+#define CALL_VertexAttrib1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvARB, parameters)
+#define GET_VertexAttrib1fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvARB)
+#define SET_VertexAttrib1fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvARB, fn)
+#define CALL_VertexAttrib1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sARB, parameters)
+#define GET_VertexAttrib1sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sARB)
+#define SET_VertexAttrib1sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sARB, fn)
+#define CALL_VertexAttrib1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svARB, parameters)
+#define GET_VertexAttrib1svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svARB)
+#define SET_VertexAttrib1svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svARB, fn)
+#define CALL_VertexAttrib2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dARB, parameters)
+#define GET_VertexAttrib2dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dARB)
+#define SET_VertexAttrib2dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dARB, fn)
+#define CALL_VertexAttrib2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvARB, parameters)
+#define GET_VertexAttrib2dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvARB)
+#define SET_VertexAttrib2dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvARB, fn)
+#define CALL_VertexAttrib2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fARB, parameters)
+#define GET_VertexAttrib2fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fARB)
+#define SET_VertexAttrib2fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fARB, fn)
+#define CALL_VertexAttrib2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvARB, parameters)
+#define GET_VertexAttrib2fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvARB)
+#define SET_VertexAttrib2fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvARB, fn)
+#define CALL_VertexAttrib2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sARB, parameters)
+#define GET_VertexAttrib2sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sARB)
+#define SET_VertexAttrib2sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sARB, fn)
+#define CALL_VertexAttrib2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svARB, parameters)
+#define GET_VertexAttrib2svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svARB)
+#define SET_VertexAttrib2svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svARB, fn)
+#define CALL_VertexAttrib3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dARB, parameters)
+#define GET_VertexAttrib3dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dARB)
+#define SET_VertexAttrib3dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dARB, fn)
+#define CALL_VertexAttrib3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvARB, parameters)
+#define GET_VertexAttrib3dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvARB)
+#define SET_VertexAttrib3dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvARB, fn)
+#define CALL_VertexAttrib3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fARB, parameters)
+#define GET_VertexAttrib3fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fARB)
+#define SET_VertexAttrib3fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fARB, fn)
+#define CALL_VertexAttrib3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvARB, parameters)
+#define GET_VertexAttrib3fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvARB)
+#define SET_VertexAttrib3fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvARB, fn)
+#define CALL_VertexAttrib3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sARB, parameters)
+#define GET_VertexAttrib3sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sARB)
+#define SET_VertexAttrib3sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sARB, fn)
+#define CALL_VertexAttrib3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svARB, parameters)
+#define GET_VertexAttrib3svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svARB)
+#define SET_VertexAttrib3svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svARB, fn)
+#define CALL_VertexAttrib4NbvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4NbvARB, parameters)
+#define GET_VertexAttrib4NbvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NbvARB)
+#define SET_VertexAttrib4NbvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NbvARB, fn)
+#define CALL_VertexAttrib4NivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4NivARB, parameters)
+#define GET_VertexAttrib4NivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NivARB)
+#define SET_VertexAttrib4NivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NivARB, fn)
+#define CALL_VertexAttrib4NsvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4NsvARB, parameters)
+#define GET_VertexAttrib4NsvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NsvARB)
+#define SET_VertexAttrib4NsvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NsvARB, fn)
+#define CALL_VertexAttrib4NubARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4NubARB, parameters)
+#define GET_VertexAttrib4NubARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubARB)
+#define SET_VertexAttrib4NubARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubARB, fn)
+#define CALL_VertexAttrib4NubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4NubvARB, parameters)
+#define GET_VertexAttrib4NubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubvARB)
+#define SET_VertexAttrib4NubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubvARB, fn)
+#define CALL_VertexAttrib4NuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4NuivARB, parameters)
+#define GET_VertexAttrib4NuivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NuivARB)
+#define SET_VertexAttrib4NuivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NuivARB, fn)
+#define CALL_VertexAttrib4NusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4NusvARB, parameters)
+#define GET_VertexAttrib4NusvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NusvARB)
+#define SET_VertexAttrib4NusvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NusvARB, fn)
+#define CALL_VertexAttrib4bvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4bvARB, parameters)
+#define GET_VertexAttrib4bvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4bvARB)
+#define SET_VertexAttrib4bvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4bvARB, fn)
+#define CALL_VertexAttrib4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dARB, parameters)
+#define GET_VertexAttrib4dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dARB)
+#define SET_VertexAttrib4dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dARB, fn)
+#define CALL_VertexAttrib4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvARB, parameters)
+#define GET_VertexAttrib4dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvARB)
+#define SET_VertexAttrib4dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvARB, fn)
+#define CALL_VertexAttrib4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fARB, parameters)
+#define GET_VertexAttrib4fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fARB)
+#define SET_VertexAttrib4fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fARB, fn)
+#define CALL_VertexAttrib4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvARB, parameters)
+#define GET_VertexAttrib4fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvARB)
+#define SET_VertexAttrib4fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvARB, fn)
+#define CALL_VertexAttrib4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4ivARB, parameters)
+#define GET_VertexAttrib4ivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ivARB)
+#define SET_VertexAttrib4ivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ivARB, fn)
+#define CALL_VertexAttrib4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sARB, parameters)
+#define GET_VertexAttrib4sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sARB)
+#define SET_VertexAttrib4sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sARB, fn)
+#define CALL_VertexAttrib4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svARB, parameters)
+#define GET_VertexAttrib4svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svARB)
+#define SET_VertexAttrib4svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svARB, fn)
+#define CALL_VertexAttrib4ubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvARB, parameters)
+#define GET_VertexAttrib4ubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvARB)
+#define SET_VertexAttrib4ubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvARB, fn)
+#define CALL_VertexAttrib4uivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4uivARB, parameters)
+#define GET_VertexAttrib4uivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4uivARB)
+#define SET_VertexAttrib4uivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4uivARB, fn)
+#define CALL_VertexAttrib4usvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4usvARB, parameters)
+#define GET_VertexAttrib4usvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4usvARB)
+#define SET_VertexAttrib4usvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4usvARB, fn)
+#define CALL_VertexAttribPointerARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerARB, parameters)
+#define GET_VertexAttribPointerARB(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerARB)
+#define SET_VertexAttribPointerARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerARB, fn)
+#define CALL_BindBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindBufferARB, parameters)
+#define GET_BindBufferARB(disp) GET_by_offset(disp, _gloffset_BindBufferARB)
+#define SET_BindBufferARB(disp, fn) SET_by_offset(disp, _gloffset_BindBufferARB, fn)
+#define CALL_BufferDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)), _gloffset_BufferDataARB, parameters)
+#define GET_BufferDataARB(disp) GET_by_offset(disp, _gloffset_BufferDataARB)
+#define SET_BufferDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferDataARB, fn)
+#define CALL_BufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)), _gloffset_BufferSubDataARB, parameters)
+#define GET_BufferSubDataARB(disp) GET_by_offset(disp, _gloffset_BufferSubDataARB)
+#define SET_BufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferSubDataARB, fn)
+#define CALL_DeleteBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteBuffersARB, parameters)
+#define GET_DeleteBuffersARB(disp) GET_by_offset(disp, _gloffset_DeleteBuffersARB)
+#define SET_DeleteBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteBuffersARB, fn)
+#define CALL_GenBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenBuffersARB, parameters)
+#define GET_GenBuffersARB(disp) GET_by_offset(disp, _gloffset_GenBuffersARB)
+#define SET_GenBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_GenBuffersARB, fn)
+#define CALL_GetBufferParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetBufferParameterivARB, parameters)
+#define GET_GetBufferParameterivARB(disp) GET_by_offset(disp, _gloffset_GetBufferParameterivARB)
+#define SET_GetBufferParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameterivARB, fn)
+#define CALL_GetBufferPointervARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetBufferPointervARB, parameters)
+#define GET_GetBufferPointervARB(disp) GET_by_offset(disp, _gloffset_GetBufferPointervARB)
+#define SET_GetBufferPointervARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferPointervARB, fn)
+#define CALL_GetBufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)), _gloffset_GetBufferSubDataARB, parameters)
+#define GET_GetBufferSubDataARB(disp) GET_by_offset(disp, _gloffset_GetBufferSubDataARB)
+#define SET_GetBufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferSubDataARB, fn)
+#define CALL_IsBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsBufferARB, parameters)
+#define GET_IsBufferARB(disp) GET_by_offset(disp, _gloffset_IsBufferARB)
+#define SET_IsBufferARB(disp, fn) SET_by_offset(disp, _gloffset_IsBufferARB, fn)
+#define CALL_MapBufferARB(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_MapBufferARB, parameters)
+#define GET_MapBufferARB(disp) GET_by_offset(disp, _gloffset_MapBufferARB)
+#define SET_MapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_MapBufferARB, fn)
+#define CALL_UnmapBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_UnmapBufferARB, parameters)
+#define GET_UnmapBufferARB(disp) GET_by_offset(disp, _gloffset_UnmapBufferARB)
+#define SET_UnmapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_UnmapBufferARB, fn)
+#define CALL_BeginQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BeginQueryARB, parameters)
+#define GET_BeginQueryARB(disp) GET_by_offset(disp, _gloffset_BeginQueryARB)
+#define SET_BeginQueryARB(disp, fn) SET_by_offset(disp, _gloffset_BeginQueryARB, fn)
+#define CALL_DeleteQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteQueriesARB, parameters)
+#define GET_DeleteQueriesARB(disp) GET_by_offset(disp, _gloffset_DeleteQueriesARB)
+#define SET_DeleteQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteQueriesARB, fn)
+#define CALL_EndQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EndQueryARB, parameters)
+#define GET_EndQueryARB(disp) GET_by_offset(disp, _gloffset_EndQueryARB)
+#define SET_EndQueryARB(disp, fn) SET_by_offset(disp, _gloffset_EndQueryARB, fn)
+#define CALL_GenQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenQueriesARB, parameters)
+#define GET_GenQueriesARB(disp) GET_by_offset(disp, _gloffset_GenQueriesARB)
+#define SET_GenQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_GenQueriesARB, fn)
+#define CALL_GetQueryObjectivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetQueryObjectivARB, parameters)
+#define GET_GetQueryObjectivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectivARB)
+#define SET_GetQueryObjectivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectivARB, fn)
+#define CALL_GetQueryObjectuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetQueryObjectuivARB, parameters)
+#define GET_GetQueryObjectuivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectuivARB)
+#define SET_GetQueryObjectuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectuivARB, fn)
+#define CALL_GetQueryivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetQueryivARB, parameters)
+#define GET_GetQueryivARB(disp) GET_by_offset(disp, _gloffset_GetQueryivARB)
+#define SET_GetQueryivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryivARB, fn)
+#define CALL_IsQueryARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsQueryARB, parameters)
+#define GET_IsQueryARB(disp) GET_by_offset(disp, _gloffset_IsQueryARB)
+#define SET_IsQueryARB(disp, fn) SET_by_offset(disp, _gloffset_IsQueryARB, fn)
+#define CALL_AttachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_AttachObjectARB, parameters)
+#define GET_AttachObjectARB(disp) GET_by_offset(disp, _gloffset_AttachObjectARB)
+#define SET_AttachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_AttachObjectARB, fn)
+#define CALL_CompileShaderARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_CompileShaderARB, parameters)
+#define GET_CompileShaderARB(disp) GET_by_offset(disp, _gloffset_CompileShaderARB)
+#define SET_CompileShaderARB(disp, fn) SET_by_offset(disp, _gloffset_CompileShaderARB, fn)
+#define CALL_CreateProgramObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(void)), _gloffset_CreateProgramObjectARB, parameters)
+#define GET_CreateProgramObjectARB(disp) GET_by_offset(disp, _gloffset_CreateProgramObjectARB)
+#define SET_CreateProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateProgramObjectARB, fn)
+#define CALL_CreateShaderObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_CreateShaderObjectARB, parameters)
+#define GET_CreateShaderObjectARB(disp) GET_by_offset(disp, _gloffset_CreateShaderObjectARB)
+#define SET_CreateShaderObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderObjectARB, fn)
+#define CALL_DeleteObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_DeleteObjectARB, parameters)
+#define GET_DeleteObjectARB(disp) GET_by_offset(disp, _gloffset_DeleteObjectARB)
+#define SET_DeleteObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteObjectARB, fn)
+#define CALL_DetachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_DetachObjectARB, parameters)
+#define GET_DetachObjectARB(disp) GET_by_offset(disp, _gloffset_DetachObjectARB)
+#define SET_DetachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DetachObjectARB, fn)
+#define CALL_GetActiveUniformARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveUniformARB, parameters)
+#define GET_GetActiveUniformARB(disp) GET_by_offset(disp, _gloffset_GetActiveUniformARB)
+#define SET_GetActiveUniformARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveUniformARB, fn)
+#define CALL_GetAttachedObjectsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)), _gloffset_GetAttachedObjectsARB, parameters)
+#define GET_GetAttachedObjectsARB(disp) GET_by_offset(disp, _gloffset_GetAttachedObjectsARB)
+#define SET_GetAttachedObjectsARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedObjectsARB, fn)
+#define CALL_GetHandleARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_GetHandleARB, parameters)
+#define GET_GetHandleARB(disp) GET_by_offset(disp, _gloffset_GetHandleARB)
+#define SET_GetHandleARB(disp, fn) SET_by_offset(disp, _gloffset_GetHandleARB, fn)
+#define CALL_GetInfoLogARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetInfoLogARB, parameters)
+#define GET_GetInfoLogARB(disp) GET_by_offset(disp, _gloffset_GetInfoLogARB)
+#define SET_GetInfoLogARB(disp, fn) SET_by_offset(disp, _gloffset_GetInfoLogARB, fn)
+#define CALL_GetObjectParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLfloat *)), _gloffset_GetObjectParameterfvARB, parameters)
+#define GET_GetObjectParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterfvARB)
+#define SET_GetObjectParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterfvARB, fn)
+#define CALL_GetObjectParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLint *)), _gloffset_GetObjectParameterivARB, parameters)
+#define GET_GetObjectParameterivARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivARB)
+#define SET_GetObjectParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivARB, fn)
+#define CALL_GetShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetShaderSourceARB, parameters)
+#define GET_GetShaderSourceARB(disp) GET_by_offset(disp, _gloffset_GetShaderSourceARB)
+#define SET_GetShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn)
+#define CALL_GetUniformLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetUniformLocationARB, parameters)
+#define GET_GetUniformLocationARB(disp) GET_by_offset(disp, _gloffset_GetUniformLocationARB)
+#define SET_GetUniformLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformLocationARB, fn)
+#define CALL_GetUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLfloat *)), _gloffset_GetUniformfvARB, parameters)
+#define GET_GetUniformfvARB(disp) GET_by_offset(disp, _gloffset_GetUniformfvARB)
+#define SET_GetUniformfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformfvARB, fn)
+#define CALL_GetUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLint *)), _gloffset_GetUniformivARB, parameters)
+#define GET_GetUniformivARB(disp) GET_by_offset(disp, _gloffset_GetUniformivARB)
+#define SET_GetUniformivARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformivARB, fn)
+#define CALL_LinkProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_LinkProgramARB, parameters)
+#define GET_LinkProgramARB(disp) GET_by_offset(disp, _gloffset_LinkProgramARB)
+#define SET_LinkProgramARB(disp, fn) SET_by_offset(disp, _gloffset_LinkProgramARB, fn)
+#define CALL_ShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)), _gloffset_ShaderSourceARB, parameters)
+#define GET_ShaderSourceARB(disp) GET_by_offset(disp, _gloffset_ShaderSourceARB)
+#define SET_ShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_ShaderSourceARB, fn)
+#define CALL_Uniform1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat)), _gloffset_Uniform1fARB, parameters)
+#define GET_Uniform1fARB(disp) GET_by_offset(disp, _gloffset_Uniform1fARB)
+#define SET_Uniform1fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fARB, fn)
+#define CALL_Uniform1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform1fvARB, parameters)
+#define GET_Uniform1fvARB(disp) GET_by_offset(disp, _gloffset_Uniform1fvARB)
+#define SET_Uniform1fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fvARB, fn)
+#define CALL_Uniform1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Uniform1iARB, parameters)
+#define GET_Uniform1iARB(disp) GET_by_offset(disp, _gloffset_Uniform1iARB)
+#define SET_Uniform1iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1iARB, fn)
+#define CALL_Uniform1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform1ivARB, parameters)
+#define GET_Uniform1ivARB(disp) GET_by_offset(disp, _gloffset_Uniform1ivARB)
+#define SET_Uniform1ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1ivARB, fn)
+#define CALL_Uniform2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_Uniform2fARB, parameters)
+#define GET_Uniform2fARB(disp) GET_by_offset(disp, _gloffset_Uniform2fARB)
+#define SET_Uniform2fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fARB, fn)
+#define CALL_Uniform2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform2fvARB, parameters)
+#define GET_Uniform2fvARB(disp) GET_by_offset(disp, _gloffset_Uniform2fvARB)
+#define SET_Uniform2fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fvARB, fn)
+#define CALL_Uniform2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Uniform2iARB, parameters)
+#define GET_Uniform2iARB(disp) GET_by_offset(disp, _gloffset_Uniform2iARB)
+#define SET_Uniform2iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2iARB, fn)
+#define CALL_Uniform2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform2ivARB, parameters)
+#define GET_Uniform2ivARB(disp) GET_by_offset(disp, _gloffset_Uniform2ivARB)
+#define SET_Uniform2ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2ivARB, fn)
+#define CALL_Uniform3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform3fARB, parameters)
+#define GET_Uniform3fARB(disp) GET_by_offset(disp, _gloffset_Uniform3fARB)
+#define SET_Uniform3fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fARB, fn)
+#define CALL_Uniform3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform3fvARB, parameters)
+#define GET_Uniform3fvARB(disp) GET_by_offset(disp, _gloffset_Uniform3fvARB)
+#define SET_Uniform3fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fvARB, fn)
+#define CALL_Uniform3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Uniform3iARB, parameters)
+#define GET_Uniform3iARB(disp) GET_by_offset(disp, _gloffset_Uniform3iARB)
+#define SET_Uniform3iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3iARB, fn)
+#define CALL_Uniform3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform3ivARB, parameters)
+#define GET_Uniform3ivARB(disp) GET_by_offset(disp, _gloffset_Uniform3ivARB)
+#define SET_Uniform3ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3ivARB, fn)
+#define CALL_Uniform4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform4fARB, parameters)
+#define GET_Uniform4fARB(disp) GET_by_offset(disp, _gloffset_Uniform4fARB)
+#define SET_Uniform4fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fARB, fn)
+#define CALL_Uniform4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform4fvARB, parameters)
+#define GET_Uniform4fvARB(disp) GET_by_offset(disp, _gloffset_Uniform4fvARB)
+#define SET_Uniform4fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fvARB, fn)
+#define CALL_Uniform4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint)), _gloffset_Uniform4iARB, parameters)
+#define GET_Uniform4iARB(disp) GET_by_offset(disp, _gloffset_Uniform4iARB)
+#define SET_Uniform4iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4iARB, fn)
+#define CALL_Uniform4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform4ivARB, parameters)
+#define GET_Uniform4ivARB(disp) GET_by_offset(disp, _gloffset_Uniform4ivARB)
+#define SET_Uniform4ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4ivARB, fn)
+#define CALL_UniformMatrix2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2fvARB, parameters)
+#define GET_UniformMatrix2fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix2fvARB)
+#define SET_UniformMatrix2fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2fvARB, fn)
+#define CALL_UniformMatrix3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3fvARB, parameters)
+#define GET_UniformMatrix3fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix3fvARB)
+#define SET_UniformMatrix3fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3fvARB, fn)
+#define CALL_UniformMatrix4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4fvARB, parameters)
+#define GET_UniformMatrix4fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix4fvARB)
+#define SET_UniformMatrix4fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4fvARB, fn)
+#define CALL_UseProgramObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_UseProgramObjectARB, parameters)
+#define GET_UseProgramObjectARB(disp) GET_by_offset(disp, _gloffset_UseProgramObjectARB)
+#define SET_UseProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_UseProgramObjectARB, fn)
+#define CALL_ValidateProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_ValidateProgramARB, parameters)
+#define GET_ValidateProgramARB(disp) GET_by_offset(disp, _gloffset_ValidateProgramARB)
+#define SET_ValidateProgramARB(disp, fn) SET_by_offset(disp, _gloffset_ValidateProgramARB, fn)
+#define CALL_BindAttribLocationARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, const GLcharARB *)), _gloffset_BindAttribLocationARB, parameters)
+#define GET_BindAttribLocationARB(disp) GET_by_offset(disp, _gloffset_BindAttribLocationARB)
+#define SET_BindAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_BindAttribLocationARB, fn)
+#define CALL_GetActiveAttribARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveAttribARB, parameters)
+#define GET_GetActiveAttribARB(disp) GET_by_offset(disp, _gloffset_GetActiveAttribARB)
+#define SET_GetActiveAttribARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveAttribARB, fn)
+#define CALL_GetAttribLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetAttribLocationARB, parameters)
+#define GET_GetAttribLocationARB(disp) GET_by_offset(disp, _gloffset_GetAttribLocationARB)
+#define SET_GetAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttribLocationARB, fn)
+#define CALL_DrawBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLenum *)), _gloffset_DrawBuffersARB, parameters)
+#define GET_DrawBuffersARB(disp) GET_by_offset(disp, _gloffset_DrawBuffersARB)
+#define SET_DrawBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffersARB, fn)
+#define CALL_DrawArraysInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei, GLsizei)), _gloffset_DrawArraysInstancedARB, parameters)
+#define GET_DrawArraysInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawArraysInstancedARB)
+#define SET_DrawArraysInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawArraysInstancedARB, fn)
+#define CALL_DrawElementsInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)), _gloffset_DrawElementsInstancedARB, parameters)
+#define GET_DrawElementsInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawElementsInstancedARB)
+#define SET_DrawElementsInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsInstancedARB, fn)
+#define CALL_RenderbufferStorageMultisample(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageMultisample, parameters)
+#define GET_RenderbufferStorageMultisample(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageMultisample)
+#define SET_RenderbufferStorageMultisample(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageMultisample, fn)
+#define CALL_FramebufferTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTextureARB, parameters)
+#define GET_FramebufferTextureARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureARB)
+#define SET_FramebufferTextureARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureARB, fn)
+#define CALL_FramebufferTextureFaceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLenum)), _gloffset_FramebufferTextureFaceARB, parameters)
+#define GET_FramebufferTextureFaceARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureFaceARB)
+#define SET_FramebufferTextureFaceARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureFaceARB, fn)
+#define CALL_ProgramParameteriARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint)), _gloffset_ProgramParameteriARB, parameters)
+#define GET_ProgramParameteriARB(disp) GET_by_offset(disp, _gloffset_ProgramParameteriARB)
+#define SET_ProgramParameteriARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn)
+#define CALL_FlushMappedBufferRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRange, parameters)
+#define GET_FlushMappedBufferRange(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRange)
+#define SET_FlushMappedBufferRange(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRange, fn)
+#define CALL_MapBufferRange(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr, GLbitfield)), _gloffset_MapBufferRange, parameters)
+#define GET_MapBufferRange(disp) GET_by_offset(disp, _gloffset_MapBufferRange)
+#define SET_MapBufferRange(disp, fn) SET_by_offset(disp, _gloffset_MapBufferRange, fn)
+#define CALL_BindVertexArray(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArray, parameters)
+#define GET_BindVertexArray(disp) GET_by_offset(disp, _gloffset_BindVertexArray)
+#define SET_BindVertexArray(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArray, fn)
+#define CALL_GenVertexArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArrays, parameters)
+#define GET_GenVertexArrays(disp) GET_by_offset(disp, _gloffset_GenVertexArrays)
+#define SET_GenVertexArrays(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArrays, fn)
+#define CALL_CopyBufferSubData(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)), _gloffset_CopyBufferSubData, parameters)
+#define GET_CopyBufferSubData(disp) GET_by_offset(disp, _gloffset_CopyBufferSubData)
+#define SET_CopyBufferSubData(disp, fn) SET_by_offset(disp, _gloffset_CopyBufferSubData, fn)
+#define CALL_ClientWaitSync(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_ClientWaitSync, parameters)
+#define GET_ClientWaitSync(disp) GET_by_offset(disp, _gloffset_ClientWaitSync)
+#define SET_ClientWaitSync(disp, fn) SET_by_offset(disp, _gloffset_ClientWaitSync, fn)
+#define CALL_DeleteSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync)), _gloffset_DeleteSync, parameters)
+#define GET_DeleteSync(disp) GET_by_offset(disp, _gloffset_DeleteSync)
+#define SET_DeleteSync(disp, fn) SET_by_offset(disp, _gloffset_DeleteSync, fn)
+#define CALL_FenceSync(disp, parameters) CALL_by_offset(disp, (GLsync (GLAPIENTRYP)(GLenum, GLbitfield)), _gloffset_FenceSync, parameters)
+#define GET_FenceSync(disp) GET_by_offset(disp, _gloffset_FenceSync)
+#define SET_FenceSync(disp, fn) SET_by_offset(disp, _gloffset_FenceSync, fn)
+#define CALL_GetInteger64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint64 *)), _gloffset_GetInteger64v, parameters)
+#define GET_GetInteger64v(disp) GET_by_offset(disp, _gloffset_GetInteger64v)
+#define SET_GetInteger64v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64v, fn)
+#define CALL_GetSynciv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLenum, GLsizei, GLsizei *, GLint *)), _gloffset_GetSynciv, parameters)
+#define GET_GetSynciv(disp) GET_by_offset(disp, _gloffset_GetSynciv)
+#define SET_GetSynciv(disp, fn) SET_by_offset(disp, _gloffset_GetSynciv, fn)
+#define CALL_IsSync(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsync)), _gloffset_IsSync, parameters)
+#define GET_IsSync(disp) GET_by_offset(disp, _gloffset_IsSync)
+#define SET_IsSync(disp, fn) SET_by_offset(disp, _gloffset_IsSync, fn)
+#define CALL_WaitSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_WaitSync, parameters)
+#define GET_WaitSync(disp) GET_by_offset(disp, _gloffset_WaitSync)
+#define SET_WaitSync(disp, fn) SET_by_offset(disp, _gloffset_WaitSync, fn)
+#define CALL_DrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawElementsBaseVertex, parameters)
+#define GET_DrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawElementsBaseVertex)
+#define SET_DrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn)
+#define CALL_DrawRangeElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawRangeElementsBaseVertex, parameters)
+#define GET_DrawRangeElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex)
+#define SET_DrawRangeElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn)
+#define CALL_MultiDrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)), _gloffset_MultiDrawElementsBaseVertex, parameters)
+#define GET_MultiDrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex)
+#define SET_MultiDrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn)
+#define CALL_BindTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTransformFeedback, parameters)
+#define GET_BindTransformFeedback(disp) GET_by_offset(disp, _gloffset_BindTransformFeedback)
+#define SET_BindTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_BindTransformFeedback, fn)
+#define CALL_DeleteTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTransformFeedbacks, parameters)
+#define GET_DeleteTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_DeleteTransformFeedbacks)
+#define SET_DeleteTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_DeleteTransformFeedbacks, fn)
+#define CALL_DrawTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DrawTransformFeedback, parameters)
+#define GET_DrawTransformFeedback(disp) GET_by_offset(disp, _gloffset_DrawTransformFeedback)
+#define SET_DrawTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_DrawTransformFeedback, fn)
+#define CALL_GenTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTransformFeedbacks, parameters)
+#define GET_GenTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_GenTransformFeedbacks)
+#define SET_GenTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_GenTransformFeedbacks, fn)
+#define CALL_IsTransformFeedback(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTransformFeedback, parameters)
+#define GET_IsTransformFeedback(disp) GET_by_offset(disp, _gloffset_IsTransformFeedback)
+#define SET_IsTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_IsTransformFeedback, fn)
+#define CALL_PauseTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PauseTransformFeedback, parameters)
+#define GET_PauseTransformFeedback(disp) GET_by_offset(disp, _gloffset_PauseTransformFeedback)
+#define SET_PauseTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_PauseTransformFeedback, fn)
+#define CALL_ResumeTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResumeTransformFeedback, parameters)
+#define GET_ResumeTransformFeedback(disp) GET_by_offset(disp, _gloffset_ResumeTransformFeedback)
+#define SET_ResumeTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn)
+#define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffsetEXT, parameters)
+#define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, _gloffset_PolygonOffsetEXT)
+#define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn)
+#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelTexGenParameterfvSGIS, parameters)
+#define GET_GetPixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS)
+#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS, fn)
+#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetPixelTexGenParameterivSGIS, parameters)
+#define GET_GetPixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS)
+#define SET_GetPixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS, fn)
+#define CALL_PixelTexGenParameterfSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTexGenParameterfSGIS, parameters)
+#define GET_PixelTexGenParameterfSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS)
+#define SET_PixelTexGenParameterfSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS, fn)
+#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PixelTexGenParameterfvSGIS, parameters)
+#define GET_PixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS)
+#define SET_PixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS, fn)
+#define CALL_PixelTexGenParameteriSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTexGenParameteriSGIS, parameters)
+#define GET_PixelTexGenParameteriSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS)
+#define SET_PixelTexGenParameteriSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS, fn)
+#define CALL_PixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PixelTexGenParameterivSGIS, parameters)
+#define GET_PixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS)
+#define SET_PixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS, fn)
+#define CALL_SampleMaskSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleMaskSGIS, parameters)
+#define GET_SampleMaskSGIS(disp) GET_by_offset(disp, _gloffset_SampleMaskSGIS)
+#define SET_SampleMaskSGIS(disp, fn) SET_by_offset(disp, _gloffset_SampleMaskSGIS, fn)
+#define CALL_SamplePatternSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_SamplePatternSGIS, parameters)
+#define GET_SamplePatternSGIS(disp) GET_by_offset(disp, _gloffset_SamplePatternSGIS)
+#define SET_SamplePatternSGIS(disp, fn) SET_by_offset(disp, _gloffset_SamplePatternSGIS, fn)
+#define CALL_ColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_ColorPointerEXT, parameters)
+#define GET_ColorPointerEXT(disp) GET_by_offset(disp, _gloffset_ColorPointerEXT)
+#define SET_ColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorPointerEXT, fn)
+#define CALL_EdgeFlagPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, const GLboolean *)), _gloffset_EdgeFlagPointerEXT, parameters)
+#define GET_EdgeFlagPointerEXT(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointerEXT)
+#define SET_EdgeFlagPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointerEXT, fn)
+#define CALL_IndexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_IndexPointerEXT, parameters)
+#define GET_IndexPointerEXT(disp) GET_by_offset(disp, _gloffset_IndexPointerEXT)
+#define SET_IndexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_IndexPointerEXT, fn)
+#define CALL_NormalPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_NormalPointerEXT, parameters)
+#define GET_NormalPointerEXT(disp) GET_by_offset(disp, _gloffset_NormalPointerEXT)
+#define SET_NormalPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_NormalPointerEXT, fn)
+#define CALL_TexCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_TexCoordPointerEXT, parameters)
+#define GET_TexCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_TexCoordPointerEXT)
+#define SET_TexCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointerEXT, fn)
+#define CALL_VertexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_VertexPointerEXT, parameters)
+#define GET_VertexPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexPointerEXT)
+#define SET_VertexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexPointerEXT, fn)
+#define CALL_PointParameterfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PointParameterfEXT, parameters)
+#define GET_PointParameterfEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfEXT)
+#define SET_PointParameterfEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfEXT, fn)
+#define CALL_PointParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PointParameterfvEXT, parameters)
+#define GET_PointParameterfvEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfvEXT)
+#define SET_PointParameterfvEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfvEXT, fn)
+#define CALL_LockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei)), _gloffset_LockArraysEXT, parameters)
+#define GET_LockArraysEXT(disp) GET_by_offset(disp, _gloffset_LockArraysEXT)
+#define SET_LockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_LockArraysEXT, fn)
+#define CALL_UnlockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_UnlockArraysEXT, parameters)
+#define GET_UnlockArraysEXT(disp) GET_by_offset(disp, _gloffset_UnlockArraysEXT)
+#define SET_UnlockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_UnlockArraysEXT, fn)
+#define CALL_SecondaryColor3bEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_SecondaryColor3bEXT, parameters)
+#define GET_SecondaryColor3bEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bEXT)
+#define SET_SecondaryColor3bEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bEXT, fn)
+#define CALL_SecondaryColor3bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_SecondaryColor3bvEXT, parameters)
+#define GET_SecondaryColor3bvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bvEXT)
+#define SET_SecondaryColor3bvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bvEXT, fn)
+#define CALL_SecondaryColor3dEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_SecondaryColor3dEXT, parameters)
+#define GET_SecondaryColor3dEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dEXT)
+#define SET_SecondaryColor3dEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dEXT, fn)
+#define CALL_SecondaryColor3dvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_SecondaryColor3dvEXT, parameters)
+#define GET_SecondaryColor3dvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dvEXT)
+#define SET_SecondaryColor3dvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dvEXT, fn)
+#define CALL_SecondaryColor3fEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_SecondaryColor3fEXT, parameters)
+#define GET_SecondaryColor3fEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fEXT)
+#define SET_SecondaryColor3fEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fEXT, fn)
+#define CALL_SecondaryColor3fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_SecondaryColor3fvEXT, parameters)
+#define GET_SecondaryColor3fvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fvEXT)
+#define SET_SecondaryColor3fvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fvEXT, fn)
+#define CALL_SecondaryColor3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_SecondaryColor3iEXT, parameters)
+#define GET_SecondaryColor3iEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3iEXT)
+#define SET_SecondaryColor3iEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3iEXT, fn)
+#define CALL_SecondaryColor3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_SecondaryColor3ivEXT, parameters)
+#define GET_SecondaryColor3ivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ivEXT)
+#define SET_SecondaryColor3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ivEXT, fn)
+#define CALL_SecondaryColor3sEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_SecondaryColor3sEXT, parameters)
+#define GET_SecondaryColor3sEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3sEXT)
+#define SET_SecondaryColor3sEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3sEXT, fn)
+#define CALL_SecondaryColor3svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_SecondaryColor3svEXT, parameters)
+#define GET_SecondaryColor3svEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3svEXT)
+#define SET_SecondaryColor3svEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3svEXT, fn)
+#define CALL_SecondaryColor3ubEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_SecondaryColor3ubEXT, parameters)
+#define GET_SecondaryColor3ubEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubEXT)
+#define SET_SecondaryColor3ubEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubEXT, fn)
+#define CALL_SecondaryColor3ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_SecondaryColor3ubvEXT, parameters)
+#define GET_SecondaryColor3ubvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT)
+#define SET_SecondaryColor3ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT, fn)
+#define CALL_SecondaryColor3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_SecondaryColor3uiEXT, parameters)
+#define GET_SecondaryColor3uiEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uiEXT)
+#define SET_SecondaryColor3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uiEXT, fn)
+#define CALL_SecondaryColor3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_SecondaryColor3uivEXT, parameters)
+#define GET_SecondaryColor3uivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uivEXT)
+#define SET_SecondaryColor3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uivEXT, fn)
+#define CALL_SecondaryColor3usEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_SecondaryColor3usEXT, parameters)
+#define GET_SecondaryColor3usEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usEXT)
+#define SET_SecondaryColor3usEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usEXT, fn)
+#define CALL_SecondaryColor3usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_SecondaryColor3usvEXT, parameters)
+#define GET_SecondaryColor3usvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usvEXT)
+#define SET_SecondaryColor3usvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usvEXT, fn)
+#define CALL_SecondaryColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_SecondaryColorPointerEXT, parameters)
+#define GET_SecondaryColorPointerEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColorPointerEXT)
+#define SET_SecondaryColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn)
+#define CALL_MultiDrawArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *, const GLsizei *, GLsizei)), _gloffset_MultiDrawArraysEXT, parameters)
+#define GET_MultiDrawArraysEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawArraysEXT)
+#define SET_MultiDrawArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn)
+#define CALL_MultiDrawElementsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)), _gloffset_MultiDrawElementsEXT, parameters)
+#define GET_MultiDrawElementsEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsEXT)
+#define SET_MultiDrawElementsEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn)
+#define CALL_FogCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_FogCoordPointerEXT, parameters)
+#define GET_FogCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_FogCoordPointerEXT)
+#define SET_FogCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordPointerEXT, fn)
+#define CALL_FogCoorddEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_FogCoorddEXT, parameters)
+#define GET_FogCoorddEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddEXT)
+#define SET_FogCoorddEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddEXT, fn)
+#define CALL_FogCoorddvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_FogCoorddvEXT, parameters)
+#define GET_FogCoorddvEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddvEXT)
+#define SET_FogCoorddvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddvEXT, fn)
+#define CALL_FogCoordfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_FogCoordfEXT, parameters)
+#define GET_FogCoordfEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfEXT)
+#define SET_FogCoordfEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfEXT, fn)
+#define CALL_FogCoordfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_FogCoordfvEXT, parameters)
+#define GET_FogCoordfvEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfvEXT)
+#define SET_FogCoordfvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfvEXT, fn)
+#define CALL_PixelTexGenSGIX(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_PixelTexGenSGIX, parameters)
+#define GET_PixelTexGenSGIX(disp) GET_by_offset(disp, _gloffset_PixelTexGenSGIX)
+#define SET_PixelTexGenSGIX(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenSGIX, fn)
+#define CALL_BlendFuncSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateEXT, parameters)
+#define GET_BlendFuncSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateEXT)
+#define SET_BlendFuncSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateEXT, fn)
+#define CALL_FlushVertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_FlushVertexArrayRangeNV, parameters)
+#define GET_FlushVertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV)
+#define SET_FlushVertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV, fn)
+#define CALL_VertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_VertexArrayRangeNV, parameters)
+#define GET_VertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_VertexArrayRangeNV)
+#define SET_VertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_VertexArrayRangeNV, fn)
+#define CALL_CombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)), _gloffset_CombinerInputNV, parameters)
+#define GET_CombinerInputNV(disp) GET_by_offset(disp, _gloffset_CombinerInputNV)
+#define SET_CombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerInputNV, fn)
+#define CALL_CombinerOutputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)), _gloffset_CombinerOutputNV, parameters)
+#define GET_CombinerOutputNV(disp) GET_by_offset(disp, _gloffset_CombinerOutputNV)
+#define SET_CombinerOutputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerOutputNV, fn)
+#define CALL_CombinerParameterfNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_CombinerParameterfNV, parameters)
+#define GET_CombinerParameterfNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfNV)
+#define SET_CombinerParameterfNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfNV, fn)
+#define CALL_CombinerParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_CombinerParameterfvNV, parameters)
+#define GET_CombinerParameterfvNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfvNV)
+#define SET_CombinerParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfvNV, fn)
+#define CALL_CombinerParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_CombinerParameteriNV, parameters)
+#define GET_CombinerParameteriNV(disp) GET_by_offset(disp, _gloffset_CombinerParameteriNV)
+#define SET_CombinerParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameteriNV, fn)
+#define CALL_CombinerParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_CombinerParameterivNV, parameters)
+#define GET_CombinerParameterivNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterivNV)
+#define SET_CombinerParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterivNV, fn)
+#define CALL_FinalCombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_FinalCombinerInputNV, parameters)
+#define GET_FinalCombinerInputNV(disp) GET_by_offset(disp, _gloffset_FinalCombinerInputNV)
+#define SET_FinalCombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_FinalCombinerInputNV, fn)
+#define CALL_GetCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerInputParameterfvNV, parameters)
+#define GET_GetCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV)
+#define SET_GetCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV, fn)
+#define CALL_GetCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerInputParameterivNV, parameters)
+#define GET_GetCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV)
+#define SET_GetCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV, fn)
+#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerOutputParameterfvNV, parameters)
+#define GET_GetCombinerOutputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV)
+#define SET_GetCombinerOutputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV, fn)
+#define CALL_GetCombinerOutputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerOutputParameterivNV, parameters)
+#define GET_GetCombinerOutputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV)
+#define SET_GetCombinerOutputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV, fn)
+#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetFinalCombinerInputParameterfvNV, parameters)
+#define GET_GetFinalCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV)
+#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV, fn)
+#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetFinalCombinerInputParameterivNV, parameters)
+#define GET_GetFinalCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV)
+#define SET_GetFinalCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV, fn)
+#define CALL_ResizeBuffersMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResizeBuffersMESA, parameters)
+#define GET_ResizeBuffersMESA(disp) GET_by_offset(disp, _gloffset_ResizeBuffersMESA)
+#define SET_ResizeBuffersMESA(disp, fn) SET_by_offset(disp, _gloffset_ResizeBuffersMESA, fn)
+#define CALL_WindowPos2dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_WindowPos2dMESA, parameters)
+#define GET_WindowPos2dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dMESA)
+#define SET_WindowPos2dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dMESA, fn)
+#define CALL_WindowPos2dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos2dvMESA, parameters)
+#define GET_WindowPos2dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dvMESA)
+#define SET_WindowPos2dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dvMESA, fn)
+#define CALL_WindowPos2fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_WindowPos2fMESA, parameters)
+#define GET_WindowPos2fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fMESA)
+#define SET_WindowPos2fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fMESA, fn)
+#define CALL_WindowPos2fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos2fvMESA, parameters)
+#define GET_WindowPos2fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fvMESA)
+#define SET_WindowPos2fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fvMESA, fn)
+#define CALL_WindowPos2iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_WindowPos2iMESA, parameters)
+#define GET_WindowPos2iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2iMESA)
+#define SET_WindowPos2iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2iMESA, fn)
+#define CALL_WindowPos2ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos2ivMESA, parameters)
+#define GET_WindowPos2ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2ivMESA)
+#define SET_WindowPos2ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2ivMESA, fn)
+#define CALL_WindowPos2sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_WindowPos2sMESA, parameters)
+#define GET_WindowPos2sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2sMESA)
+#define SET_WindowPos2sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2sMESA, fn)
+#define CALL_WindowPos2svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos2svMESA, parameters)
+#define GET_WindowPos2svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2svMESA)
+#define SET_WindowPos2svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2svMESA, fn)
+#define CALL_WindowPos3dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos3dMESA, parameters)
+#define GET_WindowPos3dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dMESA)
+#define SET_WindowPos3dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dMESA, fn)
+#define CALL_WindowPos3dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos3dvMESA, parameters)
+#define GET_WindowPos3dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dvMESA)
+#define SET_WindowPos3dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dvMESA, fn)
+#define CALL_WindowPos3fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos3fMESA, parameters)
+#define GET_WindowPos3fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fMESA)
+#define SET_WindowPos3fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fMESA, fn)
+#define CALL_WindowPos3fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos3fvMESA, parameters)
+#define GET_WindowPos3fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fvMESA)
+#define SET_WindowPos3fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fvMESA, fn)
+#define CALL_WindowPos3iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_WindowPos3iMESA, parameters)
+#define GET_WindowPos3iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3iMESA)
+#define SET_WindowPos3iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3iMESA, fn)
+#define CALL_WindowPos3ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos3ivMESA, parameters)
+#define GET_WindowPos3ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3ivMESA)
+#define SET_WindowPos3ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3ivMESA, fn)
+#define CALL_WindowPos3sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_WindowPos3sMESA, parameters)
+#define GET_WindowPos3sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3sMESA)
+#define SET_WindowPos3sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3sMESA, fn)
+#define CALL_WindowPos3svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos3svMESA, parameters)
+#define GET_WindowPos3svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3svMESA)
+#define SET_WindowPos3svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3svMESA, fn)
+#define CALL_WindowPos4dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos4dMESA, parameters)
+#define GET_WindowPos4dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dMESA)
+#define SET_WindowPos4dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dMESA, fn)
+#define CALL_WindowPos4dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos4dvMESA, parameters)
+#define GET_WindowPos4dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dvMESA)
+#define SET_WindowPos4dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dvMESA, fn)
+#define CALL_WindowPos4fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos4fMESA, parameters)
+#define GET_WindowPos4fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fMESA)
+#define SET_WindowPos4fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fMESA, fn)
+#define CALL_WindowPos4fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos4fvMESA, parameters)
+#define GET_WindowPos4fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fvMESA)
+#define SET_WindowPos4fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fvMESA, fn)
+#define CALL_WindowPos4iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_WindowPos4iMESA, parameters)
+#define GET_WindowPos4iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4iMESA)
+#define SET_WindowPos4iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4iMESA, fn)
+#define CALL_WindowPos4ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos4ivMESA, parameters)
+#define GET_WindowPos4ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4ivMESA)
+#define SET_WindowPos4ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4ivMESA, fn)
+#define CALL_WindowPos4sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_WindowPos4sMESA, parameters)
+#define GET_WindowPos4sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4sMESA)
+#define SET_WindowPos4sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4sMESA, fn)
+#define CALL_WindowPos4svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos4svMESA, parameters)
+#define GET_WindowPos4svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4svMESA)
+#define SET_WindowPos4svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4svMESA, fn)
+#define CALL_MultiModeDrawArraysIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)), _gloffset_MultiModeDrawArraysIBM, parameters)
+#define GET_MultiModeDrawArraysIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM)
+#define SET_MultiModeDrawArraysIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM, fn)
+#define CALL_MultiModeDrawElementsIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)), _gloffset_MultiModeDrawElementsIBM, parameters)
+#define GET_MultiModeDrawElementsIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM)
+#define SET_MultiModeDrawElementsIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM, fn)
+#define CALL_DeleteFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFencesNV, parameters)
+#define GET_DeleteFencesNV(disp) GET_by_offset(disp, _gloffset_DeleteFencesNV)
+#define SET_DeleteFencesNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteFencesNV, fn)
+#define CALL_FinishFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_FinishFenceNV, parameters)
+#define GET_FinishFenceNV(disp) GET_by_offset(disp, _gloffset_FinishFenceNV)
+#define SET_FinishFenceNV(disp, fn) SET_by_offset(disp, _gloffset_FinishFenceNV, fn)
+#define CALL_GenFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFencesNV, parameters)
+#define GET_GenFencesNV(disp) GET_by_offset(disp, _gloffset_GenFencesNV)
+#define SET_GenFencesNV(disp, fn) SET_by_offset(disp, _gloffset_GenFencesNV, fn)
+#define CALL_GetFenceivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetFenceivNV, parameters)
+#define GET_GetFenceivNV(disp) GET_by_offset(disp, _gloffset_GetFenceivNV)
+#define SET_GetFenceivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFenceivNV, fn)
+#define CALL_IsFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFenceNV, parameters)
+#define GET_IsFenceNV(disp) GET_by_offset(disp, _gloffset_IsFenceNV)
+#define SET_IsFenceNV(disp, fn) SET_by_offset(disp, _gloffset_IsFenceNV, fn)
+#define CALL_SetFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_SetFenceNV, parameters)
+#define GET_SetFenceNV(disp) GET_by_offset(disp, _gloffset_SetFenceNV)
+#define SET_SetFenceNV(disp, fn) SET_by_offset(disp, _gloffset_SetFenceNV, fn)
+#define CALL_TestFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_TestFenceNV, parameters)
+#define GET_TestFenceNV(disp) GET_by_offset(disp, _gloffset_TestFenceNV)
+#define SET_TestFenceNV(disp, fn) SET_by_offset(disp, _gloffset_TestFenceNV, fn)
+#define CALL_AreProgramsResidentNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreProgramsResidentNV, parameters)
+#define GET_AreProgramsResidentNV(disp) GET_by_offset(disp, _gloffset_AreProgramsResidentNV)
+#define SET_AreProgramsResidentNV(disp, fn) SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn)
+#define CALL_BindProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindProgramNV, parameters)
+#define GET_BindProgramNV(disp) GET_by_offset(disp, _gloffset_BindProgramNV)
+#define SET_BindProgramNV(disp, fn) SET_by_offset(disp, _gloffset_BindProgramNV, fn)
+#define CALL_DeleteProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteProgramsNV, parameters)
+#define GET_DeleteProgramsNV(disp) GET_by_offset(disp, _gloffset_DeleteProgramsNV)
+#define SET_DeleteProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgramsNV, fn)
+#define CALL_ExecuteProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ExecuteProgramNV, parameters)
+#define GET_ExecuteProgramNV(disp) GET_by_offset(disp, _gloffset_ExecuteProgramNV)
+#define SET_ExecuteProgramNV(disp, fn) SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn)
+#define CALL_GenProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenProgramsNV, parameters)
+#define GET_GenProgramsNV(disp) GET_by_offset(disp, _gloffset_GenProgramsNV)
+#define SET_GenProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_GenProgramsNV, fn)
+#define CALL_GetProgramParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLdouble *)), _gloffset_GetProgramParameterdvNV, parameters)
+#define GET_GetProgramParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterdvNV)
+#define SET_GetProgramParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterdvNV, fn)
+#define CALL_GetProgramParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLfloat *)), _gloffset_GetProgramParameterfvNV, parameters)
+#define GET_GetProgramParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterfvNV)
+#define SET_GetProgramParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn)
+#define CALL_GetProgramStringNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), _gloffset_GetProgramStringNV, parameters)
+#define GET_GetProgramStringNV(disp) GET_by_offset(disp, _gloffset_GetProgramStringNV)
+#define SET_GetProgramStringNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringNV, fn)
+#define CALL_GetProgramivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramivNV, parameters)
+#define GET_GetProgramivNV(disp) GET_by_offset(disp, _gloffset_GetProgramivNV)
+#define SET_GetProgramivNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivNV, fn)
+#define CALL_GetTrackMatrixivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetTrackMatrixivNV, parameters)
+#define GET_GetTrackMatrixivNV(disp) GET_by_offset(disp, _gloffset_GetTrackMatrixivNV)
+#define SET_GetTrackMatrixivNV(disp, fn) SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn)
+#define CALL_GetVertexAttribPointervNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLvoid **)), _gloffset_GetVertexAttribPointervNV, parameters)
+#define GET_GetVertexAttribPointervNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribPointervNV)
+#define SET_GetVertexAttribPointervNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribPointervNV, fn)
+#define CALL_GetVertexAttribdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvNV, parameters)
+#define GET_GetVertexAttribdvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvNV)
+#define SET_GetVertexAttribdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvNV, fn)
+#define CALL_GetVertexAttribfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvNV, parameters)
+#define GET_GetVertexAttribfvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvNV)
+#define SET_GetVertexAttribfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvNV, fn)
+#define CALL_GetVertexAttribivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivNV, parameters)
+#define GET_GetVertexAttribivNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivNV)
+#define SET_GetVertexAttribivNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivNV, fn)
+#define CALL_IsProgramNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgramNV, parameters)
+#define GET_IsProgramNV(disp) GET_by_offset(disp, _gloffset_IsProgramNV)
+#define SET_IsProgramNV(disp, fn) SET_by_offset(disp, _gloffset_IsProgramNV, fn)
+#define CALL_LoadProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLubyte *)), _gloffset_LoadProgramNV, parameters)
+#define GET_LoadProgramNV(disp) GET_by_offset(disp, _gloffset_LoadProgramNV)
+#define SET_LoadProgramNV(disp, fn) SET_by_offset(disp, _gloffset_LoadProgramNV, fn)
+#define CALL_ProgramParameters4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLdouble *)), _gloffset_ProgramParameters4dvNV, parameters)
+#define GET_ProgramParameters4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4dvNV)
+#define SET_ProgramParameters4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4dvNV, fn)
+#define CALL_ProgramParameters4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramParameters4fvNV, parameters)
+#define GET_ProgramParameters4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4fvNV)
+#define SET_ProgramParameters4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4fvNV, fn)
+#define CALL_RequestResidentProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_RequestResidentProgramsNV, parameters)
+#define GET_RequestResidentProgramsNV(disp) GET_by_offset(disp, _gloffset_RequestResidentProgramsNV)
+#define SET_RequestResidentProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_RequestResidentProgramsNV, fn)
+#define CALL_TrackMatrixNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLenum)), _gloffset_TrackMatrixNV, parameters)
+#define GET_TrackMatrixNV(disp) GET_by_offset(disp, _gloffset_TrackMatrixNV)
+#define SET_TrackMatrixNV(disp, fn) SET_by_offset(disp, _gloffset_TrackMatrixNV, fn)
+#define CALL_VertexAttrib1dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dNV, parameters)
+#define GET_VertexAttrib1dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dNV)
+#define SET_VertexAttrib1dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dNV, fn)
+#define CALL_VertexAttrib1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvNV, parameters)
+#define GET_VertexAttrib1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvNV)
+#define SET_VertexAttrib1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvNV, fn)
+#define CALL_VertexAttrib1fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fNV, parameters)
+#define GET_VertexAttrib1fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fNV)
+#define SET_VertexAttrib1fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fNV, fn)
+#define CALL_VertexAttrib1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvNV, parameters)
+#define GET_VertexAttrib1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvNV)
+#define SET_VertexAttrib1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvNV, fn)
+#define CALL_VertexAttrib1sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sNV, parameters)
+#define GET_VertexAttrib1sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sNV)
+#define SET_VertexAttrib1sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sNV, fn)
+#define CALL_VertexAttrib1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svNV, parameters)
+#define GET_VertexAttrib1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svNV)
+#define SET_VertexAttrib1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svNV, fn)
+#define CALL_VertexAttrib2dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dNV, parameters)
+#define GET_VertexAttrib2dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dNV)
+#define SET_VertexAttrib2dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dNV, fn)
+#define CALL_VertexAttrib2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvNV, parameters)
+#define GET_VertexAttrib2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvNV)
+#define SET_VertexAttrib2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvNV, fn)
+#define CALL_VertexAttrib2fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fNV, parameters)
+#define GET_VertexAttrib2fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fNV)
+#define SET_VertexAttrib2fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fNV, fn)
+#define CALL_VertexAttrib2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvNV, parameters)
+#define GET_VertexAttrib2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvNV)
+#define SET_VertexAttrib2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvNV, fn)
+#define CALL_VertexAttrib2sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sNV, parameters)
+#define GET_VertexAttrib2sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sNV)
+#define SET_VertexAttrib2sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sNV, fn)
+#define CALL_VertexAttrib2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svNV, parameters)
+#define GET_VertexAttrib2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svNV)
+#define SET_VertexAttrib2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svNV, fn)
+#define CALL_VertexAttrib3dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dNV, parameters)
+#define GET_VertexAttrib3dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dNV)
+#define SET_VertexAttrib3dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dNV, fn)
+#define CALL_VertexAttrib3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvNV, parameters)
+#define GET_VertexAttrib3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvNV)
+#define SET_VertexAttrib3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvNV, fn)
+#define CALL_VertexAttrib3fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fNV, parameters)
+#define GET_VertexAttrib3fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fNV)
+#define SET_VertexAttrib3fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fNV, fn)
+#define CALL_VertexAttrib3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvNV, parameters)
+#define GET_VertexAttrib3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvNV)
+#define SET_VertexAttrib3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvNV, fn)
+#define CALL_VertexAttrib3sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sNV, parameters)
+#define GET_VertexAttrib3sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sNV)
+#define SET_VertexAttrib3sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sNV, fn)
+#define CALL_VertexAttrib3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svNV, parameters)
+#define GET_VertexAttrib3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svNV)
+#define SET_VertexAttrib3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svNV, fn)
+#define CALL_VertexAttrib4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dNV, parameters)
+#define GET_VertexAttrib4dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dNV)
+#define SET_VertexAttrib4dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dNV, fn)
+#define CALL_VertexAttrib4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvNV, parameters)
+#define GET_VertexAttrib4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvNV)
+#define SET_VertexAttrib4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvNV, fn)
+#define CALL_VertexAttrib4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fNV, parameters)
+#define GET_VertexAttrib4fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fNV)
+#define SET_VertexAttrib4fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fNV, fn)
+#define CALL_VertexAttrib4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvNV, parameters)
+#define GET_VertexAttrib4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvNV)
+#define SET_VertexAttrib4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvNV, fn)
+#define CALL_VertexAttrib4sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sNV, parameters)
+#define GET_VertexAttrib4sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sNV)
+#define SET_VertexAttrib4sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sNV, fn)
+#define CALL_VertexAttrib4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svNV, parameters)
+#define GET_VertexAttrib4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svNV)
+#define SET_VertexAttrib4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svNV, fn)
+#define CALL_VertexAttrib4ubNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4ubNV, parameters)
+#define GET_VertexAttrib4ubNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubNV)
+#define SET_VertexAttrib4ubNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubNV, fn)
+#define CALL_VertexAttrib4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvNV, parameters)
+#define GET_VertexAttrib4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvNV)
+#define SET_VertexAttrib4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn)
+#define CALL_VertexAttribPointerNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerNV, parameters)
+#define GET_VertexAttribPointerNV(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerNV)
+#define SET_VertexAttribPointerNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerNV, fn)
+#define CALL_VertexAttribs1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs1dvNV, parameters)
+#define GET_VertexAttribs1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1dvNV)
+#define SET_VertexAttribs1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1dvNV, fn)
+#define CALL_VertexAttribs1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs1fvNV, parameters)
+#define GET_VertexAttribs1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1fvNV)
+#define SET_VertexAttribs1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1fvNV, fn)
+#define CALL_VertexAttribs1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs1svNV, parameters)
+#define GET_VertexAttribs1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1svNV)
+#define SET_VertexAttribs1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1svNV, fn)
+#define CALL_VertexAttribs2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs2dvNV, parameters)
+#define GET_VertexAttribs2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2dvNV)
+#define SET_VertexAttribs2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2dvNV, fn)
+#define CALL_VertexAttribs2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs2fvNV, parameters)
+#define GET_VertexAttribs2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2fvNV)
+#define SET_VertexAttribs2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2fvNV, fn)
+#define CALL_VertexAttribs2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs2svNV, parameters)
+#define GET_VertexAttribs2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2svNV)
+#define SET_VertexAttribs2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2svNV, fn)
+#define CALL_VertexAttribs3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs3dvNV, parameters)
+#define GET_VertexAttribs3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3dvNV)
+#define SET_VertexAttribs3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3dvNV, fn)
+#define CALL_VertexAttribs3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs3fvNV, parameters)
+#define GET_VertexAttribs3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3fvNV)
+#define SET_VertexAttribs3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3fvNV, fn)
+#define CALL_VertexAttribs3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs3svNV, parameters)
+#define GET_VertexAttribs3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3svNV)
+#define SET_VertexAttribs3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3svNV, fn)
+#define CALL_VertexAttribs4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs4dvNV, parameters)
+#define GET_VertexAttribs4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4dvNV)
+#define SET_VertexAttribs4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4dvNV, fn)
+#define CALL_VertexAttribs4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs4fvNV, parameters)
+#define GET_VertexAttribs4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4fvNV)
+#define SET_VertexAttribs4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4fvNV, fn)
+#define CALL_VertexAttribs4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs4svNV, parameters)
+#define GET_VertexAttribs4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4svNV)
+#define SET_VertexAttribs4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4svNV, fn)
+#define CALL_VertexAttribs4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *)), _gloffset_VertexAttribs4ubvNV, parameters)
+#define GET_VertexAttribs4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4ubvNV)
+#define SET_VertexAttribs4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn)
+#define CALL_GetTexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetTexBumpParameterfvATI, parameters)
+#define GET_GetTexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI)
+#define SET_GetTexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI, fn)
+#define CALL_GetTexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetTexBumpParameterivATI, parameters)
+#define GET_GetTexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterivATI)
+#define SET_GetTexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterivATI, fn)
+#define CALL_TexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_TexBumpParameterfvATI, parameters)
+#define GET_TexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterfvATI)
+#define SET_TexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterfvATI, fn)
+#define CALL_TexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_TexBumpParameterivATI, parameters)
+#define GET_TexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterivATI)
+#define SET_TexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterivATI, fn)
+#define CALL_AlphaFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp1ATI, parameters)
+#define GET_AlphaFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI)
+#define SET_AlphaFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI, fn)
+#define CALL_AlphaFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp2ATI, parameters)
+#define GET_AlphaFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI)
+#define SET_AlphaFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI, fn)
+#define CALL_AlphaFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp3ATI, parameters)
+#define GET_AlphaFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI)
+#define SET_AlphaFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI, fn)
+#define CALL_BeginFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_BeginFragmentShaderATI, parameters)
+#define GET_BeginFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BeginFragmentShaderATI)
+#define SET_BeginFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BeginFragmentShaderATI, fn)
+#define CALL_BindFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindFragmentShaderATI, parameters)
+#define GET_BindFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BindFragmentShaderATI)
+#define SET_BindFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BindFragmentShaderATI, fn)
+#define CALL_ColorFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp1ATI, parameters)
+#define GET_ColorFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp1ATI)
+#define SET_ColorFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp1ATI, fn)
+#define CALL_ColorFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp2ATI, parameters)
+#define GET_ColorFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp2ATI)
+#define SET_ColorFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp2ATI, fn)
+#define CALL_ColorFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp3ATI, parameters)
+#define GET_ColorFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp3ATI)
+#define SET_ColorFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp3ATI, fn)
+#define CALL_DeleteFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteFragmentShaderATI, parameters)
+#define GET_DeleteFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_DeleteFragmentShaderATI)
+#define SET_DeleteFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_DeleteFragmentShaderATI, fn)
+#define CALL_EndFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndFragmentShaderATI, parameters)
+#define GET_EndFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_EndFragmentShaderATI)
+#define SET_EndFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_EndFragmentShaderATI, fn)
+#define CALL_GenFragmentShadersATI(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLuint)), _gloffset_GenFragmentShadersATI, parameters)
+#define GET_GenFragmentShadersATI(disp) GET_by_offset(disp, _gloffset_GenFragmentShadersATI)
+#define SET_GenFragmentShadersATI(disp, fn) SET_by_offset(disp, _gloffset_GenFragmentShadersATI, fn)
+#define CALL_PassTexCoordATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_PassTexCoordATI, parameters)
+#define GET_PassTexCoordATI(disp) GET_by_offset(disp, _gloffset_PassTexCoordATI)
+#define SET_PassTexCoordATI(disp, fn) SET_by_offset(disp, _gloffset_PassTexCoordATI, fn)
+#define CALL_SampleMapATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_SampleMapATI, parameters)
+#define GET_SampleMapATI(disp) GET_by_offset(disp, _gloffset_SampleMapATI)
+#define SET_SampleMapATI(disp, fn) SET_by_offset(disp, _gloffset_SampleMapATI, fn)
+#define CALL_SetFragmentShaderConstantATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_SetFragmentShaderConstantATI, parameters)
+#define GET_SetFragmentShaderConstantATI(disp) GET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI)
+#define SET_SetFragmentShaderConstantATI(disp, fn) SET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI, fn)
+#define CALL_PointParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PointParameteriNV, parameters)
+#define GET_PointParameteriNV(disp) GET_by_offset(disp, _gloffset_PointParameteriNV)
+#define SET_PointParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameteriNV, fn)
+#define CALL_PointParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PointParameterivNV, parameters)
+#define GET_PointParameterivNV(disp) GET_by_offset(disp, _gloffset_PointParameterivNV)
+#define SET_PointParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameterivNV, fn)
+#define CALL_ActiveStencilFaceEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveStencilFaceEXT, parameters)
+#define GET_ActiveStencilFaceEXT(disp) GET_by_offset(disp, _gloffset_ActiveStencilFaceEXT)
+#define SET_ActiveStencilFaceEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveStencilFaceEXT, fn)
+#define CALL_BindVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArrayAPPLE, parameters)
+#define GET_BindVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_BindVertexArrayAPPLE)
+#define SET_BindVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArrayAPPLE, fn)
+#define CALL_DeleteVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteVertexArraysAPPLE, parameters)
+#define GET_DeleteVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE)
+#define SET_DeleteVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE, fn)
+#define CALL_GenVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArraysAPPLE, parameters)
+#define GET_GenVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_GenVertexArraysAPPLE)
+#define SET_GenVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArraysAPPLE, fn)
+#define CALL_IsVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsVertexArrayAPPLE, parameters)
+#define GET_IsVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_IsVertexArrayAPPLE)
+#define SET_IsVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_IsVertexArrayAPPLE, fn)
+#define CALL_GetProgramNamedParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble *)), _gloffset_GetProgramNamedParameterdvNV, parameters)
+#define GET_GetProgramNamedParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV)
+#define SET_GetProgramNamedParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV, fn)
+#define CALL_GetProgramNamedParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat *)), _gloffset_GetProgramNamedParameterfvNV, parameters)
+#define GET_GetProgramNamedParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV)
+#define SET_GetProgramNamedParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV, fn)
+#define CALL_ProgramNamedParameter4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramNamedParameter4dNV, parameters)
+#define GET_ProgramNamedParameter4dNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV)
+#define SET_ProgramNamedParameter4dNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV, fn)
+#define CALL_ProgramNamedParameter4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLdouble *)), _gloffset_ProgramNamedParameter4dvNV, parameters)
+#define GET_ProgramNamedParameter4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV)
+#define SET_ProgramNamedParameter4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV, fn)
+#define CALL_ProgramNamedParameter4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramNamedParameter4fNV, parameters)
+#define GET_ProgramNamedParameter4fNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV)
+#define SET_ProgramNamedParameter4fNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV, fn)
+#define CALL_ProgramNamedParameter4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLfloat *)), _gloffset_ProgramNamedParameter4fvNV, parameters)
+#define GET_ProgramNamedParameter4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV)
+#define SET_ProgramNamedParameter4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn)
+#define CALL_PrimitiveRestartIndexNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PrimitiveRestartIndexNV, parameters)
+#define GET_PrimitiveRestartIndexNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV)
+#define SET_PrimitiveRestartIndexNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV, fn)
+#define CALL_PrimitiveRestartNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PrimitiveRestartNV, parameters)
+#define GET_PrimitiveRestartNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartNV)
+#define SET_PrimitiveRestartNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartNV, fn)
+#define CALL_DepthBoundsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthBoundsEXT, parameters)
+#define GET_DepthBoundsEXT(disp) GET_by_offset(disp, _gloffset_DepthBoundsEXT)
+#define SET_DepthBoundsEXT(disp, fn) SET_by_offset(disp, _gloffset_DepthBoundsEXT, fn)
+#define CALL_BlendEquationSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendEquationSeparateEXT, parameters)
+#define GET_BlendEquationSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateEXT)
+#define SET_BlendEquationSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn)
+#define CALL_BindFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindFramebufferEXT, parameters)
+#define GET_BindFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BindFramebufferEXT)
+#define SET_BindFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFramebufferEXT, fn)
+#define CALL_BindRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindRenderbufferEXT, parameters)
+#define GET_BindRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_BindRenderbufferEXT)
+#define SET_BindRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindRenderbufferEXT, fn)
+#define CALL_CheckFramebufferStatusEXT(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum)), _gloffset_CheckFramebufferStatusEXT, parameters)
+#define GET_CheckFramebufferStatusEXT(disp) GET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT)
+#define SET_CheckFramebufferStatusEXT(disp, fn) SET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT, fn)
+#define CALL_DeleteFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFramebuffersEXT, parameters)
+#define GET_DeleteFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteFramebuffersEXT)
+#define SET_DeleteFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteFramebuffersEXT, fn)
+#define CALL_DeleteRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteRenderbuffersEXT, parameters)
+#define GET_DeleteRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT)
+#define SET_DeleteRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT, fn)
+#define CALL_FramebufferRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint)), _gloffset_FramebufferRenderbufferEXT, parameters)
+#define GET_FramebufferRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT)
+#define SET_FramebufferRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT, fn)
+#define CALL_FramebufferTexture1DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture1DEXT, parameters)
+#define GET_FramebufferTexture1DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture1DEXT)
+#define SET_FramebufferTexture1DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture1DEXT, fn)
+#define CALL_FramebufferTexture2DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture2DEXT, parameters)
+#define GET_FramebufferTexture2DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture2DEXT)
+#define SET_FramebufferTexture2DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture2DEXT, fn)
+#define CALL_FramebufferTexture3DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTexture3DEXT, parameters)
+#define GET_FramebufferTexture3DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture3DEXT)
+#define SET_FramebufferTexture3DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture3DEXT, fn)
+#define CALL_GenFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFramebuffersEXT, parameters)
+#define GET_GenFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_GenFramebuffersEXT)
+#define SET_GenFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenFramebuffersEXT, fn)
+#define CALL_GenRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenRenderbuffersEXT, parameters)
+#define GET_GenRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_GenRenderbuffersEXT)
+#define SET_GenRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenRenderbuffersEXT, fn)
+#define CALL_GenerateMipmapEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_GenerateMipmapEXT, parameters)
+#define GET_GenerateMipmapEXT(disp) GET_by_offset(disp, _gloffset_GenerateMipmapEXT)
+#define SET_GenerateMipmapEXT(disp, fn) SET_by_offset(disp, _gloffset_GenerateMipmapEXT, fn)
+#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetFramebufferAttachmentParameterivEXT, parameters)
+#define GET_GetFramebufferAttachmentParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT)
+#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT, fn)
+#define CALL_GetRenderbufferParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetRenderbufferParameterivEXT, parameters)
+#define GET_GetRenderbufferParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT)
+#define SET_GetRenderbufferParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT, fn)
+#define CALL_IsFramebufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFramebufferEXT, parameters)
+#define GET_IsFramebufferEXT(disp) GET_by_offset(disp, _gloffset_IsFramebufferEXT)
+#define SET_IsFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsFramebufferEXT, fn)
+#define CALL_IsRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsRenderbufferEXT, parameters)
+#define GET_IsRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_IsRenderbufferEXT)
+#define SET_IsRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsRenderbufferEXT, fn)
+#define CALL_RenderbufferStorageEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageEXT, parameters)
+#define GET_RenderbufferStorageEXT(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageEXT)
+#define SET_RenderbufferStorageEXT(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageEXT, fn)
+#define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), _gloffset_BlitFramebufferEXT, parameters)
+#define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BlitFramebufferEXT)
+#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BlitFramebufferEXT, fn)
+#define CALL_BufferParameteriAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_BufferParameteriAPPLE, parameters)
+#define GET_BufferParameteriAPPLE(disp) GET_by_offset(disp, _gloffset_BufferParameteriAPPLE)
+#define SET_BufferParameteriAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BufferParameteriAPPLE, fn)
+#define CALL_FlushMappedBufferRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRangeAPPLE, parameters)
+#define GET_FlushMappedBufferRangeAPPLE(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE)
+#define SET_FlushMappedBufferRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE, fn)
+#define CALL_BindFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, const GLchar *)), _gloffset_BindFragDataLocationEXT, parameters)
+#define GET_BindFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_BindFragDataLocationEXT)
+#define SET_BindFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFragDataLocationEXT, fn)
+#define CALL_GetFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLuint, const GLchar *)), _gloffset_GetFragDataLocationEXT, parameters)
+#define GET_GetFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_GetFragDataLocationEXT)
+#define SET_GetFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFragDataLocationEXT, fn)
+#define CALL_GetUniformuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLuint *)), _gloffset_GetUniformuivEXT, parameters)
+#define GET_GetUniformuivEXT(disp) GET_by_offset(disp, _gloffset_GetUniformuivEXT)
+#define SET_GetUniformuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetUniformuivEXT, fn)
+#define CALL_GetVertexAttribIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribIivEXT, parameters)
+#define GET_GetVertexAttribIivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIivEXT)
+#define SET_GetVertexAttribIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIivEXT, fn)
+#define CALL_GetVertexAttribIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetVertexAttribIuivEXT, parameters)
+#define GET_GetVertexAttribIuivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT)
+#define SET_GetVertexAttribIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT, fn)
+#define CALL_Uniform1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint)), _gloffset_Uniform1uiEXT, parameters)
+#define GET_Uniform1uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uiEXT)
+#define SET_Uniform1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uiEXT, fn)
+#define CALL_Uniform1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform1uivEXT, parameters)
+#define GET_Uniform1uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uivEXT)
+#define SET_Uniform1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uivEXT, fn)
+#define CALL_Uniform2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint)), _gloffset_Uniform2uiEXT, parameters)
+#define GET_Uniform2uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uiEXT)
+#define SET_Uniform2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uiEXT, fn)
+#define CALL_Uniform2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform2uivEXT, parameters)
+#define GET_Uniform2uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uivEXT)
+#define SET_Uniform2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uivEXT, fn)
+#define CALL_Uniform3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint)), _gloffset_Uniform3uiEXT, parameters)
+#define GET_Uniform3uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uiEXT)
+#define SET_Uniform3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uiEXT, fn)
+#define CALL_Uniform3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform3uivEXT, parameters)
+#define GET_Uniform3uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uivEXT)
+#define SET_Uniform3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uivEXT, fn)
+#define CALL_Uniform4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint, GLuint)), _gloffset_Uniform4uiEXT, parameters)
+#define GET_Uniform4uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uiEXT)
+#define SET_Uniform4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uiEXT, fn)
+#define CALL_Uniform4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform4uivEXT, parameters)
+#define GET_Uniform4uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uivEXT)
+#define SET_Uniform4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uivEXT, fn)
+#define CALL_VertexAttribI1iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint)), _gloffset_VertexAttribI1iEXT, parameters)
+#define GET_VertexAttribI1iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1iEXT)
+#define SET_VertexAttribI1iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1iEXT, fn)
+#define CALL_VertexAttribI1ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI1ivEXT, parameters)
+#define GET_VertexAttribI1ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1ivEXT)
+#define SET_VertexAttribI1ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1ivEXT, fn)
+#define CALL_VertexAttribI1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribI1uiEXT, parameters)
+#define GET_VertexAttribI1uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uiEXT)
+#define SET_VertexAttribI1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uiEXT, fn)
+#define CALL_VertexAttribI1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI1uivEXT, parameters)
+#define GET_VertexAttribI1uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uivEXT)
+#define SET_VertexAttribI1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uivEXT, fn)
+#define CALL_VertexAttribI2iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint)), _gloffset_VertexAttribI2iEXT, parameters)
+#define GET_VertexAttribI2iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2iEXT)
+#define SET_VertexAttribI2iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2iEXT, fn)
+#define CALL_VertexAttribI2ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI2ivEXT, parameters)
+#define GET_VertexAttribI2ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2ivEXT)
+#define SET_VertexAttribI2ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2ivEXT, fn)
+#define CALL_VertexAttribI2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_VertexAttribI2uiEXT, parameters)
+#define GET_VertexAttribI2uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uiEXT)
+#define SET_VertexAttribI2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uiEXT, fn)
+#define CALL_VertexAttribI2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI2uivEXT, parameters)
+#define GET_VertexAttribI2uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uivEXT)
+#define SET_VertexAttribI2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uivEXT, fn)
+#define CALL_VertexAttribI3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint)), _gloffset_VertexAttribI3iEXT, parameters)
+#define GET_VertexAttribI3iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3iEXT)
+#define SET_VertexAttribI3iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3iEXT, fn)
+#define CALL_VertexAttribI3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI3ivEXT, parameters)
+#define GET_VertexAttribI3ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3ivEXT)
+#define SET_VertexAttribI3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3ivEXT, fn)
+#define CALL_VertexAttribI3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI3uiEXT, parameters)
+#define GET_VertexAttribI3uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uiEXT)
+#define SET_VertexAttribI3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uiEXT, fn)
+#define CALL_VertexAttribI3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI3uivEXT, parameters)
+#define GET_VertexAttribI3uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uivEXT)
+#define SET_VertexAttribI3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uivEXT, fn)
+#define CALL_VertexAttribI4bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttribI4bvEXT, parameters)
+#define GET_VertexAttribI4bvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4bvEXT)
+#define SET_VertexAttribI4bvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4bvEXT, fn)
+#define CALL_VertexAttribI4iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint, GLint)), _gloffset_VertexAttribI4iEXT, parameters)
+#define GET_VertexAttribI4iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4iEXT)
+#define SET_VertexAttribI4iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4iEXT, fn)
+#define CALL_VertexAttribI4ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI4ivEXT, parameters)
+#define GET_VertexAttribI4ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ivEXT)
+#define SET_VertexAttribI4ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ivEXT, fn)
+#define CALL_VertexAttribI4svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttribI4svEXT, parameters)
+#define GET_VertexAttribI4svEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4svEXT)
+#define SET_VertexAttribI4svEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4svEXT, fn)
+#define CALL_VertexAttribI4ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttribI4ubvEXT, parameters)
+#define GET_VertexAttribI4ubvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT)
+#define SET_VertexAttribI4ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT, fn)
+#define CALL_VertexAttribI4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI4uiEXT, parameters)
+#define GET_VertexAttribI4uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uiEXT)
+#define SET_VertexAttribI4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uiEXT, fn)
+#define CALL_VertexAttribI4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI4uivEXT, parameters)
+#define GET_VertexAttribI4uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uivEXT)
+#define SET_VertexAttribI4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uivEXT, fn)
+#define CALL_VertexAttribI4usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttribI4usvEXT, parameters)
+#define GET_VertexAttribI4usvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4usvEXT)
+#define SET_VertexAttribI4usvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4usvEXT, fn)
+#define CALL_VertexAttribIPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribIPointerEXT, parameters)
+#define GET_VertexAttribIPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribIPointerEXT)
+#define SET_VertexAttribIPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribIPointerEXT, fn)
+#define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTextureLayerEXT, parameters)
+#define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT)
+#define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT, fn)
+#define CALL_ColorMaskIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMaskIndexedEXT, parameters)
+#define GET_ColorMaskIndexedEXT(disp) GET_by_offset(disp, _gloffset_ColorMaskIndexedEXT)
+#define SET_ColorMaskIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorMaskIndexedEXT, fn)
+#define CALL_DisableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DisableIndexedEXT, parameters)
+#define GET_DisableIndexedEXT(disp) GET_by_offset(disp, _gloffset_DisableIndexedEXT)
+#define SET_DisableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_DisableIndexedEXT, fn)
+#define CALL_EnableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_EnableIndexedEXT, parameters)
+#define GET_EnableIndexedEXT(disp) GET_by_offset(disp, _gloffset_EnableIndexedEXT)
+#define SET_EnableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_EnableIndexedEXT, fn)
+#define CALL_GetBooleanIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLboolean *)), _gloffset_GetBooleanIndexedvEXT, parameters)
+#define GET_GetBooleanIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT)
+#define SET_GetBooleanIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT, fn)
+#define CALL_GetIntegerIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint *)), _gloffset_GetIntegerIndexedvEXT, parameters)
+#define GET_GetIntegerIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT)
+#define SET_GetIntegerIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT, fn)
+#define CALL_IsEnabledIndexedEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_IsEnabledIndexedEXT, parameters)
+#define GET_IsEnabledIndexedEXT(disp) GET_by_offset(disp, _gloffset_IsEnabledIndexedEXT)
+#define SET_IsEnabledIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_IsEnabledIndexedEXT, fn)
+#define CALL_ClearColorIiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_ClearColorIiEXT, parameters)
+#define GET_ClearColorIiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIiEXT)
+#define SET_ClearColorIiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIiEXT, fn)
+#define CALL_ClearColorIuiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_ClearColorIuiEXT, parameters)
+#define GET_ClearColorIuiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIuiEXT)
+#define SET_ClearColorIuiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIuiEXT, fn)
+#define CALL_GetTexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameterIivEXT, parameters)
+#define GET_GetTexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIivEXT)
+#define SET_GetTexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIivEXT, fn)
+#define CALL_GetTexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint *)), _gloffset_GetTexParameterIuivEXT, parameters)
+#define GET_GetTexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIuivEXT)
+#define SET_GetTexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIuivEXT, fn)
+#define CALL_TexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameterIivEXT, parameters)
+#define GET_TexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIivEXT)
+#define SET_TexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIivEXT, fn)
+#define CALL_TexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLuint *)), _gloffset_TexParameterIuivEXT, parameters)
+#define GET_TexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIuivEXT)
+#define SET_TexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIuivEXT, fn)
+#define CALL_BeginConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BeginConditionalRenderNV, parameters)
+#define GET_BeginConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_BeginConditionalRenderNV)
+#define SET_BeginConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_BeginConditionalRenderNV, fn)
+#define CALL_EndConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndConditionalRenderNV, parameters)
+#define GET_EndConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_EndConditionalRenderNV)
+#define SET_EndConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_EndConditionalRenderNV, fn)
+#define CALL_BeginTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BeginTransformFeedbackEXT, parameters)
+#define GET_BeginTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT)
+#define SET_BeginTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT, fn)
+#define CALL_BindBufferBaseEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint)), _gloffset_BindBufferBaseEXT, parameters)
+#define GET_BindBufferBaseEXT(disp) GET_by_offset(disp, _gloffset_BindBufferBaseEXT)
+#define SET_BindBufferBaseEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferBaseEXT, fn)
+#define CALL_BindBufferOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr)), _gloffset_BindBufferOffsetEXT, parameters)
+#define GET_BindBufferOffsetEXT(disp) GET_by_offset(disp, _gloffset_BindBufferOffsetEXT)
+#define SET_BindBufferOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferOffsetEXT, fn)
+#define CALL_BindBufferRangeEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)), _gloffset_BindBufferRangeEXT, parameters)
+#define GET_BindBufferRangeEXT(disp) GET_by_offset(disp, _gloffset_BindBufferRangeEXT)
+#define SET_BindBufferRangeEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferRangeEXT, fn)
+#define CALL_EndTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndTransformFeedbackEXT, parameters)
+#define GET_EndTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_EndTransformFeedbackEXT)
+#define SET_EndTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_EndTransformFeedbackEXT, fn)
+#define CALL_GetTransformFeedbackVaryingEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)), _gloffset_GetTransformFeedbackVaryingEXT, parameters)
+#define GET_GetTransformFeedbackVaryingEXT(disp) GET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT)
+#define SET_GetTransformFeedbackVaryingEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT, fn)
+#define CALL_TransformFeedbackVaryingsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const char **, GLenum)), _gloffset_TransformFeedbackVaryingsEXT, parameters)
+#define GET_TransformFeedbackVaryingsEXT(disp) GET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT)
+#define SET_TransformFeedbackVaryingsEXT(disp, fn) SET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT, fn)
+#define CALL_ProvokingVertexEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ProvokingVertexEXT, parameters)
+#define GET_ProvokingVertexEXT(disp) GET_by_offset(disp, _gloffset_ProvokingVertexEXT)
+#define SET_ProvokingVertexEXT(disp, fn) SET_by_offset(disp, _gloffset_ProvokingVertexEXT, fn)
+#define CALL_GetTexParameterPointervAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetTexParameterPointervAPPLE, parameters)
+#define GET_GetTexParameterPointervAPPLE(disp) GET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE)
+#define SET_GetTexParameterPointervAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE, fn)
+#define CALL_TextureRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLvoid *)), _gloffset_TextureRangeAPPLE, parameters)
+#define GET_TextureRangeAPPLE(disp) GET_by_offset(disp, _gloffset_TextureRangeAPPLE)
+#define SET_TextureRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn)
+#define CALL_GetObjectParameterivAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetObjectParameterivAPPLE, parameters)
+#define GET_GetObjectParameterivAPPLE(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE)
+#define SET_GetObjectParameterivAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE, fn)
+#define CALL_ObjectPurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectPurgeableAPPLE, parameters)
+#define GET_ObjectPurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE)
+#define SET_ObjectPurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE, fn)
+#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectUnpurgeableAPPLE, parameters)
+#define GET_ObjectUnpurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE)
+#define SET_ObjectUnpurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn)
+#define CALL_ActiveProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ActiveProgramEXT, parameters)
+#define GET_ActiveProgramEXT(disp) GET_by_offset(disp, _gloffset_ActiveProgramEXT)
+#define SET_ActiveProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveProgramEXT, fn)
+#define CALL_CreateShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum, const GLchar *)), _gloffset_CreateShaderProgramEXT, parameters)
+#define GET_CreateShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_CreateShaderProgramEXT)
+#define SET_CreateShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn)
+#define CALL_UseShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_UseShaderProgramEXT, parameters)
+#define GET_UseShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_UseShaderProgramEXT)
+#define SET_UseShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn)
+#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparateATI, parameters)
+#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparateATI)
+#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn)
+#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramEnvParameters4fvEXT, parameters)
+#define GET_ProgramEnvParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT)
+#define SET_ProgramEnvParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT, fn)
+#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramLocalParameters4fvEXT, parameters)
+#define GET_ProgramLocalParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT)
+#define SET_ProgramLocalParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT, fn)
+#define CALL_GetQueryObjecti64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint64EXT *)), _gloffset_GetQueryObjecti64vEXT, parameters)
+#define GET_GetQueryObjecti64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT)
+#define SET_GetQueryObjecti64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT, fn)
+#define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), _gloffset_GetQueryObjectui64vEXT, parameters)
+#define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT)
+#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT, fn)
+#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetRenderbufferStorageOES, parameters)
+#define GET_EGLImageTargetRenderbufferStorageOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES)
+#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn)
+#define CALL_EGLImageTargetTexture2DOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetTexture2DOES, parameters)
+#define GET_EGLImageTargetTexture2DOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES)
+#define SET_EGLImageTargetTexture2DOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn)
+
+#endif /* !defined( _GLAPI_DISPATCH_H_ ) */
diff --git a/src/mesa/main/hint.h b/src/mesa/main/hint.h
index 66e78ad655..6c62068743 100644
--- a/src/mesa/main/hint.h
+++ b/src/mesa/main/hint.h
@@ -36,8 +36,10 @@
#ifndef HINT_H
#define HINT_H
+#include "glheader.h"
+#include "mfeatures.h"
-#include "mtypes.h"
+struct gl_context;
#if _HAVE_FULL_GL
diff --git a/src/mesa/main/histogram.h b/src/mesa/main/histogram.h
index 240087141b..577324222c 100644
--- a/src/mesa/main/histogram.h
+++ b/src/mesa/main/histogram.h
@@ -36,7 +36,10 @@
#ifndef HISTOGRAM_H
#define HISTOGRAM_H
-#include "main/mtypes.h"
+#include "compiler.h"
+#include "mfeatures.h"
+
+struct _glapi_table;
#if FEATURE_histogram
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 4b5d7dadc9..df1527b47f 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -32,7 +32,6 @@
#include "glheader.h"
#include "colormac.h"
-#include "enums.h"
#include "image.h"
#include "imports.h"
#include "macros.h"
@@ -86,36 +85,6 @@ _mesa_type_is_packed(GLenum type)
return GL_FALSE;
}
-/**
- * Flip the 8 bits in each byte of the given array.
- *
- * \param p array.
- * \param n number of bytes.
- *
- * \todo try this trick to flip bytes someday:
- * \code
- * v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555);
- * v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333);
- * v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f);
- * \endcode
- */
-static void
-flip_bytes( GLubyte *p, GLuint n )
-{
- GLuint i, a, b;
- for (i = 0; i < n; i++) {
- b = (GLuint) p[i]; /* words are often faster than bytes */
- a = ((b & 0x01) << 7) |
- ((b & 0x02) << 5) |
- ((b & 0x04) << 3) |
- ((b & 0x08) << 1) |
- ((b & 0x10) >> 1) |
- ((b & 0x20) >> 3) |
- ((b & 0x40) >> 5) |
- ((b & 0x80) >> 7);
- p[i] = (GLubyte) a;
- }
-}
/**
@@ -346,13 +315,15 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type )
return comps * sizeof(GLhalfARB);
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
- if (format == GL_RGB || format == GL_BGR)
+ if (format == GL_RGB || format == GL_BGR ||
+ format == GL_RGB_INTEGER_EXT || format == GL_BGR_INTEGER_EXT)
return sizeof(GLubyte);
else
return -1; /* error */
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
- if (format == GL_RGB || format == GL_BGR)
+ if (format == GL_RGB || format == GL_BGR ||
+ format == GL_RGB_INTEGER_EXT || format == GL_BGR_INTEGER_EXT)
return sizeof(GLushort);
else
return -1; /* error */
@@ -360,7 +331,8 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type )
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
case GL_UNSIGNED_SHORT_5_5_5_1:
case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT)
+ if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT ||
+ format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT)
return sizeof(GLushort);
else
return -1;
@@ -368,7 +340,8 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type )
case GL_UNSIGNED_INT_8_8_8_8_REV:
case GL_UNSIGNED_INT_10_10_10_2:
case GL_UNSIGNED_INT_2_10_10_10_REV:
- if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT)
+ if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT ||
+ format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT)
return sizeof(GLuint);
else
return -1;
@@ -399,7 +372,8 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type )
* otherwise.
*/
GLboolean
-_mesa_is_legal_format_and_type( struct gl_context *ctx, GLenum format, GLenum type )
+_mesa_is_legal_format_and_type(const struct gl_context *ctx,
+ GLenum format, GLenum type)
{
switch (format) {
case GL_COLOR_INDEX:
@@ -549,14 +523,77 @@ _mesa_is_legal_format_and_type( struct gl_context *ctx, GLenum format, GLenum ty
default:
return GL_FALSE;
}
+
+ /* integer-valued formats */
case GL_RED_INTEGER_EXT:
case GL_GREEN_INTEGER_EXT:
case GL_BLUE_INTEGER_EXT:
case GL_ALPHA_INTEGER_EXT:
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ return ctx->Extensions.EXT_texture_integer;
+ default:
+ return GL_FALSE;
+ }
+
case GL_RGB_INTEGER_EXT:
- case GL_RGBA_INTEGER_EXT:
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ return ctx->Extensions.EXT_texture_integer;
+ default:
+ return GL_FALSE;
+ }
+
case GL_BGR_INTEGER_EXT:
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ /* NOTE: no packed formats w/ BGR format */
+ return ctx->Extensions.EXT_texture_integer;
+ default:
+ return GL_FALSE;
+ }
+
+ case GL_RGBA_INTEGER_EXT:
case GL_BGRA_INTEGER_EXT:
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ return ctx->Extensions.EXT_texture_integer;
+ default:
+ return GL_FALSE;
+ }
+
case GL_LUMINANCE_INTEGER_EXT:
case GL_LUMINANCE_ALPHA_INTEGER_EXT:
switch (type) {
@@ -699,10 +736,57 @@ _mesa_is_color_format(GLenum format)
case GL_COMPRESSED_SIGNED_RED_RGTC1:
case GL_COMPRESSED_RG_RGTC2:
case GL_COMPRESSED_SIGNED_RG_RGTC2:
- return GL_TRUE;
- /* signed texture formats */
+ /* signed, normalized texture formats */
case GL_RGBA_SNORM:
case GL_RGBA8_SNORM:
+ /* generic integer formats */
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ /* sized integer formats */
+ case GL_RGBA32UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_ALPHA32UI_EXT:
+ case GL_INTENSITY32UI_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ case GL_RGBA16UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ case GL_RGBA8UI_EXT:
+ case GL_RGB8UI_EXT:
+ case GL_ALPHA8UI_EXT:
+ case GL_INTENSITY8UI_EXT:
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ case GL_RGBA32I_EXT:
+ case GL_RGB32I_EXT:
+ case GL_ALPHA32I_EXT:
+ case GL_INTENSITY32I_EXT:
+ case GL_LUMINANCE32I_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ case GL_RGBA16I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ case GL_RGBA8I_EXT:
+ case GL_RGB8I_EXT:
+ case GL_ALPHA8I_EXT:
+ case GL_INTENSITY8I_EXT:
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE_ALPHA8I_EXT:
return GL_TRUE;
case GL_YCBCR_MESA: /* not considered to be RGB */
/* fall-through */
@@ -846,6 +930,7 @@ GLboolean
_mesa_is_integer_format(GLenum format)
{
switch (format) {
+ /* generic integer formats */
case GL_RED_INTEGER_EXT:
case GL_GREEN_INTEGER_EXT:
case GL_BLUE_INTEGER_EXT:
@@ -856,6 +941,43 @@ _mesa_is_integer_format(GLenum format)
case GL_BGRA_INTEGER_EXT:
case GL_LUMINANCE_INTEGER_EXT:
case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ /* specific integer formats */
+ case GL_RGBA32UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_ALPHA32UI_EXT:
+ case GL_INTENSITY32UI_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ case GL_RGBA16UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ case GL_RGBA8UI_EXT:
+ case GL_RGB8UI_EXT:
+ case GL_ALPHA8UI_EXT:
+ case GL_INTENSITY8UI_EXT:
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ case GL_RGBA32I_EXT:
+ case GL_RGB32I_EXT:
+ case GL_ALPHA32I_EXT:
+ case GL_INTENSITY32I_EXT:
+ case GL_LUMINANCE32I_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ case GL_RGBA16I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ case GL_RGBA8I_EXT:
+ case GL_RGB8I_EXT:
+ case GL_ALPHA8I_EXT:
+ case GL_INTENSITY8I_EXT:
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE_ALPHA8I_EXT:
return GL_TRUE;
default:
return GL_FALSE;
@@ -1119,8 +1241,6 @@ _mesa_image_row_stride( const struct gl_pixelstore_attrib *packing,
}
-#if _HAVE_FULL_GL
-
/*
* Compute the stride between images in a 3D texture (in bytes) for the given
* pixel packing parameters and image width, format and type.
@@ -1168,248 +1288,6 @@ _mesa_image_image_stride( const struct gl_pixelstore_attrib *packing,
}
-/*
- * Unpack a 32x32 pixel polygon stipple from user memory using the
- * current pixel unpack settings.
- */
-void
-_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32],
- const struct gl_pixelstore_attrib *unpacking )
-{
- GLubyte *ptrn = (GLubyte *) _mesa_unpack_bitmap(32, 32, pattern, unpacking);
- if (ptrn) {
- /* Convert pattern from GLubytes to GLuints and handle big/little
- * endian differences
- */
- GLubyte *p = ptrn;
- GLint i;
- for (i = 0; i < 32; i++) {
- dest[i] = (p[0] << 24)
- | (p[1] << 16)
- | (p[2] << 8)
- | (p[3] );
- p += 4;
- }
- free(ptrn);
- }
-}
-
-
-/*
- * Pack polygon stipple into user memory given current pixel packing
- * settings.
- */
-void
-_mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest,
- const struct gl_pixelstore_attrib *packing )
-{
- /* Convert pattern from GLuints to GLubytes to handle big/little
- * endian differences.
- */
- GLubyte ptrn[32*4];
- GLint i;
- for (i = 0; i < 32; i++) {
- ptrn[i * 4 + 0] = (GLubyte) ((pattern[i] >> 24) & 0xff);
- ptrn[i * 4 + 1] = (GLubyte) ((pattern[i] >> 16) & 0xff);
- ptrn[i * 4 + 2] = (GLubyte) ((pattern[i] >> 8 ) & 0xff);
- ptrn[i * 4 + 3] = (GLubyte) ((pattern[i] ) & 0xff);
- }
-
- _mesa_pack_bitmap(32, 32, ptrn, dest, packing);
-}
-
-
-/*
- * Unpack bitmap data. Resulting data will be in most-significant-bit-first
- * order with row alignment = 1 byte.
- */
-GLvoid *
-_mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
- const struct gl_pixelstore_attrib *packing )
-{
- GLint bytes, row, width_in_bytes;
- GLubyte *buffer, *dst;
-
- if (!pixels)
- return NULL;
-
- /* Alloc dest storage */
- bytes = ((width + 7) / 8 * height);
- buffer = (GLubyte *) malloc( bytes );
- if (!buffer)
- return NULL;
-
- width_in_bytes = CEILING( width, 8 );
- dst = buffer;
- for (row = 0; row < height; row++) {
- const GLubyte *src = (const GLubyte *)
- _mesa_image_address2d(packing, pixels, width, height,
- GL_COLOR_INDEX, GL_BITMAP, row, 0);
- if (!src) {
- free(buffer);
- return NULL;
- }
-
- if ((packing->SkipPixels & 7) == 0) {
- memcpy( dst, src, width_in_bytes );
- if (packing->LsbFirst) {
- flip_bytes( dst, width_in_bytes );
- }
- }
- else {
- /* handling SkipPixels is a bit tricky (no pun intended!) */
- GLint i;
- if (packing->LsbFirst) {
- GLubyte srcMask = 1 << (packing->SkipPixels & 0x7);
- GLubyte dstMask = 128;
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 128) {
- srcMask = 1;
- s++;
- }
- else {
- srcMask = srcMask << 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- else {
- GLubyte srcMask = 128 >> (packing->SkipPixels & 0x7);
- GLubyte dstMask = 128;
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 1) {
- srcMask = 128;
- s++;
- }
- else {
- srcMask = srcMask >> 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- }
- dst += width_in_bytes;
- }
-
- return buffer;
-}
-
-
-/*
- * Pack bitmap data.
- */
-void
-_mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
- GLubyte *dest, const struct gl_pixelstore_attrib *packing )
-{
- GLint row, width_in_bytes;
- const GLubyte *src;
-
- if (!source)
- return;
-
- width_in_bytes = CEILING( width, 8 );
- src = source;
- for (row = 0; row < height; row++) {
- GLubyte *dst = (GLubyte *) _mesa_image_address2d(packing, dest,
- width, height, GL_COLOR_INDEX, GL_BITMAP, row, 0);
- if (!dst)
- return;
-
- if ((packing->SkipPixels & 7) == 0) {
- memcpy( dst, src, width_in_bytes );
- if (packing->LsbFirst) {
- flip_bytes( dst, width_in_bytes );
- }
- }
- else {
- /* handling SkipPixels is a bit tricky (no pun intended!) */
- GLint i;
- if (packing->LsbFirst) {
- GLubyte srcMask = 128;
- GLubyte dstMask = 1 << (packing->SkipPixels & 0x7);
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 1) {
- srcMask = 128;
- s++;
- }
- else {
- srcMask = srcMask >> 1;
- }
- if (dstMask == 128) {
- dstMask = 1;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask << 1;
- }
- }
- }
- else {
- GLubyte srcMask = 128;
- GLubyte dstMask = 128 >> (packing->SkipPixels & 0x7);
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 1) {
- srcMask = 128;
- s++;
- }
- else {
- srcMask = srcMask >> 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- }
- src += width_in_bytes;
- }
-}
-
/**
* "Expand" a bitmap from 1-bit per pixel to 8-bits per pixel.
@@ -1496,4095 +1374,6 @@ _mesa_expand_bitmap(GLsizei width, GLsizei height,
}
-/**********************************************************************/
-/***** Pixel processing functions ******/
-/**********************************************************************/
-
-/*
- * Apply scale and bias factors to an array of RGBA pixels.
- */
-void
-_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4],
- GLfloat rScale, GLfloat gScale,
- GLfloat bScale, GLfloat aScale,
- GLfloat rBias, GLfloat gBias,
- GLfloat bBias, GLfloat aBias)
-{
- if (rScale != 1.0 || rBias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = rgba[i][RCOMP] * rScale + rBias;
- }
- }
- if (gScale != 1.0 || gBias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][GCOMP] = rgba[i][GCOMP] * gScale + gBias;
- }
- }
- if (bScale != 1.0 || bBias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][BCOMP] = rgba[i][BCOMP] * bScale + bBias;
- }
- }
- if (aScale != 1.0 || aBias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][ACOMP] = rgba[i][ACOMP] * aScale + aBias;
- }
- }
-}
-
-
-/*
- * Apply pixel mapping to an array of floating point RGBA pixels.
- */
-void
-_mesa_map_rgba( const struct gl_context *ctx, GLuint n, GLfloat rgba[][4] )
-{
- const GLfloat rscale = (GLfloat) (ctx->PixelMaps.RtoR.Size - 1);
- const GLfloat gscale = (GLfloat) (ctx->PixelMaps.GtoG.Size - 1);
- const GLfloat bscale = (GLfloat) (ctx->PixelMaps.BtoB.Size - 1);
- const GLfloat ascale = (GLfloat) (ctx->PixelMaps.AtoA.Size - 1);
- const GLfloat *rMap = ctx->PixelMaps.RtoR.Map;
- const GLfloat *gMap = ctx->PixelMaps.GtoG.Map;
- const GLfloat *bMap = ctx->PixelMaps.BtoB.Map;
- const GLfloat *aMap = ctx->PixelMaps.AtoA.Map;
- GLuint i;
- for (i=0;i<n;i++) {
- GLfloat r = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
- GLfloat g = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
- GLfloat b = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F);
- GLfloat a = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F);
- rgba[i][RCOMP] = rMap[IROUND(r * rscale)];
- rgba[i][GCOMP] = gMap[IROUND(g * gscale)];
- rgba[i][BCOMP] = bMap[IROUND(b * bscale)];
- rgba[i][ACOMP] = aMap[IROUND(a * ascale)];
- }
-}
-
-/**
- * Apply a color table lookup to an array of floating point RGBA colors.
- */
-void
-_mesa_lookup_rgba_float(const struct gl_color_table *table,
- GLuint n, GLfloat rgba[][4])
-{
- const GLint max = table->Size - 1;
- const GLfloat scale = (GLfloat) max;
- const GLfloat *lut = table->TableF;
- GLuint i;
-
- if (!table->TableF || table->Size == 0)
- return;
-
- switch (table->_BaseFormat) {
- case GL_INTENSITY:
- /* replace RGBA with I */
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][RCOMP] * scale);
- GLfloat c = lut[CLAMP(j, 0, max)];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] =
- rgba[i][ACOMP] = c;
- }
- break;
- case GL_LUMINANCE:
- /* replace RGB with L */
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][RCOMP] * scale);
- GLfloat c = lut[CLAMP(j, 0, max)];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = c;
- }
- break;
- case GL_ALPHA:
- /* replace A with A */
- for (i = 0; i < n; i++) {
- GLint j = IROUND(rgba[i][ACOMP] * scale);
- rgba[i][ACOMP] = lut[CLAMP(j, 0, max)];
- }
- break;
- case GL_LUMINANCE_ALPHA:
- /* replace RGBA with LLLA */
- for (i = 0; i < n; i++) {
- GLint jL = IROUND(rgba[i][RCOMP] * scale);
- GLint jA = IROUND(rgba[i][ACOMP] * scale);
- GLfloat luminance, alpha;
- jL = CLAMP(jL, 0, max);
- jA = CLAMP(jA, 0, max);
- luminance = lut[jL * 2 + 0];
- alpha = lut[jA * 2 + 1];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = luminance;
- rgba[i][ACOMP] = alpha;;
- }
- break;
- case GL_RED:
- /* replace RGB with RGB */
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- jR = CLAMP(jR, 0, max);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- }
- break;
- case GL_RG:
- /* replace RG with RG */
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- rgba[i][GCOMP] = lut[jG * 3 + 1];
- }
- break;
- case GL_RGB:
- /* replace RGB with RGB */
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- GLint jB = IROUND(rgba[i][BCOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- jB = CLAMP(jB, 0, max);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- rgba[i][GCOMP] = lut[jG * 3 + 1];
- rgba[i][BCOMP] = lut[jB * 3 + 2];
- }
- break;
- case GL_RGBA:
- /* replace RGBA with RGBA */
- for (i = 0; i < n; i++) {
- GLint jR = IROUND(rgba[i][RCOMP] * scale);
- GLint jG = IROUND(rgba[i][GCOMP] * scale);
- GLint jB = IROUND(rgba[i][BCOMP] * scale);
- GLint jA = IROUND(rgba[i][ACOMP] * scale);
- jR = CLAMP(jR, 0, max);
- jG = CLAMP(jG, 0, max);
- jB = CLAMP(jB, 0, max);
- jA = CLAMP(jA, 0, max);
- rgba[i][RCOMP] = lut[jR * 4 + 0];
- rgba[i][GCOMP] = lut[jG * 4 + 1];
- rgba[i][BCOMP] = lut[jB * 4 + 2];
- rgba[i][ACOMP] = lut[jA * 4 + 3];
- }
- break;
- default:
- _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_float");
- return;
- }
-}
-
-
-
-/**
- * Apply a color table lookup to an array of ubyte/RGBA colors.
- */
-void
-_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
- GLuint n, GLubyte rgba[][4])
-{
- const GLubyte *lut = table->TableUB;
- const GLfloat scale = (GLfloat) (table->Size - 1) / (GLfloat)255.0;
- GLuint i;
-
- if (!table->TableUB || table->Size == 0)
- return;
-
- switch (table->_BaseFormat) {
- case GL_INTENSITY:
- /* replace RGBA with I */
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- const GLubyte c = lut[rgba[i][RCOMP]];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] =
- rgba[i][ACOMP] = c;
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] =
- rgba[i][ACOMP] = lut[j];
- }
- }
- break;
- case GL_LUMINANCE:
- /* replace RGB with L */
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- const GLubyte c = lut[rgba[i][RCOMP]];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = c;
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = lut[j];
- }
- }
- break;
- case GL_ALPHA:
- /* replace A with A */
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- rgba[i][ACOMP] = lut[rgba[i][ACOMP]];
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint j = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- rgba[i][ACOMP] = lut[j];
- }
- }
- break;
- case GL_LUMINANCE_ALPHA:
- /* replace RGBA with LLLA */
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- GLubyte l = lut[rgba[i][RCOMP] * 2 + 0];
- GLubyte a = lut[rgba[i][ACOMP] * 2 + 1];;
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = l;
- rgba[i][ACOMP] = a;
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint jL = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- GLubyte luminance = lut[jL * 2 + 0];
- GLubyte alpha = lut[jA * 2 + 1];
- rgba[i][RCOMP] =
- rgba[i][GCOMP] =
- rgba[i][BCOMP] = luminance;
- rgba[i][ACOMP] = alpha;
- }
- }
- break;
- case GL_RGB:
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 3 + 0];
- rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 3 + 1];
- rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 3 + 2];
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
- GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
- rgba[i][RCOMP] = lut[jR * 3 + 0];
- rgba[i][GCOMP] = lut[jG * 3 + 1];
- rgba[i][BCOMP] = lut[jB * 3 + 2];
- }
- }
- break;
- case GL_RGBA:
- if (table->Size == 256) {
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 4 + 0];
- rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 4 + 1];
- rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 4 + 2];
- rgba[i][ACOMP] = lut[rgba[i][ACOMP] * 4 + 3];
- }
- }
- else {
- for (i = 0; i < n; i++) {
- GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
- GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
- GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
- GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], lut[jR * 4 + 0]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], lut[jG * 4 + 1]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], lut[jB * 4 + 2]);
- CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], lut[jA * 4 + 3]);
- }
- }
- break;
- default:
- _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_chan");
- return;
- }
-}
-
-
-
-/*
- * Map color indexes to float rgba values.
- */
-void
-_mesa_map_ci_to_rgba( const struct gl_context *ctx, GLuint n,
- const GLuint index[], GLfloat rgba[][4] )
-{
- GLuint rmask = ctx->PixelMaps.ItoR.Size - 1;
- GLuint gmask = ctx->PixelMaps.ItoG.Size - 1;
- GLuint bmask = ctx->PixelMaps.ItoB.Size - 1;
- GLuint amask = ctx->PixelMaps.ItoA.Size - 1;
- const GLfloat *rMap = ctx->PixelMaps.ItoR.Map;
- const GLfloat *gMap = ctx->PixelMaps.ItoG.Map;
- const GLfloat *bMap = ctx->PixelMaps.ItoB.Map;
- const GLfloat *aMap = ctx->PixelMaps.ItoA.Map;
- GLuint i;
- for (i=0;i<n;i++) {
- rgba[i][RCOMP] = rMap[index[i] & rmask];
- rgba[i][GCOMP] = gMap[index[i] & gmask];
- rgba[i][BCOMP] = bMap[index[i] & bmask];
- rgba[i][ACOMP] = aMap[index[i] & amask];
- }
-}
-
-
-/**
- * Map ubyte color indexes to ubyte/RGBA values.
- */
-void
-_mesa_map_ci8_to_rgba8(const struct gl_context *ctx, GLuint n, const GLubyte index[],
- GLubyte rgba[][4])
-{
- GLuint rmask = ctx->PixelMaps.ItoR.Size - 1;
- GLuint gmask = ctx->PixelMaps.ItoG.Size - 1;
- GLuint bmask = ctx->PixelMaps.ItoB.Size - 1;
- GLuint amask = ctx->PixelMaps.ItoA.Size - 1;
- const GLubyte *rMap = ctx->PixelMaps.ItoR.Map8;
- const GLubyte *gMap = ctx->PixelMaps.ItoG.Map8;
- const GLubyte *bMap = ctx->PixelMaps.ItoB.Map8;
- const GLubyte *aMap = ctx->PixelMaps.ItoA.Map8;
- GLuint i;
- for (i=0;i<n;i++) {
- rgba[i][RCOMP] = rMap[index[i] & rmask];
- rgba[i][GCOMP] = gMap[index[i] & gmask];
- rgba[i][BCOMP] = bMap[index[i] & bmask];
- rgba[i][ACOMP] = aMap[index[i] & amask];
- }
-}
-
-
-void
-_mesa_scale_and_bias_depth(const struct gl_context *ctx, GLuint n,
- GLfloat depthValues[])
-{
- const GLfloat scale = ctx->Pixel.DepthScale;
- const GLfloat bias = ctx->Pixel.DepthBias;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLfloat d = depthValues[i] * scale + bias;
- depthValues[i] = CLAMP(d, 0.0F, 1.0F);
- }
-}
-
-
-void
-_mesa_scale_and_bias_depth_uint(const struct gl_context *ctx, GLuint n,
- GLuint depthValues[])
-{
- const GLdouble max = (double) 0xffffffff;
- const GLdouble scale = ctx->Pixel.DepthScale;
- const GLdouble bias = ctx->Pixel.DepthBias * max;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLdouble d = (GLdouble) depthValues[i] * scale + bias;
- d = CLAMP(d, 0.0, max);
- depthValues[i] = (GLuint) d;
- }
-}
-
-/**
- * Apply various pixel transfer operations to an array of RGBA pixels
- * as indicated by the transferOps bitmask
- */
-void
-_mesa_apply_rgba_transfer_ops(struct gl_context *ctx, GLbitfield transferOps,
- GLuint n, GLfloat rgba[][4])
-{
- /* scale & bias */
- if (transferOps & IMAGE_SCALE_BIAS_BIT) {
- _mesa_scale_and_bias_rgba(n, rgba,
- ctx->Pixel.RedScale, ctx->Pixel.GreenScale,
- ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale,
- ctx->Pixel.RedBias, ctx->Pixel.GreenBias,
- ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias);
- }
- /* color map lookup */
- if (transferOps & IMAGE_MAP_COLOR_BIT) {
- _mesa_map_rgba( ctx, n, rgba );
- }
-
- /* clamping to [0,1] */
- if (transferOps & IMAGE_CLAMP_BIT) {
- GLuint i;
- for (i = 0; i < n; i++) {
- rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
- rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
- rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F);
- rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F);
- }
- }
-}
-
-
-/*
- * Apply color index shift and offset to an array of pixels.
- */
-static void
-shift_and_offset_ci( const struct gl_context *ctx, GLuint n, GLuint indexes[] )
-{
- GLint shift = ctx->Pixel.IndexShift;
- GLint offset = ctx->Pixel.IndexOffset;
- GLuint i;
- if (shift > 0) {
- for (i=0;i<n;i++) {
- indexes[i] = (indexes[i] << shift) + offset;
- }
- }
- else if (shift < 0) {
- shift = -shift;
- for (i=0;i<n;i++) {
- indexes[i] = (indexes[i] >> shift) + offset;
- }
- }
- else {
- for (i=0;i<n;i++) {
- indexes[i] = indexes[i] + offset;
- }
- }
-}
-
-
-
-/**
- * Apply color index shift, offset and table lookup to an array
- * of color indexes;
- */
-void
-_mesa_apply_ci_transfer_ops(const struct gl_context *ctx, GLbitfield transferOps,
- GLuint n, GLuint indexes[])
-{
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- shift_and_offset_ci(ctx, n, indexes);
- }
- if (transferOps & IMAGE_MAP_COLOR_BIT) {
- const GLuint mask = ctx->PixelMaps.ItoI.Size - 1;
- GLuint i;
- for (i = 0; i < n; i++) {
- const GLuint j = indexes[i] & mask;
- indexes[i] = IROUND(ctx->PixelMaps.ItoI.Map[j]);
- }
- }
-}
-
-
-/**
- * Apply stencil index shift, offset and table lookup to an array
- * of stencil values.
- */
-void
-_mesa_apply_stencil_transfer_ops(const struct gl_context *ctx, GLuint n,
- GLstencil stencil[])
-{
- if (ctx->Pixel.IndexShift != 0 || ctx->Pixel.IndexOffset != 0) {
- const GLint offset = ctx->Pixel.IndexOffset;
- GLint shift = ctx->Pixel.IndexShift;
- GLuint i;
- if (shift > 0) {
- for (i = 0; i < n; i++) {
- stencil[i] = (stencil[i] << shift) + offset;
- }
- }
- else if (shift < 0) {
- shift = -shift;
- for (i = 0; i < n; i++) {
- stencil[i] = (stencil[i] >> shift) + offset;
- }
- }
- else {
- for (i = 0; i < n; i++) {
- stencil[i] = stencil[i] + offset;
- }
- }
- }
- if (ctx->Pixel.MapStencilFlag) {
- GLuint mask = ctx->PixelMaps.StoS.Size - 1;
- GLuint i;
- for (i = 0; i < n; i++) {
- stencil[i] = (GLstencil)ctx->PixelMaps.StoS.Map[ stencil[i] & mask ];
- }
- }
-}
-
-
-/**
- * Used to pack an array [][4] of RGBA float colors as specified
- * by the dstFormat, dstType and dstPacking. Used by glReadPixels.
- * Note: the rgba values will be modified by this function when any pixel
- * transfer ops are enabled.
- */
-void
-_mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
- GLenum dstFormat, GLenum dstType,
- GLvoid *dstAddr,
- const struct gl_pixelstore_attrib *dstPacking,
- GLbitfield transferOps)
-{
- GLfloat luminance[MAX_WIDTH];
- const GLint comps = _mesa_components_in_format(dstFormat);
- GLuint i;
-
- /* XXX
- * This test should probably go away. Have the caller set/clear the
- * IMAGE_CLAMP_BIT as needed.
- */
- if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) {
- /* need to clamp to [0, 1] */
- transferOps |= IMAGE_CLAMP_BIT;
- }
-
- if (transferOps) {
- _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
- }
-
- if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) {
- /* compute luminance values */
- if (transferOps & IMAGE_CLAMP_BIT) {
- for (i = 0; i < n; i++) {
- GLfloat sum = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
- luminance[i] = CLAMP(sum, 0.0F, 1.0F);
- }
- }
- else {
- for (i = 0; i < n; i++) {
- luminance[i] = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
- }
- }
- }
-
- /*
- * Pack/store the pixels. Ugh! Lots of cases!!!
- */
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UBYTE(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UBYTE(luminance[i]);
- dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_RG:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_BYTE:
- {
- GLbyte *dst = (GLbyte *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_BYTE(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_BYTE(luminance[i]);
- dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_RG:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLushort *dst = (GLushort *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- UNCLAMPED_FLOAT_TO_USHORT(dst[i], luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- UNCLAMPED_FLOAT_TO_USHORT(dst[i*2+0], luminance[i]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][ACOMP]);
- }
- break;
- case GL_RG:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*2+0], rgba[i][RCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][GCOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][RCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][RCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][BCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][BCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][BCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][RCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][ACOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][BCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][GCOMP]);
- CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_SHORT:
- {
- GLshort *dst = (GLshort *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_SHORT(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_SHORT(luminance[i]);
- dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- }
- break;
- case GL_RG:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint *dst = (GLuint *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_UINT(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UINT(luminance[i]);
- dst[i*2+1] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- }
- break;
- case GL_RG:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_UINT(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_UINT(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_INT:
- {
- GLint *dst = (GLint *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = FLOAT_TO_INT(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_INT(luminance[i]);
- dst[i*2+1] = FLOAT_TO_INT(rgba[i][ACOMP]);
- }
- break;
- case GL_RG:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
- dst[i*3+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_INT(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
- dst[i*4+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_INT(rgba[i][BCOMP]);
- dst[i*4+3] = FLOAT_TO_INT(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = FLOAT_TO_INT(rgba[i][BCOMP]);
- dst[i*3+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*3+2] = FLOAT_TO_INT(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_INT(rgba[i][BCOMP]);
- dst[i*4+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*4+2] = FLOAT_TO_INT(rgba[i][RCOMP]);
- dst[i*4+3] = FLOAT_TO_INT(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = FLOAT_TO_INT(rgba[i][ACOMP]);
- dst[i*4+1] = FLOAT_TO_INT(rgba[i][BCOMP]);
- dst[i*4+2] = FLOAT_TO_INT(rgba[i][GCOMP]);
- dst[i*4+3] = FLOAT_TO_INT(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
- dst[i*2+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_FLOAT:
- {
- GLfloat *dst = (GLfloat *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = rgba[i][RCOMP];
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = rgba[i][GCOMP];
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = rgba[i][BCOMP];
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = rgba[i][ACOMP];
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = luminance[i];
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = luminance[i];
- dst[i*2+1] = rgba[i][ACOMP];
- }
- break;
- case GL_RG:
- for (i=0;i<n;i++) {
- dst[i*2+0] = rgba[i][RCOMP];
- dst[i*2+1] = rgba[i][GCOMP];
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = rgba[i][RCOMP];
- dst[i*3+1] = rgba[i][GCOMP];
- dst[i*3+2] = rgba[i][BCOMP];
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = rgba[i][RCOMP];
- dst[i*4+1] = rgba[i][GCOMP];
- dst[i*4+2] = rgba[i][BCOMP];
- dst[i*4+3] = rgba[i][ACOMP];
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = rgba[i][BCOMP];
- dst[i*3+1] = rgba[i][GCOMP];
- dst[i*3+2] = rgba[i][RCOMP];
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = rgba[i][BCOMP];
- dst[i*4+1] = rgba[i][GCOMP];
- dst[i*4+2] = rgba[i][RCOMP];
- dst[i*4+3] = rgba[i][ACOMP];
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = rgba[i][ACOMP];
- dst[i*4+1] = rgba[i][BCOMP];
- dst[i*4+2] = rgba[i][GCOMP];
- dst[i*4+3] = rgba[i][RCOMP];
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = rgba[i][RCOMP];
- dst[i*2+1] = rgba[i][GCOMP];
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dstAddr;
- switch (dstFormat) {
- case GL_RED:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][RCOMP]);
- break;
- case GL_GREEN:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][GCOMP]);
- break;
- case GL_BLUE:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][BCOMP]);
- break;
- case GL_ALPHA:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(rgba[i][ACOMP]);
- break;
- case GL_LUMINANCE:
- for (i=0;i<n;i++)
- dst[i] = _mesa_float_to_half(luminance[i]);
- break;
- case GL_LUMINANCE_ALPHA:
- for (i=0;i<n;i++) {
- dst[i*2+0] = _mesa_float_to_half(luminance[i]);
- dst[i*2+1] = _mesa_float_to_half(rgba[i][ACOMP]);
- }
- break;
- case GL_RG:
- for (i=0;i<n;i++) {
- dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- }
- break;
- case GL_RGB:
- for (i=0;i<n;i++) {
- dst[i*3+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*3+2] = _mesa_float_to_half(rgba[i][BCOMP]);
- }
- break;
- case GL_RGBA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*4+2] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
- }
- break;
- case GL_BGR:
- for (i=0;i<n;i++) {
- dst[i*3+0] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*3+2] = _mesa_float_to_half(rgba[i][RCOMP]);
- }
- break;
- case GL_BGRA:
- for (i=0;i<n;i++) {
- dst[i*4+0] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*4+2] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
- }
- break;
- case GL_ABGR_EXT:
- for (i=0;i<n;i++) {
- dst[i*4+0] = _mesa_float_to_half(rgba[i][ACOMP]);
- dst[i*4+1] = _mesa_float_to_half(rgba[i][BCOMP]);
- dst[i*4+2] = _mesa_float_to_half(rgba[i][GCOMP]);
- dst[i*4+3] = _mesa_float_to_half(rgba[i][RCOMP]);
- }
- break;
- case GL_DUDV_ATI:
- case GL_DU8DV8_ATI:
- for (i=0;i<n;i++) {
- dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
- dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
- }
- break;
- default:
- _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
- }
- }
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- if (dstFormat == GL_RGB) {
- GLubyte *dst = (GLubyte *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 7.0F) << 5)
- | (IROUND(rgba[i][GCOMP] * 7.0F) << 2)
- | (IROUND(rgba[i][BCOMP] * 3.0F) );
- }
- }
- break;
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- if (dstFormat == GL_RGB) {
- GLubyte *dst = (GLubyte *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 7.0F) )
- | (IROUND(rgba[i][GCOMP] * 7.0F) << 3)
- | (IROUND(rgba[i][BCOMP] * 3.0F) << 6);
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- if (dstFormat == GL_RGB) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) << 11)
- | (IROUND(rgba[i][GCOMP] * 63.0F) << 5)
- | (IROUND(rgba[i][BCOMP] * 31.0F) );
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- if (dstFormat == GL_RGB) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) )
- | (IROUND(rgba[i][GCOMP] * 63.0F) << 5)
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 11);
- }
- }
- break;
- case GL_UNSIGNED_SHORT_4_4_4_4:
- if (dstFormat == GL_RGBA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 15.0F) << 12)
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][BCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][ACOMP] * 15.0F) );
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 15.0F) << 12)
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][RCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][ACOMP] * 15.0F) );
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 15.0F) << 12)
- | (IROUND(rgba[i][BCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][RCOMP] * 15.0F) );
- }
- }
- break;
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- if (dstFormat == GL_RGBA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 15.0F) )
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][BCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][ACOMP] * 15.0F) << 12);
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 15.0F) )
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][RCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][ACOMP] * 15.0F) << 12);
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 15.0F) )
- | (IROUND(rgba[i][BCOMP] * 15.0F) << 4)
- | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
- | (IROUND(rgba[i][RCOMP] * 15.0F) << 12);
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_5_5_1:
- if (dstFormat == GL_RGBA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) << 11)
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 6)
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 1)
- | (IROUND(rgba[i][ACOMP] * 1.0F) );
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 31.0F) << 11)
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 6)
- | (IROUND(rgba[i][RCOMP] * 31.0F) << 1)
- | (IROUND(rgba[i][ACOMP] * 1.0F) );
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 31.0F) << 11)
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 6)
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 1)
- | (IROUND(rgba[i][RCOMP] * 1.0F) );
- }
- }
- break;
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- if (dstFormat == GL_RGBA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) )
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 5)
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 10)
- | (IROUND(rgba[i][ACOMP] * 1.0F) << 15);
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 31.0F) )
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 5)
- | (IROUND(rgba[i][RCOMP] * 31.0F) << 10)
- | (IROUND(rgba[i][ACOMP] * 1.0F) << 15);
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLushort *dst = (GLushort *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 31.0F) )
- | (IROUND(rgba[i][BCOMP] * 31.0F) << 5)
- | (IROUND(rgba[i][GCOMP] * 31.0F) << 10)
- | (IROUND(rgba[i][RCOMP] * 1.0F) << 15);
- }
- }
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- if (dstFormat == GL_RGBA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 255.F) << 24)
- | (IROUND(rgba[i][GCOMP] * 255.F) << 16)
- | (IROUND(rgba[i][BCOMP] * 255.F) << 8)
- | (IROUND(rgba[i][ACOMP] * 255.F) );
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 255.F) << 24)
- | (IROUND(rgba[i][GCOMP] * 255.F) << 16)
- | (IROUND(rgba[i][RCOMP] * 255.F) << 8)
- | (IROUND(rgba[i][ACOMP] * 255.F) );
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 255.F) << 24)
- | (IROUND(rgba[i][BCOMP] * 255.F) << 16)
- | (IROUND(rgba[i][GCOMP] * 255.F) << 8)
- | (IROUND(rgba[i][RCOMP] * 255.F) );
- }
- }
- break;
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- if (dstFormat == GL_RGBA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 255.0F) )
- | (IROUND(rgba[i][GCOMP] * 255.0F) << 8)
- | (IROUND(rgba[i][BCOMP] * 255.0F) << 16)
- | (IROUND(rgba[i][ACOMP] * 255.0F) << 24);
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 255.0F) )
- | (IROUND(rgba[i][GCOMP] * 255.0F) << 8)
- | (IROUND(rgba[i][RCOMP] * 255.0F) << 16)
- | (IROUND(rgba[i][ACOMP] * 255.0F) << 24);
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 255.0F) )
- | (IROUND(rgba[i][BCOMP] * 255.0F) << 8)
- | (IROUND(rgba[i][GCOMP] * 255.0F) << 16)
- | (IROUND(rgba[i][RCOMP] * 255.0F) << 24);
- }
- }
- break;
- case GL_UNSIGNED_INT_10_10_10_2:
- if (dstFormat == GL_RGBA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 1023.0F) << 22)
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 12)
- | (IROUND(rgba[i][BCOMP] * 1023.0F) << 2)
- | (IROUND(rgba[i][ACOMP] * 3.0F) );
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 1023.0F) << 22)
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 12)
- | (IROUND(rgba[i][RCOMP] * 1023.0F) << 2)
- | (IROUND(rgba[i][ACOMP] * 3.0F) );
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 1023.0F) << 22)
- | (IROUND(rgba[i][BCOMP] * 1023.0F) << 12)
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 2)
- | (IROUND(rgba[i][RCOMP] * 3.0F) );
- }
- }
- break;
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- if (dstFormat == GL_RGBA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][RCOMP] * 1023.0F) )
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 10)
- | (IROUND(rgba[i][BCOMP] * 1023.0F) << 20)
- | (IROUND(rgba[i][ACOMP] * 3.0F) << 30);
- }
- }
- else if (dstFormat == GL_BGRA) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][BCOMP] * 1023.0F) )
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 10)
- | (IROUND(rgba[i][RCOMP] * 1023.0F) << 20)
- | (IROUND(rgba[i][ACOMP] * 3.0F) << 30);
- }
- }
- else if (dstFormat == GL_ABGR_EXT) {
- GLuint *dst = (GLuint *) dstAddr;
- for (i=0;i<n;i++) {
- dst[i] = (IROUND(rgba[i][ACOMP] * 1023.0F) )
- | (IROUND(rgba[i][BCOMP] * 1023.0F) << 10)
- | (IROUND(rgba[i][GCOMP] * 1023.0F) << 20)
- | (IROUND(rgba[i][RCOMP] * 3.0F) << 30);
- }
- }
- break;
- default:
- _mesa_problem(ctx, "bad type in _mesa_pack_rgba_span_float");
- return;
- }
-
- if (dstPacking->SwapBytes) {
- GLint swapSize = _mesa_sizeof_packed_type(dstType);
- if (swapSize == 2) {
- if (dstPacking->SwapBytes) {
- _mesa_swap2((GLushort *) dstAddr, n * comps);
- }
- }
- else if (swapSize == 4) {
- if (dstPacking->SwapBytes) {
- _mesa_swap4((GLuint *) dstAddr, n * comps);
- }
- }
- }
-}
-
-
-#define SWAP2BYTE(VALUE) \
- { \
- GLubyte *bytes = (GLubyte *) &(VALUE); \
- GLubyte tmp = bytes[0]; \
- bytes[0] = bytes[1]; \
- bytes[1] = tmp; \
- }
-
-#define SWAP4BYTE(VALUE) \
- { \
- GLubyte *bytes = (GLubyte *) &(VALUE); \
- GLubyte tmp = bytes[0]; \
- bytes[0] = bytes[3]; \
- bytes[3] = tmp; \
- tmp = bytes[1]; \
- bytes[1] = bytes[2]; \
- bytes[2] = tmp; \
- }
-
-
-static void
-extract_uint_indexes(GLuint n, GLuint indexes[],
- GLenum srcFormat, GLenum srcType, const GLvoid *src,
- const struct gl_pixelstore_attrib *unpack )
-{
- ASSERT(srcFormat == GL_COLOR_INDEX || srcFormat == GL_STENCIL_INDEX);
-
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_UNSIGNED_INT_24_8_EXT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT);
-
- switch (srcType) {
- case GL_BITMAP:
- {
- GLubyte *ubsrc = (GLubyte *) src;
- if (unpack->LsbFirst) {
- GLubyte mask = 1 << (unpack->SkipPixels & 0x7);
- GLuint i;
- for (i = 0; i < n; i++) {
- indexes[i] = (*ubsrc & mask) ? 1 : 0;
- if (mask == 128) {
- mask = 1;
- ubsrc++;
- }
- else {
- mask = mask << 1;
- }
- }
- }
- else {
- GLubyte mask = 128 >> (unpack->SkipPixels & 0x7);
- GLuint i;
- for (i = 0; i < n; i++) {
- indexes[i] = (*ubsrc & mask) ? 1 : 0;
- if (mask == 1) {
- mask = 128;
- ubsrc++;
- }
- else {
- mask = mask >> 1;
- }
- }
- }
- }
- break;
- case GL_UNSIGNED_BYTE:
- {
- GLuint i;
- const GLubyte *s = (const GLubyte *) src;
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- break;
- case GL_BYTE:
- {
- GLuint i;
- const GLbyte *s = (const GLbyte *) src;
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLuint i;
- const GLushort *s = (const GLushort *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLushort value = s[i];
- SWAP2BYTE(value);
- indexes[i] = value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- }
- break;
- case GL_SHORT:
- {
- GLuint i;
- const GLshort *s = (const GLshort *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLshort value = s[i];
- SWAP2BYTE(value);
- indexes[i] = value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint i;
- const GLuint *s = (const GLuint *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLuint value = s[i];
- SWAP4BYTE(value);
- indexes[i] = value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- }
- break;
- case GL_INT:
- {
- GLuint i;
- const GLint *s = (const GLint *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLint value = s[i];
- SWAP4BYTE(value);
- indexes[i] = value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i];
- }
- }
- break;
- case GL_FLOAT:
- {
- GLuint i;
- const GLfloat *s = (const GLfloat *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLfloat value = s[i];
- SWAP4BYTE(value);
- indexes[i] = (GLuint) value;
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = (GLuint) s[i];
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLuint i;
- const GLhalfARB *s = (const GLhalfARB *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLhalfARB value = s[i];
- SWAP2BYTE(value);
- indexes[i] = (GLuint) _mesa_half_to_float(value);
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = (GLuint) _mesa_half_to_float(s[i]);
- }
- }
- break;
- case GL_UNSIGNED_INT_24_8_EXT:
- {
- GLuint i;
- const GLuint *s = (const GLuint *) src;
- if (unpack->SwapBytes) {
- for (i = 0; i < n; i++) {
- GLuint value = s[i];
- SWAP4BYTE(value);
- indexes[i] = value & 0xff; /* lower 8 bits */
- }
- }
- else {
- for (i = 0; i < n; i++)
- indexes[i] = s[i] & 0xff; /* lower 8 bits */
- }
- }
- break;
-
- default:
- _mesa_problem(NULL, "bad srcType in extract_uint_indexes");
- return;
- }
-}
-
-
-/*
- * This function extracts floating point RGBA values from arbitrary
- * image data. srcFormat and srcType are the format and type parameters
- * passed to glDrawPixels, glTexImage[123]D, glTexSubImage[123]D, etc.
- *
- * Refering to section 3.6.4 of the OpenGL 1.2 spec, this function
- * implements the "Conversion to floating point", "Conversion to RGB",
- * and "Final Expansion to RGBA" operations.
- *
- * Args: n - number of pixels
- * rgba - output colors
- * srcFormat - format of incoming data
- * srcType - data type of incoming data
- * src - source data pointer
- * swapBytes - perform byteswapping of incoming data?
- */
-static void
-extract_float_rgba(GLuint n, GLfloat rgba[][4],
- GLenum srcFormat, GLenum srcType, const GLvoid *src,
- GLboolean swapBytes)
-{
- GLint redIndex, greenIndex, blueIndex, alphaIndex;
- GLint stride;
- GLint rComp, bComp, gComp, aComp;
- GLboolean intFormat;
- GLfloat rs = 1.0f, gs = 1.0f, bs = 1.0f, as = 1.0f; /* scale factors */
-
- ASSERT(srcFormat == GL_RED ||
- srcFormat == GL_GREEN ||
- srcFormat == GL_BLUE ||
- srcFormat == GL_ALPHA ||
- srcFormat == GL_LUMINANCE ||
- srcFormat == GL_LUMINANCE_ALPHA ||
- srcFormat == GL_INTENSITY ||
- srcFormat == GL_RG ||
- srcFormat == GL_RGB ||
- srcFormat == GL_BGR ||
- srcFormat == GL_RGBA ||
- srcFormat == GL_BGRA ||
- srcFormat == GL_ABGR_EXT ||
- srcFormat == GL_DU8DV8_ATI ||
- srcFormat == GL_DUDV_ATI ||
- srcFormat == GL_RED_INTEGER_EXT ||
- srcFormat == GL_GREEN_INTEGER_EXT ||
- srcFormat == GL_BLUE_INTEGER_EXT ||
- srcFormat == GL_ALPHA_INTEGER_EXT ||
- srcFormat == GL_RGB_INTEGER_EXT ||
- srcFormat == GL_RGBA_INTEGER_EXT ||
- srcFormat == GL_BGR_INTEGER_EXT ||
- srcFormat == GL_BGRA_INTEGER_EXT ||
- srcFormat == GL_LUMINANCE_INTEGER_EXT ||
- srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT);
-
- ASSERT(srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT ||
- srcType == GL_UNSIGNED_BYTE_3_3_2 ||
- srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
- srcType == GL_UNSIGNED_SHORT_5_6_5 ||
- srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
- srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
- srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
- srcType == GL_UNSIGNED_INT_8_8_8_8 ||
- srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
- srcType == GL_UNSIGNED_INT_10_10_10_2 ||
- srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
-
- rComp = gComp = bComp = aComp = -1;
-
- switch (srcFormat) {
- case GL_RED:
- case GL_RED_INTEGER_EXT:
- redIndex = 0;
- greenIndex = blueIndex = alphaIndex = -1;
- stride = 1;
- break;
- case GL_GREEN:
- case GL_GREEN_INTEGER_EXT:
- greenIndex = 0;
- redIndex = blueIndex = alphaIndex = -1;
- stride = 1;
- break;
- case GL_BLUE:
- case GL_BLUE_INTEGER_EXT:
- blueIndex = 0;
- redIndex = greenIndex = alphaIndex = -1;
- stride = 1;
- break;
- case GL_ALPHA:
- case GL_ALPHA_INTEGER_EXT:
- redIndex = greenIndex = blueIndex = -1;
- alphaIndex = 0;
- stride = 1;
- break;
- case GL_LUMINANCE:
- case GL_LUMINANCE_INTEGER_EXT:
- redIndex = greenIndex = blueIndex = 0;
- alphaIndex = -1;
- stride = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- case GL_LUMINANCE_ALPHA_INTEGER_EXT:
- redIndex = greenIndex = blueIndex = 0;
- alphaIndex = 1;
- stride = 2;
- break;
- case GL_INTENSITY:
- redIndex = greenIndex = blueIndex = alphaIndex = 0;
- stride = 1;
- break;
- case GL_RG:
- case GL_RG_INTEGER:
- redIndex = 0;
- greenIndex = 1;
- blueIndex = -1;
- alphaIndex = -1;
- rComp = 0;
- gComp = 1;
- bComp = 2;
- aComp = 3;
- stride = 2;
- break;
- case GL_RGB:
- case GL_RGB_INTEGER:
- redIndex = 0;
- greenIndex = 1;
- blueIndex = 2;
- alphaIndex = -1;
- rComp = 0;
- gComp = 1;
- bComp = 2;
- aComp = 3;
- stride = 3;
- break;
- case GL_BGR:
- redIndex = 2;
- greenIndex = 1;
- blueIndex = 0;
- alphaIndex = -1;
- rComp = 2;
- gComp = 1;
- bComp = 0;
- aComp = 3;
- stride = 3;
- break;
- case GL_RGBA:
- case GL_RGBA_INTEGER:
- redIndex = 0;
- greenIndex = 1;
- blueIndex = 2;
- alphaIndex = 3;
- rComp = 0;
- gComp = 1;
- bComp = 2;
- aComp = 3;
- stride = 4;
- break;
- case GL_BGRA:
- redIndex = 2;
- greenIndex = 1;
- blueIndex = 0;
- alphaIndex = 3;
- rComp = 2;
- gComp = 1;
- bComp = 0;
- aComp = 3;
- stride = 4;
- break;
- case GL_ABGR_EXT:
- redIndex = 3;
- greenIndex = 2;
- blueIndex = 1;
- alphaIndex = 0;
- rComp = 3;
- gComp = 2;
- bComp = 1;
- aComp = 0;
- stride = 4;
- break;
- case GL_DU8DV8_ATI:
- case GL_DUDV_ATI:
- redIndex = 0;
- greenIndex = 1;
- blueIndex = -1;
- alphaIndex = -1;
- stride = 2;
- break;
- default:
- _mesa_problem(NULL, "bad srcFormat %s in extract float data",
- _mesa_lookup_enum_by_nr(srcFormat));
- return;
- }
-
- intFormat = _mesa_is_integer_format(srcFormat);
-
-#define PROCESS(INDEX, CHANNEL, DEFAULT, DEFAULT_INT, TYPE, CONVERSION) \
- if ((INDEX) < 0) { \
- GLuint i; \
- if (intFormat) { \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = DEFAULT_INT; \
- } \
- } \
- else { \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = DEFAULT; \
- } \
- } \
- } \
- else if (swapBytes) { \
- const TYPE *s = (const TYPE *) src; \
- GLuint i; \
- for (i = 0; i < n; i++) { \
- TYPE value = s[INDEX]; \
- if (sizeof(TYPE) == 2) { \
- SWAP2BYTE(value); \
- } \
- else if (sizeof(TYPE) == 4) { \
- SWAP4BYTE(value); \
- } \
- if (intFormat) \
- rgba[i][CHANNEL] = (GLfloat) value; \
- else \
- rgba[i][CHANNEL] = (GLfloat) CONVERSION(value); \
- s += stride; \
- } \
- } \
- else { \
- const TYPE *s = (const TYPE *) src; \
- GLuint i; \
- if (intFormat) { \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = (GLfloat) s[INDEX]; \
- s += stride; \
- } \
- } \
- else { \
- for (i = 0; i < n; i++) { \
- rgba[i][CHANNEL] = (GLfloat) CONVERSION(s[INDEX]); \
- s += stride; \
- } \
- } \
- }
-
- switch (srcType) {
- case GL_UNSIGNED_BYTE:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 255, GLubyte, UBYTE_TO_FLOAT);
- break;
- case GL_BYTE:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 127, GLbyte, BYTE_TO_FLOAT);
- break;
- case GL_UNSIGNED_SHORT:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 0xffff, GLushort, USHORT_TO_FLOAT);
- break;
- case GL_SHORT:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 32767, GLshort, SHORT_TO_FLOAT);
- break;
- case GL_UNSIGNED_INT:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 0xffffffff, GLuint, UINT_TO_FLOAT);
- break;
- case GL_INT:
- PROCESS(redIndex, RCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
- PROCESS(greenIndex, GCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
- PROCESS(blueIndex, BCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
- PROCESS(alphaIndex, ACOMP, 1.0F, 2147483647, GLint, INT_TO_FLOAT);
- break;
- case GL_FLOAT:
- PROCESS(redIndex, RCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
- PROCESS(greenIndex, GCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
- PROCESS(blueIndex, BCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
- PROCESS(alphaIndex, ACOMP, 1.0F, 1.0F, GLfloat, (GLfloat));
- break;
- case GL_HALF_FLOAT_ARB:
- PROCESS(redIndex, RCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(greenIndex, GCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(blueIndex, BCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
- PROCESS(alphaIndex, ACOMP, 1.0F, 1.0F, GLhalfARB, _mesa_half_to_float);
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- {
- const GLubyte *ubsrc = (const GLubyte *) src;
- GLuint i;
- if (!intFormat) {
- rs = 1.0F / 7.0F;
- gs = 1.0F / 7.0F;
- bs = 1.0F / 3.0F;
- }
- for (i = 0; i < n; i ++) {
- GLubyte p = ubsrc[i];
- rgba[i][rComp] = ((p >> 5) ) * rs;
- rgba[i][gComp] = ((p >> 2) & 0x7) * gs;
- rgba[i][bComp] = ((p ) & 0x3) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- break;
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- {
- const GLubyte *ubsrc = (const GLubyte *) src;
- GLuint i;
- if (!intFormat) {
- rs = 1.0F / 7.0F;
- gs = 1.0F / 7.0F;
- bs = 1.0F / 3.0F;
- }
- for (i = 0; i < n; i ++) {
- GLubyte p = ubsrc[i];
- rgba[i][rComp] = ((p ) & 0x7) * rs;
- rgba[i][gComp] = ((p >> 3) & 0x7) * gs;
- rgba[i][bComp] = ((p >> 6) ) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- if (!intFormat) {
- rs = 1.0F / 31.0F;
- gs = 1.0F / 63.0F;
- bs = 1.0F / 31.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p >> 11) ) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
- rgba[i][bComp] = ((p ) & 0x1f) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p >> 11) ) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
- rgba[i][bComp] = ((p ) & 0x1f) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- if (!intFormat) {
- rs = 1.0F / 31.0F;
- gs = 1.0F / 63.0F;
- bs = 1.0F / 31.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p ) & 0x1f) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
- rgba[i][bComp] = ((p >> 11) ) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p ) & 0x1f) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x3f) * gs;
- rgba[i][bComp] = ((p >> 11) ) * bs;
- rgba[i][aComp] = 1.0F;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_4_4_4_4:
- if (!intFormat) {
- rs = gs = bs = as = 1.0F / 15.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p >> 12) ) * rs;
- rgba[i][gComp] = ((p >> 8) & 0xf) * gs;
- rgba[i][bComp] = ((p >> 4) & 0xf) * bs;
- rgba[i][aComp] = ((p ) & 0xf) * as;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p >> 12) ) * rs;
- rgba[i][gComp] = ((p >> 8) & 0xf) * gs;
- rgba[i][bComp] = ((p >> 4) & 0xf) * bs;
- rgba[i][aComp] = ((p ) & 0xf) * as;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- if (!intFormat) {
- rs = gs = bs = as = 1.0F / 15.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p ) & 0xf) * rs;
- rgba[i][gComp] = ((p >> 4) & 0xf) * gs;
- rgba[i][bComp] = ((p >> 8) & 0xf) * bs;
- rgba[i][aComp] = ((p >> 12) ) * as;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p ) & 0xf) * rs;
- rgba[i][gComp] = ((p >> 4) & 0xf) * gs;
- rgba[i][bComp] = ((p >> 8) & 0xf) * bs;
- rgba[i][aComp] = ((p >> 12) ) * as;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_5_5_5_1:
- if (!intFormat) {
- rs = gs = bs = 1.0F / 31.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p >> 11) ) * rs;
- rgba[i][gComp] = ((p >> 6) & 0x1f) * gs;
- rgba[i][bComp] = ((p >> 1) & 0x1f) * bs;
- rgba[i][aComp] = ((p ) & 0x1) * as;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p >> 11) ) * rs;
- rgba[i][gComp] = ((p >> 6) & 0x1f) * gs;
- rgba[i][bComp] = ((p >> 1) & 0x1f) * bs;
- rgba[i][aComp] = ((p ) & 0x1) * as;
- }
- }
- break;
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- if (!intFormat) {
- rs = gs = bs = 1.0F / 31.0F;
- }
- if (swapBytes) {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- SWAP2BYTE(p);
- rgba[i][rComp] = ((p ) & 0x1f) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x1f) * gs;
- rgba[i][bComp] = ((p >> 10) & 0x1f) * bs;
- rgba[i][aComp] = ((p >> 15) ) * as;
- }
- }
- else {
- const GLushort *ussrc = (const GLushort *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLushort p = ussrc[i];
- rgba[i][rComp] = ((p ) & 0x1f) * rs;
- rgba[i][gComp] = ((p >> 5) & 0x1f) * gs;
- rgba[i][bComp] = ((p >> 10) & 0x1f) * bs;
- rgba[i][aComp] = ((p >> 15) ) * as;
- }
- }
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- if (swapBytes) {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- if (intFormat) {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = (GLfloat) ((p ) & 0xff);
- rgba[i][gComp] = (GLfloat) ((p >> 8) & 0xff);
- rgba[i][bComp] = (GLfloat) ((p >> 16) & 0xff);
- rgba[i][aComp] = (GLfloat) ((p >> 24) );
- }
- }
- else {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
- }
- }
- }
- else {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- if (intFormat) {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = (GLfloat) ((p >> 24) );
- rgba[i][gComp] = (GLfloat) ((p >> 16) & 0xff);
- rgba[i][bComp] = (GLfloat) ((p >> 8) & 0xff);
- rgba[i][aComp] = (GLfloat) ((p ) & 0xff);
- }
- }
- else {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- }
- }
- }
- break;
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- if (swapBytes) {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- if (intFormat) {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = (GLfloat) ((p >> 24) );
- rgba[i][gComp] = (GLfloat) ((p >> 16) & 0xff);
- rgba[i][bComp] = (GLfloat) ((p >> 8) & 0xff);
- rgba[i][aComp] = (GLfloat) ((p ) & 0xff);
- }
- }
- else {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p >> 24) );
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- }
- }
- }
- else {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- if (intFormat) {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = (GLfloat) ((p ) & 0xff);
- rgba[i][gComp] = (GLfloat) ((p >> 8) & 0xff);
- rgba[i][bComp] = (GLfloat) ((p >> 16) & 0xff);
- rgba[i][aComp] = (GLfloat) ((p >> 24) );
- }
- }
- else {
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = UBYTE_TO_FLOAT((p ) & 0xff);
- rgba[i][gComp] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
- rgba[i][bComp] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
- rgba[i][aComp] = UBYTE_TO_FLOAT((p >> 24) );
- }
- }
- }
- break;
- case GL_UNSIGNED_INT_10_10_10_2:
- if (!intFormat) {
- rs = 1.0F / 1023.0F;
- gs = 1.0F / 1023.0F;
- bs = 1.0F / 1023.0F;
- as = 1.0F / 3.0F;
- }
- if (swapBytes) {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- SWAP4BYTE(p);
- rgba[i][rComp] = ((p >> 22) ) * rs;
- rgba[i][gComp] = ((p >> 12) & 0x3ff) * gs;
- rgba[i][bComp] = ((p >> 2) & 0x3ff) * bs;
- rgba[i][aComp] = ((p ) & 0x3 ) * as;
- }
- }
- else {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = ((p >> 22) ) * rs;
- rgba[i][gComp] = ((p >> 12) & 0x3ff) * gs;
- rgba[i][bComp] = ((p >> 2) & 0x3ff) * bs;
- rgba[i][aComp] = ((p ) & 0x3 ) * as;
- }
- }
- break;
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- if (!intFormat) {
- rs = 1.0F / 1023.0F;
- gs = 1.0F / 1023.0F;
- bs = 1.0F / 1023.0F;
- as = 1.0F / 3.0F;
- }
- if (swapBytes) {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- SWAP4BYTE(p);
- rgba[i][rComp] = ((p ) & 0x3ff) * rs;
- rgba[i][gComp] = ((p >> 10) & 0x3ff) * gs;
- rgba[i][bComp] = ((p >> 20) & 0x3ff) * bs;
- rgba[i][aComp] = ((p >> 30) ) * as;
- }
- }
- else {
- const GLuint *uisrc = (const GLuint *) src;
- GLuint i;
- for (i = 0; i < n; i ++) {
- GLuint p = uisrc[i];
- rgba[i][rComp] = ((p ) & 0x3ff) * rs;
- rgba[i][gComp] = ((p >> 10) & 0x3ff) * gs;
- rgba[i][bComp] = ((p >> 20) & 0x3ff) * bs;
- rgba[i][aComp] = ((p >> 30) ) * as;
- }
- }
- break;
- default:
- _mesa_problem(NULL, "bad srcType in extract float data");
- break;
- }
-}
-
-
-/*
- * Unpack a row of color image data from a client buffer according to
- * the pixel unpacking parameters.
- * Return GLchan values in the specified dest image format.
- * This is used by glDrawPixels and glTexImage?D().
- * \param ctx - the context
- * n - number of pixels in the span
- * dstFormat - format of destination color array
- * dest - the destination color array
- * srcFormat - source image format
- * srcType - source image data type
- * source - source image pointer
- * srcPacking - pixel unpacking parameters
- * transferOps - bitmask of IMAGE_*_BIT values of operations to apply
- *
- * XXX perhaps expand this to process whole images someday.
- */
-void
-_mesa_unpack_color_span_chan( struct gl_context *ctx,
- GLuint n, GLenum dstFormat, GLchan dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(dstFormat == GL_ALPHA ||
- dstFormat == GL_LUMINANCE ||
- dstFormat == GL_LUMINANCE_ALPHA ||
- dstFormat == GL_INTENSITY ||
- dstFormat == GL_RED ||
- dstFormat == GL_RG ||
- dstFormat == GL_RGB ||
- dstFormat == GL_RGBA ||
- dstFormat == GL_COLOR_INDEX);
-
- ASSERT(srcFormat == GL_RED ||
- srcFormat == GL_GREEN ||
- srcFormat == GL_BLUE ||
- srcFormat == GL_ALPHA ||
- srcFormat == GL_LUMINANCE ||
- srcFormat == GL_LUMINANCE_ALPHA ||
- srcFormat == GL_INTENSITY ||
- srcFormat == GL_RG ||
- srcFormat == GL_RGB ||
- srcFormat == GL_BGR ||
- srcFormat == GL_RGBA ||
- srcFormat == GL_BGRA ||
- srcFormat == GL_ABGR_EXT ||
- srcFormat == GL_COLOR_INDEX);
-
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT ||
- srcType == GL_UNSIGNED_BYTE_3_3_2 ||
- srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
- srcType == GL_UNSIGNED_SHORT_5_6_5 ||
- srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
- srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
- srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
- srcType == GL_UNSIGNED_INT_8_8_8_8 ||
- srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
- srcType == GL_UNSIGNED_INT_10_10_10_2 ||
- srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
-
- /* Try simple cases first */
- if (transferOps == 0) {
- if (srcType == CHAN_TYPE) {
- if (dstFormat == GL_RGBA) {
- if (srcFormat == GL_RGBA) {
- memcpy( dest, source, n * 4 * sizeof(GLchan) );
- return;
- }
- else if (srcFormat == GL_RGB) {
- GLuint i;
- const GLchan *src = (const GLchan *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- dst[3] = CHAN_MAX;
- src += 3;
- dst += 4;
- }
- return;
- }
- }
- else if (dstFormat == GL_RGB) {
- if (srcFormat == GL_RGB) {
- memcpy( dest, source, n * 3 * sizeof(GLchan) );
- return;
- }
- else if (srcFormat == GL_RGBA) {
- GLuint i;
- const GLchan *src = (const GLchan *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- src += 4;
- dst += 3;
- }
- return;
- }
- }
- else if (dstFormat == srcFormat) {
- GLint comps = _mesa_components_in_format(srcFormat);
- assert(comps > 0);
- memcpy( dest, source, n * comps * sizeof(GLchan) );
- return;
- }
- }
- /*
- * Common situation, loading 8bit RGBA/RGB source images
- * into 16/32 bit destination. (OSMesa16/32)
- */
- else if (srcType == GL_UNSIGNED_BYTE) {
- if (dstFormat == GL_RGBA) {
- if (srcFormat == GL_RGB) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = UBYTE_TO_CHAN(src[0]);
- dst[1] = UBYTE_TO_CHAN(src[1]);
- dst[2] = UBYTE_TO_CHAN(src[2]);
- dst[3] = CHAN_MAX;
- src += 3;
- dst += 4;
- }
- return;
- }
- else if (srcFormat == GL_RGBA) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = UBYTE_TO_CHAN(src[0]);
- dst[1] = UBYTE_TO_CHAN(src[1]);
- dst[2] = UBYTE_TO_CHAN(src[2]);
- dst[3] = UBYTE_TO_CHAN(src[3]);
- src += 4;
- dst += 4;
- }
- return;
- }
- }
- else if (dstFormat == GL_RGB) {
- if (srcFormat == GL_RGB) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = UBYTE_TO_CHAN(src[0]);
- dst[1] = UBYTE_TO_CHAN(src[1]);
- dst[2] = UBYTE_TO_CHAN(src[2]);
- src += 3;
- dst += 3;
- }
- return;
- }
- else if (srcFormat == GL_RGBA) {
- GLuint i;
- const GLubyte *src = (const GLubyte *) source;
- GLchan *dst = dest;
- for (i = 0; i < n; i++) {
- dst[0] = UBYTE_TO_CHAN(src[0]);
- dst[1] = UBYTE_TO_CHAN(src[1]);
- dst[2] = UBYTE_TO_CHAN(src[2]);
- src += 4;
- dst += 3;
- }
- return;
- }
- }
- }
- }
-
-
- /* general solution begins here */
- {
- GLint dstComponents;
- GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex;
- GLint dstLuminanceIndex, dstIntensityIndex;
- GLfloat rgba[MAX_WIDTH][4];
-
- dstComponents = _mesa_components_in_format( dstFormat );
- /* source & dest image formats should have been error checked by now */
- assert(dstComponents > 0);
-
- /*
- * Extract image data and convert to RGBA floats
- */
- assert(n <= MAX_WIDTH);
- if (srcFormat == GL_COLOR_INDEX) {
- GLuint indexes[MAX_WIDTH];
- extract_uint_indexes(n, indexes, srcFormat, srcType, source,
- srcPacking);
-
- if (dstFormat == GL_COLOR_INDEX) {
- GLuint i;
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
- /* convert to GLchan and return */
- for (i = 0; i < n; i++) {
- dest[i] = (GLchan) (indexes[i] & 0xff);
- }
- return;
- }
- else {
- /* Convert indexes to RGBA */
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- shift_and_offset_ci(ctx, n, indexes);
- }
- _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
- }
-
- /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
- * with color indexes.
- */
- transferOps &= ~(IMAGE_SCALE_BIAS_BIT | IMAGE_MAP_COLOR_BIT);
- }
- else {
- /* non-color index data */
- extract_float_rgba(n, rgba, srcFormat, srcType, source,
- srcPacking->SwapBytes);
- }
-
- /* Need to clamp if returning GLubytes or GLushorts */
-#if CHAN_TYPE != GL_FLOAT
- transferOps |= IMAGE_CLAMP_BIT;
-#endif
-
- if (transferOps) {
- _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
- }
-
- /* Now determine which color channels we need to produce.
- * And determine the dest index (offset) within each color tuple.
- */
- switch (dstFormat) {
- case GL_ALPHA:
- dstAlphaIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
- dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_LUMINANCE:
- dstLuminanceIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
- dstIntensityIndex = -1;
- break;
- case GL_LUMINANCE_ALPHA:
- dstLuminanceIndex = 0;
- dstAlphaIndex = 1;
- dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
- dstIntensityIndex = -1;
- break;
- case GL_INTENSITY:
- dstIntensityIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
- dstLuminanceIndex = -1;
- break;
- case GL_RED:
- dstRedIndex = 0;
- dstGreenIndex = dstBlueIndex = -1;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RG:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = -1;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RGB:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = 2;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RGBA:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = 2;
- dstAlphaIndex = 3;
- dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- default:
- _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_chan_span()");
- return;
- }
-
-
- /* Now return the GLchan data in the requested dstFormat */
-
- if (dstRedIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_CHAN(dst[dstRedIndex], rgba[i][RCOMP]);
- dst += dstComponents;
- }
- }
-
- if (dstGreenIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_CHAN(dst[dstGreenIndex], rgba[i][GCOMP]);
- dst += dstComponents;
- }
- }
-
- if (dstBlueIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_CHAN(dst[dstBlueIndex], rgba[i][BCOMP]);
- dst += dstComponents;
- }
- }
-
- if (dstAlphaIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_CHAN(dst[dstAlphaIndex], rgba[i][ACOMP]);
- dst += dstComponents;
- }
- }
-
- if (dstIntensityIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- assert(dstIntensityIndex == 0);
- assert(dstComponents == 1);
- for (i = 0; i < n; i++) {
- /* Intensity comes from red channel */
- CLAMPED_FLOAT_TO_CHAN(dst[i], rgba[i][RCOMP]);
- }
- }
-
- if (dstLuminanceIndex >= 0) {
- GLchan *dst = dest;
- GLuint i;
- assert(dstLuminanceIndex == 0);
- for (i = 0; i < n; i++) {
- /* Luminance comes from red channel */
- CLAMPED_FLOAT_TO_CHAN(dst[0], rgba[i][RCOMP]);
- dst += dstComponents;
- }
- }
- }
-}
-
-
-/**
- * Same as _mesa_unpack_color_span_chan(), but return GLfloat data
- * instead of GLchan.
- */
-void
-_mesa_unpack_color_span_float( struct gl_context *ctx,
- GLuint n, GLenum dstFormat, GLfloat dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(dstFormat == GL_ALPHA ||
- dstFormat == GL_LUMINANCE ||
- dstFormat == GL_LUMINANCE_ALPHA ||
- dstFormat == GL_INTENSITY ||
- dstFormat == GL_RED ||
- dstFormat == GL_RG ||
- dstFormat == GL_RGB ||
- dstFormat == GL_RGBA ||
- dstFormat == GL_COLOR_INDEX);
-
- ASSERT(srcFormat == GL_RED ||
- srcFormat == GL_GREEN ||
- srcFormat == GL_BLUE ||
- srcFormat == GL_ALPHA ||
- srcFormat == GL_LUMINANCE ||
- srcFormat == GL_LUMINANCE_ALPHA ||
- srcFormat == GL_INTENSITY ||
- srcFormat == GL_RG ||
- srcFormat == GL_RGB ||
- srcFormat == GL_BGR ||
- srcFormat == GL_RGBA ||
- srcFormat == GL_BGRA ||
- srcFormat == GL_ABGR_EXT ||
- srcFormat == GL_RED_INTEGER_EXT ||
- srcFormat == GL_GREEN_INTEGER_EXT ||
- srcFormat == GL_BLUE_INTEGER_EXT ||
- srcFormat == GL_ALPHA_INTEGER_EXT ||
- srcFormat == GL_RGB_INTEGER_EXT ||
- srcFormat == GL_RGBA_INTEGER_EXT ||
- srcFormat == GL_BGR_INTEGER_EXT ||
- srcFormat == GL_BGRA_INTEGER_EXT ||
- srcFormat == GL_LUMINANCE_INTEGER_EXT ||
- srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT ||
- srcFormat == GL_COLOR_INDEX);
-
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT ||
- srcType == GL_UNSIGNED_BYTE_3_3_2 ||
- srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
- srcType == GL_UNSIGNED_SHORT_5_6_5 ||
- srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
- srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
- srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
- srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
- srcType == GL_UNSIGNED_INT_8_8_8_8 ||
- srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
- srcType == GL_UNSIGNED_INT_10_10_10_2 ||
- srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
-
- /* general solution, no special cases, yet */
- {
- GLint dstComponents;
- GLint dstRedIndex, dstGreenIndex, dstBlueIndex, dstAlphaIndex;
- GLint dstLuminanceIndex, dstIntensityIndex;
- GLfloat rgba[MAX_WIDTH][4];
-
- dstComponents = _mesa_components_in_format( dstFormat );
- /* source & dest image formats should have been error checked by now */
- assert(dstComponents > 0);
-
- /*
- * Extract image data and convert to RGBA floats
- */
- assert(n <= MAX_WIDTH);
- if (srcFormat == GL_COLOR_INDEX) {
- GLuint indexes[MAX_WIDTH];
- extract_uint_indexes(n, indexes, srcFormat, srcType, source,
- srcPacking);
-
- if (dstFormat == GL_COLOR_INDEX) {
- GLuint i;
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
- /* convert to GLchan and return */
- for (i = 0; i < n; i++) {
- dest[i] = (GLchan) (indexes[i] & 0xff);
- }
- return;
- }
- else {
- /* Convert indexes to RGBA */
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- shift_and_offset_ci(ctx, n, indexes);
- }
- _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
- }
-
- /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
- * with color indexes.
- */
- transferOps &= ~(IMAGE_SCALE_BIAS_BIT | IMAGE_MAP_COLOR_BIT);
- }
- else {
- /* non-color index data */
- extract_float_rgba(n, rgba, srcFormat, srcType, source,
- srcPacking->SwapBytes);
- }
-
- if (transferOps) {
- _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
- }
-
- /* Now determine which color channels we need to produce.
- * And determine the dest index (offset) within each color tuple.
- */
- switch (dstFormat) {
- case GL_ALPHA:
- dstAlphaIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
- dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_LUMINANCE:
- dstLuminanceIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
- dstIntensityIndex = -1;
- break;
- case GL_LUMINANCE_ALPHA:
- dstLuminanceIndex = 0;
- dstAlphaIndex = 1;
- dstRedIndex = dstGreenIndex = dstBlueIndex = -1;
- dstIntensityIndex = -1;
- break;
- case GL_INTENSITY:
- dstIntensityIndex = 0;
- dstRedIndex = dstGreenIndex = dstBlueIndex = dstAlphaIndex = -1;
- dstLuminanceIndex = -1;
- break;
- case GL_RED:
- dstRedIndex = 0;
- dstGreenIndex = dstBlueIndex = -1;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RG:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = -1;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RGB:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = 2;
- dstAlphaIndex = dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- case GL_RGBA:
- dstRedIndex = 0;
- dstGreenIndex = 1;
- dstBlueIndex = 2;
- dstAlphaIndex = 3;
- dstLuminanceIndex = dstIntensityIndex = -1;
- break;
- default:
- _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_color_span_float()");
- return;
- }
-
- /* Now pack results in the requested dstFormat */
- if (dstRedIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[dstRedIndex] = rgba[i][RCOMP];
- dst += dstComponents;
- }
- }
-
- if (dstGreenIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[dstGreenIndex] = rgba[i][GCOMP];
- dst += dstComponents;
- }
- }
-
- if (dstBlueIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[dstBlueIndex] = rgba[i][BCOMP];
- dst += dstComponents;
- }
- }
-
- if (dstAlphaIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[dstAlphaIndex] = rgba[i][ACOMP];
- dst += dstComponents;
- }
- }
-
- if (dstIntensityIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- assert(dstIntensityIndex == 0);
- assert(dstComponents == 1);
- for (i = 0; i < n; i++) {
- /* Intensity comes from red channel */
- dst[i] = rgba[i][RCOMP];
- }
- }
-
- if (dstLuminanceIndex >= 0) {
- GLfloat *dst = dest;
- GLuint i;
- assert(dstLuminanceIndex == 0);
- for (i = 0; i < n; i++) {
- /* Luminance comes from red channel */
- dst[0] = rgba[i][RCOMP];
- dst += dstComponents;
- }
- }
- }
-}
-
-/**
- * Similar to _mesa_unpack_color_span_float(), but for dudv data instead of rgba,
- * directly return GLbyte data, no transfer ops apply.
- */
-void
-_mesa_unpack_dudv_span_byte( struct gl_context *ctx,
- GLuint n, GLenum dstFormat, GLbyte dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(dstFormat == GL_DUDV_ATI);
- ASSERT(srcFormat == GL_DUDV_ATI);
-
- ASSERT(srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT);
-
- /* general solution */
- {
- GLint dstComponents;
- GLfloat rgba[MAX_WIDTH][4];
- GLbyte *dst = dest;
- GLuint i;
-
- dstComponents = _mesa_components_in_format( dstFormat );
- /* source & dest image formats should have been error checked by now */
- assert(dstComponents > 0);
-
- /*
- * Extract image data and convert to RGBA floats
- */
- assert(n <= MAX_WIDTH);
- extract_float_rgba(n, rgba, srcFormat, srcType, source,
- srcPacking->SwapBytes);
-
-
- /* Now determine which color channels we need to produce.
- * And determine the dest index (offset) within each color tuple.
- */
-
- /* Now pack results in the requested dstFormat */
- for (i = 0; i < n; i++) {
- /* not sure - need clamp[-1,1] here? */
- dst[0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
- dst[1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
- dst += dstComponents;
- }
- }
-}
-
-/*
- * Unpack a row of color index data from a client buffer according to
- * the pixel unpacking parameters.
- * This is (or will be) used by glDrawPixels, glTexImage[123]D, etc.
- *
- * Args: ctx - the context
- * n - number of pixels
- * dstType - destination data type
- * dest - destination array
- * srcType - source pixel type
- * source - source data pointer
- * srcPacking - pixel unpacking parameters
- * transferOps - the pixel transfer operations to apply
- */
-void
-_mesa_unpack_index_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT);
-
- ASSERT(dstType == GL_UNSIGNED_BYTE ||
- dstType == GL_UNSIGNED_SHORT ||
- dstType == GL_UNSIGNED_INT);
-
-
- transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT);
-
- /*
- * Try simple cases first
- */
- if (transferOps == 0 && srcType == GL_UNSIGNED_BYTE
- && dstType == GL_UNSIGNED_BYTE) {
- memcpy(dest, source, n * sizeof(GLubyte));
- }
- else if (transferOps == 0 && srcType == GL_UNSIGNED_INT
- && dstType == GL_UNSIGNED_INT && !srcPacking->SwapBytes) {
- memcpy(dest, source, n * sizeof(GLuint));
- }
- else {
- /*
- * general solution
- */
- GLuint indexes[MAX_WIDTH];
- assert(n <= MAX_WIDTH);
-
- extract_uint_indexes(n, indexes, GL_COLOR_INDEX, srcType, source,
- srcPacking);
-
- if (transferOps)
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
-
- /* convert to dest type */
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLubyte) (indexes[i] & 0xff);
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLushort) (indexes[i] & 0xffff);
- }
- }
- break;
- case GL_UNSIGNED_INT:
- memcpy(dest, indexes, n * sizeof(GLuint));
- break;
- default:
- _mesa_problem(ctx, "bad dstType in _mesa_unpack_index_span");
- }
- }
-}
-
-
-void
-_mesa_pack_index_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, const GLuint *source,
- const struct gl_pixelstore_attrib *dstPacking,
- GLbitfield transferOps )
-{
- GLuint indexes[MAX_WIDTH];
-
- ASSERT(n <= MAX_WIDTH);
-
- transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT);
-
- if (transferOps & (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT)) {
- /* make a copy of input */
- memcpy(indexes, source, n * sizeof(GLuint));
- _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
- source = indexes;
- }
-
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- *dst++ = (GLubyte) source[i];
- }
- }
- break;
- case GL_BYTE:
- {
- GLbyte *dst = (GLbyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLbyte) source[i];
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLushort *dst = (GLushort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLushort) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_SHORT:
- {
- GLshort *dst = (GLshort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLshort) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLuint) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_INT:
- {
- GLint *dst = (GLint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLint) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_FLOAT:
- {
- GLfloat *dst = (GLfloat *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLfloat) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = _mesa_float_to_half((GLfloat) source[i]);
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- default:
- _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
- }
-}
-
-
-/*
- * Unpack a row of stencil data from a client buffer according to
- * the pixel unpacking parameters.
- * This is (or will be) used by glDrawPixels
- *
- * Args: ctx - the context
- * n - number of pixels
- * dstType - destination data type
- * dest - destination array
- * srcType - source pixel type
- * source - source data pointer
- * srcPacking - pixel unpacking parameters
- * transferOps - apply offset/bias/lookup ops?
- */
-void
-_mesa_unpack_stencil_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps )
-{
- ASSERT(srcType == GL_BITMAP ||
- srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_BYTE ||
- srcType == GL_UNSIGNED_SHORT ||
- srcType == GL_SHORT ||
- srcType == GL_UNSIGNED_INT ||
- srcType == GL_INT ||
- srcType == GL_UNSIGNED_INT_24_8_EXT ||
- srcType == GL_HALF_FLOAT_ARB ||
- srcType == GL_FLOAT);
-
- ASSERT(dstType == GL_UNSIGNED_BYTE ||
- dstType == GL_UNSIGNED_SHORT ||
- dstType == GL_UNSIGNED_INT);
-
- /* only shift and offset apply to stencil */
- transferOps &= IMAGE_SHIFT_OFFSET_BIT;
-
- /*
- * Try simple cases first
- */
- if (transferOps == 0 &&
- !ctx->Pixel.MapStencilFlag &&
- srcType == GL_UNSIGNED_BYTE &&
- dstType == GL_UNSIGNED_BYTE) {
- memcpy(dest, source, n * sizeof(GLubyte));
- }
- else if (transferOps == 0 &&
- !ctx->Pixel.MapStencilFlag &&
- srcType == GL_UNSIGNED_INT &&
- dstType == GL_UNSIGNED_INT &&
- !srcPacking->SwapBytes) {
- memcpy(dest, source, n * sizeof(GLuint));
- }
- else {
- /*
- * general solution
- */
- GLuint indexes[MAX_WIDTH];
- assert(n <= MAX_WIDTH);
-
- extract_uint_indexes(n, indexes, GL_STENCIL_INDEX, srcType, source,
- srcPacking);
-
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- /* shift and offset indexes */
- shift_and_offset_ci(ctx, n, indexes);
- }
-
- if (ctx->Pixel.MapStencilFlag) {
- /* Apply stencil lookup table */
- const GLuint mask = ctx->PixelMaps.StoS.Size - 1;
- GLuint i;
- for (i = 0; i < n; i++) {
- indexes[i] = (GLuint)ctx->PixelMaps.StoS.Map[ indexes[i] & mask ];
- }
- }
-
- /* convert to dest type */
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLubyte) (indexes[i] & 0xff);
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = (GLushort) (indexes[i] & 0xffff);
- }
- }
- break;
- case GL_UNSIGNED_INT:
- memcpy(dest, indexes, n * sizeof(GLuint));
- break;
- default:
- _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span");
- }
- }
-}
-
-
-void
-_mesa_pack_stencil_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, const GLstencil *source,
- const struct gl_pixelstore_attrib *dstPacking )
-{
- GLstencil stencil[MAX_WIDTH];
-
- ASSERT(n <= MAX_WIDTH);
-
- if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset ||
- ctx->Pixel.MapStencilFlag) {
- /* make a copy of input */
- memcpy(stencil, source, n * sizeof(GLstencil));
- _mesa_apply_stencil_transfer_ops(ctx, n, stencil);
- source = stencil;
- }
-
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- if (sizeof(GLstencil) == 1) {
- memcpy( dest, source, n );
- }
- else {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLubyte) source[i];
- }
- }
- break;
- case GL_BYTE:
- {
- GLbyte *dst = (GLbyte *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLbyte) (source[i] & 0x7f);
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLushort *dst = (GLushort *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLushort) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_SHORT:
- {
- GLshort *dst = (GLshort *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLshort) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLuint) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_INT:
- {
- GLint *dst = (GLint *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLint) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_FLOAT:
- {
- GLfloat *dst = (GLfloat *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = (GLfloat) source[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dest;
- GLuint i;
- for (i=0;i<n;i++) {
- dst[i] = _mesa_float_to_half( (float) source[i] );
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_BITMAP:
- if (dstPacking->LsbFirst) {
- GLubyte *dst = (GLubyte *) dest;
- GLint shift = 0;
- GLuint i;
- for (i = 0; i < n; i++) {
- if (shift == 0)
- *dst = 0;
- *dst |= ((source[i] != 0) << shift);
- shift++;
- if (shift == 8) {
- shift = 0;
- dst++;
- }
- }
- }
- else {
- GLubyte *dst = (GLubyte *) dest;
- GLint shift = 7;
- GLuint i;
- for (i = 0; i < n; i++) {
- if (shift == 7)
- *dst = 0;
- *dst |= ((source[i] != 0) << shift);
- shift--;
- if (shift < 0) {
- shift = 7;
- dst++;
- }
- }
- }
- break;
- default:
- _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
- }
-}
-
-#define DEPTH_VALUES(GLTYPE, GLTYPE2FLOAT) \
- do { \
- GLuint i; \
- const GLTYPE *src = (const GLTYPE *)source; \
- for (i = 0; i < n; i++) { \
- GLTYPE value = src[i]; \
- if (srcPacking->SwapBytes) { \
- if (sizeof(GLTYPE) == 2) { \
- SWAP2BYTE(value); \
- } else if (sizeof(GLTYPE) == 4) { \
- SWAP4BYTE(value); \
- } \
- } \
- depthValues[i] = GLTYPE2FLOAT(value); \
- } \
- } while (0)
-
-
-/**
- * Unpack a row of depth/z values from memory, returning GLushort, GLuint
- * or GLfloat values.
- * The glPixelTransfer (scale/bias) params will be applied.
- *
- * \param dstType one of GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, GL_FLOAT
- * \param depthMax max value for returned GLushort or GLuint values
- * (ignored for GLfloat).
- */
-void
-_mesa_unpack_depth_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, GLuint depthMax,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking )
-{
- GLfloat depthTemp[MAX_WIDTH], *depthValues;
- GLboolean needClamp = GL_FALSE;
-
- /* Look for special cases first.
- * Not only are these faster, they're less prone to numeric conversion
- * problems. Otherwise, converting from an int type to a float then
- * back to an int type can introduce errors that will show up as
- * artifacts in things like depth peeling which uses glCopyTexImage.
- */
- if (ctx->Pixel.DepthScale == 1.0 && ctx->Pixel.DepthBias == 0.0) {
- if (srcType == GL_UNSIGNED_INT && dstType == GL_UNSIGNED_SHORT) {
- const GLuint *src = (const GLuint *) source;
- GLushort *dst = (GLushort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = src[i] >> 16;
- }
- return;
- }
- if (srcType == GL_UNSIGNED_SHORT
- && dstType == GL_UNSIGNED_INT
- && depthMax == 0xffffffff) {
- const GLushort *src = (const GLushort *) source;
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = src[i] | (src[i] << 16);
- }
- return;
- }
- if (srcType == GL_UNSIGNED_INT_24_8
- && dstType == GL_UNSIGNED_INT
- && depthMax == 0xffffff) {
- const GLuint *src = (const GLuint *) source;
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = src[i] >> 8;
- }
- return;
- }
- /* XXX may want to add additional cases here someday */
- }
-
- /* general case path follows */
-
- if (dstType == GL_FLOAT) {
- depthValues = (GLfloat *) dest;
- }
- else {
- depthValues = depthTemp;
- }
-
- /* Convert incoming values to GLfloat. Some conversions will require
- * clamping, below.
- */
- switch (srcType) {
- case GL_BYTE:
- DEPTH_VALUES(GLbyte, BYTE_TO_FLOAT);
- needClamp = GL_TRUE;
- break;
- case GL_UNSIGNED_BYTE:
- DEPTH_VALUES(GLubyte, UBYTE_TO_FLOAT);
- break;
- case GL_SHORT:
- DEPTH_VALUES(GLshort, SHORT_TO_FLOAT);
- needClamp = GL_TRUE;
- break;
- case GL_UNSIGNED_SHORT:
- DEPTH_VALUES(GLushort, USHORT_TO_FLOAT);
- break;
- case GL_INT:
- DEPTH_VALUES(GLint, INT_TO_FLOAT);
- needClamp = GL_TRUE;
- break;
- case GL_UNSIGNED_INT:
- DEPTH_VALUES(GLuint, UINT_TO_FLOAT);
- break;
- case GL_UNSIGNED_INT_24_8_EXT: /* GL_EXT_packed_depth_stencil */
- if (dstType == GL_UNSIGNED_INT_24_8_EXT &&
- depthMax == 0xffffff &&
- ctx->Pixel.DepthScale == 1.0 &&
- ctx->Pixel.DepthBias == 0.0) {
- const GLuint *src = (const GLuint *) source;
- GLuint *zValues = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLuint value = src[i];
- if (srcPacking->SwapBytes) {
- SWAP4BYTE(value);
- }
- zValues[i] = value & 0xffffff00;
- }
- return;
- }
- else {
- const GLuint *src = (const GLuint *) source;
- const GLfloat scale = 1.0f / 0xffffff;
- GLuint i;
- for (i = 0; i < n; i++) {
- GLuint value = src[i];
- if (srcPacking->SwapBytes) {
- SWAP4BYTE(value);
- }
- depthValues[i] = (value >> 8) * scale;
- }
- }
- break;
- case GL_FLOAT:
- DEPTH_VALUES(GLfloat, 1*);
- needClamp = GL_TRUE;
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLuint i;
- const GLhalfARB *src = (const GLhalfARB *) source;
- for (i = 0; i < n; i++) {
- GLhalfARB value = src[i];
- if (srcPacking->SwapBytes) {
- SWAP2BYTE(value);
- }
- depthValues[i] = _mesa_half_to_float(value);
- }
- needClamp = GL_TRUE;
- }
- break;
- default:
- _mesa_problem(NULL, "bad type in _mesa_unpack_depth_span()");
- return;
- }
-
- /* apply depth scale and bias */
- {
- const GLfloat scale = ctx->Pixel.DepthScale;
- const GLfloat bias = ctx->Pixel.DepthBias;
- if (scale != 1.0 || bias != 0.0) {
- GLuint i;
- for (i = 0; i < n; i++) {
- depthValues[i] = depthValues[i] * scale + bias;
- }
- needClamp = GL_TRUE;
- }
- }
-
- /* clamp to [0, 1] */
- if (needClamp) {
- GLuint i;
- for (i = 0; i < n; i++) {
- depthValues[i] = (GLfloat)CLAMP(depthValues[i], 0.0, 1.0);
- }
- }
-
- /*
- * Convert values to dstType
- */
- if (dstType == GL_UNSIGNED_INT) {
- GLuint *zValues = (GLuint *) dest;
- GLuint i;
- if (depthMax <= 0xffffff) {
- /* no overflow worries */
- for (i = 0; i < n; i++) {
- zValues[i] = (GLuint) (depthValues[i] * (GLfloat) depthMax);
- }
- }
- else {
- /* need to use double precision to prevent overflow problems */
- for (i = 0; i < n; i++) {
- GLdouble z = depthValues[i] * (GLfloat) depthMax;
- if (z >= (GLdouble) 0xffffffff)
- zValues[i] = 0xffffffff;
- else
- zValues[i] = (GLuint) z;
- }
- }
- }
- else if (dstType == GL_UNSIGNED_SHORT) {
- GLushort *zValues = (GLushort *) dest;
- GLuint i;
- ASSERT(depthMax <= 0xffff);
- for (i = 0; i < n; i++) {
- zValues[i] = (GLushort) (depthValues[i] * (GLfloat) depthMax);
- }
- }
- else {
- ASSERT(dstType == GL_FLOAT);
- /*ASSERT(depthMax == 1.0F);*/
- }
-}
-
-
-/*
- * Pack an array of depth values. The values are floats in [0,1].
- */
-void
-_mesa_pack_depth_span( const struct gl_context *ctx, GLuint n, GLvoid *dest,
- GLenum dstType, const GLfloat *depthSpan,
- const struct gl_pixelstore_attrib *dstPacking )
-{
- GLfloat depthCopy[MAX_WIDTH];
-
- ASSERT(n <= MAX_WIDTH);
-
- if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) {
- memcpy(depthCopy, depthSpan, n * sizeof(GLfloat));
- _mesa_scale_and_bias_depth(ctx, n, depthCopy);
- depthSpan = depthCopy;
- }
-
- switch (dstType) {
- case GL_UNSIGNED_BYTE:
- {
- GLubyte *dst = (GLubyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_UBYTE( depthSpan[i] );
- }
- }
- break;
- case GL_BYTE:
- {
- GLbyte *dst = (GLbyte *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_BYTE( depthSpan[i] );
- }
- }
- break;
- case GL_UNSIGNED_SHORT:
- {
- GLushort *dst = (GLushort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- CLAMPED_FLOAT_TO_USHORT(dst[i], depthSpan[i]);
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_SHORT:
- {
- GLshort *dst = (GLshort *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_SHORT( depthSpan[i] );
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- case GL_UNSIGNED_INT:
- {
- GLuint *dst = (GLuint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_UINT( depthSpan[i] );
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_INT:
- {
- GLint *dst = (GLint *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = FLOAT_TO_INT( depthSpan[i] );
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_FLOAT:
- {
- GLfloat *dst = (GLfloat *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = depthSpan[i];
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap4( (GLuint *) dst, n );
- }
- }
- break;
- case GL_HALF_FLOAT_ARB:
- {
- GLhalfARB *dst = (GLhalfARB *) dest;
- GLuint i;
- for (i = 0; i < n; i++) {
- dst[i] = _mesa_float_to_half(depthSpan[i]);
- }
- if (dstPacking->SwapBytes) {
- _mesa_swap2( (GLushort *) dst, n );
- }
- }
- break;
- default:
- _mesa_problem(ctx, "bad type in _mesa_pack_depth_span");
- }
-}
-
-
-
-/**
- * Pack depth and stencil values as GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8.
- */
-void
-_mesa_pack_depth_stencil_span(const struct gl_context *ctx, GLuint n, GLuint *dest,
- const GLfloat *depthVals,
- const GLstencil *stencilVals,
- const struct gl_pixelstore_attrib *dstPacking)
-{
- GLfloat depthCopy[MAX_WIDTH];
- GLstencil stencilCopy[MAX_WIDTH];
- GLuint i;
-
- ASSERT(n <= MAX_WIDTH);
-
- if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) {
- memcpy(depthCopy, depthVals, n * sizeof(GLfloat));
- _mesa_scale_and_bias_depth(ctx, n, depthCopy);
- depthVals = depthCopy;
- }
-
- if (ctx->Pixel.IndexShift ||
- ctx->Pixel.IndexOffset ||
- ctx->Pixel.MapStencilFlag) {
- memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil));
- _mesa_apply_stencil_transfer_ops(ctx, n, stencilCopy);
- stencilVals = stencilCopy;
- }
-
- for (i = 0; i < n; i++) {
- GLuint z = (GLuint) (depthVals[i] * 0xffffff);
- dest[i] = (z << 8) | (stencilVals[i] & 0xff);
- }
-
- if (dstPacking->SwapBytes) {
- _mesa_swap4(dest, n);
- }
-}
-
-
-
-
-/**
- * Unpack image data. Apply byte swapping, byte flipping (bitmap).
- * Return all image data in a contiguous block. This is used when we
- * compile glDrawPixels, glTexImage, etc into a display list. We
- * need a copy of the data in a standard format.
- */
-void *
-_mesa_unpack_image( GLuint dimensions,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *unpack )
-{
- GLint bytesPerRow, compsPerRow;
- GLboolean flipBytes, swap2, swap4;
-
- if (!pixels)
- return NULL; /* not necessarily an error */
-
- if (width <= 0 || height <= 0 || depth <= 0)
- return NULL; /* generate error later */
-
- if (type == GL_BITMAP) {
- bytesPerRow = (width + 7) >> 3;
- flipBytes = unpack->LsbFirst;
- swap2 = swap4 = GL_FALSE;
- compsPerRow = 0;
- }
- else {
- const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type);
- GLint components = _mesa_components_in_format(format);
- GLint bytesPerComp;
-
- if (_mesa_type_is_packed(type))
- components = 1;
-
- if (bytesPerPixel <= 0 || components <= 0)
- return NULL; /* bad format or type. generate error later */
- bytesPerRow = bytesPerPixel * width;
- bytesPerComp = bytesPerPixel / components;
- flipBytes = GL_FALSE;
- swap2 = (bytesPerComp == 2) && unpack->SwapBytes;
- swap4 = (bytesPerComp == 4) && unpack->SwapBytes;
- compsPerRow = components * width;
- assert(compsPerRow >= width);
- }
-
- {
- GLubyte *destBuffer
- = (GLubyte *) malloc(bytesPerRow * height * depth);
- GLubyte *dst;
- GLint img, row;
- if (!destBuffer)
- return NULL; /* generate GL_OUT_OF_MEMORY later */
-
- dst = destBuffer;
- for (img = 0; img < depth; img++) {
- for (row = 0; row < height; row++) {
- const GLvoid *src = _mesa_image_address(dimensions, unpack, pixels,
- width, height, format, type, img, row, 0);
-
- if ((type == GL_BITMAP) && (unpack->SkipPixels & 0x7)) {
- GLint i;
- flipBytes = GL_FALSE;
- if (unpack->LsbFirst) {
- GLubyte srcMask = 1 << (unpack->SkipPixels & 0x7);
- GLubyte dstMask = 128;
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 128) {
- srcMask = 1;
- s++;
- }
- else {
- srcMask = srcMask << 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- else {
- GLubyte srcMask = 128 >> (unpack->SkipPixels & 0x7);
- GLubyte dstMask = 128;
- const GLubyte *s = src;
- GLubyte *d = dst;
- *d = 0;
- for (i = 0; i < width; i++) {
- if (*s & srcMask) {
- *d |= dstMask;
- }
- if (srcMask == 1) {
- srcMask = 128;
- s++;
- }
- else {
- srcMask = srcMask >> 1;
- }
- if (dstMask == 1) {
- dstMask = 128;
- d++;
- *d = 0;
- }
- else {
- dstMask = dstMask >> 1;
- }
- }
- }
- }
- else {
- memcpy(dst, src, bytesPerRow);
- }
-
- /* byte flipping/swapping */
- if (flipBytes) {
- flip_bytes((GLubyte *) dst, bytesPerRow);
- }
- else if (swap2) {
- _mesa_swap2((GLushort*) dst, compsPerRow);
- }
- else if (swap4) {
- _mesa_swap4((GLuint*) dst, compsPerRow);
- }
- dst += bytesPerRow;
- }
- }
- return destBuffer;
- }
-}
-
-#endif /* _HAVE_FULL_GL */
-
/**
diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h
index ed5ffa368c..005fbccbeb 100644
--- a/src/mesa/main/image.h
+++ b/src/mesa/main/image.h
@@ -27,8 +27,10 @@
#define IMAGE_H
-#include "mtypes.h"
+#include "glheader.h"
+struct gl_context;
+struct gl_pixelstore_attrib;
extern void
_mesa_swap2( GLushort *p, GLuint n );
@@ -52,7 +54,8 @@ extern GLint
_mesa_bytes_per_pixel( GLenum format, GLenum type );
extern GLboolean
-_mesa_is_legal_format_and_type( struct gl_context *ctx, GLenum format, GLenum type );
+_mesa_is_legal_format_and_type(const struct gl_context *ctx,
+ GLenum format, GLenum type);
extern GLboolean
_mesa_is_color_format(GLenum format);
@@ -124,23 +127,6 @@ _mesa_image_image_stride( const struct gl_pixelstore_attrib *packing,
GLint width, GLint height,
GLenum format, GLenum type );
-extern void
-_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32],
- const struct gl_pixelstore_attrib *unpacking );
-
-
-extern void
-_mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest,
- const struct gl_pixelstore_attrib *packing );
-
-
-extern GLvoid *
-_mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
- const struct gl_pixelstore_attrib *packing );
-
-extern void
-_mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
- GLubyte *dest, const struct gl_pixelstore_attrib *packing );
extern void
_mesa_expand_bitmap(GLsizei width, GLsizei height,
@@ -150,147 +136,6 @@ _mesa_expand_bitmap(GLsizei width, GLsizei height,
GLubyte onValue);
-/** \name Pixel processing functions */
-/*@{*/
-
-extern void
-_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4],
- GLfloat rScale, GLfloat gScale,
- GLfloat bScale, GLfloat aScale,
- GLfloat rBias, GLfloat gBias,
- GLfloat bBias, GLfloat aBias);
-
-extern void
-_mesa_map_rgba(const struct gl_context *ctx, GLuint n, GLfloat rgba[][4]);
-
-extern void
-_mesa_lookup_rgba_float(const struct gl_color_table *table,
- GLuint n, GLfloat rgba[][4]);
-
-extern void
-_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
- GLuint n, GLubyte rgba[][4]);
-
-
-extern void
-_mesa_map_ci_to_rgba(const struct gl_context *ctx,
- GLuint n, const GLuint index[], GLfloat rgba[][4]);
-
-
-extern void
-_mesa_map_ci8_to_rgba8(const struct gl_context *ctx, GLuint n, const GLubyte index[],
- GLubyte rgba[][4]);
-
-
-extern void
-_mesa_scale_and_bias_depth(const struct gl_context *ctx, GLuint n,
- GLfloat depthValues[]);
-
-extern void
-_mesa_scale_and_bias_depth_uint(const struct gl_context *ctx, GLuint n,
- GLuint depthValues[]);
-
-extern void
-_mesa_apply_rgba_transfer_ops(struct gl_context *ctx, GLbitfield transferOps,
- GLuint n, GLfloat rgba[][4]);
-
-
-extern void
-_mesa_apply_ci_transfer_ops(const struct gl_context *ctx, GLbitfield transferOps,
- GLuint n, GLuint indexes[]);
-
-
-extern void
-_mesa_apply_stencil_transfer_ops(const struct gl_context *ctx, GLuint n,
- GLstencil stencil[]);
-
-
-extern void
-_mesa_pack_rgba_span_float( struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
- GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
- const struct gl_pixelstore_attrib *dstPacking,
- GLbitfield transferOps );
-
-
-extern void
-_mesa_unpack_color_span_chan( struct gl_context *ctx,
- GLuint n, GLenum dstFormat, GLchan dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-
-extern void
-_mesa_unpack_color_span_float( struct gl_context *ctx,
- GLuint n, GLenum dstFormat, GLfloat dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-extern void
-_mesa_unpack_dudv_span_byte( struct gl_context *ctx,
- GLuint n, GLenum dstFormat, GLbyte dest[],
- GLenum srcFormat, GLenum srcType,
- const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-extern void
-_mesa_unpack_index_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-
-extern void
-_mesa_pack_index_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, const GLuint *source,
- const struct gl_pixelstore_attrib *dstPacking,
- GLbitfield transferOps );
-
-
-extern void
-_mesa_unpack_stencil_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking,
- GLbitfield transferOps );
-
-extern void
-_mesa_pack_stencil_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, const GLstencil *source,
- const struct gl_pixelstore_attrib *dstPacking );
-
-
-extern void
-_mesa_unpack_depth_span( const struct gl_context *ctx, GLuint n,
- GLenum dstType, GLvoid *dest, GLuint depthMax,
- GLenum srcType, const GLvoid *source,
- const struct gl_pixelstore_attrib *srcPacking );
-
-extern void
-_mesa_pack_depth_span( const struct gl_context *ctx, GLuint n, GLvoid *dest,
- GLenum dstType, const GLfloat *depthSpan,
- const struct gl_pixelstore_attrib *dstPacking );
-
-
-extern void
-_mesa_pack_depth_stencil_span(const struct gl_context *ctx, GLuint n, GLuint *dest,
- const GLfloat *depthVals,
- const GLstencil *stencilVals,
- const struct gl_pixelstore_attrib *dstPacking);
-
-
-extern void *
-_mesa_unpack_image( GLuint dimensions,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *unpack );
-
-
extern void
_mesa_convert_colors(GLenum srcType, const GLvoid *src,
GLenum dstType, GLvoid *dst,
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 30fc152389..5ea647ad8d 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -141,12 +141,18 @@ typedef union { GLfloat f; GLint i; } fi_type;
#define sqrtf(f) ((float) sqrt(f))
#define tanf(f) ((float) tan(f))
#define tanhf(f) ((float) tanh(f))
+#define acoshf(f) ((float) acosh(f))
+#define asinhf(f) ((float) asinh(f))
+#define atanhf(f) ((float) atanh(f))
#endif
#if defined(_MSC_VER)
static INLINE float truncf(float x) { return x < 0.0f ? ceilf(x) : floorf(x); }
static INLINE float exp2f(float x) { return powf(2.0f, x); }
static INLINE float log2f(float x) { return logf(x) * 1.442695041f; }
+static INLINE float asinhf(float x) { return logf(x + sqrtf(x * x + 1.0f)); }
+static INLINE float acoshf(float x) { return logf(x + sqrtf(x * x - 1.0f)); }
+static INLINE float atanhf(float x) { return (logf(1.0f + x) - logf(1.0f - x)) / 2.0f; }
static INLINE int isblank(int ch) { return ch == ' ' || ch == '\t'; }
#define strtoll(p, e, b) _strtoi64(p, e, b)
#endif
diff --git a/src/mesa/main/light.h b/src/mesa/main/light.h
index 021f5ea193..f42fbe6f50 100644
--- a/src/mesa/main/light.h
+++ b/src/mesa/main/light.h
@@ -28,7 +28,12 @@
#define LIGHT_H
-#include "mtypes.h"
+#include "glheader.h"
+#include "mfeatures.h"
+
+struct gl_context;
+struct gl_light;
+struct gl_material;
extern void GLAPIENTRY
_mesa_ShadeModel( GLenum mode );
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c
index 505f840ba5..81e179a925 100644
--- a/src/mesa/main/lines.c
+++ b/src/mesa/main/lines.c
@@ -54,11 +54,6 @@ _mesa_LineWidth( GLfloat width )
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.Width = width;
- if (width != 1.0F)
- ctx->_TriangleCaps |= DD_LINE_WIDTH;
- else
- ctx->_TriangleCaps &= ~DD_LINE_WIDTH;
-
if (ctx->Driver.LineWidth)
ctx->Driver.LineWidth(ctx, width);
}
diff --git a/src/mesa/main/lines.h b/src/mesa/main/lines.h
index 3accdd7800..8e8b3f8d6e 100644
--- a/src/mesa/main/lines.h
+++ b/src/mesa/main/lines.h
@@ -33,8 +33,9 @@
#define LINES_H
-#include "mtypes.h"
+#include "glheader.h"
+struct gl_context;
extern void GLAPIENTRY
_mesa_LineWidth( GLfloat width );
diff --git a/src/mesa/main/matrix.h b/src/mesa/main/matrix.h
index 38fd235b11..2878cc134b 100644
--- a/src/mesa/main/matrix.h
+++ b/src/mesa/main/matrix.h
@@ -28,8 +28,9 @@
#define MATRIX_H
-#include "mtypes.h"
+#include "glheader.h"
+struct gl_context;
extern void GLAPIENTRY
_mesa_Frustum( GLdouble left, GLdouble right,
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index 5afd65d976..1b39f5fdd3 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -78,7 +78,7 @@
#define FEATURE_GL !FEATURE_ES
#endif
-#ifdef IN_DRI_DRIVER
+#if defined(IN_DRI_DRIVER) || (FEATURE_GL + FEATURE_ES1 + FEATURE_ES2 > 1)
#define FEATURE_remap_table 1
#else
#define FEATURE_remap_table 0
@@ -107,9 +107,7 @@
#define FEATURE_texture_s3tc FEATURE_GL
#define FEATURE_extra_context_init FEATURE_ES
-#define FEATURE_fixedpt FEATURE_ES
#define FEATURE_point_size_array FEATURE_ES
-#define FEATURE_vertex_array_byte FEATURE_ES
#define FEATURE_es2_glsl FEATURE_ES2
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 11d5a0519e..ad63b178df 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -288,6 +288,54 @@ do_row(GLenum datatype, GLuint comps, GLint srcWidth,
dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
}
}
+
+ else if (datatype == GL_SHORT && comps == 4) {
+ GLuint i, j, k;
+ const GLshort(*rowA)[4] = (const GLshort(*)[4]) srcRowA;
+ const GLshort(*rowB)[4] = (const GLshort(*)[4]) srcRowB;
+ GLshort(*dst)[4] = (GLshort(*)[4]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
+ dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4;
+ }
+ }
+ else if (datatype == GL_SHORT && comps == 3) {
+ GLuint i, j, k;
+ const GLshort(*rowA)[3] = (const GLshort(*)[3]) srcRowA;
+ const GLshort(*rowB)[3] = (const GLshort(*)[3]) srcRowB;
+ GLshort(*dst)[3] = (GLshort(*)[3]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
+ dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
+ }
+ }
+ else if (datatype == GL_SHORT && comps == 2) {
+ GLuint i, j, k;
+ const GLshort(*rowA)[2] = (const GLshort(*)[2]) srcRowA;
+ const GLshort(*rowB)[2] = (const GLshort(*)[2]) srcRowB;
+ GLshort(*dst)[2] = (GLshort(*)[2]) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
+ dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
+ }
+ }
+ else if (datatype == GL_SHORT && comps == 1) {
+ GLuint i, j, k;
+ const GLshort *rowA = (const GLshort *) srcRowA;
+ const GLshort *rowB = (const GLshort *) srcRowB;
+ GLshort *dst = (GLshort *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
+ }
+ }
+
else if (datatype == GL_FLOAT && comps == 4) {
GLuint i, j, k;
const GLfloat(*rowA)[4] = (const GLfloat(*)[4]) srcRowA;
@@ -507,6 +555,37 @@ do_row(GLenum datatype, GLuint comps, GLint srcWidth,
dst[i] = (alpha << 15) | (blue << 10) | (green << 5) | red;
}
}
+ else if (datatype == GL_UNSIGNED_SHORT_5_5_5_1 && comps == 4) {
+ GLuint i, j, k;
+ const GLushort *rowA = (const GLushort *) srcRowA;
+ const GLushort *rowB = (const GLushort *) srcRowB;
+ GLushort *dst = (GLushort *) dstRow;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const GLint rowAr0 = (rowA[j] >> 11) & 0x1f;
+ const GLint rowAr1 = (rowA[k] >> 11) & 0x1f;
+ const GLint rowBr0 = (rowB[j] >> 11) & 0x1f;
+ const GLint rowBr1 = (rowB[k] >> 11) & 0x1f;
+ const GLint rowAg0 = (rowA[j] >> 6) & 0x1f;
+ const GLint rowAg1 = (rowA[k] >> 6) & 0x1f;
+ const GLint rowBg0 = (rowB[j] >> 6) & 0x1f;
+ const GLint rowBg1 = (rowB[k] >> 6) & 0x1f;
+ const GLint rowAb0 = (rowA[j] >> 1) & 0x1f;
+ const GLint rowAb1 = (rowA[k] >> 1) & 0x1f;
+ const GLint rowBb0 = (rowB[j] >> 1) & 0x1f;
+ const GLint rowBb1 = (rowB[k] >> 1) & 0x1f;
+ const GLint rowAa0 = (rowA[j] & 0x1);
+ const GLint rowAa1 = (rowA[k] & 0x1);
+ const GLint rowBa0 = (rowB[j] & 0x1);
+ const GLint rowBa1 = (rowB[k] & 0x1);
+ const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
+ const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
+ const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
+ const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
+ dst[i] = (red << 11) | (green << 6) | (blue << 1) | alpha;
+ }
+ }
+
else if (datatype == GL_UNSIGNED_BYTE_3_3_2 && comps == 3) {
GLuint i, j, k;
const GLubyte *rowA = (const GLubyte *) srcRowA;
@@ -682,6 +761,44 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth,
FILTER_3D(0);
}
}
+ else if ((datatype == GL_SHORT) && (comps == 4)) {
+ DECLARE_ROW_POINTERS(GLshort, 4);
+
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ FILTER_3D(1);
+ FILTER_3D(2);
+ FILTER_3D(3);
+ }
+ }
+ else if ((datatype == GL_SHORT) && (comps == 3)) {
+ DECLARE_ROW_POINTERS(GLshort, 3);
+
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ FILTER_3D(1);
+ FILTER_3D(2);
+ }
+ }
+ else if ((datatype == GL_SHORT) && (comps == 2)) {
+ DECLARE_ROW_POINTERS(GLshort, 2);
+
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ FILTER_3D(1);
+ }
+ }
+ else if ((datatype == GL_SHORT) && (comps == 1)) {
+ DECLARE_ROW_POINTERS(GLshort, 1);
+
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ FILTER_3D(0);
+ }
+ }
else if ((datatype == GL_FLOAT) && (comps == 4)) {
DECLARE_ROW_POINTERS(GLfloat, 4);
@@ -910,6 +1027,55 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth,
dst[i] = (a << 15) | (b << 10) | (g << 5) | r;
}
}
+ else if ((datatype == GL_UNSIGNED_SHORT_5_5_5_1) && (comps == 4)) {
+ DECLARE_ROW_POINTERS0(GLushort);
+
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
+ i++, j += colStride, k += colStride) {
+ const GLint rowAr0 = (rowA[j] >> 11) & 0x1f;
+ const GLint rowAr1 = (rowA[k] >> 11) & 0x1f;
+ const GLint rowBr0 = (rowB[j] >> 11) & 0x1f;
+ const GLint rowBr1 = (rowB[k] >> 11) & 0x1f;
+ const GLint rowCr0 = (rowC[j] >> 11) & 0x1f;
+ const GLint rowCr1 = (rowC[k] >> 11) & 0x1f;
+ const GLint rowDr0 = (rowD[j] >> 11) & 0x1f;
+ const GLint rowDr1 = (rowD[k] >> 11) & 0x1f;
+ const GLint rowAg0 = (rowA[j] >> 6) & 0x1f;
+ const GLint rowAg1 = (rowA[k] >> 6) & 0x1f;
+ const GLint rowBg0 = (rowB[j] >> 6) & 0x1f;
+ const GLint rowBg1 = (rowB[k] >> 6) & 0x1f;
+ const GLint rowCg0 = (rowC[j] >> 6) & 0x1f;
+ const GLint rowCg1 = (rowC[k] >> 6) & 0x1f;
+ const GLint rowDg0 = (rowD[j] >> 6) & 0x1f;
+ const GLint rowDg1 = (rowD[k] >> 6) & 0x1f;
+ const GLint rowAb0 = (rowA[j] >> 1) & 0x1f;
+ const GLint rowAb1 = (rowA[k] >> 1) & 0x1f;
+ const GLint rowBb0 = (rowB[j] >> 1) & 0x1f;
+ const GLint rowBb1 = (rowB[k] >> 1) & 0x1f;
+ const GLint rowCb0 = (rowC[j] >> 1) & 0x1f;
+ const GLint rowCb1 = (rowC[k] >> 1) & 0x1f;
+ const GLint rowDb0 = (rowD[j] >> 1) & 0x1f;
+ const GLint rowDb1 = (rowD[k] >> 1) & 0x1f;
+ const GLint rowAa0 = (rowA[j] & 0x1);
+ const GLint rowAa1 = (rowA[k] & 0x1);
+ const GLint rowBa0 = (rowB[j] & 0x1);
+ const GLint rowBa1 = (rowB[k] & 0x1);
+ const GLint rowCa0 = (rowC[j] & 0x1);
+ const GLint rowCa1 = (rowC[k] & 0x1);
+ const GLint rowDa0 = (rowD[j] & 0x1);
+ const GLint rowDa1 = (rowD[k] & 0x1);
+ const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
+ rowCr0, rowCr1, rowDr0, rowDr1);
+ const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
+ rowCg0, rowCg1, rowDg0, rowDg1);
+ const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
+ rowCb0, rowCb1, rowDb0, rowDb1);
+ const GLint a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1,
+ rowCa0, rowCa1, rowDa0, rowDa1);
+
+ dst[i] = (r << 11) | (g << 6) | (b << 1) | a;
+ }
+ }
else if ((datatype == GL_UNSIGNED_BYTE_3_3_2) && (comps == 3)) {
DECLARE_ROW_POINTERS0(GLushort);
@@ -1624,9 +1790,9 @@ _mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
/* initialize new image */
_mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight,
- dstDepth, border, srcImage->InternalFormat);
+ dstDepth, border, srcImage->InternalFormat,
+ srcImage->TexFormat);
dstImage->DriverData = NULL;
- dstImage->TexFormat = srcImage->TexFormat;
dstImage->FetchTexelc = srcImage->FetchTexelc;
dstImage->FetchTexelf = srcImage->FetchTexelf;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 13aa66fc1e..87b96489db 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -454,6 +454,68 @@ typedef enum
/**
+ * Framebuffer configuration (aka visual / pixelformat)
+ * Note: some of these fields should be boolean, but it appears that
+ * code in drivers/dri/common/util.c requires int-sized fields.
+ */
+struct gl_config
+{
+ GLboolean rgbMode;
+ GLboolean floatMode;
+ GLboolean colorIndexMode; /* XXX is this used anywhere? */
+ GLuint doubleBufferMode;
+ GLuint stereoMode;
+
+ GLboolean haveAccumBuffer;
+ GLboolean haveDepthBuffer;
+ GLboolean haveStencilBuffer;
+
+ GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
+ GLuint redMask, greenMask, blueMask, alphaMask;
+ GLint rgbBits; /* total bits for rgb */
+ GLint indexBits; /* total bits for colorindex */
+
+ GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
+ GLint depthBits;
+ GLint stencilBits;
+
+ GLint numAuxBuffers;
+
+ GLint level;
+
+ /* EXT_visual_rating / GLX 1.2 */
+ GLint visualRating;
+
+ /* EXT_visual_info / GLX 1.2 */
+ GLint transparentPixel;
+ /* colors are floats scaled to ints */
+ GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
+ GLint transparentIndex;
+
+ /* ARB_multisample / SGIS_multisample */
+ GLint sampleBuffers;
+ GLint samples;
+
+ /* SGIX_pbuffer / GLX 1.3 */
+ GLint maxPbufferWidth;
+ GLint maxPbufferHeight;
+ GLint maxPbufferPixels;
+ GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
+ GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
+
+ /* OML_swap_method */
+ GLint swapMethod;
+
+ /* EXT_texture_from_pixmap */
+ GLint bindToTextureRgb;
+ GLint bindToTextureRgba;
+ GLint bindToMipmapTexture;
+ GLint bindToTextureTargets;
+ GLint yInverted;
+};
+
+
+/**
* Data structure for color tables
*/
struct gl_color_table
@@ -547,60 +609,6 @@ struct gl_shine_tab
GLuint refcount;
};
-struct gl_config {
- GLboolean rgbMode;
- GLboolean floatMode;
- GLboolean colorIndexMode;
- GLuint doubleBufferMode;
- GLuint stereoMode;
-
- GLboolean haveAccumBuffer;
- GLboolean haveDepthBuffer;
- GLboolean haveStencilBuffer;
-
- GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
- GLuint redMask, greenMask, blueMask, alphaMask;
- GLint rgbBits; /* total bits for rgb */
- GLint indexBits; /* total bits for colorindex */
-
- GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
- GLint depthBits;
- GLint stencilBits;
-
- GLint numAuxBuffers;
-
- GLint level;
-
- /* EXT_visual_rating / GLX 1.2 */
- GLint visualRating;
-
- /* EXT_visual_info / GLX 1.2 */
- GLint transparentPixel;
- /* colors are floats scaled to ints */
- GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
- GLint transparentIndex;
-
- /* ARB_multisample / SGIS_multisample */
- GLint sampleBuffers;
- GLint samples;
-
- /* SGIX_pbuffer / GLX 1.3 */
- GLint maxPbufferWidth;
- GLint maxPbufferHeight;
- GLint maxPbufferPixels;
- GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
- GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
-
- /* OML_swap_method */
- GLint swapMethod;
-
- /* EXT_texture_from_pixmap */
- GLint bindToTextureRgb;
- GLint bindToTextureRgba;
- GLint bindToMipmapTexture;
- GLint bindToTextureTargets;
- GLint yInverted;
-};
/**
* Light source state.
@@ -1530,6 +1538,7 @@ struct gl_client_array
const GLubyte *Ptr; /**< Points to array data */
GLboolean Enabled; /**< Enabled flag is a boolean */
GLboolean Normalized; /**< GL_ARB_vertex_program */
+ GLboolean Integer; /**< Integer-valued? */
GLuint _ElementSize; /**< size of each element in bytes */
struct gl_buffer_object *BufferObj;/**< GL_ARB_vertex_buffer_object */
@@ -2141,7 +2150,24 @@ struct gl_shader_program
*/
struct gl_shader_state
{
- struct gl_shader_program *CurrentProgram; /**< The user-bound program */
+ /**
+ * Programs used for rendering
+ *
+ * There is a separate program set for each shader stage. If
+ * GL_EXT_separate_shader_objects is not supported, each of these must point
+ * to \c NULL or to the same program.
+ */
+ struct gl_shader_program *CurrentVertexProgram;
+ struct gl_shader_program *CurrentGeometryProgram;
+ struct gl_shader_program *CurrentFragmentProgram;
+
+ /**
+ * Program used by glUniform calls.
+ *
+ * Explicitly set by \c glUseProgram and \c glActiveProgramEXT.
+ */
+ struct gl_shader_program *ActiveProgram;
+
void *MemPool;
GLbitfield Flags; /**< Mask of GLSL_x flags */
@@ -2462,6 +2488,9 @@ struct gl_framebuffer
/** One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */
GLenum _Status;
+ /** Integer color values */
+ GLboolean _IntegerColor;
+
/** Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */
struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT];
@@ -2604,6 +2633,9 @@ struct gl_constants
GLuint MaxTransformFeedbackSeparateAttribs;
GLuint MaxTransformFeedbackSeparateComponents;
GLuint MaxTransformFeedbackInterleavedComponents;
+
+ /** GL_EXT_gpu_shader4 */
+ GLint MinProgramTexelOffset, MaxProgramTexelOffset;
};
@@ -2690,6 +2722,7 @@ struct gl_extensions
GLboolean EXT_framebuffer_object;
GLboolean EXT_framebuffer_sRGB;
GLboolean EXT_gpu_program_parameters;
+ GLboolean EXT_gpu_shader4;
GLboolean EXT_multi_draw_arrays;
GLboolean EXT_paletted_texture;
GLboolean EXT_packed_depth_stencil;
@@ -2702,6 +2735,7 @@ struct gl_extensions
GLboolean EXT_rescale_normal;
GLboolean EXT_shadow_funcs;
GLboolean EXT_secondary_color;
+ GLboolean EXT_separate_shader_objects;
GLboolean EXT_separate_specular_color;
GLboolean EXT_shared_texture_palette;
GLboolean EXT_stencil_wrap;
@@ -2891,11 +2925,9 @@ struct gl_matrix_stack
#define DD_TRI_OFFSET 0x80
#define DD_LINE_SMOOTH 0x100
#define DD_LINE_STIPPLE 0x200
-#define DD_LINE_WIDTH 0x400
-#define DD_POINT_SMOOTH 0x800
-#define DD_POINT_SIZE 0x1000
-#define DD_POINT_ATTEN 0x2000
-#define DD_TRI_TWOSTENCIL 0x4000
+#define DD_POINT_SMOOTH 0x400
+#define DD_POINT_ATTEN 0x800
+#define DD_TRI_TWOSTENCIL 0x1000
/*@}*/
diff --git a/src/mesa/main/multisample.h b/src/mesa/main/multisample.h
index c7cc432daa..e86d4092bc 100644
--- a/src/mesa/main/multisample.h
+++ b/src/mesa/main/multisample.h
@@ -26,7 +26,9 @@
#ifndef MULTISAMPLE_H
#define MULTISAMPLE_H
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_context;
extern void GLAPIENTRY
_mesa_SampleCoverageARB(GLclampf value, GLboolean invert);
diff --git a/src/mesa/main/nvprogram.c b/src/mesa/main/nvprogram.c
index 833bf916ec..36cea3bb9a 100644
--- a/src/mesa/main/nvprogram.c
+++ b/src/mesa/main/nvprogram.c
@@ -685,13 +685,13 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
*/
void GLAPIENTRY
_mesa_ProgramParameters4dvNV(GLenum target, GLuint index,
- GLuint num, const GLdouble *params)
+ GLsizei num, const GLdouble *params)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (target == GL_VERTEX_PROGRAM_NV && ctx->Extensions.NV_vertex_program) {
- GLuint i;
+ GLint i;
if (index + num > MAX_NV_VERTEX_PROGRAM_PARAMS) {
_mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameters4dvNV");
return;
@@ -717,13 +717,13 @@ _mesa_ProgramParameters4dvNV(GLenum target, GLuint index,
*/
void GLAPIENTRY
_mesa_ProgramParameters4fvNV(GLenum target, GLuint index,
- GLuint num, const GLfloat *params)
+ GLsizei num, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (target == GL_VERTEX_PROGRAM_NV && ctx->Extensions.NV_vertex_program) {
- GLuint i;
+ GLint i;
if (index + num > MAX_NV_VERTEX_PROGRAM_PARAMS) {
_mesa_error(ctx, GL_INVALID_VALUE, "glProgramParameters4fvNV");
return;
diff --git a/src/mesa/main/nvprogram.h b/src/mesa/main/nvprogram.h
index 035f2fe242..3a55783773 100644
--- a/src/mesa/main/nvprogram.h
+++ b/src/mesa/main/nvprogram.h
@@ -30,7 +30,9 @@
#define NVPROGRAM_H
#include "glheader.h"
-#include "mtypes.h"
+
+struct gl_context;
+struct gl_program;
extern void GLAPIENTRY
_mesa_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params);
@@ -72,10 +74,12 @@ extern void GLAPIENTRY
_mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte *program);
extern void GLAPIENTRY
-_mesa_ProgramParameters4dvNV(GLenum target, GLuint index, GLuint num, const GLdouble *params);
+_mesa_ProgramParameters4dvNV(GLenum target, GLuint index, GLsizei num,
+ const GLdouble *params);
extern void GLAPIENTRY
-_mesa_ProgramParameters4fvNV(GLenum target, GLuint index, GLuint num, const GLfloat *params);
+_mesa_ProgramParameters4fvNV(GLenum target, GLuint index, GLsizei num,
+ const GLfloat *params);
extern void GLAPIENTRY
_mesa_TrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform);
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
new file mode 100644
index 0000000000..fdb647c7ea
--- /dev/null
+++ b/src/mesa/main/pack.c
@@ -0,0 +1,4960 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THEA AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * \file pack.c
+ * Image and pixel span packing and unpacking.
+ */
+
+
+#include "glheader.h"
+#include "colormac.h"
+#include "enums.h"
+#include "image.h"
+#include "imports.h"
+#include "pack.h"
+#include "pixeltransfer.h"
+#include "imports.h"
+
+
+/**
+ * NOTE:
+ * Normally, BYTE_TO_FLOAT(0) returns 0.00392 That causes problems when
+ * we later convert the float to a packed integer value (such as for
+ * GL_RGB5_A1) because we'll wind up with a non-zero value.
+ *
+ * We redefine the macros here so zero is handled correctly.
+ */
+#undef BYTE_TO_FLOAT
+#define BYTE_TO_FLOAT(B) ((B) == 0 ? 0.0F : ((2.0F * (B) + 1.0F) * (1.0F/255.0F)))
+
+#undef SHORT_TO_FLOAT
+#define SHORT_TO_FLOAT(S) ((S) == 0 ? 0.0F : ((2.0F * (S) + 1.0F) * (1.0F/65535.0F)))
+
+
+
+/** Compute ceiling of integer quotient of A divided by B. */
+#define CEILING( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 )
+
+
+/**
+ * Flip the 8 bits in each byte of the given array.
+ *
+ * \param p array.
+ * \param n number of bytes.
+ *
+ * \todo try this trick to flip bytes someday:
+ * \code
+ * v = ((v & 0x55555555) << 1) | ((v >> 1) & 0x55555555);
+ * v = ((v & 0x33333333) << 2) | ((v >> 2) & 0x33333333);
+ * v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f);
+ * \endcode
+ */
+static void
+flip_bytes( GLubyte *p, GLuint n )
+{
+ GLuint i, a, b;
+ for (i = 0; i < n; i++) {
+ b = (GLuint) p[i]; /* words are often faster than bytes */
+ a = ((b & 0x01) << 7) |
+ ((b & 0x02) << 5) |
+ ((b & 0x04) << 3) |
+ ((b & 0x08) << 1) |
+ ((b & 0x10) >> 1) |
+ ((b & 0x20) >> 3) |
+ ((b & 0x40) >> 5) |
+ ((b & 0x80) >> 7);
+ p[i] = (GLubyte) a;
+ }
+}
+
+
+
+/*
+ * Unpack a 32x32 pixel polygon stipple from user memory using the
+ * current pixel unpack settings.
+ */
+void
+_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32],
+ const struct gl_pixelstore_attrib *unpacking )
+{
+ GLubyte *ptrn = (GLubyte *) _mesa_unpack_bitmap(32, 32, pattern, unpacking);
+ if (ptrn) {
+ /* Convert pattern from GLubytes to GLuints and handle big/little
+ * endian differences
+ */
+ GLubyte *p = ptrn;
+ GLint i;
+ for (i = 0; i < 32; i++) {
+ dest[i] = (p[0] << 24)
+ | (p[1] << 16)
+ | (p[2] << 8)
+ | (p[3] );
+ p += 4;
+ }
+ free(ptrn);
+ }
+}
+
+
+/*
+ * Pack polygon stipple into user memory given current pixel packing
+ * settings.
+ */
+void
+_mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest,
+ const struct gl_pixelstore_attrib *packing )
+{
+ /* Convert pattern from GLuints to GLubytes to handle big/little
+ * endian differences.
+ */
+ GLubyte ptrn[32*4];
+ GLint i;
+ for (i = 0; i < 32; i++) {
+ ptrn[i * 4 + 0] = (GLubyte) ((pattern[i] >> 24) & 0xff);
+ ptrn[i * 4 + 1] = (GLubyte) ((pattern[i] >> 16) & 0xff);
+ ptrn[i * 4 + 2] = (GLubyte) ((pattern[i] >> 8 ) & 0xff);
+ ptrn[i * 4 + 3] = (GLubyte) ((pattern[i] ) & 0xff);
+ }
+
+ _mesa_pack_bitmap(32, 32, ptrn, dest, packing);
+}
+
+
+/*
+ * Unpack bitmap data. Resulting data will be in most-significant-bit-first
+ * order with row alignment = 1 byte.
+ */
+GLvoid *
+_mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
+ const struct gl_pixelstore_attrib *packing )
+{
+ GLint bytes, row, width_in_bytes;
+ GLubyte *buffer, *dst;
+
+ if (!pixels)
+ return NULL;
+
+ /* Alloc dest storage */
+ bytes = ((width + 7) / 8 * height);
+ buffer = (GLubyte *) malloc( bytes );
+ if (!buffer)
+ return NULL;
+
+ width_in_bytes = CEILING( width, 8 );
+ dst = buffer;
+ for (row = 0; row < height; row++) {
+ const GLubyte *src = (const GLubyte *)
+ _mesa_image_address2d(packing, pixels, width, height,
+ GL_COLOR_INDEX, GL_BITMAP, row, 0);
+ if (!src) {
+ free(buffer);
+ return NULL;
+ }
+
+ if ((packing->SkipPixels & 7) == 0) {
+ memcpy( dst, src, width_in_bytes );
+ if (packing->LsbFirst) {
+ flip_bytes( dst, width_in_bytes );
+ }
+ }
+ else {
+ /* handling SkipPixels is a bit tricky (no pun intended!) */
+ GLint i;
+ if (packing->LsbFirst) {
+ GLubyte srcMask = 1 << (packing->SkipPixels & 0x7);
+ GLubyte dstMask = 128;
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 128) {
+ srcMask = 1;
+ s++;
+ }
+ else {
+ srcMask = srcMask << 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ else {
+ GLubyte srcMask = 128 >> (packing->SkipPixels & 0x7);
+ GLubyte dstMask = 128;
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 1) {
+ srcMask = 128;
+ s++;
+ }
+ else {
+ srcMask = srcMask >> 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ }
+ dst += width_in_bytes;
+ }
+
+ return buffer;
+}
+
+
+/*
+ * Pack bitmap data.
+ */
+void
+_mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
+ GLubyte *dest, const struct gl_pixelstore_attrib *packing )
+{
+ GLint row, width_in_bytes;
+ const GLubyte *src;
+
+ if (!source)
+ return;
+
+ width_in_bytes = CEILING( width, 8 );
+ src = source;
+ for (row = 0; row < height; row++) {
+ GLubyte *dst = (GLubyte *) _mesa_image_address2d(packing, dest,
+ width, height, GL_COLOR_INDEX, GL_BITMAP, row, 0);
+ if (!dst)
+ return;
+
+ if ((packing->SkipPixels & 7) == 0) {
+ memcpy( dst, src, width_in_bytes );
+ if (packing->LsbFirst) {
+ flip_bytes( dst, width_in_bytes );
+ }
+ }
+ else {
+ /* handling SkipPixels is a bit tricky (no pun intended!) */
+ GLint i;
+ if (packing->LsbFirst) {
+ GLubyte srcMask = 128;
+ GLubyte dstMask = 1 << (packing->SkipPixels & 0x7);
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 1) {
+ srcMask = 128;
+ s++;
+ }
+ else {
+ srcMask = srcMask >> 1;
+ }
+ if (dstMask == 128) {
+ dstMask = 1;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask << 1;
+ }
+ }
+ }
+ else {
+ GLubyte srcMask = 128;
+ GLubyte dstMask = 128 >> (packing->SkipPixels & 0x7);
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 1) {
+ srcMask = 128;
+ s++;
+ }
+ else {
+ srcMask = srcMask >> 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ }
+ src += width_in_bytes;
+ }
+}
+
+
+/**
+ * Get indexes of color components for a basic color format, such as
+ * GL_RGBA, GL_RED, GL_LUMINANCE_ALPHA, etc. Return -1 for indexes
+ * that do not apply.
+ */
+static void
+get_component_indexes(GLenum format,
+ GLint *redIndex,
+ GLint *greenIndex,
+ GLint *blueIndex,
+ GLint *alphaIndex,
+ GLint *luminanceIndex,
+ GLint *intensityIndex)
+{
+ *redIndex = -1;
+ *greenIndex = -1;
+ *blueIndex = -1;
+ *alphaIndex = -1;
+ *luminanceIndex = -1;
+ *intensityIndex = -1;
+
+ switch (format) {
+ case GL_LUMINANCE:
+ case GL_LUMINANCE_INTEGER_EXT:
+ *luminanceIndex = 0;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ *luminanceIndex = 0;
+ *alphaIndex = 1;
+ break;
+ case GL_INTENSITY:
+ *intensityIndex = 0;
+ break;
+ case GL_RED:
+ case GL_RED_INTEGER_EXT:
+ *redIndex = 0;
+ break;
+ case GL_GREEN:
+ case GL_GREEN_INTEGER_EXT:
+ *greenIndex = 0;
+ break;
+ case GL_BLUE:
+ case GL_BLUE_INTEGER_EXT:
+ *blueIndex = 0;
+ break;
+ case GL_ALPHA:
+ case GL_ALPHA_INTEGER_EXT:
+ *alphaIndex = 0;
+ break;
+ case GL_RG:
+ case GL_RG_INTEGER:
+ *redIndex = 0;
+ *greenIndex = 1;
+ break;
+ case GL_RGB:
+ case GL_RGB_INTEGER_EXT:
+ *redIndex = 0;
+ *greenIndex = 1;
+ *blueIndex = 2;
+ break;
+ case GL_BGR:
+ case GL_BGR_INTEGER_EXT:
+ *blueIndex = 0;
+ *greenIndex = 1;
+ *redIndex = 2;
+ break;
+ case GL_RGBA:
+ case GL_RGBA_INTEGER_EXT:
+ *redIndex = 0;
+ *greenIndex = 1;
+ *blueIndex = 2;
+ *alphaIndex = 3;
+ break;
+ case GL_BGRA:
+ case GL_BGRA_INTEGER:
+ *redIndex = 2;
+ *greenIndex = 1;
+ *blueIndex = 0;
+ *alphaIndex = 3;
+ break;
+ case GL_ABGR_EXT:
+ *redIndex = 3;
+ *greenIndex = 2;
+ *blueIndex = 1;
+ *alphaIndex = 0;
+ break;
+ case GL_DU8DV8_ATI:
+ case GL_DUDV_ATI:
+ *redIndex = 0;
+ *greenIndex = 1;
+ break;
+ default:
+ assert(0 && "bad format in get_component_indexes()");
+ }
+}
+
+
+
+/**
+ * For small integer types, return the min and max possible values.
+ * Used for clamping floats to unscaled integer types.
+ * \return GL_TRUE if type is handled, GL_FALSE otherwise.
+ */
+static GLboolean
+get_type_min_max(GLenum type, GLfloat *min, GLfloat *max)
+{
+ switch (type) {
+ case GL_BYTE:
+ *min = -128.0;
+ *max = 127.0;
+ return GL_TRUE;
+ case GL_UNSIGNED_BYTE:
+ *min = 0.0;
+ *max = 255.0;
+ return GL_TRUE;
+ case GL_SHORT:
+ *min = -32768.0;
+ *max = 32767.0;
+ return GL_TRUE;
+ case GL_UNSIGNED_SHORT:
+ *min = 0.0;
+ *max = 65535.0;
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+
+/**
+ * Used to pack an array [][4] of RGBA float colors as specified
+ * by the dstFormat, dstType and dstPacking. Used by glReadPixels.
+ * Historically, the RGBA values were in [0,1] and rescaled to fit
+ * into GLubytes, etc. But with new integer formats, the RGBA values
+ * may have any value and we don't always rescale when converting to
+ * integers.
+ *
+ * Note: the rgba values will be modified by this function when any pixel
+ * transfer ops are enabled.
+ */
+void
+_mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4],
+ GLenum dstFormat, GLenum dstType,
+ GLvoid *dstAddr,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps)
+{
+ GLfloat luminance[MAX_WIDTH];
+ const GLint comps = _mesa_components_in_format(dstFormat);
+ const GLboolean intDstFormat = _mesa_is_integer_format(dstFormat);
+ GLuint i;
+
+ /* XXX
+ * This test should probably go away. Have the caller set/clear the
+ * IMAGE_CLAMP_BIT as needed.
+ */
+ if (dstType != GL_FLOAT || ctx->Color.ClampReadColor == GL_TRUE) {
+ if (!intDstFormat) {
+ /* need to clamp to [0, 1] */
+ transferOps |= IMAGE_CLAMP_BIT;
+ }
+ }
+
+ if (transferOps) {
+ _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
+ }
+
+ /*
+ * Component clamping (besides clamping to [0,1] in
+ * _mesa_apply_rgba_transfer_ops()).
+ */
+ if (intDstFormat) {
+ /* clamping to dest type's min/max values */
+ GLfloat min, max;
+ if (get_type_min_max(dstType, &min, &max)) {
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], min, max);
+ rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], min, max);
+ rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], min, max);
+ rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], min, max);
+ }
+ }
+ }
+ else if (dstFormat == GL_LUMINANCE || dstFormat == GL_LUMINANCE_ALPHA) {
+ /* compute luminance values */
+ if (transferOps & IMAGE_CLAMP_BIT) {
+ for (i = 0; i < n; i++) {
+ GLfloat sum = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
+ luminance[i] = CLAMP(sum, 0.0F, 1.0F);
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ luminance[i] = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
+ }
+ }
+ }
+
+ /*
+ * Pack/store the pixels. Ugh! Lots of cases!!!
+ */
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UBYTE(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UBYTE(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UBYTE(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_UBYTE(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLubyte) rgba[i][RCOMP];
+ dst[i*3+1] = (GLubyte) rgba[i][GCOMP];
+ dst[i*3+2] = (GLubyte) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLubyte) rgba[i][RCOMP];
+ dst[i*4+1] = (GLubyte) rgba[i][GCOMP];
+ dst[i*4+2] = (GLubyte) rgba[i][BCOMP];
+ dst[i*4+3] = (GLubyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLubyte) rgba[i][BCOMP];
+ dst[i*3+1] = (GLubyte) rgba[i][GCOMP];
+ dst[i*3+2] = (GLubyte) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLubyte) rgba[i][BCOMP];
+ dst[i*4+1] = (GLubyte) rgba[i][GCOMP];
+ dst[i*4+2] = (GLubyte) rgba[i][RCOMP];
+ dst[i*4+3] = (GLubyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLubyte) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLubyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UBYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UBYTE(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_BYTE(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_BYTE(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_BYTE(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_BYTE(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLbyte) rgba[i][RCOMP];
+ dst[i*3+1] = (GLbyte) rgba[i][GCOMP];
+ dst[i*3+2] = (GLbyte) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLbyte) rgba[i][RCOMP];
+ dst[i*4+1] = (GLbyte) rgba[i][GCOMP];
+ dst[i*4+2] = (GLbyte) rgba[i][BCOMP];
+ dst[i*4+3] = (GLbyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLbyte) rgba[i][BCOMP];
+ dst[i*3+1] = (GLbyte) rgba[i][GCOMP];
+ dst[i*3+2] = (GLbyte) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLbyte) rgba[i][BCOMP];
+ dst[i*4+1] = (GLbyte) rgba[i][GCOMP];
+ dst[i*4+2] = (GLbyte) rgba[i][RCOMP];
+ dst[i*4+3] = (GLbyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLbyte) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLbyte) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ CLAMPED_FLOAT_TO_USHORT(dst[i], rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ UNCLAMPED_FLOAT_TO_USHORT(dst[i], luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ UNCLAMPED_FLOAT_TO_USHORT(dst[i*2+0], luminance[i]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*2+0], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*2+1], rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+0], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*3+2], rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][RCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+0], rgba[i][ACOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+1], rgba[i][BCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+2], rgba[i][GCOMP]);
+ CLAMPED_FLOAT_TO_USHORT(dst[i*4+3], rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLushort) rgba[i][RCOMP];
+ dst[i*3+1] = (GLushort) rgba[i][GCOMP];
+ dst[i*3+2] = (GLushort) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLushort) rgba[i][RCOMP];
+ dst[i*4+1] = (GLushort) rgba[i][GCOMP];
+ dst[i*4+2] = (GLushort) rgba[i][BCOMP];
+ dst[i*4+3] = (GLushort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLushort) rgba[i][BCOMP];
+ dst[i*3+1] = (GLushort) rgba[i][GCOMP];
+ dst[i*3+2] = (GLushort) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLushort) rgba[i][BCOMP];
+ dst[i*4+1] = (GLushort) rgba[i][GCOMP];
+ dst[i*4+2] = (GLushort) rgba[i][RCOMP];
+ dst[i*4+3] = (GLushort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLushort) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLushort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_USHORT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_USHORT(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_SHORT(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_SHORT(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_SHORT(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_SHORT(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLshort) rgba[i][RCOMP];
+ dst[i*3+1] = (GLshort) rgba[i][GCOMP];
+ dst[i*3+2] = (GLshort) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLshort) rgba[i][RCOMP];
+ dst[i*4+1] = (GLshort) rgba[i][GCOMP];
+ dst[i*4+2] = (GLshort) rgba[i][BCOMP];
+ dst[i*4+3] = (GLshort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLshort) rgba[i][BCOMP];
+ dst[i*3+1] = (GLshort) rgba[i][GCOMP];
+ dst[i*3+2] = (GLshort) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLshort) rgba[i][BCOMP];
+ dst[i*4+1] = (GLshort) rgba[i][GCOMP];
+ dst[i*4+2] = (GLshort) rgba[i][RCOMP];
+ dst[i*4+3] = (GLshort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLshort) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLshort) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_SHORT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_SHORT(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_UINT(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UINT(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_UINT(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_UINT(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLuint) rgba[i][RCOMP];
+ dst[i*3+1] = (GLuint) rgba[i][GCOMP];
+ dst[i*3+2] = (GLuint) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLuint) rgba[i][RCOMP];
+ dst[i*4+1] = (GLuint) rgba[i][GCOMP];
+ dst[i*4+2] = (GLuint) rgba[i][BCOMP];
+ dst[i*4+3] = (GLuint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLuint) rgba[i][BCOMP];
+ dst[i*3+1] = (GLuint) rgba[i][GCOMP];
+ dst[i*3+2] = (GLuint) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLuint) rgba[i][BCOMP];
+ dst[i*4+1] = (GLuint) rgba[i][GCOMP];
+ dst[i*4+2] = (GLuint) rgba[i][RCOMP];
+ dst[i*4+3] = (GLuint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLuint) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLuint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_UINT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_UINT(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = FLOAT_TO_INT(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_INT(luminance[i]);
+ dst[i*2+1] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*3+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*4+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ dst[i*4+3] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ dst[i*3+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*3+2] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ dst[i*4+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*4+2] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*4+3] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = FLOAT_TO_INT(rgba[i][ACOMP]);
+ dst[i*4+1] = FLOAT_TO_INT(rgba[i][BCOMP]);
+ dst[i*4+2] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ dst[i*4+3] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = FLOAT_TO_INT(rgba[i][RCOMP]);
+ dst[i*2+1] = FLOAT_TO_INT(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RED_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) rgba[i][RCOMP];
+ }
+ break;
+ case GL_GREEN_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) rgba[i][GCOMP];
+ }
+ break;
+ case GL_BLUE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) rgba[i][BCOMP];
+ }
+ break;
+ case GL_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_RGB_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLint) rgba[i][RCOMP];
+ dst[i*3+1] = (GLint) rgba[i][GCOMP];
+ dst[i*3+2] = (GLint) rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLint) rgba[i][RCOMP];
+ dst[i*4+1] = (GLint) rgba[i][GCOMP];
+ dst[i*4+2] = (GLint) rgba[i][BCOMP];
+ dst[i*4+3] = (GLint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = (GLint) rgba[i][BCOMP];
+ dst[i*3+1] = (GLint) rgba[i][GCOMP];
+ dst[i*3+2] = (GLint) rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = (GLint) rgba[i][BCOMP];
+ dst[i*4+1] = (GLint) rgba[i][GCOMP];
+ dst[i*4+2] = (GLint) rgba[i][RCOMP];
+ dst[i*4+3] = (GLint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = (GLint) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ dst[i*2+1] = (GLint) rgba[i][ACOMP];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) (rgba[i][RCOMP] +
+ rgba[i][GCOMP] +
+ rgba[i][BCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = rgba[i][RCOMP];
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = rgba[i][GCOMP];
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = rgba[i][BCOMP];
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = rgba[i][ACOMP];
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = luminance[i];
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = luminance[i];
+ dst[i*2+1] = rgba[i][ACOMP];
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = rgba[i][RCOMP];
+ dst[i*2+1] = rgba[i][GCOMP];
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = rgba[i][RCOMP];
+ dst[i*3+1] = rgba[i][GCOMP];
+ dst[i*3+2] = rgba[i][BCOMP];
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = rgba[i][RCOMP];
+ dst[i*4+1] = rgba[i][GCOMP];
+ dst[i*4+2] = rgba[i][BCOMP];
+ dst[i*4+3] = rgba[i][ACOMP];
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = rgba[i][BCOMP];
+ dst[i*3+1] = rgba[i][GCOMP];
+ dst[i*3+2] = rgba[i][RCOMP];
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = rgba[i][BCOMP];
+ dst[i*4+1] = rgba[i][GCOMP];
+ dst[i*4+2] = rgba[i][RCOMP];
+ dst[i*4+3] = rgba[i][ACOMP];
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = rgba[i][ACOMP];
+ dst[i*4+1] = rgba[i][BCOMP];
+ dst[i*4+2] = rgba[i][GCOMP];
+ dst[i*4+3] = rgba[i][RCOMP];
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = rgba[i][RCOMP];
+ dst[i*2+1] = rgba[i][GCOMP];
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLhalfARB *dst = (GLhalfARB *) dstAddr;
+ switch (dstFormat) {
+ case GL_RED:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(rgba[i][RCOMP]);
+ break;
+ case GL_GREEN:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(rgba[i][GCOMP]);
+ break;
+ case GL_BLUE:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(rgba[i][BCOMP]);
+ break;
+ case GL_ALPHA:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(rgba[i][ACOMP]);
+ break;
+ case GL_LUMINANCE:
+ for (i=0;i<n;i++)
+ dst[i] = _mesa_float_to_half(luminance[i]);
+ break;
+ case GL_LUMINANCE_ALPHA:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = _mesa_float_to_half(luminance[i]);
+ dst[i*2+1] = _mesa_float_to_half(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_RG:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ }
+ break;
+ case GL_RGB:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*3+2] = _mesa_float_to_half(rgba[i][BCOMP]);
+ }
+ break;
+ case GL_RGBA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*4+2] = _mesa_float_to_half(rgba[i][BCOMP]);
+ dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_BGR:
+ for (i=0;i<n;i++) {
+ dst[i*3+0] = _mesa_float_to_half(rgba[i][BCOMP]);
+ dst[i*3+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*3+2] = _mesa_float_to_half(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_BGRA:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = _mesa_float_to_half(rgba[i][BCOMP]);
+ dst[i*4+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*4+2] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*4+3] = _mesa_float_to_half(rgba[i][ACOMP]);
+ }
+ break;
+ case GL_ABGR_EXT:
+ for (i=0;i<n;i++) {
+ dst[i*4+0] = _mesa_float_to_half(rgba[i][ACOMP]);
+ dst[i*4+1] = _mesa_float_to_half(rgba[i][BCOMP]);
+ dst[i*4+2] = _mesa_float_to_half(rgba[i][GCOMP]);
+ dst[i*4+3] = _mesa_float_to_half(rgba[i][RCOMP]);
+ }
+ break;
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ for (i=0;i<n;i++) {
+ dst[i*2+0] = _mesa_float_to_half(rgba[i][RCOMP]);
+ dst[i*2+1] = _mesa_float_to_half(rgba[i][GCOMP]);
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad format in _mesa_pack_rgba_span\n");
+ }
+ }
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ if (dstFormat == GL_RGB) {
+ GLubyte *dst = (GLubyte *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 7.0F) << 5)
+ | (IROUND(rgba[i][GCOMP] * 7.0F) << 2)
+ | (IROUND(rgba[i][BCOMP] * 3.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ if (dstFormat == GL_RGB) {
+ GLubyte *dst = (GLubyte *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 7.0F) )
+ | (IROUND(rgba[i][GCOMP] * 7.0F) << 3)
+ | (IROUND(rgba[i][BCOMP] * 3.0F) << 6);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ if (dstFormat == GL_RGB) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) << 11)
+ | (IROUND(rgba[i][GCOMP] * 63.0F) << 5)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ if (dstFormat == GL_RGB) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) )
+ | (IROUND(rgba[i][GCOMP] * 63.0F) << 5)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 11);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ if (dstFormat == GL_RGBA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 15.0F) << 12)
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][BCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][ACOMP] * 15.0F) );
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 15.0F) << 12)
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][RCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][ACOMP] * 15.0F) );
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 15.0F) << 12)
+ | (IROUND(rgba[i][BCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][RCOMP] * 15.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ if (dstFormat == GL_RGBA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 15.0F) )
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][BCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][ACOMP] * 15.0F) << 12);
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 15.0F) )
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][RCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][ACOMP] * 15.0F) << 12);
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 15.0F) )
+ | (IROUND(rgba[i][BCOMP] * 15.0F) << 4)
+ | (IROUND(rgba[i][GCOMP] * 15.0F) << 8)
+ | (IROUND(rgba[i][RCOMP] * 15.0F) << 12);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ if (dstFormat == GL_RGBA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) << 11)
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 6)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 1)
+ | (IROUND(rgba[i][ACOMP] * 1.0F) );
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 31.0F) << 11)
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 6)
+ | (IROUND(rgba[i][RCOMP] * 31.0F) << 1)
+ | (IROUND(rgba[i][ACOMP] * 1.0F) );
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 31.0F) << 11)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 6)
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 1)
+ | (IROUND(rgba[i][RCOMP] * 1.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ if (dstFormat == GL_RGBA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 31.0F) )
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 5)
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 10)
+ | (IROUND(rgba[i][ACOMP] * 1.0F) << 15);
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 31.0F) )
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 5)
+ | (IROUND(rgba[i][RCOMP] * 31.0F) << 10)
+ | (IROUND(rgba[i][ACOMP] * 1.0F) << 15);
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLushort *dst = (GLushort *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 31.0F) )
+ | (IROUND(rgba[i][BCOMP] * 31.0F) << 5)
+ | (IROUND(rgba[i][GCOMP] * 31.0F) << 10)
+ | (IROUND(rgba[i][RCOMP] * 1.0F) << 15);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ if (dstFormat == GL_RGBA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 255.F) << 24)
+ | (IROUND(rgba[i][GCOMP] * 255.F) << 16)
+ | (IROUND(rgba[i][BCOMP] * 255.F) << 8)
+ | (IROUND(rgba[i][ACOMP] * 255.F) );
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 255.F) << 24)
+ | (IROUND(rgba[i][GCOMP] * 255.F) << 16)
+ | (IROUND(rgba[i][RCOMP] * 255.F) << 8)
+ | (IROUND(rgba[i][ACOMP] * 255.F) );
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 255.F) << 24)
+ | (IROUND(rgba[i][BCOMP] * 255.F) << 16)
+ | (IROUND(rgba[i][GCOMP] * 255.F) << 8)
+ | (IROUND(rgba[i][RCOMP] * 255.F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ if (dstFormat == GL_RGBA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 255.0F) )
+ | (IROUND(rgba[i][GCOMP] * 255.0F) << 8)
+ | (IROUND(rgba[i][BCOMP] * 255.0F) << 16)
+ | (IROUND(rgba[i][ACOMP] * 255.0F) << 24);
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 255.0F) )
+ | (IROUND(rgba[i][GCOMP] * 255.0F) << 8)
+ | (IROUND(rgba[i][RCOMP] * 255.0F) << 16)
+ | (IROUND(rgba[i][ACOMP] * 255.0F) << 24);
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 255.0F) )
+ | (IROUND(rgba[i][BCOMP] * 255.0F) << 8)
+ | (IROUND(rgba[i][GCOMP] * 255.0F) << 16)
+ | (IROUND(rgba[i][RCOMP] * 255.0F) << 24);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_10_10_10_2:
+ if (dstFormat == GL_RGBA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 1023.0F) << 22)
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 12)
+ | (IROUND(rgba[i][BCOMP] * 1023.0F) << 2)
+ | (IROUND(rgba[i][ACOMP] * 3.0F) );
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 1023.0F) << 22)
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 12)
+ | (IROUND(rgba[i][RCOMP] * 1023.0F) << 2)
+ | (IROUND(rgba[i][ACOMP] * 3.0F) );
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 1023.0F) << 22)
+ | (IROUND(rgba[i][BCOMP] * 1023.0F) << 12)
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 2)
+ | (IROUND(rgba[i][RCOMP] * 3.0F) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ if (dstFormat == GL_RGBA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][RCOMP] * 1023.0F) )
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 10)
+ | (IROUND(rgba[i][BCOMP] * 1023.0F) << 20)
+ | (IROUND(rgba[i][ACOMP] * 3.0F) << 30);
+ }
+ }
+ else if (dstFormat == GL_BGRA) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][BCOMP] * 1023.0F) )
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 10)
+ | (IROUND(rgba[i][RCOMP] * 1023.0F) << 20)
+ | (IROUND(rgba[i][ACOMP] * 3.0F) << 30);
+ }
+ }
+ else if (dstFormat == GL_ABGR_EXT) {
+ GLuint *dst = (GLuint *) dstAddr;
+ for (i=0;i<n;i++) {
+ dst[i] = (IROUND(rgba[i][ACOMP] * 1023.0F) )
+ | (IROUND(rgba[i][BCOMP] * 1023.0F) << 10)
+ | (IROUND(rgba[i][GCOMP] * 1023.0F) << 20)
+ | (IROUND(rgba[i][RCOMP] * 3.0F) << 30);
+ }
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad type in _mesa_pack_rgba_span_float");
+ return;
+ }
+
+ if (dstPacking->SwapBytes) {
+ GLint swapSize = _mesa_sizeof_packed_type(dstType);
+ if (swapSize == 2) {
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2((GLushort *) dstAddr, n * comps);
+ }
+ }
+ else if (swapSize == 4) {
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4((GLuint *) dstAddr, n * comps);
+ }
+ }
+ }
+}
+
+
+
+#define SWAP2BYTE(VALUE) \
+ { \
+ GLubyte *bytes = (GLubyte *) &(VALUE); \
+ GLubyte tmp = bytes[0]; \
+ bytes[0] = bytes[1]; \
+ bytes[1] = tmp; \
+ }
+
+#define SWAP4BYTE(VALUE) \
+ { \
+ GLubyte *bytes = (GLubyte *) &(VALUE); \
+ GLubyte tmp = bytes[0]; \
+ bytes[0] = bytes[3]; \
+ bytes[3] = tmp; \
+ tmp = bytes[1]; \
+ bytes[1] = bytes[2]; \
+ bytes[2] = tmp; \
+ }
+
+
+static void
+extract_uint_indexes(GLuint n, GLuint indexes[],
+ GLenum srcFormat, GLenum srcType, const GLvoid *src,
+ const struct gl_pixelstore_attrib *unpack )
+{
+ ASSERT(srcFormat == GL_COLOR_INDEX || srcFormat == GL_STENCIL_INDEX);
+
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_UNSIGNED_INT_24_8_EXT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT);
+
+ switch (srcType) {
+ case GL_BITMAP:
+ {
+ GLubyte *ubsrc = (GLubyte *) src;
+ if (unpack->LsbFirst) {
+ GLubyte mask = 1 << (unpack->SkipPixels & 0x7);
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ indexes[i] = (*ubsrc & mask) ? 1 : 0;
+ if (mask == 128) {
+ mask = 1;
+ ubsrc++;
+ }
+ else {
+ mask = mask << 1;
+ }
+ }
+ }
+ else {
+ GLubyte mask = 128 >> (unpack->SkipPixels & 0x7);
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ indexes[i] = (*ubsrc & mask) ? 1 : 0;
+ if (mask == 1) {
+ mask = 128;
+ ubsrc++;
+ }
+ else {
+ mask = mask >> 1;
+ }
+ }
+ }
+ }
+ break;
+ case GL_UNSIGNED_BYTE:
+ {
+ GLuint i;
+ const GLubyte *s = (const GLubyte *) src;
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLuint i;
+ const GLbyte *s = (const GLbyte *) src;
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLuint i;
+ const GLushort *s = (const GLushort *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLushort value = s[i];
+ SWAP2BYTE(value);
+ indexes[i] = value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLuint i;
+ const GLshort *s = (const GLshort *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLshort value = s[i];
+ SWAP2BYTE(value);
+ indexes[i] = value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint i;
+ const GLuint *s = (const GLuint *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLuint value = s[i];
+ SWAP4BYTE(value);
+ indexes[i] = value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLuint i;
+ const GLint *s = (const GLint *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLint value = s[i];
+ SWAP4BYTE(value);
+ indexes[i] = value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i];
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLuint i;
+ const GLfloat *s = (const GLfloat *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLfloat value = s[i];
+ SWAP4BYTE(value);
+ indexes[i] = (GLuint) value;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = (GLuint) s[i];
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLuint i;
+ const GLhalfARB *s = (const GLhalfARB *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLhalfARB value = s[i];
+ SWAP2BYTE(value);
+ indexes[i] = (GLuint) _mesa_half_to_float(value);
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = (GLuint) _mesa_half_to_float(s[i]);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_24_8_EXT:
+ {
+ GLuint i;
+ const GLuint *s = (const GLuint *) src;
+ if (unpack->SwapBytes) {
+ for (i = 0; i < n; i++) {
+ GLuint value = s[i];
+ SWAP4BYTE(value);
+ indexes[i] = value & 0xff; /* lower 8 bits */
+ }
+ }
+ else {
+ for (i = 0; i < n; i++)
+ indexes[i] = s[i] & 0xff; /* lower 8 bits */
+ }
+ }
+ break;
+
+ default:
+ _mesa_problem(NULL, "bad srcType in extract_uint_indexes");
+ return;
+ }
+}
+
+
+/**
+ * Return source/dest RGBA indexes for unpacking pixels.
+ */
+static void
+get_component_mapping(GLenum format,
+ GLint *rSrc,
+ GLint *gSrc,
+ GLint *bSrc,
+ GLint *aSrc,
+ GLint *rDst,
+ GLint *gDst,
+ GLint *bDst,
+ GLint *aDst)
+{
+ switch (format) {
+ case GL_RED:
+ case GL_RED_INTEGER_EXT:
+ *rSrc = 0;
+ *gSrc = *bSrc = *aSrc = -1;
+ break;
+ case GL_GREEN:
+ case GL_GREEN_INTEGER_EXT:
+ *gSrc = 0;
+ *rSrc = *bSrc = *aSrc = -1;
+ break;
+ case GL_BLUE:
+ case GL_BLUE_INTEGER_EXT:
+ *bSrc = 0;
+ *rSrc = *gSrc = *aSrc = -1;
+ break;
+ case GL_ALPHA:
+ case GL_ALPHA_INTEGER_EXT:
+ *rSrc = *gSrc = *bSrc = -1;
+ *aSrc = 0;
+ break;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE_INTEGER_EXT:
+ *rSrc = *gSrc = *bSrc = 0;
+ *aSrc = -1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ *rSrc = *gSrc = *bSrc = 0;
+ *aSrc = 1;
+ break;
+ case GL_INTENSITY:
+ *rSrc = *gSrc = *bSrc = *aSrc = 0;
+ break;
+ case GL_RG:
+ case GL_RG_INTEGER:
+ *rSrc = 0;
+ *gSrc = 1;
+ *bSrc = -1;
+ *aSrc = -1;
+ *rDst = 0;
+ *gDst = 1;
+ *bDst = 2;
+ *aDst = 3;
+ break;
+ case GL_RGB:
+ case GL_RGB_INTEGER:
+ *rSrc = 0;
+ *gSrc = 1;
+ *bSrc = 2;
+ *aSrc = -1;
+ *rDst = 0;
+ *gDst = 1;
+ *bDst = 2;
+ *aDst = 3;
+ break;
+ case GL_BGR:
+ *rSrc = 2;
+ *gSrc = 1;
+ *bSrc = 0;
+ *aSrc = -1;
+ *rDst = 2;
+ *gDst = 1;
+ *bDst = 0;
+ *aDst = 3;
+ break;
+ case GL_RGBA:
+ case GL_RGBA_INTEGER:
+ *rSrc = 0;
+ *gSrc = 1;
+ *bSrc = 2;
+ *aSrc = 3;
+ *rDst = 0;
+ *gDst = 1;
+ *bDst = 2;
+ *aDst = 3;
+ break;
+ case GL_BGRA:
+ *rSrc = 2;
+ *gSrc = 1;
+ *bSrc = 0;
+ *aSrc = 3;
+ *rDst = 2;
+ *gDst = 1;
+ *bDst = 0;
+ *aDst = 3;
+ break;
+ case GL_ABGR_EXT:
+ *rSrc = 3;
+ *gSrc = 2;
+ *bSrc = 1;
+ *aSrc = 0;
+ *rDst = 3;
+ *gDst = 2;
+ *bDst = 1;
+ *aDst = 0;
+ break;
+ case GL_DU8DV8_ATI:
+ case GL_DUDV_ATI:
+ *rSrc = 0;
+ *gSrc = 1;
+ *bSrc = -1;
+ *aSrc = -1;
+ break;
+ default:
+ _mesa_problem(NULL, "bad srcFormat %s in get_component_mapping",
+ _mesa_lookup_enum_by_nr(format));
+ return;
+ }
+}
+
+
+
+/*
+ * This function extracts floating point RGBA values from arbitrary
+ * image data. srcFormat and srcType are the format and type parameters
+ * passed to glDrawPixels, glTexImage[123]D, glTexSubImage[123]D, etc.
+ *
+ * Refering to section 3.6.4 of the OpenGL 1.2 spec, this function
+ * implements the "Conversion to floating point", "Conversion to RGB",
+ * and "Final Expansion to RGBA" operations.
+ *
+ * Args: n - number of pixels
+ * rgba - output colors
+ * srcFormat - format of incoming data
+ * srcType - data type of incoming data
+ * src - source data pointer
+ * swapBytes - perform byteswapping of incoming data?
+ */
+static void
+extract_float_rgba(GLuint n, GLfloat rgba[][4],
+ GLenum srcFormat, GLenum srcType, const GLvoid *src,
+ GLboolean swapBytes)
+{
+ GLint rSrc, gSrc, bSrc, aSrc;
+ GLint stride;
+ GLint rDst, bDst, gDst, aDst;
+ GLboolean intFormat;
+ GLfloat rs = 1.0f, gs = 1.0f, bs = 1.0f, as = 1.0f; /* scale factors */
+
+ ASSERT(srcFormat == GL_RED ||
+ srcFormat == GL_GREEN ||
+ srcFormat == GL_BLUE ||
+ srcFormat == GL_ALPHA ||
+ srcFormat == GL_LUMINANCE ||
+ srcFormat == GL_LUMINANCE_ALPHA ||
+ srcFormat == GL_INTENSITY ||
+ srcFormat == GL_RG ||
+ srcFormat == GL_RGB ||
+ srcFormat == GL_BGR ||
+ srcFormat == GL_RGBA ||
+ srcFormat == GL_BGRA ||
+ srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_DU8DV8_ATI ||
+ srcFormat == GL_DUDV_ATI ||
+ srcFormat == GL_RED_INTEGER_EXT ||
+ srcFormat == GL_GREEN_INTEGER_EXT ||
+ srcFormat == GL_BLUE_INTEGER_EXT ||
+ srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RGB_INTEGER_EXT ||
+ srcFormat == GL_RGBA_INTEGER_EXT ||
+ srcFormat == GL_BGR_INTEGER_EXT ||
+ srcFormat == GL_BGRA_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT);
+
+ ASSERT(srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT ||
+ srcType == GL_UNSIGNED_BYTE_3_3_2 ||
+ srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5 ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
+ srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
+ srcType == GL_UNSIGNED_INT_10_10_10_2 ||
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
+
+ get_component_mapping(srcFormat,
+ &rSrc, &gSrc, &bSrc, &aSrc,
+ &rDst, &gDst, &bDst, &aDst);
+
+ stride = _mesa_components_in_format(srcFormat);
+
+ intFormat = _mesa_is_integer_format(srcFormat);
+
+#define PROCESS(SRC_INDEX, DST_INDEX, DEFAULT_FLT, DEFAULT_INT, TYPE, CONVERSION) \
+ if ((SRC_INDEX) < 0) { \
+ GLuint i; \
+ if (intFormat) { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][DST_INDEX] = DEFAULT_INT; \
+ } \
+ } \
+ else { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][DST_INDEX] = DEFAULT_FLT; \
+ } \
+ } \
+ } \
+ else if (swapBytes) { \
+ const TYPE *s = (const TYPE *) src; \
+ GLuint i; \
+ for (i = 0; i < n; i++) { \
+ TYPE value = s[SRC_INDEX]; \
+ if (sizeof(TYPE) == 2) { \
+ SWAP2BYTE(value); \
+ } \
+ else if (sizeof(TYPE) == 4) { \
+ SWAP4BYTE(value); \
+ } \
+ if (intFormat) \
+ rgba[i][DST_INDEX] = (GLfloat) value; \
+ else \
+ rgba[i][DST_INDEX] = (GLfloat) CONVERSION(value); \
+ s += stride; \
+ } \
+ } \
+ else { \
+ const TYPE *s = (const TYPE *) src; \
+ GLuint i; \
+ if (intFormat) { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][DST_INDEX] = (GLfloat) s[SRC_INDEX]; \
+ s += stride; \
+ } \
+ } \
+ else { \
+ for (i = 0; i < n; i++) { \
+ rgba[i][DST_INDEX] = (GLfloat) CONVERSION(s[SRC_INDEX]); \
+ s += stride; \
+ } \
+ } \
+ }
+
+ switch (srcType) {
+ case GL_UNSIGNED_BYTE:
+ PROCESS(rSrc, RCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(gSrc, GCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(bSrc, BCOMP, 0.0F, 0, GLubyte, UBYTE_TO_FLOAT);
+ PROCESS(aSrc, ACOMP, 1.0F, 255, GLubyte, UBYTE_TO_FLOAT);
+ break;
+ case GL_BYTE:
+ PROCESS(rSrc, RCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(gSrc, GCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(bSrc, BCOMP, 0.0F, 0, GLbyte, BYTE_TO_FLOAT);
+ PROCESS(aSrc, ACOMP, 1.0F, 127, GLbyte, BYTE_TO_FLOAT);
+ break;
+ case GL_UNSIGNED_SHORT:
+ PROCESS(rSrc, RCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
+ PROCESS(gSrc, GCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
+ PROCESS(bSrc, BCOMP, 0.0F, 0, GLushort, USHORT_TO_FLOAT);
+ PROCESS(aSrc, ACOMP, 1.0F, 0xffff, GLushort, USHORT_TO_FLOAT);
+ break;
+ case GL_SHORT:
+ PROCESS(rSrc, RCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
+ PROCESS(gSrc, GCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
+ PROCESS(bSrc, BCOMP, 0.0F, 0, GLshort, SHORT_TO_FLOAT);
+ PROCESS(aSrc, ACOMP, 1.0F, 32767, GLshort, SHORT_TO_FLOAT);
+ break;
+ case GL_UNSIGNED_INT:
+ PROCESS(rSrc, RCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
+ PROCESS(gSrc, GCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
+ PROCESS(bSrc, BCOMP, 0.0F, 0, GLuint, UINT_TO_FLOAT);
+ PROCESS(aSrc, ACOMP, 1.0F, 0xffffffff, GLuint, UINT_TO_FLOAT);
+ break;
+ case GL_INT:
+ PROCESS(rSrc, RCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
+ PROCESS(gSrc, GCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
+ PROCESS(bSrc, BCOMP, 0.0F, 0, GLint, INT_TO_FLOAT);
+ PROCESS(aSrc, ACOMP, 1.0F, 2147483647, GLint, INT_TO_FLOAT);
+ break;
+ case GL_FLOAT:
+ PROCESS(rSrc, RCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
+ PROCESS(gSrc, GCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
+ PROCESS(bSrc, BCOMP, 0.0F, 0.0F, GLfloat, (GLfloat));
+ PROCESS(aSrc, ACOMP, 1.0F, 1.0F, GLfloat, (GLfloat));
+ break;
+ case GL_HALF_FLOAT_ARB:
+ PROCESS(rSrc, RCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(gSrc, GCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(bSrc, BCOMP, 0.0F, 0.0F, GLhalfARB, _mesa_half_to_float);
+ PROCESS(aSrc, ACOMP, 1.0F, 1.0F, GLhalfARB, _mesa_half_to_float);
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ {
+ const GLubyte *ubsrc = (const GLubyte *) src;
+ GLuint i;
+ if (!intFormat) {
+ rs = 1.0F / 7.0F;
+ gs = 1.0F / 7.0F;
+ bs = 1.0F / 3.0F;
+ }
+ for (i = 0; i < n; i ++) {
+ GLubyte p = ubsrc[i];
+ rgba[i][rDst] = ((p >> 5) ) * rs;
+ rgba[i][gDst] = ((p >> 2) & 0x7) * gs;
+ rgba[i][bDst] = ((p ) & 0x3) * bs;
+ rgba[i][aDst] = 1.0F;
+ }
+ }
+ break;
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ {
+ const GLubyte *ubsrc = (const GLubyte *) src;
+ GLuint i;
+ if (!intFormat) {
+ rs = 1.0F / 7.0F;
+ gs = 1.0F / 7.0F;
+ bs = 1.0F / 3.0F;
+ }
+ for (i = 0; i < n; i ++) {
+ GLubyte p = ubsrc[i];
+ rgba[i][rDst] = ((p ) & 0x7) * rs;
+ rgba[i][gDst] = ((p >> 3) & 0x7) * gs;
+ rgba[i][bDst] = ((p >> 6) ) * bs;
+ rgba[i][aDst] = 1.0F;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ if (!intFormat) {
+ rs = 1.0F / 31.0F;
+ gs = 1.0F / 63.0F;
+ bs = 1.0F / 31.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p >> 11) ) * rs;
+ rgba[i][gDst] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bDst] = ((p ) & 0x1f) * bs;
+ rgba[i][aDst] = 1.0F;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p >> 11) ) * rs;
+ rgba[i][gDst] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bDst] = ((p ) & 0x1f) * bs;
+ rgba[i][aDst] = 1.0F;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ if (!intFormat) {
+ rs = 1.0F / 31.0F;
+ gs = 1.0F / 63.0F;
+ bs = 1.0F / 31.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p ) & 0x1f) * rs;
+ rgba[i][gDst] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bDst] = ((p >> 11) ) * bs;
+ rgba[i][aDst] = 1.0F;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p ) & 0x1f) * rs;
+ rgba[i][gDst] = ((p >> 5) & 0x3f) * gs;
+ rgba[i][bDst] = ((p >> 11) ) * bs;
+ rgba[i][aDst] = 1.0F;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ if (!intFormat) {
+ rs = gs = bs = as = 1.0F / 15.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p >> 12) ) * rs;
+ rgba[i][gDst] = ((p >> 8) & 0xf) * gs;
+ rgba[i][bDst] = ((p >> 4) & 0xf) * bs;
+ rgba[i][aDst] = ((p ) & 0xf) * as;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p >> 12) ) * rs;
+ rgba[i][gDst] = ((p >> 8) & 0xf) * gs;
+ rgba[i][bDst] = ((p >> 4) & 0xf) * bs;
+ rgba[i][aDst] = ((p ) & 0xf) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ if (!intFormat) {
+ rs = gs = bs = as = 1.0F / 15.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p ) & 0xf) * rs;
+ rgba[i][gDst] = ((p >> 4) & 0xf) * gs;
+ rgba[i][bDst] = ((p >> 8) & 0xf) * bs;
+ rgba[i][aDst] = ((p >> 12) ) * as;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p ) & 0xf) * rs;
+ rgba[i][gDst] = ((p >> 4) & 0xf) * gs;
+ rgba[i][bDst] = ((p >> 8) & 0xf) * bs;
+ rgba[i][aDst] = ((p >> 12) ) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ if (!intFormat) {
+ rs = gs = bs = 1.0F / 31.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p >> 11) ) * rs;
+ rgba[i][gDst] = ((p >> 6) & 0x1f) * gs;
+ rgba[i][bDst] = ((p >> 1) & 0x1f) * bs;
+ rgba[i][aDst] = ((p ) & 0x1) * as;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p >> 11) ) * rs;
+ rgba[i][gDst] = ((p >> 6) & 0x1f) * gs;
+ rgba[i][bDst] = ((p >> 1) & 0x1f) * bs;
+ rgba[i][aDst] = ((p ) & 0x1) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ if (!intFormat) {
+ rs = gs = bs = 1.0F / 31.0F;
+ }
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p ) & 0x1f) * rs;
+ rgba[i][gDst] = ((p >> 5) & 0x1f) * gs;
+ rgba[i][bDst] = ((p >> 10) & 0x1f) * bs;
+ rgba[i][aDst] = ((p >> 15) ) * as;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p ) & 0x1f) * rs;
+ rgba[i][gDst] = ((p >> 5) & 0x1f) * gs;
+ rgba[i][bDst] = ((p >> 10) & 0x1f) * bs;
+ rgba[i][aDst] = ((p >> 15) ) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = (GLfloat) ((p ) & 0xff);
+ rgba[i][gDst] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][bDst] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][aDst] = (GLfloat) ((p >> 24) );
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = UBYTE_TO_FLOAT((p ) & 0xff);
+ rgba[i][gDst] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][bDst] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][aDst] = UBYTE_TO_FLOAT((p >> 24) );
+ }
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = (GLfloat) ((p >> 24) );
+ rgba[i][gDst] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][bDst] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][aDst] = (GLfloat) ((p ) & 0xff);
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = UBYTE_TO_FLOAT((p >> 24) );
+ rgba[i][gDst] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][bDst] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][aDst] = UBYTE_TO_FLOAT((p ) & 0xff);
+ }
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = (GLfloat) ((p >> 24) );
+ rgba[i][gDst] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][bDst] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][aDst] = (GLfloat) ((p ) & 0xff);
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = UBYTE_TO_FLOAT((p >> 24) );
+ rgba[i][gDst] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][bDst] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][aDst] = UBYTE_TO_FLOAT((p ) & 0xff);
+ }
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ if (intFormat) {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = (GLfloat) ((p ) & 0xff);
+ rgba[i][gDst] = (GLfloat) ((p >> 8) & 0xff);
+ rgba[i][bDst] = (GLfloat) ((p >> 16) & 0xff);
+ rgba[i][aDst] = (GLfloat) ((p >> 24) );
+ }
+ }
+ else {
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = UBYTE_TO_FLOAT((p ) & 0xff);
+ rgba[i][gDst] = UBYTE_TO_FLOAT((p >> 8) & 0xff);
+ rgba[i][bDst] = UBYTE_TO_FLOAT((p >> 16) & 0xff);
+ rgba[i][aDst] = UBYTE_TO_FLOAT((p >> 24) );
+ }
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_10_10_10_2:
+ if (!intFormat) {
+ rs = 1.0F / 1023.0F;
+ gs = 1.0F / 1023.0F;
+ bs = 1.0F / 1023.0F;
+ as = 1.0F / 3.0F;
+ }
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ SWAP4BYTE(p);
+ rgba[i][rDst] = ((p >> 22) ) * rs;
+ rgba[i][gDst] = ((p >> 12) & 0x3ff) * gs;
+ rgba[i][bDst] = ((p >> 2) & 0x3ff) * bs;
+ rgba[i][aDst] = ((p ) & 0x3 ) * as;
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = ((p >> 22) ) * rs;
+ rgba[i][gDst] = ((p >> 12) & 0x3ff) * gs;
+ rgba[i][bDst] = ((p >> 2) & 0x3ff) * bs;
+ rgba[i][aDst] = ((p ) & 0x3 ) * as;
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ if (!intFormat) {
+ rs = 1.0F / 1023.0F;
+ gs = 1.0F / 1023.0F;
+ bs = 1.0F / 1023.0F;
+ as = 1.0F / 3.0F;
+ }
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ SWAP4BYTE(p);
+ rgba[i][rDst] = ((p ) & 0x3ff) * rs;
+ rgba[i][gDst] = ((p >> 10) & 0x3ff) * gs;
+ rgba[i][bDst] = ((p >> 20) & 0x3ff) * bs;
+ rgba[i][aDst] = ((p >> 30) ) * as;
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = ((p ) & 0x3ff) * rs;
+ rgba[i][gDst] = ((p >> 10) & 0x3ff) * gs;
+ rgba[i][bDst] = ((p >> 20) & 0x3ff) * bs;
+ rgba[i][aDst] = ((p >> 30) ) * as;
+ }
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "bad srcType in extract float data");
+ break;
+ }
+#undef PROCESS
+}
+
+
+static INLINE GLuint
+clamp_byte_to_uint(GLbyte b)
+{
+ return b < 0 ? 0 : b;
+}
+
+
+static INLINE GLuint
+clamp_short_to_uint(GLshort s)
+{
+ return s < 0 ? 0 : s;
+}
+
+
+static INLINE GLuint
+clamp_int_to_uint(GLint i)
+{
+ return i < 0 ? 0 : i;
+}
+
+
+static INLINE GLuint
+clamp_float_to_uint(GLfloat f)
+{
+ return f < 0.0F ? 0 : IROUND(f);
+}
+
+
+static INLINE GLuint
+clamp_half_to_uint(GLhalfARB h)
+{
+ GLfloat f = _mesa_half_to_float(h);
+ return f < 0.0F ? 0 : IROUND(f);
+}
+
+
+/**
+ * \sa extract_float_rgba()
+ */
+static void
+extract_uint_rgba(GLuint n, GLuint rgba[][4],
+ GLenum srcFormat, GLenum srcType, const GLvoid *src,
+ GLboolean swapBytes)
+{
+ GLint rSrc, gSrc, bSrc, aSrc;
+ GLint stride;
+ GLint rDst, bDst, gDst, aDst;
+ GLboolean intFormat;
+
+ ASSERT(srcFormat == GL_RED ||
+ srcFormat == GL_GREEN ||
+ srcFormat == GL_BLUE ||
+ srcFormat == GL_ALPHA ||
+ srcFormat == GL_LUMINANCE ||
+ srcFormat == GL_LUMINANCE_ALPHA ||
+ srcFormat == GL_INTENSITY ||
+ srcFormat == GL_RG ||
+ srcFormat == GL_RGB ||
+ srcFormat == GL_BGR ||
+ srcFormat == GL_RGBA ||
+ srcFormat == GL_BGRA ||
+ srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_DU8DV8_ATI ||
+ srcFormat == GL_DUDV_ATI ||
+ srcFormat == GL_RED_INTEGER_EXT ||
+ srcFormat == GL_GREEN_INTEGER_EXT ||
+ srcFormat == GL_BLUE_INTEGER_EXT ||
+ srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RGB_INTEGER_EXT ||
+ srcFormat == GL_RGBA_INTEGER_EXT ||
+ srcFormat == GL_BGR_INTEGER_EXT ||
+ srcFormat == GL_BGRA_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT);
+
+ ASSERT(srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT ||
+ srcType == GL_UNSIGNED_BYTE_3_3_2 ||
+ srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5 ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
+ srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
+ srcType == GL_UNSIGNED_INT_10_10_10_2 ||
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
+
+ get_component_mapping(srcFormat,
+ &rSrc, &gSrc, &bSrc, &aSrc,
+ &rDst, &gDst, &bDst, &aDst);
+
+ stride = _mesa_components_in_format(srcFormat);
+
+ intFormat = _mesa_is_integer_format(srcFormat);
+
+#define PROCESS(SRC_INDEX, DST_INDEX, DEFAULT, TYPE, CONVERSION) \
+ if ((SRC_INDEX) < 0) { \
+ GLuint i; \
+ for (i = 0; i < n; i++) { \
+ rgba[i][DST_INDEX] = DEFAULT; \
+ } \
+ } \
+ else if (swapBytes) { \
+ const TYPE *s = (const TYPE *) src; \
+ GLuint i; \
+ for (i = 0; i < n; i++) { \
+ TYPE value = s[SRC_INDEX]; \
+ if (sizeof(TYPE) == 2) { \
+ SWAP2BYTE(value); \
+ } \
+ else if (sizeof(TYPE) == 4) { \
+ SWAP4BYTE(value); \
+ } \
+ rgba[i][DST_INDEX] = CONVERSION(value); \
+ s += stride; \
+ } \
+ } \
+ else { \
+ const TYPE *s = (const TYPE *) src; \
+ GLuint i; \
+ for (i = 0; i < n; i++) { \
+ rgba[i][DST_INDEX] = CONVERSION(s[SRC_INDEX]); \
+ s += stride; \
+ } \
+ }
+
+ switch (srcType) {
+ case GL_UNSIGNED_BYTE:
+ PROCESS(rSrc, RCOMP, 0, GLubyte, (GLuint));
+ PROCESS(gSrc, GCOMP, 0, GLubyte, (GLuint));
+ PROCESS(bSrc, BCOMP, 0, GLubyte, (GLuint));
+ PROCESS(aSrc, ACOMP, 1, GLubyte, (GLuint));
+ break;
+ case GL_BYTE:
+ PROCESS(rSrc, RCOMP, 0, GLbyte, clamp_byte_to_uint);
+ PROCESS(gSrc, GCOMP, 0, GLbyte, clamp_byte_to_uint);
+ PROCESS(bSrc, BCOMP, 0, GLbyte, clamp_byte_to_uint);
+ PROCESS(aSrc, ACOMP, 1, GLbyte, clamp_byte_to_uint);
+ break;
+ case GL_UNSIGNED_SHORT:
+ PROCESS(rSrc, RCOMP, 0, GLushort, (GLuint));
+ PROCESS(gSrc, GCOMP, 0, GLushort, (GLuint));
+ PROCESS(bSrc, BCOMP, 0, GLushort, (GLuint));
+ PROCESS(aSrc, ACOMP, 1, GLushort, (GLuint));
+ break;
+ case GL_SHORT:
+ PROCESS(rSrc, RCOMP, 0, GLshort, clamp_short_to_uint);
+ PROCESS(gSrc, GCOMP, 0, GLshort, clamp_short_to_uint);
+ PROCESS(bSrc, BCOMP, 0, GLshort, clamp_short_to_uint);
+ PROCESS(aSrc, ACOMP, 1, GLshort, clamp_short_to_uint);
+ break;
+ case GL_UNSIGNED_INT:
+ PROCESS(rSrc, RCOMP, 0, GLuint, (GLuint));
+ PROCESS(gSrc, GCOMP, 0, GLuint, (GLuint));
+ PROCESS(bSrc, BCOMP, 0, GLuint, (GLuint));
+ PROCESS(aSrc, ACOMP, 1, GLuint, (GLuint));
+ break;
+ case GL_INT:
+ PROCESS(rSrc, RCOMP, 0, GLint, clamp_int_to_uint);
+ PROCESS(gSrc, GCOMP, 0, GLint, clamp_int_to_uint);
+ PROCESS(bSrc, BCOMP, 0, GLint, clamp_int_to_uint);
+ PROCESS(aSrc, ACOMP, 1, GLint, clamp_int_to_uint);
+ break;
+ case GL_FLOAT:
+ PROCESS(rSrc, RCOMP, 0, GLfloat, clamp_float_to_uint);
+ PROCESS(gSrc, GCOMP, 0, GLfloat, clamp_float_to_uint);
+ PROCESS(bSrc, BCOMP, 0, GLfloat, clamp_float_to_uint);
+ PROCESS(aSrc, ACOMP, 1, GLfloat, clamp_float_to_uint);
+ break;
+ case GL_HALF_FLOAT_ARB:
+ PROCESS(rSrc, RCOMP, 0, GLhalfARB, clamp_half_to_uint);
+ PROCESS(gSrc, GCOMP, 0, GLhalfARB, clamp_half_to_uint);
+ PROCESS(bSrc, BCOMP, 0, GLhalfARB, clamp_half_to_uint);
+ PROCESS(aSrc, ACOMP, 1, GLhalfARB, clamp_half_to_uint);
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ {
+ const GLubyte *ubsrc = (const GLubyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLubyte p = ubsrc[i];
+ rgba[i][rDst] = ((p >> 5) );
+ rgba[i][gDst] = ((p >> 2) & 0x7);
+ rgba[i][bDst] = ((p ) & 0x3);
+ rgba[i][aDst] = 1;
+ }
+ }
+ break;
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ {
+ const GLubyte *ubsrc = (const GLubyte *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLubyte p = ubsrc[i];
+ rgba[i][rDst] = ((p ) & 0x7);
+ rgba[i][gDst] = ((p >> 3) & 0x7);
+ rgba[i][bDst] = ((p >> 6) );
+ rgba[i][aDst] = 1;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p >> 11) );
+ rgba[i][gDst] = ((p >> 5) & 0x3f);
+ rgba[i][bDst] = ((p ) & 0x1f);
+ rgba[i][aDst] = 1;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p >> 11) );
+ rgba[i][gDst] = ((p >> 5) & 0x3f);
+ rgba[i][bDst] = ((p ) & 0x1f);
+ rgba[i][aDst] = 1;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p ) & 0x1f);
+ rgba[i][gDst] = ((p >> 5) & 0x3f);
+ rgba[i][bDst] = ((p >> 11) );
+ rgba[i][aDst] = 1;
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p ) & 0x1f);
+ rgba[i][gDst] = ((p >> 5) & 0x3f);
+ rgba[i][bDst] = ((p >> 11) );
+ rgba[i][aDst] = 1;
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p >> 12) );
+ rgba[i][gDst] = ((p >> 8) & 0xf);
+ rgba[i][bDst] = ((p >> 4) & 0xf);
+ rgba[i][aDst] = ((p ) & 0xf);
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p >> 12) );
+ rgba[i][gDst] = ((p >> 8) & 0xf);
+ rgba[i][bDst] = ((p >> 4) & 0xf);
+ rgba[i][aDst] = ((p ) & 0xf);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p ) & 0xf);
+ rgba[i][gDst] = ((p >> 4) & 0xf);
+ rgba[i][bDst] = ((p >> 8) & 0xf);
+ rgba[i][aDst] = ((p >> 12) );
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p ) & 0xf);
+ rgba[i][gDst] = ((p >> 4) & 0xf);
+ rgba[i][bDst] = ((p >> 8) & 0xf);
+ rgba[i][aDst] = ((p >> 12) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p >> 11) );
+ rgba[i][gDst] = ((p >> 6) & 0x1f);
+ rgba[i][bDst] = ((p >> 1) & 0x1f);
+ rgba[i][aDst] = ((p ) & 0x1 );
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p >> 11) );
+ rgba[i][gDst] = ((p >> 6) & 0x1f);
+ rgba[i][bDst] = ((p >> 1) & 0x1f);
+ rgba[i][aDst] = ((p ) & 0x1 );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ if (swapBytes) {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ SWAP2BYTE(p);
+ rgba[i][rDst] = ((p ) & 0x1f);
+ rgba[i][gDst] = ((p >> 5) & 0x1f);
+ rgba[i][bDst] = ((p >> 10) & 0x1f);
+ rgba[i][aDst] = ((p >> 15) );
+ }
+ }
+ else {
+ const GLushort *ussrc = (const GLushort *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLushort p = ussrc[i];
+ rgba[i][rDst] = ((p ) & 0x1f);
+ rgba[i][gDst] = ((p >> 5) & 0x1f);
+ rgba[i][bDst] = ((p >> 10) & 0x1f);
+ rgba[i][aDst] = ((p >> 15) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = ((p ) & 0xff);
+ rgba[i][gDst] = ((p >> 8) & 0xff);
+ rgba[i][bDst] = ((p >> 16) & 0xff);
+ rgba[i][aDst] = ((p >> 24) );
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = ((p >> 24) );
+ rgba[i][gDst] = ((p >> 16) & 0xff);
+ rgba[i][bDst] = ((p >> 8) & 0xff);
+ rgba[i][aDst] = ((p ) & 0xff);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = ((p >> 24) );
+ rgba[i][gDst] = ((p >> 16) & 0xff);
+ rgba[i][bDst] = ((p >> 8) & 0xff);
+ rgba[i][aDst] = ((p ) & 0xff);
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = ((p ) & 0xff);
+ rgba[i][gDst] = ((p >> 8) & 0xff);
+ rgba[i][bDst] = ((p >> 16) & 0xff);
+ rgba[i][aDst] = ((p >> 24) );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_10_10_10_2:
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ SWAP4BYTE(p);
+ rgba[i][rDst] = ((p >> 22) );
+ rgba[i][gDst] = ((p >> 12) & 0x3ff);
+ rgba[i][bDst] = ((p >> 2) & 0x3ff);
+ rgba[i][aDst] = ((p ) & 0x3 );
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = ((p >> 22) );
+ rgba[i][gDst] = ((p >> 12) & 0x3ff);
+ rgba[i][bDst] = ((p >> 2) & 0x3ff);
+ rgba[i][aDst] = ((p ) & 0x3 );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ if (swapBytes) {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ SWAP4BYTE(p);
+ rgba[i][rDst] = ((p ) & 0x3ff);
+ rgba[i][gDst] = ((p >> 10) & 0x3ff);
+ rgba[i][bDst] = ((p >> 20) & 0x3ff);
+ rgba[i][aDst] = ((p >> 30) );
+ }
+ }
+ else {
+ const GLuint *uisrc = (const GLuint *) src;
+ GLuint i;
+ for (i = 0; i < n; i ++) {
+ GLuint p = uisrc[i];
+ rgba[i][rDst] = ((p ) & 0x3ff);
+ rgba[i][gDst] = ((p >> 10) & 0x3ff);
+ rgba[i][bDst] = ((p >> 20) & 0x3ff);
+ rgba[i][aDst] = ((p >> 30) );
+ }
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "bad srcType in extract uint data");
+ break;
+ }
+#undef PROCESS
+}
+
+
+
+/*
+ * Unpack a row of color image data from a client buffer according to
+ * the pixel unpacking parameters.
+ * Return GLchan values in the specified dest image format.
+ * This is used by glDrawPixels and glTexImage?D().
+ * \param ctx - the context
+ * n - number of pixels in the span
+ * dstFormat - format of destination color array
+ * dest - the destination color array
+ * srcFormat - source image format
+ * srcType - source image data type
+ * source - source image pointer
+ * srcPacking - pixel unpacking parameters
+ * transferOps - bitmask of IMAGE_*_BIT values of operations to apply
+ *
+ * XXX perhaps expand this to process whole images someday.
+ */
+void
+_mesa_unpack_color_span_chan( struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLchan dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(dstFormat == GL_ALPHA ||
+ dstFormat == GL_LUMINANCE ||
+ dstFormat == GL_LUMINANCE_ALPHA ||
+ dstFormat == GL_INTENSITY ||
+ dstFormat == GL_RED ||
+ dstFormat == GL_RG ||
+ dstFormat == GL_RGB ||
+ dstFormat == GL_RGBA ||
+ dstFormat == GL_COLOR_INDEX);
+
+ ASSERT(srcFormat == GL_RED ||
+ srcFormat == GL_GREEN ||
+ srcFormat == GL_BLUE ||
+ srcFormat == GL_ALPHA ||
+ srcFormat == GL_LUMINANCE ||
+ srcFormat == GL_LUMINANCE_ALPHA ||
+ srcFormat == GL_INTENSITY ||
+ srcFormat == GL_RG ||
+ srcFormat == GL_RGB ||
+ srcFormat == GL_BGR ||
+ srcFormat == GL_RGBA ||
+ srcFormat == GL_BGRA ||
+ srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_COLOR_INDEX);
+
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT ||
+ srcType == GL_UNSIGNED_BYTE_3_3_2 ||
+ srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5 ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
+ srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
+ srcType == GL_UNSIGNED_INT_10_10_10_2 ||
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
+
+ /* Try simple cases first */
+ if (transferOps == 0) {
+ if (srcType == CHAN_TYPE) {
+ if (dstFormat == GL_RGBA) {
+ if (srcFormat == GL_RGBA) {
+ memcpy( dest, source, n * 4 * sizeof(GLchan) );
+ return;
+ }
+ else if (srcFormat == GL_RGB) {
+ GLuint i;
+ const GLchan *src = (const GLchan *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ dst[3] = CHAN_MAX;
+ src += 3;
+ dst += 4;
+ }
+ return;
+ }
+ }
+ else if (dstFormat == GL_RGB) {
+ if (srcFormat == GL_RGB) {
+ memcpy( dest, source, n * 3 * sizeof(GLchan) );
+ return;
+ }
+ else if (srcFormat == GL_RGBA) {
+ GLuint i;
+ const GLchan *src = (const GLchan *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ src += 4;
+ dst += 3;
+ }
+ return;
+ }
+ }
+ else if (dstFormat == srcFormat) {
+ GLint comps = _mesa_components_in_format(srcFormat);
+ assert(comps > 0);
+ memcpy( dest, source, n * comps * sizeof(GLchan) );
+ return;
+ }
+ }
+ /*
+ * Common situation, loading 8bit RGBA/RGB source images
+ * into 16/32 bit destination. (OSMesa16/32)
+ */
+ else if (srcType == GL_UNSIGNED_BYTE) {
+ if (dstFormat == GL_RGBA) {
+ if (srcFormat == GL_RGB) {
+ GLuint i;
+ const GLubyte *src = (const GLubyte *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = UBYTE_TO_CHAN(src[0]);
+ dst[1] = UBYTE_TO_CHAN(src[1]);
+ dst[2] = UBYTE_TO_CHAN(src[2]);
+ dst[3] = CHAN_MAX;
+ src += 3;
+ dst += 4;
+ }
+ return;
+ }
+ else if (srcFormat == GL_RGBA) {
+ GLuint i;
+ const GLubyte *src = (const GLubyte *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = UBYTE_TO_CHAN(src[0]);
+ dst[1] = UBYTE_TO_CHAN(src[1]);
+ dst[2] = UBYTE_TO_CHAN(src[2]);
+ dst[3] = UBYTE_TO_CHAN(src[3]);
+ src += 4;
+ dst += 4;
+ }
+ return;
+ }
+ }
+ else if (dstFormat == GL_RGB) {
+ if (srcFormat == GL_RGB) {
+ GLuint i;
+ const GLubyte *src = (const GLubyte *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = UBYTE_TO_CHAN(src[0]);
+ dst[1] = UBYTE_TO_CHAN(src[1]);
+ dst[2] = UBYTE_TO_CHAN(src[2]);
+ src += 3;
+ dst += 3;
+ }
+ return;
+ }
+ else if (srcFormat == GL_RGBA) {
+ GLuint i;
+ const GLubyte *src = (const GLubyte *) source;
+ GLchan *dst = dest;
+ for (i = 0; i < n; i++) {
+ dst[0] = UBYTE_TO_CHAN(src[0]);
+ dst[1] = UBYTE_TO_CHAN(src[1]);
+ dst[2] = UBYTE_TO_CHAN(src[2]);
+ src += 4;
+ dst += 3;
+ }
+ return;
+ }
+ }
+ }
+ }
+
+
+ /* general solution begins here */
+ {
+ GLint dstComponents;
+ GLint rDst, gDst, bDst, aDst, lDst, iDst;
+ GLfloat rgba[MAX_WIDTH][4];
+
+ dstComponents = _mesa_components_in_format( dstFormat );
+ /* source & dest image formats should have been error checked by now */
+ assert(dstComponents > 0);
+
+ /*
+ * Extract image data and convert to RGBA floats
+ */
+ assert(n <= MAX_WIDTH);
+ if (srcFormat == GL_COLOR_INDEX) {
+ GLuint indexes[MAX_WIDTH];
+ extract_uint_indexes(n, indexes, srcFormat, srcType, source,
+ srcPacking);
+
+ if (dstFormat == GL_COLOR_INDEX) {
+ GLuint i;
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+ /* convert to GLchan and return */
+ for (i = 0; i < n; i++) {
+ dest[i] = (GLchan) (indexes[i] & 0xff);
+ }
+ return;
+ }
+ else {
+ /* Convert indexes to RGBA */
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+ _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
+ }
+
+ /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
+ * with color indexes.
+ */
+ transferOps &= ~(IMAGE_SCALE_BIAS_BIT | IMAGE_MAP_COLOR_BIT);
+ }
+ else {
+ /* non-color index data */
+ extract_float_rgba(n, rgba, srcFormat, srcType, source,
+ srcPacking->SwapBytes);
+ }
+
+ /* Need to clamp if returning GLubytes or GLushorts */
+#if CHAN_TYPE != GL_FLOAT
+ transferOps |= IMAGE_CLAMP_BIT;
+#endif
+
+ if (transferOps) {
+ _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
+ }
+
+ get_component_indexes(dstFormat,
+ &rDst, &gDst, &bDst, &aDst, &lDst, &iDst);
+
+ /* Now return the GLchan data in the requested dstFormat */
+ if (rDst >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_CHAN(dst[rDst], rgba[i][RCOMP]);
+ dst += dstComponents;
+ }
+ }
+
+ if (gDst >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_CHAN(dst[gDst], rgba[i][GCOMP]);
+ dst += dstComponents;
+ }
+ }
+
+ if (bDst >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_CHAN(dst[bDst], rgba[i][BCOMP]);
+ dst += dstComponents;
+ }
+ }
+
+ if (aDst >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_CHAN(dst[aDst], rgba[i][ACOMP]);
+ dst += dstComponents;
+ }
+ }
+
+ if (iDst >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ assert(iDst == 0);
+ assert(dstComponents == 1);
+ for (i = 0; i < n; i++) {
+ /* Intensity comes from red channel */
+ CLAMPED_FLOAT_TO_CHAN(dst[i], rgba[i][RCOMP]);
+ }
+ }
+
+ if (lDst >= 0) {
+ GLchan *dst = dest;
+ GLuint i;
+ assert(lDst == 0);
+ for (i = 0; i < n; i++) {
+ /* Luminance comes from red channel */
+ CLAMPED_FLOAT_TO_CHAN(dst[0], rgba[i][RCOMP]);
+ dst += dstComponents;
+ }
+ }
+ }
+}
+
+
+/**
+ * Same as _mesa_unpack_color_span_chan(), but return GLfloat data
+ * instead of GLchan.
+ */
+void
+_mesa_unpack_color_span_float( struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLfloat dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(dstFormat == GL_ALPHA ||
+ dstFormat == GL_LUMINANCE ||
+ dstFormat == GL_LUMINANCE_ALPHA ||
+ dstFormat == GL_INTENSITY ||
+ dstFormat == GL_RED ||
+ dstFormat == GL_RG ||
+ dstFormat == GL_RGB ||
+ dstFormat == GL_RGBA ||
+ dstFormat == GL_COLOR_INDEX);
+
+ ASSERT(srcFormat == GL_RED ||
+ srcFormat == GL_GREEN ||
+ srcFormat == GL_BLUE ||
+ srcFormat == GL_ALPHA ||
+ srcFormat == GL_LUMINANCE ||
+ srcFormat == GL_LUMINANCE_ALPHA ||
+ srcFormat == GL_INTENSITY ||
+ srcFormat == GL_RG ||
+ srcFormat == GL_RGB ||
+ srcFormat == GL_BGR ||
+ srcFormat == GL_RGBA ||
+ srcFormat == GL_BGRA ||
+ srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_RED_INTEGER_EXT ||
+ srcFormat == GL_GREEN_INTEGER_EXT ||
+ srcFormat == GL_BLUE_INTEGER_EXT ||
+ srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RGB_INTEGER_EXT ||
+ srcFormat == GL_RGBA_INTEGER_EXT ||
+ srcFormat == GL_BGR_INTEGER_EXT ||
+ srcFormat == GL_BGRA_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_COLOR_INDEX);
+
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT ||
+ srcType == GL_UNSIGNED_BYTE_3_3_2 ||
+ srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5 ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
+ srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
+ srcType == GL_UNSIGNED_INT_10_10_10_2 ||
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
+
+ /* general solution, no special cases, yet */
+ {
+ GLint dstComponents;
+ GLint rDst, gDst, bDst, aDst, lDst, iDst;
+ GLfloat rgba[MAX_WIDTH][4];
+
+ dstComponents = _mesa_components_in_format( dstFormat );
+ /* source & dest image formats should have been error checked by now */
+ assert(dstComponents > 0);
+
+ /*
+ * Extract image data and convert to RGBA floats
+ */
+ assert(n <= MAX_WIDTH);
+ if (srcFormat == GL_COLOR_INDEX) {
+ GLuint indexes[MAX_WIDTH];
+ extract_uint_indexes(n, indexes, srcFormat, srcType, source,
+ srcPacking);
+
+ if (dstFormat == GL_COLOR_INDEX) {
+ GLuint i;
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+ /* convert to GLchan and return */
+ for (i = 0; i < n; i++) {
+ dest[i] = (GLchan) (indexes[i] & 0xff);
+ }
+ return;
+ }
+ else {
+ /* Convert indexes to RGBA */
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+ _mesa_map_ci_to_rgba(ctx, n, indexes, rgba);
+ }
+
+ /* Don't do RGBA scale/bias or RGBA->RGBA mapping if starting
+ * with color indexes.
+ */
+ transferOps &= ~(IMAGE_SCALE_BIAS_BIT | IMAGE_MAP_COLOR_BIT);
+ }
+ else {
+ /* non-color index data */
+ extract_float_rgba(n, rgba, srcFormat, srcType, source,
+ srcPacking->SwapBytes);
+ }
+
+ if (transferOps) {
+ _mesa_apply_rgba_transfer_ops(ctx, transferOps, n, rgba);
+ }
+
+ get_component_indexes(dstFormat,
+ &rDst, &gDst, &bDst, &aDst, &lDst, &iDst);
+
+ /* Now pack results in the requested dstFormat */
+ if (rDst >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[rDst] = rgba[i][RCOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (gDst >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[gDst] = rgba[i][GCOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (bDst >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[bDst] = rgba[i][BCOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (aDst >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[aDst] = rgba[i][ACOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (iDst >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ assert(iDst == 0);
+ assert(dstComponents == 1);
+ for (i = 0; i < n; i++) {
+ /* Intensity comes from red channel */
+ dst[i] = rgba[i][RCOMP];
+ }
+ }
+
+ if (lDst >= 0) {
+ GLfloat *dst = dest;
+ GLuint i;
+ assert(lDst == 0);
+ for (i = 0; i < n; i++) {
+ /* Luminance comes from red channel */
+ dst[0] = rgba[i][RCOMP];
+ dst += dstComponents;
+ }
+ }
+ }
+}
+
+
+/**
+ * Same as _mesa_unpack_color_span_chan(), but return GLuint data
+ * instead of GLchan.
+ * No pixel transfer ops are applied.
+ */
+void
+_mesa_unpack_color_span_uint(struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLuint *dest,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking)
+{
+ GLuint rgba[MAX_WIDTH][4];
+
+ ASSERT(n <= MAX_WIDTH);
+
+ ASSERT(dstFormat == GL_ALPHA ||
+ dstFormat == GL_LUMINANCE ||
+ dstFormat == GL_LUMINANCE_ALPHA ||
+ dstFormat == GL_INTENSITY ||
+ dstFormat == GL_RED ||
+ dstFormat == GL_RG ||
+ dstFormat == GL_RGB ||
+ dstFormat == GL_RGBA);
+
+ ASSERT(srcFormat == GL_RED ||
+ srcFormat == GL_GREEN ||
+ srcFormat == GL_BLUE ||
+ srcFormat == GL_ALPHA ||
+ srcFormat == GL_LUMINANCE ||
+ srcFormat == GL_LUMINANCE_ALPHA ||
+ srcFormat == GL_INTENSITY ||
+ srcFormat == GL_RG ||
+ srcFormat == GL_RGB ||
+ srcFormat == GL_BGR ||
+ srcFormat == GL_RGBA ||
+ srcFormat == GL_BGRA ||
+ srcFormat == GL_ABGR_EXT ||
+ srcFormat == GL_RED_INTEGER_EXT ||
+ srcFormat == GL_GREEN_INTEGER_EXT ||
+ srcFormat == GL_BLUE_INTEGER_EXT ||
+ srcFormat == GL_ALPHA_INTEGER_EXT ||
+ srcFormat == GL_RGB_INTEGER_EXT ||
+ srcFormat == GL_RGBA_INTEGER_EXT ||
+ srcFormat == GL_BGR_INTEGER_EXT ||
+ srcFormat == GL_BGRA_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_INTEGER_EXT ||
+ srcFormat == GL_LUMINANCE_ALPHA_INTEGER_EXT);
+
+ ASSERT(srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT ||
+ srcType == GL_UNSIGNED_BYTE_3_3_2 ||
+ srcType == GL_UNSIGNED_BYTE_2_3_3_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5 ||
+ srcType == GL_UNSIGNED_SHORT_5_6_5_REV ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4 ||
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV ||
+ srcType == GL_UNSIGNED_SHORT_5_5_5_1 ||
+ srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV ||
+ srcType == GL_UNSIGNED_INT_10_10_10_2 ||
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV);
+
+
+ /* Extract image data as uint[4] pixels */
+ extract_uint_rgba(n, rgba, srcFormat, srcType, source,
+ srcPacking->SwapBytes);
+
+ if (dstFormat == GL_RGBA) {
+ /* simple case */
+ memcpy(dest, rgba, 4 * sizeof(GLuint) * n);
+ }
+ else {
+ /* general case */
+ GLint rDst, gDst, bDst, aDst, lDst, iDst;
+ GLint dstComponents = _mesa_components_in_format( dstFormat );
+
+ assert(dstComponents > 0);
+
+ get_component_indexes(dstFormat,
+ &rDst, &gDst, &bDst, &aDst, &lDst, &iDst);
+
+ /* Now pack values in the requested dest format */
+ if (rDst >= 0) {
+ GLuint *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[rDst] = rgba[i][RCOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (gDst >= 0) {
+ GLuint *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[gDst] = rgba[i][GCOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (bDst >= 0) {
+ GLuint *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[bDst] = rgba[i][BCOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (aDst >= 0) {
+ GLuint *dst = dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[aDst] = rgba[i][ACOMP];
+ dst += dstComponents;
+ }
+ }
+
+ if (iDst >= 0) {
+ GLuint *dst = dest;
+ GLuint i;
+ assert(iDst == 0);
+ assert(dstComponents == 1);
+ for (i = 0; i < n; i++) {
+ /* Intensity comes from red channel */
+ dst[i] = rgba[i][RCOMP];
+ }
+ }
+
+ if (lDst >= 0) {
+ GLuint *dst = dest;
+ GLuint i;
+ assert(lDst == 0);
+ for (i = 0; i < n; i++) {
+ /* Luminance comes from red channel */
+ dst[0] = rgba[i][RCOMP];
+ dst += dstComponents;
+ }
+ }
+ }
+}
+
+
+
+/**
+ * Similar to _mesa_unpack_color_span_float(), but for dudv data instead of rgba,
+ * directly return GLbyte data, no transfer ops apply.
+ */
+void
+_mesa_unpack_dudv_span_byte( struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLbyte dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(dstFormat == GL_DUDV_ATI);
+ ASSERT(srcFormat == GL_DUDV_ATI);
+
+ ASSERT(srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT);
+
+ /* general solution */
+ {
+ GLint dstComponents;
+ GLfloat rgba[MAX_WIDTH][4];
+ GLbyte *dst = dest;
+ GLuint i;
+
+ dstComponents = _mesa_components_in_format( dstFormat );
+ /* source & dest image formats should have been error checked by now */
+ assert(dstComponents > 0);
+
+ /*
+ * Extract image data and convert to RGBA floats
+ */
+ assert(n <= MAX_WIDTH);
+ extract_float_rgba(n, rgba, srcFormat, srcType, source,
+ srcPacking->SwapBytes);
+
+
+ /* Now determine which color channels we need to produce.
+ * And determine the dest index (offset) within each color tuple.
+ */
+
+ /* Now pack results in the requested dstFormat */
+ for (i = 0; i < n; i++) {
+ /* not sure - need clamp[-1,1] here? */
+ dst[0] = FLOAT_TO_BYTE(rgba[i][RCOMP]);
+ dst[1] = FLOAT_TO_BYTE(rgba[i][GCOMP]);
+ dst += dstComponents;
+ }
+ }
+}
+
+/*
+ * Unpack a row of color index data from a client buffer according to
+ * the pixel unpacking parameters.
+ * This is (or will be) used by glDrawPixels, glTexImage[123]D, etc.
+ *
+ * Args: ctx - the context
+ * n - number of pixels
+ * dstType - destination data type
+ * dest - destination array
+ * srcType - source pixel type
+ * source - source data pointer
+ * srcPacking - pixel unpacking parameters
+ * transferOps - the pixel transfer operations to apply
+ */
+void
+_mesa_unpack_index_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT);
+
+ ASSERT(dstType == GL_UNSIGNED_BYTE ||
+ dstType == GL_UNSIGNED_SHORT ||
+ dstType == GL_UNSIGNED_INT);
+
+
+ transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT);
+
+ /*
+ * Try simple cases first
+ */
+ if (transferOps == 0 && srcType == GL_UNSIGNED_BYTE
+ && dstType == GL_UNSIGNED_BYTE) {
+ memcpy(dest, source, n * sizeof(GLubyte));
+ }
+ else if (transferOps == 0 && srcType == GL_UNSIGNED_INT
+ && dstType == GL_UNSIGNED_INT && !srcPacking->SwapBytes) {
+ memcpy(dest, source, n * sizeof(GLuint));
+ }
+ else {
+ /*
+ * general solution
+ */
+ GLuint indexes[MAX_WIDTH];
+ assert(n <= MAX_WIDTH);
+
+ extract_uint_indexes(n, indexes, GL_COLOR_INDEX, srcType, source,
+ srcPacking);
+
+ if (transferOps)
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+
+ /* convert to dest type */
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLubyte) (indexes[i] & 0xff);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLushort) (indexes[i] & 0xffff);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ memcpy(dest, indexes, n * sizeof(GLuint));
+ break;
+ default:
+ _mesa_problem(ctx, "bad dstType in _mesa_unpack_index_span");
+ }
+ }
+}
+
+
+void
+_mesa_pack_index_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, const GLuint *source,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps )
+{
+ GLuint indexes[MAX_WIDTH];
+
+ ASSERT(n <= MAX_WIDTH);
+
+ transferOps &= (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT);
+
+ if (transferOps & (IMAGE_MAP_COLOR_BIT | IMAGE_SHIFT_OFFSET_BIT)) {
+ /* make a copy of input */
+ memcpy(indexes, source, n * sizeof(GLuint));
+ _mesa_apply_ci_transfer_ops(ctx, transferOps, n, indexes);
+ source = indexes;
+ }
+
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ *dst++ = (GLubyte) source[i];
+ }
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLbyte) source[i];
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLushort) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLshort) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLuint) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLint) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLfloat) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLhalfARB *dst = (GLhalfARB *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = _mesa_float_to_half((GLfloat) source[i]);
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
+ }
+}
+
+
+/*
+ * Unpack a row of stencil data from a client buffer according to
+ * the pixel unpacking parameters.
+ * This is (or will be) used by glDrawPixels
+ *
+ * Args: ctx - the context
+ * n - number of pixels
+ * dstType - destination data type
+ * dest - destination array
+ * srcType - source pixel type
+ * source - source data pointer
+ * srcPacking - pixel unpacking parameters
+ * transferOps - apply offset/bias/lookup ops?
+ */
+void
+_mesa_unpack_stencil_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps )
+{
+ ASSERT(srcType == GL_BITMAP ||
+ srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_BYTE ||
+ srcType == GL_UNSIGNED_SHORT ||
+ srcType == GL_SHORT ||
+ srcType == GL_UNSIGNED_INT ||
+ srcType == GL_INT ||
+ srcType == GL_UNSIGNED_INT_24_8_EXT ||
+ srcType == GL_HALF_FLOAT_ARB ||
+ srcType == GL_FLOAT);
+
+ ASSERT(dstType == GL_UNSIGNED_BYTE ||
+ dstType == GL_UNSIGNED_SHORT ||
+ dstType == GL_UNSIGNED_INT);
+
+ /* only shift and offset apply to stencil */
+ transferOps &= IMAGE_SHIFT_OFFSET_BIT;
+
+ /*
+ * Try simple cases first
+ */
+ if (transferOps == 0 &&
+ !ctx->Pixel.MapStencilFlag &&
+ srcType == GL_UNSIGNED_BYTE &&
+ dstType == GL_UNSIGNED_BYTE) {
+ memcpy(dest, source, n * sizeof(GLubyte));
+ }
+ else if (transferOps == 0 &&
+ !ctx->Pixel.MapStencilFlag &&
+ srcType == GL_UNSIGNED_INT &&
+ dstType == GL_UNSIGNED_INT &&
+ !srcPacking->SwapBytes) {
+ memcpy(dest, source, n * sizeof(GLuint));
+ }
+ else {
+ /*
+ * general solution
+ */
+ GLuint indexes[MAX_WIDTH];
+ assert(n <= MAX_WIDTH);
+
+ extract_uint_indexes(n, indexes, GL_STENCIL_INDEX, srcType, source,
+ srcPacking);
+
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ /* shift and offset indexes */
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+
+ if (ctx->Pixel.MapStencilFlag) {
+ /* Apply stencil lookup table */
+ const GLuint mask = ctx->PixelMaps.StoS.Size - 1;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ indexes[i] = (GLuint)ctx->PixelMaps.StoS.Map[ indexes[i] & mask ];
+ }
+ }
+
+ /* convert to dest type */
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLubyte) (indexes[i] & 0xff);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = (GLushort) (indexes[i] & 0xffff);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ memcpy(dest, indexes, n * sizeof(GLuint));
+ break;
+ default:
+ _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span");
+ }
+ }
+}
+
+
+void
+_mesa_pack_stencil_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, const GLstencil *source,
+ const struct gl_pixelstore_attrib *dstPacking )
+{
+ GLstencil stencil[MAX_WIDTH];
+
+ ASSERT(n <= MAX_WIDTH);
+
+ if (ctx->Pixel.IndexShift || ctx->Pixel.IndexOffset ||
+ ctx->Pixel.MapStencilFlag) {
+ /* make a copy of input */
+ memcpy(stencil, source, n * sizeof(GLstencil));
+ _mesa_apply_stencil_transfer_ops(ctx, n, stencil);
+ source = stencil;
+ }
+
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ if (sizeof(GLstencil) == 1) {
+ memcpy( dest, source, n );
+ }
+ else {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLubyte) source[i];
+ }
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLbyte) (source[i] & 0x7f);
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLushort) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLshort) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLuint) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLint) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = (GLfloat) source[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLhalfARB *dst = (GLhalfARB *) dest;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ dst[i] = _mesa_float_to_half( (float) source[i] );
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_BITMAP:
+ if (dstPacking->LsbFirst) {
+ GLubyte *dst = (GLubyte *) dest;
+ GLint shift = 0;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ if (shift == 0)
+ *dst = 0;
+ *dst |= ((source[i] != 0) << shift);
+ shift++;
+ if (shift == 8) {
+ shift = 0;
+ dst++;
+ }
+ }
+ }
+ else {
+ GLubyte *dst = (GLubyte *) dest;
+ GLint shift = 7;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ if (shift == 7)
+ *dst = 0;
+ *dst |= ((source[i] != 0) << shift);
+ shift--;
+ if (shift < 0) {
+ shift = 7;
+ dst++;
+ }
+ }
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad type in _mesa_pack_index_span");
+ }
+}
+
+#define DEPTH_VALUES(GLTYPE, GLTYPE2FLOAT) \
+ do { \
+ GLuint i; \
+ const GLTYPE *src = (const GLTYPE *)source; \
+ for (i = 0; i < n; i++) { \
+ GLTYPE value = src[i]; \
+ if (srcPacking->SwapBytes) { \
+ if (sizeof(GLTYPE) == 2) { \
+ SWAP2BYTE(value); \
+ } else if (sizeof(GLTYPE) == 4) { \
+ SWAP4BYTE(value); \
+ } \
+ } \
+ depthValues[i] = GLTYPE2FLOAT(value); \
+ } \
+ } while (0)
+
+
+/**
+ * Unpack a row of depth/z values from memory, returning GLushort, GLuint
+ * or GLfloat values.
+ * The glPixelTransfer (scale/bias) params will be applied.
+ *
+ * \param dstType one of GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, GL_FLOAT
+ * \param depthMax max value for returned GLushort or GLuint values
+ * (ignored for GLfloat).
+ */
+void
+_mesa_unpack_depth_span( const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, GLuint depthMax,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking )
+{
+ GLfloat depthTemp[MAX_WIDTH], *depthValues;
+ GLboolean needClamp = GL_FALSE;
+
+ /* Look for special cases first.
+ * Not only are these faster, they're less prone to numeric conversion
+ * problems. Otherwise, converting from an int type to a float then
+ * back to an int type can introduce errors that will show up as
+ * artifacts in things like depth peeling which uses glCopyTexImage.
+ */
+ if (ctx->Pixel.DepthScale == 1.0 && ctx->Pixel.DepthBias == 0.0) {
+ if (srcType == GL_UNSIGNED_INT && dstType == GL_UNSIGNED_SHORT) {
+ const GLuint *src = (const GLuint *) source;
+ GLushort *dst = (GLushort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = src[i] >> 16;
+ }
+ return;
+ }
+ if (srcType == GL_UNSIGNED_SHORT
+ && dstType == GL_UNSIGNED_INT
+ && depthMax == 0xffffffff) {
+ const GLushort *src = (const GLushort *) source;
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = src[i] | (src[i] << 16);
+ }
+ return;
+ }
+ if (srcType == GL_UNSIGNED_INT_24_8
+ && dstType == GL_UNSIGNED_INT
+ && depthMax == 0xffffff) {
+ const GLuint *src = (const GLuint *) source;
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = src[i] >> 8;
+ }
+ return;
+ }
+ /* XXX may want to add additional cases here someday */
+ }
+
+ /* general case path follows */
+
+ if (dstType == GL_FLOAT) {
+ depthValues = (GLfloat *) dest;
+ }
+ else {
+ depthValues = depthTemp;
+ }
+
+ /* Convert incoming values to GLfloat. Some conversions will require
+ * clamping, below.
+ */
+ switch (srcType) {
+ case GL_BYTE:
+ DEPTH_VALUES(GLbyte, BYTE_TO_FLOAT);
+ needClamp = GL_TRUE;
+ break;
+ case GL_UNSIGNED_BYTE:
+ DEPTH_VALUES(GLubyte, UBYTE_TO_FLOAT);
+ break;
+ case GL_SHORT:
+ DEPTH_VALUES(GLshort, SHORT_TO_FLOAT);
+ needClamp = GL_TRUE;
+ break;
+ case GL_UNSIGNED_SHORT:
+ DEPTH_VALUES(GLushort, USHORT_TO_FLOAT);
+ break;
+ case GL_INT:
+ DEPTH_VALUES(GLint, INT_TO_FLOAT);
+ needClamp = GL_TRUE;
+ break;
+ case GL_UNSIGNED_INT:
+ DEPTH_VALUES(GLuint, UINT_TO_FLOAT);
+ break;
+ case GL_UNSIGNED_INT_24_8_EXT: /* GL_EXT_packed_depth_stencil */
+ if (dstType == GL_UNSIGNED_INT_24_8_EXT &&
+ depthMax == 0xffffff &&
+ ctx->Pixel.DepthScale == 1.0 &&
+ ctx->Pixel.DepthBias == 0.0) {
+ const GLuint *src = (const GLuint *) source;
+ GLuint *zValues = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ GLuint value = src[i];
+ if (srcPacking->SwapBytes) {
+ SWAP4BYTE(value);
+ }
+ zValues[i] = value & 0xffffff00;
+ }
+ return;
+ }
+ else {
+ const GLuint *src = (const GLuint *) source;
+ const GLfloat scale = 1.0f / 0xffffff;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ GLuint value = src[i];
+ if (srcPacking->SwapBytes) {
+ SWAP4BYTE(value);
+ }
+ depthValues[i] = (value >> 8) * scale;
+ }
+ }
+ break;
+ case GL_FLOAT:
+ DEPTH_VALUES(GLfloat, 1*);
+ needClamp = GL_TRUE;
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLuint i;
+ const GLhalfARB *src = (const GLhalfARB *) source;
+ for (i = 0; i < n; i++) {
+ GLhalfARB value = src[i];
+ if (srcPacking->SwapBytes) {
+ SWAP2BYTE(value);
+ }
+ depthValues[i] = _mesa_half_to_float(value);
+ }
+ needClamp = GL_TRUE;
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "bad type in _mesa_unpack_depth_span()");
+ return;
+ }
+
+ /* apply depth scale and bias */
+ {
+ const GLfloat scale = ctx->Pixel.DepthScale;
+ const GLfloat bias = ctx->Pixel.DepthBias;
+ if (scale != 1.0 || bias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ depthValues[i] = depthValues[i] * scale + bias;
+ }
+ needClamp = GL_TRUE;
+ }
+ }
+
+ /* clamp to [0, 1] */
+ if (needClamp) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ depthValues[i] = (GLfloat)CLAMP(depthValues[i], 0.0, 1.0);
+ }
+ }
+
+ /*
+ * Convert values to dstType
+ */
+ if (dstType == GL_UNSIGNED_INT) {
+ GLuint *zValues = (GLuint *) dest;
+ GLuint i;
+ if (depthMax <= 0xffffff) {
+ /* no overflow worries */
+ for (i = 0; i < n; i++) {
+ zValues[i] = (GLuint) (depthValues[i] * (GLfloat) depthMax);
+ }
+ }
+ else {
+ /* need to use double precision to prevent overflow problems */
+ for (i = 0; i < n; i++) {
+ GLdouble z = depthValues[i] * (GLfloat) depthMax;
+ if (z >= (GLdouble) 0xffffffff)
+ zValues[i] = 0xffffffff;
+ else
+ zValues[i] = (GLuint) z;
+ }
+ }
+ }
+ else if (dstType == GL_UNSIGNED_SHORT) {
+ GLushort *zValues = (GLushort *) dest;
+ GLuint i;
+ ASSERT(depthMax <= 0xffff);
+ for (i = 0; i < n; i++) {
+ zValues[i] = (GLushort) (depthValues[i] * (GLfloat) depthMax);
+ }
+ }
+ else {
+ ASSERT(dstType == GL_FLOAT);
+ /*ASSERT(depthMax == 1.0F);*/
+ }
+}
+
+
+/*
+ * Pack an array of depth values. The values are floats in [0,1].
+ */
+void
+_mesa_pack_depth_span( const struct gl_context *ctx, GLuint n, GLvoid *dest,
+ GLenum dstType, const GLfloat *depthSpan,
+ const struct gl_pixelstore_attrib *dstPacking )
+{
+ GLfloat depthCopy[MAX_WIDTH];
+
+ ASSERT(n <= MAX_WIDTH);
+
+ if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) {
+ memcpy(depthCopy, depthSpan, n * sizeof(GLfloat));
+ _mesa_scale_and_bias_depth(ctx, n, depthCopy);
+ depthSpan = depthCopy;
+ }
+
+ switch (dstType) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_UBYTE( depthSpan[i] );
+ }
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_BYTE( depthSpan[i] );
+ }
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ CLAMPED_FLOAT_TO_USHORT(dst[i], depthSpan[i]);
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_SHORT( depthSpan[i] );
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_UINT( depthSpan[i] );
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = FLOAT_TO_INT( depthSpan[i] );
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = depthSpan[i];
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4( (GLuint *) dst, n );
+ }
+ }
+ break;
+ case GL_HALF_FLOAT_ARB:
+ {
+ GLhalfARB *dst = (GLhalfARB *) dest;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ dst[i] = _mesa_float_to_half(depthSpan[i]);
+ }
+ if (dstPacking->SwapBytes) {
+ _mesa_swap2( (GLushort *) dst, n );
+ }
+ }
+ break;
+ default:
+ _mesa_problem(ctx, "bad type in _mesa_pack_depth_span");
+ }
+}
+
+
+
+/**
+ * Pack depth and stencil values as GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8.
+ */
+void
+_mesa_pack_depth_stencil_span(const struct gl_context *ctx, GLuint n, GLuint *dest,
+ const GLfloat *depthVals,
+ const GLstencil *stencilVals,
+ const struct gl_pixelstore_attrib *dstPacking)
+{
+ GLfloat depthCopy[MAX_WIDTH];
+ GLstencil stencilCopy[MAX_WIDTH];
+ GLuint i;
+
+ ASSERT(n <= MAX_WIDTH);
+
+ if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) {
+ memcpy(depthCopy, depthVals, n * sizeof(GLfloat));
+ _mesa_scale_and_bias_depth(ctx, n, depthCopy);
+ depthVals = depthCopy;
+ }
+
+ if (ctx->Pixel.IndexShift ||
+ ctx->Pixel.IndexOffset ||
+ ctx->Pixel.MapStencilFlag) {
+ memcpy(stencilCopy, stencilVals, n * sizeof(GLstencil));
+ _mesa_apply_stencil_transfer_ops(ctx, n, stencilCopy);
+ stencilVals = stencilCopy;
+ }
+
+ for (i = 0; i < n; i++) {
+ GLuint z = (GLuint) (depthVals[i] * 0xffffff);
+ dest[i] = (z << 8) | (stencilVals[i] & 0xff);
+ }
+
+ if (dstPacking->SwapBytes) {
+ _mesa_swap4(dest, n);
+ }
+}
+
+
+
+
+/**
+ * Unpack image data. Apply byte swapping, byte flipping (bitmap).
+ * Return all image data in a contiguous block. This is used when we
+ * compile glDrawPixels, glTexImage, etc into a display list. We
+ * need a copy of the data in a standard format.
+ */
+void *
+_mesa_unpack_image( GLuint dimensions,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *unpack )
+{
+ GLint bytesPerRow, compsPerRow;
+ GLboolean flipBytes, swap2, swap4;
+
+ if (!pixels)
+ return NULL; /* not necessarily an error */
+
+ if (width <= 0 || height <= 0 || depth <= 0)
+ return NULL; /* generate error later */
+
+ if (type == GL_BITMAP) {
+ bytesPerRow = (width + 7) >> 3;
+ flipBytes = unpack->LsbFirst;
+ swap2 = swap4 = GL_FALSE;
+ compsPerRow = 0;
+ }
+ else {
+ const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type);
+ GLint components = _mesa_components_in_format(format);
+ GLint bytesPerComp;
+
+ if (_mesa_type_is_packed(type))
+ components = 1;
+
+ if (bytesPerPixel <= 0 || components <= 0)
+ return NULL; /* bad format or type. generate error later */
+ bytesPerRow = bytesPerPixel * width;
+ bytesPerComp = bytesPerPixel / components;
+ flipBytes = GL_FALSE;
+ swap2 = (bytesPerComp == 2) && unpack->SwapBytes;
+ swap4 = (bytesPerComp == 4) && unpack->SwapBytes;
+ compsPerRow = components * width;
+ assert(compsPerRow >= width);
+ }
+
+ {
+ GLubyte *destBuffer
+ = (GLubyte *) malloc(bytesPerRow * height * depth);
+ GLubyte *dst;
+ GLint img, row;
+ if (!destBuffer)
+ return NULL; /* generate GL_OUT_OF_MEMORY later */
+
+ dst = destBuffer;
+ for (img = 0; img < depth; img++) {
+ for (row = 0; row < height; row++) {
+ const GLvoid *src = _mesa_image_address(dimensions, unpack, pixels,
+ width, height, format, type, img, row, 0);
+
+ if ((type == GL_BITMAP) && (unpack->SkipPixels & 0x7)) {
+ GLint i;
+ flipBytes = GL_FALSE;
+ if (unpack->LsbFirst) {
+ GLubyte srcMask = 1 << (unpack->SkipPixels & 0x7);
+ GLubyte dstMask = 128;
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 128) {
+ srcMask = 1;
+ s++;
+ }
+ else {
+ srcMask = srcMask << 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ else {
+ GLubyte srcMask = 128 >> (unpack->SkipPixels & 0x7);
+ GLubyte dstMask = 128;
+ const GLubyte *s = src;
+ GLubyte *d = dst;
+ *d = 0;
+ for (i = 0; i < width; i++) {
+ if (*s & srcMask) {
+ *d |= dstMask;
+ }
+ if (srcMask == 1) {
+ srcMask = 128;
+ s++;
+ }
+ else {
+ srcMask = srcMask >> 1;
+ }
+ if (dstMask == 1) {
+ dstMask = 128;
+ d++;
+ *d = 0;
+ }
+ else {
+ dstMask = dstMask >> 1;
+ }
+ }
+ }
+ }
+ else {
+ memcpy(dst, src, bytesPerRow);
+ }
+
+ /* byte flipping/swapping */
+ if (flipBytes) {
+ flip_bytes((GLubyte *) dst, bytesPerRow);
+ }
+ else if (swap2) {
+ _mesa_swap2((GLushort*) dst, compsPerRow);
+ }
+ else if (swap4) {
+ _mesa_swap4((GLuint*) dst, compsPerRow);
+ }
+ dst += bytesPerRow;
+ }
+ }
+ return destBuffer;
+ }
+}
+
diff --git a/src/mesa/main/pack.h b/src/mesa/main/pack.h
new file mode 100644
index 0000000000..65d3f7a0fb
--- /dev/null
+++ b/src/mesa/main/pack.h
@@ -0,0 +1,147 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef PACK_H
+#define PACK_H
+
+
+#include "mtypes.h"
+
+
+extern void
+_mesa_unpack_polygon_stipple(const GLubyte *pattern, GLuint dest[32],
+ const struct gl_pixelstore_attrib *unpacking);
+
+
+extern void
+_mesa_pack_polygon_stipple(const GLuint pattern[32], GLubyte *dest,
+ const struct gl_pixelstore_attrib *packing);
+
+
+extern GLvoid *
+_mesa_unpack_bitmap(GLint width, GLint height, const GLubyte *pixels,
+ const struct gl_pixelstore_attrib *packing);
+
+extern void
+_mesa_pack_bitmap(GLint width, GLint height, const GLubyte *source,
+ GLubyte *dest, const struct gl_pixelstore_attrib *packing);
+
+
+extern void
+_mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n,
+ GLfloat rgba[][4],
+ GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps);
+
+
+extern void
+_mesa_unpack_color_span_chan(struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLchan dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+
+extern void
+_mesa_unpack_color_span_float(struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLfloat dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+extern void
+_mesa_unpack_color_span_uint(struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLuint *dest,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking);
+
+extern void
+_mesa_unpack_dudv_span_byte(struct gl_context *ctx,
+ GLuint n, GLenum dstFormat, GLbyte dest[],
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+extern void
+_mesa_unpack_index_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+
+extern void
+_mesa_pack_index_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, const GLuint *source,
+ const struct gl_pixelstore_attrib *dstPacking,
+ GLbitfield transferOps);
+
+
+extern void
+_mesa_unpack_stencil_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps);
+
+extern void
+_mesa_pack_stencil_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, const GLstencil *source,
+ const struct gl_pixelstore_attrib *dstPacking);
+
+
+extern void
+_mesa_unpack_depth_span(const struct gl_context *ctx, GLuint n,
+ GLenum dstType, GLvoid *dest, GLuint depthMax,
+ GLenum srcType, const GLvoid *source,
+ const struct gl_pixelstore_attrib *srcPacking);
+
+extern void
+_mesa_pack_depth_span(const struct gl_context *ctx, GLuint n, GLvoid *dest,
+ GLenum dstType, const GLfloat *depthSpan,
+ const struct gl_pixelstore_attrib *dstPacking);
+
+
+extern void
+_mesa_pack_depth_stencil_span(const struct gl_context *ctx,
+ GLuint n, GLuint *dest,
+ const GLfloat *depthVals,
+ const GLstencil *stencilVals,
+ const struct gl_pixelstore_attrib *dstPacking);
+
+
+extern void *
+_mesa_unpack_image(GLuint dimensions,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *unpack);
+
+
+#endif
diff --git a/src/mesa/main/pixel.h b/src/mesa/main/pixel.h
index 03560835a8..6f04eb6272 100644
--- a/src/mesa/main/pixel.h
+++ b/src/mesa/main/pixel.h
@@ -33,7 +33,12 @@
#define PIXEL_H
-#include "main/mtypes.h"
+#include "compiler.h"
+#include "glheader.h"
+#include "mfeatures.h"
+
+struct _glapi_table;
+struct gl_context;
#if FEATURE_pixel_transfer
diff --git a/src/mesa/main/pixelstore.h b/src/mesa/main/pixelstore.h
index cdef7de261..eb50819749 100644
--- a/src/mesa/main/pixelstore.h
+++ b/src/mesa/main/pixelstore.h
@@ -33,7 +33,8 @@
#include "glheader.h"
-#include "mtypes.h"
+
+struct gl_context;
extern void GLAPIENTRY
diff --git a/src/mesa/main/pixeltransfer.c b/src/mesa/main/pixeltransfer.c
new file mode 100644
index 0000000000..711181fd89
--- /dev/null
+++ b/src/mesa/main/pixeltransfer.c
@@ -0,0 +1,566 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * \file pixeltransfer.c
+ * Pixel transfer operations (scale, bias, table lookups, etc)
+ */
+
+
+#include "glheader.h"
+#include "colormac.h"
+#include "pixeltransfer.h"
+#include "imports.h"
+
+
+/*
+ * Apply scale and bias factors to an array of RGBA pixels.
+ */
+void
+_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4],
+ GLfloat rScale, GLfloat gScale,
+ GLfloat bScale, GLfloat aScale,
+ GLfloat rBias, GLfloat gBias,
+ GLfloat bBias, GLfloat aBias)
+{
+ if (rScale != 1.0 || rBias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = rgba[i][RCOMP] * rScale + rBias;
+ }
+ }
+ if (gScale != 1.0 || gBias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][GCOMP] = rgba[i][GCOMP] * gScale + gBias;
+ }
+ }
+ if (bScale != 1.0 || bBias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][BCOMP] = rgba[i][BCOMP] * bScale + bBias;
+ }
+ }
+ if (aScale != 1.0 || aBias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][ACOMP] = rgba[i][ACOMP] * aScale + aBias;
+ }
+ }
+}
+
+
+/*
+ * Apply pixel mapping to an array of floating point RGBA pixels.
+ */
+void
+_mesa_map_rgba( const struct gl_context *ctx, GLuint n, GLfloat rgba[][4] )
+{
+ const GLfloat rscale = (GLfloat) (ctx->PixelMaps.RtoR.Size - 1);
+ const GLfloat gscale = (GLfloat) (ctx->PixelMaps.GtoG.Size - 1);
+ const GLfloat bscale = (GLfloat) (ctx->PixelMaps.BtoB.Size - 1);
+ const GLfloat ascale = (GLfloat) (ctx->PixelMaps.AtoA.Size - 1);
+ const GLfloat *rMap = ctx->PixelMaps.RtoR.Map;
+ const GLfloat *gMap = ctx->PixelMaps.GtoG.Map;
+ const GLfloat *bMap = ctx->PixelMaps.BtoB.Map;
+ const GLfloat *aMap = ctx->PixelMaps.AtoA.Map;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ GLfloat r = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
+ GLfloat g = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
+ GLfloat b = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F);
+ GLfloat a = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F);
+ rgba[i][RCOMP] = rMap[IROUND(r * rscale)];
+ rgba[i][GCOMP] = gMap[IROUND(g * gscale)];
+ rgba[i][BCOMP] = bMap[IROUND(b * bscale)];
+ rgba[i][ACOMP] = aMap[IROUND(a * ascale)];
+ }
+}
+
+/**
+ * Apply a color table lookup to an array of floating point RGBA colors.
+ */
+void
+_mesa_lookup_rgba_float(const struct gl_color_table *table,
+ GLuint n, GLfloat rgba[][4])
+{
+ const GLint max = table->Size - 1;
+ const GLfloat scale = (GLfloat) max;
+ const GLfloat *lut = table->TableF;
+ GLuint i;
+
+ if (!table->TableF || table->Size == 0)
+ return;
+
+ switch (table->_BaseFormat) {
+ case GL_INTENSITY:
+ /* replace RGBA with I */
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND(rgba[i][RCOMP] * scale);
+ GLfloat c = lut[CLAMP(j, 0, max)];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = c;
+ }
+ break;
+ case GL_LUMINANCE:
+ /* replace RGB with L */
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND(rgba[i][RCOMP] * scale);
+ GLfloat c = lut[CLAMP(j, 0, max)];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = c;
+ }
+ break;
+ case GL_ALPHA:
+ /* replace A with A */
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND(rgba[i][ACOMP] * scale);
+ rgba[i][ACOMP] = lut[CLAMP(j, 0, max)];
+ }
+ break;
+ case GL_LUMINANCE_ALPHA:
+ /* replace RGBA with LLLA */
+ for (i = 0; i < n; i++) {
+ GLint jL = IROUND(rgba[i][RCOMP] * scale);
+ GLint jA = IROUND(rgba[i][ACOMP] * scale);
+ GLfloat luminance, alpha;
+ jL = CLAMP(jL, 0, max);
+ jA = CLAMP(jA, 0, max);
+ luminance = lut[jL * 2 + 0];
+ alpha = lut[jA * 2 + 1];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = luminance;
+ rgba[i][ACOMP] = alpha;;
+ }
+ break;
+ case GL_RED:
+ /* replace RGB with RGB */
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ }
+ break;
+ case GL_RG:
+ /* replace RG with RG */
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ GLint jG = IROUND(rgba[i][GCOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ jG = CLAMP(jG, 0, max);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ rgba[i][GCOMP] = lut[jG * 3 + 1];
+ }
+ break;
+ case GL_RGB:
+ /* replace RGB with RGB */
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ GLint jG = IROUND(rgba[i][GCOMP] * scale);
+ GLint jB = IROUND(rgba[i][BCOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ jG = CLAMP(jG, 0, max);
+ jB = CLAMP(jB, 0, max);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ rgba[i][GCOMP] = lut[jG * 3 + 1];
+ rgba[i][BCOMP] = lut[jB * 3 + 2];
+ }
+ break;
+ case GL_RGBA:
+ /* replace RGBA with RGBA */
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND(rgba[i][RCOMP] * scale);
+ GLint jG = IROUND(rgba[i][GCOMP] * scale);
+ GLint jB = IROUND(rgba[i][BCOMP] * scale);
+ GLint jA = IROUND(rgba[i][ACOMP] * scale);
+ jR = CLAMP(jR, 0, max);
+ jG = CLAMP(jG, 0, max);
+ jB = CLAMP(jB, 0, max);
+ jA = CLAMP(jA, 0, max);
+ rgba[i][RCOMP] = lut[jR * 4 + 0];
+ rgba[i][GCOMP] = lut[jG * 4 + 1];
+ rgba[i][BCOMP] = lut[jB * 4 + 2];
+ rgba[i][ACOMP] = lut[jA * 4 + 3];
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_float");
+ return;
+ }
+}
+
+
+
+/**
+ * Apply a color table lookup to an array of ubyte/RGBA colors.
+ */
+void
+_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
+ GLuint n, GLubyte rgba[][4])
+{
+ const GLubyte *lut = table->TableUB;
+ const GLfloat scale = (GLfloat) (table->Size - 1) / (GLfloat)255.0;
+ GLuint i;
+
+ if (!table->TableUB || table->Size == 0)
+ return;
+
+ switch (table->_BaseFormat) {
+ case GL_INTENSITY:
+ /* replace RGBA with I */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ const GLubyte c = lut[rgba[i][RCOMP]];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = c;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] =
+ rgba[i][ACOMP] = lut[j];
+ }
+ }
+ break;
+ case GL_LUMINANCE:
+ /* replace RGB with L */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ const GLubyte c = lut[rgba[i][RCOMP]];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = c;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = lut[j];
+ }
+ }
+ break;
+ case GL_ALPHA:
+ /* replace A with A */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ rgba[i][ACOMP] = lut[rgba[i][ACOMP]];
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint j = IROUND((GLfloat) rgba[i][ACOMP] * scale);
+ rgba[i][ACOMP] = lut[j];
+ }
+ }
+ break;
+ case GL_LUMINANCE_ALPHA:
+ /* replace RGBA with LLLA */
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ GLubyte l = lut[rgba[i][RCOMP] * 2 + 0];
+ GLubyte a = lut[rgba[i][ACOMP] * 2 + 1];;
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = l;
+ rgba[i][ACOMP] = a;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint jL = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
+ GLubyte luminance = lut[jL * 2 + 0];
+ GLubyte alpha = lut[jA * 2 + 1];
+ rgba[i][RCOMP] =
+ rgba[i][GCOMP] =
+ rgba[i][BCOMP] = luminance;
+ rgba[i][ACOMP] = alpha;
+ }
+ }
+ break;
+ case GL_RGB:
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 3 + 0];
+ rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 3 + 1];
+ rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 3 + 2];
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
+ GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
+ rgba[i][RCOMP] = lut[jR * 3 + 0];
+ rgba[i][GCOMP] = lut[jG * 3 + 1];
+ rgba[i][BCOMP] = lut[jB * 3 + 2];
+ }
+ }
+ break;
+ case GL_RGBA:
+ if (table->Size == 256) {
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = lut[rgba[i][RCOMP] * 4 + 0];
+ rgba[i][GCOMP] = lut[rgba[i][GCOMP] * 4 + 1];
+ rgba[i][BCOMP] = lut[rgba[i][BCOMP] * 4 + 2];
+ rgba[i][ACOMP] = lut[rgba[i][ACOMP] * 4 + 3];
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ GLint jR = IROUND((GLfloat) rgba[i][RCOMP] * scale);
+ GLint jG = IROUND((GLfloat) rgba[i][GCOMP] * scale);
+ GLint jB = IROUND((GLfloat) rgba[i][BCOMP] * scale);
+ GLint jA = IROUND((GLfloat) rgba[i][ACOMP] * scale);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][RCOMP], lut[jR * 4 + 0]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][GCOMP], lut[jG * 4 + 1]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][BCOMP], lut[jB * 4 + 2]);
+ CLAMPED_FLOAT_TO_CHAN(rgba[i][ACOMP], lut[jA * 4 + 3]);
+ }
+ }
+ break;
+ default:
+ _mesa_problem(NULL, "Bad format in _mesa_lookup_rgba_chan");
+ return;
+ }
+}
+
+
+
+/*
+ * Map color indexes to float rgba values.
+ */
+void
+_mesa_map_ci_to_rgba( const struct gl_context *ctx, GLuint n,
+ const GLuint index[], GLfloat rgba[][4] )
+{
+ GLuint rmask = ctx->PixelMaps.ItoR.Size - 1;
+ GLuint gmask = ctx->PixelMaps.ItoG.Size - 1;
+ GLuint bmask = ctx->PixelMaps.ItoB.Size - 1;
+ GLuint amask = ctx->PixelMaps.ItoA.Size - 1;
+ const GLfloat *rMap = ctx->PixelMaps.ItoR.Map;
+ const GLfloat *gMap = ctx->PixelMaps.ItoG.Map;
+ const GLfloat *bMap = ctx->PixelMaps.ItoB.Map;
+ const GLfloat *aMap = ctx->PixelMaps.ItoA.Map;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ rgba[i][RCOMP] = rMap[index[i] & rmask];
+ rgba[i][GCOMP] = gMap[index[i] & gmask];
+ rgba[i][BCOMP] = bMap[index[i] & bmask];
+ rgba[i][ACOMP] = aMap[index[i] & amask];
+ }
+}
+
+
+/**
+ * Map ubyte color indexes to ubyte/RGBA values.
+ */
+void
+_mesa_map_ci8_to_rgba8(const struct gl_context *ctx,
+ GLuint n, const GLubyte index[],
+ GLubyte rgba[][4])
+{
+ GLuint rmask = ctx->PixelMaps.ItoR.Size - 1;
+ GLuint gmask = ctx->PixelMaps.ItoG.Size - 1;
+ GLuint bmask = ctx->PixelMaps.ItoB.Size - 1;
+ GLuint amask = ctx->PixelMaps.ItoA.Size - 1;
+ const GLubyte *rMap = ctx->PixelMaps.ItoR.Map8;
+ const GLubyte *gMap = ctx->PixelMaps.ItoG.Map8;
+ const GLubyte *bMap = ctx->PixelMaps.ItoB.Map8;
+ const GLubyte *aMap = ctx->PixelMaps.ItoA.Map8;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ rgba[i][RCOMP] = rMap[index[i] & rmask];
+ rgba[i][GCOMP] = gMap[index[i] & gmask];
+ rgba[i][BCOMP] = bMap[index[i] & bmask];
+ rgba[i][ACOMP] = aMap[index[i] & amask];
+ }
+}
+
+
+void
+_mesa_scale_and_bias_depth(const struct gl_context *ctx, GLuint n,
+ GLfloat depthValues[])
+{
+ const GLfloat scale = ctx->Pixel.DepthScale;
+ const GLfloat bias = ctx->Pixel.DepthBias;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ GLfloat d = depthValues[i] * scale + bias;
+ depthValues[i] = CLAMP(d, 0.0F, 1.0F);
+ }
+}
+
+
+void
+_mesa_scale_and_bias_depth_uint(const struct gl_context *ctx, GLuint n,
+ GLuint depthValues[])
+{
+ const GLdouble max = (double) 0xffffffff;
+ const GLdouble scale = ctx->Pixel.DepthScale;
+ const GLdouble bias = ctx->Pixel.DepthBias * max;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ GLdouble d = (GLdouble) depthValues[i] * scale + bias;
+ d = CLAMP(d, 0.0, max);
+ depthValues[i] = (GLuint) d;
+ }
+}
+
+/**
+ * Apply various pixel transfer operations to an array of RGBA pixels
+ * as indicated by the transferOps bitmask
+ */
+void
+_mesa_apply_rgba_transfer_ops(struct gl_context *ctx, GLbitfield transferOps,
+ GLuint n, GLfloat rgba[][4])
+{
+ /* scale & bias */
+ if (transferOps & IMAGE_SCALE_BIAS_BIT) {
+ _mesa_scale_and_bias_rgba(n, rgba,
+ ctx->Pixel.RedScale, ctx->Pixel.GreenScale,
+ ctx->Pixel.BlueScale, ctx->Pixel.AlphaScale,
+ ctx->Pixel.RedBias, ctx->Pixel.GreenBias,
+ ctx->Pixel.BlueBias, ctx->Pixel.AlphaBias);
+ }
+ /* color map lookup */
+ if (transferOps & IMAGE_MAP_COLOR_BIT) {
+ _mesa_map_rgba( ctx, n, rgba );
+ }
+
+ /* clamping to [0,1] */
+ if (transferOps & IMAGE_CLAMP_BIT) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
+ rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F);
+ rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F);
+ rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F);
+ }
+ }
+}
+
+
+/*
+ * Apply color index shift and offset to an array of pixels.
+ */
+void
+_mesa_shift_and_offset_ci(const struct gl_context *ctx,
+ GLuint n, GLuint indexes[])
+{
+ GLint shift = ctx->Pixel.IndexShift;
+ GLint offset = ctx->Pixel.IndexOffset;
+ GLuint i;
+ if (shift > 0) {
+ for (i=0;i<n;i++) {
+ indexes[i] = (indexes[i] << shift) + offset;
+ }
+ }
+ else if (shift < 0) {
+ shift = -shift;
+ for (i=0;i<n;i++) {
+ indexes[i] = (indexes[i] >> shift) + offset;
+ }
+ }
+ else {
+ for (i=0;i<n;i++) {
+ indexes[i] = indexes[i] + offset;
+ }
+ }
+}
+
+
+
+/**
+ * Apply color index shift, offset and table lookup to an array
+ * of color indexes;
+ */
+void
+_mesa_apply_ci_transfer_ops(const struct gl_context *ctx,
+ GLbitfield transferOps,
+ GLuint n, GLuint indexes[])
+{
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ _mesa_shift_and_offset_ci(ctx, n, indexes);
+ }
+ if (transferOps & IMAGE_MAP_COLOR_BIT) {
+ const GLuint mask = ctx->PixelMaps.ItoI.Size - 1;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ const GLuint j = indexes[i] & mask;
+ indexes[i] = IROUND(ctx->PixelMaps.ItoI.Map[j]);
+ }
+ }
+}
+
+
+/**
+ * Apply stencil index shift, offset and table lookup to an array
+ * of stencil values.
+ */
+void
+_mesa_apply_stencil_transfer_ops(const struct gl_context *ctx, GLuint n,
+ GLstencil stencil[])
+{
+ if (ctx->Pixel.IndexShift != 0 || ctx->Pixel.IndexOffset != 0) {
+ const GLint offset = ctx->Pixel.IndexOffset;
+ GLint shift = ctx->Pixel.IndexShift;
+ GLuint i;
+ if (shift > 0) {
+ for (i = 0; i < n; i++) {
+ stencil[i] = (stencil[i] << shift) + offset;
+ }
+ }
+ else if (shift < 0) {
+ shift = -shift;
+ for (i = 0; i < n; i++) {
+ stencil[i] = (stencil[i] >> shift) + offset;
+ }
+ }
+ else {
+ for (i = 0; i < n; i++) {
+ stencil[i] = stencil[i] + offset;
+ }
+ }
+ }
+ if (ctx->Pixel.MapStencilFlag) {
+ GLuint mask = ctx->PixelMaps.StoS.Size - 1;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ stencil[i] = (GLstencil)ctx->PixelMaps.StoS.Map[ stencil[i] & mask ];
+ }
+ }
+}
diff --git a/src/mesa/main/pixeltransfer.h b/src/mesa/main/pixeltransfer.h
new file mode 100644
index 0000000000..34f3e49ba7
--- /dev/null
+++ b/src/mesa/main/pixeltransfer.h
@@ -0,0 +1,90 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef PIXELTRANSFER_H
+#define PIXELTRANSFER_H
+
+
+#include "mtypes.h"
+
+
+extern void
+_mesa_scale_and_bias_rgba(GLuint n, GLfloat rgba[][4],
+ GLfloat rScale, GLfloat gScale,
+ GLfloat bScale, GLfloat aScale,
+ GLfloat rBias, GLfloat gBias,
+ GLfloat bBias, GLfloat aBias);
+
+extern void
+_mesa_map_rgba(const struct gl_context *ctx, GLuint n, GLfloat rgba[][4]);
+
+extern void
+_mesa_lookup_rgba_float(const struct gl_color_table *table,
+ GLuint n, GLfloat rgba[][4]);
+
+extern void
+_mesa_lookup_rgba_ubyte(const struct gl_color_table *table,
+ GLuint n, GLubyte rgba[][4]);
+
+
+extern void
+_mesa_map_ci_to_rgba(const struct gl_context *ctx,
+ GLuint n, const GLuint index[], GLfloat rgba[][4]);
+
+
+extern void
+_mesa_map_ci8_to_rgba8(const struct gl_context *ctx,
+ GLuint n, const GLubyte index[],
+ GLubyte rgba[][4]);
+
+
+extern void
+_mesa_scale_and_bias_depth(const struct gl_context *ctx, GLuint n,
+ GLfloat depthValues[]);
+
+extern void
+_mesa_scale_and_bias_depth_uint(const struct gl_context *ctx, GLuint n,
+ GLuint depthValues[]);
+
+extern void
+_mesa_apply_rgba_transfer_ops(struct gl_context *ctx, GLbitfield transferOps,
+ GLuint n, GLfloat rgba[][4]);
+
+extern void
+_mesa_shift_and_offset_ci(const struct gl_context *ctx,
+ GLuint n, GLuint indexes[]);
+
+extern void
+_mesa_apply_ci_transfer_ops(const struct gl_context *ctx,
+ GLbitfield transferOps,
+ GLuint n, GLuint indexes[]);
+
+
+extern void
+_mesa_apply_stencil_transfer_ops(const struct gl_context *ctx, GLuint n,
+ GLstencil stencil[]);
+
+
+#endif
diff --git a/src/mesa/main/points.h b/src/mesa/main/points.h
index b222379b1b..306a8a572f 100644
--- a/src/mesa/main/points.h
+++ b/src/mesa/main/points.h
@@ -32,7 +32,9 @@
#define POINTS_H
-#include "mtypes.h"
+#include "glheader.h"
+
+struct gl_context;
extern void GLAPIENTRY
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index 970020048d..9c213b9b4c 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -34,6 +34,7 @@
#include "context.h"
#include "image.h"
#include "enums.h"
+#include "pack.h"
#include "polygon.h"
#include "mtypes.h"
diff --git a/src/mesa/main/polygon.h b/src/mesa/main/polygon.h
index ad0ac4cc3a..13f7c91ed0 100644
--- a/src/mesa/main/polygon.h
+++ b/src/mesa/main/polygon.h
@@ -32,8 +32,9 @@
#define POLYGON_H
-#include "mtypes.h"
+#include "glheader.h"
+struct gl_context;
extern void
_mesa_polygon_stipple(struct gl_context *ctx, const GLubyte *pattern);
diff --git a/src/mesa/main/rastpos.h b/src/mesa/main/rastpos.h
index 9b508eaedf..d113906f41 100644
--- a/src/mesa/main/rastpos.h
+++ b/src/mesa/main/rastpos.h
@@ -32,8 +32,11 @@
#define RASTPOS_H
-#include "main/mtypes.h"
+#include "compiler.h"
+#include "mfeatures.h"
+struct _glapi_table;
+struct gl_context;
#if FEATURE_rastpos
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 0043c8adc4..a5612e34ec 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -28,6 +28,7 @@
#include "context.h"
#include "readpix.h"
#include "framebuffer.h"
+#include "formats.h"
#include "image.h"
#include "state.h"
@@ -78,6 +79,16 @@ _mesa_error_check_format_type(struct gl_context *ctx, GLenum format, GLenum type
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
if (!drawing) {
/* reading */
if (!_mesa_source_buffer_exists(ctx, GL_COLOR)) {
@@ -175,6 +186,20 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
return;
}
+ /* Check that the destination format and source buffer are both
+ * integer-valued or both non-integer-valued.
+ */
+ if (ctx->Extensions.EXT_texture_integer && _mesa_is_color_format(format)) {
+ const struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
+ const GLboolean srcInteger = _mesa_is_format_integer_color(rb->Format);
+ const GLboolean dstInteger = _mesa_is_integer_format(format);
+ if (dstInteger != srcInteger) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glReadPixels(integer / non-integer format mismatch");
+ return;
+ }
+ }
+
if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"glReadPixels(incomplete framebuffer)" );
diff --git a/src/mesa/main/readpix.h b/src/mesa/main/readpix.h
index 0753e619fe..fd25e703e0 100644
--- a/src/mesa/main/readpix.h
+++ b/src/mesa/main/readpix.h
@@ -27,8 +27,9 @@
#define READPIXELS_H
-#include "main/mtypes.h"
+#include "glheader.h"
+struct gl_context;
extern GLboolean
_mesa_error_check_format_type(struct gl_context *ctx, GLenum format, GLenum type,
diff --git a/src/mesa/main/remap.c b/src/mesa/main/remap.c
index 2341f8488d..c89fba4530 100644
--- a/src/mesa/main/remap.c
+++ b/src/mesa/main/remap.c
@@ -44,10 +44,15 @@
#include "imports.h"
#include "glapi/glapi.h"
-#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
#define MAX_ENTRY_POINTS 16
-static const char *_mesa_function_pool;
+#define need_MESA_remap_table
+#include "main/remap_helper.h"
+
+
+/* this is global for quick access */
+int driDispatchRemapTable[driDispatchRemapTable_size];
+
/**
* Return the spec string associated with the given function index.
@@ -60,7 +65,10 @@ static const char *_mesa_function_pool;
const char *
_mesa_get_function_spec(GLint func_index)
{
- return _mesa_function_pool + func_index;
+ if (func_index < Elements(_mesa_function_pool))
+ return _mesa_function_pool + func_index;
+ else
+ return NULL;
}
@@ -152,11 +160,31 @@ _mesa_map_function_array(const struct gl_function_remap *func_array)
/**
+ * Map the functions which are already static.
+ *
+ * When a extension function are incorporated into the ABI, the
+ * extension suffix is usually stripped. Mapping such functions
+ * makes sure the alternative names are available.
+ *
+ * Note that functions mapped by _mesa_init_remap_table() are
+ * excluded.
+ */
+void
+_mesa_map_static_functions(void)
+{
+ /* Remap static functions which have alternative names and are in the ABI.
+ * This is to be on the safe side. glapi should have defined those names.
+ */
+ _mesa_map_function_array(MESA_alt_functions);
+}
+
+
+/**
* Initialize the remap table. This is called in one_time_init().
* The remap table needs to be initialized before calling the
* CALL/GET/SET macros defined in main/dispatch.h.
*/
-void
+static void
_mesa_do_init_remap_table(const char *pool,
int size,
const struct gl_function_pool_remap *remap)
@@ -167,7 +195,6 @@ _mesa_do_init_remap_table(const char *pool,
if (initialized)
return;
initialized = GL_TRUE;
- _mesa_function_pool = pool;
/* initialize the remap table */
for (i = 0; i < size; i++) {
@@ -187,4 +214,13 @@ _mesa_do_init_remap_table(const char *pool,
}
+void
+_mesa_init_remap_table(void)
+{
+ _mesa_do_init_remap_table(_mesa_function_pool,
+ driDispatchRemapTable_size,
+ MESA_remap_table_functions);
+}
+
+
#endif /* FEATURE_remap_table */
diff --git a/src/mesa/main/remap.h b/src/mesa/main/remap.h
index a2a55f615d..5fee300529 100644
--- a/src/mesa/main/remap.h
+++ b/src/mesa/main/remap.h
@@ -60,25 +60,8 @@ extern void
_mesa_map_static_functions(void);
extern void
-_mesa_map_static_functions_es1(void);
-
-extern void
-_mesa_map_static_functions_es2(void);
-
-extern void
-_mesa_do_init_remap_table(const char *pool,
- int size,
- const struct gl_function_pool_remap *remap);
-
-extern void
_mesa_init_remap_table(void);
-extern void
-_mesa_init_remap_table_es1(void);
-
-extern void
-_mesa_init_remap_table_es2(void);
-
#else /* FEATURE_remap_table */
static INLINE const char *
@@ -105,37 +88,10 @@ _mesa_map_static_functions(void)
static INLINE void
-_mesa_map_static_functions_es1(void)
-{
-}
-
-static INLINE void
-_mesa_map_static_functions_es2(void)
-{
-}
-
-static INLINE void
-_mesa_do_init_remap_table(const char *pool,
- int size,
- const struct gl_function_pool_remap *remap)
-{
-}
-
-static INLINE void
_mesa_init_remap_table(void)
{
}
-static INLINE void
-_mesa_init_remap_table_es1(void)
-{
-}
-
-static INLINE void
-_mesa_init_remap_table_es2(void)
-{
-}
-
#endif /* FEATURE_remap_table */
diff --git a/src/mesa/main/remap_helper.h b/src/mesa/main/remap_helper.h
index 010c03459e..7368c76e7e 100644
--- a/src/mesa/main/remap_helper.h
+++ b/src/mesa/main/remap_helper.h
@@ -45,4428 +45,4691 @@ static const char _mesa_function_pool[] =
"iff\0"
"glMapGrid1f\0"
"\0"
- /* _mesa_function_pool[81]: RasterPos4i (offset 82) */
+ /* _mesa_function_pool[81]: VertexAttribI2iEXT (will be remapped) */
+ "iii\0"
+ "glVertexAttribI2iEXT\0"
+ "glVertexAttribI2i\0"
+ "\0"
+ /* _mesa_function_pool[125]: RasterPos4i (offset 82) */
"iiii\0"
"glRasterPos4i\0"
"\0"
- /* _mesa_function_pool[101]: RasterPos4d (offset 78) */
+ /* _mesa_function_pool[145]: RasterPos4d (offset 78) */
"dddd\0"
"glRasterPos4d\0"
"\0"
- /* _mesa_function_pool[121]: NewList (dynamic) */
+ /* _mesa_function_pool[165]: NewList (dynamic) */
"ii\0"
"glNewList\0"
"\0"
- /* _mesa_function_pool[135]: RasterPos4f (offset 80) */
+ /* _mesa_function_pool[179]: RasterPos4f (offset 80) */
"ffff\0"
"glRasterPos4f\0"
"\0"
- /* _mesa_function_pool[155]: LoadIdentity (offset 290) */
+ /* _mesa_function_pool[199]: LoadIdentity (offset 290) */
"\0"
"glLoadIdentity\0"
"\0"
- /* _mesa_function_pool[172]: SampleCoverageARB (will be remapped) */
+ /* _mesa_function_pool[216]: SampleCoverageARB (will be remapped) */
"fi\0"
"glSampleCoverage\0"
"glSampleCoverageARB\0"
"\0"
- /* _mesa_function_pool[213]: ConvolutionFilter1D (offset 348) */
+ /* _mesa_function_pool[257]: ConvolutionFilter1D (offset 348) */
"iiiiip\0"
"glConvolutionFilter1D\0"
"glConvolutionFilter1DEXT\0"
"\0"
- /* _mesa_function_pool[268]: BeginQueryARB (will be remapped) */
+ /* _mesa_function_pool[312]: BeginQueryARB (will be remapped) */
"ii\0"
"glBeginQuery\0"
"glBeginQueryARB\0"
"\0"
- /* _mesa_function_pool[301]: RasterPos3dv (offset 71) */
+ /* _mesa_function_pool[345]: RasterPos3dv (offset 71) */
"p\0"
"glRasterPos3dv\0"
"\0"
- /* _mesa_function_pool[319]: PointParameteriNV (will be remapped) */
+ /* _mesa_function_pool[363]: PointParameteriNV (will be remapped) */
"ii\0"
"glPointParameteri\0"
"glPointParameteriNV\0"
"\0"
- /* _mesa_function_pool[361]: GetProgramiv (will be remapped) */
+ /* _mesa_function_pool[405]: GetProgramiv (will be remapped) */
"iip\0"
"glGetProgramiv\0"
"\0"
- /* _mesa_function_pool[381]: MultiTexCoord3sARB (offset 398) */
+ /* _mesa_function_pool[425]: MultiTexCoord3sARB (offset 398) */
"iiii\0"
"glMultiTexCoord3s\0"
"glMultiTexCoord3sARB\0"
"\0"
- /* _mesa_function_pool[426]: SecondaryColor3iEXT (will be remapped) */
+ /* _mesa_function_pool[470]: SecondaryColor3iEXT (will be remapped) */
"iii\0"
"glSecondaryColor3i\0"
"glSecondaryColor3iEXT\0"
"\0"
- /* _mesa_function_pool[472]: WindowPos3fMESA (will be remapped) */
+ /* _mesa_function_pool[516]: WindowPos3fMESA (will be remapped) */
"fff\0"
"glWindowPos3f\0"
"glWindowPos3fARB\0"
"glWindowPos3fMESA\0"
"\0"
- /* _mesa_function_pool[526]: TexCoord1iv (offset 99) */
+ /* _mesa_function_pool[570]: TexCoord1iv (offset 99) */
"p\0"
"glTexCoord1iv\0"
"\0"
- /* _mesa_function_pool[543]: TexCoord4sv (offset 125) */
+ /* _mesa_function_pool[587]: TexCoord4sv (offset 125) */
"p\0"
"glTexCoord4sv\0"
"\0"
- /* _mesa_function_pool[560]: RasterPos4s (offset 84) */
+ /* _mesa_function_pool[604]: RasterPos4s (offset 84) */
"iiii\0"
"glRasterPos4s\0"
"\0"
- /* _mesa_function_pool[580]: PixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[624]: PixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[613]: ActiveTextureARB (offset 374) */
+ /* _mesa_function_pool[657]: ActiveTextureARB (offset 374) */
"i\0"
"glActiveTexture\0"
"glActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[651]: BlitFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[695]: BlitFramebufferEXT (will be remapped) */
"iiiiiiiiii\0"
"glBlitFramebuffer\0"
"glBlitFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[702]: TexCoord1f (offset 96) */
+ /* _mesa_function_pool[746]: TexCoord1f (offset 96) */
"f\0"
"glTexCoord1f\0"
"\0"
- /* _mesa_function_pool[718]: TexCoord1d (offset 94) */
+ /* _mesa_function_pool[762]: TexCoord1d (offset 94) */
"d\0"
"glTexCoord1d\0"
"\0"
- /* _mesa_function_pool[734]: VertexAttrib4ubvNV (will be remapped) */
+ /* _mesa_function_pool[778]: VertexAttrib4ubvNV (will be remapped) */
"ip\0"
"glVertexAttrib4ubvNV\0"
"\0"
- /* _mesa_function_pool[759]: TexCoord1i (offset 98) */
+ /* _mesa_function_pool[803]: TexCoord1i (offset 98) */
"i\0"
"glTexCoord1i\0"
"\0"
- /* _mesa_function_pool[775]: GetProgramNamedParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[819]: GetProgramNamedParameterdvNV (will be remapped) */
"iipp\0"
"glGetProgramNamedParameterdvNV\0"
"\0"
- /* _mesa_function_pool[812]: Histogram (offset 367) */
+ /* _mesa_function_pool[856]: Histogram (offset 367) */
"iiii\0"
"glHistogram\0"
"glHistogramEXT\0"
"\0"
- /* _mesa_function_pool[845]: TexCoord1s (offset 100) */
+ /* _mesa_function_pool[889]: TexCoord1s (offset 100) */
"i\0"
"glTexCoord1s\0"
"\0"
- /* _mesa_function_pool[861]: GetMapfv (offset 267) */
+ /* _mesa_function_pool[905]: GetMapfv (offset 267) */
"iip\0"
"glGetMapfv\0"
"\0"
- /* _mesa_function_pool[877]: EvalCoord1f (offset 230) */
+ /* _mesa_function_pool[921]: EvalCoord1f (offset 230) */
"f\0"
"glEvalCoord1f\0"
"\0"
- /* _mesa_function_pool[894]: TexImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[938]: FramebufferTexture (will be remapped) */
+ "iiii\0"
+ "glFramebufferTexture\0"
+ "\0"
+ /* _mesa_function_pool[965]: VertexAttribI1ivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI1ivEXT\0"
+ "glVertexAttribI1iv\0"
+ "\0"
+ /* _mesa_function_pool[1010]: TexImage4DSGIS (dynamic) */
"iiiiiiiiiip\0"
"glTexImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[924]: PolygonStipple (offset 175) */
+ /* _mesa_function_pool[1040]: PolygonStipple (offset 175) */
"p\0"
"glPolygonStipple\0"
"\0"
- /* _mesa_function_pool[944]: WindowPos2dvMESA (will be remapped) */
+ /* _mesa_function_pool[1060]: WindowPos2dvMESA (will be remapped) */
"p\0"
"glWindowPos2dv\0"
"glWindowPos2dvARB\0"
"glWindowPos2dvMESA\0"
"\0"
- /* _mesa_function_pool[999]: ReplacementCodeuiColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[1115]: ReplacementCodeuiColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[1043]: BlendEquationSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[1159]: BlendEquationSeparateEXT (will be remapped) */
"ii\0"
"glBlendEquationSeparate\0"
"glBlendEquationSeparateEXT\0"
"glBlendEquationSeparateATI\0"
"\0"
- /* _mesa_function_pool[1125]: ListParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[1241]: ListParameterfSGIX (dynamic) */
"iif\0"
"glListParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[1151]: SecondaryColor3bEXT (will be remapped) */
+ /* _mesa_function_pool[1267]: SecondaryColor3bEXT (will be remapped) */
"iii\0"
"glSecondaryColor3b\0"
"glSecondaryColor3bEXT\0"
"\0"
- /* _mesa_function_pool[1197]: TexCoord4fColor4fNormal3fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[1313]: TexCoord4fColor4fNormal3fVertex4fvSUN (dynamic) */
"pppp\0"
"glTexCoord4fColor4fNormal3fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[1243]: GetPixelMapfv (offset 271) */
+ /* _mesa_function_pool[1359]: GetPixelMapfv (offset 271) */
"ip\0"
"glGetPixelMapfv\0"
"\0"
- /* _mesa_function_pool[1263]: Color3uiv (offset 22) */
+ /* _mesa_function_pool[1379]: Color3uiv (offset 22) */
"p\0"
"glColor3uiv\0"
"\0"
- /* _mesa_function_pool[1278]: IsEnabled (offset 286) */
+ /* _mesa_function_pool[1394]: IsEnabled (offset 286) */
"i\0"
"glIsEnabled\0"
"\0"
- /* _mesa_function_pool[1293]: VertexAttrib4svNV (will be remapped) */
+ /* _mesa_function_pool[1409]: VertexAttrib4svNV (will be remapped) */
"ip\0"
"glVertexAttrib4svNV\0"
"\0"
- /* _mesa_function_pool[1317]: EvalCoord2fv (offset 235) */
+ /* _mesa_function_pool[1433]: EvalCoord2fv (offset 235) */
"p\0"
"glEvalCoord2fv\0"
"\0"
- /* _mesa_function_pool[1335]: GetBufferSubDataARB (will be remapped) */
+ /* _mesa_function_pool[1451]: GetBufferSubDataARB (will be remapped) */
"iiip\0"
"glGetBufferSubData\0"
"glGetBufferSubDataARB\0"
"\0"
- /* _mesa_function_pool[1382]: BufferSubDataARB (will be remapped) */
+ /* _mesa_function_pool[1498]: BufferSubDataARB (will be remapped) */
"iiip\0"
"glBufferSubData\0"
"glBufferSubDataARB\0"
"\0"
- /* _mesa_function_pool[1423]: TexCoord2fColor4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[1539]: TexCoord2fColor4ubVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[1461]: AttachShader (will be remapped) */
+ /* _mesa_function_pool[1577]: AttachShader (will be remapped) */
"ii\0"
"glAttachShader\0"
"\0"
- /* _mesa_function_pool[1480]: VertexAttrib2fARB (will be remapped) */
+ /* _mesa_function_pool[1596]: VertexAttrib2fARB (will be remapped) */
"iff\0"
"glVertexAttrib2f\0"
"glVertexAttrib2fARB\0"
"\0"
- /* _mesa_function_pool[1522]: GetDebugLogLengthMESA (dynamic) */
+ /* _mesa_function_pool[1638]: GetDebugLogLengthMESA (dynamic) */
"iii\0"
"glGetDebugLogLengthMESA\0"
"\0"
- /* _mesa_function_pool[1551]: GetMapiv (offset 268) */
+ /* _mesa_function_pool[1667]: GetMapiv (offset 268) */
"iip\0"
"glGetMapiv\0"
"\0"
- /* _mesa_function_pool[1567]: VertexAttrib3fARB (will be remapped) */
+ /* _mesa_function_pool[1683]: VertexAttrib3fARB (will be remapped) */
"ifff\0"
"glVertexAttrib3f\0"
"glVertexAttrib3fARB\0"
"\0"
- /* _mesa_function_pool[1610]: Indexubv (offset 316) */
+ /* _mesa_function_pool[1726]: Indexubv (offset 316) */
"p\0"
"glIndexubv\0"
"\0"
- /* _mesa_function_pool[1624]: GetQueryivARB (will be remapped) */
+ /* _mesa_function_pool[1740]: GetQueryivARB (will be remapped) */
"iip\0"
"glGetQueryiv\0"
"glGetQueryivARB\0"
"\0"
- /* _mesa_function_pool[1658]: TexImage3D (offset 371) */
+ /* _mesa_function_pool[1774]: TexImage3D (offset 371) */
"iiiiiiiiip\0"
"glTexImage3D\0"
"glTexImage3DEXT\0"
"\0"
- /* _mesa_function_pool[1699]: ReplacementCodeuiVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[1815]: BindFragDataLocationEXT (will be remapped) */
+ "iip\0"
+ "glBindFragDataLocationEXT\0"
+ "glBindFragDataLocation\0"
+ "\0"
+ /* _mesa_function_pool[1869]: ReplacementCodeuiVertex3fvSUN (dynamic) */
"pp\0"
"glReplacementCodeuiVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[1735]: EdgeFlagPointer (offset 312) */
+ /* _mesa_function_pool[1905]: EdgeFlagPointer (offset 312) */
"ip\0"
"glEdgeFlagPointer\0"
"\0"
- /* _mesa_function_pool[1757]: Color3ubv (offset 20) */
+ /* _mesa_function_pool[1927]: Color3ubv (offset 20) */
"p\0"
"glColor3ubv\0"
"\0"
- /* _mesa_function_pool[1772]: GetQueryObjectivARB (will be remapped) */
+ /* _mesa_function_pool[1942]: GetQueryObjectivARB (will be remapped) */
"iip\0"
"glGetQueryObjectiv\0"
"glGetQueryObjectivARB\0"
"\0"
- /* _mesa_function_pool[1818]: Vertex3dv (offset 135) */
+ /* _mesa_function_pool[1988]: Vertex3dv (offset 135) */
"p\0"
"glVertex3dv\0"
"\0"
- /* _mesa_function_pool[1833]: ReplacementCodeuiTexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[2003]: ReplacementCodeuiTexCoord2fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[1880]: CompressedTexSubImage2DARB (will be remapped) */
+ /* _mesa_function_pool[2050]: CompressedTexSubImage2DARB (will be remapped) */
"iiiiiiiip\0"
"glCompressedTexSubImage2D\0"
"glCompressedTexSubImage2DARB\0"
"\0"
- /* _mesa_function_pool[1946]: CombinerOutputNV (will be remapped) */
+ /* _mesa_function_pool[2116]: CombinerOutputNV (will be remapped) */
"iiiiiiiiii\0"
"glCombinerOutputNV\0"
"\0"
- /* _mesa_function_pool[1977]: VertexAttribs3fvNV (will be remapped) */
+ /* _mesa_function_pool[2147]: VertexAttribs3fvNV (will be remapped) */
"iip\0"
"glVertexAttribs3fvNV\0"
"\0"
- /* _mesa_function_pool[2003]: Uniform2fARB (will be remapped) */
+ /* _mesa_function_pool[2173]: Uniform2fARB (will be remapped) */
"iff\0"
"glUniform2f\0"
"glUniform2fARB\0"
"\0"
- /* _mesa_function_pool[2035]: LightModeliv (offset 166) */
+ /* _mesa_function_pool[2205]: LightModeliv (offset 166) */
"ip\0"
"glLightModeliv\0"
"\0"
- /* _mesa_function_pool[2054]: VertexAttrib1svARB (will be remapped) */
+ /* _mesa_function_pool[2224]: VertexAttrib1svARB (will be remapped) */
"ip\0"
"glVertexAttrib1sv\0"
"glVertexAttrib1svARB\0"
"\0"
- /* _mesa_function_pool[2097]: VertexAttribs1dvNV (will be remapped) */
+ /* _mesa_function_pool[2267]: VertexAttribs1dvNV (will be remapped) */
"iip\0"
"glVertexAttribs1dvNV\0"
"\0"
- /* _mesa_function_pool[2123]: Uniform2ivARB (will be remapped) */
+ /* _mesa_function_pool[2293]: Uniform2ivARB (will be remapped) */
"iip\0"
"glUniform2iv\0"
"glUniform2ivARB\0"
"\0"
- /* _mesa_function_pool[2157]: GetImageTransformParameterfvHP (dynamic) */
+ /* _mesa_function_pool[2327]: GetImageTransformParameterfvHP (dynamic) */
"iip\0"
"glGetImageTransformParameterfvHP\0"
"\0"
- /* _mesa_function_pool[2195]: Normal3bv (offset 53) */
+ /* _mesa_function_pool[2365]: Normal3bv (offset 53) */
"p\0"
"glNormal3bv\0"
"\0"
- /* _mesa_function_pool[2210]: TexGeniv (offset 193) */
+ /* _mesa_function_pool[2380]: TexGeniv (offset 193) */
"iip\0"
"glTexGeniv\0"
"\0"
- /* _mesa_function_pool[2226]: WeightubvARB (dynamic) */
+ /* _mesa_function_pool[2396]: WeightubvARB (dynamic) */
"ip\0"
"glWeightubvARB\0"
"\0"
- /* _mesa_function_pool[2245]: VertexAttrib1fvNV (will be remapped) */
+ /* _mesa_function_pool[2415]: VertexAttrib1fvNV (will be remapped) */
"ip\0"
"glVertexAttrib1fvNV\0"
"\0"
- /* _mesa_function_pool[2269]: Vertex3iv (offset 139) */
+ /* _mesa_function_pool[2439]: Vertex3iv (offset 139) */
"p\0"
"glVertex3iv\0"
"\0"
- /* _mesa_function_pool[2284]: CopyConvolutionFilter1D (offset 354) */
+ /* _mesa_function_pool[2454]: CopyConvolutionFilter1D (offset 354) */
"iiiii\0"
"glCopyConvolutionFilter1D\0"
"glCopyConvolutionFilter1DEXT\0"
"\0"
- /* _mesa_function_pool[2346]: ReplacementCodeuiNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[2516]: VertexAttribI1uiEXT (will be remapped) */
+ "ii\0"
+ "glVertexAttribI1uiEXT\0"
+ "glVertexAttribI1ui\0"
+ "\0"
+ /* _mesa_function_pool[2561]: ReplacementCodeuiNormal3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[2394]: DeleteSync (will be remapped) */
+ /* _mesa_function_pool[2609]: DeleteSync (will be remapped) */
"i\0"
"glDeleteSync\0"
"\0"
- /* _mesa_function_pool[2410]: FragmentMaterialfvSGIX (dynamic) */
+ /* _mesa_function_pool[2625]: FragmentMaterialfvSGIX (dynamic) */
"iip\0"
"glFragmentMaterialfvSGIX\0"
"\0"
- /* _mesa_function_pool[2440]: BlendColor (offset 336) */
+ /* _mesa_function_pool[2655]: BlendColor (offset 336) */
"ffff\0"
"glBlendColor\0"
"glBlendColorEXT\0"
"\0"
- /* _mesa_function_pool[2475]: UniformMatrix4fvARB (will be remapped) */
+ /* _mesa_function_pool[2690]: UniformMatrix4fvARB (will be remapped) */
"iiip\0"
"glUniformMatrix4fv\0"
"glUniformMatrix4fvARB\0"
"\0"
- /* _mesa_function_pool[2522]: DeleteVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[2737]: DeleteVertexArraysAPPLE (will be remapped) */
"ip\0"
"glDeleteVertexArrays\0"
"glDeleteVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[2573]: ReadInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[2788]: TexBuffer (will be remapped) */
+ "iii\0"
+ "glTexBuffer\0"
+ "\0"
+ /* _mesa_function_pool[2805]: ReadInstrumentsSGIX (dynamic) */
"i\0"
"glReadInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[2598]: CallLists (offset 3) */
+ /* _mesa_function_pool[2830]: CallLists (offset 3) */
"iip\0"
"glCallLists\0"
"\0"
- /* _mesa_function_pool[2615]: UniformMatrix2x4fv (will be remapped) */
+ /* _mesa_function_pool[2847]: UniformMatrix2x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x4fv\0"
"\0"
- /* _mesa_function_pool[2642]: Color4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[2874]: Color4ubVertex3fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[2669]: Normal3iv (offset 59) */
+ /* _mesa_function_pool[2901]: Normal3iv (offset 59) */
"p\0"
"glNormal3iv\0"
"\0"
- /* _mesa_function_pool[2684]: PassThrough (offset 199) */
+ /* _mesa_function_pool[2916]: PassThrough (offset 199) */
"f\0"
"glPassThrough\0"
"\0"
- /* _mesa_function_pool[2701]: FramebufferTextureLayerEXT (will be remapped) */
+ /* _mesa_function_pool[2933]: GetVertexAttribIivEXT (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribIivEXT\0"
+ "glGetVertexAttribIiv\0"
+ "\0"
+ /* _mesa_function_pool[2983]: TexParameterIivEXT (will be remapped) */
+ "iip\0"
+ "glTexParameterIivEXT\0"
+ "glTexParameterIiv\0"
+ "\0"
+ /* _mesa_function_pool[3027]: FramebufferTextureLayerEXT (will be remapped) */
"iiiii\0"
"glFramebufferTextureLayer\0"
"glFramebufferTextureLayerEXT\0"
"\0"
- /* _mesa_function_pool[2763]: GetListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[3089]: GetListParameterfvSGIX (dynamic) */
"iip\0"
"glGetListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[2793]: Viewport (offset 305) */
+ /* _mesa_function_pool[3119]: Viewport (offset 305) */
"iiii\0"
"glViewport\0"
"\0"
- /* _mesa_function_pool[2810]: VertexAttrib4NusvARB (will be remapped) */
+ /* _mesa_function_pool[3136]: VertexAttrib4NusvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nusv\0"
"glVertexAttrib4NusvARB\0"
"\0"
- /* _mesa_function_pool[2857]: WindowPos4svMESA (will be remapped) */
+ /* _mesa_function_pool[3183]: WindowPos4svMESA (will be remapped) */
"p\0"
"glWindowPos4svMESA\0"
"\0"
- /* _mesa_function_pool[2879]: CreateProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[3205]: CreateProgramObjectARB (will be remapped) */
"\0"
"glCreateProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[2906]: DeleteTransformFeedbacks (will be remapped) */
+ /* _mesa_function_pool[3232]: DeleteTransformFeedbacks (will be remapped) */
"ip\0"
"glDeleteTransformFeedbacks\0"
"\0"
- /* _mesa_function_pool[2937]: UniformMatrix4x3fv (will be remapped) */
+ /* _mesa_function_pool[3263]: UniformMatrix4x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x3fv\0"
"\0"
- /* _mesa_function_pool[2964]: PrioritizeTextures (offset 331) */
+ /* _mesa_function_pool[3290]: PrioritizeTextures (offset 331) */
"ipp\0"
"glPrioritizeTextures\0"
"glPrioritizeTexturesEXT\0"
"\0"
- /* _mesa_function_pool[3014]: AsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[3340]: VertexAttribI3uiEXT (will be remapped) */
+ "iiii\0"
+ "glVertexAttribI3uiEXT\0"
+ "glVertexAttribI3ui\0"
+ "\0"
+ /* _mesa_function_pool[3387]: AsyncMarkerSGIX (dynamic) */
"i\0"
"glAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[3035]: GlobalAlphaFactorubSUN (dynamic) */
+ /* _mesa_function_pool[3408]: GlobalAlphaFactorubSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorubSUN\0"
"\0"
- /* _mesa_function_pool[3063]: ClearDebugLogMESA (dynamic) */
+ /* _mesa_function_pool[3436]: ClearColorIuiEXT (will be remapped) */
+ "iiii\0"
+ "glClearColorIuiEXT\0"
+ "\0"
+ /* _mesa_function_pool[3461]: ClearDebugLogMESA (dynamic) */
"iii\0"
"glClearDebugLogMESA\0"
"\0"
- /* _mesa_function_pool[3088]: ResetHistogram (offset 369) */
+ /* _mesa_function_pool[3486]: Uniform4uiEXT (will be remapped) */
+ "iiiii\0"
+ "glUniform4uiEXT\0"
+ "glUniform4ui\0"
+ "\0"
+ /* _mesa_function_pool[3522]: ResetHistogram (offset 369) */
"i\0"
"glResetHistogram\0"
"glResetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[3128]: GetProgramNamedParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[3562]: GetProgramNamedParameterfvNV (will be remapped) */
"iipp\0"
"glGetProgramNamedParameterfvNV\0"
"\0"
- /* _mesa_function_pool[3165]: PointParameterfEXT (will be remapped) */
+ /* _mesa_function_pool[3599]: PointParameterfEXT (will be remapped) */
"if\0"
"glPointParameterf\0"
"glPointParameterfARB\0"
"glPointParameterfEXT\0"
"glPointParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[3251]: LoadIdentityDeformationMapSGIX (dynamic) */
+ /* _mesa_function_pool[3685]: LoadIdentityDeformationMapSGIX (dynamic) */
"i\0"
"glLoadIdentityDeformationMapSGIX\0"
"\0"
- /* _mesa_function_pool[3287]: GenFencesNV (will be remapped) */
+ /* _mesa_function_pool[3721]: GenFencesNV (will be remapped) */
"ip\0"
"glGenFencesNV\0"
"\0"
- /* _mesa_function_pool[3305]: ImageTransformParameterfHP (dynamic) */
+ /* _mesa_function_pool[3739]: ImageTransformParameterfHP (dynamic) */
"iif\0"
"glImageTransformParameterfHP\0"
"\0"
- /* _mesa_function_pool[3339]: MatrixIndexusvARB (dynamic) */
+ /* _mesa_function_pool[3773]: MatrixIndexusvARB (dynamic) */
"ip\0"
"glMatrixIndexusvARB\0"
"\0"
- /* _mesa_function_pool[3363]: DrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[3797]: DrawElementsBaseVertex (will be remapped) */
"iiipi\0"
"glDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[3395]: DisableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[3829]: DisableVertexAttribArrayARB (will be remapped) */
"i\0"
"glDisableVertexAttribArray\0"
"glDisableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[3455]: TexCoord2sv (offset 109) */
+ /* _mesa_function_pool[3889]: TexCoord2sv (offset 109) */
"p\0"
"glTexCoord2sv\0"
"\0"
- /* _mesa_function_pool[3472]: Vertex4dv (offset 143) */
+ /* _mesa_function_pool[3906]: Vertex4dv (offset 143) */
"p\0"
"glVertex4dv\0"
"\0"
- /* _mesa_function_pool[3487]: StencilMaskSeparate (will be remapped) */
+ /* _mesa_function_pool[3921]: StencilMaskSeparate (will be remapped) */
"ii\0"
"glStencilMaskSeparate\0"
"\0"
- /* _mesa_function_pool[3513]: ProgramLocalParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[3947]: ProgramLocalParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramLocalParameter4dARB\0"
"\0"
- /* _mesa_function_pool[3550]: CompressedTexImage3DARB (will be remapped) */
+ /* _mesa_function_pool[3984]: CompressedTexImage3DARB (will be remapped) */
"iiiiiiiip\0"
"glCompressedTexImage3D\0"
"glCompressedTexImage3DARB\0"
"\0"
- /* _mesa_function_pool[3610]: Color3sv (offset 18) */
+ /* _mesa_function_pool[4044]: Color3sv (offset 18) */
"p\0"
"glColor3sv\0"
"\0"
- /* _mesa_function_pool[3624]: GetConvolutionParameteriv (offset 358) */
+ /* _mesa_function_pool[4058]: GetConvolutionParameteriv (offset 358) */
"iip\0"
"glGetConvolutionParameteriv\0"
"glGetConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[3688]: VertexAttrib1fARB (will be remapped) */
+ /* _mesa_function_pool[4122]: VertexAttrib1fARB (will be remapped) */
"if\0"
"glVertexAttrib1f\0"
"glVertexAttrib1fARB\0"
"\0"
- /* _mesa_function_pool[3729]: Vertex2dv (offset 127) */
+ /* _mesa_function_pool[4163]: Vertex2dv (offset 127) */
"p\0"
"glVertex2dv\0"
"\0"
- /* _mesa_function_pool[3744]: TestFenceNV (will be remapped) */
+ /* _mesa_function_pool[4178]: TestFenceNV (will be remapped) */
"i\0"
"glTestFenceNV\0"
"\0"
- /* _mesa_function_pool[3761]: MultiTexCoord1fvARB (offset 379) */
+ /* _mesa_function_pool[4195]: GetVertexAttribIuivEXT (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribIuivEXT\0"
+ "glGetVertexAttribIuiv\0"
+ "\0"
+ /* _mesa_function_pool[4247]: MultiTexCoord1fvARB (offset 379) */
"ip\0"
"glMultiTexCoord1fv\0"
"glMultiTexCoord1fvARB\0"
"\0"
- /* _mesa_function_pool[3806]: TexCoord3iv (offset 115) */
+ /* _mesa_function_pool[4292]: TexCoord3iv (offset 115) */
"p\0"
"glTexCoord3iv\0"
"\0"
- /* _mesa_function_pool[3823]: ColorFragmentOp2ATI (will be remapped) */
+ /* _mesa_function_pool[4309]: Uniform2uivEXT (will be remapped) */
+ "iip\0"
+ "glUniform2uivEXT\0"
+ "glUniform2uiv\0"
+ "\0"
+ /* _mesa_function_pool[4345]: ColorFragmentOp2ATI (will be remapped) */
"iiiiiiiiii\0"
"glColorFragmentOp2ATI\0"
"\0"
- /* _mesa_function_pool[3857]: SecondaryColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[4379]: SecondaryColorPointerListIBM (dynamic) */
"iiipi\0"
"glSecondaryColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[3895]: GetPixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[4417]: GetPixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[3931]: Color3fv (offset 14) */
+ /* _mesa_function_pool[4453]: Color3fv (offset 14) */
"p\0"
"glColor3fv\0"
"\0"
- /* _mesa_function_pool[3945]: VertexAttrib4fNV (will be remapped) */
+ /* _mesa_function_pool[4467]: VertexAttrib4fNV (will be remapped) */
"iffff\0"
"glVertexAttrib4fNV\0"
"\0"
- /* _mesa_function_pool[3971]: ReplacementCodeubSUN (dynamic) */
+ /* _mesa_function_pool[4493]: ReplacementCodeubSUN (dynamic) */
"i\0"
"glReplacementCodeubSUN\0"
"\0"
- /* _mesa_function_pool[3997]: FinishAsyncSGIX (dynamic) */
+ /* _mesa_function_pool[4519]: FinishAsyncSGIX (dynamic) */
"p\0"
"glFinishAsyncSGIX\0"
"\0"
- /* _mesa_function_pool[4018]: GetDebugLogMESA (dynamic) */
+ /* _mesa_function_pool[4540]: GetDebugLogMESA (dynamic) */
"iiiipp\0"
"glGetDebugLogMESA\0"
"\0"
- /* _mesa_function_pool[4044]: FogCoorddEXT (will be remapped) */
+ /* _mesa_function_pool[4566]: FogCoorddEXT (will be remapped) */
"d\0"
"glFogCoordd\0"
"glFogCoorddEXT\0"
"\0"
- /* _mesa_function_pool[4074]: BeginConditionalRenderNV (will be remapped) */
+ /* _mesa_function_pool[4596]: BeginConditionalRenderNV (will be remapped) */
"ii\0"
"glBeginConditionalRenderNV\0"
+ "glBeginConditionalRender\0"
"\0"
- /* _mesa_function_pool[4105]: Color4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4652]: Color4ubVertex3fSUN (dynamic) */
"iiiifff\0"
"glColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4136]: FogCoordfEXT (will be remapped) */
+ /* _mesa_function_pool[4683]: FogCoordfEXT (will be remapped) */
"f\0"
"glFogCoordf\0"
"glFogCoordfEXT\0"
"\0"
- /* _mesa_function_pool[4166]: PointSize (offset 173) */
+ /* _mesa_function_pool[4713]: PointSize (offset 173) */
"f\0"
"glPointSize\0"
"\0"
- /* _mesa_function_pool[4181]: TexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4728]: VertexAttribI2uivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI2uivEXT\0"
+ "glVertexAttribI2uiv\0"
+ "\0"
+ /* _mesa_function_pool[4775]: TexCoord2fVertex3fSUN (dynamic) */
"fffff\0"
"glTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4212]: PopName (offset 200) */
+ /* _mesa_function_pool[4806]: PopName (offset 200) */
"\0"
"glPopName\0"
"\0"
- /* _mesa_function_pool[4224]: GlobalAlphaFactoriSUN (dynamic) */
+ /* _mesa_function_pool[4818]: GlobalAlphaFactoriSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoriSUN\0"
"\0"
- /* _mesa_function_pool[4251]: VertexAttrib2dNV (will be remapped) */
+ /* _mesa_function_pool[4845]: VertexAttrib2dNV (will be remapped) */
"idd\0"
"glVertexAttrib2dNV\0"
"\0"
- /* _mesa_function_pool[4275]: GetProgramInfoLog (will be remapped) */
+ /* _mesa_function_pool[4869]: GetProgramInfoLog (will be remapped) */
"iipp\0"
"glGetProgramInfoLog\0"
"\0"
- /* _mesa_function_pool[4301]: VertexAttrib4NbvARB (will be remapped) */
+ /* _mesa_function_pool[4895]: VertexAttrib4NbvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nbv\0"
"glVertexAttrib4NbvARB\0"
"\0"
- /* _mesa_function_pool[4346]: GetActiveAttribARB (will be remapped) */
+ /* _mesa_function_pool[4940]: GetActiveAttribARB (will be remapped) */
"iiipppp\0"
"glGetActiveAttrib\0"
"glGetActiveAttribARB\0"
"\0"
- /* _mesa_function_pool[4394]: Vertex4sv (offset 149) */
+ /* _mesa_function_pool[4988]: Vertex4sv (offset 149) */
"p\0"
"glVertex4sv\0"
"\0"
- /* _mesa_function_pool[4409]: VertexAttrib4ubNV (will be remapped) */
+ /* _mesa_function_pool[5003]: VertexAttrib4ubNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4ubNV\0"
"\0"
- /* _mesa_function_pool[4436]: TextureRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[5030]: ClampColor (will be remapped) */
+ "ii\0"
+ "glClampColor\0"
+ "\0"
+ /* _mesa_function_pool[5047]: TextureRangeAPPLE (will be remapped) */
"iip\0"
"glTextureRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[4461]: GetTexEnvfv (offset 276) */
+ /* _mesa_function_pool[5072]: GetTexEnvfv (offset 276) */
"iip\0"
"glGetTexEnvfv\0"
"\0"
- /* _mesa_function_pool[4480]: BindTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[5091]: BindTransformFeedback (will be remapped) */
"ii\0"
"glBindTransformFeedback\0"
"\0"
- /* _mesa_function_pool[4508]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[5119]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"ffffffffffff\0"
"glTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4561]: Indexub (offset 315) */
+ /* _mesa_function_pool[5172]: Indexub (offset 315) */
"i\0"
"glIndexub\0"
"\0"
- /* _mesa_function_pool[4574]: TexEnvi (offset 186) */
+ /* _mesa_function_pool[5185]: TexEnvi (offset 186) */
"iii\0"
"glTexEnvi\0"
"\0"
- /* _mesa_function_pool[4589]: GetClipPlane (offset 259) */
+ /* _mesa_function_pool[5200]: GetClipPlane (offset 259) */
"ip\0"
"glGetClipPlane\0"
"\0"
- /* _mesa_function_pool[4608]: CombinerParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[5219]: CombinerParameterfvNV (will be remapped) */
"ip\0"
"glCombinerParameterfvNV\0"
"\0"
- /* _mesa_function_pool[4636]: VertexAttribs3dvNV (will be remapped) */
+ /* _mesa_function_pool[5247]: VertexAttribs3dvNV (will be remapped) */
"iip\0"
"glVertexAttribs3dvNV\0"
"\0"
- /* _mesa_function_pool[4662]: VertexAttribs4fvNV (will be remapped) */
+ /* _mesa_function_pool[5273]: VertexAttribI2uiEXT (will be remapped) */
+ "iii\0"
+ "glVertexAttribI2uiEXT\0"
+ "glVertexAttribI2ui\0"
+ "\0"
+ /* _mesa_function_pool[5319]: VertexAttribs4fvNV (will be remapped) */
"iip\0"
"glVertexAttribs4fvNV\0"
"\0"
- /* _mesa_function_pool[4688]: VertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[5345]: VertexArrayRangeNV (will be remapped) */
"ip\0"
"glVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[4713]: FragmentLightiSGIX (dynamic) */
+ /* _mesa_function_pool[5370]: FragmentLightiSGIX (dynamic) */
"iii\0"
"glFragmentLightiSGIX\0"
"\0"
- /* _mesa_function_pool[4739]: PolygonOffsetEXT (will be remapped) */
+ /* _mesa_function_pool[5396]: PolygonOffsetEXT (will be remapped) */
"ff\0"
"glPolygonOffsetEXT\0"
"\0"
- /* _mesa_function_pool[4762]: PollAsyncSGIX (dynamic) */
+ /* _mesa_function_pool[5419]: VertexAttribI4uivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4uivEXT\0"
+ "glVertexAttribI4uiv\0"
+ "\0"
+ /* _mesa_function_pool[5466]: PollAsyncSGIX (dynamic) */
"p\0"
"glPollAsyncSGIX\0"
"\0"
- /* _mesa_function_pool[4781]: DeleteFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[5485]: DeleteFragmentShaderATI (will be remapped) */
"i\0"
"glDeleteFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[4810]: Scaled (offset 301) */
+ /* _mesa_function_pool[5514]: Scaled (offset 301) */
"ddd\0"
"glScaled\0"
"\0"
- /* _mesa_function_pool[4824]: ResumeTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[5528]: ResumeTransformFeedback (will be remapped) */
"\0"
"glResumeTransformFeedback\0"
"\0"
- /* _mesa_function_pool[4852]: Scalef (offset 302) */
+ /* _mesa_function_pool[5556]: Scalef (offset 302) */
"fff\0"
"glScalef\0"
"\0"
- /* _mesa_function_pool[4866]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[5570]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[4904]: MultTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[5608]: MultTransposeMatrixdARB (will be remapped) */
"p\0"
"glMultTransposeMatrixd\0"
"glMultTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[4956]: ColorMaskIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[5660]: ColorMaskIndexedEXT (will be remapped) */
"iiiii\0"
"glColorMaskIndexedEXT\0"
+ "glColorMaski\0"
"\0"
- /* _mesa_function_pool[4985]: ObjectUnpurgeableAPPLE (will be remapped) */
+ /* _mesa_function_pool[5702]: ObjectUnpurgeableAPPLE (will be remapped) */
"iii\0"
"glObjectUnpurgeableAPPLE\0"
"\0"
- /* _mesa_function_pool[5015]: AlphaFunc (offset 240) */
+ /* _mesa_function_pool[5732]: AlphaFunc (offset 240) */
"if\0"
"glAlphaFunc\0"
"\0"
- /* _mesa_function_pool[5031]: WindowPos2svMESA (will be remapped) */
+ /* _mesa_function_pool[5748]: WindowPos2svMESA (will be remapped) */
"p\0"
"glWindowPos2sv\0"
"glWindowPos2svARB\0"
"glWindowPos2svMESA\0"
"\0"
- /* _mesa_function_pool[5086]: EdgeFlag (offset 41) */
+ /* _mesa_function_pool[5803]: EdgeFlag (offset 41) */
"i\0"
"glEdgeFlag\0"
"\0"
- /* _mesa_function_pool[5100]: TexCoord2iv (offset 107) */
+ /* _mesa_function_pool[5817]: TexCoord2iv (offset 107) */
"p\0"
"glTexCoord2iv\0"
"\0"
- /* _mesa_function_pool[5117]: CompressedTexImage1DARB (will be remapped) */
+ /* _mesa_function_pool[5834]: CompressedTexImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexImage1D\0"
"glCompressedTexImage1DARB\0"
"\0"
- /* _mesa_function_pool[5175]: Rotated (offset 299) */
+ /* _mesa_function_pool[5892]: Rotated (offset 299) */
"dddd\0"
"glRotated\0"
"\0"
- /* _mesa_function_pool[5191]: VertexAttrib2sNV (will be remapped) */
+ /* _mesa_function_pool[5908]: GetTexParameterIuivEXT (will be remapped) */
+ "iip\0"
+ "glGetTexParameterIuivEXT\0"
+ "glGetTexParameterIuiv\0"
+ "\0"
+ /* _mesa_function_pool[5960]: VertexAttrib2sNV (will be remapped) */
"iii\0"
"glVertexAttrib2sNV\0"
"\0"
- /* _mesa_function_pool[5215]: ReadPixels (offset 256) */
+ /* _mesa_function_pool[5984]: ReadPixels (offset 256) */
"iiiiiip\0"
"glReadPixels\0"
"\0"
- /* _mesa_function_pool[5237]: EdgeFlagv (offset 42) */
+ /* _mesa_function_pool[6006]: EdgeFlagv (offset 42) */
"p\0"
"glEdgeFlagv\0"
"\0"
- /* _mesa_function_pool[5252]: NormalPointerListIBM (dynamic) */
+ /* _mesa_function_pool[6021]: NormalPointerListIBM (dynamic) */
"iipi\0"
"glNormalPointerListIBM\0"
"\0"
- /* _mesa_function_pool[5281]: IndexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6050]: IndexPointerEXT (will be remapped) */
"iiip\0"
"glIndexPointerEXT\0"
"\0"
- /* _mesa_function_pool[5305]: Color4iv (offset 32) */
+ /* _mesa_function_pool[6074]: Color4iv (offset 32) */
"p\0"
"glColor4iv\0"
"\0"
- /* _mesa_function_pool[5319]: TexParameterf (offset 178) */
+ /* _mesa_function_pool[6088]: TexParameterf (offset 178) */
"iif\0"
"glTexParameterf\0"
"\0"
- /* _mesa_function_pool[5340]: TexParameteri (offset 180) */
+ /* _mesa_function_pool[6109]: TexParameteri (offset 180) */
"iii\0"
"glTexParameteri\0"
"\0"
- /* _mesa_function_pool[5361]: NormalPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6130]: NormalPointerEXT (will be remapped) */
"iiip\0"
"glNormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[5386]: MultiTexCoord3dARB (offset 392) */
+ /* _mesa_function_pool[6155]: MultiTexCoord3dARB (offset 392) */
"iddd\0"
"glMultiTexCoord3d\0"
"glMultiTexCoord3dARB\0"
"\0"
- /* _mesa_function_pool[5431]: MultiTexCoord2iARB (offset 388) */
+ /* _mesa_function_pool[6200]: MultiTexCoord2iARB (offset 388) */
"iii\0"
"glMultiTexCoord2i\0"
"glMultiTexCoord2iARB\0"
"\0"
- /* _mesa_function_pool[5475]: DrawPixels (offset 257) */
+ /* _mesa_function_pool[6244]: DrawPixels (offset 257) */
"iiiip\0"
"glDrawPixels\0"
"\0"
- /* _mesa_function_pool[5495]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[6264]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
"iffffffff\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[5555]: MultiTexCoord2svARB (offset 391) */
+ /* _mesa_function_pool[6324]: MultiTexCoord2svARB (offset 391) */
"ip\0"
"glMultiTexCoord2sv\0"
"glMultiTexCoord2svARB\0"
"\0"
- /* _mesa_function_pool[5600]: ReplacementCodeubvSUN (dynamic) */
+ /* _mesa_function_pool[6369]: ReplacementCodeubvSUN (dynamic) */
"p\0"
"glReplacementCodeubvSUN\0"
"\0"
- /* _mesa_function_pool[5627]: Uniform3iARB (will be remapped) */
+ /* _mesa_function_pool[6396]: Uniform3iARB (will be remapped) */
"iiii\0"
"glUniform3i\0"
"glUniform3iARB\0"
"\0"
- /* _mesa_function_pool[5660]: DrawTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[6429]: DrawTransformFeedback (will be remapped) */
"ii\0"
"glDrawTransformFeedback\0"
"\0"
- /* _mesa_function_pool[5688]: GetFragmentMaterialfvSGIX (dynamic) */
- "iip\0"
- "glGetFragmentMaterialfvSGIX\0"
+ /* _mesa_function_pool[6457]: DrawElementsInstancedARB (will be remapped) */
+ "iiipi\0"
+ "glDrawElementsInstancedARB\0"
+ "glDrawElementsInstancedEXT\0"
+ "glDrawElementsInstanced\0"
"\0"
- /* _mesa_function_pool[5721]: GetShaderInfoLog (will be remapped) */
+ /* _mesa_function_pool[6542]: GetShaderInfoLog (will be remapped) */
"iipp\0"
"glGetShaderInfoLog\0"
"\0"
- /* _mesa_function_pool[5746]: WeightivARB (dynamic) */
+ /* _mesa_function_pool[6567]: WeightivARB (dynamic) */
"ip\0"
"glWeightivARB\0"
"\0"
- /* _mesa_function_pool[5764]: PollInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[6585]: PollInstrumentsSGIX (dynamic) */
"p\0"
"glPollInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[5789]: GlobalAlphaFactordSUN (dynamic) */
+ /* _mesa_function_pool[6610]: GlobalAlphaFactordSUN (dynamic) */
"d\0"
"glGlobalAlphaFactordSUN\0"
"\0"
- /* _mesa_function_pool[5816]: GetFinalCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[6637]: GetFinalCombinerInputParameterfvNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[5858]: GenerateMipmapEXT (will be remapped) */
+ /* _mesa_function_pool[6679]: GenerateMipmapEXT (will be remapped) */
"i\0"
"glGenerateMipmap\0"
"glGenerateMipmapEXT\0"
"\0"
- /* _mesa_function_pool[5898]: GenLists (offset 5) */
+ /* _mesa_function_pool[6719]: GenLists (offset 5) */
"i\0"
"glGenLists\0"
"\0"
- /* _mesa_function_pool[5912]: SetFragmentShaderConstantATI (will be remapped) */
+ /* _mesa_function_pool[6733]: SetFragmentShaderConstantATI (will be remapped) */
"ip\0"
"glSetFragmentShaderConstantATI\0"
"\0"
- /* _mesa_function_pool[5947]: GetMapAttribParameterivNV (dynamic) */
+ /* _mesa_function_pool[6768]: GetMapAttribParameterivNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterivNV\0"
"\0"
- /* _mesa_function_pool[5981]: CreateShaderObjectARB (will be remapped) */
+ /* _mesa_function_pool[6802]: CreateShaderObjectARB (will be remapped) */
"i\0"
"glCreateShaderObjectARB\0"
"\0"
- /* _mesa_function_pool[6008]: GetSharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6829]: GetSharpenTexFuncSGIS (dynamic) */
"ip\0"
"glGetSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[6036]: BufferDataARB (will be remapped) */
+ /* _mesa_function_pool[6857]: BufferDataARB (will be remapped) */
"iipi\0"
"glBufferData\0"
"glBufferDataARB\0"
"\0"
- /* _mesa_function_pool[6071]: FlushVertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[6892]: FlushVertexArrayRangeNV (will be remapped) */
"\0"
"glFlushVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[6099]: MapGrid2d (offset 226) */
+ /* _mesa_function_pool[6920]: MapGrid2d (offset 226) */
"iddidd\0"
"glMapGrid2d\0"
"\0"
- /* _mesa_function_pool[6119]: MapGrid2f (offset 227) */
+ /* _mesa_function_pool[6940]: MapGrid2f (offset 227) */
"iffiff\0"
"glMapGrid2f\0"
"\0"
- /* _mesa_function_pool[6139]: SampleMapATI (will be remapped) */
+ /* _mesa_function_pool[6960]: SampleMapATI (will be remapped) */
"iii\0"
"glSampleMapATI\0"
"\0"
- /* _mesa_function_pool[6159]: VertexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6980]: VertexPointerEXT (will be remapped) */
"iiiip\0"
"glVertexPointerEXT\0"
"\0"
- /* _mesa_function_pool[6185]: GetTexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[7006]: GetTexFilterFuncSGIS (dynamic) */
"iip\0"
"glGetTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[6213]: Scissor (offset 176) */
+ /* _mesa_function_pool[7034]: Scissor (offset 176) */
"iiii\0"
"glScissor\0"
"\0"
- /* _mesa_function_pool[6229]: Fogf (offset 153) */
+ /* _mesa_function_pool[7050]: Fogf (offset 153) */
"if\0"
"glFogf\0"
"\0"
- /* _mesa_function_pool[6240]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[7061]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[6285]: TexSubImage1D (offset 332) */
+ /* _mesa_function_pool[7106]: TexSubImage1D (offset 332) */
"iiiiiip\0"
"glTexSubImage1D\0"
"glTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[6329]: VertexAttrib1sARB (will be remapped) */
+ /* _mesa_function_pool[7150]: VertexAttrib1sARB (will be remapped) */
"ii\0"
"glVertexAttrib1s\0"
"glVertexAttrib1sARB\0"
"\0"
- /* _mesa_function_pool[6370]: FenceSync (will be remapped) */
+ /* _mesa_function_pool[7191]: FenceSync (will be remapped) */
"ii\0"
"glFenceSync\0"
"\0"
- /* _mesa_function_pool[6386]: Color4usv (offset 40) */
+ /* _mesa_function_pool[7207]: Color4usv (offset 40) */
"p\0"
"glColor4usv\0"
"\0"
- /* _mesa_function_pool[6401]: Fogi (offset 155) */
+ /* _mesa_function_pool[7222]: Fogi (offset 155) */
"ii\0"
"glFogi\0"
"\0"
- /* _mesa_function_pool[6412]: DepthRange (offset 288) */
+ /* _mesa_function_pool[7233]: DepthRange (offset 288) */
"dd\0"
"glDepthRange\0"
"\0"
- /* _mesa_function_pool[6429]: RasterPos3iv (offset 75) */
+ /* _mesa_function_pool[7250]: RasterPos3iv (offset 75) */
"p\0"
"glRasterPos3iv\0"
"\0"
- /* _mesa_function_pool[6447]: FinalCombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[7268]: FinalCombinerInputNV (will be remapped) */
"iiii\0"
"glFinalCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[6476]: TexCoord2i (offset 106) */
+ /* _mesa_function_pool[7297]: TexCoord2i (offset 106) */
"ii\0"
"glTexCoord2i\0"
"\0"
- /* _mesa_function_pool[6493]: PixelMapfv (offset 251) */
+ /* _mesa_function_pool[7314]: PixelMapfv (offset 251) */
"iip\0"
"glPixelMapfv\0"
"\0"
- /* _mesa_function_pool[6511]: Color4ui (offset 37) */
+ /* _mesa_function_pool[7332]: Color4ui (offset 37) */
"iiii\0"
"glColor4ui\0"
"\0"
- /* _mesa_function_pool[6528]: RasterPos3s (offset 76) */
+ /* _mesa_function_pool[7349]: RasterPos3s (offset 76) */
"iii\0"
"glRasterPos3s\0"
"\0"
- /* _mesa_function_pool[6547]: Color3usv (offset 24) */
+ /* _mesa_function_pool[7368]: Color3usv (offset 24) */
"p\0"
"glColor3usv\0"
"\0"
- /* _mesa_function_pool[6562]: FlushRasterSGIX (dynamic) */
+ /* _mesa_function_pool[7383]: FlushRasterSGIX (dynamic) */
"\0"
"glFlushRasterSGIX\0"
"\0"
- /* _mesa_function_pool[6582]: TexCoord2f (offset 104) */
+ /* _mesa_function_pool[7403]: TexCoord2f (offset 104) */
"ff\0"
"glTexCoord2f\0"
"\0"
- /* _mesa_function_pool[6599]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[7420]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
"ifffff\0"
"glReplacementCodeuiTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[6648]: TexCoord2d (offset 102) */
+ /* _mesa_function_pool[7469]: TexCoord2d (offset 102) */
"dd\0"
"glTexCoord2d\0"
"\0"
- /* _mesa_function_pool[6665]: RasterPos3d (offset 70) */
+ /* _mesa_function_pool[7486]: RasterPos3d (offset 70) */
"ddd\0"
"glRasterPos3d\0"
"\0"
- /* _mesa_function_pool[6684]: RasterPos3f (offset 72) */
+ /* _mesa_function_pool[7505]: RasterPos3f (offset 72) */
"fff\0"
"glRasterPos3f\0"
"\0"
- /* _mesa_function_pool[6703]: Uniform1fARB (will be remapped) */
+ /* _mesa_function_pool[7524]: Uniform1fARB (will be remapped) */
"if\0"
"glUniform1f\0"
"glUniform1fARB\0"
"\0"
- /* _mesa_function_pool[6734]: AreTexturesResident (offset 322) */
+ /* _mesa_function_pool[7555]: AreTexturesResident (offset 322) */
"ipp\0"
"glAreTexturesResident\0"
"glAreTexturesResidentEXT\0"
"\0"
- /* _mesa_function_pool[6786]: TexCoord2s (offset 108) */
+ /* _mesa_function_pool[7607]: TexCoord2s (offset 108) */
"ii\0"
"glTexCoord2s\0"
"\0"
- /* _mesa_function_pool[6803]: StencilOpSeparate (will be remapped) */
+ /* _mesa_function_pool[7624]: StencilOpSeparate (will be remapped) */
"iiii\0"
"glStencilOpSeparate\0"
"glStencilOpSeparateATI\0"
"\0"
- /* _mesa_function_pool[6852]: ColorTableParameteriv (offset 341) */
+ /* _mesa_function_pool[7673]: ColorTableParameteriv (offset 341) */
"iip\0"
"glColorTableParameteriv\0"
"glColorTableParameterivSGI\0"
"\0"
- /* _mesa_function_pool[6908]: FogCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[7729]: FogCoordPointerListIBM (dynamic) */
"iipi\0"
"glFogCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[6939]: WindowPos3dMESA (will be remapped) */
+ /* _mesa_function_pool[7760]: WindowPos3dMESA (will be remapped) */
"ddd\0"
"glWindowPos3d\0"
"glWindowPos3dARB\0"
"glWindowPos3dMESA\0"
"\0"
- /* _mesa_function_pool[6993]: Color4us (offset 39) */
+ /* _mesa_function_pool[7814]: Color4us (offset 39) */
"iiii\0"
"glColor4us\0"
"\0"
- /* _mesa_function_pool[7010]: PointParameterfvEXT (will be remapped) */
+ /* _mesa_function_pool[7831]: PointParameterfvEXT (will be remapped) */
"ip\0"
"glPointParameterfv\0"
"glPointParameterfvARB\0"
"glPointParameterfvEXT\0"
"glPointParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[7100]: Color3bv (offset 10) */
+ /* _mesa_function_pool[7921]: Color3bv (offset 10) */
"p\0"
"glColor3bv\0"
"\0"
- /* _mesa_function_pool[7114]: WindowPos2fvMESA (will be remapped) */
+ /* _mesa_function_pool[7935]: WindowPos2fvMESA (will be remapped) */
"p\0"
"glWindowPos2fv\0"
"glWindowPos2fvARB\0"
"glWindowPos2fvMESA\0"
"\0"
- /* _mesa_function_pool[7169]: SecondaryColor3bvEXT (will be remapped) */
+ /* _mesa_function_pool[7990]: SecondaryColor3bvEXT (will be remapped) */
"p\0"
"glSecondaryColor3bv\0"
"glSecondaryColor3bvEXT\0"
"\0"
- /* _mesa_function_pool[7215]: VertexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[8036]: VertexPointerListIBM (dynamic) */
"iiipi\0"
"glVertexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[7245]: GetProgramLocalParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[8066]: GetProgramLocalParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterfvARB\0"
"\0"
- /* _mesa_function_pool[7282]: FragmentMaterialfSGIX (dynamic) */
+ /* _mesa_function_pool[8103]: FragmentMaterialfSGIX (dynamic) */
"iif\0"
"glFragmentMaterialfSGIX\0"
"\0"
- /* _mesa_function_pool[7311]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[8132]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7353]: RenderbufferStorageEXT (will be remapped) */
+ /* _mesa_function_pool[8174]: RenderbufferStorageEXT (will be remapped) */
"iiii\0"
"glRenderbufferStorage\0"
"glRenderbufferStorageEXT\0"
"\0"
- /* _mesa_function_pool[7406]: IsFenceNV (will be remapped) */
+ /* _mesa_function_pool[8227]: IsFenceNV (will be remapped) */
"i\0"
"glIsFenceNV\0"
"\0"
- /* _mesa_function_pool[7421]: AttachObjectARB (will be remapped) */
+ /* _mesa_function_pool[8242]: AttachObjectARB (will be remapped) */
"ii\0"
"glAttachObjectARB\0"
"\0"
- /* _mesa_function_pool[7443]: GetFragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[8264]: GetFragmentLightivSGIX (dynamic) */
"iip\0"
"glGetFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[7473]: UniformMatrix2fvARB (will be remapped) */
+ /* _mesa_function_pool[8294]: UniformMatrix2fvARB (will be remapped) */
"iiip\0"
"glUniformMatrix2fv\0"
"glUniformMatrix2fvARB\0"
"\0"
- /* _mesa_function_pool[7520]: MultiTexCoord2fARB (offset 386) */
+ /* _mesa_function_pool[8341]: MultiTexCoord2fARB (offset 386) */
"iff\0"
"glMultiTexCoord2f\0"
"glMultiTexCoord2fARB\0"
"\0"
- /* _mesa_function_pool[7564]: ColorTable (offset 339) */
+ /* _mesa_function_pool[8385]: ColorTable (offset 339) */
"iiiiip\0"
"glColorTable\0"
"glColorTableSGI\0"
"glColorTableEXT\0"
"\0"
- /* _mesa_function_pool[7617]: IndexPointer (offset 314) */
+ /* _mesa_function_pool[8438]: IndexPointer (offset 314) */
"iip\0"
"glIndexPointer\0"
"\0"
- /* _mesa_function_pool[7637]: Accum (offset 213) */
+ /* _mesa_function_pool[8458]: Accum (offset 213) */
"if\0"
"glAccum\0"
"\0"
- /* _mesa_function_pool[7649]: GetTexImage (offset 281) */
+ /* _mesa_function_pool[8470]: GetTexImage (offset 281) */
"iiiip\0"
"glGetTexImage\0"
"\0"
- /* _mesa_function_pool[7670]: MapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[8491]: MapControlPointsNV (dynamic) */
"iiiiiiiip\0"
"glMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[7702]: ConvolutionFilter2D (offset 349) */
+ /* _mesa_function_pool[8523]: ConvolutionFilter2D (offset 349) */
"iiiiiip\0"
"glConvolutionFilter2D\0"
"glConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[7758]: Finish (offset 216) */
+ /* _mesa_function_pool[8579]: Finish (offset 216) */
"\0"
"glFinish\0"
"\0"
- /* _mesa_function_pool[7769]: MapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[8590]: MapParameterfvNV (dynamic) */
"iip\0"
"glMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[7793]: ClearStencil (offset 207) */
+ /* _mesa_function_pool[8614]: ClearStencil (offset 207) */
"i\0"
"glClearStencil\0"
"\0"
- /* _mesa_function_pool[7811]: VertexAttrib3dvARB (will be remapped) */
+ /* _mesa_function_pool[8632]: VertexAttrib3dvARB (will be remapped) */
"ip\0"
"glVertexAttrib3dv\0"
"glVertexAttrib3dvARB\0"
"\0"
- /* _mesa_function_pool[7854]: HintPGI (dynamic) */
+ /* _mesa_function_pool[8675]: Uniform4uivEXT (will be remapped) */
+ "iip\0"
+ "glUniform4uivEXT\0"
+ "glUniform4uiv\0"
+ "\0"
+ /* _mesa_function_pool[8711]: HintPGI (dynamic) */
"ii\0"
"glHintPGI\0"
"\0"
- /* _mesa_function_pool[7868]: ConvolutionParameteriv (offset 353) */
+ /* _mesa_function_pool[8725]: ConvolutionParameteriv (offset 353) */
"iip\0"
"glConvolutionParameteriv\0"
"glConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[7926]: Color4s (offset 33) */
+ /* _mesa_function_pool[8783]: Color4s (offset 33) */
"iiii\0"
"glColor4s\0"
"\0"
- /* _mesa_function_pool[7942]: InterleavedArrays (offset 317) */
+ /* _mesa_function_pool[8799]: InterleavedArrays (offset 317) */
"iip\0"
"glInterleavedArrays\0"
"\0"
- /* _mesa_function_pool[7967]: RasterPos2fv (offset 65) */
+ /* _mesa_function_pool[8824]: RasterPos2fv (offset 65) */
"p\0"
"glRasterPos2fv\0"
"\0"
- /* _mesa_function_pool[7985]: TexCoord1fv (offset 97) */
+ /* _mesa_function_pool[8842]: TexCoord1fv (offset 97) */
"p\0"
"glTexCoord1fv\0"
"\0"
- /* _mesa_function_pool[8002]: Vertex2d (offset 126) */
+ /* _mesa_function_pool[8859]: Vertex2d (offset 126) */
"dd\0"
"glVertex2d\0"
"\0"
- /* _mesa_function_pool[8017]: CullParameterdvEXT (dynamic) */
+ /* _mesa_function_pool[8874]: CullParameterdvEXT (dynamic) */
"ip\0"
"glCullParameterdvEXT\0"
"\0"
- /* _mesa_function_pool[8042]: ProgramNamedParameter4fNV (will be remapped) */
+ /* _mesa_function_pool[8899]: ProgramNamedParameter4fNV (will be remapped) */
"iipffff\0"
"glProgramNamedParameter4fNV\0"
"\0"
- /* _mesa_function_pool[8079]: Color3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[8936]: Color3fVertex3fSUN (dynamic) */
"ffffff\0"
"glColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[8108]: ProgramEnvParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[8965]: ProgramEnvParameter4fvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4fvARB\0"
"glProgramParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[8165]: Color4i (offset 31) */
+ /* _mesa_function_pool[9022]: Color4i (offset 31) */
"iiii\0"
"glColor4i\0"
"\0"
- /* _mesa_function_pool[8181]: Color4f (offset 29) */
+ /* _mesa_function_pool[9038]: Color4f (offset 29) */
"ffff\0"
"glColor4f\0"
"\0"
- /* _mesa_function_pool[8197]: RasterPos4fv (offset 81) */
+ /* _mesa_function_pool[9054]: RasterPos4fv (offset 81) */
"p\0"
"glRasterPos4fv\0"
"\0"
- /* _mesa_function_pool[8215]: Color4d (offset 27) */
+ /* _mesa_function_pool[9072]: Color4d (offset 27) */
"dddd\0"
"glColor4d\0"
"\0"
- /* _mesa_function_pool[8231]: ClearIndex (offset 205) */
+ /* _mesa_function_pool[9088]: ClearIndex (offset 205) */
"f\0"
"glClearIndex\0"
"\0"
- /* _mesa_function_pool[8247]: Color4b (offset 25) */
+ /* _mesa_function_pool[9104]: Color4b (offset 25) */
"iiii\0"
"glColor4b\0"
"\0"
- /* _mesa_function_pool[8263]: LoadMatrixd (offset 292) */
+ /* _mesa_function_pool[9120]: LoadMatrixd (offset 292) */
"p\0"
"glLoadMatrixd\0"
"\0"
- /* _mesa_function_pool[8280]: FragmentLightModeliSGIX (dynamic) */
+ /* _mesa_function_pool[9137]: FragmentLightModeliSGIX (dynamic) */
"ii\0"
"glFragmentLightModeliSGIX\0"
"\0"
- /* _mesa_function_pool[8310]: RasterPos2dv (offset 63) */
+ /* _mesa_function_pool[9167]: RasterPos2dv (offset 63) */
"p\0"
"glRasterPos2dv\0"
"\0"
- /* _mesa_function_pool[8328]: ConvolutionParameterfv (offset 351) */
+ /* _mesa_function_pool[9185]: ConvolutionParameterfv (offset 351) */
"iip\0"
"glConvolutionParameterfv\0"
"glConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[8386]: TbufferMask3DFX (dynamic) */
+ /* _mesa_function_pool[9243]: TbufferMask3DFX (dynamic) */
"i\0"
"glTbufferMask3DFX\0"
"\0"
- /* _mesa_function_pool[8407]: GetTexGendv (offset 278) */
+ /* _mesa_function_pool[9264]: GetTexGendv (offset 278) */
"iip\0"
"glGetTexGendv\0"
"\0"
- /* _mesa_function_pool[8426]: GetVertexAttribfvNV (will be remapped) */
+ /* _mesa_function_pool[9283]: GetVertexAttribfvNV (will be remapped) */
"iip\0"
"glGetVertexAttribfvNV\0"
"\0"
- /* _mesa_function_pool[8453]: BeginTransformFeedbackEXT (will be remapped) */
+ /* _mesa_function_pool[9310]: BeginTransformFeedbackEXT (will be remapped) */
"i\0"
"glBeginTransformFeedbackEXT\0"
"glBeginTransformFeedback\0"
"\0"
- /* _mesa_function_pool[8509]: LoadProgramNV (will be remapped) */
+ /* _mesa_function_pool[9366]: LoadProgramNV (will be remapped) */
"iiip\0"
"glLoadProgramNV\0"
"\0"
- /* _mesa_function_pool[8531]: WaitSync (will be remapped) */
+ /* _mesa_function_pool[9388]: WaitSync (will be remapped) */
"iii\0"
"glWaitSync\0"
"\0"
- /* _mesa_function_pool[8547]: EndList (offset 1) */
+ /* _mesa_function_pool[9404]: EndList (offset 1) */
"\0"
"glEndList\0"
"\0"
- /* _mesa_function_pool[8559]: VertexAttrib4fvNV (will be remapped) */
+ /* _mesa_function_pool[9416]: VertexAttrib4fvNV (will be remapped) */
"ip\0"
"glVertexAttrib4fvNV\0"
"\0"
- /* _mesa_function_pool[8583]: GetAttachedObjectsARB (will be remapped) */
+ /* _mesa_function_pool[9440]: GetAttachedObjectsARB (will be remapped) */
"iipp\0"
"glGetAttachedObjectsARB\0"
"\0"
- /* _mesa_function_pool[8613]: Uniform3fvARB (will be remapped) */
+ /* _mesa_function_pool[9470]: Uniform3fvARB (will be remapped) */
"iip\0"
"glUniform3fv\0"
"glUniform3fvARB\0"
"\0"
- /* _mesa_function_pool[8647]: EvalCoord1fv (offset 231) */
+ /* _mesa_function_pool[9504]: EvalCoord1fv (offset 231) */
"p\0"
"glEvalCoord1fv\0"
"\0"
- /* _mesa_function_pool[8665]: DrawRangeElements (offset 338) */
+ /* _mesa_function_pool[9522]: DrawRangeElements (offset 338) */
"iiiiip\0"
"glDrawRangeElements\0"
"glDrawRangeElementsEXT\0"
"\0"
- /* _mesa_function_pool[8716]: EvalMesh2 (offset 238) */
+ /* _mesa_function_pool[9573]: EvalMesh2 (offset 238) */
"iiiii\0"
"glEvalMesh2\0"
"\0"
- /* _mesa_function_pool[8735]: Vertex4fv (offset 145) */
+ /* _mesa_function_pool[9592]: Vertex4fv (offset 145) */
"p\0"
"glVertex4fv\0"
"\0"
- /* _mesa_function_pool[8750]: GenTransformFeedbacks (will be remapped) */
+ /* _mesa_function_pool[9607]: GenTransformFeedbacks (will be remapped) */
"ip\0"
"glGenTransformFeedbacks\0"
"\0"
- /* _mesa_function_pool[8778]: SpriteParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[9635]: SpriteParameterfvSGIX (dynamic) */
"ip\0"
"glSpriteParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[8806]: CheckFramebufferStatusEXT (will be remapped) */
+ /* _mesa_function_pool[9663]: CheckFramebufferStatusEXT (will be remapped) */
"i\0"
"glCheckFramebufferStatus\0"
"glCheckFramebufferStatusEXT\0"
"\0"
- /* _mesa_function_pool[8862]: GlobalAlphaFactoruiSUN (dynamic) */
+ /* _mesa_function_pool[9719]: GlobalAlphaFactoruiSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoruiSUN\0"
"\0"
- /* _mesa_function_pool[8890]: GetHandleARB (will be remapped) */
+ /* _mesa_function_pool[9747]: GetHandleARB (will be remapped) */
"i\0"
"glGetHandleARB\0"
"\0"
- /* _mesa_function_pool[8908]: GetVertexAttribivARB (will be remapped) */
+ /* _mesa_function_pool[9765]: GetVertexAttribivARB (will be remapped) */
"iip\0"
"glGetVertexAttribiv\0"
"glGetVertexAttribivARB\0"
"\0"
- /* _mesa_function_pool[8956]: GetCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[9813]: GetCombinerInputParameterfvNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[8995]: CreateProgram (will be remapped) */
+ /* _mesa_function_pool[9852]: GetTexParameterIivEXT (will be remapped) */
+ "iip\0"
+ "glGetTexParameterIivEXT\0"
+ "glGetTexParameterIiv\0"
+ "\0"
+ /* _mesa_function_pool[9902]: CreateProgram (will be remapped) */
"\0"
"glCreateProgram\0"
"\0"
- /* _mesa_function_pool[9013]: LoadTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[9920]: LoadTransposeMatrixdARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixd\0"
"glLoadTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[9065]: GetMinmax (offset 364) */
+ /* _mesa_function_pool[9972]: GetMinmax (offset 364) */
"iiiip\0"
"glGetMinmax\0"
"glGetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[9099]: StencilFuncSeparate (will be remapped) */
+ /* _mesa_function_pool[10006]: StencilFuncSeparate (will be remapped) */
"iiii\0"
"glStencilFuncSeparate\0"
"\0"
- /* _mesa_function_pool[9127]: SecondaryColor3sEXT (will be remapped) */
+ /* _mesa_function_pool[10034]: SecondaryColor3sEXT (will be remapped) */
"iii\0"
"glSecondaryColor3s\0"
"glSecondaryColor3sEXT\0"
"\0"
- /* _mesa_function_pool[9173]: Color3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10080]: Color3fVertex3fvSUN (dynamic) */
"pp\0"
"glColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[9199]: Normal3fv (offset 57) */
+ /* _mesa_function_pool[10106]: GetInteger64i_v (will be remapped) */
+ "iip\0"
+ "glGetInteger64i_v\0"
+ "\0"
+ /* _mesa_function_pool[10129]: Normal3fv (offset 57) */
"p\0"
"glNormal3fv\0"
"\0"
- /* _mesa_function_pool[9214]: GlobalAlphaFactorbSUN (dynamic) */
+ /* _mesa_function_pool[10144]: GlobalAlphaFactorbSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorbSUN\0"
"\0"
- /* _mesa_function_pool[9241]: Color3us (offset 23) */
+ /* _mesa_function_pool[10171]: Color3us (offset 23) */
"iii\0"
"glColor3us\0"
"\0"
- /* _mesa_function_pool[9257]: ImageTransformParameterfvHP (dynamic) */
+ /* _mesa_function_pool[10187]: ImageTransformParameterfvHP (dynamic) */
"iip\0"
"glImageTransformParameterfvHP\0"
"\0"
- /* _mesa_function_pool[9292]: VertexAttrib4ivARB (will be remapped) */
+ /* _mesa_function_pool[10222]: VertexAttrib4ivARB (will be remapped) */
"ip\0"
"glVertexAttrib4iv\0"
"glVertexAttrib4ivARB\0"
"\0"
- /* _mesa_function_pool[9335]: End (offset 43) */
+ /* _mesa_function_pool[10265]: End (offset 43) */
"\0"
"glEnd\0"
"\0"
- /* _mesa_function_pool[9343]: VertexAttrib3fNV (will be remapped) */
+ /* _mesa_function_pool[10273]: VertexAttrib3fNV (will be remapped) */
"ifff\0"
"glVertexAttrib3fNV\0"
"\0"
- /* _mesa_function_pool[9368]: VertexAttribs2dvNV (will be remapped) */
+ /* _mesa_function_pool[10298]: VertexAttribs2dvNV (will be remapped) */
"iip\0"
"glVertexAttribs2dvNV\0"
"\0"
- /* _mesa_function_pool[9394]: GetQueryObjectui64vEXT (will be remapped) */
+ /* _mesa_function_pool[10324]: GetQueryObjectui64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjectui64vEXT\0"
"\0"
- /* _mesa_function_pool[9424]: MultiTexCoord3fvARB (offset 395) */
+ /* _mesa_function_pool[10354]: MultiTexCoord3fvARB (offset 395) */
"ip\0"
"glMultiTexCoord3fv\0"
"glMultiTexCoord3fvARB\0"
"\0"
- /* _mesa_function_pool[9469]: SecondaryColor3dEXT (will be remapped) */
+ /* _mesa_function_pool[10399]: SecondaryColor3dEXT (will be remapped) */
"ddd\0"
"glSecondaryColor3d\0"
"glSecondaryColor3dEXT\0"
"\0"
- /* _mesa_function_pool[9515]: Color3ub (offset 19) */
+ /* _mesa_function_pool[10445]: Color3ub (offset 19) */
"iii\0"
"glColor3ub\0"
"\0"
- /* _mesa_function_pool[9531]: GetProgramParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[10461]: GetProgramParameterfvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterfvNV\0"
"\0"
- /* _mesa_function_pool[9563]: TangentPointerEXT (dynamic) */
+ /* _mesa_function_pool[10493]: TangentPointerEXT (dynamic) */
"iip\0"
"glTangentPointerEXT\0"
"\0"
- /* _mesa_function_pool[9588]: Color4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10518]: Color4fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[9623]: GetInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[10553]: GetInstrumentsSGIX (dynamic) */
"\0"
"glGetInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[9646]: Color3ui (offset 21) */
+ /* _mesa_function_pool[10576]: GetUniformuivEXT (will be remapped) */
+ "iip\0"
+ "glGetUniformuivEXT\0"
+ "glGetUniformuiv\0"
+ "\0"
+ /* _mesa_function_pool[10616]: Color3ui (offset 21) */
"iii\0"
"glColor3ui\0"
"\0"
- /* _mesa_function_pool[9662]: EvalMapsNV (dynamic) */
+ /* _mesa_function_pool[10632]: EvalMapsNV (dynamic) */
"ii\0"
"glEvalMapsNV\0"
"\0"
- /* _mesa_function_pool[9679]: TexSubImage2D (offset 333) */
+ /* _mesa_function_pool[10649]: TexSubImage2D (offset 333) */
"iiiiiiiip\0"
"glTexSubImage2D\0"
"glTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[9725]: FragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[10695]: FragmentLightivSGIX (dynamic) */
"iip\0"
"glFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[9752]: GetTexParameterPointervAPPLE (will be remapped) */
+ /* _mesa_function_pool[10722]: GetTexParameterPointervAPPLE (will be remapped) */
"iip\0"
"glGetTexParameterPointervAPPLE\0"
"\0"
- /* _mesa_function_pool[9788]: TexGenfv (offset 191) */
+ /* _mesa_function_pool[10758]: TexGenfv (offset 191) */
"iip\0"
"glTexGenfv\0"
"\0"
- /* _mesa_function_pool[9804]: GetTransformFeedbackVaryingEXT (will be remapped) */
+ /* _mesa_function_pool[10774]: GetTransformFeedbackVaryingEXT (will be remapped) */
"iiipppp\0"
"glGetTransformFeedbackVaryingEXT\0"
"glGetTransformFeedbackVarying\0"
"\0"
- /* _mesa_function_pool[9876]: VertexAttrib4bvARB (will be remapped) */
+ /* _mesa_function_pool[10846]: VertexAttrib4bvARB (will be remapped) */
"ip\0"
"glVertexAttrib4bv\0"
"glVertexAttrib4bvARB\0"
"\0"
- /* _mesa_function_pool[9919]: AlphaFragmentOp2ATI (will be remapped) */
+ /* _mesa_function_pool[10889]: AlphaFragmentOp2ATI (will be remapped) */
"iiiiiiiii\0"
"glAlphaFragmentOp2ATI\0"
"\0"
- /* _mesa_function_pool[9952]: GetIntegerIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[10922]: GetIntegerIndexedvEXT (will be remapped) */
"iip\0"
"glGetIntegerIndexedvEXT\0"
+ "glGetIntegeri_v\0"
"\0"
- /* _mesa_function_pool[9981]: MultiTexCoord4sARB (offset 406) */
+ /* _mesa_function_pool[10967]: MultiTexCoord4sARB (offset 406) */
"iiiii\0"
"glMultiTexCoord4s\0"
"glMultiTexCoord4sARB\0"
"\0"
- /* _mesa_function_pool[10027]: GetFragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[11013]: GetFragmentMaterialivSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[10060]: WindowPos4dMESA (will be remapped) */
+ /* _mesa_function_pool[11046]: WindowPos4dMESA (will be remapped) */
"dddd\0"
"glWindowPos4dMESA\0"
"\0"
- /* _mesa_function_pool[10084]: WeightPointerARB (dynamic) */
+ /* _mesa_function_pool[11070]: WeightPointerARB (dynamic) */
"iiip\0"
"glWeightPointerARB\0"
"\0"
- /* _mesa_function_pool[10109]: WindowPos2dMESA (will be remapped) */
+ /* _mesa_function_pool[11095]: WindowPos2dMESA (will be remapped) */
"dd\0"
"glWindowPos2d\0"
"glWindowPos2dARB\0"
"glWindowPos2dMESA\0"
"\0"
- /* _mesa_function_pool[10162]: FramebufferTexture3DEXT (will be remapped) */
+ /* _mesa_function_pool[11148]: FramebufferTexture3DEXT (will be remapped) */
"iiiiii\0"
"glFramebufferTexture3D\0"
"glFramebufferTexture3DEXT\0"
"\0"
- /* _mesa_function_pool[10219]: BlendEquation (offset 337) */
+ /* _mesa_function_pool[11205]: BlendEquation (offset 337) */
"i\0"
"glBlendEquation\0"
"glBlendEquationEXT\0"
"\0"
- /* _mesa_function_pool[10257]: VertexAttrib3dNV (will be remapped) */
+ /* _mesa_function_pool[11243]: VertexAttrib3dNV (will be remapped) */
"iddd\0"
"glVertexAttrib3dNV\0"
"\0"
- /* _mesa_function_pool[10282]: VertexAttrib3dARB (will be remapped) */
+ /* _mesa_function_pool[11268]: VertexAttrib3dARB (will be remapped) */
"iddd\0"
"glVertexAttrib3d\0"
"glVertexAttrib3dARB\0"
"\0"
- /* _mesa_function_pool[10325]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[11311]: VertexAttribI4usvEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4usvEXT\0"
+ "glVertexAttribI4usv\0"
+ "\0"
+ /* _mesa_function_pool[11358]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"ppppp\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[10389]: VertexAttrib4fARB (will be remapped) */
+ /* _mesa_function_pool[11422]: VertexAttrib4fARB (will be remapped) */
"iffff\0"
"glVertexAttrib4f\0"
"glVertexAttrib4fARB\0"
"\0"
- /* _mesa_function_pool[10433]: GetError (offset 261) */
+ /* _mesa_function_pool[11466]: GetError (offset 261) */
"\0"
"glGetError\0"
"\0"
- /* _mesa_function_pool[10446]: IndexFuncEXT (dynamic) */
+ /* _mesa_function_pool[11479]: IndexFuncEXT (dynamic) */
"if\0"
"glIndexFuncEXT\0"
"\0"
- /* _mesa_function_pool[10465]: TexCoord3dv (offset 111) */
+ /* _mesa_function_pool[11498]: TexCoord3dv (offset 111) */
"p\0"
"glTexCoord3dv\0"
"\0"
- /* _mesa_function_pool[10482]: Indexdv (offset 45) */
+ /* _mesa_function_pool[11515]: Indexdv (offset 45) */
"p\0"
"glIndexdv\0"
"\0"
- /* _mesa_function_pool[10495]: FramebufferTexture2DEXT (will be remapped) */
+ /* _mesa_function_pool[11528]: FramebufferTexture2DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture2D\0"
"glFramebufferTexture2DEXT\0"
"\0"
- /* _mesa_function_pool[10551]: Normal3s (offset 60) */
+ /* _mesa_function_pool[11584]: Normal3s (offset 60) */
"iii\0"
"glNormal3s\0"
"\0"
- /* _mesa_function_pool[10567]: GetObjectParameterivAPPLE (will be remapped) */
+ /* _mesa_function_pool[11600]: GetObjectParameterivAPPLE (will be remapped) */
"iiip\0"
"glGetObjectParameterivAPPLE\0"
"\0"
- /* _mesa_function_pool[10601]: PushName (offset 201) */
+ /* _mesa_function_pool[11634]: PushName (offset 201) */
"i\0"
"glPushName\0"
"\0"
- /* _mesa_function_pool[10615]: MultiTexCoord2dvARB (offset 385) */
+ /* _mesa_function_pool[11648]: MultiTexCoord2dvARB (offset 385) */
"ip\0"
"glMultiTexCoord2dv\0"
"glMultiTexCoord2dvARB\0"
"\0"
- /* _mesa_function_pool[10660]: CullParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[11693]: CullParameterfvEXT (dynamic) */
"ip\0"
"glCullParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[10685]: Normal3i (offset 58) */
+ /* _mesa_function_pool[11718]: Normal3i (offset 58) */
"iii\0"
"glNormal3i\0"
"\0"
- /* _mesa_function_pool[10701]: ProgramNamedParameter4fvNV (will be remapped) */
+ /* _mesa_function_pool[11734]: ProgramNamedParameter4fvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[10736]: SecondaryColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[11769]: SecondaryColorPointerEXT (will be remapped) */
"iiip\0"
"glSecondaryColorPointer\0"
"glSecondaryColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[10793]: VertexAttrib4fvARB (will be remapped) */
+ /* _mesa_function_pool[11826]: VertexAttrib4fvARB (will be remapped) */
"ip\0"
"glVertexAttrib4fv\0"
"glVertexAttrib4fvARB\0"
"\0"
- /* _mesa_function_pool[10836]: ColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[11869]: ColorPointerListIBM (dynamic) */
"iiipi\0"
"glColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[10865]: GetActiveUniformARB (will be remapped) */
+ /* _mesa_function_pool[11898]: GetActiveUniformARB (will be remapped) */
"iiipppp\0"
"glGetActiveUniform\0"
"glGetActiveUniformARB\0"
"\0"
- /* _mesa_function_pool[10915]: ImageTransformParameteriHP (dynamic) */
+ /* _mesa_function_pool[11948]: ImageTransformParameteriHP (dynamic) */
"iii\0"
"glImageTransformParameteriHP\0"
"\0"
- /* _mesa_function_pool[10949]: Normal3b (offset 52) */
+ /* _mesa_function_pool[11982]: Normal3b (offset 52) */
"iii\0"
"glNormal3b\0"
"\0"
- /* _mesa_function_pool[10965]: Normal3d (offset 54) */
+ /* _mesa_function_pool[11998]: Normal3d (offset 54) */
"ddd\0"
"glNormal3d\0"
"\0"
- /* _mesa_function_pool[10981]: Normal3f (offset 56) */
+ /* _mesa_function_pool[12014]: Uniform1uiEXT (will be remapped) */
+ "ii\0"
+ "glUniform1uiEXT\0"
+ "glUniform1ui\0"
+ "\0"
+ /* _mesa_function_pool[12047]: Normal3f (offset 56) */
"fff\0"
"glNormal3f\0"
"\0"
- /* _mesa_function_pool[10997]: MultiTexCoord1svARB (offset 383) */
+ /* _mesa_function_pool[12063]: MultiTexCoord1svARB (offset 383) */
"ip\0"
"glMultiTexCoord1sv\0"
"glMultiTexCoord1svARB\0"
"\0"
- /* _mesa_function_pool[11042]: Indexi (offset 48) */
+ /* _mesa_function_pool[12108]: Indexi (offset 48) */
"i\0"
"glIndexi\0"
"\0"
- /* _mesa_function_pool[11054]: EGLImageTargetTexture2DOES (will be remapped) */
+ /* _mesa_function_pool[12120]: EGLImageTargetTexture2DOES (will be remapped) */
"ip\0"
"glEGLImageTargetTexture2DOES\0"
"\0"
- /* _mesa_function_pool[11087]: EndQueryARB (will be remapped) */
+ /* _mesa_function_pool[12153]: EndQueryARB (will be remapped) */
"i\0"
"glEndQuery\0"
"glEndQueryARB\0"
"\0"
- /* _mesa_function_pool[11115]: DeleteFencesNV (will be remapped) */
+ /* _mesa_function_pool[12181]: DeleteFencesNV (will be remapped) */
"ip\0"
"glDeleteFencesNV\0"
"\0"
- /* _mesa_function_pool[11136]: BindBufferRangeEXT (will be remapped) */
+ /* _mesa_function_pool[12202]: BindBufferRangeEXT (will be remapped) */
"iiiii\0"
"glBindBufferRangeEXT\0"
"glBindBufferRange\0"
"\0"
- /* _mesa_function_pool[11182]: DepthMask (offset 211) */
+ /* _mesa_function_pool[12248]: DepthMask (offset 211) */
"i\0"
"glDepthMask\0"
"\0"
- /* _mesa_function_pool[11197]: IsShader (will be remapped) */
+ /* _mesa_function_pool[12263]: IsShader (will be remapped) */
"i\0"
"glIsShader\0"
"\0"
- /* _mesa_function_pool[11211]: Indexf (offset 46) */
+ /* _mesa_function_pool[12277]: Indexf (offset 46) */
"f\0"
"glIndexf\0"
"\0"
- /* _mesa_function_pool[11223]: GetImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[12289]: GetImageTransformParameterivHP (dynamic) */
"iip\0"
"glGetImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[11261]: Indexd (offset 44) */
+ /* _mesa_function_pool[12327]: Indexd (offset 44) */
"d\0"
"glIndexd\0"
"\0"
- /* _mesa_function_pool[11273]: GetMaterialiv (offset 270) */
+ /* _mesa_function_pool[12339]: GetMaterialiv (offset 270) */
"iip\0"
"glGetMaterialiv\0"
"\0"
- /* _mesa_function_pool[11294]: StencilOp (offset 244) */
+ /* _mesa_function_pool[12360]: StencilOp (offset 244) */
"iii\0"
"glStencilOp\0"
"\0"
- /* _mesa_function_pool[11311]: WindowPos4ivMESA (will be remapped) */
+ /* _mesa_function_pool[12377]: WindowPos4ivMESA (will be remapped) */
"p\0"
"glWindowPos4ivMESA\0"
"\0"
- /* _mesa_function_pool[11333]: FramebufferTextureLayer (dynamic) */
+ /* _mesa_function_pool[12399]: FramebufferTextureLayer (dynamic) */
"iiiii\0"
"glFramebufferTextureLayerARB\0"
"\0"
- /* _mesa_function_pool[11369]: MultiTexCoord3svARB (offset 399) */
+ /* _mesa_function_pool[12435]: MultiTexCoord3svARB (offset 399) */
"ip\0"
"glMultiTexCoord3sv\0"
"glMultiTexCoord3svARB\0"
"\0"
- /* _mesa_function_pool[11414]: TexEnvfv (offset 185) */
+ /* _mesa_function_pool[12480]: TexEnvfv (offset 185) */
"iip\0"
"glTexEnvfv\0"
"\0"
- /* _mesa_function_pool[11430]: MultiTexCoord4iARB (offset 404) */
+ /* _mesa_function_pool[12496]: MultiTexCoord4iARB (offset 404) */
"iiiii\0"
"glMultiTexCoord4i\0"
"glMultiTexCoord4iARB\0"
"\0"
- /* _mesa_function_pool[11476]: Indexs (offset 50) */
+ /* _mesa_function_pool[12542]: Indexs (offset 50) */
"i\0"
"glIndexs\0"
"\0"
- /* _mesa_function_pool[11488]: Binormal3ivEXT (dynamic) */
+ /* _mesa_function_pool[12554]: Binormal3ivEXT (dynamic) */
"p\0"
"glBinormal3ivEXT\0"
"\0"
- /* _mesa_function_pool[11508]: ResizeBuffersMESA (will be remapped) */
+ /* _mesa_function_pool[12574]: ResizeBuffersMESA (will be remapped) */
"\0"
"glResizeBuffersMESA\0"
"\0"
- /* _mesa_function_pool[11530]: GetUniformivARB (will be remapped) */
+ /* _mesa_function_pool[12596]: GetUniformivARB (will be remapped) */
"iip\0"
"glGetUniformiv\0"
"glGetUniformivARB\0"
"\0"
- /* _mesa_function_pool[11568]: PixelTexGenParameteriSGIS (will be remapped) */
+ /* _mesa_function_pool[12634]: PixelTexGenParameteriSGIS (will be remapped) */
"ii\0"
"glPixelTexGenParameteriSGIS\0"
"\0"
- /* _mesa_function_pool[11600]: VertexPointervINTEL (dynamic) */
+ /* _mesa_function_pool[12666]: VertexPointervINTEL (dynamic) */
"iip\0"
"glVertexPointervINTEL\0"
"\0"
- /* _mesa_function_pool[11627]: Vertex2i (offset 130) */
+ /* _mesa_function_pool[12693]: Vertex2i (offset 130) */
"ii\0"
"glVertex2i\0"
"\0"
- /* _mesa_function_pool[11642]: LoadMatrixf (offset 291) */
+ /* _mesa_function_pool[12708]: LoadMatrixf (offset 291) */
"p\0"
"glLoadMatrixf\0"
"\0"
- /* _mesa_function_pool[11659]: Vertex2f (offset 128) */
+ /* _mesa_function_pool[12725]: VertexAttribI1uivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI1uivEXT\0"
+ "glVertexAttribI1uiv\0"
+ "\0"
+ /* _mesa_function_pool[12772]: Vertex2f (offset 128) */
"ff\0"
"glVertex2f\0"
"\0"
- /* _mesa_function_pool[11674]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[12787]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[11727]: Color4bv (offset 26) */
+ /* _mesa_function_pool[12840]: Color4bv (offset 26) */
"p\0"
"glColor4bv\0"
"\0"
- /* _mesa_function_pool[11741]: VertexPointer (offset 321) */
+ /* _mesa_function_pool[12854]: VertexPointer (offset 321) */
"iiip\0"
"glVertexPointer\0"
"\0"
- /* _mesa_function_pool[11763]: SecondaryColor3uiEXT (will be remapped) */
+ /* _mesa_function_pool[12876]: SecondaryColor3uiEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ui\0"
"glSecondaryColor3uiEXT\0"
"\0"
- /* _mesa_function_pool[11811]: StartInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[12924]: StartInstrumentsSGIX (dynamic) */
"\0"
"glStartInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[11836]: SecondaryColor3usvEXT (will be remapped) */
+ /* _mesa_function_pool[12949]: SecondaryColor3usvEXT (will be remapped) */
"p\0"
"glSecondaryColor3usv\0"
"glSecondaryColor3usvEXT\0"
"\0"
- /* _mesa_function_pool[11884]: VertexAttrib2fvNV (will be remapped) */
+ /* _mesa_function_pool[12997]: VertexAttrib2fvNV (will be remapped) */
"ip\0"
"glVertexAttrib2fvNV\0"
"\0"
- /* _mesa_function_pool[11908]: ProgramLocalParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[13021]: ProgramLocalParameter4dvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4dvARB\0"
"\0"
- /* _mesa_function_pool[11943]: DeleteLists (offset 4) */
+ /* _mesa_function_pool[13056]: DeleteLists (offset 4) */
"ii\0"
"glDeleteLists\0"
"\0"
- /* _mesa_function_pool[11961]: LogicOp (offset 242) */
+ /* _mesa_function_pool[13074]: LogicOp (offset 242) */
"i\0"
"glLogicOp\0"
"\0"
- /* _mesa_function_pool[11974]: MatrixIndexuivARB (dynamic) */
+ /* _mesa_function_pool[13087]: MatrixIndexuivARB (dynamic) */
"ip\0"
"glMatrixIndexuivARB\0"
"\0"
- /* _mesa_function_pool[11998]: Vertex2s (offset 132) */
+ /* _mesa_function_pool[13111]: Vertex2s (offset 132) */
"ii\0"
"glVertex2s\0"
"\0"
- /* _mesa_function_pool[12013]: RenderbufferStorageMultisample (will be remapped) */
+ /* _mesa_function_pool[13126]: RenderbufferStorageMultisample (will be remapped) */
"iiiii\0"
"glRenderbufferStorageMultisample\0"
"glRenderbufferStorageMultisampleEXT\0"
"\0"
- /* _mesa_function_pool[12089]: TexCoord4fv (offset 121) */
+ /* _mesa_function_pool[13202]: TexCoord4fv (offset 121) */
"p\0"
"glTexCoord4fv\0"
"\0"
- /* _mesa_function_pool[12106]: Tangent3sEXT (dynamic) */
+ /* _mesa_function_pool[13219]: Tangent3sEXT (dynamic) */
"iii\0"
"glTangent3sEXT\0"
"\0"
- /* _mesa_function_pool[12126]: GlobalAlphaFactorfSUN (dynamic) */
+ /* _mesa_function_pool[13239]: GlobalAlphaFactorfSUN (dynamic) */
"f\0"
"glGlobalAlphaFactorfSUN\0"
"\0"
- /* _mesa_function_pool[12153]: MultiTexCoord3iARB (offset 396) */
+ /* _mesa_function_pool[13266]: MultiTexCoord3iARB (offset 396) */
"iiii\0"
"glMultiTexCoord3i\0"
"glMultiTexCoord3iARB\0"
"\0"
- /* _mesa_function_pool[12198]: IsProgram (will be remapped) */
+ /* _mesa_function_pool[13311]: IsProgram (will be remapped) */
"i\0"
"glIsProgram\0"
"\0"
- /* _mesa_function_pool[12213]: TexCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[13326]: TexCoordPointerListIBM (dynamic) */
"iiipi\0"
"glTexCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[12245]: GlobalAlphaFactorusSUN (dynamic) */
+ /* _mesa_function_pool[13358]: VertexAttribI4svEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4svEXT\0"
+ "glVertexAttribI4sv\0"
+ "\0"
+ /* _mesa_function_pool[13403]: GlobalAlphaFactorusSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorusSUN\0"
"\0"
- /* _mesa_function_pool[12273]: VertexAttrib2dvNV (will be remapped) */
+ /* _mesa_function_pool[13431]: VertexAttrib2dvNV (will be remapped) */
"ip\0"
"glVertexAttrib2dvNV\0"
"\0"
- /* _mesa_function_pool[12297]: FramebufferRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[13455]: FramebufferRenderbufferEXT (will be remapped) */
"iiii\0"
"glFramebufferRenderbuffer\0"
"glFramebufferRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[12358]: VertexAttrib1dvNV (will be remapped) */
+ /* _mesa_function_pool[13516]: ClearBufferuiv (will be remapped) */
+ "iip\0"
+ "glClearBufferuiv\0"
+ "\0"
+ /* _mesa_function_pool[13538]: VertexAttrib1dvNV (will be remapped) */
"ip\0"
"glVertexAttrib1dvNV\0"
"\0"
- /* _mesa_function_pool[12382]: GenTextures (offset 328) */
+ /* _mesa_function_pool[13562]: GenTextures (offset 328) */
"ip\0"
"glGenTextures\0"
"glGenTexturesEXT\0"
"\0"
- /* _mesa_function_pool[12417]: FramebufferTextureARB (will be remapped) */
+ /* _mesa_function_pool[13597]: FramebufferTextureARB (will be remapped) */
"iiii\0"
"glFramebufferTextureARB\0"
"\0"
- /* _mesa_function_pool[12447]: SetFenceNV (will be remapped) */
+ /* _mesa_function_pool[13627]: SetFenceNV (will be remapped) */
"ii\0"
"glSetFenceNV\0"
"\0"
- /* _mesa_function_pool[12464]: FramebufferTexture1DEXT (will be remapped) */
+ /* _mesa_function_pool[13644]: FramebufferTexture1DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture1D\0"
"glFramebufferTexture1DEXT\0"
"\0"
- /* _mesa_function_pool[12520]: GetCombinerOutputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[13700]: GetCombinerOutputParameterivNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterivNV\0"
"\0"
- /* _mesa_function_pool[12559]: MultiModeDrawArraysIBM (will be remapped) */
+ /* _mesa_function_pool[13739]: MultiModeDrawArraysIBM (will be remapped) */
"pppii\0"
"glMultiModeDrawArraysIBM\0"
"\0"
- /* _mesa_function_pool[12591]: PixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[13771]: PixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[12624]: TextureNormalEXT (dynamic) */
+ /* _mesa_function_pool[13804]: TextureNormalEXT (dynamic) */
"i\0"
"glTextureNormalEXT\0"
"\0"
- /* _mesa_function_pool[12646]: IndexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[13826]: IndexPointerListIBM (dynamic) */
"iipi\0"
"glIndexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[12674]: WeightfvARB (dynamic) */
+ /* _mesa_function_pool[13854]: WeightfvARB (dynamic) */
"ip\0"
"glWeightfvARB\0"
"\0"
- /* _mesa_function_pool[12692]: GetCombinerOutputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[13872]: GetCombinerOutputParameterfvNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[12731]: RasterPos2sv (offset 69) */
+ /* _mesa_function_pool[13911]: RasterPos2sv (offset 69) */
"p\0"
"glRasterPos2sv\0"
"\0"
- /* _mesa_function_pool[12749]: Color4ubv (offset 36) */
+ /* _mesa_function_pool[13929]: Color4ubv (offset 36) */
"p\0"
"glColor4ubv\0"
"\0"
- /* _mesa_function_pool[12764]: DrawBuffer (offset 202) */
+ /* _mesa_function_pool[13944]: DrawBuffer (offset 202) */
"i\0"
"glDrawBuffer\0"
"\0"
- /* _mesa_function_pool[12780]: TexCoord2fv (offset 105) */
+ /* _mesa_function_pool[13960]: TexCoord2fv (offset 105) */
"p\0"
"glTexCoord2fv\0"
"\0"
- /* _mesa_function_pool[12797]: WindowPos4fMESA (will be remapped) */
+ /* _mesa_function_pool[13977]: WindowPos4fMESA (will be remapped) */
"ffff\0"
"glWindowPos4fMESA\0"
"\0"
- /* _mesa_function_pool[12821]: TexCoord1sv (offset 101) */
+ /* _mesa_function_pool[14001]: TexCoord1sv (offset 101) */
"p\0"
"glTexCoord1sv\0"
"\0"
- /* _mesa_function_pool[12838]: WindowPos3dvMESA (will be remapped) */
+ /* _mesa_function_pool[14018]: WindowPos3dvMESA (will be remapped) */
"p\0"
"glWindowPos3dv\0"
"glWindowPos3dvARB\0"
"glWindowPos3dvMESA\0"
"\0"
- /* _mesa_function_pool[12893]: DepthFunc (offset 245) */
+ /* _mesa_function_pool[14073]: DepthFunc (offset 245) */
"i\0"
"glDepthFunc\0"
"\0"
- /* _mesa_function_pool[12908]: PixelMapusv (offset 253) */
+ /* _mesa_function_pool[14088]: PixelMapusv (offset 253) */
"iip\0"
"glPixelMapusv\0"
"\0"
- /* _mesa_function_pool[12927]: GetQueryObjecti64vEXT (will be remapped) */
+ /* _mesa_function_pool[14107]: GetQueryObjecti64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjecti64vEXT\0"
"\0"
- /* _mesa_function_pool[12956]: MultiTexCoord1dARB (offset 376) */
+ /* _mesa_function_pool[14136]: MultiTexCoord1dARB (offset 376) */
"id\0"
"glMultiTexCoord1d\0"
"glMultiTexCoord1dARB\0"
"\0"
- /* _mesa_function_pool[12999]: PointParameterivNV (will be remapped) */
+ /* _mesa_function_pool[14179]: PointParameterivNV (will be remapped) */
"ip\0"
"glPointParameteriv\0"
"glPointParameterivNV\0"
"\0"
- /* _mesa_function_pool[13043]: BlendFunc (offset 241) */
+ /* _mesa_function_pool[14223]: BlendFunc (offset 241) */
"ii\0"
"glBlendFunc\0"
"\0"
- /* _mesa_function_pool[13059]: EndTransformFeedbackEXT (will be remapped) */
+ /* _mesa_function_pool[14239]: EndTransformFeedbackEXT (will be remapped) */
"\0"
"glEndTransformFeedbackEXT\0"
"glEndTransformFeedback\0"
"\0"
- /* _mesa_function_pool[13110]: Uniform2fvARB (will be remapped) */
+ /* _mesa_function_pool[14290]: Uniform2fvARB (will be remapped) */
"iip\0"
"glUniform2fv\0"
"glUniform2fvARB\0"
"\0"
- /* _mesa_function_pool[13144]: BufferParameteriAPPLE (will be remapped) */
+ /* _mesa_function_pool[14324]: BufferParameteriAPPLE (will be remapped) */
"iii\0"
"glBufferParameteriAPPLE\0"
"\0"
- /* _mesa_function_pool[13173]: MultiTexCoord3dvARB (offset 393) */
+ /* _mesa_function_pool[14353]: MultiTexCoord3dvARB (offset 393) */
"ip\0"
"glMultiTexCoord3dv\0"
"glMultiTexCoord3dvARB\0"
"\0"
- /* _mesa_function_pool[13218]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[14398]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[13274]: DeleteObjectARB (will be remapped) */
+ /* _mesa_function_pool[14454]: DeleteObjectARB (will be remapped) */
"i\0"
"glDeleteObjectARB\0"
"\0"
- /* _mesa_function_pool[13295]: MatrixIndexPointerARB (dynamic) */
+ /* _mesa_function_pool[14475]: MatrixIndexPointerARB (dynamic) */
"iiip\0"
"glMatrixIndexPointerARB\0"
"\0"
- /* _mesa_function_pool[13325]: ProgramNamedParameter4dvNV (will be remapped) */
+ /* _mesa_function_pool[14505]: ProgramNamedParameter4dvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[13360]: Tangent3fvEXT (dynamic) */
+ /* _mesa_function_pool[14540]: Tangent3fvEXT (dynamic) */
"p\0"
"glTangent3fvEXT\0"
"\0"
- /* _mesa_function_pool[13379]: Flush (offset 217) */
+ /* _mesa_function_pool[14559]: Flush (offset 217) */
"\0"
"glFlush\0"
"\0"
- /* _mesa_function_pool[13389]: Color4uiv (offset 38) */
+ /* _mesa_function_pool[14569]: Color4uiv (offset 38) */
"p\0"
"glColor4uiv\0"
"\0"
- /* _mesa_function_pool[13404]: GenVertexArrays (will be remapped) */
+ /* _mesa_function_pool[14584]: VertexAttribI4iEXT (will be remapped) */
+ "iiiii\0"
+ "glVertexAttribI4iEXT\0"
+ "glVertexAttribI4i\0"
+ "\0"
+ /* _mesa_function_pool[14630]: GenVertexArrays (will be remapped) */
"ip\0"
"glGenVertexArrays\0"
"\0"
- /* _mesa_function_pool[13426]: RasterPos3sv (offset 77) */
+ /* _mesa_function_pool[14652]: Uniform3uivEXT (will be remapped) */
+ "iip\0"
+ "glUniform3uivEXT\0"
+ "glUniform3uiv\0"
+ "\0"
+ /* _mesa_function_pool[14688]: RasterPos3sv (offset 77) */
"p\0"
"glRasterPos3sv\0"
"\0"
- /* _mesa_function_pool[13444]: BindFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[14706]: BindFramebufferEXT (will be remapped) */
"ii\0"
"glBindFramebuffer\0"
"glBindFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[13487]: ReferencePlaneSGIX (dynamic) */
+ /* _mesa_function_pool[14749]: ReferencePlaneSGIX (dynamic) */
"p\0"
"glReferencePlaneSGIX\0"
"\0"
- /* _mesa_function_pool[13511]: PushAttrib (offset 219) */
+ /* _mesa_function_pool[14773]: PushAttrib (offset 219) */
"i\0"
"glPushAttrib\0"
"\0"
- /* _mesa_function_pool[13527]: RasterPos2i (offset 66) */
+ /* _mesa_function_pool[14789]: RasterPos2i (offset 66) */
"ii\0"
"glRasterPos2i\0"
"\0"
- /* _mesa_function_pool[13545]: ValidateProgramARB (will be remapped) */
+ /* _mesa_function_pool[14807]: ValidateProgramARB (will be remapped) */
"i\0"
"glValidateProgram\0"
"glValidateProgramARB\0"
"\0"
- /* _mesa_function_pool[13587]: TexParameteriv (offset 181) */
+ /* _mesa_function_pool[14849]: TexParameteriv (offset 181) */
"iip\0"
"glTexParameteriv\0"
"\0"
- /* _mesa_function_pool[13609]: UnlockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[14871]: UnlockArraysEXT (will be remapped) */
"\0"
"glUnlockArraysEXT\0"
"\0"
- /* _mesa_function_pool[13629]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[14891]: TexCoord2fColor3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[13670]: WindowPos3fvMESA (will be remapped) */
+ /* _mesa_function_pool[14932]: WindowPos3fvMESA (will be remapped) */
"p\0"
"glWindowPos3fv\0"
"glWindowPos3fvARB\0"
"glWindowPos3fvMESA\0"
"\0"
- /* _mesa_function_pool[13725]: RasterPos2f (offset 64) */
+ /* _mesa_function_pool[14987]: RasterPos2f (offset 64) */
"ff\0"
"glRasterPos2f\0"
"\0"
- /* _mesa_function_pool[13743]: VertexAttrib1svNV (will be remapped) */
+ /* _mesa_function_pool[15005]: VertexAttrib1svNV (will be remapped) */
"ip\0"
"glVertexAttrib1svNV\0"
"\0"
- /* _mesa_function_pool[13767]: RasterPos2d (offset 62) */
+ /* _mesa_function_pool[15029]: RasterPos2d (offset 62) */
"dd\0"
"glRasterPos2d\0"
"\0"
- /* _mesa_function_pool[13785]: RasterPos3fv (offset 73) */
+ /* _mesa_function_pool[15047]: RasterPos3fv (offset 73) */
"p\0"
"glRasterPos3fv\0"
"\0"
- /* _mesa_function_pool[13803]: CopyTexSubImage3D (offset 373) */
+ /* _mesa_function_pool[15065]: CopyTexSubImage3D (offset 373) */
"iiiiiiiii\0"
"glCopyTexSubImage3D\0"
"glCopyTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[13857]: VertexAttrib2dARB (will be remapped) */
+ /* _mesa_function_pool[15119]: VertexAttrib2dARB (will be remapped) */
"idd\0"
"glVertexAttrib2d\0"
"glVertexAttrib2dARB\0"
"\0"
- /* _mesa_function_pool[13899]: Color4ub (offset 35) */
+ /* _mesa_function_pool[15161]: Color4ub (offset 35) */
"iiii\0"
"glColor4ub\0"
"\0"
- /* _mesa_function_pool[13916]: GetInteger64v (will be remapped) */
+ /* _mesa_function_pool[15178]: GetInteger64v (will be remapped) */
"ip\0"
"glGetInteger64v\0"
"\0"
- /* _mesa_function_pool[13936]: TextureColorMaskSGIS (dynamic) */
+ /* _mesa_function_pool[15198]: TextureColorMaskSGIS (dynamic) */
"iiii\0"
"glTextureColorMaskSGIS\0"
"\0"
- /* _mesa_function_pool[13965]: RasterPos2s (offset 68) */
+ /* _mesa_function_pool[15227]: RasterPos2s (offset 68) */
"ii\0"
"glRasterPos2s\0"
"\0"
- /* _mesa_function_pool[13983]: GetColorTable (offset 343) */
+ /* _mesa_function_pool[15245]: GetColorTable (offset 343) */
"iiip\0"
"glGetColorTable\0"
"glGetColorTableSGI\0"
"glGetColorTableEXT\0"
"\0"
- /* _mesa_function_pool[14043]: SelectBuffer (offset 195) */
+ /* _mesa_function_pool[15305]: SelectBuffer (offset 195) */
"ip\0"
"glSelectBuffer\0"
"\0"
- /* _mesa_function_pool[14062]: Indexiv (offset 49) */
+ /* _mesa_function_pool[15324]: Indexiv (offset 49) */
"p\0"
"glIndexiv\0"
"\0"
- /* _mesa_function_pool[14075]: TexCoord3i (offset 114) */
+ /* _mesa_function_pool[15337]: TexCoord3i (offset 114) */
"iii\0"
"glTexCoord3i\0"
"\0"
- /* _mesa_function_pool[14093]: CopyColorTable (offset 342) */
+ /* _mesa_function_pool[15355]: CopyColorTable (offset 342) */
"iiiii\0"
"glCopyColorTable\0"
"glCopyColorTableSGI\0"
"\0"
- /* _mesa_function_pool[14137]: GetHistogramParameterfv (offset 362) */
+ /* _mesa_function_pool[15399]: GetHistogramParameterfv (offset 362) */
"iip\0"
"glGetHistogramParameterfv\0"
"glGetHistogramParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[14197]: Frustum (offset 289) */
+ /* _mesa_function_pool[15459]: Frustum (offset 289) */
"dddddd\0"
"glFrustum\0"
"\0"
- /* _mesa_function_pool[14215]: GetString (offset 275) */
+ /* _mesa_function_pool[15477]: GetString (offset 275) */
"i\0"
"glGetString\0"
"\0"
- /* _mesa_function_pool[14230]: ColorPointervINTEL (dynamic) */
+ /* _mesa_function_pool[15492]: ColorPointervINTEL (dynamic) */
"iip\0"
"glColorPointervINTEL\0"
"\0"
- /* _mesa_function_pool[14256]: TexEnvf (offset 184) */
+ /* _mesa_function_pool[15518]: TexEnvf (offset 184) */
"iif\0"
"glTexEnvf\0"
"\0"
- /* _mesa_function_pool[14271]: TexCoord3d (offset 110) */
+ /* _mesa_function_pool[15533]: TexCoord3d (offset 110) */
"ddd\0"
"glTexCoord3d\0"
"\0"
- /* _mesa_function_pool[14289]: AlphaFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[15551]: AlphaFragmentOp1ATI (will be remapped) */
"iiiiii\0"
"glAlphaFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[14319]: TexCoord3f (offset 112) */
+ /* _mesa_function_pool[15581]: TexCoord3f (offset 112) */
"fff\0"
"glTexCoord3f\0"
"\0"
- /* _mesa_function_pool[14337]: MultiTexCoord3ivARB (offset 397) */
+ /* _mesa_function_pool[15599]: MultiTexCoord3ivARB (offset 397) */
"ip\0"
"glMultiTexCoord3iv\0"
"glMultiTexCoord3ivARB\0"
"\0"
- /* _mesa_function_pool[14382]: MultiTexCoord2sARB (offset 390) */
+ /* _mesa_function_pool[15644]: MultiTexCoord2sARB (offset 390) */
"iii\0"
"glMultiTexCoord2s\0"
"glMultiTexCoord2sARB\0"
"\0"
- /* _mesa_function_pool[14426]: VertexAttrib1dvARB (will be remapped) */
+ /* _mesa_function_pool[15688]: VertexAttrib1dvARB (will be remapped) */
"ip\0"
"glVertexAttrib1dv\0"
"glVertexAttrib1dvARB\0"
"\0"
- /* _mesa_function_pool[14469]: DeleteTextures (offset 327) */
+ /* _mesa_function_pool[15731]: DeleteTextures (offset 327) */
"ip\0"
"glDeleteTextures\0"
"glDeleteTexturesEXT\0"
"\0"
- /* _mesa_function_pool[14510]: TexCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[15772]: TexCoordPointerEXT (will be remapped) */
"iiiip\0"
"glTexCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[14538]: TexSubImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[15800]: TexSubImage4DSGIS (dynamic) */
"iiiiiiiiiiiip\0"
"glTexSubImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[14573]: TexCoord3s (offset 116) */
+ /* _mesa_function_pool[15835]: TexCoord3s (offset 116) */
"iii\0"
"glTexCoord3s\0"
"\0"
- /* _mesa_function_pool[14591]: GetTexLevelParameteriv (offset 285) */
+ /* _mesa_function_pool[15853]: GetTexLevelParameteriv (offset 285) */
"iiip\0"
"glGetTexLevelParameteriv\0"
"\0"
- /* _mesa_function_pool[14622]: DrawArraysInstanced (will be remapped) */
- "iiii\0"
- "glDrawArraysInstanced\0"
- "glDrawArraysInstancedARB\0"
- "glDrawArraysInstancedEXT\0"
- "\0"
- /* _mesa_function_pool[14700]: CombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15884]: CombinerStageParameterfvNV (dynamic) */
"iip\0"
"glCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[14734]: StopInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[15918]: StopInstrumentsSGIX (dynamic) */
"i\0"
"glStopInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[14759]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[15943]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
"fffffffffffffff\0"
"glTexCoord4fColor4fNormal3fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[14815]: ClearAccum (offset 204) */
+ /* _mesa_function_pool[15999]: ClearAccum (offset 204) */
"ffff\0"
"glClearAccum\0"
"\0"
- /* _mesa_function_pool[14834]: DeformSGIX (dynamic) */
+ /* _mesa_function_pool[16018]: DeformSGIX (dynamic) */
"i\0"
"glDeformSGIX\0"
"\0"
- /* _mesa_function_pool[14850]: GetVertexAttribfvARB (will be remapped) */
+ /* _mesa_function_pool[16034]: GetVertexAttribfvARB (will be remapped) */
"iip\0"
"glGetVertexAttribfv\0"
"glGetVertexAttribfvARB\0"
"\0"
- /* _mesa_function_pool[14898]: SecondaryColor3ivEXT (will be remapped) */
+ /* _mesa_function_pool[16082]: SecondaryColor3ivEXT (will be remapped) */
"p\0"
"glSecondaryColor3iv\0"
"glSecondaryColor3ivEXT\0"
"\0"
- /* _mesa_function_pool[14944]: TexCoord4iv (offset 123) */
+ /* _mesa_function_pool[16128]: TexCoord4iv (offset 123) */
"p\0"
"glTexCoord4iv\0"
"\0"
- /* _mesa_function_pool[14961]: UniformMatrix4x2fv (will be remapped) */
+ /* _mesa_function_pool[16145]: VertexAttribI4uiEXT (will be remapped) */
+ "iiiii\0"
+ "glVertexAttribI4uiEXT\0"
+ "glVertexAttribI4ui\0"
+ "\0"
+ /* _mesa_function_pool[16193]: GetFragmentMaterialfvSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentMaterialfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[16226]: UniformMatrix4x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x2fv\0"
"\0"
- /* _mesa_function_pool[14988]: GetDetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[16253]: GetDetailTexFuncSGIS (dynamic) */
"ip\0"
"glGetDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[15015]: GetCombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[16280]: GetCombinerStageParameterfvNV (dynamic) */
"iip\0"
"glGetCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[15052]: PolygonOffset (offset 319) */
+ /* _mesa_function_pool[16317]: PolygonOffset (offset 319) */
"ff\0"
"glPolygonOffset\0"
"\0"
- /* _mesa_function_pool[15072]: BindVertexArray (will be remapped) */
+ /* _mesa_function_pool[16337]: BindVertexArray (will be remapped) */
"i\0"
"glBindVertexArray\0"
"\0"
- /* _mesa_function_pool[15093]: Color4ubVertex2fvSUN (dynamic) */
+ /* _mesa_function_pool[16358]: Color4ubVertex2fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex2fvSUN\0"
"\0"
- /* _mesa_function_pool[15120]: Rectd (offset 86) */
+ /* _mesa_function_pool[16385]: Rectd (offset 86) */
"dddd\0"
"glRectd\0"
"\0"
- /* _mesa_function_pool[15134]: TexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[16399]: TexFilterFuncSGIS (dynamic) */
"iiip\0"
"glTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[15160]: SampleMaskSGIS (will be remapped) */
+ /* _mesa_function_pool[16425]: SampleMaskSGIS (will be remapped) */
"fi\0"
"glSampleMaskSGIS\0"
"glSampleMaskEXT\0"
"\0"
- /* _mesa_function_pool[15197]: GetAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[16462]: VertexAttribI4ubvEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4ubvEXT\0"
+ "glVertexAttribI4ubv\0"
+ "\0"
+ /* _mesa_function_pool[16509]: GetAttribLocationARB (will be remapped) */
"ip\0"
"glGetAttribLocation\0"
"glGetAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[15244]: RasterPos3i (offset 74) */
+ /* _mesa_function_pool[16556]: RasterPos3i (offset 74) */
"iii\0"
"glRasterPos3i\0"
"\0"
- /* _mesa_function_pool[15263]: VertexAttrib4ubvARB (will be remapped) */
+ /* _mesa_function_pool[16575]: VertexAttrib4ubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
"\0"
- /* _mesa_function_pool[15308]: DetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[16620]: DetailTexFuncSGIS (dynamic) */
"iip\0"
"glDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[15333]: Normal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[16645]: Normal3fVertex3fSUN (dynamic) */
"ffffff\0"
"glNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[15363]: CopyTexImage2D (offset 324) */
+ /* _mesa_function_pool[16675]: CopyTexImage2D (offset 324) */
"iiiiiiii\0"
"glCopyTexImage2D\0"
"glCopyTexImage2DEXT\0"
"\0"
- /* _mesa_function_pool[15410]: GetBufferPointervARB (will be remapped) */
+ /* _mesa_function_pool[16722]: GetBufferPointervARB (will be remapped) */
"iip\0"
"glGetBufferPointerv\0"
"glGetBufferPointervARB\0"
"\0"
- /* _mesa_function_pool[15458]: ProgramEnvParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[16770]: ProgramEnvParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramEnvParameter4fARB\0"
"glProgramParameter4fNV\0"
"\0"
- /* _mesa_function_pool[15516]: Uniform3ivARB (will be remapped) */
+ /* _mesa_function_pool[16828]: Uniform3ivARB (will be remapped) */
"iip\0"
"glUniform3iv\0"
"glUniform3ivARB\0"
"\0"
- /* _mesa_function_pool[15550]: Lightfv (offset 160) */
+ /* _mesa_function_pool[16862]: Lightfv (offset 160) */
"iip\0"
"glLightfv\0"
"\0"
- /* _mesa_function_pool[15565]: PrimitiveRestartIndexNV (will be remapped) */
+ /* _mesa_function_pool[16877]: PrimitiveRestartIndexNV (will be remapped) */
"i\0"
"glPrimitiveRestartIndexNV\0"
+ "glPrimitiveRestartIndex\0"
"\0"
- /* _mesa_function_pool[15594]: ClearDepth (offset 208) */
+ /* _mesa_function_pool[16930]: ClearDepth (offset 208) */
"d\0"
"glClearDepth\0"
"\0"
- /* _mesa_function_pool[15610]: GetFenceivNV (will be remapped) */
+ /* _mesa_function_pool[16946]: GetFenceivNV (will be remapped) */
"iip\0"
"glGetFenceivNV\0"
"\0"
- /* _mesa_function_pool[15630]: WindowPos4dvMESA (will be remapped) */
+ /* _mesa_function_pool[16966]: WindowPos4dvMESA (will be remapped) */
"p\0"
"glWindowPos4dvMESA\0"
"\0"
- /* _mesa_function_pool[15652]: ColorSubTable (offset 346) */
+ /* _mesa_function_pool[16988]: ColorSubTable (offset 346) */
"iiiiip\0"
"glColorSubTable\0"
"glColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[15695]: Color4fv (offset 30) */
+ /* _mesa_function_pool[17031]: Color4fv (offset 30) */
"p\0"
"glColor4fv\0"
"\0"
- /* _mesa_function_pool[15709]: MultiTexCoord4ivARB (offset 405) */
+ /* _mesa_function_pool[17045]: MultiTexCoord4ivARB (offset 405) */
"ip\0"
"glMultiTexCoord4iv\0"
"glMultiTexCoord4ivARB\0"
"\0"
- /* _mesa_function_pool[15754]: DrawElementsInstanced (will be remapped) */
- "iiipi\0"
- "glDrawElementsInstanced\0"
- "glDrawElementsInstancedARB\0"
- "glDrawElementsInstancedEXT\0"
+ /* _mesa_function_pool[17090]: ProgramLocalParameters4fvEXT (will be remapped) */
+ "iiip\0"
+ "glProgramLocalParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[15839]: ColorPointer (offset 308) */
+ /* _mesa_function_pool[17127]: ColorPointer (offset 308) */
"iiip\0"
"glColorPointer\0"
"\0"
- /* _mesa_function_pool[15860]: Rects (offset 92) */
+ /* _mesa_function_pool[17148]: Rects (offset 92) */
"iiii\0"
"glRects\0"
"\0"
- /* _mesa_function_pool[15874]: GetMapAttribParameterfvNV (dynamic) */
+ /* _mesa_function_pool[17162]: GetMapAttribParameterfvNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterfvNV\0"
"\0"
- /* _mesa_function_pool[15908]: Lightiv (offset 162) */
+ /* _mesa_function_pool[17196]: CreateShaderProgramEXT (will be remapped) */
+ "ip\0"
+ "glCreateShaderProgramEXT\0"
+ "\0"
+ /* _mesa_function_pool[17225]: ActiveProgramEXT (will be remapped) */
+ "i\0"
+ "glActiveProgramEXT\0"
+ "\0"
+ /* _mesa_function_pool[17247]: Lightiv (offset 162) */
"iip\0"
"glLightiv\0"
"\0"
- /* _mesa_function_pool[15923]: VertexAttrib4sARB (will be remapped) */
+ /* _mesa_function_pool[17262]: VertexAttrib4sARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4s\0"
"glVertexAttrib4sARB\0"
"\0"
- /* _mesa_function_pool[15967]: GetQueryObjectuivARB (will be remapped) */
+ /* _mesa_function_pool[17306]: GetQueryObjectuivARB (will be remapped) */
"iip\0"
"glGetQueryObjectuiv\0"
"glGetQueryObjectuivARB\0"
"\0"
- /* _mesa_function_pool[16015]: GetTexParameteriv (offset 283) */
+ /* _mesa_function_pool[17354]: GetTexParameteriv (offset 283) */
"iip\0"
"glGetTexParameteriv\0"
"\0"
- /* _mesa_function_pool[16040]: MapParameterivNV (dynamic) */
+ /* _mesa_function_pool[17379]: MapParameterivNV (dynamic) */
"iip\0"
"glMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[16064]: GenRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[17403]: GenRenderbuffersEXT (will be remapped) */
"ip\0"
"glGenRenderbuffers\0"
"glGenRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[16109]: VertexAttrib2dvARB (will be remapped) */
+ /* _mesa_function_pool[17448]: ClearBufferfv (will be remapped) */
+ "iip\0"
+ "glClearBufferfv\0"
+ "\0"
+ /* _mesa_function_pool[17469]: VertexAttrib2dvARB (will be remapped) */
"ip\0"
"glVertexAttrib2dv\0"
"glVertexAttrib2dvARB\0"
"\0"
- /* _mesa_function_pool[16152]: EdgeFlagPointerEXT (will be remapped) */
+ /* _mesa_function_pool[17512]: EdgeFlagPointerEXT (will be remapped) */
"iip\0"
"glEdgeFlagPointerEXT\0"
"\0"
- /* _mesa_function_pool[16178]: VertexAttribs2svNV (will be remapped) */
+ /* _mesa_function_pool[17538]: VertexAttribs2svNV (will be remapped) */
"iip\0"
"glVertexAttribs2svNV\0"
"\0"
- /* _mesa_function_pool[16204]: WeightbvARB (dynamic) */
+ /* _mesa_function_pool[17564]: WeightbvARB (dynamic) */
"ip\0"
"glWeightbvARB\0"
"\0"
- /* _mesa_function_pool[16222]: VertexAttrib2fvARB (will be remapped) */
+ /* _mesa_function_pool[17582]: VertexAttrib2fvARB (will be remapped) */
"ip\0"
"glVertexAttrib2fv\0"
"glVertexAttrib2fvARB\0"
"\0"
- /* _mesa_function_pool[16265]: GetBufferParameterivARB (will be remapped) */
+ /* _mesa_function_pool[17625]: GetBufferParameterivARB (will be remapped) */
"iip\0"
"glGetBufferParameteriv\0"
"glGetBufferParameterivARB\0"
"\0"
- /* _mesa_function_pool[16319]: Rectdv (offset 87) */
+ /* _mesa_function_pool[17679]: Rectdv (offset 87) */
"pp\0"
"glRectdv\0"
"\0"
- /* _mesa_function_pool[16332]: ListParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[17692]: ListParameteriSGIX (dynamic) */
"iii\0"
"glListParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[16358]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[17718]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffff\0"
"glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[16417]: InstrumentsBufferSGIX (dynamic) */
+ /* _mesa_function_pool[17777]: InstrumentsBufferSGIX (dynamic) */
"ip\0"
"glInstrumentsBufferSGIX\0"
"\0"
- /* _mesa_function_pool[16445]: VertexAttrib4NivARB (will be remapped) */
+ /* _mesa_function_pool[17805]: VertexAttrib4NivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Niv\0"
"glVertexAttrib4NivARB\0"
"\0"
- /* _mesa_function_pool[16490]: GetAttachedShaders (will be remapped) */
+ /* _mesa_function_pool[17850]: DrawArraysInstancedARB (will be remapped) */
+ "iiii\0"
+ "glDrawArraysInstancedARB\0"
+ "glDrawArraysInstancedEXT\0"
+ "glDrawArraysInstanced\0"
+ "\0"
+ /* _mesa_function_pool[17928]: GetAttachedShaders (will be remapped) */
"iipp\0"
"glGetAttachedShaders\0"
"\0"
- /* _mesa_function_pool[16517]: GenVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[17955]: GenVertexArraysAPPLE (will be remapped) */
"ip\0"
"glGenVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[16544]: Materialiv (offset 172) */
+ /* _mesa_function_pool[17982]: ClearBufferfi (will be remapped) */
+ "iifi\0"
+ "glClearBufferfi\0"
+ "\0"
+ /* _mesa_function_pool[18004]: Materialiv (offset 172) */
"iip\0"
"glMaterialiv\0"
"\0"
- /* _mesa_function_pool[16562]: PushClientAttrib (offset 335) */
+ /* _mesa_function_pool[18022]: PushClientAttrib (offset 335) */
"i\0"
"glPushClientAttrib\0"
"\0"
- /* _mesa_function_pool[16584]: ProgramEnvParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[18044]: ProgramEnvParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramEnvParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[16619]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[18079]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[16665]: WindowPos2iMESA (will be remapped) */
+ /* _mesa_function_pool[18125]: WindowPos2iMESA (will be remapped) */
"ii\0"
"glWindowPos2i\0"
"glWindowPos2iARB\0"
"glWindowPos2iMESA\0"
"\0"
- /* _mesa_function_pool[16718]: SecondaryColor3fvEXT (will be remapped) */
+ /* _mesa_function_pool[18178]: SecondaryColor3fvEXT (will be remapped) */
"p\0"
"glSecondaryColor3fv\0"
"glSecondaryColor3fvEXT\0"
"\0"
- /* _mesa_function_pool[16764]: PolygonMode (offset 174) */
+ /* _mesa_function_pool[18224]: PolygonMode (offset 174) */
"ii\0"
"glPolygonMode\0"
"\0"
- /* _mesa_function_pool[16782]: CompressedTexSubImage1DARB (will be remapped) */
+ /* _mesa_function_pool[18242]: CompressedTexSubImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexSubImage1D\0"
"glCompressedTexSubImage1DARB\0"
"\0"
- /* _mesa_function_pool[16846]: GetVertexAttribivNV (will be remapped) */
+ /* _mesa_function_pool[18306]: VertexAttribI1iEXT (will be remapped) */
+ "ii\0"
+ "glVertexAttribI1iEXT\0"
+ "glVertexAttribI1i\0"
+ "\0"
+ /* _mesa_function_pool[18349]: GetVertexAttribivNV (will be remapped) */
"iip\0"
"glGetVertexAttribivNV\0"
"\0"
- /* _mesa_function_pool[16873]: GetProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[18376]: GetProgramStringARB (will be remapped) */
"iip\0"
"glGetProgramStringARB\0"
"\0"
- /* _mesa_function_pool[16900]: TexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[18403]: VertexAttribIPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glVertexAttribIPointerEXT\0"
+ "glVertexAttribIPointer\0"
+ "\0"
+ /* _mesa_function_pool[18459]: TexBumpParameterfvATI (will be remapped) */
"ip\0"
"glTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[16928]: CompileShaderARB (will be remapped) */
+ /* _mesa_function_pool[18487]: CompileShaderARB (will be remapped) */
"i\0"
"glCompileShader\0"
"glCompileShaderARB\0"
"\0"
- /* _mesa_function_pool[16966]: DeleteShader (will be remapped) */
+ /* _mesa_function_pool[18525]: DeleteShader (will be remapped) */
"i\0"
"glDeleteShader\0"
"\0"
- /* _mesa_function_pool[16984]: DisableClientState (offset 309) */
+ /* _mesa_function_pool[18543]: DisableClientState (offset 309) */
"i\0"
"glDisableClientState\0"
"\0"
- /* _mesa_function_pool[17008]: TexGeni (offset 192) */
+ /* _mesa_function_pool[18567]: TexGeni (offset 192) */
"iii\0"
"glTexGeni\0"
"\0"
- /* _mesa_function_pool[17023]: TexGenf (offset 190) */
+ /* _mesa_function_pool[18582]: TexGenf (offset 190) */
"iif\0"
"glTexGenf\0"
"\0"
- /* _mesa_function_pool[17038]: Uniform3fARB (will be remapped) */
+ /* _mesa_function_pool[18597]: Uniform3fARB (will be remapped) */
"ifff\0"
"glUniform3f\0"
"glUniform3fARB\0"
"\0"
- /* _mesa_function_pool[17071]: TexGend (offset 188) */
+ /* _mesa_function_pool[18630]: TexGend (offset 188) */
"iid\0"
"glTexGend\0"
"\0"
- /* _mesa_function_pool[17086]: ListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[18645]: ListParameterfvSGIX (dynamic) */
"iip\0"
"glListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[17113]: GetPolygonStipple (offset 274) */
+ /* _mesa_function_pool[18672]: GetPolygonStipple (offset 274) */
"p\0"
"glGetPolygonStipple\0"
"\0"
- /* _mesa_function_pool[17136]: Tangent3dvEXT (dynamic) */
+ /* _mesa_function_pool[18695]: Tangent3dvEXT (dynamic) */
"p\0"
"glTangent3dvEXT\0"
"\0"
- /* _mesa_function_pool[17155]: BindBufferOffsetEXT (will be remapped) */
+ /* _mesa_function_pool[18714]: BindBufferOffsetEXT (will be remapped) */
"iiii\0"
"glBindBufferOffsetEXT\0"
"\0"
- /* _mesa_function_pool[17183]: WindowPos3sMESA (will be remapped) */
+ /* _mesa_function_pool[18742]: WindowPos3sMESA (will be remapped) */
"iii\0"
"glWindowPos3s\0"
"glWindowPos3sARB\0"
"glWindowPos3sMESA\0"
"\0"
- /* _mesa_function_pool[17237]: VertexAttrib2svNV (will be remapped) */
+ /* _mesa_function_pool[18796]: VertexAttrib2svNV (will be remapped) */
"ip\0"
"glVertexAttrib2svNV\0"
"\0"
- /* _mesa_function_pool[17261]: DisableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[18820]: DisableIndexedEXT (will be remapped) */
"ii\0"
"glDisableIndexedEXT\0"
+ "glDisablei\0"
"\0"
- /* _mesa_function_pool[17285]: BindBufferBaseEXT (will be remapped) */
+ /* _mesa_function_pool[18855]: BindBufferBaseEXT (will be remapped) */
"iii\0"
"glBindBufferBaseEXT\0"
"glBindBufferBase\0"
"\0"
- /* _mesa_function_pool[17327]: TexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[18897]: TexCoord2fVertex3fvSUN (dynamic) */
"pp\0"
"glTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[17356]: WindowPos4sMESA (will be remapped) */
+ /* _mesa_function_pool[18926]: WindowPos4sMESA (will be remapped) */
"iiii\0"
"glWindowPos4sMESA\0"
"\0"
- /* _mesa_function_pool[17380]: VertexAttrib4NuivARB (will be remapped) */
+ /* _mesa_function_pool[18950]: VertexAttrib4NuivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4NuivARB\0"
"\0"
- /* _mesa_function_pool[17427]: ClientActiveTextureARB (offset 375) */
+ /* _mesa_function_pool[18997]: ClientActiveTextureARB (offset 375) */
"i\0"
"glClientActiveTexture\0"
"glClientActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[17477]: PixelTexGenSGIX (will be remapped) */
+ /* _mesa_function_pool[19047]: PixelTexGenSGIX (will be remapped) */
"i\0"
"glPixelTexGenSGIX\0"
"\0"
- /* _mesa_function_pool[17498]: ReplacementCodeusvSUN (dynamic) */
+ /* _mesa_function_pool[19068]: ReplacementCodeusvSUN (dynamic) */
"p\0"
"glReplacementCodeusvSUN\0"
"\0"
- /* _mesa_function_pool[17525]: Uniform4fARB (will be remapped) */
+ /* _mesa_function_pool[19095]: Uniform4fARB (will be remapped) */
"iffff\0"
"glUniform4f\0"
"glUniform4fARB\0"
"\0"
- /* _mesa_function_pool[17559]: Color4sv (offset 34) */
+ /* _mesa_function_pool[19129]: Color4sv (offset 34) */
"p\0"
"glColor4sv\0"
"\0"
- /* _mesa_function_pool[17573]: FlushMappedBufferRange (will be remapped) */
+ /* _mesa_function_pool[19143]: FlushMappedBufferRange (will be remapped) */
"iii\0"
"glFlushMappedBufferRange\0"
"\0"
- /* _mesa_function_pool[17603]: IsProgramNV (will be remapped) */
+ /* _mesa_function_pool[19173]: IsProgramNV (will be remapped) */
"i\0"
"glIsProgramARB\0"
"glIsProgramNV\0"
"\0"
- /* _mesa_function_pool[17635]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[19205]: FlushMappedBufferRangeAPPLE (will be remapped) */
"iii\0"
"glFlushMappedBufferRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[17670]: PixelZoom (offset 246) */
+ /* _mesa_function_pool[19240]: PixelZoom (offset 246) */
"ff\0"
"glPixelZoom\0"
"\0"
- /* _mesa_function_pool[17686]: ReplacementCodePointerSUN (dynamic) */
+ /* _mesa_function_pool[19256]: ReplacementCodePointerSUN (dynamic) */
"iip\0"
"glReplacementCodePointerSUN\0"
"\0"
- /* _mesa_function_pool[17719]: ProgramEnvParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[19289]: ProgramEnvParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramEnvParameter4dARB\0"
"glProgramParameter4dNV\0"
"\0"
- /* _mesa_function_pool[17777]: ColorTableParameterfv (offset 340) */
+ /* _mesa_function_pool[19347]: ColorTableParameterfv (offset 340) */
"iip\0"
"glColorTableParameterfv\0"
"glColorTableParameterfvSGI\0"
"\0"
- /* _mesa_function_pool[17833]: FragmentLightModelfSGIX (dynamic) */
+ /* _mesa_function_pool[19403]: FragmentLightModelfSGIX (dynamic) */
"if\0"
"glFragmentLightModelfSGIX\0"
"\0"
- /* _mesa_function_pool[17863]: Binormal3bvEXT (dynamic) */
+ /* _mesa_function_pool[19433]: Binormal3bvEXT (dynamic) */
"p\0"
"glBinormal3bvEXT\0"
"\0"
- /* _mesa_function_pool[17883]: PixelMapuiv (offset 252) */
+ /* _mesa_function_pool[19453]: PixelMapuiv (offset 252) */
"iip\0"
"glPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[17902]: Color3dv (offset 12) */
+ /* _mesa_function_pool[19472]: Color3dv (offset 12) */
"p\0"
"glColor3dv\0"
"\0"
- /* _mesa_function_pool[17916]: IsTexture (offset 330) */
+ /* _mesa_function_pool[19486]: IsTexture (offset 330) */
"i\0"
"glIsTexture\0"
"glIsTextureEXT\0"
"\0"
- /* _mesa_function_pool[17946]: VertexWeightfvEXT (dynamic) */
+ /* _mesa_function_pool[19516]: VertexWeightfvEXT (dynamic) */
"p\0"
"glVertexWeightfvEXT\0"
"\0"
- /* _mesa_function_pool[17969]: VertexAttrib1dARB (will be remapped) */
+ /* _mesa_function_pool[19539]: VertexAttrib1dARB (will be remapped) */
"id\0"
"glVertexAttrib1d\0"
"glVertexAttrib1dARB\0"
"\0"
- /* _mesa_function_pool[18010]: ImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[19580]: ImageTransformParameterivHP (dynamic) */
"iip\0"
"glImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[18045]: TexCoord4i (offset 122) */
+ /* _mesa_function_pool[19615]: TexCoord4i (offset 122) */
"iiii\0"
"glTexCoord4i\0"
"\0"
- /* _mesa_function_pool[18064]: DeleteQueriesARB (will be remapped) */
+ /* _mesa_function_pool[19634]: DeleteQueriesARB (will be remapped) */
"ip\0"
"glDeleteQueries\0"
"glDeleteQueriesARB\0"
"\0"
- /* _mesa_function_pool[18103]: Color4ubVertex2fSUN (dynamic) */
+ /* _mesa_function_pool[19673]: Color4ubVertex2fSUN (dynamic) */
"iiiiff\0"
"glColor4ubVertex2fSUN\0"
"\0"
- /* _mesa_function_pool[18133]: FragmentColorMaterialSGIX (dynamic) */
+ /* _mesa_function_pool[19703]: FragmentColorMaterialSGIX (dynamic) */
"ii\0"
"glFragmentColorMaterialSGIX\0"
"\0"
- /* _mesa_function_pool[18165]: CurrentPaletteMatrixARB (dynamic) */
+ /* _mesa_function_pool[19735]: CurrentPaletteMatrixARB (dynamic) */
"i\0"
"glCurrentPaletteMatrixARB\0"
"\0"
- /* _mesa_function_pool[18194]: GetMapdv (offset 266) */
+ /* _mesa_function_pool[19764]: GetMapdv (offset 266) */
"iip\0"
"glGetMapdv\0"
"\0"
- /* _mesa_function_pool[18210]: ObjectPurgeableAPPLE (will be remapped) */
+ /* _mesa_function_pool[19780]: ObjectPurgeableAPPLE (will be remapped) */
"iii\0"
"glObjectPurgeableAPPLE\0"
"\0"
- /* _mesa_function_pool[18238]: SamplePatternSGIS (will be remapped) */
+ /* _mesa_function_pool[19808]: GetStringi (will be remapped) */
+ "ii\0"
+ "glGetStringi\0"
+ "\0"
+ /* _mesa_function_pool[19825]: SamplePatternSGIS (will be remapped) */
"i\0"
"glSamplePatternSGIS\0"
"glSamplePatternEXT\0"
"\0"
- /* _mesa_function_pool[18280]: PixelStoref (offset 249) */
+ /* _mesa_function_pool[19867]: PixelStoref (offset 249) */
"if\0"
"glPixelStoref\0"
"\0"
- /* _mesa_function_pool[18298]: IsQueryARB (will be remapped) */
+ /* _mesa_function_pool[19885]: IsQueryARB (will be remapped) */
"i\0"
"glIsQuery\0"
"glIsQueryARB\0"
"\0"
- /* _mesa_function_pool[18324]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[19911]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
"iiiiifff\0"
"glReplacementCodeuiColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[18373]: PixelStorei (offset 250) */
+ /* _mesa_function_pool[19960]: PixelStorei (offset 250) */
"ii\0"
"glPixelStorei\0"
"\0"
- /* _mesa_function_pool[18391]: VertexAttrib4usvARB (will be remapped) */
+ /* _mesa_function_pool[19978]: VertexAttrib4usvARB (will be remapped) */
"ip\0"
"glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
"\0"
- /* _mesa_function_pool[18436]: LinkProgramARB (will be remapped) */
+ /* _mesa_function_pool[20023]: LinkProgramARB (will be remapped) */
"i\0"
"glLinkProgram\0"
"glLinkProgramARB\0"
"\0"
- /* _mesa_function_pool[18470]: VertexAttrib2fNV (will be remapped) */
+ /* _mesa_function_pool[20057]: VertexAttrib2fNV (will be remapped) */
"iff\0"
"glVertexAttrib2fNV\0"
"\0"
- /* _mesa_function_pool[18494]: ShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[20081]: ShaderSourceARB (will be remapped) */
"iipp\0"
"glShaderSource\0"
"glShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[18533]: FragmentMaterialiSGIX (dynamic) */
+ /* _mesa_function_pool[20120]: FragmentMaterialiSGIX (dynamic) */
"iii\0"
"glFragmentMaterialiSGIX\0"
"\0"
- /* _mesa_function_pool[18562]: EvalCoord2dv (offset 233) */
+ /* _mesa_function_pool[20149]: EvalCoord2dv (offset 233) */
"p\0"
"glEvalCoord2dv\0"
"\0"
- /* _mesa_function_pool[18580]: VertexAttrib3svARB (will be remapped) */
+ /* _mesa_function_pool[20167]: VertexAttrib3svARB (will be remapped) */
"ip\0"
"glVertexAttrib3sv\0"
"glVertexAttrib3svARB\0"
"\0"
- /* _mesa_function_pool[18623]: ColorMaterial (offset 151) */
+ /* _mesa_function_pool[20210]: ColorMaterial (offset 151) */
"ii\0"
"glColorMaterial\0"
"\0"
- /* _mesa_function_pool[18643]: CompressedTexSubImage3DARB (will be remapped) */
+ /* _mesa_function_pool[20230]: CompressedTexSubImage3DARB (will be remapped) */
"iiiiiiiiiip\0"
"glCompressedTexSubImage3D\0"
"glCompressedTexSubImage3DARB\0"
"\0"
- /* _mesa_function_pool[18711]: WindowPos2ivMESA (will be remapped) */
+ /* _mesa_function_pool[20298]: WindowPos2ivMESA (will be remapped) */
"p\0"
"glWindowPos2iv\0"
"glWindowPos2ivARB\0"
"glWindowPos2ivMESA\0"
"\0"
- /* _mesa_function_pool[18766]: IsFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[20353]: IsFramebufferEXT (will be remapped) */
"i\0"
"glIsFramebuffer\0"
"glIsFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[18804]: Uniform4ivARB (will be remapped) */
+ /* _mesa_function_pool[20391]: Uniform4ivARB (will be remapped) */
"iip\0"
"glUniform4iv\0"
"glUniform4ivARB\0"
"\0"
- /* _mesa_function_pool[18838]: GetVertexAttribdvARB (will be remapped) */
+ /* _mesa_function_pool[20425]: GetVertexAttribdvARB (will be remapped) */
"iip\0"
"glGetVertexAttribdv\0"
"glGetVertexAttribdvARB\0"
"\0"
- /* _mesa_function_pool[18886]: TexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[20473]: TexBumpParameterivATI (will be remapped) */
"ip\0"
"glTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[18914]: GetSeparableFilter (offset 359) */
+ /* _mesa_function_pool[20501]: GetSeparableFilter (offset 359) */
"iiippp\0"
"glGetSeparableFilter\0"
"glGetSeparableFilterEXT\0"
"\0"
- /* _mesa_function_pool[18967]: Binormal3dEXT (dynamic) */
+ /* _mesa_function_pool[20554]: Binormal3dEXT (dynamic) */
"ddd\0"
"glBinormal3dEXT\0"
"\0"
- /* _mesa_function_pool[18988]: SpriteParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[20575]: SpriteParameteriSGIX (dynamic) */
"ii\0"
"glSpriteParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[19015]: RequestResidentProgramsNV (will be remapped) */
+ /* _mesa_function_pool[20602]: RequestResidentProgramsNV (will be remapped) */
"ip\0"
"glRequestResidentProgramsNV\0"
"\0"
- /* _mesa_function_pool[19047]: TagSampleBufferSGIX (dynamic) */
+ /* _mesa_function_pool[20634]: TagSampleBufferSGIX (dynamic) */
"\0"
"glTagSampleBufferSGIX\0"
"\0"
- /* _mesa_function_pool[19071]: TransformFeedbackVaryingsEXT (will be remapped) */
+ /* _mesa_function_pool[20658]: TransformFeedbackVaryingsEXT (will be remapped) */
"iipi\0"
"glTransformFeedbackVaryingsEXT\0"
"glTransformFeedbackVaryings\0"
"\0"
- /* _mesa_function_pool[19136]: FeedbackBuffer (offset 194) */
+ /* _mesa_function_pool[20723]: FeedbackBuffer (offset 194) */
"iip\0"
"glFeedbackBuffer\0"
"\0"
- /* _mesa_function_pool[19158]: RasterPos2iv (offset 67) */
+ /* _mesa_function_pool[20745]: RasterPos2iv (offset 67) */
"p\0"
"glRasterPos2iv\0"
"\0"
- /* _mesa_function_pool[19176]: TexImage1D (offset 182) */
+ /* _mesa_function_pool[20763]: TexImage1D (offset 182) */
"iiiiiiip\0"
"glTexImage1D\0"
"\0"
- /* _mesa_function_pool[19199]: ListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[20786]: ListParameterivSGIX (dynamic) */
"iip\0"
"glListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[19226]: MultiDrawElementsEXT (will be remapped) */
+ /* _mesa_function_pool[20813]: MultiDrawElementsEXT (will be remapped) */
"ipipi\0"
"glMultiDrawElements\0"
"glMultiDrawElementsEXT\0"
"\0"
- /* _mesa_function_pool[19276]: Color3s (offset 17) */
+ /* _mesa_function_pool[20863]: Color3s (offset 17) */
"iii\0"
"glColor3s\0"
"\0"
- /* _mesa_function_pool[19291]: Uniform1ivARB (will be remapped) */
+ /* _mesa_function_pool[20878]: Uniform1ivARB (will be remapped) */
"iip\0"
"glUniform1iv\0"
"glUniform1ivARB\0"
"\0"
- /* _mesa_function_pool[19325]: WindowPos2sMESA (will be remapped) */
+ /* _mesa_function_pool[20912]: WindowPos2sMESA (will be remapped) */
"ii\0"
"glWindowPos2s\0"
"glWindowPos2sARB\0"
"glWindowPos2sMESA\0"
"\0"
- /* _mesa_function_pool[19378]: WeightusvARB (dynamic) */
+ /* _mesa_function_pool[20965]: WeightusvARB (dynamic) */
"ip\0"
"glWeightusvARB\0"
"\0"
- /* _mesa_function_pool[19397]: TexCoordPointer (offset 320) */
+ /* _mesa_function_pool[20984]: TexCoordPointer (offset 320) */
"iiip\0"
"glTexCoordPointer\0"
"\0"
- /* _mesa_function_pool[19421]: FogCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[21008]: FogCoordPointerEXT (will be remapped) */
"iip\0"
"glFogCoordPointer\0"
"glFogCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[19465]: IndexMaterialEXT (dynamic) */
+ /* _mesa_function_pool[21052]: IndexMaterialEXT (dynamic) */
"ii\0"
"glIndexMaterialEXT\0"
"\0"
- /* _mesa_function_pool[19488]: Color3i (offset 15) */
+ /* _mesa_function_pool[21075]: Color3i (offset 15) */
"iii\0"
"glColor3i\0"
"\0"
- /* _mesa_function_pool[19503]: FrontFace (offset 157) */
+ /* _mesa_function_pool[21090]: FrontFace (offset 157) */
"i\0"
"glFrontFace\0"
"\0"
- /* _mesa_function_pool[19518]: EvalCoord2d (offset 232) */
+ /* _mesa_function_pool[21105]: EvalCoord2d (offset 232) */
"dd\0"
"glEvalCoord2d\0"
"\0"
- /* _mesa_function_pool[19536]: SecondaryColor3ubvEXT (will be remapped) */
+ /* _mesa_function_pool[21123]: SecondaryColor3ubvEXT (will be remapped) */
"p\0"
"glSecondaryColor3ubv\0"
"glSecondaryColor3ubvEXT\0"
"\0"
- /* _mesa_function_pool[19584]: EvalCoord2f (offset 234) */
+ /* _mesa_function_pool[21171]: EvalCoord2f (offset 234) */
"ff\0"
"glEvalCoord2f\0"
"\0"
- /* _mesa_function_pool[19602]: VertexAttrib4dvARB (will be remapped) */
+ /* _mesa_function_pool[21189]: VertexAttrib4dvARB (will be remapped) */
"ip\0"
"glVertexAttrib4dv\0"
"glVertexAttrib4dvARB\0"
"\0"
- /* _mesa_function_pool[19645]: BindAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[21232]: BindAttribLocationARB (will be remapped) */
"iip\0"
"glBindAttribLocation\0"
"glBindAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[19695]: Color3b (offset 9) */
+ /* _mesa_function_pool[21282]: Color3b (offset 9) */
"iii\0"
"glColor3b\0"
"\0"
- /* _mesa_function_pool[19710]: MultiTexCoord2dARB (offset 384) */
+ /* _mesa_function_pool[21297]: MultiTexCoord2dARB (offset 384) */
"idd\0"
"glMultiTexCoord2d\0"
"glMultiTexCoord2dARB\0"
"\0"
- /* _mesa_function_pool[19754]: ExecuteProgramNV (will be remapped) */
+ /* _mesa_function_pool[21341]: ExecuteProgramNV (will be remapped) */
"iip\0"
"glExecuteProgramNV\0"
"\0"
- /* _mesa_function_pool[19778]: Color3f (offset 13) */
+ /* _mesa_function_pool[21365]: Color3f (offset 13) */
"fff\0"
"glColor3f\0"
"\0"
- /* _mesa_function_pool[19793]: LightEnviSGIX (dynamic) */
+ /* _mesa_function_pool[21380]: LightEnviSGIX (dynamic) */
"ii\0"
"glLightEnviSGIX\0"
"\0"
- /* _mesa_function_pool[19813]: Color3d (offset 11) */
+ /* _mesa_function_pool[21400]: Color3d (offset 11) */
"ddd\0"
"glColor3d\0"
"\0"
- /* _mesa_function_pool[19828]: Normal3dv (offset 55) */
+ /* _mesa_function_pool[21415]: Normal3dv (offset 55) */
"p\0"
"glNormal3dv\0"
"\0"
- /* _mesa_function_pool[19843]: Lightf (offset 159) */
+ /* _mesa_function_pool[21430]: Lightf (offset 159) */
"iif\0"
"glLightf\0"
"\0"
- /* _mesa_function_pool[19857]: ReplacementCodeuiSUN (dynamic) */
+ /* _mesa_function_pool[21444]: ReplacementCodeuiSUN (dynamic) */
"i\0"
"glReplacementCodeuiSUN\0"
"\0"
- /* _mesa_function_pool[19883]: MatrixMode (offset 293) */
+ /* _mesa_function_pool[21470]: MatrixMode (offset 293) */
"i\0"
"glMatrixMode\0"
"\0"
- /* _mesa_function_pool[19899]: GetPixelMapusv (offset 273) */
+ /* _mesa_function_pool[21486]: GetPixelMapusv (offset 273) */
"ip\0"
"glGetPixelMapusv\0"
"\0"
- /* _mesa_function_pool[19920]: Lighti (offset 161) */
+ /* _mesa_function_pool[21507]: Lighti (offset 161) */
"iii\0"
"glLighti\0"
"\0"
- /* _mesa_function_pool[19934]: VertexAttribPointerNV (will be remapped) */
+ /* _mesa_function_pool[21521]: VertexAttribPointerNV (will be remapped) */
"iiiip\0"
"glVertexAttribPointerNV\0"
"\0"
- /* _mesa_function_pool[19965]: ProgramLocalParameters4fvEXT (will be remapped) */
- "iiip\0"
- "glProgramLocalParameters4fvEXT\0"
- "\0"
- /* _mesa_function_pool[20002]: GetBooleanIndexedvEXT (will be remapped) */
+ /* _mesa_function_pool[21552]: GetBooleanIndexedvEXT (will be remapped) */
"iip\0"
"glGetBooleanIndexedvEXT\0"
+ "glGetBooleani_v\0"
"\0"
- /* _mesa_function_pool[20031]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[21597]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
"iiip\0"
"glGetFramebufferAttachmentParameteriv\0"
"glGetFramebufferAttachmentParameterivEXT\0"
"\0"
- /* _mesa_function_pool[20116]: PixelTransformParameterfEXT (dynamic) */
+ /* _mesa_function_pool[21682]: PixelTransformParameterfEXT (dynamic) */
"iif\0"
"glPixelTransformParameterfEXT\0"
"\0"
- /* _mesa_function_pool[20151]: MultiTexCoord4dvARB (offset 401) */
+ /* _mesa_function_pool[21717]: MultiTexCoord4dvARB (offset 401) */
"ip\0"
"glMultiTexCoord4dv\0"
"glMultiTexCoord4dvARB\0"
"\0"
- /* _mesa_function_pool[20196]: PixelTransformParameteriEXT (dynamic) */
+ /* _mesa_function_pool[21762]: PixelTransformParameteriEXT (dynamic) */
"iii\0"
"glPixelTransformParameteriEXT\0"
"\0"
- /* _mesa_function_pool[20231]: GetDoublev (offset 260) */
+ /* _mesa_function_pool[21797]: GetDoublev (offset 260) */
"ip\0"
"glGetDoublev\0"
"\0"
- /* _mesa_function_pool[20248]: MultMatrixd (offset 295) */
+ /* _mesa_function_pool[21814]: MultMatrixd (offset 295) */
"p\0"
"glMultMatrixd\0"
"\0"
- /* _mesa_function_pool[20265]: MultMatrixf (offset 294) */
+ /* _mesa_function_pool[21831]: MultMatrixf (offset 294) */
"p\0"
"glMultMatrixf\0"
"\0"
- /* _mesa_function_pool[20282]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[21848]: VertexAttribI4bvEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4bvEXT\0"
+ "glVertexAttribI4bv\0"
+ "\0"
+ /* _mesa_function_pool[21893]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
"ffiiiifff\0"
"glTexCoord2fColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[20325]: Uniform1iARB (will be remapped) */
+ /* _mesa_function_pool[21936]: Uniform1iARB (will be remapped) */
"ii\0"
"glUniform1i\0"
"glUniform1iARB\0"
"\0"
- /* _mesa_function_pool[20356]: VertexAttribPointerARB (will be remapped) */
+ /* _mesa_function_pool[21967]: VertexAttribPointerARB (will be remapped) */
"iiiiip\0"
"glVertexAttribPointer\0"
"glVertexAttribPointerARB\0"
"\0"
- /* _mesa_function_pool[20411]: VertexAttrib3sNV (will be remapped) */
+ /* _mesa_function_pool[22022]: VertexAttrib3sNV (will be remapped) */
"iiii\0"
"glVertexAttrib3sNV\0"
"\0"
- /* _mesa_function_pool[20436]: SharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[22047]: SharpenTexFuncSGIS (dynamic) */
"iip\0"
"glSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[20462]: MultiTexCoord4fvARB (offset 403) */
+ /* _mesa_function_pool[22073]: MultiTexCoord4fvARB (offset 403) */
"ip\0"
"glMultiTexCoord4fv\0"
"glMultiTexCoord4fvARB\0"
"\0"
- /* _mesa_function_pool[20507]: UniformMatrix2x3fv (will be remapped) */
+ /* _mesa_function_pool[22118]: Uniform2uiEXT (will be remapped) */
+ "iii\0"
+ "glUniform2uiEXT\0"
+ "glUniform2ui\0"
+ "\0"
+ /* _mesa_function_pool[22152]: UniformMatrix2x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x3fv\0"
"\0"
- /* _mesa_function_pool[20534]: TrackMatrixNV (will be remapped) */
+ /* _mesa_function_pool[22179]: TrackMatrixNV (will be remapped) */
"iiii\0"
"glTrackMatrixNV\0"
"\0"
- /* _mesa_function_pool[20556]: CombinerParameteriNV (will be remapped) */
+ /* _mesa_function_pool[22201]: CombinerParameteriNV (will be remapped) */
"ii\0"
"glCombinerParameteriNV\0"
"\0"
- /* _mesa_function_pool[20583]: DeleteAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[22228]: DeleteAsyncMarkersSGIX (dynamic) */
"ii\0"
"glDeleteAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[20612]: ReplacementCodeusSUN (dynamic) */
+ /* _mesa_function_pool[22257]: ReplacementCodeusSUN (dynamic) */
"i\0"
"glReplacementCodeusSUN\0"
"\0"
- /* _mesa_function_pool[20638]: IsAsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[22283]: IsAsyncMarkerSGIX (dynamic) */
"i\0"
"glIsAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[20661]: FrameZoomSGIX (dynamic) */
+ /* _mesa_function_pool[22306]: FrameZoomSGIX (dynamic) */
"i\0"
"glFrameZoomSGIX\0"
"\0"
- /* _mesa_function_pool[20680]: Normal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[22325]: Normal3fVertex3fvSUN (dynamic) */
"pp\0"
"glNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[20707]: RasterPos4sv (offset 85) */
+ /* _mesa_function_pool[22352]: RasterPos4sv (offset 85) */
"p\0"
"glRasterPos4sv\0"
"\0"
- /* _mesa_function_pool[20725]: VertexAttrib4NsvARB (will be remapped) */
+ /* _mesa_function_pool[22370]: VertexAttrib4NsvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nsv\0"
"glVertexAttrib4NsvARB\0"
"\0"
- /* _mesa_function_pool[20770]: VertexAttrib3fvARB (will be remapped) */
+ /* _mesa_function_pool[22415]: VertexAttrib3fvARB (will be remapped) */
"ip\0"
"glVertexAttrib3fv\0"
"glVertexAttrib3fvARB\0"
"\0"
- /* _mesa_function_pool[20813]: ClearColor (offset 206) */
+ /* _mesa_function_pool[22458]: ClearColor (offset 206) */
"ffff\0"
"glClearColor\0"
"\0"
- /* _mesa_function_pool[20832]: GetSynciv (will be remapped) */
+ /* _mesa_function_pool[22477]: GetSynciv (will be remapped) */
"iiipp\0"
"glGetSynciv\0"
"\0"
- /* _mesa_function_pool[20851]: DeleteFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[22496]: ClearColorIiEXT (will be remapped) */
+ "iiii\0"
+ "glClearColorIiEXT\0"
+ "\0"
+ /* _mesa_function_pool[22520]: DeleteFramebuffersEXT (will be remapped) */
"ip\0"
"glDeleteFramebuffers\0"
"glDeleteFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[20900]: GlobalAlphaFactorsSUN (dynamic) */
+ /* _mesa_function_pool[22569]: GlobalAlphaFactorsSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorsSUN\0"
"\0"
- /* _mesa_function_pool[20927]: IsEnabledIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[22596]: IsEnabledIndexedEXT (will be remapped) */
"ii\0"
"glIsEnabledIndexedEXT\0"
+ "glIsEnabledi\0"
"\0"
- /* _mesa_function_pool[20953]: TexEnviv (offset 187) */
+ /* _mesa_function_pool[22635]: TexEnviv (offset 187) */
"iip\0"
"glTexEnviv\0"
"\0"
- /* _mesa_function_pool[20969]: TexSubImage3D (offset 372) */
+ /* _mesa_function_pool[22651]: TexSubImage3D (offset 372) */
"iiiiiiiiiip\0"
"glTexSubImage3D\0"
"glTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[21017]: Tangent3fEXT (dynamic) */
+ /* _mesa_function_pool[22699]: Tangent3fEXT (dynamic) */
"fff\0"
"glTangent3fEXT\0"
"\0"
- /* _mesa_function_pool[21037]: SecondaryColor3uivEXT (will be remapped) */
+ /* _mesa_function_pool[22719]: SecondaryColor3uivEXT (will be remapped) */
"p\0"
"glSecondaryColor3uiv\0"
"glSecondaryColor3uivEXT\0"
"\0"
- /* _mesa_function_pool[21085]: MatrixIndexubvARB (dynamic) */
+ /* _mesa_function_pool[22767]: MatrixIndexubvARB (dynamic) */
"ip\0"
"glMatrixIndexubvARB\0"
"\0"
- /* _mesa_function_pool[21109]: Color4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[22791]: Color4fNormal3fVertex3fSUN (dynamic) */
"ffffffffff\0"
"glColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[21150]: PixelTexGenParameterfSGIS (will be remapped) */
+ /* _mesa_function_pool[22832]: PixelTexGenParameterfSGIS (will be remapped) */
"if\0"
"glPixelTexGenParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[21182]: CreateShader (will be remapped) */
+ /* _mesa_function_pool[22864]: CreateShader (will be remapped) */
"i\0"
"glCreateShader\0"
"\0"
- /* _mesa_function_pool[21200]: GetColorTableParameterfv (offset 344) */
+ /* _mesa_function_pool[22882]: GetColorTableParameterfv (offset 344) */
"iip\0"
"glGetColorTableParameterfv\0"
"glGetColorTableParameterfvSGI\0"
"glGetColorTableParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[21292]: FragmentLightModelfvSGIX (dynamic) */
+ /* _mesa_function_pool[22974]: FragmentLightModelfvSGIX (dynamic) */
"ip\0"
"glFragmentLightModelfvSGIX\0"
"\0"
- /* _mesa_function_pool[21323]: Bitmap (offset 8) */
+ /* _mesa_function_pool[23005]: Bitmap (offset 8) */
"iiffffp\0"
"glBitmap\0"
"\0"
- /* _mesa_function_pool[21341]: MultiTexCoord3fARB (offset 394) */
+ /* _mesa_function_pool[23023]: MultiTexCoord3fARB (offset 394) */
"ifff\0"
"glMultiTexCoord3f\0"
"glMultiTexCoord3fARB\0"
"\0"
- /* _mesa_function_pool[21386]: GetTexLevelParameterfv (offset 284) */
+ /* _mesa_function_pool[23068]: GetTexLevelParameterfv (offset 284) */
"iiip\0"
"glGetTexLevelParameterfv\0"
"\0"
- /* _mesa_function_pool[21417]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[23099]: GetPixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[21453]: GenFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[23135]: GenFramebuffersEXT (will be remapped) */
"ip\0"
"glGenFramebuffers\0"
"glGenFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[21496]: GetProgramParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[23178]: VertexAttribDivisor (will be remapped) */
+ "ii\0"
+ "glVertexAttribDivisor\0"
+ "\0"
+ /* _mesa_function_pool[23204]: GetProgramParameterdvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterdvNV\0"
"\0"
- /* _mesa_function_pool[21528]: Vertex2sv (offset 133) */
+ /* _mesa_function_pool[23236]: Vertex2sv (offset 133) */
"p\0"
"glVertex2sv\0"
"\0"
- /* _mesa_function_pool[21543]: GetIntegerv (offset 263) */
+ /* _mesa_function_pool[23251]: GetIntegerv (offset 263) */
"ip\0"
"glGetIntegerv\0"
"\0"
- /* _mesa_function_pool[21561]: IsVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[23269]: IsVertexArrayAPPLE (will be remapped) */
"i\0"
"glIsVertexArray\0"
"glIsVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[21601]: FragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[23309]: FragmentLightfvSGIX (dynamic) */
"iip\0"
"glFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[21628]: DetachShader (will be remapped) */
+ /* _mesa_function_pool[23336]: DetachShader (will be remapped) */
"ii\0"
"glDetachShader\0"
"\0"
- /* _mesa_function_pool[21647]: VertexAttrib4NubARB (will be remapped) */
+ /* _mesa_function_pool[23355]: VertexAttrib4NubARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4Nub\0"
"glVertexAttrib4NubARB\0"
"\0"
- /* _mesa_function_pool[21695]: GetProgramEnvParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[23403]: GetProgramEnvParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterfvARB\0"
"\0"
- /* _mesa_function_pool[21730]: GetTrackMatrixivNV (will be remapped) */
+ /* _mesa_function_pool[23438]: GetTrackMatrixivNV (will be remapped) */
"iiip\0"
"glGetTrackMatrixivNV\0"
"\0"
- /* _mesa_function_pool[21757]: VertexAttrib3svNV (will be remapped) */
+ /* _mesa_function_pool[23465]: VertexAttrib3svNV (will be remapped) */
"ip\0"
"glVertexAttrib3svNV\0"
"\0"
- /* _mesa_function_pool[21781]: Uniform4fvARB (will be remapped) */
+ /* _mesa_function_pool[23489]: Uniform4fvARB (will be remapped) */
"iip\0"
"glUniform4fv\0"
"glUniform4fvARB\0"
"\0"
- /* _mesa_function_pool[21815]: MultTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[23523]: MultTransposeMatrixfARB (will be remapped) */
"p\0"
"glMultTransposeMatrixf\0"
"glMultTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[21867]: GetTexEnviv (offset 277) */
+ /* _mesa_function_pool[23575]: GetTexEnviv (offset 277) */
"iip\0"
"glGetTexEnviv\0"
"\0"
- /* _mesa_function_pool[21886]: ColorFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[23594]: ColorFragmentOp1ATI (will be remapped) */
"iiiiiii\0"
"glColorFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[21917]: GetUniformfvARB (will be remapped) */
+ /* _mesa_function_pool[23625]: GetUniformfvARB (will be remapped) */
"iip\0"
"glGetUniformfv\0"
"glGetUniformfvARB\0"
"\0"
- /* _mesa_function_pool[21955]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
+ /* _mesa_function_pool[23663]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
"ip\0"
"glEGLImageTargetRenderbufferStorageOES\0"
"\0"
- /* _mesa_function_pool[21998]: PopClientAttrib (offset 334) */
+ /* _mesa_function_pool[23706]: VertexAttribI2ivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI2ivEXT\0"
+ "glVertexAttribI2iv\0"
+ "\0"
+ /* _mesa_function_pool[23751]: PopClientAttrib (offset 334) */
"\0"
"glPopClientAttrib\0"
"\0"
- /* _mesa_function_pool[22018]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[23771]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffffff\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[22089]: DetachObjectARB (will be remapped) */
+ /* _mesa_function_pool[23842]: DetachObjectARB (will be remapped) */
"ii\0"
"glDetachObjectARB\0"
"\0"
- /* _mesa_function_pool[22111]: VertexBlendARB (dynamic) */
+ /* _mesa_function_pool[23864]: VertexBlendARB (dynamic) */
"i\0"
"glVertexBlendARB\0"
"\0"
- /* _mesa_function_pool[22131]: WindowPos3iMESA (will be remapped) */
+ /* _mesa_function_pool[23884]: WindowPos3iMESA (will be remapped) */
"iii\0"
"glWindowPos3i\0"
"glWindowPos3iARB\0"
"glWindowPos3iMESA\0"
"\0"
- /* _mesa_function_pool[22185]: SeparableFilter2D (offset 360) */
+ /* _mesa_function_pool[23938]: SeparableFilter2D (offset 360) */
"iiiiiipp\0"
"glSeparableFilter2D\0"
"glSeparableFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[22238]: ProgramParameteriARB (will be remapped) */
+ /* _mesa_function_pool[23991]: ProgramParameteriARB (will be remapped) */
"iii\0"
"glProgramParameteriARB\0"
"\0"
- /* _mesa_function_pool[22266]: Map1d (offset 220) */
+ /* _mesa_function_pool[24019]: Map1d (offset 220) */
"iddiip\0"
"glMap1d\0"
"\0"
- /* _mesa_function_pool[22282]: Map1f (offset 221) */
+ /* _mesa_function_pool[24035]: Map1f (offset 221) */
"iffiip\0"
"glMap1f\0"
"\0"
- /* _mesa_function_pool[22298]: CompressedTexImage2DARB (will be remapped) */
+ /* _mesa_function_pool[24051]: CompressedTexImage2DARB (will be remapped) */
"iiiiiiip\0"
"glCompressedTexImage2D\0"
"glCompressedTexImage2DARB\0"
"\0"
- /* _mesa_function_pool[22357]: ArrayElement (offset 306) */
+ /* _mesa_function_pool[24110]: ArrayElement (offset 306) */
"i\0"
"glArrayElement\0"
"glArrayElementEXT\0"
"\0"
- /* _mesa_function_pool[22393]: TexImage2D (offset 183) */
+ /* _mesa_function_pool[24146]: TexImage2D (offset 183) */
"iiiiiiiip\0"
"glTexImage2D\0"
"\0"
- /* _mesa_function_pool[22417]: DepthBoundsEXT (will be remapped) */
+ /* _mesa_function_pool[24170]: DepthBoundsEXT (will be remapped) */
"dd\0"
"glDepthBoundsEXT\0"
"\0"
- /* _mesa_function_pool[22438]: ProgramParameters4fvNV (will be remapped) */
+ /* _mesa_function_pool[24191]: ProgramParameters4fvNV (will be remapped) */
"iiip\0"
"glProgramParameters4fvNV\0"
"\0"
- /* _mesa_function_pool[22469]: DeformationMap3fSGIX (dynamic) */
+ /* _mesa_function_pool[24222]: DeformationMap3fSGIX (dynamic) */
"iffiiffiiffiip\0"
"glDeformationMap3fSGIX\0"
"\0"
- /* _mesa_function_pool[22508]: GetProgramivNV (will be remapped) */
+ /* _mesa_function_pool[24261]: GetProgramivNV (will be remapped) */
"iip\0"
"glGetProgramivNV\0"
"\0"
- /* _mesa_function_pool[22530]: GetMinmaxParameteriv (offset 366) */
+ /* _mesa_function_pool[24283]: GetFragDataLocationEXT (will be remapped) */
+ "ip\0"
+ "glGetFragDataLocationEXT\0"
+ "glGetFragDataLocation\0"
+ "\0"
+ /* _mesa_function_pool[24334]: GetMinmaxParameteriv (offset 366) */
"iip\0"
"glGetMinmaxParameteriv\0"
"glGetMinmaxParameterivEXT\0"
"\0"
- /* _mesa_function_pool[22584]: PixelTransferf (offset 247) */
+ /* _mesa_function_pool[24388]: PixelTransferf (offset 247) */
"if\0"
"glPixelTransferf\0"
"\0"
- /* _mesa_function_pool[22605]: CopyTexImage1D (offset 323) */
+ /* _mesa_function_pool[24409]: CopyTexImage1D (offset 323) */
"iiiiiii\0"
"glCopyTexImage1D\0"
"glCopyTexImage1DEXT\0"
"\0"
- /* _mesa_function_pool[22651]: PushMatrix (offset 298) */
+ /* _mesa_function_pool[24455]: PushMatrix (offset 298) */
"\0"
"glPushMatrix\0"
"\0"
- /* _mesa_function_pool[22666]: Fogiv (offset 156) */
+ /* _mesa_function_pool[24470]: Fogiv (offset 156) */
"ip\0"
"glFogiv\0"
"\0"
- /* _mesa_function_pool[22678]: TexCoord1dv (offset 95) */
+ /* _mesa_function_pool[24482]: TexCoord1dv (offset 95) */
"p\0"
"glTexCoord1dv\0"
"\0"
- /* _mesa_function_pool[22695]: AlphaFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[24499]: AlphaFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiii\0"
"glAlphaFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[22731]: PixelTransferi (offset 248) */
+ /* _mesa_function_pool[24535]: PixelTransferi (offset 248) */
"ii\0"
"glPixelTransferi\0"
"\0"
- /* _mesa_function_pool[22752]: GetVertexAttribdvNV (will be remapped) */
+ /* _mesa_function_pool[24556]: GetVertexAttribdvNV (will be remapped) */
"iip\0"
"glGetVertexAttribdvNV\0"
"\0"
- /* _mesa_function_pool[22779]: VertexAttrib3fvNV (will be remapped) */
+ /* _mesa_function_pool[24583]: VertexAttrib3fvNV (will be remapped) */
"ip\0"
"glVertexAttrib3fvNV\0"
"\0"
- /* _mesa_function_pool[22803]: Rotatef (offset 300) */
+ /* _mesa_function_pool[24607]: Rotatef (offset 300) */
"ffff\0"
"glRotatef\0"
"\0"
- /* _mesa_function_pool[22819]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[24623]: GetFinalCombinerInputParameterivNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[22861]: Vertex3i (offset 138) */
+ /* _mesa_function_pool[24665]: Vertex3i (offset 138) */
"iii\0"
"glVertex3i\0"
"\0"
- /* _mesa_function_pool[22877]: Vertex3f (offset 136) */
+ /* _mesa_function_pool[24681]: Vertex3f (offset 136) */
"fff\0"
"glVertex3f\0"
"\0"
- /* _mesa_function_pool[22893]: Clear (offset 203) */
+ /* _mesa_function_pool[24697]: Clear (offset 203) */
"i\0"
"glClear\0"
"\0"
- /* _mesa_function_pool[22904]: Vertex3d (offset 134) */
+ /* _mesa_function_pool[24708]: Vertex3d (offset 134) */
"ddd\0"
"glVertex3d\0"
"\0"
- /* _mesa_function_pool[22920]: GetMapParameterivNV (dynamic) */
+ /* _mesa_function_pool[24724]: GetMapParameterivNV (dynamic) */
"iip\0"
"glGetMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[22947]: Uniform4iARB (will be remapped) */
+ /* _mesa_function_pool[24751]: Uniform4iARB (will be remapped) */
"iiiii\0"
"glUniform4i\0"
"glUniform4iARB\0"
"\0"
- /* _mesa_function_pool[22981]: ReadBuffer (offset 254) */
+ /* _mesa_function_pool[24785]: ReadBuffer (offset 254) */
"i\0"
"glReadBuffer\0"
"\0"
- /* _mesa_function_pool[22997]: ConvolutionParameteri (offset 352) */
+ /* _mesa_function_pool[24801]: ConvolutionParameteri (offset 352) */
"iii\0"
"glConvolutionParameteri\0"
"glConvolutionParameteriEXT\0"
"\0"
- /* _mesa_function_pool[23053]: Ortho (offset 296) */
+ /* _mesa_function_pool[24857]: Ortho (offset 296) */
"dddddd\0"
"glOrtho\0"
"\0"
- /* _mesa_function_pool[23069]: Binormal3sEXT (dynamic) */
+ /* _mesa_function_pool[24873]: Binormal3sEXT (dynamic) */
"iii\0"
"glBinormal3sEXT\0"
"\0"
- /* _mesa_function_pool[23090]: ListBase (offset 6) */
+ /* _mesa_function_pool[24894]: ListBase (offset 6) */
"i\0"
"glListBase\0"
"\0"
- /* _mesa_function_pool[23104]: Vertex3s (offset 140) */
+ /* _mesa_function_pool[24908]: Vertex3s (offset 140) */
"iii\0"
"glVertex3s\0"
"\0"
- /* _mesa_function_pool[23120]: ConvolutionParameterf (offset 350) */
+ /* _mesa_function_pool[24924]: ConvolutionParameterf (offset 350) */
"iif\0"
"glConvolutionParameterf\0"
"glConvolutionParameterfEXT\0"
"\0"
- /* _mesa_function_pool[23176]: GetColorTableParameteriv (offset 345) */
+ /* _mesa_function_pool[24980]: GetColorTableParameteriv (offset 345) */
"iip\0"
"glGetColorTableParameteriv\0"
"glGetColorTableParameterivSGI\0"
"glGetColorTableParameterivEXT\0"
"\0"
- /* _mesa_function_pool[23268]: ProgramEnvParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[25072]: ProgramEnvParameter4dvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4dvARB\0"
"glProgramParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[23325]: ShadeModel (offset 177) */
+ /* _mesa_function_pool[25129]: ShadeModel (offset 177) */
"i\0"
"glShadeModel\0"
"\0"
- /* _mesa_function_pool[23341]: VertexAttribs2fvNV (will be remapped) */
+ /* _mesa_function_pool[25145]: VertexAttribs2fvNV (will be remapped) */
"iip\0"
"glVertexAttribs2fvNV\0"
"\0"
- /* _mesa_function_pool[23367]: Rectiv (offset 91) */
+ /* _mesa_function_pool[25171]: Rectiv (offset 91) */
"pp\0"
"glRectiv\0"
"\0"
- /* _mesa_function_pool[23380]: UseProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[25184]: UseProgramObjectARB (will be remapped) */
"i\0"
"glUseProgram\0"
"glUseProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[23418]: GetMapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[25222]: GetMapParameterfvNV (dynamic) */
"iip\0"
"glGetMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[23445]: EndConditionalRenderNV (will be remapped) */
+ /* _mesa_function_pool[25249]: EndConditionalRenderNV (will be remapped) */
"\0"
"glEndConditionalRenderNV\0"
+ "glEndConditionalRender\0"
"\0"
- /* _mesa_function_pool[23472]: PassTexCoordATI (will be remapped) */
+ /* _mesa_function_pool[25299]: PassTexCoordATI (will be remapped) */
"iii\0"
"glPassTexCoordATI\0"
"\0"
- /* _mesa_function_pool[23495]: DeleteProgram (will be remapped) */
+ /* _mesa_function_pool[25322]: DeleteProgram (will be remapped) */
"i\0"
"glDeleteProgram\0"
"\0"
- /* _mesa_function_pool[23514]: Tangent3ivEXT (dynamic) */
+ /* _mesa_function_pool[25341]: Tangent3ivEXT (dynamic) */
"p\0"
"glTangent3ivEXT\0"
"\0"
- /* _mesa_function_pool[23533]: Tangent3dEXT (dynamic) */
+ /* _mesa_function_pool[25360]: Tangent3dEXT (dynamic) */
"ddd\0"
"glTangent3dEXT\0"
"\0"
- /* _mesa_function_pool[23553]: SecondaryColor3dvEXT (will be remapped) */
+ /* _mesa_function_pool[25380]: SecondaryColor3dvEXT (will be remapped) */
"p\0"
"glSecondaryColor3dv\0"
"glSecondaryColor3dvEXT\0"
"\0"
- /* _mesa_function_pool[23599]: Vertex2fv (offset 129) */
+ /* _mesa_function_pool[25426]: Vertex2fv (offset 129) */
"p\0"
"glVertex2fv\0"
"\0"
- /* _mesa_function_pool[23614]: MultiDrawArraysEXT (will be remapped) */
+ /* _mesa_function_pool[25441]: MultiDrawArraysEXT (will be remapped) */
"ippi\0"
"glMultiDrawArrays\0"
"glMultiDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[23659]: BindRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[25486]: BindRenderbufferEXT (will be remapped) */
"ii\0"
"glBindRenderbuffer\0"
"glBindRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[23704]: MultiTexCoord4dARB (offset 400) */
+ /* _mesa_function_pool[25531]: MultiTexCoord4dARB (offset 400) */
"idddd\0"
"glMultiTexCoord4d\0"
"glMultiTexCoord4dARB\0"
"\0"
- /* _mesa_function_pool[23750]: FramebufferTextureFaceARB (will be remapped) */
+ /* _mesa_function_pool[25577]: FramebufferTextureFaceARB (will be remapped) */
"iiiii\0"
"glFramebufferTextureFaceARB\0"
"\0"
- /* _mesa_function_pool[23785]: Vertex3sv (offset 141) */
+ /* _mesa_function_pool[25612]: Vertex3sv (offset 141) */
"p\0"
"glVertex3sv\0"
"\0"
- /* _mesa_function_pool[23800]: SecondaryColor3usEXT (will be remapped) */
+ /* _mesa_function_pool[25627]: SecondaryColor3usEXT (will be remapped) */
"iii\0"
"glSecondaryColor3us\0"
"glSecondaryColor3usEXT\0"
"\0"
- /* _mesa_function_pool[23848]: ProgramLocalParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[25675]: ProgramLocalParameter4fvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4fvARB\0"
"\0"
- /* _mesa_function_pool[23883]: DeleteProgramsNV (will be remapped) */
+ /* _mesa_function_pool[25710]: DeleteProgramsNV (will be remapped) */
"ip\0"
"glDeleteProgramsARB\0"
"glDeleteProgramsNV\0"
"\0"
- /* _mesa_function_pool[23926]: EvalMesh1 (offset 236) */
+ /* _mesa_function_pool[25753]: EvalMesh1 (offset 236) */
"iii\0"
"glEvalMesh1\0"
"\0"
- /* _mesa_function_pool[23943]: PauseTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[25770]: PauseTransformFeedback (will be remapped) */
"\0"
"glPauseTransformFeedback\0"
"\0"
- /* _mesa_function_pool[23970]: MultiTexCoord1sARB (offset 382) */
+ /* _mesa_function_pool[25797]: MultiTexCoord1sARB (offset 382) */
"ii\0"
"glMultiTexCoord1s\0"
"glMultiTexCoord1sARB\0"
"\0"
- /* _mesa_function_pool[24013]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[25840]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[24060]: GetVertexAttribPointervNV (will be remapped) */
+ /* _mesa_function_pool[25887]: GetVertexAttribPointervNV (will be remapped) */
"iip\0"
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
"glGetVertexAttribPointervNV\0"
"\0"
- /* _mesa_function_pool[24148]: VertexAttribs1fvNV (will be remapped) */
+ /* _mesa_function_pool[25975]: VertexAttribs1fvNV (will be remapped) */
"iip\0"
"glVertexAttribs1fvNV\0"
"\0"
- /* _mesa_function_pool[24174]: MultiTexCoord1dvARB (offset 377) */
+ /* _mesa_function_pool[26001]: MultiTexCoord1dvARB (offset 377) */
"ip\0"
"glMultiTexCoord1dv\0"
"glMultiTexCoord1dvARB\0"
"\0"
- /* _mesa_function_pool[24219]: Uniform2iARB (will be remapped) */
+ /* _mesa_function_pool[26046]: Uniform2iARB (will be remapped) */
"iii\0"
"glUniform2i\0"
"glUniform2iARB\0"
"\0"
- /* _mesa_function_pool[24251]: Vertex2iv (offset 131) */
+ /* _mesa_function_pool[26078]: Vertex2iv (offset 131) */
"p\0"
"glVertex2iv\0"
"\0"
- /* _mesa_function_pool[24266]: GetProgramStringNV (will be remapped) */
+ /* _mesa_function_pool[26093]: GetProgramStringNV (will be remapped) */
"iip\0"
"glGetProgramStringNV\0"
"\0"
- /* _mesa_function_pool[24292]: ColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[26119]: ColorPointerEXT (will be remapped) */
"iiiip\0"
"glColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[24317]: LineWidth (offset 168) */
+ /* _mesa_function_pool[26144]: LineWidth (offset 168) */
"f\0"
"glLineWidth\0"
"\0"
- /* _mesa_function_pool[24332]: MapBufferARB (will be remapped) */
+ /* _mesa_function_pool[26159]: MapBufferARB (will be remapped) */
"ii\0"
"glMapBuffer\0"
"glMapBufferARB\0"
"\0"
- /* _mesa_function_pool[24363]: MultiDrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[26190]: MultiDrawElementsBaseVertex (will be remapped) */
"ipipip\0"
"glMultiDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[24401]: Binormal3svEXT (dynamic) */
+ /* _mesa_function_pool[26228]: TexParameterIuivEXT (will be remapped) */
+ "iip\0"
+ "glTexParameterIuivEXT\0"
+ "glTexParameterIuiv\0"
+ "\0"
+ /* _mesa_function_pool[26274]: Binormal3svEXT (dynamic) */
"p\0"
"glBinormal3svEXT\0"
"\0"
- /* _mesa_function_pool[24421]: ApplyTextureEXT (dynamic) */
+ /* _mesa_function_pool[26294]: ApplyTextureEXT (dynamic) */
"i\0"
"glApplyTextureEXT\0"
"\0"
- /* _mesa_function_pool[24442]: TexGendv (offset 189) */
+ /* _mesa_function_pool[26315]: GetBufferParameteri64v (will be remapped) */
+ "iip\0"
+ "glGetBufferParameteri64v\0"
+ "\0"
+ /* _mesa_function_pool[26345]: TexGendv (offset 189) */
"iip\0"
"glTexGendv\0"
"\0"
- /* _mesa_function_pool[24458]: EnableIndexedEXT (will be remapped) */
+ /* _mesa_function_pool[26361]: VertexAttribI3iEXT (will be remapped) */
+ "iiii\0"
+ "glVertexAttribI3iEXT\0"
+ "glVertexAttribI3i\0"
+ "\0"
+ /* _mesa_function_pool[26406]: EnableIndexedEXT (will be remapped) */
"ii\0"
"glEnableIndexedEXT\0"
+ "glEnablei\0"
"\0"
- /* _mesa_function_pool[24481]: TextureMaterialEXT (dynamic) */
+ /* _mesa_function_pool[26439]: TextureMaterialEXT (dynamic) */
"ii\0"
"glTextureMaterialEXT\0"
"\0"
- /* _mesa_function_pool[24506]: TextureLightEXT (dynamic) */
+ /* _mesa_function_pool[26464]: TextureLightEXT (dynamic) */
"i\0"
"glTextureLightEXT\0"
"\0"
- /* _mesa_function_pool[24527]: ResetMinmax (offset 370) */
+ /* _mesa_function_pool[26485]: ResetMinmax (offset 370) */
"i\0"
"glResetMinmax\0"
"glResetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[24561]: SpriteParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[26519]: SpriteParameterfSGIX (dynamic) */
"if\0"
"glSpriteParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[24588]: EnableClientState (offset 313) */
+ /* _mesa_function_pool[26546]: EnableClientState (offset 313) */
"i\0"
"glEnableClientState\0"
"\0"
- /* _mesa_function_pool[24611]: VertexAttrib4sNV (will be remapped) */
+ /* _mesa_function_pool[26569]: VertexAttrib4sNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4sNV\0"
"\0"
- /* _mesa_function_pool[24637]: GetConvolutionParameterfv (offset 357) */
+ /* _mesa_function_pool[26595]: GetConvolutionParameterfv (offset 357) */
"iip\0"
"glGetConvolutionParameterfv\0"
"glGetConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[24701]: VertexAttribs4dvNV (will be remapped) */
+ /* _mesa_function_pool[26659]: VertexAttribs4dvNV (will be remapped) */
"iip\0"
"glVertexAttribs4dvNV\0"
"\0"
- /* _mesa_function_pool[24727]: VertexAttrib4dARB (will be remapped) */
+ /* _mesa_function_pool[26685]: VertexAttrib4dARB (will be remapped) */
"idddd\0"
"glVertexAttrib4d\0"
"glVertexAttrib4dARB\0"
"\0"
- /* _mesa_function_pool[24771]: GetTexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[26729]: GetTexBumpParameterfvATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[24802]: ProgramNamedParameter4dNV (will be remapped) */
+ /* _mesa_function_pool[26760]: ProgramNamedParameter4dNV (will be remapped) */
"iipdddd\0"
"glProgramNamedParameter4dNV\0"
"\0"
- /* _mesa_function_pool[24839]: GetMaterialfv (offset 269) */
+ /* _mesa_function_pool[26797]: GetMaterialfv (offset 269) */
"iip\0"
"glGetMaterialfv\0"
"\0"
- /* _mesa_function_pool[24860]: VertexWeightfEXT (dynamic) */
+ /* _mesa_function_pool[26818]: VertexWeightfEXT (dynamic) */
"f\0"
"glVertexWeightfEXT\0"
"\0"
- /* _mesa_function_pool[24882]: Binormal3fEXT (dynamic) */
+ /* _mesa_function_pool[26840]: Binormal3fEXT (dynamic) */
"fff\0"
"glBinormal3fEXT\0"
"\0"
- /* _mesa_function_pool[24903]: CallList (offset 2) */
+ /* _mesa_function_pool[26861]: CallList (offset 2) */
"i\0"
"glCallList\0"
"\0"
- /* _mesa_function_pool[24917]: Materialfv (offset 170) */
+ /* _mesa_function_pool[26875]: Materialfv (offset 170) */
"iip\0"
"glMaterialfv\0"
"\0"
- /* _mesa_function_pool[24935]: TexCoord3fv (offset 113) */
+ /* _mesa_function_pool[26893]: TexCoord3fv (offset 113) */
"p\0"
"glTexCoord3fv\0"
"\0"
- /* _mesa_function_pool[24952]: FogCoordfvEXT (will be remapped) */
+ /* _mesa_function_pool[26910]: FogCoordfvEXT (will be remapped) */
"p\0"
"glFogCoordfv\0"
"glFogCoordfvEXT\0"
"\0"
- /* _mesa_function_pool[24984]: MultiTexCoord1ivARB (offset 381) */
+ /* _mesa_function_pool[26942]: MultiTexCoord1ivARB (offset 381) */
"ip\0"
"glMultiTexCoord1iv\0"
"glMultiTexCoord1ivARB\0"
"\0"
- /* _mesa_function_pool[25029]: SecondaryColor3ubEXT (will be remapped) */
+ /* _mesa_function_pool[26987]: SecondaryColor3ubEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ub\0"
"glSecondaryColor3ubEXT\0"
"\0"
- /* _mesa_function_pool[25077]: MultiTexCoord2ivARB (offset 389) */
+ /* _mesa_function_pool[27035]: MultiTexCoord2ivARB (offset 389) */
"ip\0"
"glMultiTexCoord2iv\0"
"glMultiTexCoord2ivARB\0"
"\0"
- /* _mesa_function_pool[25122]: FogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[27080]: FogFuncSGIS (dynamic) */
"ip\0"
"glFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[25140]: CopyTexSubImage2D (offset 326) */
+ /* _mesa_function_pool[27098]: CopyTexSubImage2D (offset 326) */
"iiiiiiii\0"
"glCopyTexSubImage2D\0"
"glCopyTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[25193]: GetObjectParameterivARB (will be remapped) */
+ /* _mesa_function_pool[27151]: GetObjectParameterivARB (will be remapped) */
"iip\0"
"glGetObjectParameterivARB\0"
"\0"
- /* _mesa_function_pool[25224]: Color3iv (offset 16) */
+ /* _mesa_function_pool[27182]: Color3iv (offset 16) */
"p\0"
"glColor3iv\0"
"\0"
- /* _mesa_function_pool[25238]: TexCoord4fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[27196]: TexCoord4fVertex4fSUN (dynamic) */
"ffffffff\0"
"glTexCoord4fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[25272]: DrawElements (offset 311) */
+ /* _mesa_function_pool[27230]: DrawElements (offset 311) */
"iiip\0"
"glDrawElements\0"
"\0"
- /* _mesa_function_pool[25293]: BindVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[27251]: BindVertexArrayAPPLE (will be remapped) */
"i\0"
"glBindVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[25319]: GetProgramLocalParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[27277]: GetProgramLocalParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterdvARB\0"
"\0"
- /* _mesa_function_pool[25356]: GetHistogramParameteriv (offset 363) */
+ /* _mesa_function_pool[27314]: GetHistogramParameteriv (offset 363) */
"iip\0"
"glGetHistogramParameteriv\0"
"glGetHistogramParameterivEXT\0"
"\0"
- /* _mesa_function_pool[25416]: MultiTexCoord1iARB (offset 380) */
+ /* _mesa_function_pool[27374]: MultiTexCoord1iARB (offset 380) */
"ii\0"
"glMultiTexCoord1i\0"
"glMultiTexCoord1iARB\0"
"\0"
- /* _mesa_function_pool[25459]: GetConvolutionFilter (offset 356) */
+ /* _mesa_function_pool[27417]: GetConvolutionFilter (offset 356) */
"iiip\0"
"glGetConvolutionFilter\0"
"glGetConvolutionFilterEXT\0"
"\0"
- /* _mesa_function_pool[25514]: GetProgramivARB (will be remapped) */
+ /* _mesa_function_pool[27472]: GetProgramivARB (will be remapped) */
"iip\0"
"glGetProgramivARB\0"
"\0"
- /* _mesa_function_pool[25537]: BlendFuncSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[27495]: BlendFuncSeparateEXT (will be remapped) */
"iiii\0"
"glBlendFuncSeparate\0"
"glBlendFuncSeparateEXT\0"
"glBlendFuncSeparateINGR\0"
"\0"
- /* _mesa_function_pool[25610]: MapBufferRange (will be remapped) */
+ /* _mesa_function_pool[27568]: MapBufferRange (will be remapped) */
"iiii\0"
"glMapBufferRange\0"
"\0"
- /* _mesa_function_pool[25633]: ProgramParameters4dvNV (will be remapped) */
+ /* _mesa_function_pool[27591]: ProgramParameters4dvNV (will be remapped) */
"iiip\0"
"glProgramParameters4dvNV\0"
"\0"
- /* _mesa_function_pool[25664]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[27622]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[25701]: EvalPoint2 (offset 239) */
+ /* _mesa_function_pool[27659]: EvalPoint2 (offset 239) */
"ii\0"
"glEvalPoint2\0"
"\0"
- /* _mesa_function_pool[25718]: EvalPoint1 (offset 237) */
+ /* _mesa_function_pool[27676]: Uniform1uivEXT (will be remapped) */
+ "iip\0"
+ "glUniform1uivEXT\0"
+ "glUniform1uiv\0"
+ "\0"
+ /* _mesa_function_pool[27712]: EvalPoint1 (offset 237) */
"i\0"
"glEvalPoint1\0"
"\0"
- /* _mesa_function_pool[25734]: Binormal3dvEXT (dynamic) */
+ /* _mesa_function_pool[27728]: Binormal3dvEXT (dynamic) */
"p\0"
"glBinormal3dvEXT\0"
"\0"
- /* _mesa_function_pool[25754]: PopMatrix (offset 297) */
+ /* _mesa_function_pool[27748]: PopMatrix (offset 297) */
"\0"
"glPopMatrix\0"
"\0"
- /* _mesa_function_pool[25768]: FinishFenceNV (will be remapped) */
+ /* _mesa_function_pool[27762]: FinishFenceNV (will be remapped) */
"i\0"
"glFinishFenceNV\0"
"\0"
- /* _mesa_function_pool[25787]: GetFogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[27781]: GetFogFuncSGIS (dynamic) */
"p\0"
"glGetFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[25807]: GetUniformLocationARB (will be remapped) */
+ /* _mesa_function_pool[27801]: GetUniformLocationARB (will be remapped) */
"ip\0"
"glGetUniformLocation\0"
"glGetUniformLocationARB\0"
"\0"
- /* _mesa_function_pool[25856]: SecondaryColor3fEXT (will be remapped) */
+ /* _mesa_function_pool[27850]: SecondaryColor3fEXT (will be remapped) */
"fff\0"
"glSecondaryColor3f\0"
"glSecondaryColor3fEXT\0"
"\0"
- /* _mesa_function_pool[25902]: GetTexGeniv (offset 280) */
+ /* _mesa_function_pool[27896]: GetTexGeniv (offset 280) */
"iip\0"
"glGetTexGeniv\0"
"\0"
- /* _mesa_function_pool[25921]: CombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[27915]: CombinerInputNV (will be remapped) */
"iiiiii\0"
"glCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[25947]: VertexAttrib3sARB (will be remapped) */
+ /* _mesa_function_pool[27941]: VertexAttrib3sARB (will be remapped) */
"iiii\0"
"glVertexAttrib3s\0"
"glVertexAttrib3sARB\0"
"\0"
- /* _mesa_function_pool[25990]: IsTransformFeedback (will be remapped) */
+ /* _mesa_function_pool[27984]: IsTransformFeedback (will be remapped) */
"i\0"
"glIsTransformFeedback\0"
"\0"
- /* _mesa_function_pool[26015]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[28009]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[26060]: Map2d (offset 222) */
+ /* _mesa_function_pool[28054]: Map2d (offset 222) */
"iddiiddiip\0"
"glMap2d\0"
"\0"
- /* _mesa_function_pool[26080]: Map2f (offset 223) */
+ /* _mesa_function_pool[28074]: Map2f (offset 223) */
"iffiiffiip\0"
"glMap2f\0"
"\0"
- /* _mesa_function_pool[26100]: ProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[28094]: ProgramStringARB (will be remapped) */
"iiip\0"
"glProgramStringARB\0"
"\0"
- /* _mesa_function_pool[26125]: Vertex4s (offset 148) */
+ /* _mesa_function_pool[28119]: Vertex4s (offset 148) */
"iiii\0"
"glVertex4s\0"
"\0"
- /* _mesa_function_pool[26142]: TexCoord4fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[28136]: TexCoord4fVertex4fvSUN (dynamic) */
"pp\0"
"glTexCoord4fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[26171]: FragmentLightModelivSGIX (dynamic) */
+ /* _mesa_function_pool[28165]: FragmentLightModelivSGIX (dynamic) */
"ip\0"
"glFragmentLightModelivSGIX\0"
"\0"
- /* _mesa_function_pool[26202]: VertexAttrib1fNV (will be remapped) */
+ /* _mesa_function_pool[28196]: VertexAttrib1fNV (will be remapped) */
"if\0"
"glVertexAttrib1fNV\0"
"\0"
- /* _mesa_function_pool[26225]: Vertex4f (offset 144) */
+ /* _mesa_function_pool[28219]: Vertex4f (offset 144) */
"ffff\0"
"glVertex4f\0"
"\0"
- /* _mesa_function_pool[26242]: EvalCoord1d (offset 228) */
+ /* _mesa_function_pool[28236]: EvalCoord1d (offset 228) */
"d\0"
"glEvalCoord1d\0"
"\0"
- /* _mesa_function_pool[26259]: Vertex4d (offset 142) */
+ /* _mesa_function_pool[28253]: Vertex4d (offset 142) */
"dddd\0"
"glVertex4d\0"
"\0"
- /* _mesa_function_pool[26276]: RasterPos4dv (offset 79) */
+ /* _mesa_function_pool[28270]: RasterPos4dv (offset 79) */
"p\0"
"glRasterPos4dv\0"
"\0"
- /* _mesa_function_pool[26294]: FragmentLightfSGIX (dynamic) */
+ /* _mesa_function_pool[28288]: UseShaderProgramEXT (will be remapped) */
+ "ii\0"
+ "glUseShaderProgramEXT\0"
+ "\0"
+ /* _mesa_function_pool[28314]: FragmentLightfSGIX (dynamic) */
"iif\0"
"glFragmentLightfSGIX\0"
"\0"
- /* _mesa_function_pool[26320]: GetCompressedTexImageARB (will be remapped) */
+ /* _mesa_function_pool[28340]: GetCompressedTexImageARB (will be remapped) */
"iip\0"
"glGetCompressedTexImage\0"
"glGetCompressedTexImageARB\0"
"\0"
- /* _mesa_function_pool[26376]: GetTexGenfv (offset 279) */
+ /* _mesa_function_pool[28396]: GetTexGenfv (offset 279) */
"iip\0"
"glGetTexGenfv\0"
"\0"
- /* _mesa_function_pool[26395]: Vertex4i (offset 146) */
+ /* _mesa_function_pool[28415]: Vertex4i (offset 146) */
"iiii\0"
"glVertex4i\0"
"\0"
- /* _mesa_function_pool[26412]: VertexWeightPointerEXT (dynamic) */
+ /* _mesa_function_pool[28432]: VertexWeightPointerEXT (dynamic) */
"iiip\0"
"glVertexWeightPointerEXT\0"
"\0"
- /* _mesa_function_pool[26443]: GetHistogram (offset 361) */
+ /* _mesa_function_pool[28463]: GetHistogram (offset 361) */
"iiiip\0"
"glGetHistogram\0"
"glGetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[26483]: ActiveStencilFaceEXT (will be remapped) */
+ /* _mesa_function_pool[28503]: ActiveStencilFaceEXT (will be remapped) */
"i\0"
"glActiveStencilFaceEXT\0"
"\0"
- /* _mesa_function_pool[26509]: StencilFuncSeparateATI (will be remapped) */
+ /* _mesa_function_pool[28529]: StencilFuncSeparateATI (will be remapped) */
"iiii\0"
"glStencilFuncSeparateATI\0"
"\0"
- /* _mesa_function_pool[26540]: Materialf (offset 169) */
+ /* _mesa_function_pool[28560]: Materialf (offset 169) */
"iif\0"
"glMaterialf\0"
"\0"
- /* _mesa_function_pool[26557]: GetShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[28577]: GetShaderSourceARB (will be remapped) */
"iipp\0"
"glGetShaderSource\0"
"glGetShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[26602]: IglooInterfaceSGIX (dynamic) */
+ /* _mesa_function_pool[28622]: IglooInterfaceSGIX (dynamic) */
"ip\0"
"glIglooInterfaceSGIX\0"
"\0"
- /* _mesa_function_pool[26627]: Materiali (offset 171) */
+ /* _mesa_function_pool[28647]: Materiali (offset 171) */
"iii\0"
"glMateriali\0"
"\0"
- /* _mesa_function_pool[26644]: VertexAttrib4dNV (will be remapped) */
+ /* _mesa_function_pool[28664]: VertexAttrib4dNV (will be remapped) */
"idddd\0"
"glVertexAttrib4dNV\0"
"\0"
- /* _mesa_function_pool[26670]: MultiModeDrawElementsIBM (will be remapped) */
+ /* _mesa_function_pool[28690]: MultiModeDrawElementsIBM (will be remapped) */
"ppipii\0"
"glMultiModeDrawElementsIBM\0"
"\0"
- /* _mesa_function_pool[26705]: Indexsv (offset 51) */
+ /* _mesa_function_pool[28725]: Indexsv (offset 51) */
"p\0"
"glIndexsv\0"
"\0"
- /* _mesa_function_pool[26718]: MultiTexCoord4svARB (offset 407) */
+ /* _mesa_function_pool[28738]: MultiTexCoord4svARB (offset 407) */
"ip\0"
"glMultiTexCoord4sv\0"
"glMultiTexCoord4svARB\0"
"\0"
- /* _mesa_function_pool[26763]: LightModelfv (offset 164) */
+ /* _mesa_function_pool[28783]: LightModelfv (offset 164) */
"ip\0"
"glLightModelfv\0"
"\0"
- /* _mesa_function_pool[26782]: TexCoord2dv (offset 103) */
+ /* _mesa_function_pool[28802]: TexCoord2dv (offset 103) */
"p\0"
"glTexCoord2dv\0"
"\0"
- /* _mesa_function_pool[26799]: GenQueriesARB (will be remapped) */
+ /* _mesa_function_pool[28819]: GenQueriesARB (will be remapped) */
"ip\0"
"glGenQueries\0"
"glGenQueriesARB\0"
"\0"
- /* _mesa_function_pool[26832]: EvalCoord1dv (offset 229) */
+ /* _mesa_function_pool[28852]: EvalCoord1dv (offset 229) */
"p\0"
"glEvalCoord1dv\0"
"\0"
- /* _mesa_function_pool[26850]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[28870]: ReplacementCodeuiVertex3fSUN (dynamic) */
"ifff\0"
"glReplacementCodeuiVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[26887]: Translated (offset 303) */
+ /* _mesa_function_pool[28907]: Translated (offset 303) */
"ddd\0"
"glTranslated\0"
"\0"
- /* _mesa_function_pool[26905]: Translatef (offset 304) */
+ /* _mesa_function_pool[28925]: Translatef (offset 304) */
"fff\0"
"glTranslatef\0"
"\0"
- /* _mesa_function_pool[26923]: StencilMask (offset 209) */
+ /* _mesa_function_pool[28943]: Uniform3uiEXT (will be remapped) */
+ "iiii\0"
+ "glUniform3uiEXT\0"
+ "glUniform3ui\0"
+ "\0"
+ /* _mesa_function_pool[28978]: StencilMask (offset 209) */
"i\0"
"glStencilMask\0"
"\0"
- /* _mesa_function_pool[26940]: Tangent3iEXT (dynamic) */
+ /* _mesa_function_pool[28995]: Tangent3iEXT (dynamic) */
"iii\0"
"glTangent3iEXT\0"
"\0"
- /* _mesa_function_pool[26960]: GetLightiv (offset 265) */
+ /* _mesa_function_pool[29015]: GetLightiv (offset 265) */
"iip\0"
"glGetLightiv\0"
"\0"
- /* _mesa_function_pool[26978]: DrawMeshArraysSUN (dynamic) */
+ /* _mesa_function_pool[29033]: DrawMeshArraysSUN (dynamic) */
"iiii\0"
"glDrawMeshArraysSUN\0"
"\0"
- /* _mesa_function_pool[27004]: IsList (offset 287) */
+ /* _mesa_function_pool[29059]: IsList (offset 287) */
"i\0"
"glIsList\0"
"\0"
- /* _mesa_function_pool[27016]: IsSync (will be remapped) */
+ /* _mesa_function_pool[29071]: IsSync (will be remapped) */
"i\0"
"glIsSync\0"
"\0"
- /* _mesa_function_pool[27028]: RenderMode (offset 196) */
+ /* _mesa_function_pool[29083]: RenderMode (offset 196) */
"i\0"
"glRenderMode\0"
"\0"
- /* _mesa_function_pool[27044]: GetMapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[29099]: GetMapControlPointsNV (dynamic) */
"iiiiiip\0"
"glGetMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[27077]: DrawBuffersARB (will be remapped) */
+ /* _mesa_function_pool[29132]: DrawBuffersARB (will be remapped) */
"ip\0"
"glDrawBuffers\0"
"glDrawBuffersARB\0"
"glDrawBuffersATI\0"
"\0"
- /* _mesa_function_pool[27129]: ProgramLocalParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[29184]: ClearBufferiv (will be remapped) */
+ "iip\0"
+ "glClearBufferiv\0"
+ "\0"
+ /* _mesa_function_pool[29205]: ProgramLocalParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramLocalParameter4fARB\0"
"\0"
- /* _mesa_function_pool[27166]: SpriteParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[29242]: SpriteParameterivSGIX (dynamic) */
"ip\0"
"glSpriteParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[27194]: ProvokingVertexEXT (will be remapped) */
+ /* _mesa_function_pool[29270]: ProvokingVertexEXT (will be remapped) */
"i\0"
"glProvokingVertexEXT\0"
"glProvokingVertex\0"
"\0"
- /* _mesa_function_pool[27236]: MultiTexCoord1fARB (offset 378) */
+ /* _mesa_function_pool[29312]: MultiTexCoord1fARB (offset 378) */
"if\0"
"glMultiTexCoord1f\0"
"glMultiTexCoord1fARB\0"
"\0"
- /* _mesa_function_pool[27279]: LoadName (offset 198) */
+ /* _mesa_function_pool[29355]: LoadName (offset 198) */
"i\0"
"glLoadName\0"
"\0"
- /* _mesa_function_pool[27293]: VertexAttribs4ubvNV (will be remapped) */
+ /* _mesa_function_pool[29369]: VertexAttribs4ubvNV (will be remapped) */
"iip\0"
"glVertexAttribs4ubvNV\0"
"\0"
- /* _mesa_function_pool[27320]: WeightsvARB (dynamic) */
+ /* _mesa_function_pool[29396]: WeightsvARB (dynamic) */
"ip\0"
"glWeightsvARB\0"
"\0"
- /* _mesa_function_pool[27338]: Uniform1fvARB (will be remapped) */
+ /* _mesa_function_pool[29414]: Uniform1fvARB (will be remapped) */
"iip\0"
"glUniform1fv\0"
"glUniform1fvARB\0"
"\0"
- /* _mesa_function_pool[27372]: CopyTexSubImage1D (offset 325) */
+ /* _mesa_function_pool[29448]: CopyTexSubImage1D (offset 325) */
"iiiiii\0"
"glCopyTexSubImage1D\0"
"glCopyTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[27423]: CullFace (offset 152) */
+ /* _mesa_function_pool[29499]: CullFace (offset 152) */
"i\0"
"glCullFace\0"
"\0"
- /* _mesa_function_pool[27437]: BindTexture (offset 307) */
+ /* _mesa_function_pool[29513]: BindTexture (offset 307) */
"ii\0"
"glBindTexture\0"
"glBindTextureEXT\0"
"\0"
- /* _mesa_function_pool[27472]: BeginFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[29548]: BeginFragmentShaderATI (will be remapped) */
"\0"
"glBeginFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[27499]: MultiTexCoord4fARB (offset 402) */
+ /* _mesa_function_pool[29575]: MultiTexCoord4fARB (offset 402) */
"iffff\0"
"glMultiTexCoord4f\0"
"glMultiTexCoord4fARB\0"
"\0"
- /* _mesa_function_pool[27545]: VertexAttribs3svNV (will be remapped) */
+ /* _mesa_function_pool[29621]: VertexAttribs3svNV (will be remapped) */
"iip\0"
"glVertexAttribs3svNV\0"
"\0"
- /* _mesa_function_pool[27571]: StencilFunc (offset 243) */
+ /* _mesa_function_pool[29647]: StencilFunc (offset 243) */
"iii\0"
"glStencilFunc\0"
"\0"
- /* _mesa_function_pool[27590]: CopyPixels (offset 255) */
+ /* _mesa_function_pool[29666]: CopyPixels (offset 255) */
"iiiii\0"
"glCopyPixels\0"
"\0"
- /* _mesa_function_pool[27610]: Rectsv (offset 93) */
+ /* _mesa_function_pool[29686]: Rectsv (offset 93) */
"pp\0"
"glRectsv\0"
"\0"
- /* _mesa_function_pool[27623]: ReplacementCodeuivSUN (dynamic) */
+ /* _mesa_function_pool[29699]: ReplacementCodeuivSUN (dynamic) */
"p\0"
"glReplacementCodeuivSUN\0"
"\0"
- /* _mesa_function_pool[27650]: EnableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[29726]: EnableVertexAttribArrayARB (will be remapped) */
"i\0"
"glEnableVertexAttribArray\0"
"glEnableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[27708]: NormalPointervINTEL (dynamic) */
+ /* _mesa_function_pool[29784]: NormalPointervINTEL (dynamic) */
"ip\0"
"glNormalPointervINTEL\0"
"\0"
- /* _mesa_function_pool[27734]: CopyConvolutionFilter2D (offset 355) */
+ /* _mesa_function_pool[29810]: CopyConvolutionFilter2D (offset 355) */
"iiiiii\0"
"glCopyConvolutionFilter2D\0"
"glCopyConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[27797]: WindowPos3ivMESA (will be remapped) */
+ /* _mesa_function_pool[29873]: WindowPos3ivMESA (will be remapped) */
"p\0"
"glWindowPos3iv\0"
"glWindowPos3ivARB\0"
"glWindowPos3ivMESA\0"
"\0"
- /* _mesa_function_pool[27852]: CopyBufferSubData (will be remapped) */
+ /* _mesa_function_pool[29928]: CopyBufferSubData (will be remapped) */
"iiiii\0"
"glCopyBufferSubData\0"
"\0"
- /* _mesa_function_pool[27879]: NormalPointer (offset 318) */
+ /* _mesa_function_pool[29955]: NormalPointer (offset 318) */
"iip\0"
"glNormalPointer\0"
"\0"
- /* _mesa_function_pool[27900]: TexParameterfv (offset 179) */
+ /* _mesa_function_pool[29976]: TexParameterfv (offset 179) */
"iip\0"
"glTexParameterfv\0"
"\0"
- /* _mesa_function_pool[27922]: IsBufferARB (will be remapped) */
+ /* _mesa_function_pool[29998]: IsBufferARB (will be remapped) */
"i\0"
"glIsBuffer\0"
"glIsBufferARB\0"
"\0"
- /* _mesa_function_pool[27950]: WindowPos4iMESA (will be remapped) */
+ /* _mesa_function_pool[30026]: WindowPos4iMESA (will be remapped) */
"iiii\0"
"glWindowPos4iMESA\0"
"\0"
- /* _mesa_function_pool[27974]: VertexAttrib4uivARB (will be remapped) */
+ /* _mesa_function_pool[30050]: VertexAttrib4uivARB (will be remapped) */
"ip\0"
"glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
"\0"
- /* _mesa_function_pool[28019]: Tangent3bvEXT (dynamic) */
+ /* _mesa_function_pool[30095]: Tangent3bvEXT (dynamic) */
"p\0"
"glTangent3bvEXT\0"
"\0"
- /* _mesa_function_pool[28038]: UniformMatrix3x4fv (will be remapped) */
+ /* _mesa_function_pool[30114]: VertexAttribI3uivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI3uivEXT\0"
+ "glVertexAttribI3uiv\0"
+ "\0"
+ /* _mesa_function_pool[30161]: UniformMatrix3x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x4fv\0"
"\0"
- /* _mesa_function_pool[28065]: ClipPlane (offset 150) */
+ /* _mesa_function_pool[30188]: ClipPlane (offset 150) */
"ip\0"
"glClipPlane\0"
"\0"
- /* _mesa_function_pool[28081]: Recti (offset 90) */
+ /* _mesa_function_pool[30204]: Recti (offset 90) */
"iiii\0"
"glRecti\0"
"\0"
- /* _mesa_function_pool[28095]: DrawRangeElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[30218]: VertexAttribI3ivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI3ivEXT\0"
+ "glVertexAttribI3iv\0"
+ "\0"
+ /* _mesa_function_pool[30263]: DrawRangeElementsBaseVertex (will be remapped) */
"iiiiipi\0"
"glDrawRangeElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[28134]: TexCoordPointervINTEL (dynamic) */
+ /* _mesa_function_pool[30302]: TexCoordPointervINTEL (dynamic) */
"iip\0"
"glTexCoordPointervINTEL\0"
"\0"
- /* _mesa_function_pool[28163]: DeleteBuffersARB (will be remapped) */
+ /* _mesa_function_pool[30331]: DeleteBuffersARB (will be remapped) */
"ip\0"
"glDeleteBuffers\0"
"glDeleteBuffersARB\0"
"\0"
- /* _mesa_function_pool[28202]: PixelTransformParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[30370]: PixelTransformParameterfvEXT (dynamic) */
"iip\0"
"glPixelTransformParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[28238]: PrimitiveRestartNV (will be remapped) */
+ /* _mesa_function_pool[30406]: PrimitiveRestartNV (will be remapped) */
"\0"
"glPrimitiveRestartNV\0"
"\0"
- /* _mesa_function_pool[28261]: WindowPos4fvMESA (will be remapped) */
+ /* _mesa_function_pool[30429]: WindowPos4fvMESA (will be remapped) */
"p\0"
"glWindowPos4fvMESA\0"
"\0"
- /* _mesa_function_pool[28283]: GetPixelMapuiv (offset 272) */
+ /* _mesa_function_pool[30451]: GetPixelMapuiv (offset 272) */
"ip\0"
"glGetPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[28304]: Rectf (offset 88) */
+ /* _mesa_function_pool[30472]: Rectf (offset 88) */
"ffff\0"
"glRectf\0"
"\0"
- /* _mesa_function_pool[28318]: VertexAttrib1sNV (will be remapped) */
+ /* _mesa_function_pool[30486]: VertexAttrib1sNV (will be remapped) */
"ii\0"
"glVertexAttrib1sNV\0"
"\0"
- /* _mesa_function_pool[28341]: Indexfv (offset 47) */
+ /* _mesa_function_pool[30509]: Indexfv (offset 47) */
"p\0"
"glIndexfv\0"
"\0"
- /* _mesa_function_pool[28354]: SecondaryColor3svEXT (will be remapped) */
+ /* _mesa_function_pool[30522]: SecondaryColor3svEXT (will be remapped) */
"p\0"
"glSecondaryColor3sv\0"
"glSecondaryColor3svEXT\0"
"\0"
- /* _mesa_function_pool[28400]: LoadTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[30568]: LoadTransposeMatrixfARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixf\0"
"glLoadTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[28452]: GetPointerv (offset 329) */
+ /* _mesa_function_pool[30620]: GetPointerv (offset 329) */
"ip\0"
"glGetPointerv\0"
"glGetPointervEXT\0"
"\0"
- /* _mesa_function_pool[28487]: Tangent3bEXT (dynamic) */
+ /* _mesa_function_pool[30655]: Tangent3bEXT (dynamic) */
"iii\0"
"glTangent3bEXT\0"
"\0"
- /* _mesa_function_pool[28507]: CombinerParameterfNV (will be remapped) */
+ /* _mesa_function_pool[30675]: CombinerParameterfNV (will be remapped) */
"if\0"
"glCombinerParameterfNV\0"
"\0"
- /* _mesa_function_pool[28534]: IndexMask (offset 212) */
+ /* _mesa_function_pool[30702]: IndexMask (offset 212) */
"i\0"
"glIndexMask\0"
"\0"
- /* _mesa_function_pool[28549]: BindProgramNV (will be remapped) */
+ /* _mesa_function_pool[30717]: BindProgramNV (will be remapped) */
"ii\0"
"glBindProgramARB\0"
"glBindProgramNV\0"
"\0"
- /* _mesa_function_pool[28586]: VertexAttrib4svARB (will be remapped) */
+ /* _mesa_function_pool[30754]: VertexAttrib4svARB (will be remapped) */
"ip\0"
"glVertexAttrib4sv\0"
"glVertexAttrib4svARB\0"
"\0"
- /* _mesa_function_pool[28629]: GetFloatv (offset 262) */
+ /* _mesa_function_pool[30797]: GetFloatv (offset 262) */
"ip\0"
"glGetFloatv\0"
"\0"
- /* _mesa_function_pool[28645]: CreateDebugObjectMESA (dynamic) */
+ /* _mesa_function_pool[30813]: CreateDebugObjectMESA (dynamic) */
"\0"
"glCreateDebugObjectMESA\0"
"\0"
- /* _mesa_function_pool[28671]: GetShaderiv (will be remapped) */
+ /* _mesa_function_pool[30839]: GetShaderiv (will be remapped) */
"iip\0"
"glGetShaderiv\0"
"\0"
- /* _mesa_function_pool[28690]: ClientWaitSync (will be remapped) */
+ /* _mesa_function_pool[30858]: ClientWaitSync (will be remapped) */
"iii\0"
"glClientWaitSync\0"
"\0"
- /* _mesa_function_pool[28712]: TexCoord4s (offset 124) */
+ /* _mesa_function_pool[30880]: TexCoord4s (offset 124) */
"iiii\0"
"glTexCoord4s\0"
"\0"
- /* _mesa_function_pool[28731]: TexCoord3sv (offset 117) */
+ /* _mesa_function_pool[30899]: TexCoord3sv (offset 117) */
"p\0"
"glTexCoord3sv\0"
"\0"
- /* _mesa_function_pool[28748]: BindFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[30916]: BindFragmentShaderATI (will be remapped) */
"i\0"
"glBindFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[28775]: PopAttrib (offset 218) */
+ /* _mesa_function_pool[30943]: PopAttrib (offset 218) */
"\0"
"glPopAttrib\0"
"\0"
- /* _mesa_function_pool[28789]: Fogfv (offset 154) */
+ /* _mesa_function_pool[30957]: Fogfv (offset 154) */
"ip\0"
"glFogfv\0"
"\0"
- /* _mesa_function_pool[28801]: UnmapBufferARB (will be remapped) */
+ /* _mesa_function_pool[30969]: UnmapBufferARB (will be remapped) */
"i\0"
"glUnmapBuffer\0"
"glUnmapBufferARB\0"
"\0"
- /* _mesa_function_pool[28835]: InitNames (offset 197) */
+ /* _mesa_function_pool[31003]: InitNames (offset 197) */
"\0"
"glInitNames\0"
"\0"
- /* _mesa_function_pool[28849]: Normal3sv (offset 61) */
+ /* _mesa_function_pool[31017]: Normal3sv (offset 61) */
"p\0"
"glNormal3sv\0"
"\0"
- /* _mesa_function_pool[28864]: Minmax (offset 368) */
+ /* _mesa_function_pool[31032]: Minmax (offset 368) */
"iii\0"
"glMinmax\0"
"glMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[28890]: TexCoord4d (offset 118) */
+ /* _mesa_function_pool[31058]: TexCoord4d (offset 118) */
"dddd\0"
"glTexCoord4d\0"
"\0"
- /* _mesa_function_pool[28909]: DeformationMap3dSGIX (dynamic) */
+ /* _mesa_function_pool[31077]: DeformationMap3dSGIX (dynamic) */
"iddiiddiiddiip\0"
"glDeformationMap3dSGIX\0"
"\0"
- /* _mesa_function_pool[28948]: TexCoord4f (offset 120) */
+ /* _mesa_function_pool[31116]: TexCoord4f (offset 120) */
"ffff\0"
"glTexCoord4f\0"
"\0"
- /* _mesa_function_pool[28967]: FogCoorddvEXT (will be remapped) */
+ /* _mesa_function_pool[31135]: FogCoorddvEXT (will be remapped) */
"p\0"
"glFogCoorddv\0"
"glFogCoorddvEXT\0"
"\0"
- /* _mesa_function_pool[28999]: FinishTextureSUNX (dynamic) */
+ /* _mesa_function_pool[31167]: FinishTextureSUNX (dynamic) */
"\0"
"glFinishTextureSUNX\0"
"\0"
- /* _mesa_function_pool[29021]: GetFragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[31189]: GetFragmentLightfvSGIX (dynamic) */
"iip\0"
"glGetFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[29051]: Binormal3fvEXT (dynamic) */
+ /* _mesa_function_pool[31219]: Binormal3fvEXT (dynamic) */
"p\0"
"glBinormal3fvEXT\0"
"\0"
- /* _mesa_function_pool[29071]: GetBooleanv (offset 258) */
+ /* _mesa_function_pool[31239]: GetBooleanv (offset 258) */
"ip\0"
"glGetBooleanv\0"
"\0"
- /* _mesa_function_pool[29089]: ColorFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[31257]: ColorFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiiii\0"
"glColorFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[29126]: Hint (offset 158) */
+ /* _mesa_function_pool[31294]: Hint (offset 158) */
"ii\0"
"glHint\0"
"\0"
- /* _mesa_function_pool[29137]: Color4dv (offset 28) */
+ /* _mesa_function_pool[31305]: Color4dv (offset 28) */
"p\0"
"glColor4dv\0"
"\0"
- /* _mesa_function_pool[29151]: VertexAttrib2svARB (will be remapped) */
+ /* _mesa_function_pool[31319]: VertexAttrib2svARB (will be remapped) */
"ip\0"
"glVertexAttrib2sv\0"
"glVertexAttrib2svARB\0"
"\0"
- /* _mesa_function_pool[29194]: AreProgramsResidentNV (will be remapped) */
+ /* _mesa_function_pool[31362]: AreProgramsResidentNV (will be remapped) */
"ipp\0"
"glAreProgramsResidentNV\0"
"\0"
- /* _mesa_function_pool[29223]: WindowPos3svMESA (will be remapped) */
+ /* _mesa_function_pool[31391]: WindowPos3svMESA (will be remapped) */
"p\0"
"glWindowPos3sv\0"
"glWindowPos3svARB\0"
"glWindowPos3svMESA\0"
"\0"
- /* _mesa_function_pool[29278]: CopyColorSubTable (offset 347) */
+ /* _mesa_function_pool[31446]: CopyColorSubTable (offset 347) */
"iiiii\0"
"glCopyColorSubTable\0"
"glCopyColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[29328]: WeightdvARB (dynamic) */
+ /* _mesa_function_pool[31496]: WeightdvARB (dynamic) */
"ip\0"
"glWeightdvARB\0"
"\0"
- /* _mesa_function_pool[29346]: DeleteRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[31514]: DeleteRenderbuffersEXT (will be remapped) */
"ip\0"
"glDeleteRenderbuffers\0"
"glDeleteRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[29397]: VertexAttrib4NubvARB (will be remapped) */
+ /* _mesa_function_pool[31565]: VertexAttrib4NubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nubv\0"
"glVertexAttrib4NubvARB\0"
"\0"
- /* _mesa_function_pool[29444]: VertexAttrib3dvNV (will be remapped) */
+ /* _mesa_function_pool[31612]: VertexAttrib3dvNV (will be remapped) */
"ip\0"
"glVertexAttrib3dvNV\0"
"\0"
- /* _mesa_function_pool[29468]: GetObjectParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[31636]: GetObjectParameterfvARB (will be remapped) */
"iip\0"
"glGetObjectParameterfvARB\0"
"\0"
- /* _mesa_function_pool[29499]: Vertex4iv (offset 147) */
+ /* _mesa_function_pool[31667]: Vertex4iv (offset 147) */
"p\0"
"glVertex4iv\0"
"\0"
- /* _mesa_function_pool[29514]: GetProgramEnvParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[31682]: GetProgramEnvParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterdvARB\0"
"\0"
- /* _mesa_function_pool[29549]: TexCoord4dv (offset 119) */
+ /* _mesa_function_pool[31717]: TexCoord4dv (offset 119) */
"p\0"
"glTexCoord4dv\0"
"\0"
- /* _mesa_function_pool[29566]: LockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[31734]: LockArraysEXT (will be remapped) */
"ii\0"
"glLockArraysEXT\0"
"\0"
- /* _mesa_function_pool[29586]: Begin (offset 7) */
+ /* _mesa_function_pool[31754]: Begin (offset 7) */
"i\0"
"glBegin\0"
"\0"
- /* _mesa_function_pool[29597]: LightModeli (offset 165) */
+ /* _mesa_function_pool[31765]: LightModeli (offset 165) */
"ii\0"
"glLightModeli\0"
"\0"
- /* _mesa_function_pool[29615]: Rectfv (offset 89) */
+ /* _mesa_function_pool[31783]: VertexAttribI4ivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4ivEXT\0"
+ "glVertexAttribI4iv\0"
+ "\0"
+ /* _mesa_function_pool[31828]: Rectfv (offset 89) */
"pp\0"
"glRectfv\0"
"\0"
- /* _mesa_function_pool[29628]: LightModelf (offset 163) */
+ /* _mesa_function_pool[31841]: LightModelf (offset 163) */
"if\0"
"glLightModelf\0"
"\0"
- /* _mesa_function_pool[29646]: GetTexParameterfv (offset 282) */
+ /* _mesa_function_pool[31859]: GetTexParameterfv (offset 282) */
"iip\0"
"glGetTexParameterfv\0"
"\0"
- /* _mesa_function_pool[29671]: GetLightfv (offset 264) */
+ /* _mesa_function_pool[31884]: GetLightfv (offset 264) */
"iip\0"
"glGetLightfv\0"
"\0"
- /* _mesa_function_pool[29689]: PixelTransformParameterivEXT (dynamic) */
+ /* _mesa_function_pool[31902]: PixelTransformParameterivEXT (dynamic) */
"iip\0"
"glPixelTransformParameterivEXT\0"
"\0"
- /* _mesa_function_pool[29725]: BinormalPointerEXT (dynamic) */
+ /* _mesa_function_pool[31938]: BinormalPointerEXT (dynamic) */
"iip\0"
"glBinormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[29751]: VertexAttrib1dNV (will be remapped) */
+ /* _mesa_function_pool[31964]: VertexAttrib1dNV (will be remapped) */
"id\0"
"glVertexAttrib1dNV\0"
"\0"
- /* _mesa_function_pool[29774]: GetCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[31987]: GetCombinerInputParameterivNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[29813]: Disable (offset 214) */
+ /* _mesa_function_pool[32026]: Disable (offset 214) */
"i\0"
"glDisable\0"
"\0"
- /* _mesa_function_pool[29826]: MultiTexCoord2fvARB (offset 387) */
+ /* _mesa_function_pool[32039]: MultiTexCoord2fvARB (offset 387) */
"ip\0"
"glMultiTexCoord2fv\0"
"glMultiTexCoord2fvARB\0"
"\0"
- /* _mesa_function_pool[29871]: GetRenderbufferParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[32084]: GetRenderbufferParameterivEXT (will be remapped) */
"iip\0"
"glGetRenderbufferParameteriv\0"
"glGetRenderbufferParameterivEXT\0"
"\0"
- /* _mesa_function_pool[29937]: CombinerParameterivNV (will be remapped) */
+ /* _mesa_function_pool[32150]: CombinerParameterivNV (will be remapped) */
"ip\0"
"glCombinerParameterivNV\0"
"\0"
- /* _mesa_function_pool[29965]: GenFragmentShadersATI (will be remapped) */
+ /* _mesa_function_pool[32178]: GenFragmentShadersATI (will be remapped) */
"i\0"
"glGenFragmentShadersATI\0"
"\0"
- /* _mesa_function_pool[29992]: DrawArrays (offset 310) */
+ /* _mesa_function_pool[32205]: DrawArrays (offset 310) */
"iii\0"
"glDrawArrays\0"
"glDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[30026]: WeightuivARB (dynamic) */
+ /* _mesa_function_pool[32239]: WeightuivARB (dynamic) */
"ip\0"
"glWeightuivARB\0"
"\0"
- /* _mesa_function_pool[30045]: VertexAttrib2sARB (will be remapped) */
+ /* _mesa_function_pool[32258]: VertexAttrib2sARB (will be remapped) */
"iii\0"
"glVertexAttrib2s\0"
"glVertexAttrib2sARB\0"
"\0"
- /* _mesa_function_pool[30087]: ColorMask (offset 210) */
+ /* _mesa_function_pool[32300]: ColorMask (offset 210) */
"iiii\0"
"glColorMask\0"
"\0"
- /* _mesa_function_pool[30105]: GenAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[32318]: GenAsyncMarkersSGIX (dynamic) */
"i\0"
"glGenAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[30130]: Tangent3svEXT (dynamic) */
+ /* _mesa_function_pool[32343]: Tangent3svEXT (dynamic) */
"p\0"
"glTangent3svEXT\0"
"\0"
- /* _mesa_function_pool[30149]: GetListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[32362]: GetListParameterivSGIX (dynamic) */
"iip\0"
"glGetListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[30179]: BindBufferARB (will be remapped) */
+ /* _mesa_function_pool[32392]: BindBufferARB (will be remapped) */
"ii\0"
"glBindBuffer\0"
"glBindBufferARB\0"
"\0"
- /* _mesa_function_pool[30212]: GetInfoLogARB (will be remapped) */
+ /* _mesa_function_pool[32425]: GetInfoLogARB (will be remapped) */
"iipp\0"
"glGetInfoLogARB\0"
"\0"
- /* _mesa_function_pool[30234]: RasterPos4iv (offset 83) */
+ /* _mesa_function_pool[32447]: RasterPos4iv (offset 83) */
"p\0"
"glRasterPos4iv\0"
"\0"
- /* _mesa_function_pool[30252]: Enable (offset 215) */
+ /* _mesa_function_pool[32465]: Enable (offset 215) */
"i\0"
"glEnable\0"
"\0"
- /* _mesa_function_pool[30264]: LineStipple (offset 167) */
+ /* _mesa_function_pool[32477]: LineStipple (offset 167) */
"ii\0"
"glLineStipple\0"
"\0"
- /* _mesa_function_pool[30282]: VertexAttribs4svNV (will be remapped) */
+ /* _mesa_function_pool[32495]: VertexAttribs4svNV (will be remapped) */
"iip\0"
"glVertexAttribs4svNV\0"
"\0"
- /* _mesa_function_pool[30308]: EdgeFlagPointerListIBM (dynamic) */
+ /* _mesa_function_pool[32521]: EdgeFlagPointerListIBM (dynamic) */
"ipi\0"
"glEdgeFlagPointerListIBM\0"
"\0"
- /* _mesa_function_pool[30338]: UniformMatrix3x2fv (will be remapped) */
+ /* _mesa_function_pool[32551]: UniformMatrix3x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x2fv\0"
"\0"
- /* _mesa_function_pool[30365]: GetMinmaxParameterfv (offset 365) */
+ /* _mesa_function_pool[32578]: GetMinmaxParameterfv (offset 365) */
"iip\0"
"glGetMinmaxParameterfv\0"
"glGetMinmaxParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[30419]: VertexAttrib1fvARB (will be remapped) */
+ /* _mesa_function_pool[32632]: VertexAttrib1fvARB (will be remapped) */
"ip\0"
"glVertexAttrib1fv\0"
"glVertexAttrib1fvARB\0"
"\0"
- /* _mesa_function_pool[30462]: GenBuffersARB (will be remapped) */
+ /* _mesa_function_pool[32675]: GenBuffersARB (will be remapped) */
"ip\0"
"glGenBuffers\0"
"glGenBuffersARB\0"
"\0"
- /* _mesa_function_pool[30495]: VertexAttribs1svNV (will be remapped) */
+ /* _mesa_function_pool[32708]: VertexAttribs1svNV (will be remapped) */
"iip\0"
"glVertexAttribs1svNV\0"
"\0"
- /* _mesa_function_pool[30521]: Vertex3fv (offset 137) */
+ /* _mesa_function_pool[32734]: Vertex3fv (offset 137) */
"p\0"
"glVertex3fv\0"
"\0"
- /* _mesa_function_pool[30536]: GetTexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[32749]: GetTexBumpParameterivATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[30567]: Binormal3bEXT (dynamic) */
+ /* _mesa_function_pool[32780]: Binormal3bEXT (dynamic) */
"iii\0"
"glBinormal3bEXT\0"
"\0"
- /* _mesa_function_pool[30588]: FragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[32801]: FragmentMaterialivSGIX (dynamic) */
"iip\0"
"glFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[30618]: IsRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[32831]: IsRenderbufferEXT (will be remapped) */
"i\0"
"glIsRenderbuffer\0"
"glIsRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[30658]: GenProgramsNV (will be remapped) */
+ /* _mesa_function_pool[32871]: GenProgramsNV (will be remapped) */
"ip\0"
"glGenProgramsARB\0"
"glGenProgramsNV\0"
"\0"
- /* _mesa_function_pool[30695]: VertexAttrib4dvNV (will be remapped) */
+ /* _mesa_function_pool[32908]: VertexAttrib4dvNV (will be remapped) */
"ip\0"
"glVertexAttrib4dvNV\0"
"\0"
- /* _mesa_function_pool[30719]: EndFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[32932]: EndFragmentShaderATI (will be remapped) */
"\0"
"glEndFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[30744]: Binormal3iEXT (dynamic) */
+ /* _mesa_function_pool[32957]: Binormal3iEXT (dynamic) */
"iii\0"
"glBinormal3iEXT\0"
"\0"
- /* _mesa_function_pool[30765]: WindowPos2fMESA (will be remapped) */
+ /* _mesa_function_pool[32978]: WindowPos2fMESA (will be remapped) */
"ff\0"
"glWindowPos2f\0"
"glWindowPos2fARB\0"
@@ -4476,535 +4739,589 @@ static const char _mesa_function_pool[] =
/* these functions need to be remapped */
static const struct gl_function_pool_remap MESA_remap_table_functions[] = {
- { 1461, AttachShader_remap_index },
- { 8995, CreateProgram_remap_index },
- { 21182, CreateShader_remap_index },
- { 23495, DeleteProgram_remap_index },
- { 16966, DeleteShader_remap_index },
- { 21628, DetachShader_remap_index },
- { 16490, GetAttachedShaders_remap_index },
- { 4275, GetProgramInfoLog_remap_index },
- { 361, GetProgramiv_remap_index },
- { 5721, GetShaderInfoLog_remap_index },
- { 28671, GetShaderiv_remap_index },
- { 12198, IsProgram_remap_index },
- { 11197, IsShader_remap_index },
- { 9099, StencilFuncSeparate_remap_index },
- { 3487, StencilMaskSeparate_remap_index },
- { 6803, StencilOpSeparate_remap_index },
- { 20507, UniformMatrix2x3fv_remap_index },
- { 2615, UniformMatrix2x4fv_remap_index },
- { 30338, UniformMatrix3x2fv_remap_index },
- { 28038, UniformMatrix3x4fv_remap_index },
- { 14961, UniformMatrix4x2fv_remap_index },
- { 2937, UniformMatrix4x3fv_remap_index },
- { 14622, DrawArraysInstanced_remap_index },
- { 15754, DrawElementsInstanced_remap_index },
- { 9013, LoadTransposeMatrixdARB_remap_index },
- { 28400, LoadTransposeMatrixfARB_remap_index },
- { 4904, MultTransposeMatrixdARB_remap_index },
- { 21815, MultTransposeMatrixfARB_remap_index },
- { 172, SampleCoverageARB_remap_index },
- { 5117, CompressedTexImage1DARB_remap_index },
- { 22298, CompressedTexImage2DARB_remap_index },
- { 3550, CompressedTexImage3DARB_remap_index },
- { 16782, CompressedTexSubImage1DARB_remap_index },
- { 1880, CompressedTexSubImage2DARB_remap_index },
- { 18643, CompressedTexSubImage3DARB_remap_index },
- { 26320, GetCompressedTexImageARB_remap_index },
- { 3395, DisableVertexAttribArrayARB_remap_index },
- { 27650, EnableVertexAttribArrayARB_remap_index },
- { 29514, GetProgramEnvParameterdvARB_remap_index },
- { 21695, GetProgramEnvParameterfvARB_remap_index },
- { 25319, GetProgramLocalParameterdvARB_remap_index },
- { 7245, GetProgramLocalParameterfvARB_remap_index },
- { 16873, GetProgramStringARB_remap_index },
- { 25514, GetProgramivARB_remap_index },
- { 18838, GetVertexAttribdvARB_remap_index },
- { 14850, GetVertexAttribfvARB_remap_index },
- { 8908, GetVertexAttribivARB_remap_index },
- { 17719, ProgramEnvParameter4dARB_remap_index },
- { 23268, ProgramEnvParameter4dvARB_remap_index },
- { 15458, ProgramEnvParameter4fARB_remap_index },
- { 8108, ProgramEnvParameter4fvARB_remap_index },
- { 3513, ProgramLocalParameter4dARB_remap_index },
- { 11908, ProgramLocalParameter4dvARB_remap_index },
- { 27129, ProgramLocalParameter4fARB_remap_index },
- { 23848, ProgramLocalParameter4fvARB_remap_index },
- { 26100, ProgramStringARB_remap_index },
- { 17969, VertexAttrib1dARB_remap_index },
- { 14426, VertexAttrib1dvARB_remap_index },
- { 3688, VertexAttrib1fARB_remap_index },
- { 30419, VertexAttrib1fvARB_remap_index },
- { 6329, VertexAttrib1sARB_remap_index },
- { 2054, VertexAttrib1svARB_remap_index },
- { 13857, VertexAttrib2dARB_remap_index },
- { 16109, VertexAttrib2dvARB_remap_index },
- { 1480, VertexAttrib2fARB_remap_index },
- { 16222, VertexAttrib2fvARB_remap_index },
- { 30045, VertexAttrib2sARB_remap_index },
- { 29151, VertexAttrib2svARB_remap_index },
- { 10282, VertexAttrib3dARB_remap_index },
- { 7811, VertexAttrib3dvARB_remap_index },
- { 1567, VertexAttrib3fARB_remap_index },
- { 20770, VertexAttrib3fvARB_remap_index },
- { 25947, VertexAttrib3sARB_remap_index },
- { 18580, VertexAttrib3svARB_remap_index },
- { 4301, VertexAttrib4NbvARB_remap_index },
- { 16445, VertexAttrib4NivARB_remap_index },
- { 20725, VertexAttrib4NsvARB_remap_index },
- { 21647, VertexAttrib4NubARB_remap_index },
- { 29397, VertexAttrib4NubvARB_remap_index },
- { 17380, VertexAttrib4NuivARB_remap_index },
- { 2810, VertexAttrib4NusvARB_remap_index },
- { 9876, VertexAttrib4bvARB_remap_index },
- { 24727, VertexAttrib4dARB_remap_index },
- { 19602, VertexAttrib4dvARB_remap_index },
- { 10389, VertexAttrib4fARB_remap_index },
- { 10793, VertexAttrib4fvARB_remap_index },
- { 9292, VertexAttrib4ivARB_remap_index },
- { 15923, VertexAttrib4sARB_remap_index },
- { 28586, VertexAttrib4svARB_remap_index },
- { 15263, VertexAttrib4ubvARB_remap_index },
- { 27974, VertexAttrib4uivARB_remap_index },
- { 18391, VertexAttrib4usvARB_remap_index },
- { 20356, VertexAttribPointerARB_remap_index },
- { 30179, BindBufferARB_remap_index },
- { 6036, BufferDataARB_remap_index },
- { 1382, BufferSubDataARB_remap_index },
- { 28163, DeleteBuffersARB_remap_index },
- { 30462, GenBuffersARB_remap_index },
- { 16265, GetBufferParameterivARB_remap_index },
- { 15410, GetBufferPointervARB_remap_index },
- { 1335, GetBufferSubDataARB_remap_index },
- { 27922, IsBufferARB_remap_index },
- { 24332, MapBufferARB_remap_index },
- { 28801, UnmapBufferARB_remap_index },
- { 268, BeginQueryARB_remap_index },
- { 18064, DeleteQueriesARB_remap_index },
- { 11087, EndQueryARB_remap_index },
- { 26799, GenQueriesARB_remap_index },
- { 1772, GetQueryObjectivARB_remap_index },
- { 15967, GetQueryObjectuivARB_remap_index },
- { 1624, GetQueryivARB_remap_index },
- { 18298, IsQueryARB_remap_index },
- { 7421, AttachObjectARB_remap_index },
- { 16928, CompileShaderARB_remap_index },
- { 2879, CreateProgramObjectARB_remap_index },
- { 5981, CreateShaderObjectARB_remap_index },
- { 13274, DeleteObjectARB_remap_index },
- { 22089, DetachObjectARB_remap_index },
- { 10865, GetActiveUniformARB_remap_index },
- { 8583, GetAttachedObjectsARB_remap_index },
- { 8890, GetHandleARB_remap_index },
- { 30212, GetInfoLogARB_remap_index },
- { 29468, GetObjectParameterfvARB_remap_index },
- { 25193, GetObjectParameterivARB_remap_index },
- { 26557, GetShaderSourceARB_remap_index },
- { 25807, GetUniformLocationARB_remap_index },
- { 21917, GetUniformfvARB_remap_index },
- { 11530, GetUniformivARB_remap_index },
- { 18436, LinkProgramARB_remap_index },
- { 18494, ShaderSourceARB_remap_index },
- { 6703, Uniform1fARB_remap_index },
- { 27338, Uniform1fvARB_remap_index },
- { 20325, Uniform1iARB_remap_index },
- { 19291, Uniform1ivARB_remap_index },
- { 2003, Uniform2fARB_remap_index },
- { 13110, Uniform2fvARB_remap_index },
- { 24219, Uniform2iARB_remap_index },
- { 2123, Uniform2ivARB_remap_index },
- { 17038, Uniform3fARB_remap_index },
- { 8613, Uniform3fvARB_remap_index },
- { 5627, Uniform3iARB_remap_index },
- { 15516, Uniform3ivARB_remap_index },
- { 17525, Uniform4fARB_remap_index },
- { 21781, Uniform4fvARB_remap_index },
- { 22947, Uniform4iARB_remap_index },
- { 18804, Uniform4ivARB_remap_index },
- { 7473, UniformMatrix2fvARB_remap_index },
+ { 1577, AttachShader_remap_index },
+ { 9902, CreateProgram_remap_index },
+ { 22864, CreateShader_remap_index },
+ { 25322, DeleteProgram_remap_index },
+ { 18525, DeleteShader_remap_index },
+ { 23336, DetachShader_remap_index },
+ { 17928, GetAttachedShaders_remap_index },
+ { 4869, GetProgramInfoLog_remap_index },
+ { 405, GetProgramiv_remap_index },
+ { 6542, GetShaderInfoLog_remap_index },
+ { 30839, GetShaderiv_remap_index },
+ { 13311, IsProgram_remap_index },
+ { 12263, IsShader_remap_index },
+ { 10006, StencilFuncSeparate_remap_index },
+ { 3921, StencilMaskSeparate_remap_index },
+ { 7624, StencilOpSeparate_remap_index },
+ { 22152, UniformMatrix2x3fv_remap_index },
+ { 2847, UniformMatrix2x4fv_remap_index },
+ { 32551, UniformMatrix3x2fv_remap_index },
+ { 30161, UniformMatrix3x4fv_remap_index },
+ { 16226, UniformMatrix4x2fv_remap_index },
+ { 3263, UniformMatrix4x3fv_remap_index },
+ { 5030, ClampColor_remap_index },
+ { 17982, ClearBufferfi_remap_index },
+ { 17448, ClearBufferfv_remap_index },
+ { 29184, ClearBufferiv_remap_index },
+ { 13516, ClearBufferuiv_remap_index },
+ { 19808, GetStringi_remap_index },
+ { 2788, TexBuffer_remap_index },
+ { 938, FramebufferTexture_remap_index },
+ { 26315, GetBufferParameteri64v_remap_index },
+ { 10106, GetInteger64i_v_remap_index },
+ { 23178, VertexAttribDivisor_remap_index },
+ { 9920, LoadTransposeMatrixdARB_remap_index },
+ { 30568, LoadTransposeMatrixfARB_remap_index },
+ { 5608, MultTransposeMatrixdARB_remap_index },
+ { 23523, MultTransposeMatrixfARB_remap_index },
+ { 216, SampleCoverageARB_remap_index },
+ { 5834, CompressedTexImage1DARB_remap_index },
+ { 24051, CompressedTexImage2DARB_remap_index },
+ { 3984, CompressedTexImage3DARB_remap_index },
+ { 18242, CompressedTexSubImage1DARB_remap_index },
+ { 2050, CompressedTexSubImage2DARB_remap_index },
+ { 20230, CompressedTexSubImage3DARB_remap_index },
+ { 28340, GetCompressedTexImageARB_remap_index },
+ { 3829, DisableVertexAttribArrayARB_remap_index },
+ { 29726, EnableVertexAttribArrayARB_remap_index },
+ { 31682, GetProgramEnvParameterdvARB_remap_index },
+ { 23403, GetProgramEnvParameterfvARB_remap_index },
+ { 27277, GetProgramLocalParameterdvARB_remap_index },
+ { 8066, GetProgramLocalParameterfvARB_remap_index },
+ { 18376, GetProgramStringARB_remap_index },
+ { 27472, GetProgramivARB_remap_index },
+ { 20425, GetVertexAttribdvARB_remap_index },
+ { 16034, GetVertexAttribfvARB_remap_index },
+ { 9765, GetVertexAttribivARB_remap_index },
+ { 19289, ProgramEnvParameter4dARB_remap_index },
+ { 25072, ProgramEnvParameter4dvARB_remap_index },
+ { 16770, ProgramEnvParameter4fARB_remap_index },
+ { 8965, ProgramEnvParameter4fvARB_remap_index },
+ { 3947, ProgramLocalParameter4dARB_remap_index },
+ { 13021, ProgramLocalParameter4dvARB_remap_index },
+ { 29205, ProgramLocalParameter4fARB_remap_index },
+ { 25675, ProgramLocalParameter4fvARB_remap_index },
+ { 28094, ProgramStringARB_remap_index },
+ { 19539, VertexAttrib1dARB_remap_index },
+ { 15688, VertexAttrib1dvARB_remap_index },
+ { 4122, VertexAttrib1fARB_remap_index },
+ { 32632, VertexAttrib1fvARB_remap_index },
+ { 7150, VertexAttrib1sARB_remap_index },
+ { 2224, VertexAttrib1svARB_remap_index },
+ { 15119, VertexAttrib2dARB_remap_index },
+ { 17469, VertexAttrib2dvARB_remap_index },
+ { 1596, VertexAttrib2fARB_remap_index },
+ { 17582, VertexAttrib2fvARB_remap_index },
+ { 32258, VertexAttrib2sARB_remap_index },
+ { 31319, VertexAttrib2svARB_remap_index },
+ { 11268, VertexAttrib3dARB_remap_index },
+ { 8632, VertexAttrib3dvARB_remap_index },
+ { 1683, VertexAttrib3fARB_remap_index },
+ { 22415, VertexAttrib3fvARB_remap_index },
+ { 27941, VertexAttrib3sARB_remap_index },
+ { 20167, VertexAttrib3svARB_remap_index },
+ { 4895, VertexAttrib4NbvARB_remap_index },
+ { 17805, VertexAttrib4NivARB_remap_index },
+ { 22370, VertexAttrib4NsvARB_remap_index },
+ { 23355, VertexAttrib4NubARB_remap_index },
+ { 31565, VertexAttrib4NubvARB_remap_index },
+ { 18950, VertexAttrib4NuivARB_remap_index },
+ { 3136, VertexAttrib4NusvARB_remap_index },
+ { 10846, VertexAttrib4bvARB_remap_index },
+ { 26685, VertexAttrib4dARB_remap_index },
+ { 21189, VertexAttrib4dvARB_remap_index },
+ { 11422, VertexAttrib4fARB_remap_index },
+ { 11826, VertexAttrib4fvARB_remap_index },
+ { 10222, VertexAttrib4ivARB_remap_index },
+ { 17262, VertexAttrib4sARB_remap_index },
+ { 30754, VertexAttrib4svARB_remap_index },
+ { 16575, VertexAttrib4ubvARB_remap_index },
+ { 30050, VertexAttrib4uivARB_remap_index },
+ { 19978, VertexAttrib4usvARB_remap_index },
+ { 21967, VertexAttribPointerARB_remap_index },
+ { 32392, BindBufferARB_remap_index },
+ { 6857, BufferDataARB_remap_index },
+ { 1498, BufferSubDataARB_remap_index },
+ { 30331, DeleteBuffersARB_remap_index },
+ { 32675, GenBuffersARB_remap_index },
+ { 17625, GetBufferParameterivARB_remap_index },
+ { 16722, GetBufferPointervARB_remap_index },
+ { 1451, GetBufferSubDataARB_remap_index },
+ { 29998, IsBufferARB_remap_index },
+ { 26159, MapBufferARB_remap_index },
+ { 30969, UnmapBufferARB_remap_index },
+ { 312, BeginQueryARB_remap_index },
+ { 19634, DeleteQueriesARB_remap_index },
+ { 12153, EndQueryARB_remap_index },
+ { 28819, GenQueriesARB_remap_index },
+ { 1942, GetQueryObjectivARB_remap_index },
+ { 17306, GetQueryObjectuivARB_remap_index },
+ { 1740, GetQueryivARB_remap_index },
+ { 19885, IsQueryARB_remap_index },
+ { 8242, AttachObjectARB_remap_index },
+ { 18487, CompileShaderARB_remap_index },
+ { 3205, CreateProgramObjectARB_remap_index },
+ { 6802, CreateShaderObjectARB_remap_index },
+ { 14454, DeleteObjectARB_remap_index },
+ { 23842, DetachObjectARB_remap_index },
+ { 11898, GetActiveUniformARB_remap_index },
+ { 9440, GetAttachedObjectsARB_remap_index },
+ { 9747, GetHandleARB_remap_index },
+ { 32425, GetInfoLogARB_remap_index },
+ { 31636, GetObjectParameterfvARB_remap_index },
+ { 27151, GetObjectParameterivARB_remap_index },
+ { 28577, GetShaderSourceARB_remap_index },
+ { 27801, GetUniformLocationARB_remap_index },
+ { 23625, GetUniformfvARB_remap_index },
+ { 12596, GetUniformivARB_remap_index },
+ { 20023, LinkProgramARB_remap_index },
+ { 20081, ShaderSourceARB_remap_index },
+ { 7524, Uniform1fARB_remap_index },
+ { 29414, Uniform1fvARB_remap_index },
+ { 21936, Uniform1iARB_remap_index },
+ { 20878, Uniform1ivARB_remap_index },
+ { 2173, Uniform2fARB_remap_index },
+ { 14290, Uniform2fvARB_remap_index },
+ { 26046, Uniform2iARB_remap_index },
+ { 2293, Uniform2ivARB_remap_index },
+ { 18597, Uniform3fARB_remap_index },
+ { 9470, Uniform3fvARB_remap_index },
+ { 6396, Uniform3iARB_remap_index },
+ { 16828, Uniform3ivARB_remap_index },
+ { 19095, Uniform4fARB_remap_index },
+ { 23489, Uniform4fvARB_remap_index },
+ { 24751, Uniform4iARB_remap_index },
+ { 20391, Uniform4ivARB_remap_index },
+ { 8294, UniformMatrix2fvARB_remap_index },
{ 17, UniformMatrix3fvARB_remap_index },
- { 2475, UniformMatrix4fvARB_remap_index },
- { 23380, UseProgramObjectARB_remap_index },
- { 13545, ValidateProgramARB_remap_index },
- { 19645, BindAttribLocationARB_remap_index },
- { 4346, GetActiveAttribARB_remap_index },
- { 15197, GetAttribLocationARB_remap_index },
- { 27077, DrawBuffersARB_remap_index },
- { 12013, RenderbufferStorageMultisample_remap_index },
- { 12417, FramebufferTextureARB_remap_index },
- { 23750, FramebufferTextureFaceARB_remap_index },
- { 22238, ProgramParameteriARB_remap_index },
- { 17573, FlushMappedBufferRange_remap_index },
- { 25610, MapBufferRange_remap_index },
- { 15072, BindVertexArray_remap_index },
- { 13404, GenVertexArrays_remap_index },
- { 27852, CopyBufferSubData_remap_index },
- { 28690, ClientWaitSync_remap_index },
- { 2394, DeleteSync_remap_index },
- { 6370, FenceSync_remap_index },
- { 13916, GetInteger64v_remap_index },
- { 20832, GetSynciv_remap_index },
- { 27016, IsSync_remap_index },
- { 8531, WaitSync_remap_index },
- { 3363, DrawElementsBaseVertex_remap_index },
- { 28095, DrawRangeElementsBaseVertex_remap_index },
- { 24363, MultiDrawElementsBaseVertex_remap_index },
- { 4480, BindTransformFeedback_remap_index },
- { 2906, DeleteTransformFeedbacks_remap_index },
- { 5660, DrawTransformFeedback_remap_index },
- { 8750, GenTransformFeedbacks_remap_index },
- { 25990, IsTransformFeedback_remap_index },
- { 23943, PauseTransformFeedback_remap_index },
- { 4824, ResumeTransformFeedback_remap_index },
- { 4739, PolygonOffsetEXT_remap_index },
- { 21417, GetPixelTexGenParameterfvSGIS_remap_index },
- { 3895, GetPixelTexGenParameterivSGIS_remap_index },
- { 21150, PixelTexGenParameterfSGIS_remap_index },
- { 580, PixelTexGenParameterfvSGIS_remap_index },
- { 11568, PixelTexGenParameteriSGIS_remap_index },
- { 12591, PixelTexGenParameterivSGIS_remap_index },
- { 15160, SampleMaskSGIS_remap_index },
- { 18238, SamplePatternSGIS_remap_index },
- { 24292, ColorPointerEXT_remap_index },
- { 16152, EdgeFlagPointerEXT_remap_index },
- { 5281, IndexPointerEXT_remap_index },
- { 5361, NormalPointerEXT_remap_index },
- { 14510, TexCoordPointerEXT_remap_index },
- { 6159, VertexPointerEXT_remap_index },
- { 3165, PointParameterfEXT_remap_index },
- { 7010, PointParameterfvEXT_remap_index },
- { 29566, LockArraysEXT_remap_index },
- { 13609, UnlockArraysEXT_remap_index },
- { 1151, SecondaryColor3bEXT_remap_index },
- { 7169, SecondaryColor3bvEXT_remap_index },
- { 9469, SecondaryColor3dEXT_remap_index },
- { 23553, SecondaryColor3dvEXT_remap_index },
- { 25856, SecondaryColor3fEXT_remap_index },
- { 16718, SecondaryColor3fvEXT_remap_index },
- { 426, SecondaryColor3iEXT_remap_index },
- { 14898, SecondaryColor3ivEXT_remap_index },
- { 9127, SecondaryColor3sEXT_remap_index },
- { 28354, SecondaryColor3svEXT_remap_index },
- { 25029, SecondaryColor3ubEXT_remap_index },
- { 19536, SecondaryColor3ubvEXT_remap_index },
- { 11763, SecondaryColor3uiEXT_remap_index },
- { 21037, SecondaryColor3uivEXT_remap_index },
- { 23800, SecondaryColor3usEXT_remap_index },
- { 11836, SecondaryColor3usvEXT_remap_index },
- { 10736, SecondaryColorPointerEXT_remap_index },
- { 23614, MultiDrawArraysEXT_remap_index },
- { 19226, MultiDrawElementsEXT_remap_index },
- { 19421, FogCoordPointerEXT_remap_index },
- { 4044, FogCoorddEXT_remap_index },
- { 28967, FogCoorddvEXT_remap_index },
- { 4136, FogCoordfEXT_remap_index },
- { 24952, FogCoordfvEXT_remap_index },
- { 17477, PixelTexGenSGIX_remap_index },
- { 25537, BlendFuncSeparateEXT_remap_index },
- { 6071, FlushVertexArrayRangeNV_remap_index },
- { 4688, VertexArrayRangeNV_remap_index },
- { 25921, CombinerInputNV_remap_index },
- { 1946, CombinerOutputNV_remap_index },
- { 28507, CombinerParameterfNV_remap_index },
- { 4608, CombinerParameterfvNV_remap_index },
- { 20556, CombinerParameteriNV_remap_index },
- { 29937, CombinerParameterivNV_remap_index },
- { 6447, FinalCombinerInputNV_remap_index },
- { 8956, GetCombinerInputParameterfvNV_remap_index },
- { 29774, GetCombinerInputParameterivNV_remap_index },
- { 12692, GetCombinerOutputParameterfvNV_remap_index },
- { 12520, GetCombinerOutputParameterivNV_remap_index },
- { 5816, GetFinalCombinerInputParameterfvNV_remap_index },
- { 22819, GetFinalCombinerInputParameterivNV_remap_index },
- { 11508, ResizeBuffersMESA_remap_index },
- { 10109, WindowPos2dMESA_remap_index },
- { 944, WindowPos2dvMESA_remap_index },
- { 30765, WindowPos2fMESA_remap_index },
- { 7114, WindowPos2fvMESA_remap_index },
- { 16665, WindowPos2iMESA_remap_index },
- { 18711, WindowPos2ivMESA_remap_index },
- { 19325, WindowPos2sMESA_remap_index },
- { 5031, WindowPos2svMESA_remap_index },
- { 6939, WindowPos3dMESA_remap_index },
- { 12838, WindowPos3dvMESA_remap_index },
- { 472, WindowPos3fMESA_remap_index },
- { 13670, WindowPos3fvMESA_remap_index },
- { 22131, WindowPos3iMESA_remap_index },
- { 27797, WindowPos3ivMESA_remap_index },
- { 17183, WindowPos3sMESA_remap_index },
- { 29223, WindowPos3svMESA_remap_index },
- { 10060, WindowPos4dMESA_remap_index },
- { 15630, WindowPos4dvMESA_remap_index },
- { 12797, WindowPos4fMESA_remap_index },
- { 28261, WindowPos4fvMESA_remap_index },
- { 27950, WindowPos4iMESA_remap_index },
- { 11311, WindowPos4ivMESA_remap_index },
- { 17356, WindowPos4sMESA_remap_index },
- { 2857, WindowPos4svMESA_remap_index },
- { 12559, MultiModeDrawArraysIBM_remap_index },
- { 26670, MultiModeDrawElementsIBM_remap_index },
- { 11115, DeleteFencesNV_remap_index },
- { 25768, FinishFenceNV_remap_index },
- { 3287, GenFencesNV_remap_index },
- { 15610, GetFenceivNV_remap_index },
- { 7406, IsFenceNV_remap_index },
- { 12447, SetFenceNV_remap_index },
- { 3744, TestFenceNV_remap_index },
- { 29194, AreProgramsResidentNV_remap_index },
- { 28549, BindProgramNV_remap_index },
- { 23883, DeleteProgramsNV_remap_index },
- { 19754, ExecuteProgramNV_remap_index },
- { 30658, GenProgramsNV_remap_index },
- { 21496, GetProgramParameterdvNV_remap_index },
- { 9531, GetProgramParameterfvNV_remap_index },
- { 24266, GetProgramStringNV_remap_index },
- { 22508, GetProgramivNV_remap_index },
- { 21730, GetTrackMatrixivNV_remap_index },
- { 24060, GetVertexAttribPointervNV_remap_index },
- { 22752, GetVertexAttribdvNV_remap_index },
- { 8426, GetVertexAttribfvNV_remap_index },
- { 16846, GetVertexAttribivNV_remap_index },
- { 17603, IsProgramNV_remap_index },
- { 8509, LoadProgramNV_remap_index },
- { 25633, ProgramParameters4dvNV_remap_index },
- { 22438, ProgramParameters4fvNV_remap_index },
- { 19015, RequestResidentProgramsNV_remap_index },
- { 20534, TrackMatrixNV_remap_index },
- { 29751, VertexAttrib1dNV_remap_index },
- { 12358, VertexAttrib1dvNV_remap_index },
- { 26202, VertexAttrib1fNV_remap_index },
- { 2245, VertexAttrib1fvNV_remap_index },
- { 28318, VertexAttrib1sNV_remap_index },
- { 13743, VertexAttrib1svNV_remap_index },
- { 4251, VertexAttrib2dNV_remap_index },
- { 12273, VertexAttrib2dvNV_remap_index },
- { 18470, VertexAttrib2fNV_remap_index },
- { 11884, VertexAttrib2fvNV_remap_index },
- { 5191, VertexAttrib2sNV_remap_index },
- { 17237, VertexAttrib2svNV_remap_index },
- { 10257, VertexAttrib3dNV_remap_index },
- { 29444, VertexAttrib3dvNV_remap_index },
- { 9343, VertexAttrib3fNV_remap_index },
- { 22779, VertexAttrib3fvNV_remap_index },
- { 20411, VertexAttrib3sNV_remap_index },
- { 21757, VertexAttrib3svNV_remap_index },
- { 26644, VertexAttrib4dNV_remap_index },
- { 30695, VertexAttrib4dvNV_remap_index },
- { 3945, VertexAttrib4fNV_remap_index },
- { 8559, VertexAttrib4fvNV_remap_index },
- { 24611, VertexAttrib4sNV_remap_index },
- { 1293, VertexAttrib4svNV_remap_index },
- { 4409, VertexAttrib4ubNV_remap_index },
- { 734, VertexAttrib4ubvNV_remap_index },
- { 19934, VertexAttribPointerNV_remap_index },
- { 2097, VertexAttribs1dvNV_remap_index },
- { 24148, VertexAttribs1fvNV_remap_index },
- { 30495, VertexAttribs1svNV_remap_index },
- { 9368, VertexAttribs2dvNV_remap_index },
- { 23341, VertexAttribs2fvNV_remap_index },
- { 16178, VertexAttribs2svNV_remap_index },
- { 4636, VertexAttribs3dvNV_remap_index },
- { 1977, VertexAttribs3fvNV_remap_index },
- { 27545, VertexAttribs3svNV_remap_index },
- { 24701, VertexAttribs4dvNV_remap_index },
- { 4662, VertexAttribs4fvNV_remap_index },
- { 30282, VertexAttribs4svNV_remap_index },
- { 27293, VertexAttribs4ubvNV_remap_index },
- { 24771, GetTexBumpParameterfvATI_remap_index },
- { 30536, GetTexBumpParameterivATI_remap_index },
- { 16900, TexBumpParameterfvATI_remap_index },
- { 18886, TexBumpParameterivATI_remap_index },
- { 14289, AlphaFragmentOp1ATI_remap_index },
- { 9919, AlphaFragmentOp2ATI_remap_index },
- { 22695, AlphaFragmentOp3ATI_remap_index },
- { 27472, BeginFragmentShaderATI_remap_index },
- { 28748, BindFragmentShaderATI_remap_index },
- { 21886, ColorFragmentOp1ATI_remap_index },
- { 3823, ColorFragmentOp2ATI_remap_index },
- { 29089, ColorFragmentOp3ATI_remap_index },
- { 4781, DeleteFragmentShaderATI_remap_index },
- { 30719, EndFragmentShaderATI_remap_index },
- { 29965, GenFragmentShadersATI_remap_index },
- { 23472, PassTexCoordATI_remap_index },
- { 6139, SampleMapATI_remap_index },
- { 5912, SetFragmentShaderConstantATI_remap_index },
- { 319, PointParameteriNV_remap_index },
- { 12999, PointParameterivNV_remap_index },
- { 26483, ActiveStencilFaceEXT_remap_index },
- { 25293, BindVertexArrayAPPLE_remap_index },
- { 2522, DeleteVertexArraysAPPLE_remap_index },
- { 16517, GenVertexArraysAPPLE_remap_index },
- { 21561, IsVertexArrayAPPLE_remap_index },
- { 775, GetProgramNamedParameterdvNV_remap_index },
- { 3128, GetProgramNamedParameterfvNV_remap_index },
- { 24802, ProgramNamedParameter4dNV_remap_index },
- { 13325, ProgramNamedParameter4dvNV_remap_index },
- { 8042, ProgramNamedParameter4fNV_remap_index },
- { 10701, ProgramNamedParameter4fvNV_remap_index },
- { 15565, PrimitiveRestartIndexNV_remap_index },
- { 28238, PrimitiveRestartNV_remap_index },
- { 22417, DepthBoundsEXT_remap_index },
- { 1043, BlendEquationSeparateEXT_remap_index },
- { 13444, BindFramebufferEXT_remap_index },
- { 23659, BindRenderbufferEXT_remap_index },
- { 8806, CheckFramebufferStatusEXT_remap_index },
- { 20851, DeleteFramebuffersEXT_remap_index },
- { 29346, DeleteRenderbuffersEXT_remap_index },
- { 12297, FramebufferRenderbufferEXT_remap_index },
- { 12464, FramebufferTexture1DEXT_remap_index },
- { 10495, FramebufferTexture2DEXT_remap_index },
- { 10162, FramebufferTexture3DEXT_remap_index },
- { 21453, GenFramebuffersEXT_remap_index },
- { 16064, GenRenderbuffersEXT_remap_index },
- { 5858, GenerateMipmapEXT_remap_index },
- { 20031, GetFramebufferAttachmentParameterivEXT_remap_index },
- { 29871, GetRenderbufferParameterivEXT_remap_index },
- { 18766, IsFramebufferEXT_remap_index },
- { 30618, IsRenderbufferEXT_remap_index },
- { 7353, RenderbufferStorageEXT_remap_index },
- { 651, BlitFramebufferEXT_remap_index },
- { 13144, BufferParameteriAPPLE_remap_index },
- { 17635, FlushMappedBufferRangeAPPLE_remap_index },
- { 2701, FramebufferTextureLayerEXT_remap_index },
- { 4956, ColorMaskIndexedEXT_remap_index },
- { 17261, DisableIndexedEXT_remap_index },
- { 24458, EnableIndexedEXT_remap_index },
- { 20002, GetBooleanIndexedvEXT_remap_index },
- { 9952, GetIntegerIndexedvEXT_remap_index },
- { 20927, IsEnabledIndexedEXT_remap_index },
- { 4074, BeginConditionalRenderNV_remap_index },
- { 23445, EndConditionalRenderNV_remap_index },
- { 8453, BeginTransformFeedbackEXT_remap_index },
- { 17285, BindBufferBaseEXT_remap_index },
- { 17155, BindBufferOffsetEXT_remap_index },
- { 11136, BindBufferRangeEXT_remap_index },
- { 13059, EndTransformFeedbackEXT_remap_index },
- { 9804, GetTransformFeedbackVaryingEXT_remap_index },
- { 19071, TransformFeedbackVaryingsEXT_remap_index },
- { 27194, ProvokingVertexEXT_remap_index },
- { 9752, GetTexParameterPointervAPPLE_remap_index },
- { 4436, TextureRangeAPPLE_remap_index },
- { 10567, GetObjectParameterivAPPLE_remap_index },
- { 18210, ObjectPurgeableAPPLE_remap_index },
- { 4985, ObjectUnpurgeableAPPLE_remap_index },
- { 26509, StencilFuncSeparateATI_remap_index },
- { 16584, ProgramEnvParameters4fvEXT_remap_index },
- { 19965, ProgramLocalParameters4fvEXT_remap_index },
- { 12927, GetQueryObjecti64vEXT_remap_index },
- { 9394, GetQueryObjectui64vEXT_remap_index },
- { 21955, EGLImageTargetRenderbufferStorageOES_remap_index },
- { 11054, EGLImageTargetTexture2DOES_remap_index },
+ { 2690, UniformMatrix4fvARB_remap_index },
+ { 25184, UseProgramObjectARB_remap_index },
+ { 14807, ValidateProgramARB_remap_index },
+ { 21232, BindAttribLocationARB_remap_index },
+ { 4940, GetActiveAttribARB_remap_index },
+ { 16509, GetAttribLocationARB_remap_index },
+ { 29132, DrawBuffersARB_remap_index },
+ { 17850, DrawArraysInstancedARB_remap_index },
+ { 6457, DrawElementsInstancedARB_remap_index },
+ { 13126, RenderbufferStorageMultisample_remap_index },
+ { 13597, FramebufferTextureARB_remap_index },
+ { 25577, FramebufferTextureFaceARB_remap_index },
+ { 23991, ProgramParameteriARB_remap_index },
+ { 19143, FlushMappedBufferRange_remap_index },
+ { 27568, MapBufferRange_remap_index },
+ { 16337, BindVertexArray_remap_index },
+ { 14630, GenVertexArrays_remap_index },
+ { 29928, CopyBufferSubData_remap_index },
+ { 30858, ClientWaitSync_remap_index },
+ { 2609, DeleteSync_remap_index },
+ { 7191, FenceSync_remap_index },
+ { 15178, GetInteger64v_remap_index },
+ { 22477, GetSynciv_remap_index },
+ { 29071, IsSync_remap_index },
+ { 9388, WaitSync_remap_index },
+ { 3797, DrawElementsBaseVertex_remap_index },
+ { 30263, DrawRangeElementsBaseVertex_remap_index },
+ { 26190, MultiDrawElementsBaseVertex_remap_index },
+ { 5091, BindTransformFeedback_remap_index },
+ { 3232, DeleteTransformFeedbacks_remap_index },
+ { 6429, DrawTransformFeedback_remap_index },
+ { 9607, GenTransformFeedbacks_remap_index },
+ { 27984, IsTransformFeedback_remap_index },
+ { 25770, PauseTransformFeedback_remap_index },
+ { 5528, ResumeTransformFeedback_remap_index },
+ { 5396, PolygonOffsetEXT_remap_index },
+ { 23099, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 4417, GetPixelTexGenParameterivSGIS_remap_index },
+ { 22832, PixelTexGenParameterfSGIS_remap_index },
+ { 624, PixelTexGenParameterfvSGIS_remap_index },
+ { 12634, PixelTexGenParameteriSGIS_remap_index },
+ { 13771, PixelTexGenParameterivSGIS_remap_index },
+ { 16425, SampleMaskSGIS_remap_index },
+ { 19825, SamplePatternSGIS_remap_index },
+ { 26119, ColorPointerEXT_remap_index },
+ { 17512, EdgeFlagPointerEXT_remap_index },
+ { 6050, IndexPointerEXT_remap_index },
+ { 6130, NormalPointerEXT_remap_index },
+ { 15772, TexCoordPointerEXT_remap_index },
+ { 6980, VertexPointerEXT_remap_index },
+ { 3599, PointParameterfEXT_remap_index },
+ { 7831, PointParameterfvEXT_remap_index },
+ { 31734, LockArraysEXT_remap_index },
+ { 14871, UnlockArraysEXT_remap_index },
+ { 1267, SecondaryColor3bEXT_remap_index },
+ { 7990, SecondaryColor3bvEXT_remap_index },
+ { 10399, SecondaryColor3dEXT_remap_index },
+ { 25380, SecondaryColor3dvEXT_remap_index },
+ { 27850, SecondaryColor3fEXT_remap_index },
+ { 18178, SecondaryColor3fvEXT_remap_index },
+ { 470, SecondaryColor3iEXT_remap_index },
+ { 16082, SecondaryColor3ivEXT_remap_index },
+ { 10034, SecondaryColor3sEXT_remap_index },
+ { 30522, SecondaryColor3svEXT_remap_index },
+ { 26987, SecondaryColor3ubEXT_remap_index },
+ { 21123, SecondaryColor3ubvEXT_remap_index },
+ { 12876, SecondaryColor3uiEXT_remap_index },
+ { 22719, SecondaryColor3uivEXT_remap_index },
+ { 25627, SecondaryColor3usEXT_remap_index },
+ { 12949, SecondaryColor3usvEXT_remap_index },
+ { 11769, SecondaryColorPointerEXT_remap_index },
+ { 25441, MultiDrawArraysEXT_remap_index },
+ { 20813, MultiDrawElementsEXT_remap_index },
+ { 21008, FogCoordPointerEXT_remap_index },
+ { 4566, FogCoorddEXT_remap_index },
+ { 31135, FogCoorddvEXT_remap_index },
+ { 4683, FogCoordfEXT_remap_index },
+ { 26910, FogCoordfvEXT_remap_index },
+ { 19047, PixelTexGenSGIX_remap_index },
+ { 27495, BlendFuncSeparateEXT_remap_index },
+ { 6892, FlushVertexArrayRangeNV_remap_index },
+ { 5345, VertexArrayRangeNV_remap_index },
+ { 27915, CombinerInputNV_remap_index },
+ { 2116, CombinerOutputNV_remap_index },
+ { 30675, CombinerParameterfNV_remap_index },
+ { 5219, CombinerParameterfvNV_remap_index },
+ { 22201, CombinerParameteriNV_remap_index },
+ { 32150, CombinerParameterivNV_remap_index },
+ { 7268, FinalCombinerInputNV_remap_index },
+ { 9813, GetCombinerInputParameterfvNV_remap_index },
+ { 31987, GetCombinerInputParameterivNV_remap_index },
+ { 13872, GetCombinerOutputParameterfvNV_remap_index },
+ { 13700, GetCombinerOutputParameterivNV_remap_index },
+ { 6637, GetFinalCombinerInputParameterfvNV_remap_index },
+ { 24623, GetFinalCombinerInputParameterivNV_remap_index },
+ { 12574, ResizeBuffersMESA_remap_index },
+ { 11095, WindowPos2dMESA_remap_index },
+ { 1060, WindowPos2dvMESA_remap_index },
+ { 32978, WindowPos2fMESA_remap_index },
+ { 7935, WindowPos2fvMESA_remap_index },
+ { 18125, WindowPos2iMESA_remap_index },
+ { 20298, WindowPos2ivMESA_remap_index },
+ { 20912, WindowPos2sMESA_remap_index },
+ { 5748, WindowPos2svMESA_remap_index },
+ { 7760, WindowPos3dMESA_remap_index },
+ { 14018, WindowPos3dvMESA_remap_index },
+ { 516, WindowPos3fMESA_remap_index },
+ { 14932, WindowPos3fvMESA_remap_index },
+ { 23884, WindowPos3iMESA_remap_index },
+ { 29873, WindowPos3ivMESA_remap_index },
+ { 18742, WindowPos3sMESA_remap_index },
+ { 31391, WindowPos3svMESA_remap_index },
+ { 11046, WindowPos4dMESA_remap_index },
+ { 16966, WindowPos4dvMESA_remap_index },
+ { 13977, WindowPos4fMESA_remap_index },
+ { 30429, WindowPos4fvMESA_remap_index },
+ { 30026, WindowPos4iMESA_remap_index },
+ { 12377, WindowPos4ivMESA_remap_index },
+ { 18926, WindowPos4sMESA_remap_index },
+ { 3183, WindowPos4svMESA_remap_index },
+ { 13739, MultiModeDrawArraysIBM_remap_index },
+ { 28690, MultiModeDrawElementsIBM_remap_index },
+ { 12181, DeleteFencesNV_remap_index },
+ { 27762, FinishFenceNV_remap_index },
+ { 3721, GenFencesNV_remap_index },
+ { 16946, GetFenceivNV_remap_index },
+ { 8227, IsFenceNV_remap_index },
+ { 13627, SetFenceNV_remap_index },
+ { 4178, TestFenceNV_remap_index },
+ { 31362, AreProgramsResidentNV_remap_index },
+ { 30717, BindProgramNV_remap_index },
+ { 25710, DeleteProgramsNV_remap_index },
+ { 21341, ExecuteProgramNV_remap_index },
+ { 32871, GenProgramsNV_remap_index },
+ { 23204, GetProgramParameterdvNV_remap_index },
+ { 10461, GetProgramParameterfvNV_remap_index },
+ { 26093, GetProgramStringNV_remap_index },
+ { 24261, GetProgramivNV_remap_index },
+ { 23438, GetTrackMatrixivNV_remap_index },
+ { 25887, GetVertexAttribPointervNV_remap_index },
+ { 24556, GetVertexAttribdvNV_remap_index },
+ { 9283, GetVertexAttribfvNV_remap_index },
+ { 18349, GetVertexAttribivNV_remap_index },
+ { 19173, IsProgramNV_remap_index },
+ { 9366, LoadProgramNV_remap_index },
+ { 27591, ProgramParameters4dvNV_remap_index },
+ { 24191, ProgramParameters4fvNV_remap_index },
+ { 20602, RequestResidentProgramsNV_remap_index },
+ { 22179, TrackMatrixNV_remap_index },
+ { 31964, VertexAttrib1dNV_remap_index },
+ { 13538, VertexAttrib1dvNV_remap_index },
+ { 28196, VertexAttrib1fNV_remap_index },
+ { 2415, VertexAttrib1fvNV_remap_index },
+ { 30486, VertexAttrib1sNV_remap_index },
+ { 15005, VertexAttrib1svNV_remap_index },
+ { 4845, VertexAttrib2dNV_remap_index },
+ { 13431, VertexAttrib2dvNV_remap_index },
+ { 20057, VertexAttrib2fNV_remap_index },
+ { 12997, VertexAttrib2fvNV_remap_index },
+ { 5960, VertexAttrib2sNV_remap_index },
+ { 18796, VertexAttrib2svNV_remap_index },
+ { 11243, VertexAttrib3dNV_remap_index },
+ { 31612, VertexAttrib3dvNV_remap_index },
+ { 10273, VertexAttrib3fNV_remap_index },
+ { 24583, VertexAttrib3fvNV_remap_index },
+ { 22022, VertexAttrib3sNV_remap_index },
+ { 23465, VertexAttrib3svNV_remap_index },
+ { 28664, VertexAttrib4dNV_remap_index },
+ { 32908, VertexAttrib4dvNV_remap_index },
+ { 4467, VertexAttrib4fNV_remap_index },
+ { 9416, VertexAttrib4fvNV_remap_index },
+ { 26569, VertexAttrib4sNV_remap_index },
+ { 1409, VertexAttrib4svNV_remap_index },
+ { 5003, VertexAttrib4ubNV_remap_index },
+ { 778, VertexAttrib4ubvNV_remap_index },
+ { 21521, VertexAttribPointerNV_remap_index },
+ { 2267, VertexAttribs1dvNV_remap_index },
+ { 25975, VertexAttribs1fvNV_remap_index },
+ { 32708, VertexAttribs1svNV_remap_index },
+ { 10298, VertexAttribs2dvNV_remap_index },
+ { 25145, VertexAttribs2fvNV_remap_index },
+ { 17538, VertexAttribs2svNV_remap_index },
+ { 5247, VertexAttribs3dvNV_remap_index },
+ { 2147, VertexAttribs3fvNV_remap_index },
+ { 29621, VertexAttribs3svNV_remap_index },
+ { 26659, VertexAttribs4dvNV_remap_index },
+ { 5319, VertexAttribs4fvNV_remap_index },
+ { 32495, VertexAttribs4svNV_remap_index },
+ { 29369, VertexAttribs4ubvNV_remap_index },
+ { 26729, GetTexBumpParameterfvATI_remap_index },
+ { 32749, GetTexBumpParameterivATI_remap_index },
+ { 18459, TexBumpParameterfvATI_remap_index },
+ { 20473, TexBumpParameterivATI_remap_index },
+ { 15551, AlphaFragmentOp1ATI_remap_index },
+ { 10889, AlphaFragmentOp2ATI_remap_index },
+ { 24499, AlphaFragmentOp3ATI_remap_index },
+ { 29548, BeginFragmentShaderATI_remap_index },
+ { 30916, BindFragmentShaderATI_remap_index },
+ { 23594, ColorFragmentOp1ATI_remap_index },
+ { 4345, ColorFragmentOp2ATI_remap_index },
+ { 31257, ColorFragmentOp3ATI_remap_index },
+ { 5485, DeleteFragmentShaderATI_remap_index },
+ { 32932, EndFragmentShaderATI_remap_index },
+ { 32178, GenFragmentShadersATI_remap_index },
+ { 25299, PassTexCoordATI_remap_index },
+ { 6960, SampleMapATI_remap_index },
+ { 6733, SetFragmentShaderConstantATI_remap_index },
+ { 363, PointParameteriNV_remap_index },
+ { 14179, PointParameterivNV_remap_index },
+ { 28503, ActiveStencilFaceEXT_remap_index },
+ { 27251, BindVertexArrayAPPLE_remap_index },
+ { 2737, DeleteVertexArraysAPPLE_remap_index },
+ { 17955, GenVertexArraysAPPLE_remap_index },
+ { 23269, IsVertexArrayAPPLE_remap_index },
+ { 819, GetProgramNamedParameterdvNV_remap_index },
+ { 3562, GetProgramNamedParameterfvNV_remap_index },
+ { 26760, ProgramNamedParameter4dNV_remap_index },
+ { 14505, ProgramNamedParameter4dvNV_remap_index },
+ { 8899, ProgramNamedParameter4fNV_remap_index },
+ { 11734, ProgramNamedParameter4fvNV_remap_index },
+ { 16877, PrimitiveRestartIndexNV_remap_index },
+ { 30406, PrimitiveRestartNV_remap_index },
+ { 24170, DepthBoundsEXT_remap_index },
+ { 1159, BlendEquationSeparateEXT_remap_index },
+ { 14706, BindFramebufferEXT_remap_index },
+ { 25486, BindRenderbufferEXT_remap_index },
+ { 9663, CheckFramebufferStatusEXT_remap_index },
+ { 22520, DeleteFramebuffersEXT_remap_index },
+ { 31514, DeleteRenderbuffersEXT_remap_index },
+ { 13455, FramebufferRenderbufferEXT_remap_index },
+ { 13644, FramebufferTexture1DEXT_remap_index },
+ { 11528, FramebufferTexture2DEXT_remap_index },
+ { 11148, FramebufferTexture3DEXT_remap_index },
+ { 23135, GenFramebuffersEXT_remap_index },
+ { 17403, GenRenderbuffersEXT_remap_index },
+ { 6679, GenerateMipmapEXT_remap_index },
+ { 21597, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 32084, GetRenderbufferParameterivEXT_remap_index },
+ { 20353, IsFramebufferEXT_remap_index },
+ { 32831, IsRenderbufferEXT_remap_index },
+ { 8174, RenderbufferStorageEXT_remap_index },
+ { 695, BlitFramebufferEXT_remap_index },
+ { 14324, BufferParameteriAPPLE_remap_index },
+ { 19205, FlushMappedBufferRangeAPPLE_remap_index },
+ { 1815, BindFragDataLocationEXT_remap_index },
+ { 24283, GetFragDataLocationEXT_remap_index },
+ { 10576, GetUniformuivEXT_remap_index },
+ { 2933, GetVertexAttribIivEXT_remap_index },
+ { 4195, GetVertexAttribIuivEXT_remap_index },
+ { 12014, Uniform1uiEXT_remap_index },
+ { 27676, Uniform1uivEXT_remap_index },
+ { 22118, Uniform2uiEXT_remap_index },
+ { 4309, Uniform2uivEXT_remap_index },
+ { 28943, Uniform3uiEXT_remap_index },
+ { 14652, Uniform3uivEXT_remap_index },
+ { 3486, Uniform4uiEXT_remap_index },
+ { 8675, Uniform4uivEXT_remap_index },
+ { 18306, VertexAttribI1iEXT_remap_index },
+ { 965, VertexAttribI1ivEXT_remap_index },
+ { 2516, VertexAttribI1uiEXT_remap_index },
+ { 12725, VertexAttribI1uivEXT_remap_index },
+ { 81, VertexAttribI2iEXT_remap_index },
+ { 23706, VertexAttribI2ivEXT_remap_index },
+ { 5273, VertexAttribI2uiEXT_remap_index },
+ { 4728, VertexAttribI2uivEXT_remap_index },
+ { 26361, VertexAttribI3iEXT_remap_index },
+ { 30218, VertexAttribI3ivEXT_remap_index },
+ { 3340, VertexAttribI3uiEXT_remap_index },
+ { 30114, VertexAttribI3uivEXT_remap_index },
+ { 21848, VertexAttribI4bvEXT_remap_index },
+ { 14584, VertexAttribI4iEXT_remap_index },
+ { 31783, VertexAttribI4ivEXT_remap_index },
+ { 13358, VertexAttribI4svEXT_remap_index },
+ { 16462, VertexAttribI4ubvEXT_remap_index },
+ { 16145, VertexAttribI4uiEXT_remap_index },
+ { 5419, VertexAttribI4uivEXT_remap_index },
+ { 11311, VertexAttribI4usvEXT_remap_index },
+ { 18403, VertexAttribIPointerEXT_remap_index },
+ { 3027, FramebufferTextureLayerEXT_remap_index },
+ { 5660, ColorMaskIndexedEXT_remap_index },
+ { 18820, DisableIndexedEXT_remap_index },
+ { 26406, EnableIndexedEXT_remap_index },
+ { 21552, GetBooleanIndexedvEXT_remap_index },
+ { 10922, GetIntegerIndexedvEXT_remap_index },
+ { 22596, IsEnabledIndexedEXT_remap_index },
+ { 22496, ClearColorIiEXT_remap_index },
+ { 3436, ClearColorIuiEXT_remap_index },
+ { 9852, GetTexParameterIivEXT_remap_index },
+ { 5908, GetTexParameterIuivEXT_remap_index },
+ { 2983, TexParameterIivEXT_remap_index },
+ { 26228, TexParameterIuivEXT_remap_index },
+ { 4596, BeginConditionalRenderNV_remap_index },
+ { 25249, EndConditionalRenderNV_remap_index },
+ { 9310, BeginTransformFeedbackEXT_remap_index },
+ { 18855, BindBufferBaseEXT_remap_index },
+ { 18714, BindBufferOffsetEXT_remap_index },
+ { 12202, BindBufferRangeEXT_remap_index },
+ { 14239, EndTransformFeedbackEXT_remap_index },
+ { 10774, GetTransformFeedbackVaryingEXT_remap_index },
+ { 20658, TransformFeedbackVaryingsEXT_remap_index },
+ { 29270, ProvokingVertexEXT_remap_index },
+ { 10722, GetTexParameterPointervAPPLE_remap_index },
+ { 5047, TextureRangeAPPLE_remap_index },
+ { 11600, GetObjectParameterivAPPLE_remap_index },
+ { 19780, ObjectPurgeableAPPLE_remap_index },
+ { 5702, ObjectUnpurgeableAPPLE_remap_index },
+ { 17225, ActiveProgramEXT_remap_index },
+ { 17196, CreateShaderProgramEXT_remap_index },
+ { 28288, UseShaderProgramEXT_remap_index },
+ { 28529, StencilFuncSeparateATI_remap_index },
+ { 18044, ProgramEnvParameters4fvEXT_remap_index },
+ { 17090, ProgramLocalParameters4fvEXT_remap_index },
+ { 14107, GetQueryObjecti64vEXT_remap_index },
+ { 10324, GetQueryObjectui64vEXT_remap_index },
+ { 23663, EGLImageTargetRenderbufferStorageOES_remap_index },
+ { 12120, EGLImageTargetTexture2DOES_remap_index },
{ -1, -1 }
};
/* these functions are in the ABI, but have alternative names */
static const struct gl_function_remap MESA_alt_functions[] = {
/* from GL_EXT_blend_color */
- { 2440, _gloffset_BlendColor },
+ { 2655, _gloffset_BlendColor },
/* from GL_EXT_blend_minmax */
- { 10219, _gloffset_BlendEquation },
+ { 11205, _gloffset_BlendEquation },
/* from GL_EXT_color_subtable */
- { 15652, _gloffset_ColorSubTable },
- { 29278, _gloffset_CopyColorSubTable },
+ { 16988, _gloffset_ColorSubTable },
+ { 31446, _gloffset_CopyColorSubTable },
/* from GL_EXT_convolution */
- { 213, _gloffset_ConvolutionFilter1D },
- { 2284, _gloffset_CopyConvolutionFilter1D },
- { 3624, _gloffset_GetConvolutionParameteriv },
- { 7702, _gloffset_ConvolutionFilter2D },
- { 7868, _gloffset_ConvolutionParameteriv },
- { 8328, _gloffset_ConvolutionParameterfv },
- { 18914, _gloffset_GetSeparableFilter },
- { 22185, _gloffset_SeparableFilter2D },
- { 22997, _gloffset_ConvolutionParameteri },
- { 23120, _gloffset_ConvolutionParameterf },
- { 24637, _gloffset_GetConvolutionParameterfv },
- { 25459, _gloffset_GetConvolutionFilter },
- { 27734, _gloffset_CopyConvolutionFilter2D },
+ { 257, _gloffset_ConvolutionFilter1D },
+ { 2454, _gloffset_CopyConvolutionFilter1D },
+ { 4058, _gloffset_GetConvolutionParameteriv },
+ { 8523, _gloffset_ConvolutionFilter2D },
+ { 8725, _gloffset_ConvolutionParameteriv },
+ { 9185, _gloffset_ConvolutionParameterfv },
+ { 20501, _gloffset_GetSeparableFilter },
+ { 23938, _gloffset_SeparableFilter2D },
+ { 24801, _gloffset_ConvolutionParameteri },
+ { 24924, _gloffset_ConvolutionParameterf },
+ { 26595, _gloffset_GetConvolutionParameterfv },
+ { 27417, _gloffset_GetConvolutionFilter },
+ { 29810, _gloffset_CopyConvolutionFilter2D },
/* from GL_EXT_copy_texture */
- { 13803, _gloffset_CopyTexSubImage3D },
- { 15363, _gloffset_CopyTexImage2D },
- { 22605, _gloffset_CopyTexImage1D },
- { 25140, _gloffset_CopyTexSubImage2D },
- { 27372, _gloffset_CopyTexSubImage1D },
+ { 15065, _gloffset_CopyTexSubImage3D },
+ { 16675, _gloffset_CopyTexImage2D },
+ { 24409, _gloffset_CopyTexImage1D },
+ { 27098, _gloffset_CopyTexSubImage2D },
+ { 29448, _gloffset_CopyTexSubImage1D },
/* from GL_EXT_draw_range_elements */
- { 8665, _gloffset_DrawRangeElements },
+ { 9522, _gloffset_DrawRangeElements },
/* from GL_EXT_histogram */
- { 812, _gloffset_Histogram },
- { 3088, _gloffset_ResetHistogram },
- { 9065, _gloffset_GetMinmax },
- { 14137, _gloffset_GetHistogramParameterfv },
- { 22530, _gloffset_GetMinmaxParameteriv },
- { 24527, _gloffset_ResetMinmax },
- { 25356, _gloffset_GetHistogramParameteriv },
- { 26443, _gloffset_GetHistogram },
- { 28864, _gloffset_Minmax },
- { 30365, _gloffset_GetMinmaxParameterfv },
+ { 856, _gloffset_Histogram },
+ { 3522, _gloffset_ResetHistogram },
+ { 9972, _gloffset_GetMinmax },
+ { 15399, _gloffset_GetHistogramParameterfv },
+ { 24334, _gloffset_GetMinmaxParameteriv },
+ { 26485, _gloffset_ResetMinmax },
+ { 27314, _gloffset_GetHistogramParameteriv },
+ { 28463, _gloffset_GetHistogram },
+ { 31032, _gloffset_Minmax },
+ { 32578, _gloffset_GetMinmaxParameterfv },
/* from GL_EXT_paletted_texture */
- { 7564, _gloffset_ColorTable },
- { 13983, _gloffset_GetColorTable },
- { 21200, _gloffset_GetColorTableParameterfv },
- { 23176, _gloffset_GetColorTableParameteriv },
+ { 8385, _gloffset_ColorTable },
+ { 15245, _gloffset_GetColorTable },
+ { 22882, _gloffset_GetColorTableParameterfv },
+ { 24980, _gloffset_GetColorTableParameteriv },
/* from GL_EXT_subtexture */
- { 6285, _gloffset_TexSubImage1D },
- { 9679, _gloffset_TexSubImage2D },
+ { 7106, _gloffset_TexSubImage1D },
+ { 10649, _gloffset_TexSubImage2D },
/* from GL_EXT_texture3D */
- { 1658, _gloffset_TexImage3D },
- { 20969, _gloffset_TexSubImage3D },
+ { 1774, _gloffset_TexImage3D },
+ { 22651, _gloffset_TexSubImage3D },
/* from GL_EXT_texture_object */
- { 2964, _gloffset_PrioritizeTextures },
- { 6734, _gloffset_AreTexturesResident },
- { 12382, _gloffset_GenTextures },
- { 14469, _gloffset_DeleteTextures },
- { 17916, _gloffset_IsTexture },
- { 27437, _gloffset_BindTexture },
+ { 3290, _gloffset_PrioritizeTextures },
+ { 7555, _gloffset_AreTexturesResident },
+ { 13562, _gloffset_GenTextures },
+ { 15731, _gloffset_DeleteTextures },
+ { 19486, _gloffset_IsTexture },
+ { 29513, _gloffset_BindTexture },
/* from GL_EXT_vertex_array */
- { 22357, _gloffset_ArrayElement },
- { 28452, _gloffset_GetPointerv },
- { 29992, _gloffset_DrawArrays },
+ { 24110, _gloffset_ArrayElement },
+ { 30620, _gloffset_GetPointerv },
+ { 32205, _gloffset_DrawArrays },
/* from GL_SGI_color_table */
- { 6852, _gloffset_ColorTableParameteriv },
- { 7564, _gloffset_ColorTable },
- { 13983, _gloffset_GetColorTable },
- { 14093, _gloffset_CopyColorTable },
- { 17777, _gloffset_ColorTableParameterfv },
- { 21200, _gloffset_GetColorTableParameterfv },
- { 23176, _gloffset_GetColorTableParameteriv },
+ { 7673, _gloffset_ColorTableParameteriv },
+ { 8385, _gloffset_ColorTable },
+ { 15245, _gloffset_GetColorTable },
+ { 15355, _gloffset_CopyColorTable },
+ { 19347, _gloffset_ColorTableParameterfv },
+ { 22882, _gloffset_GetColorTableParameterfv },
+ { 24980, _gloffset_GetColorTableParameteriv },
/* from GL_VERSION_1_3 */
- { 381, _gloffset_MultiTexCoord3sARB },
- { 613, _gloffset_ActiveTextureARB },
- { 3761, _gloffset_MultiTexCoord1fvARB },
- { 5386, _gloffset_MultiTexCoord3dARB },
- { 5431, _gloffset_MultiTexCoord2iARB },
- { 5555, _gloffset_MultiTexCoord2svARB },
- { 7520, _gloffset_MultiTexCoord2fARB },
- { 9424, _gloffset_MultiTexCoord3fvARB },
- { 9981, _gloffset_MultiTexCoord4sARB },
- { 10615, _gloffset_MultiTexCoord2dvARB },
- { 10997, _gloffset_MultiTexCoord1svARB },
- { 11369, _gloffset_MultiTexCoord3svARB },
- { 11430, _gloffset_MultiTexCoord4iARB },
- { 12153, _gloffset_MultiTexCoord3iARB },
- { 12956, _gloffset_MultiTexCoord1dARB },
- { 13173, _gloffset_MultiTexCoord3dvARB },
- { 14337, _gloffset_MultiTexCoord3ivARB },
- { 14382, _gloffset_MultiTexCoord2sARB },
- { 15709, _gloffset_MultiTexCoord4ivARB },
- { 17427, _gloffset_ClientActiveTextureARB },
- { 19710, _gloffset_MultiTexCoord2dARB },
- { 20151, _gloffset_MultiTexCoord4dvARB },
- { 20462, _gloffset_MultiTexCoord4fvARB },
- { 21341, _gloffset_MultiTexCoord3fARB },
- { 23704, _gloffset_MultiTexCoord4dARB },
- { 23970, _gloffset_MultiTexCoord1sARB },
- { 24174, _gloffset_MultiTexCoord1dvARB },
- { 24984, _gloffset_MultiTexCoord1ivARB },
- { 25077, _gloffset_MultiTexCoord2ivARB },
- { 25416, _gloffset_MultiTexCoord1iARB },
- { 26718, _gloffset_MultiTexCoord4svARB },
- { 27236, _gloffset_MultiTexCoord1fARB },
- { 27499, _gloffset_MultiTexCoord4fARB },
- { 29826, _gloffset_MultiTexCoord2fvARB },
+ { 425, _gloffset_MultiTexCoord3sARB },
+ { 657, _gloffset_ActiveTextureARB },
+ { 4247, _gloffset_MultiTexCoord1fvARB },
+ { 6155, _gloffset_MultiTexCoord3dARB },
+ { 6200, _gloffset_MultiTexCoord2iARB },
+ { 6324, _gloffset_MultiTexCoord2svARB },
+ { 8341, _gloffset_MultiTexCoord2fARB },
+ { 10354, _gloffset_MultiTexCoord3fvARB },
+ { 10967, _gloffset_MultiTexCoord4sARB },
+ { 11648, _gloffset_MultiTexCoord2dvARB },
+ { 12063, _gloffset_MultiTexCoord1svARB },
+ { 12435, _gloffset_MultiTexCoord3svARB },
+ { 12496, _gloffset_MultiTexCoord4iARB },
+ { 13266, _gloffset_MultiTexCoord3iARB },
+ { 14136, _gloffset_MultiTexCoord1dARB },
+ { 14353, _gloffset_MultiTexCoord3dvARB },
+ { 15599, _gloffset_MultiTexCoord3ivARB },
+ { 15644, _gloffset_MultiTexCoord2sARB },
+ { 17045, _gloffset_MultiTexCoord4ivARB },
+ { 18997, _gloffset_ClientActiveTextureARB },
+ { 21297, _gloffset_MultiTexCoord2dARB },
+ { 21717, _gloffset_MultiTexCoord4dvARB },
+ { 22073, _gloffset_MultiTexCoord4fvARB },
+ { 23023, _gloffset_MultiTexCoord3fARB },
+ { 25531, _gloffset_MultiTexCoord4dARB },
+ { 25797, _gloffset_MultiTexCoord1sARB },
+ { 26001, _gloffset_MultiTexCoord1dvARB },
+ { 26942, _gloffset_MultiTexCoord1ivARB },
+ { 27035, _gloffset_MultiTexCoord2ivARB },
+ { 27374, _gloffset_MultiTexCoord1iARB },
+ { 28738, _gloffset_MultiTexCoord4svARB },
+ { 29312, _gloffset_MultiTexCoord1fARB },
+ { 29575, _gloffset_MultiTexCoord4fARB },
+ { 32039, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
@@ -5012,7 +5329,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[] = {
- { 8386, -1 }, /* TbufferMask3DFX */
+ { 9243, -1 }, /* TbufferMask3DFX */
{ -1, -1 }
};
#endif
@@ -5083,7 +5400,7 @@ static const struct gl_function_remap GL_ARB_framebuffer_object_functions[] = {
#if defined(need_GL_ARB_geometry_shader4)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_ARB_geometry_shader4_functions[] = {
- { 11333, -1 }, /* FramebufferTextureLayer */
+ { 12399, -1 }, /* FramebufferTextureLayer */
{ -1, -1 }
};
#endif
@@ -5097,11 +5414,11 @@ static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = {
#if defined(need_GL_ARB_matrix_palette)
static const struct gl_function_remap GL_ARB_matrix_palette_functions[] = {
- { 3339, -1 }, /* MatrixIndexusvARB */
- { 11974, -1 }, /* MatrixIndexuivARB */
- { 13295, -1 }, /* MatrixIndexPointerARB */
- { 18165, -1 }, /* CurrentPaletteMatrixARB */
- { 21085, -1 }, /* MatrixIndexubvARB */
+ { 3773, -1 }, /* MatrixIndexusvARB */
+ { 13087, -1 }, /* MatrixIndexuivARB */
+ { 14475, -1 }, /* MatrixIndexPointerARB */
+ { 19735, -1 }, /* CurrentPaletteMatrixARB */
+ { 22767, -1 }, /* MatrixIndexubvARB */
{ -1, -1 }
};
#endif
@@ -5178,16 +5495,16 @@ 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 */
- { 5746, -1 }, /* WeightivARB */
- { 10084, -1 }, /* WeightPointerARB */
- { 12674, -1 }, /* WeightfvARB */
- { 16204, -1 }, /* WeightbvARB */
- { 19378, -1 }, /* WeightusvARB */
- { 22111, -1 }, /* VertexBlendARB */
- { 27320, -1 }, /* WeightsvARB */
- { 29328, -1 }, /* WeightdvARB */
- { 30026, -1 }, /* WeightuivARB */
+ { 2396, -1 }, /* WeightubvARB */
+ { 6567, -1 }, /* WeightivARB */
+ { 11070, -1 }, /* WeightPointerARB */
+ { 13854, -1 }, /* WeightfvARB */
+ { 17564, -1 }, /* WeightbvARB */
+ { 20965, -1 }, /* WeightusvARB */
+ { 23864, -1 }, /* VertexBlendARB */
+ { 29396, -1 }, /* WeightsvARB */
+ { 31496, -1 }, /* WeightdvARB */
+ { 32239, -1 }, /* WeightuivARB */
{ -1, -1 }
};
#endif
@@ -5257,7 +5574,7 @@ static const struct gl_function_remap GL_ATI_separate_stencil_functions[] = {
#if defined(need_GL_EXT_blend_color)
static const struct gl_function_remap GL_EXT_blend_color_functions[] = {
- { 2440, _gloffset_BlendColor },
+ { 2655, _gloffset_BlendColor },
{ -1, -1 }
};
#endif
@@ -5278,15 +5595,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[] = {
- { 10219, _gloffset_BlendEquation },
+ { 11205, _gloffset_BlendEquation },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_color_subtable)
static const struct gl_function_remap GL_EXT_color_subtable_functions[] = {
- { 15652, _gloffset_ColorSubTable },
- { 29278, _gloffset_CopyColorSubTable },
+ { 16988, _gloffset_ColorSubTable },
+ { 31446, _gloffset_CopyColorSubTable },
{ -1, -1 }
};
#endif
@@ -5300,66 +5617,66 @@ static const struct gl_function_remap GL_EXT_compiled_vertex_array_functions[] =
#if defined(need_GL_EXT_convolution)
static const struct gl_function_remap GL_EXT_convolution_functions[] = {
- { 213, _gloffset_ConvolutionFilter1D },
- { 2284, _gloffset_CopyConvolutionFilter1D },
- { 3624, _gloffset_GetConvolutionParameteriv },
- { 7702, _gloffset_ConvolutionFilter2D },
- { 7868, _gloffset_ConvolutionParameteriv },
- { 8328, _gloffset_ConvolutionParameterfv },
- { 18914, _gloffset_GetSeparableFilter },
- { 22185, _gloffset_SeparableFilter2D },
- { 22997, _gloffset_ConvolutionParameteri },
- { 23120, _gloffset_ConvolutionParameterf },
- { 24637, _gloffset_GetConvolutionParameterfv },
- { 25459, _gloffset_GetConvolutionFilter },
- { 27734, _gloffset_CopyConvolutionFilter2D },
+ { 257, _gloffset_ConvolutionFilter1D },
+ { 2454, _gloffset_CopyConvolutionFilter1D },
+ { 4058, _gloffset_GetConvolutionParameteriv },
+ { 8523, _gloffset_ConvolutionFilter2D },
+ { 8725, _gloffset_ConvolutionParameteriv },
+ { 9185, _gloffset_ConvolutionParameterfv },
+ { 20501, _gloffset_GetSeparableFilter },
+ { 23938, _gloffset_SeparableFilter2D },
+ { 24801, _gloffset_ConvolutionParameteri },
+ { 24924, _gloffset_ConvolutionParameterf },
+ { 26595, _gloffset_GetConvolutionParameterfv },
+ { 27417, _gloffset_GetConvolutionFilter },
+ { 29810, _gloffset_CopyConvolutionFilter2D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_coordinate_frame)
static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = {
- { 9563, -1 }, /* TangentPointerEXT */
- { 11488, -1 }, /* Binormal3ivEXT */
- { 12106, -1 }, /* Tangent3sEXT */
- { 13360, -1 }, /* Tangent3fvEXT */
- { 17136, -1 }, /* Tangent3dvEXT */
- { 17863, -1 }, /* Binormal3bvEXT */
- { 18967, -1 }, /* Binormal3dEXT */
- { 21017, -1 }, /* Tangent3fEXT */
- { 23069, -1 }, /* Binormal3sEXT */
- { 23514, -1 }, /* Tangent3ivEXT */
- { 23533, -1 }, /* Tangent3dEXT */
- { 24401, -1 }, /* Binormal3svEXT */
- { 24882, -1 }, /* Binormal3fEXT */
- { 25734, -1 }, /* Binormal3dvEXT */
- { 26940, -1 }, /* Tangent3iEXT */
- { 28019, -1 }, /* Tangent3bvEXT */
- { 28487, -1 }, /* Tangent3bEXT */
- { 29051, -1 }, /* Binormal3fvEXT */
- { 29725, -1 }, /* BinormalPointerEXT */
- { 30130, -1 }, /* Tangent3svEXT */
- { 30567, -1 }, /* Binormal3bEXT */
- { 30744, -1 }, /* Binormal3iEXT */
+ { 10493, -1 }, /* TangentPointerEXT */
+ { 12554, -1 }, /* Binormal3ivEXT */
+ { 13219, -1 }, /* Tangent3sEXT */
+ { 14540, -1 }, /* Tangent3fvEXT */
+ { 18695, -1 }, /* Tangent3dvEXT */
+ { 19433, -1 }, /* Binormal3bvEXT */
+ { 20554, -1 }, /* Binormal3dEXT */
+ { 22699, -1 }, /* Tangent3fEXT */
+ { 24873, -1 }, /* Binormal3sEXT */
+ { 25341, -1 }, /* Tangent3ivEXT */
+ { 25360, -1 }, /* Tangent3dEXT */
+ { 26274, -1 }, /* Binormal3svEXT */
+ { 26840, -1 }, /* Binormal3fEXT */
+ { 27728, -1 }, /* Binormal3dvEXT */
+ { 28995, -1 }, /* Tangent3iEXT */
+ { 30095, -1 }, /* Tangent3bvEXT */
+ { 30655, -1 }, /* Tangent3bEXT */
+ { 31219, -1 }, /* Binormal3fvEXT */
+ { 31938, -1 }, /* BinormalPointerEXT */
+ { 32343, -1 }, /* Tangent3svEXT */
+ { 32780, -1 }, /* Binormal3bEXT */
+ { 32957, -1 }, /* Binormal3iEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_copy_texture)
static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
- { 13803, _gloffset_CopyTexSubImage3D },
- { 15363, _gloffset_CopyTexImage2D },
- { 22605, _gloffset_CopyTexImage1D },
- { 25140, _gloffset_CopyTexSubImage2D },
- { 27372, _gloffset_CopyTexSubImage1D },
+ { 15065, _gloffset_CopyTexSubImage3D },
+ { 16675, _gloffset_CopyTexImage2D },
+ { 24409, _gloffset_CopyTexImage1D },
+ { 27098, _gloffset_CopyTexSubImage2D },
+ { 29448, _gloffset_CopyTexSubImage1D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_cull_vertex)
static const struct gl_function_remap GL_EXT_cull_vertex_functions[] = {
- { 8017, -1 }, /* CullParameterdvEXT */
- { 10660, -1 }, /* CullParameterfvEXT */
+ { 8874, -1 }, /* CullParameterdvEXT */
+ { 11693, -1 }, /* CullParameterfvEXT */
{ -1, -1 }
};
#endif
@@ -5387,7 +5704,7 @@ static const struct gl_function_remap GL_EXT_draw_instanced_functions[] = {
#if defined(need_GL_EXT_draw_range_elements)
static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = {
- { 8665, _gloffset_DrawRangeElements },
+ { 9522, _gloffset_DrawRangeElements },
{ -1, -1 }
};
#endif
@@ -5427,41 +5744,48 @@ static const struct gl_function_remap GL_EXT_gpu_program_parameters_functions[]
};
#endif
+#if defined(need_GL_EXT_gpu_shader4)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_gpu_shader4_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_EXT_histogram)
static const struct gl_function_remap GL_EXT_histogram_functions[] = {
- { 812, _gloffset_Histogram },
- { 3088, _gloffset_ResetHistogram },
- { 9065, _gloffset_GetMinmax },
- { 14137, _gloffset_GetHistogramParameterfv },
- { 22530, _gloffset_GetMinmaxParameteriv },
- { 24527, _gloffset_ResetMinmax },
- { 25356, _gloffset_GetHistogramParameteriv },
- { 26443, _gloffset_GetHistogram },
- { 28864, _gloffset_Minmax },
- { 30365, _gloffset_GetMinmaxParameterfv },
+ { 856, _gloffset_Histogram },
+ { 3522, _gloffset_ResetHistogram },
+ { 9972, _gloffset_GetMinmax },
+ { 15399, _gloffset_GetHistogramParameterfv },
+ { 24334, _gloffset_GetMinmaxParameteriv },
+ { 26485, _gloffset_ResetMinmax },
+ { 27314, _gloffset_GetHistogramParameteriv },
+ { 28463, _gloffset_GetHistogram },
+ { 31032, _gloffset_Minmax },
+ { 32578, _gloffset_GetMinmaxParameterfv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_func)
static const struct gl_function_remap GL_EXT_index_func_functions[] = {
- { 10446, -1 }, /* IndexFuncEXT */
+ { 11479, -1 }, /* IndexFuncEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_material)
static const struct gl_function_remap GL_EXT_index_material_functions[] = {
- { 19465, -1 }, /* IndexMaterialEXT */
+ { 21052, -1 }, /* IndexMaterialEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_light_texture)
static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
- { 24421, -1 }, /* ApplyTextureEXT */
- { 24481, -1 }, /* TextureMaterialEXT */
- { 24506, -1 }, /* TextureLightEXT */
+ { 26294, -1 }, /* ApplyTextureEXT */
+ { 26439, -1 }, /* TextureMaterialEXT */
+ { 26464, -1 }, /* TextureLightEXT */
{ -1, -1 }
};
#endif
@@ -5482,20 +5806,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[] = {
- { 7564, _gloffset_ColorTable },
- { 13983, _gloffset_GetColorTable },
- { 21200, _gloffset_GetColorTableParameterfv },
- { 23176, _gloffset_GetColorTableParameteriv },
+ { 8385, _gloffset_ColorTable },
+ { 15245, _gloffset_GetColorTable },
+ { 22882, _gloffset_GetColorTableParameterfv },
+ { 24980, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_pixel_transform)
static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = {
- { 20116, -1 }, /* PixelTransformParameterfEXT */
- { 20196, -1 }, /* PixelTransformParameteriEXT */
- { 28202, -1 }, /* PixelTransformParameterfvEXT */
- { 29689, -1 }, /* PixelTransformParameterivEXT */
+ { 21682, -1 }, /* PixelTransformParameterfEXT */
+ { 21762, -1 }, /* PixelTransformParameteriEXT */
+ { 30370, -1 }, /* PixelTransformParameterfvEXT */
+ { 31902, -1 }, /* PixelTransformParameterivEXT */
{ -1, -1 }
};
#endif
@@ -5528,6 +5852,13 @@ static const struct gl_function_remap GL_EXT_secondary_color_functions[] = {
};
#endif
+#if defined(need_GL_EXT_separate_shader_objects)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_separate_shader_objects_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_EXT_stencil_two_side)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = {
@@ -5537,16 +5868,16 @@ 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[] = {
- { 6285, _gloffset_TexSubImage1D },
- { 9679, _gloffset_TexSubImage2D },
+ { 7106, _gloffset_TexSubImage1D },
+ { 10649, _gloffset_TexSubImage2D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_texture3D)
static const struct gl_function_remap GL_EXT_texture3D_functions[] = {
- { 1658, _gloffset_TexImage3D },
- { 20969, _gloffset_TexSubImage3D },
+ { 1774, _gloffset_TexImage3D },
+ { 22651, _gloffset_TexSubImage3D },
{ -1, -1 }
};
#endif
@@ -5558,21 +5889,28 @@ static const struct gl_function_remap GL_EXT_texture_array_functions[] = {
};
#endif
+#if defined(need_GL_EXT_texture_integer)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_texture_integer_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_EXT_texture_object)
static const struct gl_function_remap GL_EXT_texture_object_functions[] = {
- { 2964, _gloffset_PrioritizeTextures },
- { 6734, _gloffset_AreTexturesResident },
- { 12382, _gloffset_GenTextures },
- { 14469, _gloffset_DeleteTextures },
- { 17916, _gloffset_IsTexture },
- { 27437, _gloffset_BindTexture },
+ { 3290, _gloffset_PrioritizeTextures },
+ { 7555, _gloffset_AreTexturesResident },
+ { 13562, _gloffset_GenTextures },
+ { 15731, _gloffset_DeleteTextures },
+ { 19486, _gloffset_IsTexture },
+ { 29513, _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[] = {
- { 12624, -1 }, /* TextureNormalEXT */
+ { 13804, -1 }, /* TextureNormalEXT */
{ -1, -1 }
};
#endif
@@ -5594,30 +5932,30 @@ static const struct gl_function_remap GL_EXT_transform_feedback_functions[] = {
#if defined(need_GL_EXT_vertex_array)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_EXT_vertex_array_functions[] = {
- { 22357, _gloffset_ArrayElement },
- { 28452, _gloffset_GetPointerv },
- { 29992, _gloffset_DrawArrays },
+ { 24110, _gloffset_ArrayElement },
+ { 30620, _gloffset_GetPointerv },
+ { 32205, _gloffset_DrawArrays },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_vertex_weighting)
static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
- { 17946, -1 }, /* VertexWeightfvEXT */
- { 24860, -1 }, /* VertexWeightfEXT */
- { 26412, -1 }, /* VertexWeightPointerEXT */
+ { 19516, -1 }, /* VertexWeightfvEXT */
+ { 26818, -1 }, /* VertexWeightfEXT */
+ { 28432, -1 }, /* VertexWeightPointerEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_HP_image_transform)
static const struct gl_function_remap GL_HP_image_transform_functions[] = {
- { 2157, -1 }, /* GetImageTransformParameterfvHP */
- { 3305, -1 }, /* ImageTransformParameterfHP */
- { 9257, -1 }, /* ImageTransformParameterfvHP */
- { 10915, -1 }, /* ImageTransformParameteriHP */
- { 11223, -1 }, /* GetImageTransformParameterivHP */
- { 18010, -1 }, /* ImageTransformParameterivHP */
+ { 2327, -1 }, /* GetImageTransformParameterfvHP */
+ { 3739, -1 }, /* ImageTransformParameterfHP */
+ { 10187, -1 }, /* ImageTransformParameterfvHP */
+ { 11948, -1 }, /* ImageTransformParameteriHP */
+ { 12289, -1 }, /* GetImageTransformParameterivHP */
+ { 19580, -1 }, /* ImageTransformParameterivHP */
{ -1, -1 }
};
#endif
@@ -5631,14 +5969,14 @@ static const struct gl_function_remap GL_IBM_multimode_draw_arrays_functions[] =
#if defined(need_GL_IBM_vertex_array_lists)
static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = {
- { 3857, -1 }, /* SecondaryColorPointerListIBM */
- { 5252, -1 }, /* NormalPointerListIBM */
- { 6908, -1 }, /* FogCoordPointerListIBM */
- { 7215, -1 }, /* VertexPointerListIBM */
- { 10836, -1 }, /* ColorPointerListIBM */
- { 12213, -1 }, /* TexCoordPointerListIBM */
- { 12646, -1 }, /* IndexPointerListIBM */
- { 30308, -1 }, /* EdgeFlagPointerListIBM */
+ { 4379, -1 }, /* SecondaryColorPointerListIBM */
+ { 6021, -1 }, /* NormalPointerListIBM */
+ { 7729, -1 }, /* FogCoordPointerListIBM */
+ { 8036, -1 }, /* VertexPointerListIBM */
+ { 11869, -1 }, /* ColorPointerListIBM */
+ { 13326, -1 }, /* TexCoordPointerListIBM */
+ { 13826, -1 }, /* IndexPointerListIBM */
+ { 32521, -1 }, /* EdgeFlagPointerListIBM */
{ -1, -1 }
};
#endif
@@ -5652,10 +5990,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[] = {
- { 11600, -1 }, /* VertexPointervINTEL */
- { 14230, -1 }, /* ColorPointervINTEL */
- { 27708, -1 }, /* NormalPointervINTEL */
- { 28134, -1 }, /* TexCoordPointervINTEL */
+ { 12666, -1 }, /* VertexPointervINTEL */
+ { 15492, -1 }, /* ColorPointervINTEL */
+ { 29784, -1 }, /* NormalPointervINTEL */
+ { 30302, -1 }, /* TexCoordPointervINTEL */
{ -1, -1 }
};
#endif
@@ -5669,10 +6007,10 @@ static const struct gl_function_remap GL_MESA_resize_buffers_functions[] = {
#if defined(need_GL_MESA_shader_debug)
static const struct gl_function_remap GL_MESA_shader_debug_functions[] = {
- { 1522, -1 }, /* GetDebugLogLengthMESA */
- { 3063, -1 }, /* ClearDebugLogMESA */
- { 4018, -1 }, /* GetDebugLogMESA */
- { 28645, -1 }, /* CreateDebugObjectMESA */
+ { 1638, -1 }, /* GetDebugLogLengthMESA */
+ { 3461, -1 }, /* ClearDebugLogMESA */
+ { 4540, -1 }, /* GetDebugLogMESA */
+ { 30813, -1 }, /* CreateDebugObjectMESA */
{ -1, -1 }
};
#endif
@@ -5693,15 +6031,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[] = {
- { 5947, -1 }, /* GetMapAttribParameterivNV */
- { 7670, -1 }, /* MapControlPointsNV */
- { 7769, -1 }, /* MapParameterfvNV */
- { 9662, -1 }, /* EvalMapsNV */
- { 15874, -1 }, /* GetMapAttribParameterfvNV */
- { 16040, -1 }, /* MapParameterivNV */
- { 22920, -1 }, /* GetMapParameterivNV */
- { 23418, -1 }, /* GetMapParameterfvNV */
- { 27044, -1 }, /* GetMapControlPointsNV */
+ { 6768, -1 }, /* GetMapAttribParameterivNV */
+ { 8491, -1 }, /* MapControlPointsNV */
+ { 8590, -1 }, /* MapParameterfvNV */
+ { 10632, -1 }, /* EvalMapsNV */
+ { 17162, -1 }, /* GetMapAttribParameterfvNV */
+ { 17379, -1 }, /* MapParameterivNV */
+ { 24724, -1 }, /* GetMapParameterivNV */
+ { 25222, -1 }, /* GetMapParameterfvNV */
+ { 29099, -1 }, /* GetMapControlPointsNV */
{ -1, -1 }
};
#endif
@@ -5743,8 +6081,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[] = {
- { 14700, -1 }, /* CombinerStageParameterfvNV */
- { 15015, -1 }, /* GetCombinerStageParameterfvNV */
+ { 15884, -1 }, /* CombinerStageParameterfvNV */
+ { 16280, -1 }, /* GetCombinerStageParameterfvNV */
{ -1, -1 }
};
#endif
@@ -5772,23 +6110,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[] = {
- { 7854, -1 }, /* HintPGI */
+ { 8711, -1 }, /* HintPGI */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_detail_texture)
static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = {
- { 14988, -1 }, /* GetDetailTexFuncSGIS */
- { 15308, -1 }, /* DetailTexFuncSGIS */
+ { 16253, -1 }, /* GetDetailTexFuncSGIS */
+ { 16620, -1 }, /* DetailTexFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_fog_function)
static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
- { 25122, -1 }, /* FogFuncSGIS */
- { 25787, -1 }, /* GetFogFuncSGIS */
+ { 27080, -1 }, /* FogFuncSGIS */
+ { 27781, -1 }, /* GetFogFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5816,112 +6154,112 @@ 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[] = {
- { 6008, -1 }, /* GetSharpenTexFuncSGIS */
- { 20436, -1 }, /* SharpenTexFuncSGIS */
+ { 6829, -1 }, /* GetSharpenTexFuncSGIS */
+ { 22047, -1 }, /* SharpenTexFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture4D)
static const struct gl_function_remap GL_SGIS_texture4D_functions[] = {
- { 894, -1 }, /* TexImage4DSGIS */
- { 14538, -1 }, /* TexSubImage4DSGIS */
+ { 1010, -1 }, /* TexImage4DSGIS */
+ { 15800, -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[] = {
- { 13936, -1 }, /* TextureColorMaskSGIS */
+ { 15198, -1 }, /* TextureColorMaskSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture_filter4)
static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
- { 6185, -1 }, /* GetTexFilterFuncSGIS */
- { 15134, -1 }, /* TexFilterFuncSGIS */
+ { 7006, -1 }, /* GetTexFilterFuncSGIS */
+ { 16399, -1 }, /* TexFilterFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_async)
static const struct gl_function_remap GL_SGIX_async_functions[] = {
- { 3014, -1 }, /* AsyncMarkerSGIX */
- { 3997, -1 }, /* FinishAsyncSGIX */
- { 4762, -1 }, /* PollAsyncSGIX */
- { 20583, -1 }, /* DeleteAsyncMarkersSGIX */
- { 20638, -1 }, /* IsAsyncMarkerSGIX */
- { 30105, -1 }, /* GenAsyncMarkersSGIX */
+ { 3387, -1 }, /* AsyncMarkerSGIX */
+ { 4519, -1 }, /* FinishAsyncSGIX */
+ { 5466, -1 }, /* PollAsyncSGIX */
+ { 22228, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 22283, -1 }, /* IsAsyncMarkerSGIX */
+ { 32318, -1 }, /* GenAsyncMarkersSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_flush_raster)
static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
- { 6562, -1 }, /* FlushRasterSGIX */
+ { 7383, -1 }, /* FlushRasterSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_fragment_lighting)
static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = {
- { 2410, -1 }, /* FragmentMaterialfvSGIX */
- { 4713, -1 }, /* FragmentLightiSGIX */
- { 5688, -1 }, /* GetFragmentMaterialfvSGIX */
- { 7282, -1 }, /* FragmentMaterialfSGIX */
- { 7443, -1 }, /* GetFragmentLightivSGIX */
- { 8280, -1 }, /* FragmentLightModeliSGIX */
- { 9725, -1 }, /* FragmentLightivSGIX */
- { 10027, -1 }, /* GetFragmentMaterialivSGIX */
- { 17833, -1 }, /* FragmentLightModelfSGIX */
- { 18133, -1 }, /* FragmentColorMaterialSGIX */
- { 18533, -1 }, /* FragmentMaterialiSGIX */
- { 19793, -1 }, /* LightEnviSGIX */
- { 21292, -1 }, /* FragmentLightModelfvSGIX */
- { 21601, -1 }, /* FragmentLightfvSGIX */
- { 26171, -1 }, /* FragmentLightModelivSGIX */
- { 26294, -1 }, /* FragmentLightfSGIX */
- { 29021, -1 }, /* GetFragmentLightfvSGIX */
- { 30588, -1 }, /* FragmentMaterialivSGIX */
+ { 2625, -1 }, /* FragmentMaterialfvSGIX */
+ { 5370, -1 }, /* FragmentLightiSGIX */
+ { 8103, -1 }, /* FragmentMaterialfSGIX */
+ { 8264, -1 }, /* GetFragmentLightivSGIX */
+ { 9137, -1 }, /* FragmentLightModeliSGIX */
+ { 10695, -1 }, /* FragmentLightivSGIX */
+ { 11013, -1 }, /* GetFragmentMaterialivSGIX */
+ { 16193, -1 }, /* GetFragmentMaterialfvSGIX */
+ { 19403, -1 }, /* FragmentLightModelfSGIX */
+ { 19703, -1 }, /* FragmentColorMaterialSGIX */
+ { 20120, -1 }, /* FragmentMaterialiSGIX */
+ { 21380, -1 }, /* LightEnviSGIX */
+ { 22974, -1 }, /* FragmentLightModelfvSGIX */
+ { 23309, -1 }, /* FragmentLightfvSGIX */
+ { 28165, -1 }, /* FragmentLightModelivSGIX */
+ { 28314, -1 }, /* FragmentLightfSGIX */
+ { 31189, -1 }, /* GetFragmentLightfvSGIX */
+ { 32801, -1 }, /* FragmentMaterialivSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_framezoom)
static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
- { 20661, -1 }, /* FrameZoomSGIX */
+ { 22306, -1 }, /* FrameZoomSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_igloo_interface)
static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
- { 26602, -1 }, /* IglooInterfaceSGIX */
+ { 28622, -1 }, /* IglooInterfaceSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_instruments)
static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
- { 2573, -1 }, /* ReadInstrumentsSGIX */
- { 5764, -1 }, /* PollInstrumentsSGIX */
- { 9623, -1 }, /* GetInstrumentsSGIX */
- { 11811, -1 }, /* StartInstrumentsSGIX */
- { 14734, -1 }, /* StopInstrumentsSGIX */
- { 16417, -1 }, /* InstrumentsBufferSGIX */
+ { 2805, -1 }, /* ReadInstrumentsSGIX */
+ { 6585, -1 }, /* PollInstrumentsSGIX */
+ { 10553, -1 }, /* GetInstrumentsSGIX */
+ { 12924, -1 }, /* StartInstrumentsSGIX */
+ { 15918, -1 }, /* StopInstrumentsSGIX */
+ { 17777, -1 }, /* InstrumentsBufferSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_list_priority)
static const struct gl_function_remap GL_SGIX_list_priority_functions[] = {
- { 1125, -1 }, /* ListParameterfSGIX */
- { 2763, -1 }, /* GetListParameterfvSGIX */
- { 16332, -1 }, /* ListParameteriSGIX */
- { 17086, -1 }, /* ListParameterfvSGIX */
- { 19199, -1 }, /* ListParameterivSGIX */
- { 30149, -1 }, /* GetListParameterivSGIX */
+ { 1241, -1 }, /* ListParameterfSGIX */
+ { 3089, -1 }, /* GetListParameterfvSGIX */
+ { 17692, -1 }, /* ListParameteriSGIX */
+ { 18645, -1 }, /* ListParameterfvSGIX */
+ { 20786, -1 }, /* ListParameterivSGIX */
+ { 32362, -1 }, /* GetListParameterivSGIX */
{ -1, -1 }
};
#endif
@@ -5935,134 +6273,134 @@ 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 */
- { 14834, -1 }, /* DeformSGIX */
- { 22469, -1 }, /* DeformationMap3fSGIX */
- { 28909, -1 }, /* DeformationMap3dSGIX */
+ { 3685, -1 }, /* LoadIdentityDeformationMapSGIX */
+ { 16018, -1 }, /* DeformSGIX */
+ { 24222, -1 }, /* DeformationMap3fSGIX */
+ { 31077, -1 }, /* DeformationMap3dSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_reference_plane)
static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
- { 13487, -1 }, /* ReferencePlaneSGIX */
+ { 14749, -1 }, /* ReferencePlaneSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_sprite)
static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
- { 8778, -1 }, /* SpriteParameterfvSGIX */
- { 18988, -1 }, /* SpriteParameteriSGIX */
- { 24561, -1 }, /* SpriteParameterfSGIX */
- { 27166, -1 }, /* SpriteParameterivSGIX */
+ { 9635, -1 }, /* SpriteParameterfvSGIX */
+ { 20575, -1 }, /* SpriteParameteriSGIX */
+ { 26519, -1 }, /* SpriteParameterfSGIX */
+ { 29242, -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[] = {
- { 19047, -1 }, /* TagSampleBufferSGIX */
+ { 20634, -1 }, /* TagSampleBufferSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGI_color_table)
static const struct gl_function_remap GL_SGI_color_table_functions[] = {
- { 6852, _gloffset_ColorTableParameteriv },
- { 7564, _gloffset_ColorTable },
- { 13983, _gloffset_GetColorTable },
- { 14093, _gloffset_CopyColorTable },
- { 17777, _gloffset_ColorTableParameterfv },
- { 21200, _gloffset_GetColorTableParameterfv },
- { 23176, _gloffset_GetColorTableParameteriv },
+ { 7673, _gloffset_ColorTableParameteriv },
+ { 8385, _gloffset_ColorTable },
+ { 15245, _gloffset_GetColorTable },
+ { 15355, _gloffset_CopyColorTable },
+ { 19347, _gloffset_ColorTableParameterfv },
+ { 22882, _gloffset_GetColorTableParameterfv },
+ { 24980, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_SUNX_constant_data)
static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
- { 28999, -1 }, /* FinishTextureSUNX */
+ { 31167, -1 }, /* FinishTextureSUNX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_global_alpha)
static const struct gl_function_remap GL_SUN_global_alpha_functions[] = {
- { 3035, -1 }, /* GlobalAlphaFactorubSUN */
- { 4224, -1 }, /* GlobalAlphaFactoriSUN */
- { 5789, -1 }, /* GlobalAlphaFactordSUN */
- { 8862, -1 }, /* GlobalAlphaFactoruiSUN */
- { 9214, -1 }, /* GlobalAlphaFactorbSUN */
- { 12126, -1 }, /* GlobalAlphaFactorfSUN */
- { 12245, -1 }, /* GlobalAlphaFactorusSUN */
- { 20900, -1 }, /* GlobalAlphaFactorsSUN */
+ { 3408, -1 }, /* GlobalAlphaFactorubSUN */
+ { 4818, -1 }, /* GlobalAlphaFactoriSUN */
+ { 6610, -1 }, /* GlobalAlphaFactordSUN */
+ { 9719, -1 }, /* GlobalAlphaFactoruiSUN */
+ { 10144, -1 }, /* GlobalAlphaFactorbSUN */
+ { 13239, -1 }, /* GlobalAlphaFactorfSUN */
+ { 13403, -1 }, /* GlobalAlphaFactorusSUN */
+ { 22569, -1 }, /* GlobalAlphaFactorsSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_mesh_array)
static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
- { 26978, -1 }, /* DrawMeshArraysSUN */
+ { 29033, -1 }, /* DrawMeshArraysSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_triangle_list)
static const struct gl_function_remap GL_SUN_triangle_list_functions[] = {
- { 3971, -1 }, /* ReplacementCodeubSUN */
- { 5600, -1 }, /* ReplacementCodeubvSUN */
- { 17498, -1 }, /* ReplacementCodeusvSUN */
- { 17686, -1 }, /* ReplacementCodePointerSUN */
- { 19857, -1 }, /* ReplacementCodeuiSUN */
- { 20612, -1 }, /* ReplacementCodeusSUN */
- { 27623, -1 }, /* ReplacementCodeuivSUN */
+ { 4493, -1 }, /* ReplacementCodeubSUN */
+ { 6369, -1 }, /* ReplacementCodeubvSUN */
+ { 19068, -1 }, /* ReplacementCodeusvSUN */
+ { 19256, -1 }, /* ReplacementCodePointerSUN */
+ { 21444, -1 }, /* ReplacementCodeuiSUN */
+ { 22257, -1 }, /* ReplacementCodeusSUN */
+ { 29699, -1 }, /* ReplacementCodeuivSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_vertex)
static const struct gl_function_remap GL_SUN_vertex_functions[] = {
- { 999, -1 }, /* ReplacementCodeuiColor3fVertex3fvSUN */
- { 1197, -1 }, /* TexCoord4fColor4fNormal3fVertex4fvSUN */
- { 1423, -1 }, /* TexCoord2fColor4ubVertex3fvSUN */
- { 1699, -1 }, /* ReplacementCodeuiVertex3fvSUN */
- { 1833, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */
- { 2346, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */
- { 2642, -1 }, /* Color4ubVertex3fvSUN */
- { 4105, -1 }, /* Color4ubVertex3fSUN */
- { 4181, -1 }, /* TexCoord2fVertex3fSUN */
- { 4508, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
- { 4866, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
- { 5495, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
- { 6240, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
- { 6599, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
- { 7311, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
- { 8079, -1 }, /* Color3fVertex3fSUN */
- { 9173, -1 }, /* Color3fVertex3fvSUN */
- { 9588, -1 }, /* Color4fNormal3fVertex3fvSUN */
- { 10325, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
- { 11674, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
- { 13218, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
- { 13629, -1 }, /* TexCoord2fColor3fVertex3fSUN */
- { 14759, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
- { 15093, -1 }, /* Color4ubVertex2fvSUN */
- { 15333, -1 }, /* Normal3fVertex3fSUN */
- { 16358, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
- { 16619, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
- { 17327, -1 }, /* TexCoord2fVertex3fvSUN */
- { 18103, -1 }, /* Color4ubVertex2fSUN */
- { 18324, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
- { 20282, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
- { 20680, -1 }, /* Normal3fVertex3fvSUN */
- { 21109, -1 }, /* Color4fNormal3fVertex3fSUN */
- { 22018, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
- { 24013, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
- { 25238, -1 }, /* TexCoord4fVertex4fSUN */
- { 25664, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
- { 26015, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
- { 26142, -1 }, /* TexCoord4fVertex4fvSUN */
- { 26850, -1 }, /* ReplacementCodeuiVertex3fSUN */
+ { 1115, -1 }, /* ReplacementCodeuiColor3fVertex3fvSUN */
+ { 1313, -1 }, /* TexCoord4fColor4fNormal3fVertex4fvSUN */
+ { 1539, -1 }, /* TexCoord2fColor4ubVertex3fvSUN */
+ { 1869, -1 }, /* ReplacementCodeuiVertex3fvSUN */
+ { 2003, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */
+ { 2561, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */
+ { 2874, -1 }, /* Color4ubVertex3fvSUN */
+ { 4652, -1 }, /* Color4ubVertex3fSUN */
+ { 4775, -1 }, /* TexCoord2fVertex3fSUN */
+ { 5119, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
+ { 5570, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
+ { 6264, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
+ { 7061, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 7420, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
+ { 8132, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
+ { 8936, -1 }, /* Color3fVertex3fSUN */
+ { 10080, -1 }, /* Color3fVertex3fvSUN */
+ { 10518, -1 }, /* Color4fNormal3fVertex3fvSUN */
+ { 11358, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 12787, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 14398, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 14891, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 15943, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 16358, -1 }, /* Color4ubVertex2fvSUN */
+ { 16645, -1 }, /* Normal3fVertex3fSUN */
+ { 17718, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 18079, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 18897, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 19673, -1 }, /* Color4ubVertex2fSUN */
+ { 19911, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 21893, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 22325, -1 }, /* Normal3fVertex3fvSUN */
+ { 22791, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 23771, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 25840, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 27196, -1 }, /* TexCoord4fVertex4fSUN */
+ { 27622, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 28009, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 28136, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 28870, -1 }, /* ReplacementCodeuiVertex3fSUN */
{ -1, -1 }
};
#endif
@@ -6070,40 +6408,40 @@ static const struct gl_function_remap GL_SUN_vertex_functions[] = {
#if defined(need_GL_VERSION_1_3)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_VERSION_1_3_functions[] = {
- { 381, _gloffset_MultiTexCoord3sARB },
- { 613, _gloffset_ActiveTextureARB },
- { 3761, _gloffset_MultiTexCoord1fvARB },
- { 5386, _gloffset_MultiTexCoord3dARB },
- { 5431, _gloffset_MultiTexCoord2iARB },
- { 5555, _gloffset_MultiTexCoord2svARB },
- { 7520, _gloffset_MultiTexCoord2fARB },
- { 9424, _gloffset_MultiTexCoord3fvARB },
- { 9981, _gloffset_MultiTexCoord4sARB },
- { 10615, _gloffset_MultiTexCoord2dvARB },
- { 10997, _gloffset_MultiTexCoord1svARB },
- { 11369, _gloffset_MultiTexCoord3svARB },
- { 11430, _gloffset_MultiTexCoord4iARB },
- { 12153, _gloffset_MultiTexCoord3iARB },
- { 12956, _gloffset_MultiTexCoord1dARB },
- { 13173, _gloffset_MultiTexCoord3dvARB },
- { 14337, _gloffset_MultiTexCoord3ivARB },
- { 14382, _gloffset_MultiTexCoord2sARB },
- { 15709, _gloffset_MultiTexCoord4ivARB },
- { 17427, _gloffset_ClientActiveTextureARB },
- { 19710, _gloffset_MultiTexCoord2dARB },
- { 20151, _gloffset_MultiTexCoord4dvARB },
- { 20462, _gloffset_MultiTexCoord4fvARB },
- { 21341, _gloffset_MultiTexCoord3fARB },
- { 23704, _gloffset_MultiTexCoord4dARB },
- { 23970, _gloffset_MultiTexCoord1sARB },
- { 24174, _gloffset_MultiTexCoord1dvARB },
- { 24984, _gloffset_MultiTexCoord1ivARB },
- { 25077, _gloffset_MultiTexCoord2ivARB },
- { 25416, _gloffset_MultiTexCoord1iARB },
- { 26718, _gloffset_MultiTexCoord4svARB },
- { 27236, _gloffset_MultiTexCoord1fARB },
- { 27499, _gloffset_MultiTexCoord4fARB },
- { 29826, _gloffset_MultiTexCoord2fvARB },
+ { 425, _gloffset_MultiTexCoord3sARB },
+ { 657, _gloffset_ActiveTextureARB },
+ { 4247, _gloffset_MultiTexCoord1fvARB },
+ { 6155, _gloffset_MultiTexCoord3dARB },
+ { 6200, _gloffset_MultiTexCoord2iARB },
+ { 6324, _gloffset_MultiTexCoord2svARB },
+ { 8341, _gloffset_MultiTexCoord2fARB },
+ { 10354, _gloffset_MultiTexCoord3fvARB },
+ { 10967, _gloffset_MultiTexCoord4sARB },
+ { 11648, _gloffset_MultiTexCoord2dvARB },
+ { 12063, _gloffset_MultiTexCoord1svARB },
+ { 12435, _gloffset_MultiTexCoord3svARB },
+ { 12496, _gloffset_MultiTexCoord4iARB },
+ { 13266, _gloffset_MultiTexCoord3iARB },
+ { 14136, _gloffset_MultiTexCoord1dARB },
+ { 14353, _gloffset_MultiTexCoord3dvARB },
+ { 15599, _gloffset_MultiTexCoord3ivARB },
+ { 15644, _gloffset_MultiTexCoord2sARB },
+ { 17045, _gloffset_MultiTexCoord4ivARB },
+ { 18997, _gloffset_ClientActiveTextureARB },
+ { 21297, _gloffset_MultiTexCoord2dARB },
+ { 21717, _gloffset_MultiTexCoord4dvARB },
+ { 22073, _gloffset_MultiTexCoord4fvARB },
+ { 23023, _gloffset_MultiTexCoord3fARB },
+ { 25531, _gloffset_MultiTexCoord4dARB },
+ { 25797, _gloffset_MultiTexCoord1sARB },
+ { 26001, _gloffset_MultiTexCoord1dvARB },
+ { 26942, _gloffset_MultiTexCoord1ivARB },
+ { 27035, _gloffset_MultiTexCoord2ivARB },
+ { 27374, _gloffset_MultiTexCoord1iARB },
+ { 28738, _gloffset_MultiTexCoord4svARB },
+ { 29312, _gloffset_MultiTexCoord1fARB },
+ { 29575, _gloffset_MultiTexCoord4fARB },
+ { 32039, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
#endif
@@ -6150,3 +6488,17 @@ static const struct gl_function_remap GL_VERSION_3_1_functions[] = {
};
#endif
+#if defined(need_GL_VERSION_3_2)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_3_2_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_3_3)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_3_3_functions[] = {
+ { -1, -1 }
+};
+#endif
+
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index dc8bc74787..3d1a8f8592 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1766,7 +1766,7 @@ _mesa_add_accum_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb,
/**
- * Add a software-based accumulation renderbuffer to the given framebuffer.
+ * Add a software-based aux renderbuffer to the given framebuffer.
* This is a helper routine for device drivers when creating a
* window system framebuffer (not a user-created render/framebuffer).
* Once this function is called, you can basically forget about this
@@ -1795,7 +1795,7 @@ _mesa_add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb,
assert(fb->Attachment[BUFFER_AUX0 + i].Renderbuffer == NULL);
if (!rb) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating accum buffer");
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "Allocating aux buffer");
return GL_FALSE;
}
diff --git a/src/mesa/main/renderbuffer.h b/src/mesa/main/renderbuffer.h
index 8791369dbe..62e812f93a 100644
--- a/src/mesa/main/renderbuffer.h
+++ b/src/mesa/main/renderbuffer.h
@@ -27,8 +27,8 @@
#define RENDERBUFFER_H
#include "glheader.h"
-#include "mtypes.h"
+struct gl_context;
struct gl_framebuffer;
struct gl_renderbuffer;
diff --git a/src/mesa/main/scissor.h b/src/mesa/main/scissor.h
index bd909019db..da9385e2b9 100644
--- a/src/mesa/main/scissor.h
+++ b/src/mesa/main/scissor.h
@@ -27,8 +27,9 @@
#define SCISSOR_H
-#include "main/mtypes.h"
+#include "glheader.h"
+struct gl_context;
extern void GLAPIENTRY
_mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height );
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 8ecda71928..030236e735 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -116,7 +116,12 @@ _mesa_init_shader_state(struct gl_context *ctx)
void
_mesa_free_shader_state(struct gl_context *ctx)
{
- _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentProgram, NULL);
+ _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentVertexProgram, NULL);
+ _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentGeometryProgram,
+ NULL);
+ _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentFragmentProgram,
+ NULL);
+ _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, NULL);
}
@@ -399,6 +404,14 @@ bind_attrib_location(struct gl_context *ctx, GLuint program, GLuint index,
}
+static void
+bind_frag_data_location(struct gl_context *ctx, GLuint program,
+ GLuint colorNumber, const GLchar *name)
+{
+ _mesa_problem(ctx, "bind_frag_data_location() not implemented yet");
+}
+
+
static GLuint
create_shader(struct gl_context *ctx, GLenum type)
{
@@ -600,6 +613,16 @@ get_attached_shaders(struct gl_context *ctx, GLuint program, GLsizei maxCount,
}
+static GLint
+get_frag_data_location(struct gl_context *ctx, GLuint program,
+ const GLchar *name)
+{
+ _mesa_problem(ctx, "get_frag_data_location() not implemented yet");
+ return -1;
+}
+
+
+
/**
* glGetHandleARB() - return ID/name of currently bound shader program.
*/
@@ -607,8 +630,8 @@ static GLuint
get_handle(struct gl_context *ctx, GLenum pname)
{
if (pname == GL_PROGRAM_OBJECT_ARB) {
- if (ctx->Shader.CurrentProgram)
- return ctx->Shader.CurrentProgram->Name;
+ if (ctx->Shader.ActiveProgram)
+ return ctx->Shader.ActiveProgram->Name;
else
return 0;
}
@@ -845,7 +868,10 @@ link_program(struct gl_context *ctx, GLuint program)
if (!shProg)
return;
- if (obj->Active && shProg == ctx->Shader.CurrentProgram) {
+ if (obj->Active
+ && (shProg == ctx->Shader.CurrentVertexProgram
+ || shProg == ctx->Shader.CurrentGeometryProgram
+ || shProg == ctx->Shader.CurrentFragmentProgram)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glLinkProgram(transform feedback active");
return;
@@ -908,52 +934,83 @@ print_shader_info(const struct gl_shader_program *shProg)
/**
- * Use the named shader program for subsequent rendering.
+ * Use the named shader program for subsequent glUniform calls
*/
void
-_mesa_use_program(struct gl_context *ctx, GLuint program)
+_mesa_active_program(struct gl_context *ctx, struct gl_shader_program *shProg,
+ const char *caller)
{
- struct gl_shader_program *shProg;
- struct gl_transform_feedback_object *obj =
- ctx->TransformFeedback.CurrentObject;
-
- if (obj->Active) {
+ if ((shProg != NULL) && !shProg->LinkStatus) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glUseProgram(transform feedback active)");
+ "%s(program %u not linked)", caller, shProg->Name);
return;
}
- if (ctx->Shader.CurrentProgram &&
- ctx->Shader.CurrentProgram->Name == program) {
- /* no-op */
- return;
+ if (ctx->Shader.ActiveProgram != shProg) {
+ _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, shProg);
}
+}
- if (program) {
- shProg = _mesa_lookup_shader_program_err(ctx, program, "glUseProgram");
- if (!shProg) {
- return;
+/**
+ */
+static bool
+use_shader_program(struct gl_context *ctx, GLenum type,
+ struct gl_shader_program *shProg)
+{
+ struct gl_shader_program **target;
+
+ switch (type) {
+#if FEATURE_ARB_vertex_shader
+ case GL_VERTEX_SHADER:
+ target = &ctx->Shader.CurrentVertexProgram;
+ if ((shProg == NULL)
+ || (shProg->_LinkedShaders[MESA_SHADER_VERTEX] == NULL)) {
+ shProg = NULL;
}
- if (!shProg->LinkStatus) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glUseProgram(program %u not linked)", program);
- return;
+ break;
+#endif
+#if FEATURE_ARB_geometry_shader4
+ case GL_GEOMETRY_SHADER_ARB:
+ target = &ctx->Shader.CurrentGeometryProgram;
+ if ((shProg == NULL)
+ || (shProg->_LinkedShaders[MESA_SHADER_GEOMETRY] == NULL)) {
+ shProg = NULL;
}
-
- /* debug code */
- if (ctx->Shader.Flags & GLSL_USE_PROG) {
- print_shader_info(shProg);
+ break;
+#endif
+#if FEATURE_ARB_fragment_shader
+ case GL_FRAGMENT_SHADER:
+ target = &ctx->Shader.CurrentFragmentProgram;
+ if ((shProg == NULL)
+ || (shProg->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL)) {
+ shProg = NULL;
}
- }
- else {
- shProg = NULL;
+ break;
+#endif
+ default:
+ return false;
}
- if (ctx->Shader.CurrentProgram != shProg) {
+ if (*target != shProg) {
FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
- _mesa_reference_shader_program(ctx, &ctx->Shader.CurrentProgram, shProg);
+ _mesa_reference_shader_program(ctx, target, shProg);
+ return true;
}
+ return false;
+}
+
+/**
+ * Use the named shader program for subsequent rendering.
+ */
+void
+_mesa_use_program(struct gl_context *ctx, struct gl_shader_program *shProg)
+{
+ use_shader_program(ctx, GL_VERTEX_SHADER, shProg);
+ use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB, shProg);
+ use_shader_program(ctx, GL_FRAGMENT_SHADER, shProg);
+ _mesa_active_program(ctx, shProg, "glUseProgram");
+
if (ctx->Driver.UseProgram)
ctx->Driver.UseProgram(ctx, shProg);
}
@@ -1110,6 +1167,16 @@ _mesa_BindAttribLocationARB(GLhandleARB program, GLuint index,
}
+/* GL_EXT_gpu_shader4, GL3 */
+void GLAPIENTRY
+_mesa_BindFragDataLocation(GLuint program, GLuint colorNumber,
+ const GLchar *name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ bind_frag_data_location(ctx, program, colorNumber, name);
+}
+
+
void GLAPIENTRY
_mesa_CompileShaderARB(GLhandleARB shaderObj)
{
@@ -1240,6 +1307,16 @@ _mesa_GetAttribLocationARB(GLhandleARB program, const GLcharARB * name)
}
+/* GL_EXT_gpu_shader4, GL3 */
+GLint GLAPIENTRY
+_mesa_GetFragDataLocation(GLuint program, const GLchar *name)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ return get_frag_data_location(ctx, program, name);
+}
+
+
+
void GLAPIENTRY
_mesa_GetInfoLogARB(GLhandleARB object, GLsizei maxLength, GLsizei * length,
GLcharARB * infoLog)
@@ -1501,8 +1578,37 @@ void GLAPIENTRY
_mesa_UseProgramObjectARB(GLhandleARB program)
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- _mesa_use_program(ctx, program);
+ struct gl_shader_program *shProg;
+ struct gl_transform_feedback_object *obj =
+ ctx->TransformFeedback.CurrentObject;
+
+ if (obj->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseProgram(transform feedback active)");
+ return;
+ }
+
+ if (program) {
+ shProg = _mesa_lookup_shader_program_err(ctx, program, "glUseProgram");
+ if (!shProg) {
+ return;
+ }
+ if (!shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseProgram(program %u not linked)", program);
+ return;
+ }
+
+ /* debug code */
+ if (ctx->Shader.Flags & GLSL_USE_PROG) {
+ print_shader_info(shProg);
+ }
+ }
+ else {
+ shProg = NULL;
+ }
+
+ _mesa_use_program(ctx, shProg);
}
@@ -1618,6 +1724,104 @@ _mesa_ProgramParameteriARB(GLuint program, GLenum pname,
#endif
+void
+_mesa_use_shader_program(struct gl_context *ctx, GLenum type,
+ struct gl_shader_program *shProg)
+{
+ use_shader_program(ctx, type, shProg);
+
+ if (ctx->Driver.UseProgram)
+ ctx->Driver.UseProgram(ctx, shProg);
+}
+
+void GLAPIENTRY
+_mesa_UseShaderProgramEXT(GLenum type, GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_shader_program *shProg = NULL;
+
+ if (!validate_shader_target(ctx, type)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glUseShaderProgramEXT(type)");
+ return;
+ }
+
+ if (ctx->TransformFeedback.CurrentObject->Active) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseShaderProgramEXT(transform feedback is active)");
+ return;
+ }
+
+ if (program) {
+ shProg = _mesa_lookup_shader_program_err(ctx, program,
+ "glUseShaderProgramEXT");
+ if (shProg == NULL)
+ return;
+
+ if (!shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseShaderProgramEXT(program not linked)");
+ return;
+ }
+ }
+
+ _mesa_use_shader_program(ctx, type, shProg);
+}
+
+void GLAPIENTRY
+_mesa_ActiveProgramEXT(GLuint program)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_shader_program *shProg = (program != 0)
+ ? _mesa_lookup_shader_program_err(ctx, program, "glActiveProgramEXT")
+ : NULL;
+
+ _mesa_active_program(ctx, shProg, "glActiveProgramEXT");
+ return;
+}
+
+GLuint GLAPIENTRY
+_mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ const GLuint shader = create_shader(ctx, type);
+ GLuint program = 0;
+
+ if (shader) {
+ shader_source(ctx, shader, _mesa_strdup(string));
+ compile_shader(ctx, shader);
+
+ program = create_shader_program(ctx);
+ if (program) {
+ struct gl_shader_program *shProg;
+ struct gl_shader *sh;
+ GLint compiled = GL_FALSE;
+
+ shProg = _mesa_lookup_shader_program(ctx, program);
+ sh = _mesa_lookup_shader(ctx, shader);
+
+ get_shaderiv(ctx, shader, GL_COMPILE_STATUS, &compiled);
+ if (compiled) {
+ attach_shader(ctx, program, shader);
+ link_program(ctx, program);
+ detach_shader(ctx, program, shader);
+
+#if 0
+ /* Possibly... */
+ if (active-user-defined-varyings-in-linked-program) {
+ append-error-to-info-log;
+ shProg->LinkStatus = GL_FALSE;
+ }
+#endif
+ }
+
+ shProg->InfoLog = talloc_strdup_append(shProg->InfoLog, sh->InfoLog);
+ }
+
+ delete_shader(ctx, shader);
+ }
+
+ return program;
+}
/**
* Plug in shader-related functions into API dispatch table.
@@ -1668,6 +1872,15 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec)
#if FEATURE_ARB_geometry_shader4
SET_ProgramParameteriARB(exec, _mesa_ProgramParameteriARB);
#endif
+
+ SET_UseShaderProgramEXT(exec, _mesa_UseShaderProgramEXT);
+ SET_ActiveProgramEXT(exec, _mesa_ActiveProgramEXT);
+ SET_CreateShaderProgramEXT(exec, _mesa_CreateShaderProgramEXT);
+
+ /* GL_EXT_gpu_shader4 / GL 3.0 */
+ SET_BindFragDataLocationEXT(exec, _mesa_BindFragDataLocation);
+ SET_GetFragDataLocationEXT(exec, _mesa_GetFragDataLocation);
+
#endif /* FEATURE_GL */
}
diff --git a/src/mesa/main/shaderapi.h b/src/mesa/main/shaderapi.h
index b55d7ca8b2..e4b477660d 100644
--- a/src/mesa/main/shaderapi.h
+++ b/src/mesa/main/shaderapi.h
@@ -28,8 +28,10 @@
#include "glheader.h"
-#include "mtypes.h"
+struct _glapi_table;
+struct gl_context;
+struct gl_shader_program;
extern GLint
_mesa_sizeof_glsl_type(GLenum type);
@@ -39,8 +41,11 @@ _mesa_copy_string(GLchar *dst, GLsizei maxLength,
GLsizei *length, const GLchar *src);
extern void
-_mesa_use_program(struct gl_context *ctx, GLuint program);
+_mesa_use_program(struct gl_context *ctx, struct gl_shader_program *shProg);
+extern void
+_mesa_active_program(struct gl_context *ctx, struct gl_shader_program *shProg,
+ const char *caller);
extern void
_mesa_init_shader_dispatch(struct _glapi_table *exec);
@@ -68,6 +73,9 @@ _mesa_DetachObjectARB(GLhandleARB, GLhandleARB);
extern void GLAPIENTRY
_mesa_GetAttachedObjectsARB(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
+extern GLint GLAPIENTRY
+_mesa_GetFragDataLocation(GLuint program, const GLchar *name);
+
extern GLhandleARB GLAPIENTRY
_mesa_GetHandleARB(GLenum pname);
@@ -106,6 +114,10 @@ extern void GLAPIENTRY
_mesa_BindAttribLocationARB(GLhandleARB, GLuint, const GLcharARB *);
extern void GLAPIENTRY
+_mesa_BindFragDataLocation(GLuint program, GLuint colorNumber,
+ const GLchar *name);
+
+extern void GLAPIENTRY
_mesa_GetActiveAttribARB(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *,
GLenum *, GLcharARB *);
@@ -165,5 +177,17 @@ _mesa_ShaderBinary(GLint n, const GLuint *shaders, GLenum binaryformat,
extern void GLAPIENTRY
_mesa_ProgramParameteriARB(GLuint program, GLenum pname,
GLint value);
+void
+_mesa_use_shader_program(struct gl_context *ctx, GLenum type,
+ struct gl_shader_program *shProg);
+
+extern void GLAPIENTRY
+_mesa_UseShaderProgramEXT(GLenum type, GLuint program);
+
+extern void GLAPIENTRY
+_mesa_ActiveProgramEXT(GLuint program);
+
+extern GLuint GLAPIENTRY
+_mesa_CreateShaderProgramEXT(GLenum type, const GLchar *string);
#endif /* SHADERAPI_H */
diff --git a/src/mesa/main/shaderobj.h b/src/mesa/main/shaderobj.h
index 5ea8ddc88d..346a5b7517 100644
--- a/src/mesa/main/shaderobj.h
+++ b/src/mesa/main/shaderobj.h
@@ -97,11 +97,11 @@ _mesa_init_shader_state(struct gl_context *ctx);
extern void
_mesa_free_shader_state(struct gl_context *ctx);
+
static INLINE GLuint
_mesa_shader_type_to_index(GLenum v)
{
- switch(v)
- {
+ switch (v) {
case GL_VERTEX_SHADER:
return MESA_SHADER_VERTEX;
case GL_FRAGMENT_SHADER:
@@ -109,25 +109,27 @@ _mesa_shader_type_to_index(GLenum v)
case GL_GEOMETRY_SHADER:
return MESA_SHADER_GEOMETRY;
default:
- ASSERT(0);
+ ASSERT(0 && "bad value in _mesa_shader_type_to_index()");
return ~0;
}
}
+
static INLINE GLenum
_mesa_shader_index_to_type(GLuint i)
{
- GLenum enums[MESA_SHADER_TYPES] = {
- GL_VERTEX_SHADER,
- GL_FRAGMENT_SHADER,
- GL_GEOMETRY_SHADER ,
+ static const GLenum enums[MESA_SHADER_TYPES] = {
+ GL_VERTEX_SHADER,
+ GL_FRAGMENT_SHADER,
+ GL_GEOMETRY_SHADER ,
};
- if(i >= MESA_SHADER_TYPES)
+ if (i >= MESA_SHADER_TYPES)
return 0;
else
return enums[i];
}
+
#ifdef __cplusplus
}
#endif
diff --git a/src/mesa/main/shared.h b/src/mesa/main/shared.h
index 43f8a388e6..768d69f694 100644
--- a/src/mesa/main/shared.h
+++ b/src/mesa/main/shared.h
@@ -25,7 +25,7 @@
#ifndef SHARED_H
#define SHARED_H
-#include "mtypes.h"
+struct gl_context;
struct gl_shared_state *
_mesa_alloc_shared_state(struct gl_context *ctx);
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 5529732de0..cce1b464f0 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -247,7 +247,9 @@ update_program_enables(struct gl_context *ctx)
static GLbitfield
update_program(struct gl_context *ctx)
{
- const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
+ const struct gl_shader_program *vsProg = ctx->Shader.CurrentVertexProgram;
+ const struct gl_shader_program *gsProg = ctx->Shader.CurrentGeometryProgram;
+ const struct gl_shader_program *fsProg = ctx->Shader.CurrentFragmentProgram;
const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current;
@@ -269,10 +271,10 @@ update_program(struct gl_context *ctx)
* come up, or matter.
*/
- if (shProg && shProg->LinkStatus && shProg->FragmentProgram) {
+ if (fsProg && fsProg->LinkStatus && fsProg->FragmentProgram) {
/* Use shader programs */
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
- shProg->FragmentProgram);
+ fsProg->FragmentProgram);
}
else if (ctx->FragmentProgram._Enabled) {
/* use user-defined vertex program */
@@ -292,10 +294,10 @@ update_program(struct gl_context *ctx)
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
}
- if (shProg && shProg->LinkStatus && shProg->GeometryProgram) {
+ if (gsProg && gsProg->LinkStatus && gsProg->GeometryProgram) {
/* Use shader programs */
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current,
- shProg->GeometryProgram);
+ gsProg->GeometryProgram);
} else {
/* no fragment program */
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
@@ -305,10 +307,10 @@ update_program(struct gl_context *ctx)
* _mesa_get_fixed_func_vertex_program() needs to know active
* fragprog inputs.
*/
- if (shProg && shProg->LinkStatus && shProg->VertexProgram) {
+ if (vsProg && vsProg->LinkStatus && vsProg->VertexProgram) {
/* Use shader programs */
_mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current,
- shProg->VertexProgram);
+ vsProg->VertexProgram);
}
else if (ctx->VertexProgram._Enabled) {
/* use user-defined vertex program */
@@ -481,8 +483,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
if (1/*new_state & _NEW_POINT*/) {
if (ctx->Point.SmoothFlag)
ctx->_TriangleCaps |= DD_POINT_SMOOTH;
- if (ctx->Point.Size != 1.0F)
- ctx->_TriangleCaps |= DD_POINT_SIZE;
if (ctx->Point._Attenuated)
ctx->_TriangleCaps |= DD_POINT_ATTEN;
}
@@ -495,8 +495,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
ctx->_TriangleCaps |= DD_LINE_SMOOTH;
if (ctx->Line.StippleFlag)
ctx->_TriangleCaps |= DD_LINE_STIPPLE;
- if (ctx->Line.Width != 1.0)
- ctx->_TriangleCaps |= DD_LINE_WIDTH;
}
/*
diff --git a/src/mesa/main/stencil.h b/src/mesa/main/stencil.h
index 38a7183a81..b772bfd6e6 100644
--- a/src/mesa/main/stencil.h
+++ b/src/mesa/main/stencil.h
@@ -32,8 +32,9 @@
#define STENCIL_H
-#include "mtypes.h"
+#include "glheader.h"
+struct gl_context;
extern void GLAPIENTRY
_mesa_ClearStencil( GLint s );
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 4647a9c440..a8bffe416d 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -310,9 +310,10 @@ static GLuint translate_tex_src_bit( GLbitfield bit )
static GLbitfield get_fp_input_mask( struct gl_context *ctx )
{
/* _NEW_PROGRAM */
- const GLboolean vertexShader = (ctx->Shader.CurrentProgram &&
- ctx->Shader.CurrentProgram->LinkStatus &&
- ctx->Shader.CurrentProgram->VertexProgram);
+ const GLboolean vertexShader =
+ (ctx->Shader.CurrentVertexProgram &&
+ ctx->Shader.CurrentVertexProgram->LinkStatus &&
+ ctx->Shader.CurrentVertexProgram->VertexProgram);
const GLboolean vertexProgram = ctx->VertexProgram._Enabled;
GLbitfield fp_inputs = 0x0;
@@ -377,7 +378,7 @@ static GLbitfield get_fp_input_mask( struct gl_context *ctx )
* validation (see additional comments in state.c).
*/
if (vertexShader)
- vprog = ctx->Shader.CurrentProgram->VertexProgram;
+ vprog = ctx->Shader.CurrentVertexProgram->VertexProgram;
else
vprog = ctx->VertexProgram.Current;
diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c
index aa3a6961b6..372ef2654a 100644
--- a/src/mesa/main/texfetch.c
+++ b/src/mesa/main/texfetch.c
@@ -823,17 +823,11 @@ void
_mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims)
{
ASSERT(dims == 1 || dims == 2 || dims == 3);
- ASSERT(texImage->TexFormat);
- if (!texImage->FetchTexelf) {
- texImage->FetchTexelf =
- _mesa_get_texel_fetch_func(texImage->TexFormat, dims);
- }
+ texImage->FetchTexelf =
+ _mesa_get_texel_fetch_func(texImage->TexFormat, dims);
- /* now check if we need to use a float/chan adaptor */
- if (!texImage->FetchTexelc) {
- texImage->FetchTexelc = fetch_texel_float_to_chan;
- }
+ texImage->FetchTexelc = fetch_texel_float_to_chan;
ASSERT(texImage->FetchTexelc);
ASSERT(texImage->FetchTexelf);
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 30d1062a41..879ac529a0 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -35,6 +35,7 @@
#include "context.h"
#include "formats.h"
#include "image.h"
+#include "pack.h"
#include "texgetimage.h"
#include "teximage.h"
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index bc66e5d76e..060f34b7f9 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -596,7 +596,8 @@ _mesa_free_texture_image_data(struct gl_context *ctx,
* Free the texture image structure and the associated image data.
*/
void
-_mesa_delete_texture_image( struct gl_context *ctx, struct gl_texture_image *texImage )
+_mesa_delete_texture_image(struct gl_context *ctx,
+ struct gl_texture_image *texImage)
{
/* Free texImage->Data and/or any other driver-specific texture
* image storage.
@@ -635,7 +636,8 @@ _mesa_is_proxy_texture(GLenum target)
/**
- * Get the texture object that corresponds to the target of the given texture unit.
+ * Get the texture object that corresponds to the target of the given
+ * texture unit.
*
* \param ctx GL context.
* \param texUnit texture unit.
@@ -646,7 +648,8 @@ _mesa_is_proxy_texture(GLenum target)
* \sa gl_texture_unit.
*/
struct gl_texture_object *
-_mesa_select_tex_object(struct gl_context *ctx, const struct gl_texture_unit *texUnit,
+_mesa_select_tex_object(struct gl_context *ctx,
+ const struct gl_texture_unit *texUnit,
GLenum target)
{
switch (target) {
@@ -723,7 +726,8 @@ _mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
* \return pointer to the texture image structure, or NULL on failure.
*/
struct gl_texture_image *
-_mesa_select_tex_image(struct gl_context *ctx, const struct gl_texture_object *texObj,
+_mesa_select_tex_image(struct gl_context *ctx,
+ const struct gl_texture_object *texObj,
GLenum target, GLint level)
{
const GLuint face = _mesa_tex_target_to_face(target);
@@ -883,6 +887,45 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
}
+/**
+ * Return number of dimensions per mipmap level for the given texture target.
+ */
+static GLint
+get_texture_dimensions(GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_1D:
+ case GL_PROXY_TEXTURE_1D:
+ return 1;
+ case GL_TEXTURE_2D:
+ case GL_TEXTURE_RECTANGLE:
+ case GL_TEXTURE_CUBE_MAP:
+ case GL_PROXY_TEXTURE_2D:
+ case GL_PROXY_TEXTURE_RECTANGLE:
+ case GL_PROXY_TEXTURE_CUBE_MAP:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
+ case GL_TEXTURE_1D_ARRAY:
+ case GL_PROXY_TEXTURE_1D_ARRAY:
+ return 2;
+ case GL_TEXTURE_3D:
+ case GL_PROXY_TEXTURE_3D:
+ case GL_TEXTURE_2D_ARRAY:
+ case GL_PROXY_TEXTURE_2D_ARRAY:
+ return 3;
+ default:
+ _mesa_problem(NULL, "invalid target 0x%x in get_texture_dimensions()",
+ target);
+ return 2;
+ }
+}
+
+
+
#if 000 /* not used anymore */
/*
@@ -988,6 +1031,7 @@ clear_teximage_fields(struct gl_texture_image *img)
* \param depth image depth.
* \param border image border.
* \param internalFormat internal format.
+ * \param format the actual hardware format (one of MESA_FORMAT_*)
*
* Fills in the fields of \p img with the given information.
* Note: width, height and depth include the border.
@@ -996,9 +1040,10 @@ void
_mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
- GLint border, GLenum internalFormat)
+ GLint border, GLenum internalFormat,
+ gl_format format)
{
- GLint i;
+ GLint i, dims;
ASSERT(img);
ASSERT(width >= 0);
@@ -1069,8 +1114,11 @@ _mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
img->DepthScale = (GLfloat) img->Depth;
}
- img->FetchTexelc = NULL;
- img->FetchTexelf = NULL;
+ img->TexFormat = format;
+
+ dims = get_texture_dimensions(target);
+
+ _mesa_set_fetch_functions(img, dims);
}
@@ -1084,7 +1132,8 @@ _mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
* fields are cleared so that its parent object will test incomplete.
*/
void
-_mesa_clear_texture_image(struct gl_context *ctx, struct gl_texture_image *texImage)
+_mesa_clear_texture_image(struct gl_context *ctx,
+ struct gl_texture_image *texImage)
{
ctx->Driver.FreeTexImageData(ctx, texImage);
clear_teximage_fields(texImage);
@@ -1230,14 +1279,24 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
static GLboolean
target_can_be_compressed(struct gl_context *ctx, GLenum target)
{
- return (((target == GL_TEXTURE_2D || target == GL_PROXY_TEXTURE_2D))
- || ((ctx->Extensions.ARB_texture_cube_map &&
- (target == GL_PROXY_TEXTURE_CUBE_MAP ||
- (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X &&
- target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))))
- || ((ctx->Extensions.MESA_texture_array &&
- ((target == GL_PROXY_TEXTURE_2D_ARRAY_EXT) ||
- (target == GL_TEXTURE_2D_ARRAY_EXT)))));
+ switch (target) {
+ case GL_TEXTURE_2D:
+ case GL_PROXY_TEXTURE_2D:
+ return GL_TRUE;
+ case GL_PROXY_TEXTURE_CUBE_MAP:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
+ return ctx->Extensions.ARB_texture_cube_map;
+ case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ return ctx->Extensions.MESA_texture_array;
+ default:
+ return GL_FALSE;
+ }
}
@@ -1245,12 +1304,12 @@ target_can_be_compressed(struct gl_context *ctx, GLenum target)
* Test the glTexImage[123]D() parameters for errors.
*
* \param ctx GL context.
+ * \param dimensions texture image dimensions (must be 1, 2 or 3).
* \param target texture target given by the user.
* \param level image level given by the user.
* \param internalFormat internal format given by the user.
* \param format pixel data format given by the user.
* \param type pixel data type given by the user.
- * \param dimensions texture image dimensions (must be 1, 2 or 3).
* \param width image width given by the user.
* \param height image height given by the user.
* \param depth image depth given by the user.
@@ -1259,14 +1318,14 @@ target_can_be_compressed(struct gl_context *ctx, GLenum target)
* \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
*
* Verifies each of the parameters against the constants specified in
- * __struct gl_contextRec::Const and the supported extensions, and according to the
- * OpenGL specification.
+ * __struct gl_contextRec::Const and the supported extensions, and according
+ * to the OpenGL specification.
*/
static GLboolean
-texture_error_check( struct gl_context *ctx, GLenum target,
+texture_error_check( struct gl_context *ctx,
+ GLuint dimensions, GLenum target,
GLint level, GLint internalFormat,
GLenum format, GLenum type,
- GLuint dimensions,
GLint width, GLint height,
GLint depth, GLint border )
{
@@ -1392,11 +1451,15 @@ texture_error_check( struct gl_context *ctx, GLenum target,
/* Check incoming image format and type */
if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
- /* Yes, generate GL_INVALID_OPERATION, not GL_INVALID_ENUM, if there
- * is a type/format mismatch. See 1.2 spec page 94, sec 3.6.4.
+ /* Normally, GL_INVALID_OPERATION is generated by a format/type
+ * mismatch (see the 1.2 spec page 94, sec 3.6.4.). But with the
+ * GL_EXT_texture_integer extension, some combinations should generate
+ * GL_INVALID_ENUM instead (grr!).
*/
if (!isProxy) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
+ GLenum error = _mesa_is_integer_format(format)
+ ? GL_INVALID_ENUM : GL_INVALID_OPERATION;
+ _mesa_error(ctx, error,
"glTexImage%dD(incompatible format 0x%x, type 0x%x)",
dimensions, format, type);
}
@@ -1482,6 +1545,18 @@ texture_error_check( struct gl_context *ctx, GLenum target,
}
}
+ /* additional checks for integer textures */
+ if (ctx->Extensions.EXT_texture_integer &&
+ (_mesa_is_integer_format(format) !=
+ _mesa_is_integer_format(internalFormat))) {
+ if (!isProxy) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTexImage%dD(integer/non-integer format mismatch)",
+ dimensions);
+ }
+ return GL_TRUE;
+ }
+
/* if we get here, the parameters are OK */
return GL_FALSE;
}
@@ -1506,8 +1581,8 @@ texture_error_check( struct gl_context *ctx, GLenum target,
* \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
*
* Verifies each of the parameters against the constants specified in
- * __struct gl_contextRec::Const and the supported extensions, and according to the
- * OpenGL specification.
+ * __struct gl_contextRec::Const and the supported extensions, and according
+ * to the OpenGL specification.
*/
static GLboolean
subtexture_error_check( struct gl_context *ctx, GLuint dimensions,
@@ -1588,7 +1663,12 @@ subtexture_error_check( struct gl_context *ctx, GLuint dimensions,
}
if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
- _mesa_error(ctx, GL_INVALID_ENUM,
+ /* As with the glTexImage2D check above, the error code here
+ * depends on texture integer.
+ */
+ GLenum error = _mesa_is_integer_format(format)
+ ? GL_INVALID_OPERATION : GL_INVALID_ENUM;
+ _mesa_error(ctx, error,
"glTexSubImage%dD(incompatible format 0x%x, type 0x%x)",
dimensions, format, type);
return GL_TRUE;
@@ -1701,8 +1781,8 @@ subtexture_error_check2( struct gl_context *ctx, GLuint dimensions,
* \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
*
* Verifies each of the parameters against the constants specified in
- * __struct gl_contextRec::Const and the supported extensions, and according to the
- * OpenGL specification.
+ * __struct gl_contextRec::Const and the supported extensions, and according
+ * to the OpenGL specification.
*/
static GLboolean
copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
@@ -2073,6 +2153,19 @@ copytexsubimage_error_check2( struct gl_context *ctx, GLuint dimensions,
}
}
+ /* If copying into an integer texture, the source buffer must also be
+ * integer-valued.
+ */
+ if (_mesa_is_format_integer_color(teximage->TexFormat)) {
+ struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
+ if (!_mesa_is_format_integer_color(rb->Format)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexSubImage%dD(source buffer is not integer format)",
+ dimensions);
+ return GL_TRUE;
+ }
+ }
+
/* if we get here, the parameters are OK */
return GL_FALSE;
}
@@ -2213,13 +2306,14 @@ override_internal_format(GLenum internalFormat, GLint width, GLint height)
* for efficient texture memory layout/allocation. In particular, this
* comes up during automatic mipmap generation.
*/
-void
+gl_format
_mesa_choose_texture_format(struct gl_context *ctx,
struct gl_texture_object *texObj,
- struct gl_texture_image *texImage,
GLenum target, GLint level,
GLenum internalFormat, GLenum format, GLenum type)
{
+ gl_format f;
+
/* see if we've already chosen a format for the previous level */
if (level > 0) {
struct gl_texture_image *prevImage =
@@ -2231,15 +2325,15 @@ _mesa_choose_texture_format(struct gl_context *ctx,
prevImage->Width > 0 &&
prevImage->InternalFormat == internalFormat) {
/* use the same format */
- texImage->TexFormat = prevImage->TexFormat;
- return;
+ ASSERT(prevImage->TexFormat != MESA_FORMAT_NONE);
+ return prevImage->TexFormat;
}
}
/* choose format from scratch */
- texImage->TexFormat = ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
- format, type);
- ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+ f = ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
+ ASSERT(f != MESA_FORMAT_NONE);
+ return f;
}
@@ -2270,8 +2364,8 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
struct gl_texture_image *texImage;
const GLuint face = _mesa_tex_target_to_face(target);
- if (texture_error_check(ctx, target, level, internalFormat,
- format, type, 1, width, 1, 1, border)) {
+ if (texture_error_check(ctx, 1, target, level, internalFormat,
+ format, type, width, 1, 1, border)) {
return; /* error was recorded */
}
@@ -2286,19 +2380,22 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D");
}
else {
+ gl_format texFormat;
+
if (texImage->Data) {
ctx->Driver.FreeTexImageData( ctx, texImage );
}
ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, format,
+ type);
+
_mesa_init_teximage_fields(ctx, target, texImage,
width, 1, 1,
- border, internalFormat);
-
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, format, type);
+ border, internalFormat,
+ texFormat);
/* Give the texture to the driver. <pixels> may be null. */
ASSERT(ctx->Driver.TexImage1D);
@@ -2306,10 +2403,6 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
width, border, format, type, pixels,
&ctx->Unpack, texObj, texImage);
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, 1);
-
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2325,8 +2418,8 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
/* Proxy texture: check for errors and update proxy state */
struct gl_texture_image *texImage;
texImage = _mesa_get_proxy_tex_image(ctx, target, level);
- if (texture_error_check(ctx, target, level, internalFormat,
- format, type, 1, width, 1, 1, border)) {
+ if (texture_error_check(ctx, 1, target, level, internalFormat,
+ format, type, width, 1, 1, border)) {
/* when error, clear all proxy texture image parameters */
if (texImage)
clear_teximage_fields(texImage);
@@ -2335,12 +2428,12 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
/* no error, set the tex image parameters */
struct gl_texture_object *texObj =
_mesa_get_current_tex_object(ctx, target);
- ASSERT(texImage);
- _mesa_init_teximage_fields(ctx, target, texImage,
- width, 1, 1,
- border, internalFormat);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, format, type);
+ gl_format texFormat = _mesa_choose_texture_format(ctx, texObj, target,
+ level,
+ internalFormat,
+ format, type);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
+ border, internalFormat, texFormat);
}
}
else {
@@ -2381,8 +2474,8 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
struct gl_texture_image *texImage;
const GLuint face = _mesa_tex_target_to_face(target);
- if (texture_error_check(ctx, target, level, internalFormat,
- format, type, 2, width, height, 1, border)) {
+ if (texture_error_check(ctx, 2, target, level, internalFormat,
+ format, type, width, height, 1, border)) {
return; /* error was recorded */
}
@@ -2397,18 +2490,20 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
}
else {
+ gl_format texFormat;
+
if (texImage->Data) {
ctx->Driver.FreeTexImageData( ctx, texImage );
}
ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- width, height, 1,
- border, internalFormat);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, format, type);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, format,
+ type);
+
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
+ border, internalFormat, texFormat);
/* Give the texture to the driver. <pixels> may be null. */
ASSERT(ctx->Driver.TexImage2D);
@@ -2416,10 +2511,6 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
width, height, border, format, type,
pixels, &ctx->Unpack, texObj, texImage);
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, 2);
-
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2441,8 +2532,8 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
/* Proxy texture: check for errors and update proxy state */
struct gl_texture_image *texImage;
texImage = _mesa_get_proxy_tex_image(ctx, target, level);
- if (texture_error_check(ctx, target, level, internalFormat,
- format, type, 2, width, height, 1, border)) {
+ if (texture_error_check(ctx, 2, target, level, internalFormat,
+ format, type, width, height, 1, border)) {
/* when error, clear all proxy texture image parameters */
if (texImage)
clear_teximage_fields(texImage);
@@ -2451,11 +2542,12 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
/* no error, set the tex image parameters */
struct gl_texture_object *texObj =
_mesa_get_current_tex_object(ctx, target);
- _mesa_init_teximage_fields(ctx, target, texImage,
- width, height, 1,
- border, internalFormat);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, format, type);
+ gl_format texFormat = _mesa_choose_texture_format(ctx, texObj,
+ target, level,
+ internalFormat,
+ format, type);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
+ border, internalFormat, texFormat);
}
}
else {
@@ -2495,8 +2587,8 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
struct gl_texture_image *texImage;
const GLuint face = _mesa_tex_target_to_face(target);
- if (texture_error_check(ctx, target, level, (GLint) internalFormat,
- format, type, 3, width, height, depth, border)) {
+ if (texture_error_check(ctx, 3, target, level, (GLint) internalFormat,
+ format, type, width, height, depth, border)) {
return; /* error was recorded */
}
@@ -2511,18 +2603,19 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
}
else {
+ gl_format texFormat;
+
if (texImage->Data) {
ctx->Driver.FreeTexImageData( ctx, texImage );
}
ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, format,
+ type);
_mesa_init_teximage_fields(ctx, target, texImage,
width, height, depth,
- border, internalFormat);
-
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, format, type);
+ border, internalFormat, texFormat);
/* Give the texture to the driver. <pixels> may be null. */
ASSERT(ctx->Driver.TexImage3D);
@@ -2530,10 +2623,6 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
width, height, depth, border, format, type,
pixels, &ctx->Unpack, texObj, texImage);
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, 3);
-
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2551,8 +2640,8 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
/* Proxy texture: check for errors and update proxy state */
struct gl_texture_image *texImage;
texImage = _mesa_get_proxy_tex_image(ctx, target, level);
- if (texture_error_check(ctx, target, level, internalFormat,
- format, type, 3, width, height, depth, border)) {
+ if (texture_error_check(ctx, 3, target, level, internalFormat,
+ format, type, width, height, depth, border)) {
/* when error, clear all proxy texture image parameters */
if (texImage)
clear_teximage_fields(texImage);
@@ -2561,10 +2650,12 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
/* no error, set the tex image parameters */
struct gl_texture_object *texObj =
_mesa_get_current_tex_object(ctx, target);
+ gl_format texFormat = _mesa_choose_texture_format(ctx, texObj,
+ target, level,
+ internalFormat,
+ format, type);
_mesa_init_teximage_fields(ctx, target, texImage, width, height,
- depth, border, internalFormat);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, format, type);
+ depth, border, internalFormat, texFormat);
}
}
else {
@@ -2841,27 +2932,25 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D");
}
else {
+ gl_format texFormat;
+
if (texImage->Data) {
ctx->Driver.FreeTexImageData( ctx, texImage );
}
ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
- border, internalFormat);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, GL_NONE, GL_NONE);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
+ border, internalFormat, texFormat);
ASSERT(ctx->Driver.CopyTexImage1D);
ctx->Driver.CopyTexImage1D(ctx, target, level, internalFormat,
x, y, width, border);
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, 1);
-
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -2910,28 +2999,25 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D");
}
else {
+ gl_format texFormat;
+
if (texImage->Data) {
ctx->Driver.FreeTexImageData( ctx, texImage );
}
ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- width, height, 1,
- border, internalFormat);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, GL_NONE, GL_NONE);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
+ border, internalFormat, texFormat);
ASSERT(ctx->Driver.CopyTexImage2D);
ctx->Driver.CopyTexImage2D(ctx, target, level, internalFormat,
x, y, width, height, border);
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, 2);
-
check_gen_mipmap(ctx, target, texObj, level);
update_fbo_texture(ctx, texObj, face, level);
@@ -3413,16 +3499,19 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1D");
}
else {
+ gl_format texFormat;
+
if (texImage->Data) {
ctx->Driver.FreeTexImageData( ctx, texImage );
}
ASSERT(texImage->Data == NULL);
- _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
- border, internalFormat);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, GL_NONE, GL_NONE);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
+ border, internalFormat, texFormat);
ASSERT(ctx->Driver.CompressedTexImage1D);
ctx->Driver.CompressedTexImage1D(ctx, target, level,
@@ -3430,8 +3519,6 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
imageSize, data,
texObj, texImage);
- _mesa_set_fetch_functions(texImage, 1);
-
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
@@ -3462,16 +3549,18 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
/* store the teximage parameters */
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
+ gl_format texFormat;
texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
_mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
- border, internalFormat);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, GL_NONE, GL_NONE);
+ border, internalFormat, texFormat);
}
_mesa_unlock_texture(ctx, texObj);
}
@@ -3539,16 +3628,19 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2D");
}
else {
+ gl_format texFormat;
+
if (texImage->Data) {
ctx->Driver.FreeTexImageData( ctx, texImage );
}
ASSERT(texImage->Data == NULL);
- _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
- border, internalFormat);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, GL_NONE, GL_NONE);
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
+ border, internalFormat, texFormat);
ASSERT(ctx->Driver.CompressedTexImage2D);
ctx->Driver.CompressedTexImage2D(ctx, target, level,
@@ -3556,8 +3648,6 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
border, imageSize, data,
texObj, texImage);
- _mesa_set_fetch_functions(texImage, 2);
-
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
@@ -3590,16 +3680,18 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
/* store the teximage parameters */
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
+ gl_format texFormat;
texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
_mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
- border, internalFormat);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, GL_NONE, GL_NONE);
+ border, internalFormat, texFormat);
}
_mesa_unlock_texture(ctx, texObj);
}
@@ -3646,18 +3738,20 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3D");
}
else {
+ gl_format texFormat;
+
if (texImage->Data) {
ctx->Driver.FreeTexImageData( ctx, texImage );
}
ASSERT(texImage->Data == NULL);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
+
_mesa_init_teximage_fields(ctx, target, texImage,
width, height, depth,
- border, internalFormat);
-
- /* Choose actual texture format */
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, GL_NONE, GL_NONE);
+ border, internalFormat, texFormat);
ASSERT(ctx->Driver.CompressedTexImage3D);
ctx->Driver.CompressedTexImage3D(ctx, target, level,
@@ -3666,8 +3760,6 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
border, imageSize, data,
texObj, texImage);
- _mesa_set_fetch_functions(texImage, 3);
-
check_gen_mipmap(ctx, target, texObj, level);
/* state update */
@@ -3698,16 +3790,19 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
/* store the teximage parameters */
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
+ gl_format texFormat;
texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
_mesa_init_teximage_fields(ctx, target, texImage, width, height,
- depth, border, internalFormat);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, GL_NONE, GL_NONE);
+ depth, border, internalFormat,
+ texFormat);
}
_mesa_unlock_texture(ctx, texObj);
}
@@ -3825,5 +3920,3 @@ _mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
compressed_tex_sub_image(3, target, level, xoffset, yoffset, zoffset,
width, height, depth, format, imageSize, data);
}
-
-
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index d4317c301b..5bb9d492e9 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -33,6 +33,7 @@
#include "mtypes.h"
+#include "formats.h"
extern void *
@@ -69,13 +70,13 @@ extern void
_mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
struct gl_texture_image *img,
GLsizei width, GLsizei height, GLsizei depth,
- GLint border, GLenum internalFormat);
+ GLint border, GLenum internalFormat,
+ gl_format format);
-extern void
+extern gl_format
_mesa_choose_texture_format(struct gl_context *ctx,
struct gl_texture_object *texObj,
- struct gl_texture_image *texImage,
GLenum target, GLint level,
GLenum internalFormat, GLenum format, GLenum type);
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index e08df0f7fe..72dbf10cc4 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -181,12 +181,11 @@ finish_texture_init(struct gl_context *ctx, GLenum target,
* \param texObj the texture object to delete.
*/
void
-_mesa_delete_texture_object( struct gl_context *ctx, struct gl_texture_object *texObj )
+_mesa_delete_texture_object(struct gl_context *ctx,
+ struct gl_texture_object *texObj)
{
GLuint i, face;
- (void) ctx;
-
/* Set Target to an invalid value. With some assertions elsewhere
* we can try to detect possible use of deleted textures.
*/
@@ -197,9 +196,9 @@ _mesa_delete_texture_object( struct gl_context *ctx, struct gl_texture_object *t
/* free the texture images */
for (face = 0; face < 6; face++) {
for (i = 0; i < MAX_TEXTURE_LEVELS; i++) {
- if (texObj->Image[face][i]) {
- _mesa_delete_texture_image( ctx, texObj->Image[face][i] );
- }
+ if (texObj->Image[face][i]) {
+ _mesa_delete_texture_image( ctx, texObj->Image[face][i] );
+ }
}
}
@@ -212,7 +211,6 @@ _mesa_delete_texture_object( struct gl_context *ctx, struct gl_texture_object *t
-
/**
* Copy texture object state from one texture object to another.
* Use for glPush/PopAttrib.
@@ -257,7 +255,7 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
/**
- * Clear all texture images of the given texture object.
+ * Free all texture images of the given texture object.
*
* \param ctx GL context.
* \param t texture object.
@@ -265,7 +263,8 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
* \sa _mesa_clear_texture_image().
*/
void
-_mesa_clear_texture_object(struct gl_context *ctx, struct gl_texture_object *texObj)
+_mesa_clear_texture_object(struct gl_context *ctx,
+ struct gl_texture_object *texObj)
{
GLuint i, j;
@@ -380,15 +379,20 @@ _mesa_reference_texobj(struct gl_texture_object **ptr,
*
* \note For debug purposes only.
*/
-#if 0
static void
-incomplete(const struct gl_texture_object *t, const char *why)
+incomplete(const struct gl_texture_object *t, const char *fmt, ...)
{
- printf("Texture Obj %d incomplete because: %s\n", t->Name, why);
-}
-#else
-#define incomplete(t, why)
+#if 0
+ va_list args;
+ char s[100];
+
+ va_start(args, fmt);
+ vsnprintf(s, sizeof(s), fmt, args);
+ va_end(args);
+
+ printf("Texture Obj %d incomplete because: %s\n", t->Name, s);
#endif
+}
/**
@@ -416,18 +420,14 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
* value.
*/
if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS)) {
- char s[100];
- _mesa_snprintf(s, sizeof(s), "base level = %d is invalid", baseLevel);
- incomplete(t, s);
+ incomplete(t, "base level = %d is invalid", baseLevel);
t->_Complete = GL_FALSE;
return;
}
/* Always need the base level image */
if (!t->Image[0][baseLevel]) {
- char s[100];
- _mesa_snprintf(s, sizeof(s), "Image[baseLevel=%d] == NULL", baseLevel);
- incomplete(t, s);
+ incomplete(t, "Image[baseLevel=%d] == NULL", baseLevel);
t->_Complete = GL_FALSE;
return;
}
@@ -448,7 +448,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
maxLevels = ctx->Const.MaxTextureLevels;
}
else if ((t->Target == GL_TEXTURE_2D) ||
- (t->Target == GL_TEXTURE_2D_ARRAY_EXT)) {
+ (t->Target == GL_TEXTURE_2D_ARRAY_EXT)) {
maxLog2 = MAX2(t->Image[0][baseLevel]->WidthLog2,
t->Image[0][baseLevel]->HeightLog2);
maxLevels = ctx->Const.MaxTextureLevels;
@@ -488,13 +488,13 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
const GLuint h = t->Image[0][baseLevel]->Height2;
GLuint face;
for (face = 1; face < 6; face++) {
- if (t->Image[face][baseLevel] == NULL ||
- t->Image[face][baseLevel]->Width2 != w ||
- t->Image[face][baseLevel]->Height2 != h) {
- t->_Complete = GL_FALSE;
- incomplete(t, "Cube face missing or mismatched size");
- return;
- }
+ if (t->Image[face][baseLevel] == NULL ||
+ t->Image[face][baseLevel]->Width2 != w ||
+ t->Image[face][baseLevel]->Height2 != h) {
+ t->_Complete = GL_FALSE;
+ incomplete(t, "Cube face missing or mismatched size");
+ return;
+ }
}
}
@@ -594,7 +594,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
GLuint width = t->Image[0][baseLevel]->Width2;
GLuint height = t->Image[0][baseLevel]->Height2;
GLuint depth = t->Image[0][baseLevel]->Depth2;
- for (i = baseLevel + 1; i < maxLevels; i++) {
+ for (i = baseLevel + 1; i < maxLevels; i++) {
if (width > 1) {
width /= 2;
}
@@ -640,7 +640,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
/* make sure 6 cube faces are consistant */
GLuint width = t->Image[0][baseLevel]->Width2;
GLuint height = t->Image[0][baseLevel]->Height2;
- for (i = baseLevel + 1; i < maxLevels; i++) {
+ for (i = baseLevel + 1; i < maxLevels; i++) {
if (width > 1) {
width /= 2;
}
@@ -663,8 +663,8 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
return;
}
/* check that all six images have same size */
- if (t->Image[face][i]->Width2!=width ||
- t->Image[face][i]->Height2!=height) {
+ if (t->Image[face][i]->Width2 != width ||
+ t->Image[face][i]->Height2 != height) {
t->_Complete = GL_FALSE;
incomplete(t, "CubeMap Image[n][i] bad size");
return;
@@ -719,6 +719,7 @@ _mesa_get_fallback_texture(struct gl_context *ctx)
static GLubyte texels[8 * 8][4];
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
+ gl_format texFormat;
GLuint i;
for (i = 0; i < 8 * 8; i++) {
@@ -737,12 +738,13 @@ _mesa_get_fallback_texture(struct gl_context *ctx)
/* create level[0] texture image */
texImage = _mesa_get_tex_image(ctx, texObj, GL_TEXTURE_2D, 0);
+ texFormat = ctx->Driver.ChooseTextureFormat(ctx, GL_RGBA, GL_RGBA,
+ GL_UNSIGNED_BYTE);
+
/* init the image fields */
_mesa_init_teximage_fields(ctx, GL_TEXTURE_2D, texImage,
- 8, 8, 1, 0, GL_RGBA);
+ 8, 8, 1, 0, GL_RGBA, texFormat);
- texImage->TexFormat =
- ctx->Driver.ChooseTextureFormat(ctx, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE);
ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
/* set image data */
@@ -830,7 +832,8 @@ _mesa_GenTextures( GLsizei n, GLuint *textures )
* read framebuffer. If so, Unbind it.
*/
static void
-unbind_texobj_from_fbo(struct gl_context *ctx, struct gl_texture_object *texObj)
+unbind_texobj_from_fbo(struct gl_context *ctx,
+ struct gl_texture_object *texObj)
{
const GLuint n = (ctx->DrawBuffer == ctx->ReadBuffer) ? 1 : 2;
GLuint i;
@@ -855,7 +858,8 @@ unbind_texobj_from_fbo(struct gl_context *ctx, struct gl_texture_object *texObj)
* unbind it if so (revert to default textures).
*/
static void
-unbind_texobj_from_texunits(struct gl_context *ctx, struct gl_texture_object *texObj)
+unbind_texobj_from_texunits(struct gl_context *ctx,
+ struct gl_texture_object *texObj)
{
GLuint u, tex;
@@ -903,7 +907,7 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
= _mesa_lookup_texture(ctx, textures[i]);
if (delObj) {
- _mesa_lock_texture(ctx, delObj);
+ _mesa_lock_texture(ctx, delObj);
/* Check if texture is bound to any framebuffer objects.
* If so, unbind.
@@ -916,7 +920,7 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
*/
unbind_texobj_from_texunits(ctx, delObj);
- _mesa_unlock_texture(ctx, delObj);
+ _mesa_unlock_texture(ctx, delObj);
ctx->NewState |= _NEW_TEXTURE;
@@ -1028,7 +1032,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
}
else {
/* if this is a new texture id, allocate a texture object now */
- newTexObj = (*ctx->Driver.NewTextureObject)(ctx, texName, target);
+ newTexObj = (*ctx->Driver.NewTextureObject)(ctx, texName, target);
if (!newTexObj) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindTexture");
return;
@@ -1111,6 +1115,8 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName,
ctx->NewState |= _NEW_TEXTURE;
}
+
+
/**
* See if textures are loaded in texture memory.
*
@@ -1156,23 +1162,24 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName,
if (!ctx->Driver.IsTextureResident ||
ctx->Driver.IsTextureResident(ctx, t)) {
/* The texture is resident */
- if (!allResident)
- residences[i] = GL_TRUE;
+ if (!allResident)
+ residences[i] = GL_TRUE;
}
else {
/* The texture is not resident */
if (allResident) {
- allResident = GL_FALSE;
- for (j = 0; j < i; j++)
- residences[j] = GL_TRUE;
- }
- residences[i] = GL_FALSE;
+ allResident = GL_FALSE;
+ for (j = 0; j < i; j++)
+ residences[j] = GL_TRUE;
+ }
+ residences[i] = GL_FALSE;
}
}
return allResident;
}
+
/**
* See if a name corresponds to a texture.
*
@@ -1233,5 +1240,3 @@ _mesa_unlock_context_textures( struct gl_context *ctx )
}
/*@}*/
-
-
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 1b0d760fae..f4d77189f2 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -496,23 +496,28 @@ update_texture_state( struct gl_context *ctx )
struct gl_vertex_program *vprog = NULL;
GLbitfield enabledFragUnits = 0x0;
- if (ctx->Shader.CurrentProgram &&
- ctx->Shader.CurrentProgram->LinkStatus) {
- fprog = ctx->Shader.CurrentProgram->FragmentProgram;
- vprog = ctx->Shader.CurrentProgram->VertexProgram;
+ if (ctx->Shader.CurrentVertexProgram &&
+ ctx->Shader.CurrentVertexProgram->LinkStatus) {
+ vprog = ctx->Shader.CurrentVertexProgram->VertexProgram;
+ } else if (ctx->VertexProgram._Enabled) {
+ /* XXX enable this if/when non-shader vertex programs get
+ * texture fetches:
+ vprog = ctx->VertexProgram.Current;
+ */
}
- else {
- if (ctx->FragmentProgram._Enabled) {
- fprog = ctx->FragmentProgram.Current;
- }
- if (ctx->VertexProgram._Enabled) {
- /* XXX enable this if/when non-shader vertex programs get
- * texture fetches:
- vprog = ctx->VertexProgram.Current;
- */
- }
+
+ if (ctx->Shader.CurrentFragmentProgram &&
+ ctx->Shader.CurrentFragmentProgram->LinkStatus) {
+ fprog = ctx->Shader.CurrentFragmentProgram->FragmentProgram;
+ }
+ else if (ctx->FragmentProgram._Enabled) {
+ fprog = ctx->FragmentProgram.Current;
}
+ /* FINISHME: Geometry shader texture accesses should also be considered
+ * FINISHME: here.
+ */
+
/* TODO: only set this if there are actual changes */
ctx->NewState |= _NEW_TEXTURE;
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index f5f94bbf1a..89677c519e 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -58,7 +58,9 @@
#include "image.h"
#include "macros.h"
#include "mipmap.h"
+#include "pack.h"
#include "imports.h"
+#include "pack.h"
#include "texcompress.h"
#include "texcompress_fxt1.h"
#include "texcompress_s3tc.h"
@@ -313,9 +315,9 @@ make_temp_float_image(struct gl_context *ctx, GLuint dims,
GLint srcWidth, GLint srcHeight, GLint srcDepth,
GLenum srcFormat, GLenum srcType,
const GLvoid *srcAddr,
- const struct gl_pixelstore_attrib *srcPacking)
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps)
{
- GLuint transferOps = ctx->_ImageTransferState;
GLfloat *tempImage;
const GLint components = _mesa_components_in_format(logicalBaseFormat);
const GLint srcStride =
@@ -417,6 +419,115 @@ make_temp_float_image(struct gl_context *ctx, GLuint dims,
/**
+ * Make temporary image with uint pixel values. Used for unsigned
+ * integer-valued textures.
+ */
+static GLuint *
+make_temp_uint_image(struct gl_context *ctx, GLuint dims,
+ GLenum logicalBaseFormat,
+ GLenum textureBaseFormat,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking)
+{
+ GLuint *tempImage;
+ const GLint components = _mesa_components_in_format(logicalBaseFormat);
+ const GLint srcStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ GLuint *dst;
+ GLint img, row;
+
+ ASSERT(dims >= 1 && dims <= 3);
+
+ ASSERT(logicalBaseFormat == GL_RGBA ||
+ logicalBaseFormat == GL_RGB ||
+ logicalBaseFormat == GL_RG ||
+ logicalBaseFormat == GL_RED ||
+ logicalBaseFormat == GL_LUMINANCE_ALPHA ||
+ logicalBaseFormat == GL_LUMINANCE ||
+ logicalBaseFormat == GL_INTENSITY ||
+ logicalBaseFormat == GL_ALPHA);
+
+ ASSERT(textureBaseFormat == GL_RGBA ||
+ textureBaseFormat == GL_RGB ||
+ textureBaseFormat == GL_RG ||
+ textureBaseFormat == GL_RED ||
+ textureBaseFormat == GL_LUMINANCE_ALPHA ||
+ textureBaseFormat == GL_LUMINANCE ||
+ textureBaseFormat == GL_ALPHA);
+
+ tempImage = (GLuint *) malloc(srcWidth * srcHeight * srcDepth
+ * components * sizeof(GLuint));
+ if (!tempImage)
+ return NULL;
+
+ dst = tempImage;
+ for (img = 0; img < srcDepth; img++) {
+ const GLubyte *src
+ = (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
+ for (row = 0; row < srcHeight; row++) {
+ _mesa_unpack_color_span_uint(ctx, srcWidth, logicalBaseFormat,
+ dst, srcFormat, srcType, src,
+ srcPacking);
+ dst += srcWidth * components;
+ src += srcStride;
+ }
+ }
+
+ if (logicalBaseFormat != textureBaseFormat) {
+ /* more work */
+ GLint texComponents = _mesa_components_in_format(textureBaseFormat);
+ GLint logComponents = _mesa_components_in_format(logicalBaseFormat);
+ GLuint *newImage;
+ GLint i, n;
+ GLubyte map[6];
+
+ /* we only promote up to RGB, RGBA and LUMINANCE_ALPHA formats for now */
+ ASSERT(textureBaseFormat == GL_RGB || textureBaseFormat == GL_RGBA ||
+ textureBaseFormat == GL_LUMINANCE_ALPHA);
+
+ /* The actual texture format should have at least as many components
+ * as the logical texture format.
+ */
+ ASSERT(texComponents >= logComponents);
+
+ newImage = (GLuint *) malloc(srcWidth * srcHeight * srcDepth
+ * texComponents * sizeof(GLuint));
+ if (!newImage) {
+ free(tempImage);
+ return NULL;
+ }
+
+ compute_component_mapping(logicalBaseFormat, textureBaseFormat, map);
+
+ n = srcWidth * srcHeight * srcDepth;
+ for (i = 0; i < n; i++) {
+ GLint k;
+ for (k = 0; k < texComponents; k++) {
+ GLint j = map[k];
+ if (j == ZERO)
+ newImage[i * texComponents + k] = 0.0F;
+ else if (j == ONE)
+ newImage[i * texComponents + k] = 1.0F;
+ else
+ newImage[i * texComponents + k] = tempImage[i * logComponents + j];
+ }
+ }
+
+ free(tempImage);
+ tempImage = newImage;
+ }
+
+ return tempImage;
+}
+
+
+
+/**
* Make a temporary (color) texture image with GLchan components.
* Apply all needed pixel unpacking and pixel transfer operations.
* Note that there are both logicalBaseFormat and textureBaseFormat parameters.
@@ -2083,7 +2194,8 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *src = tempImage;
GLint img, row, col;
if (!tempImage)
@@ -2157,7 +2269,8 @@ _mesa_texstore_r16(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *src = tempImage;
GLint img, row, col;
if (!tempImage)
@@ -2214,7 +2327,8 @@ _mesa_texstore_rgba_16(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *src = tempImage;
GLint img, row, col;
if (!tempImage)
@@ -2280,7 +2394,8 @@ _mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *src = tempImage;
const GLuint comps = _mesa_get_format_bytes(dstFormat) / 2;
GLint img, row, col;
@@ -2661,7 +2776,8 @@ _mesa_texstore_signed_r8(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *srcRow = tempImage;
GLint img, row, col;
if (!tempImage)
@@ -2705,7 +2821,8 @@ _mesa_texstore_signed_rg88(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *srcRow = tempImage;
GLint img, row, col;
if (!tempImage)
@@ -2749,7 +2866,8 @@ _mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *srcRow = tempImage;
GLint img, row, col;
if (!tempImage)
@@ -2861,7 +2979,8 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *srcRow = tempImage;
GLint img, row, col;
if (!tempImage)
@@ -3169,7 +3288,8 @@ _mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *srcRow = tempImage;
GLint bytesPerRow;
GLint img, row;
@@ -3238,7 +3358,8 @@ _mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking,
+ ctx->_ImageTransferState);
const GLfloat *src = tempImage;
GLint img, row;
if (!tempImage)
@@ -3282,8 +3403,10 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
baseInternalFormat == GL_INTENSITY);
ASSERT(texelBytes == components * sizeof(GLbyte));
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
baseInternalFormat == srcFormat &&
srcType == GL_BYTE) {
/* simple memcpy path */
@@ -3301,7 +3424,7 @@ _mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking, 0x0);
const GLfloat *src = tempImage;
GLint img, row;
if (!tempImage)
@@ -3345,10 +3468,12 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
baseInternalFormat == GL_INTENSITY);
ASSERT(texelBytes == components * sizeof(GLshort));
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
baseInternalFormat == srcFormat &&
- srcType == GL_INT) {
+ srcType == GL_SHORT) {
/* simple memcpy path */
memcpy_texture(ctx, dims,
dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
@@ -3364,7 +3489,7 @@ _mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking, 0x0);
const GLfloat *src = tempImage;
GLint img, row;
if (!tempImage)
@@ -3408,8 +3533,10 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
baseInternalFormat == GL_INTENSITY);
ASSERT(texelBytes == components * sizeof(GLint));
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
baseInternalFormat == srcFormat &&
srcType == GL_INT) {
/* simple memcpy path */
@@ -3427,7 +3554,7 @@ _mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
baseFormat,
srcWidth, srcHeight, srcDepth,
srcFormat, srcType, srcAddr,
- srcPacking);
+ srcPacking, 0x0);
const GLfloat *src = tempImage;
GLint img, row;
if (!tempImage)
@@ -3471,8 +3598,10 @@ _mesa_texstore_rgba_uint8(TEXSTORE_PARAMS)
baseInternalFormat == GL_INTENSITY);
ASSERT(texelBytes == components * sizeof(GLubyte));
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
baseInternalFormat == srcFormat &&
srcType == GL_UNSIGNED_BYTE) {
/* simple memcpy path */
@@ -3485,13 +3614,11 @@ _mesa_texstore_rgba_uint8(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
- baseInternalFormat,
- baseFormat,
- srcWidth, srcHeight, srcDepth,
- srcFormat, srcType, srcAddr,
- srcPacking);
- const GLfloat *src = tempImage;
+ const GLuint *tempImage =
+ make_temp_uint_image(ctx, dims, baseInternalFormat, baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr, srcPacking);
+ const GLuint *src = tempImage;
GLint img, row;
if (!tempImage)
return GL_FALSE;
@@ -3504,7 +3631,7 @@ _mesa_texstore_rgba_uint8(TEXSTORE_PARAMS)
GLubyte *dstTexel = (GLubyte *) dstRow;
GLint i;
for (i = 0; i < srcWidth * components; i++) {
- dstTexel[i] = (GLubyte) src[i];
+ dstTexel[i] = (GLubyte) CLAMP(src[i], 0, 0xff);
}
dstRow += dstRowStride;
src += srcWidth * components;
@@ -3534,8 +3661,10 @@ _mesa_texstore_rgba_uint16(TEXSTORE_PARAMS)
baseInternalFormat == GL_INTENSITY);
ASSERT(texelBytes == components * sizeof(GLushort));
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
baseInternalFormat == srcFormat &&
srcType == GL_UNSIGNED_SHORT) {
/* simple memcpy path */
@@ -3548,13 +3677,11 @@ _mesa_texstore_rgba_uint16(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
- baseInternalFormat,
- baseFormat,
- srcWidth, srcHeight, srcDepth,
- srcFormat, srcType, srcAddr,
- srcPacking);
- const GLfloat *src = tempImage;
+ const GLuint *tempImage =
+ make_temp_uint_image(ctx, dims, baseInternalFormat, baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr, srcPacking);
+ const GLuint *src = tempImage;
GLint img, row;
if (!tempImage)
return GL_FALSE;
@@ -3567,7 +3694,7 @@ _mesa_texstore_rgba_uint16(TEXSTORE_PARAMS)
GLushort *dstTexel = (GLushort *) dstRow;
GLint i;
for (i = 0; i < srcWidth * components; i++) {
- dstTexel[i] = (GLushort) src[i];
+ dstTexel[i] = (GLushort) CLAMP(src[i], 0, 0xffff);
}
dstRow += dstRowStride;
src += srcWidth * components;
@@ -3597,8 +3724,10 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
baseInternalFormat == GL_INTENSITY);
ASSERT(texelBytes == components * sizeof(GLuint));
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
baseInternalFormat == srcFormat &&
srcType == GL_UNSIGNED_INT) {
/* simple memcpy path */
@@ -3611,13 +3740,11 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
}
else {
/* general path */
- const GLfloat *tempImage = make_temp_float_image(ctx, dims,
- baseInternalFormat,
- baseFormat,
- srcWidth, srcHeight, srcDepth,
- srcFormat, srcType, srcAddr,
- srcPacking);
- const GLfloat *src = tempImage;
+ const GLuint *tempImage =
+ make_temp_uint_image(ctx, dims, baseInternalFormat, baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr, srcPacking);
+ const GLuint *src = tempImage;
GLint img, row;
if (!tempImage)
return GL_FALSE;
@@ -3630,7 +3757,7 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
GLuint *dstTexel = (GLuint *) dstRow;
GLint i;
for (i = 0; i < srcWidth * components; i++) {
- dstTexel[i] = (GLuint) src[i];
+ dstTexel[i] = src[i];
}
dstRow += dstRowStride;
src += srcWidth * components;
@@ -3953,14 +4080,14 @@ _mesa_validate_pbo_teximage(struct gl_context *ctx, GLuint dimensions,
}
if (!_mesa_validate_pbo_access(dimensions, unpack, width, height, depth,
format, type, pixels)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access");
+ _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access)");
return NULL;
}
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
GL_READ_ONLY_ARB, unpack->BufferObj);
if (!buf) {
- _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(PBO is mapped");
+ _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(PBO is mapped)");
return NULL;
}
@@ -3990,7 +4117,7 @@ _mesa_validate_pbo_compressed_teximage(struct gl_context *ctx,
if ((const GLubyte *) pixels + imageSize >
((const GLubyte *) 0) + packing->BufferObj->Size) {
/* out of bounds read! */
- _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access");
+ _mesa_error(ctx, GL_INVALID_OPERATION, funcName, "(invalid PBO access)");
return NULL;
}
@@ -4321,7 +4448,8 @@ _mesa_store_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level,
* Fallback for Driver.CompressedTexImage1D()
*/
void
-_mesa_store_compressed_teximage1d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage1d(struct gl_context *ctx,
+ GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -4344,7 +4472,8 @@ _mesa_store_compressed_teximage1d(struct gl_context *ctx, GLenum target, GLint l
* Fallback for Driver.CompressedTexImage2D()
*/
void
-_mesa_store_compressed_teximage2d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage2d(struct gl_context *ctx,
+ GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
GLsizei imageSize, const GLvoid *data,
@@ -4388,7 +4517,8 @@ _mesa_store_compressed_teximage2d(struct gl_context *ctx, GLenum target, GLint l
* Fallback for Driver.CompressedTexImage3D()
*/
void
-_mesa_store_compressed_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage3d(struct gl_context *ctx,
+ GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint depth,
GLint border,
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 9359db1892..d61856d0eb 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -682,6 +682,40 @@ _mesa_get_uniformiv(struct gl_context *ctx, GLuint program, GLint location,
/**
+ * Called via glGetUniformuiv().
+ * New in GL_EXT_gpu_shader4, OpenGL 3.0
+ * \sa _mesa_get_uniformfv, only difference is a cast.
+ */
+static void
+_mesa_get_uniformuiv(struct gl_context *ctx, GLuint program, GLint location,
+ GLuint *params)
+{
+ struct gl_program *prog;
+ GLint paramPos;
+ GLint offset;
+
+ split_location_offset(&location, &offset);
+
+ lookup_uniform_parameter(ctx, program, location, &prog, &paramPos);
+
+ if (prog) {
+ const struct gl_program_parameter *p =
+ &prog->Parameters->Parameters[paramPos];
+ GLint rows, cols, i, j, k;
+
+ get_uniform_rows_cols(p, &rows, &cols);
+
+ k = 0;
+ for (i = 0; i < rows; i++) {
+ for (j = 0; j < cols; j++ ) {
+ params[k++] = (GLuint) prog->Parameters->ParameterValues[paramPos+i][j];
+ }
+ }
+ }
+}
+
+
+/**
* Called via glGetUniformLocation().
*
* The return value will encode two values, the uniform location and an
@@ -1227,7 +1261,7 @@ void GLAPIENTRY
_mesa_Uniform1fARB(GLint location, GLfloat v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, &v0, GL_FLOAT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_FLOAT);
}
void GLAPIENTRY
@@ -1237,7 +1271,7 @@ _mesa_Uniform2fARB(GLint location, GLfloat v0, GLfloat v1)
GLfloat v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_FLOAT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC2);
}
void GLAPIENTRY
@@ -1248,7 +1282,7 @@ _mesa_Uniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_FLOAT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC3);
}
void GLAPIENTRY
@@ -1261,14 +1295,14 @@ _mesa_Uniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_FLOAT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1iARB(GLint location, GLint v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, &v0, GL_INT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_INT);
}
void GLAPIENTRY
@@ -1278,7 +1312,7 @@ _mesa_Uniform2iARB(GLint location, GLint v0, GLint v1)
GLint v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_INT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC2);
}
void GLAPIENTRY
@@ -1289,7 +1323,7 @@ _mesa_Uniform3iARB(GLint location, GLint v0, GLint v1, GLint v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_INT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC3);
}
void GLAPIENTRY
@@ -1301,63 +1335,63 @@ _mesa_Uniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_INT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT);
}
void GLAPIENTRY
_mesa_Uniform2fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4fvARB(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_FLOAT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT);
}
void GLAPIENTRY
_mesa_Uniform2ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4ivARB(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_INT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC4);
}
@@ -1366,7 +1400,7 @@ void GLAPIENTRY
_mesa_Uniform1ui(GLint location, GLuint v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, &v0, GL_UNSIGNED_INT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT);
}
void GLAPIENTRY
@@ -1376,7 +1410,7 @@ _mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1)
GLuint v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
}
void GLAPIENTRY
@@ -1387,7 +1421,7 @@ _mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
}
void GLAPIENTRY
@@ -1399,35 +1433,35 @@ _mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT);
}
void GLAPIENTRY
_mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.CurrentProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
+ _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
}
@@ -1437,7 +1471,7 @@ _mesa_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
2, 2, location, count, transpose, value);
}
@@ -1446,7 +1480,7 @@ _mesa_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
3, 3, location, count, transpose, value);
}
@@ -1455,7 +1489,7 @@ _mesa_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
4, 4, location, count, transpose, value);
}
@@ -1468,7 +1502,7 @@ _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
2, 3, location, count, transpose, value);
}
@@ -1477,7 +1511,7 @@ _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
3, 2, location, count, transpose, value);
}
@@ -1486,7 +1520,7 @@ _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
2, 4, location, count, transpose, value);
}
@@ -1495,7 +1529,7 @@ _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
4, 2, location, count, transpose, value);
}
@@ -1504,7 +1538,7 @@ _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
3, 4, location, count, transpose, value);
}
@@ -1513,7 +1547,7 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.CurrentProgram,
+ _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
4, 3, location, count, transpose, value);
}
@@ -1534,6 +1568,16 @@ _mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint *params)
}
+/* GL3 */
+void GLAPIENTRY
+_mesa_GetUniformuiv(GLhandleARB program, GLint location, GLuint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_get_uniformuiv(ctx, program, location, params);
+}
+
+
+
GLint GLAPIENTRY
_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
{
@@ -1603,13 +1647,16 @@ _mesa_init_shader_uniform_dispatch(struct _glapi_table *exec)
/* OpenGL 3.0 */
/* XXX finish dispatch */
- (void) _mesa_Uniform1ui;
- (void) _mesa_Uniform2ui;
- (void) _mesa_Uniform3ui;
- (void) _mesa_Uniform4ui;
- (void) _mesa_Uniform1uiv;
- (void) _mesa_Uniform2uiv;
- (void) _mesa_Uniform3uiv;
- (void) _mesa_Uniform4uiv;
+ SET_Uniform1uiEXT(exec, _mesa_Uniform1ui);
+ SET_Uniform2uiEXT(exec, _mesa_Uniform2ui);
+ SET_Uniform3uiEXT(exec, _mesa_Uniform3ui);
+ SET_Uniform4uiEXT(exec, _mesa_Uniform4ui);
+ SET_Uniform1uivEXT(exec, _mesa_Uniform1uiv);
+ SET_Uniform2uivEXT(exec, _mesa_Uniform2uiv);
+ SET_Uniform3uivEXT(exec, _mesa_Uniform3uiv);
+ SET_Uniform4uivEXT(exec, _mesa_Uniform4uiv);
+ SET_GetUniformuivEXT(exec, _mesa_GetUniformuiv);
+
+
#endif /* FEATURE_GL */
}
diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h
index 6447436305..54abb08ba5 100644
--- a/src/mesa/main/uniforms.h
+++ b/src/mesa/main/uniforms.h
@@ -148,6 +148,9 @@ _mesa_GetUniformfvARB(GLhandleARB, GLint, GLfloat *);
extern void GLAPIENTRY
_mesa_GetUniformivARB(GLhandleARB, GLint, GLint *);
+extern void GLAPIENTRY
+_mesa_GetUniformuiv(GLhandleARB program, GLint location, GLuint *params);
+
extern GLint GLAPIENTRY
_mesa_GetUniformLocationARB(GLhandleARB, const GLcharARB *);
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 56749355cd..340c3fe1d3 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -31,6 +31,7 @@
#include "enable.h"
#include "enums.h"
#include "hash.h"
+#include "image.h"
#include "macros.h"
#include "mtypes.h"
#include "varray.h"
@@ -38,39 +39,143 @@
#include "main/dispatch.h"
+/** Used to do error checking for GL_EXT_vertex_array_bgra */
+#define BGRA_OR_4 5
+
+
+/** Used to indicate which GL datatypes are accepted by each of the
+ * glVertex/Color/Attrib/EtcPointer() functions.
+ */
+#define BOOL_BIT 0x1
+#define BYTE_BIT 0x2
+#define UNSIGNED_BYTE_BIT 0x4
+#define SHORT_BIT 0x8
+#define UNSIGNED_SHORT_BIT 0x10
+#define INT_BIT 0x20
+#define UNSIGNED_INT_BIT 0x40
+#define HALF_BIT 0x80
+#define FLOAT_BIT 0x100
+#define DOUBLE_BIT 0x200
+#define FIXED_BIT 0x400
+
+
+
+/** Convert GL datatype enum into a <type>_BIT value seen above */
+static GLbitfield
+type_to_bit(const struct gl_context *ctx, GLenum type)
+{
+ switch (type) {
+ case GL_BOOL:
+ return BOOL_BIT;
+ case GL_BYTE:
+ return BYTE_BIT;
+ case GL_UNSIGNED_BYTE:
+ return UNSIGNED_BYTE_BIT;
+ case GL_SHORT:
+ return SHORT_BIT;
+ case GL_UNSIGNED_SHORT:
+ return UNSIGNED_SHORT_BIT;
+ case GL_INT:
+ return INT_BIT;
+ case GL_UNSIGNED_INT:
+ return UNSIGNED_INT_BIT;
+ case GL_HALF_FLOAT:
+ if (ctx->Extensions.ARB_half_float_vertex)
+ return HALF_BIT;
+ else
+ return 0x0;
+ case GL_FLOAT:
+ return FLOAT_BIT;
+ case GL_DOUBLE:
+ return DOUBLE_BIT;
+ case GL_FIXED:
+ return FIXED_BIT;
+ default:
+ return 0;
+ }
+}
+
+
/**
- * Set the fields of a vertex array.
- * Also do an error check for GL_ARB_vertex_array_object: check that
- * all arrays reside in VBOs when using a vertex array object.
+ * Do error checking and update state for glVertex/Color/TexCoord/...Pointer
+ * functions.
*
+ * \param func name of calling function used for error reporting
* \param array the array to update
* \param dirtyBit which bit to set in ctx->Array.NewState for this array
- * \param elementSize size of each array element, in bytes
+ * \param legalTypes bitmask of *_BIT above indicating legal datatypes
+ * \param sizeMin min allowable size value
+ * \param sizeMax max allowable size value (may also be BGRA_OR_4)
* \param size components per element (1, 2, 3 or 4)
* \param type datatype of each component (GL_FLOAT, GL_INT, etc)
- * \param format either GL_RGBA or GL_BGRA
* \param stride stride between elements, in elements
* \param normalized are integer types converted to floats in [-1, 1]?
+ * \param integer integer-valued values (will not be normalized to [-1,1])
* \param ptr the address (or offset inside VBO) of the array data
*/
static void
-update_array(struct gl_context *ctx, struct gl_client_array *array,
- GLbitfield dirtyBit, GLsizei elementSize,
- GLint size, GLenum type, GLenum format,
- GLsizei stride, GLboolean normalized, const GLvoid *ptr)
+update_array(struct gl_context *ctx,
+ const char *func,
+ struct gl_client_array *array,
+ GLbitfield dirtyBit, GLbitfield legalTypesMask,
+ GLint sizeMin, GLint sizeMax,
+ GLint size, GLenum type, GLsizei stride,
+ GLboolean normalized, GLboolean integer,
+ const GLvoid *ptr)
{
- ASSERT(format == GL_RGBA || format == GL_BGRA);
+ GLbitfield typeBit;
+ GLsizei elementSize;
+ GLenum format = GL_RGBA;
+
+ if (ctx->API != API_OPENGLES) {
+ /* fixed point arrays / data is only allowed with OpenGL ES 1.x */
+ legalTypesMask &= ~FIXED_BIT;
+ }
+
+ typeBit = type_to_bit(ctx, type);
+ if (typeBit == 0x0 || (typeBit & legalTypesMask) == 0x0) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(type = %s)",
+ func, _mesa_lookup_enum_by_nr(type));
+ return;
+ }
+
+ /* Do size parameter checking.
+ * If sizeMax = BGRA_OR_4 it means that size = GL_BGRA is legal and
+ * must be handled specially.
+ */
+ if (ctx->Extensions.EXT_vertex_array_bgra &&
+ sizeMax == BGRA_OR_4 &&
+ size == GL_BGRA) {
+ if (type != GL_UNSIGNED_BYTE) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(GL_BGRA/GLubyte)", func);
+ return;
+ }
+ format = GL_BGRA;
+ size = 4;
+ }
+ else if (size < sizeMin || size > sizeMax || size > 4) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(size=%d)", func, size);
+ return;
+ }
+
+ ASSERT(size <= 4);
+
+ if (stride < 0) {
+ _mesa_error( ctx, GL_INVALID_VALUE, "%s(stride=%d)", func, stride );
+ return;
+ }
if (ctx->Array.ArrayObj->VBOonly &&
ctx->Array.ArrayBufferObj->Name == 0) {
/* GL_ARB_vertex_array_object requires that all arrays reside in VBOs.
* Generate GL_INVALID_OPERATION if that's not true.
*/
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glVertex/Normal/EtcPointer(non-VBO array)");
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(non-VBO array)", func);
return;
}
+ elementSize = _mesa_sizeof_type(type) * size;
+
array->Size = size;
array->Type = type;
array->Format = format;
@@ -91,258 +196,81 @@ update_array(struct gl_context *ctx, struct gl_client_array *array,
void GLAPIENTRY
_mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
{
- GLsizei elementSize;
+ GLbitfield legalTypes = (SHORT_BIT | INT_BIT | FLOAT_BIT |
+ DOUBLE_BIT | HALF_BIT | FIXED_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (size < 2 || size > 4) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glVertexPointer(size)" );
- return;
- }
- if (stride < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glVertexPointer(stride)" );
- return;
- }
+ if (ctx->API == API_OPENGLES)
+ legalTypes |= BYTE_BIT;
- if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- _mesa_debug(ctx, "glVertexPointer( sz %d type %s stride %d )\n", size,
- _mesa_lookup_enum_by_nr( type ), stride);
-
- /* always need to check that <type> is legal */
- switch (type) {
- case GL_SHORT:
- elementSize = size * sizeof(GLshort);
- break;
- case GL_INT:
- elementSize = size * sizeof(GLint);
- break;
- case GL_FLOAT:
- elementSize = size * sizeof(GLfloat);
- break;
- case GL_DOUBLE:
- elementSize = size * sizeof(GLdouble);
- break;
- case GL_HALF_FLOAT:
- elementSize = size * sizeof(GLhalfARB);
- break;
-#if FEATURE_fixedpt
- case GL_FIXED:
- elementSize = size * sizeof(GLfixed);
- break;
-#endif
-#if FEATURE_vertex_array_byte
- case GL_BYTE:
- elementSize = size * sizeof(GLbyte);
- break;
-#endif
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glVertexPointer(type=%s)",
- _mesa_lookup_enum_by_nr(type));
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->Vertex, _NEW_ARRAY_VERTEX,
- elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr);
+ update_array(ctx, "glVertexPointer",
+ &ctx->Array.ArrayObj->Vertex, _NEW_ARRAY_VERTEX,
+ legalTypes, 2, 4,
+ size, type, stride, GL_FALSE, GL_FALSE, ptr);
}
void GLAPIENTRY
_mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
{
- GLsizei elementSize;
+ const GLbitfield legalTypes = (BYTE_BIT | SHORT_BIT | INT_BIT |
+ HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
+ FIXED_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (stride < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glNormalPointer(stride)" );
- return;
- }
-
- if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- _mesa_debug(ctx, "glNormalPointer( type %s stride %d )\n",
- _mesa_lookup_enum_by_nr( type ), stride);
-
- switch (type) {
- case GL_BYTE:
- elementSize = 3 * sizeof(GLbyte);
- break;
- case GL_SHORT:
- elementSize = 3 * sizeof(GLshort);
- break;
- case GL_INT:
- elementSize = 3 * sizeof(GLint);
- break;
- case GL_FLOAT:
- elementSize = 3 * sizeof(GLfloat);
- break;
- case GL_DOUBLE:
- elementSize = 3 * sizeof(GLdouble);
- break;
- case GL_HALF_FLOAT:
- elementSize = 3 * sizeof(GLhalfARB);
- break;
-#if FEATURE_fixedpt
- case GL_FIXED:
- elementSize = 3 * sizeof(GLfixed);
- break;
-#endif
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glNormalPointer(type=%s)",
- _mesa_lookup_enum_by_nr(type));
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->Normal, _NEW_ARRAY_NORMAL,
- elementSize, 3, type, GL_RGBA, stride, GL_TRUE, ptr);
+ update_array(ctx, "glNormalPointer",
+ &ctx->Array.ArrayObj->Normal, _NEW_ARRAY_NORMAL,
+ legalTypes, 3, 3,
+ 3, type, stride, GL_TRUE, GL_FALSE, ptr);
}
void GLAPIENTRY
_mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
{
- GLsizei elementSize;
- GLenum format;
+ const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT |
+ SHORT_BIT | UNSIGNED_SHORT_BIT |
+ INT_BIT | UNSIGNED_INT_BIT |
+ HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
+ FIXED_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (size < 3 || size > 4) {
- if (!ctx->Extensions.EXT_vertex_array_bgra || size != GL_BGRA) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glColorPointer(size)");
- return;
- }
- }
- if (stride < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glColorPointer(stride)" );
- return;
- }
-
- if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- _mesa_debug(ctx, "glColorPointer( sz %d type %s stride %d )\n", size,
- _mesa_lookup_enum_by_nr( type ), stride);
-
- if (size == GL_BGRA) {
- if (type != GL_UNSIGNED_BYTE) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glColorPointer(GL_BGRA/GLubyte)");
- return;
- }
- format = GL_BGRA;
- size = 4;
- }
- else {
- format = GL_RGBA;
- }
-
- switch (type) {
- case GL_BYTE:
- elementSize = size * sizeof(GLbyte);
- break;
- case GL_UNSIGNED_BYTE:
- elementSize = size * sizeof(GLubyte);
- break;
- case GL_SHORT:
- elementSize = size * sizeof(GLshort);
- break;
- case GL_UNSIGNED_SHORT:
- elementSize = size * sizeof(GLushort);
- break;
- case GL_INT:
- elementSize = size * sizeof(GLint);
- break;
- case GL_UNSIGNED_INT:
- elementSize = size * sizeof(GLuint);
- break;
- case GL_FLOAT:
- elementSize = size * sizeof(GLfloat);
- break;
- case GL_DOUBLE:
- elementSize = size * sizeof(GLdouble);
- break;
- case GL_HALF_FLOAT:
- elementSize = size * sizeof(GLhalfARB);
- break;
-#if FEATURE_fixedpt
- case GL_FIXED:
- elementSize = size * sizeof(GLfixed);
- break;
-#endif
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glColorPointer(type=%s)",
- _mesa_lookup_enum_by_nr(type));
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->Color, _NEW_ARRAY_COLOR0,
- elementSize, size, type, format, stride, GL_TRUE, ptr);
+ update_array(ctx, "glColorPointer",
+ &ctx->Array.ArrayObj->Color, _NEW_ARRAY_COLOR0,
+ legalTypes, 3, BGRA_OR_4,
+ size, type, stride, GL_TRUE, GL_FALSE, ptr);
}
void GLAPIENTRY
_mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
{
- GLint elementSize;
+ const GLbitfield legalTypes = (HALF_BIT | FLOAT_BIT | DOUBLE_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (stride < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glFogCoordPointer(stride)" );
- return;
- }
-
- switch (type) {
- case GL_FLOAT:
- elementSize = sizeof(GLfloat);
- break;
- case GL_DOUBLE:
- elementSize = sizeof(GLdouble);
- break;
- case GL_HALF_FLOAT:
- elementSize = sizeof(GLhalfARB);
- break;
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glFogCoordPointer(type)" );
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->FogCoord, _NEW_ARRAY_FOGCOORD,
- elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr);
+ update_array(ctx, "glFogCoordPointer",
+ &ctx->Array.ArrayObj->FogCoord, _NEW_ARRAY_FOGCOORD,
+ legalTypes, 1, 1,
+ 1, type, stride, GL_FALSE, GL_FALSE, ptr);
}
void GLAPIENTRY
_mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
{
- GLsizei elementSize;
+ const GLbitfield legalTypes = (UNSIGNED_BYTE_BIT | SHORT_BIT | INT_BIT |
+ FLOAT_BIT | DOUBLE_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (stride < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glIndexPointer(stride)" );
- return;
- }
-
- switch (type) {
- case GL_UNSIGNED_BYTE:
- elementSize = sizeof(GLubyte);
- break;
- case GL_SHORT:
- elementSize = sizeof(GLshort);
- break;
- case GL_INT:
- elementSize = sizeof(GLint);
- break;
- case GL_FLOAT:
- elementSize = sizeof(GLfloat);
- break;
- case GL_DOUBLE:
- elementSize = sizeof(GLdouble);
- break;
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glIndexPointer(type)" );
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->Index, _NEW_ARRAY_INDEX,
- elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr);
+ update_array(ctx, "glIndexPointer",
+ &ctx->Array.ArrayObj->Index, _NEW_ARRAY_INDEX,
+ legalTypes, 1, 1,
+ 1, type, stride, GL_FALSE, GL_FALSE, ptr);
}
@@ -350,74 +278,17 @@ void GLAPIENTRY
_mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
GLsizei stride, const GLvoid *ptr)
{
- GLsizei elementSize;
- GLenum format;
+ const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT |
+ SHORT_BIT | UNSIGNED_SHORT_BIT |
+ INT_BIT | UNSIGNED_INT_BIT |
+ HALF_BIT | FLOAT_BIT | DOUBLE_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (size != 3 && size != 4) {
- if (!ctx->Extensions.EXT_vertex_array_bgra || size != GL_BGRA) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glSecondaryColorPointer(size)");
- return;
- }
- }
- if (stride < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glSecondaryColorPointer(stride)" );
- return;
- }
-
- if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- _mesa_debug(ctx, "glSecondaryColorPointer( sz %d type %s stride %d )\n",
- size, _mesa_lookup_enum_by_nr( type ), stride);
-
- if (size == GL_BGRA) {
- if (type != GL_UNSIGNED_BYTE) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glColorPointer(GL_BGRA/GLubyte)");
- return;
- }
- format = GL_BGRA;
- size = 4;
- }
- else {
- format = GL_RGBA;
- }
-
- switch (type) {
- case GL_BYTE:
- elementSize = size * sizeof(GLbyte);
- break;
- case GL_UNSIGNED_BYTE:
- elementSize = size * sizeof(GLubyte);
- break;
- case GL_SHORT:
- elementSize = size * sizeof(GLshort);
- break;
- case GL_UNSIGNED_SHORT:
- elementSize = size * sizeof(GLushort);
- break;
- case GL_INT:
- elementSize = size * sizeof(GLint);
- break;
- case GL_UNSIGNED_INT:
- elementSize = size * sizeof(GLuint);
- break;
- case GL_FLOAT:
- elementSize = size * sizeof(GLfloat);
- break;
- case GL_DOUBLE:
- elementSize = size * sizeof(GLdouble);
- break;
- case GL_HALF_FLOAT:
- elementSize = size * sizeof(GLhalfARB);
- break;
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glSecondaryColorPointer(type=%s)",
- _mesa_lookup_enum_by_nr(type));
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->SecondaryColor, _NEW_ARRAY_COLOR1,
- elementSize, size, type, format, stride, GL_TRUE, ptr);
+ update_array(ctx, "glSecondaryColorPointer",
+ &ctx->Array.ArrayObj->SecondaryColor, _NEW_ARRAY_COLOR1,
+ legalTypes, 3, BGRA_OR_4,
+ size, type, stride, GL_TRUE, GL_FALSE, ptr);
}
@@ -425,110 +296,59 @@ void GLAPIENTRY
_mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr)
{
- GLint elementSize;
+ GLbitfield legalTypes = (SHORT_BIT | INT_BIT |
+ HALF_BIT | FLOAT_BIT | DOUBLE_BIT);
GET_CURRENT_CONTEXT(ctx);
const GLuint unit = ctx->Array.ActiveTexture;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (size < 1 || size > 4) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glTexCoordPointer(size)" );
- return;
- }
- if (stride < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glTexCoordPointer(stride)" );
- return;
- }
-
- if (MESA_VERBOSE&(VERBOSE_VARRAY|VERBOSE_API))
- _mesa_debug(ctx, "glTexCoordPointer(unit %u sz %d type %s stride %d)\n",
- unit, size, _mesa_lookup_enum_by_nr( type ), stride);
-
- /* always need to check that <type> is legal */
- switch (type) {
- case GL_SHORT:
- elementSize = size * sizeof(GLshort);
- break;
- case GL_INT:
- elementSize = size * sizeof(GLint);
- break;
- case GL_FLOAT:
- elementSize = size * sizeof(GLfloat);
- break;
- case GL_DOUBLE:
- elementSize = size * sizeof(GLdouble);
- break;
- case GL_HALF_FLOAT:
- elementSize = size * sizeof(GLhalfARB);
- break;
-#if FEATURE_fixedpt
- case GL_FIXED:
- elementSize = size * sizeof(GLfixed);
- break;
-#endif
-#if FEATURE_vertex_array_byte
- case GL_BYTE:
- elementSize = size * sizeof(GLbyte);
- break;
-#endif
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glTexCoordPointer(type=%s)",
- _mesa_lookup_enum_by_nr(type));
- return;
- }
+ if (ctx->API == API_OPENGLES)
+ legalTypes |= BYTE_BIT;
ASSERT(unit < Elements(ctx->Array.ArrayObj->TexCoord));
- update_array(ctx, &ctx->Array.ArrayObj->TexCoord[unit],
+ update_array(ctx, "glTexCoordPointer",
+ &ctx->Array.ArrayObj->TexCoord[unit],
_NEW_ARRAY_TEXCOORD(unit),
- elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr);
+ legalTypes, 1, 4,
+ size, type, stride, GL_FALSE, GL_FALSE,
+ ptr);
}
void GLAPIENTRY
_mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *ptr)
{
+ const GLbitfield legalTypes = UNSIGNED_BYTE_BIT;
+ /* see table 2.4 edits in GL_EXT_gpu_shader4 spec: */
+ const GLboolean integer = GL_TRUE;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (stride < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glEdgeFlagPointer(stride)" );
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->EdgeFlag, _NEW_ARRAY_EDGEFLAG,
- sizeof(GLboolean), 1, GL_UNSIGNED_BYTE, GL_RGBA,
- stride, GL_FALSE, ptr);
+ update_array(ctx, "glEdgeFlagPointer",
+ &ctx->Array.ArrayObj->EdgeFlag, _NEW_ARRAY_EDGEFLAG,
+ legalTypes, 1, 1,
+ 1, GL_UNSIGNED_BYTE, stride, GL_FALSE, integer, ptr);
}
void GLAPIENTRY
_mesa_PointSizePointer(GLenum type, GLsizei stride, const GLvoid *ptr)
{
- GLsizei elementSize;
+ const GLbitfield legalTypes = (FLOAT_BIT | FIXED_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- if (stride < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "glPointSizePointer(stride)" );
+ if (ctx->API != API_OPENGLES) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glPointSizePointer(ES 1.x only)");
return;
}
-
- switch (type) {
- case GL_FLOAT:
- elementSize = sizeof(GLfloat);
- break;
-#if FEATURE_fixedpt
- case GL_FIXED:
- elementSize = sizeof(GLfixed);
- break;
-#endif
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glPointSizePointer(type)" );
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->PointSize, _NEW_ARRAY_POINT_SIZE,
- elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr);
+
+ update_array(ctx, "glPointSizePointer",
+ &ctx->Array.ArrayObj->PointSize, _NEW_ARRAY_POINT_SIZE,
+ legalTypes, 1, 1,
+ 1, type, stride, GL_FALSE, GL_FALSE, ptr);
}
@@ -543,9 +363,9 @@ void GLAPIENTRY
_mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
GLsizei stride, const GLvoid *ptr)
{
+ const GLbitfield legalTypes = (UNSIGNED_BYTE_BIT | SHORT_BIT |
+ FLOAT_BIT | DOUBLE_BIT);
GLboolean normalized = GL_FALSE;
- GLsizei elementSize;
- GLenum format;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -554,60 +374,16 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
return;
}
- if (size < 1 || size > 4) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerNV(size)");
- return;
- }
-
- if (stride < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerNV(stride)");
- return;
- }
-
if (type == GL_UNSIGNED_BYTE && size != 4) {
_mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerNV(size!=4)");
return;
}
- if (size == GL_BGRA) {
- if (type != GL_UNSIGNED_BYTE) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glVertexAttribPointerNV(GL_BGRA/type)");
- return;
- }
-
- format = GL_BGRA;
- size = 4;
- normalized = GL_TRUE;
- }
- else {
- format = GL_RGBA;
- }
-
- /* check for valid 'type' and compute StrideB right away */
- switch (type) {
- case GL_UNSIGNED_BYTE:
- normalized = GL_TRUE;
- elementSize = size * sizeof(GLubyte);
- break;
- case GL_SHORT:
- elementSize = size * sizeof(GLshort);
- break;
- case GL_FLOAT:
- elementSize = size * sizeof(GLfloat);
- break;
- case GL_DOUBLE:
- elementSize = size * sizeof(GLdouble);
- break;
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttribPointerNV(type=%s)",
- _mesa_lookup_enum_by_nr(type));
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
+ update_array(ctx, "glVertexAttribPointerNV",
+ &ctx->Array.ArrayObj->VertexAttrib[index],
_NEW_ARRAY_ATTRIB(index),
- elementSize, size, type, format, stride, normalized, ptr);
+ legalTypes, 1, BGRA_OR_4,
+ size, type, stride, normalized, GL_FALSE, ptr);
}
#endif
@@ -623,8 +399,11 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
GLboolean normalized,
GLsizei stride, const GLvoid *ptr)
{
- GLsizei elementSize;
- GLenum format;
+ const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT |
+ SHORT_BIT | UNSIGNED_SHORT_BIT |
+ INT_BIT | UNSIGNED_INT_BIT |
+ HALF_BIT | FLOAT_BIT | DOUBLE_BIT |
+ FIXED_BIT);
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -633,99 +412,43 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
return;
}
- if (size < 1 || size > 4) {
- if (!ctx->Extensions.EXT_vertex_array_bgra || size != GL_BGRA) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerARB(size)");
- return;
- }
- }
-
- if (stride < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerARB(stride)");
- return;
- }
-
- if (size == GL_BGRA) {
- if (type != GL_UNSIGNED_BYTE) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glVertexAttribPointerARB(GL_BGRA/type)");
- return;
- }
- if (normalized != GL_TRUE) {
- _mesa_error(ctx, GL_INVALID_VALUE,
- "glVertexAttribPointerARB(GL_BGRA/normalized)");
- return;
- }
-
- format = GL_BGRA;
- size = 4;
- }
- else {
- format = GL_RGBA;
- }
-
- /* check for valid 'type' and compute StrideB right away */
- /* NOTE: more types are supported here than in the NV extension */
- switch (type) {
- case GL_BYTE:
- elementSize = size * sizeof(GLbyte);
- break;
- case GL_UNSIGNED_BYTE:
- elementSize = size * sizeof(GLubyte);
- break;
- case GL_SHORT:
- elementSize = size * sizeof(GLshort);
- break;
- case GL_UNSIGNED_SHORT:
- elementSize = size * sizeof(GLushort);
- break;
- case GL_INT:
- elementSize = size * sizeof(GLint);
- break;
- case GL_UNSIGNED_INT:
- elementSize = size * sizeof(GLuint);
- break;
- case GL_FLOAT:
- elementSize = size * sizeof(GLfloat);
- break;
- case GL_DOUBLE:
- elementSize = size * sizeof(GLdouble);
- break;
- case GL_HALF_FLOAT:
- elementSize = size * sizeof(GLhalfARB);
- break;
-#if FEATURE_fixedpt
- case GL_FIXED:
- elementSize = size * sizeof(GLfixed);
- break;
-#endif
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glVertexAttribPointerARB(type)" );
- return;
- }
-
- update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
+ update_array(ctx, "glVertexAttribPointer",
+ &ctx->Array.ArrayObj->VertexAttrib[index],
_NEW_ARRAY_ATTRIB(index),
- elementSize, size, type, format, stride, normalized, ptr);
+ legalTypes, 1, BGRA_OR_4,
+ size, type, stride, normalized, GL_FALSE, ptr);
}
#endif
/**
- * New in GL3:
+ * GL_EXT_gpu_shader4 / GL 3.0.
* Set an integer-valued vertex attribute array.
* Note that these arrays DO NOT alias the conventional GL vertex arrays
* (position, normal, color, fog, texcoord, etc).
*/
void GLAPIENTRY
_mesa_VertexAttribIPointer(GLuint index, GLint size, GLenum type,
- GLboolean normalized,
GLsizei stride, const GLvoid *ptr)
{
- /* NOTE: until we have integer-valued vertex attributes, just
- * route this through the regular glVertexAttribPointer() function.
- */
- _mesa_VertexAttribPointerARB(index, size, type, normalized, stride, ptr);
+ const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT |
+ SHORT_BIT | UNSIGNED_SHORT_BIT |
+ INT_BIT | UNSIGNED_INT_BIT);
+ const GLboolean normalized = GL_FALSE;
+ const GLboolean integer = GL_TRUE;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (index >= ctx->Const.VertexProgram.MaxAttribs) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribIPointer(index)");
+ return;
+ }
+
+ update_array(ctx, "glVertexAttribIPointer",
+ &ctx->Array.ArrayObj->VertexAttrib[index],
+ _NEW_ARRAY_ATTRIB(index),
+ legalTypes, 1, 4,
+ size, type, stride, normalized, integer, ptr);
}
@@ -805,6 +528,11 @@ get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname,
return array->Normalized;
case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB:
return array->BufferObj->Name;
+ case GL_VERTEX_ATTRIB_ARRAY_INTEGER:
+ if (ctx->Extensions.EXT_gpu_shader4) {
+ return array->Integer;
+ }
+ /* fall-through */
default:
_mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=0x%x)", caller, pname);
return 0;
@@ -1254,7 +982,6 @@ _mesa_UnlockArraysEXT( void )
/* GL_EXT_multi_draw_arrays */
-/* Somebody forgot to spec the first and count parameters as const! <sigh> */
void GLAPIENTRY
_mesa_MultiDrawArraysEXT( GLenum mode, const GLint *first,
const GLsizei *count, GLsizei primcount )
@@ -1352,6 +1079,7 @@ _mesa_copy_client_array(struct gl_context *ctx,
dst->Ptr = src->Ptr;
dst->Enabled = src->Enabled;
dst->Normalized = src->Normalized;
+ dst->Integer = src->Integer;
dst->_ElementSize = src->_ElementSize;
_mesa_reference_buffer_object(ctx, &dst->BufferObj, src->BufferObj);
dst->_MaxElement = src->_MaxElement;
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index a5fa33fa00..fb96478cfc 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -118,7 +118,6 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
void GLAPIENTRY
_mesa_VertexAttribIPointer(GLuint index, GLint size, GLenum type,
- GLboolean normalized,
GLsizei stride, const GLvoid *ptr);
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 6552a3a784..1b53508099 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -28,7 +28,7 @@
#define VERSION_H
-#include "mtypes.h"
+struct gl_context;
/* Mesa version */
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index 9236bf81a2..8a72641862 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -40,7 +40,7 @@
#if FEATURE_beginend
/**
- * Use the per-vertex functions found in <vfmt> to initialze the given
+ * Use the per-vertex functions found in <vfmt> to initialoze the given
* API dispatch table.
*/
static void
@@ -88,7 +88,7 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
SET_Vertex4f(tab, vfmt->Vertex4f);
SET_Vertex4fv(tab, vfmt->Vertex4fv);
- _mesa_install_dlist_vtxfmt(tab, vfmt);
+ _mesa_install_dlist_vtxfmt(tab, vfmt); /* glCallList / glCallLists */
SET_Begin(tab, vfmt->Begin);
SET_End(tab, vfmt->End);
@@ -103,8 +103,8 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
SET_DrawElementsBaseVertex(tab, vfmt->DrawElementsBaseVertex);
SET_DrawRangeElementsBaseVertex(tab, vfmt->DrawRangeElementsBaseVertex);
SET_MultiDrawElementsBaseVertex(tab, vfmt->MultiDrawElementsBaseVertex);
- SET_DrawArraysInstanced(tab, vfmt->DrawArraysInstanced);
- SET_DrawElementsInstanced(tab, vfmt->DrawElementsInstanced);
+ SET_DrawArraysInstancedARB(tab, vfmt->DrawArraysInstanced);
+ SET_DrawElementsInstancedARB(tab, vfmt->DrawElementsInstanced);
/* GL_NV_vertex_program */
SET_VertexAttrib1fNV(tab, vfmt->VertexAttrib1fNV);
@@ -125,17 +125,43 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
SET_VertexAttrib4fARB(tab, vfmt->VertexAttrib4fARB);
SET_VertexAttrib4fvARB(tab, vfmt->VertexAttrib4fvARB);
#endif
+
+ /* GL_EXT_gpu_shader4 / OpenGL 3.0 */
+ SET_VertexAttribI1iEXT(tab, vfmt->VertexAttribI1i);
+ SET_VertexAttribI2iEXT(tab, vfmt->VertexAttribI2i);
+ SET_VertexAttribI3iEXT(tab, vfmt->VertexAttribI3i);
+ SET_VertexAttribI4iEXT(tab, vfmt->VertexAttribI4i);
+ SET_VertexAttribI2ivEXT(tab, vfmt->VertexAttribI2iv);
+ SET_VertexAttribI3ivEXT(tab, vfmt->VertexAttribI3iv);
+ SET_VertexAttribI4ivEXT(tab, vfmt->VertexAttribI4iv);
+
+ SET_VertexAttribI1uiEXT(tab, vfmt->VertexAttribI1ui);
+ SET_VertexAttribI2uiEXT(tab, vfmt->VertexAttribI2ui);
+ SET_VertexAttribI3uiEXT(tab, vfmt->VertexAttribI3ui);
+ SET_VertexAttribI4uiEXT(tab, vfmt->VertexAttribI4ui);
+ SET_VertexAttribI2uivEXT(tab, vfmt->VertexAttribI2uiv);
+ SET_VertexAttribI3uivEXT(tab, vfmt->VertexAttribI3uiv);
+ SET_VertexAttribI4uivEXT(tab, vfmt->VertexAttribI4uiv);
}
-void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
+/**
+ * Install per-vertex functions into the API dispatch table for execution.
+ */
+void
+_mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
{
if (ctx->API == API_OPENGL)
install_vtxfmt( ctx->Exec, vfmt );
}
-void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
+/**
+ * Install per-vertex functions into the API dispatch table for display
+ * list compilation.
+ */
+void
+_mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
{
if (ctx->API == API_OPENGL)
install_vtxfmt( ctx->Save, vfmt );
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index bdd3fd92ff..98da90d359 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -123,6 +123,7 @@ public:
/** Pointer to the ir source this tree came from for debugging */
ir_instruction *ir;
GLboolean cond_update;
+ bool saturate;
int sampler; /**< sampler index */
int tex_target; /**< One of TEXTURE_*_INDEX */
GLboolean tex_shadow;
@@ -260,6 +261,17 @@ public:
ir_to_mesa_src_reg src1,
ir_to_mesa_src_reg src2);
+ /**
+ * Emit the correct dot-product instruction for the type of arguments
+ *
+ * \sa ir_to_mesa_emit_op2
+ */
+ void ir_to_mesa_emit_dp(ir_instruction *ir,
+ ir_to_mesa_dst_reg dst,
+ ir_to_mesa_src_reg src0,
+ ir_to_mesa_src_reg src1,
+ unsigned elements);
+
void ir_to_mesa_emit_scalar_op1(ir_instruction *ir,
enum prog_opcode op,
ir_to_mesa_dst_reg dst,
@@ -271,8 +283,17 @@ public:
ir_to_mesa_src_reg src0,
ir_to_mesa_src_reg src1);
+ void emit_scs(ir_instruction *ir, enum prog_opcode op,
+ ir_to_mesa_dst_reg dst,
+ const ir_to_mesa_src_reg &src);
+
GLboolean try_emit_mad(ir_expression *ir,
int mul_operand);
+ GLboolean try_emit_sat(ir_expression *ir);
+
+ void emit_swz(ir_expression *ir);
+
+ bool process_move_condition(ir_rvalue *ir);
void *mem_ctx;
};
@@ -393,6 +414,21 @@ ir_to_mesa_visitor::ir_to_mesa_emit_op0(ir_instruction *ir,
ir_to_mesa_undef);
}
+void
+ir_to_mesa_visitor::ir_to_mesa_emit_dp(ir_instruction *ir,
+ ir_to_mesa_dst_reg dst,
+ ir_to_mesa_src_reg src0,
+ ir_to_mesa_src_reg src1,
+ unsigned elements)
+{
+ static const gl_inst_opcode dot_opcodes[] = {
+ OPCODE_DP2, OPCODE_DP3, OPCODE_DP4
+ };
+
+ ir_to_mesa_emit_op3(ir, dot_opcodes[elements - 2],
+ dst, src0, src1, ir_to_mesa_undef);
+}
+
inline ir_to_mesa_dst_reg
ir_to_mesa_dst_reg_from_src(ir_to_mesa_src_reg reg)
{
@@ -447,6 +483,10 @@ ir_to_mesa_visitor::ir_to_mesa_emit_scalar_op2(ir_instruction *ir,
GLuint src0_swiz = GET_SWZ(src0.swizzle, i);
GLuint src1_swiz = GET_SWZ(src1.swizzle, i);
for (j = i + 1; j < 4; j++) {
+ /* If there is another enabled component in the destination that is
+ * derived from the same inputs, generate its value on this pass as
+ * well.
+ */
if (!(done_mask & (1 << j)) &&
GET_SWZ(src0.swizzle, j) == src0_swiz &&
GET_SWZ(src1.swizzle, j) == src1_swiz) {
@@ -480,6 +520,102 @@ ir_to_mesa_visitor::ir_to_mesa_emit_scalar_op1(ir_instruction *ir,
ir_to_mesa_emit_scalar_op2(ir, op, dst, src0, undef);
}
+/**
+ * Emit an OPCODE_SCS instruction
+ *
+ * The \c SCS opcode functions a bit differently than the other Mesa (or
+ * ARB_fragment_program) opcodes. Instead of splatting its result across all
+ * four components of the destination, it writes one value to the \c x
+ * component and another value to the \c y component.
+ *
+ * \param ir IR instruction being processed
+ * \param op Either \c OPCODE_SIN or \c OPCODE_COS depending on which
+ * value is desired.
+ * \param dst Destination register
+ * \param src Source register
+ */
+void
+ir_to_mesa_visitor::emit_scs(ir_instruction *ir, enum prog_opcode op,
+ ir_to_mesa_dst_reg dst,
+ const ir_to_mesa_src_reg &src)
+{
+ /* Vertex programs cannot use the SCS opcode.
+ */
+ if (this->prog->Target == GL_VERTEX_PROGRAM_ARB) {
+ ir_to_mesa_emit_scalar_op1(ir, op, dst, src);
+ return;
+ }
+
+ const unsigned component = (op == OPCODE_SIN) ? 0 : 1;
+ const unsigned scs_mask = (1U << component);
+ int done_mask = ~dst.writemask;
+ ir_to_mesa_src_reg tmp;
+
+ assert(op == OPCODE_SIN || op == OPCODE_COS);
+
+ /* If there are compnents in the destination that differ from the component
+ * that will be written by the SCS instrution, we'll need a temporary.
+ */
+ if (scs_mask != unsigned(dst.writemask)) {
+ tmp = get_temp(glsl_type::vec4_type);
+ }
+
+ for (unsigned i = 0; i < 4; i++) {
+ unsigned this_mask = (1U << i);
+ ir_to_mesa_src_reg src0 = src;
+
+ if ((done_mask & this_mask) != 0)
+ continue;
+
+ /* The source swizzle specified which component of the source generates
+ * sine / cosine for the current component in the destination. The SCS
+ * instruction requires that this value be swizzle to the X component.
+ * Replace the current swizzle with a swizzle that puts the source in
+ * the X component.
+ */
+ unsigned src0_swiz = GET_SWZ(src.swizzle, i);
+
+ src0.swizzle = MAKE_SWIZZLE4(src0_swiz, src0_swiz,
+ src0_swiz, src0_swiz);
+ for (unsigned j = i + 1; j < 4; j++) {
+ /* If there is another enabled component in the destination that is
+ * derived from the same inputs, generate its value on this pass as
+ * well.
+ */
+ if (!(done_mask & (1 << j)) &&
+ GET_SWZ(src0.swizzle, j) == src0_swiz) {
+ this_mask |= (1 << j);
+ }
+ }
+
+ if (this_mask != scs_mask) {
+ ir_to_mesa_instruction *inst;
+ ir_to_mesa_dst_reg tmp_dst = ir_to_mesa_dst_reg_from_src(tmp);
+
+ /* Emit the SCS instruction.
+ */
+ inst = ir_to_mesa_emit_op1(ir, OPCODE_SCS, tmp_dst, src0);
+ inst->dst_reg.writemask = scs_mask;
+
+ /* Move the result of the SCS instruction to the desired location in
+ * the destination.
+ */
+ tmp.swizzle = MAKE_SWIZZLE4(component, component,
+ component, component);
+ inst = ir_to_mesa_emit_op1(ir, OPCODE_SCS, dst, tmp);
+ inst->dst_reg.writemask = this_mask;
+ } else {
+ /* Emit the SCS instruction to write directly to the destination.
+ */
+ ir_to_mesa_instruction *inst =
+ ir_to_mesa_emit_op1(ir, OPCODE_SCS, dst, src0);
+ inst->dst_reg.writemask = scs_mask;
+ }
+
+ done_mask |= this_mask;
+ }
+}
+
struct ir_to_mesa_src_reg
ir_to_mesa_visitor::src_reg_for_float(float val)
{
@@ -805,6 +941,32 @@ ir_to_mesa_visitor::try_emit_mad(ir_expression *ir, int mul_operand)
return true;
}
+GLboolean
+ir_to_mesa_visitor::try_emit_sat(ir_expression *ir)
+{
+ /* Saturates were only introduced to vertex programs in
+ * NV_vertex_program3, so don't give them to drivers in the VP.
+ */
+ if (this->prog->Target == GL_VERTEX_PROGRAM_ARB)
+ return false;
+
+ ir_rvalue *sat_src = ir->as_rvalue_to_saturate();
+ if (!sat_src)
+ return false;
+
+ sat_src->accept(this);
+ ir_to_mesa_src_reg src = this->result;
+
+ this->result = get_temp(ir->type);
+ ir_to_mesa_instruction *inst;
+ inst = ir_to_mesa_emit_op1(ir, OPCODE_MOV,
+ ir_to_mesa_dst_reg_from_src(this->result),
+ src);
+ inst->saturate = true;
+
+ return true;
+}
+
void
ir_to_mesa_visitor::reladdr_to_temp(ir_instruction *ir,
ir_to_mesa_src_reg *reg, int *num_reladdr)
@@ -826,15 +988,129 @@ ir_to_mesa_visitor::reladdr_to_temp(ir_instruction *ir,
}
void
+ir_to_mesa_visitor::emit_swz(ir_expression *ir)
+{
+ /* Assume that the vector operator is in a form compatible with OPCODE_SWZ.
+ * This means that each of the operands is either an immediate value of -1,
+ * 0, or 1, or is a component from one source register (possibly with
+ * negation).
+ */
+ uint8_t components[4] = { 0 };
+ bool negate[4] = { false };
+ ir_variable *var = NULL;
+
+ for (unsigned i = 0; i < ir->type->vector_elements; i++) {
+ ir_rvalue *op = ir->operands[i];
+
+ assert(op->type->is_scalar());
+
+ while (op != NULL) {
+ switch (op->ir_type) {
+ case ir_type_constant: {
+
+ assert(op->type->is_scalar());
+
+ const ir_constant *const c = op->as_constant();
+ if (c->is_one()) {
+ components[i] = SWIZZLE_ONE;
+ } else if (c->is_zero()) {
+ components[i] = SWIZZLE_ZERO;
+ } else if (c->is_negative_one()) {
+ components[i] = SWIZZLE_ONE;
+ negate[i] = true;
+ } else {
+ assert(!"SWZ constant must be 0.0 or 1.0.");
+ }
+
+ op = NULL;
+ break;
+ }
+
+ case ir_type_dereference_variable: {
+ ir_dereference_variable *const deref =
+ (ir_dereference_variable *) op;
+
+ assert((var == NULL) || (deref->var == var));
+ components[i] = SWIZZLE_X;
+ var = deref->var;
+ op = NULL;
+ break;
+ }
+
+ case ir_type_expression: {
+ ir_expression *const expr = (ir_expression *) op;
+
+ assert(expr->operation == ir_unop_neg);
+ negate[i] = true;
+
+ op = expr->operands[0];
+ break;
+ }
+
+ case ir_type_swizzle: {
+ ir_swizzle *const swiz = (ir_swizzle *) op;
+
+ components[i] = swiz->mask.x;
+ op = swiz->val;
+ break;
+ }
+
+ default:
+ assert(!"Should not get here.");
+ return;
+ }
+ }
+ }
+
+ assert(var != NULL);
+
+ ir_dereference_variable *const deref =
+ new(mem_ctx) ir_dereference_variable(var);
+
+ this->result.file = PROGRAM_UNDEFINED;
+ deref->accept(this);
+ if (this->result.file == PROGRAM_UNDEFINED) {
+ ir_print_visitor v;
+ printf("Failed to get tree for expression operand:\n");
+ deref->accept(&v);
+ exit(1);
+ }
+
+ ir_to_mesa_src_reg src;
+
+ src = this->result;
+ src.swizzle = MAKE_SWIZZLE4(components[0],
+ components[1],
+ components[2],
+ components[3]);
+ src.negate = ((unsigned(negate[0]) << 0)
+ | (unsigned(negate[1]) << 1)
+ | (unsigned(negate[2]) << 2)
+ | (unsigned(negate[3]) << 3));
+
+ /* Storage for our result. Ideally for an assignment we'd be using the
+ * actual storage for the result here, instead.
+ */
+ const ir_to_mesa_src_reg result_src = get_temp(ir->type);
+ ir_to_mesa_dst_reg result_dst = ir_to_mesa_dst_reg_from_src(result_src);
+
+ /* Limit writes to the channels that will be used by result_src later.
+ * This does limit this temp's use as a temporary for multi-instruction
+ * sequences.
+ */
+ result_dst.writemask = (1 << ir->type->vector_elements) - 1;
+
+ ir_to_mesa_emit_op1(ir, OPCODE_SWZ, result_dst, src);
+ this->result = result_src;
+}
+
+void
ir_to_mesa_visitor::visit(ir_expression *ir)
{
unsigned int operand;
- struct ir_to_mesa_src_reg op[2];
+ struct ir_to_mesa_src_reg op[Elements(ir->operands)];
struct ir_to_mesa_src_reg result_src;
struct ir_to_mesa_dst_reg result_dst;
- const glsl_type *vec4_type = glsl_type::get_instance(GLSL_TYPE_FLOAT, 4, 1);
- const glsl_type *vec3_type = glsl_type::get_instance(GLSL_TYPE_FLOAT, 3, 1);
- const glsl_type *vec2_type = glsl_type::get_instance(GLSL_TYPE_FLOAT, 2, 1);
/* Quick peephole: Emit OPCODE_MAD(a, b, c) instead of ADD(MUL(a, b), c)
*/
@@ -844,6 +1120,13 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
if (try_emit_mad(ir, 0))
return;
}
+ if (try_emit_sat(ir))
+ return;
+
+ if (ir->operation == ir_quadop_vector) {
+ this->emit_swz(ir);
+ return;
+ }
for (operand = 0; operand < ir->get_num_operands(); operand++) {
this->result.file = PROGRAM_UNDEFINED;
@@ -917,6 +1200,12 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
case ir_unop_cos:
ir_to_mesa_emit_scalar_op1(ir, OPCODE_COS, result_dst, op[0]);
break;
+ case ir_unop_sin_reduced:
+ emit_scs(ir, OPCODE_SIN, result_dst, op[0]);
+ break;
+ case ir_unop_cos_reduced:
+ emit_scs(ir, OPCODE_COS, result_dst, op[0]);
+ break;
case ir_unop_dFdx:
ir_to_mesa_emit_op1(ir, OPCODE_DDX, result_dst, op[0]);
@@ -976,12 +1265,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
ir_to_mesa_src_reg temp = get_temp(glsl_type::vec4_type);
ir_to_mesa_emit_op2(ir, OPCODE_SNE,
ir_to_mesa_dst_reg_from_src(temp), op[0], op[1]);
- if (vector_elements == 4)
- ir_to_mesa_emit_op2(ir, OPCODE_DP4, result_dst, temp, temp);
- else if (vector_elements == 3)
- ir_to_mesa_emit_op2(ir, OPCODE_DP3, result_dst, temp, temp);
- else
- ir_to_mesa_emit_op2(ir, OPCODE_DP2, result_dst, temp, temp);
+ ir_to_mesa_emit_dp(ir, result_dst, temp, temp, vector_elements);
ir_to_mesa_emit_op2(ir, OPCODE_SEQ,
result_dst, result_src, src_reg_for_float(0.0));
} else {
@@ -995,12 +1279,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
ir_to_mesa_src_reg temp = get_temp(glsl_type::vec4_type);
ir_to_mesa_emit_op2(ir, OPCODE_SNE,
ir_to_mesa_dst_reg_from_src(temp), op[0], op[1]);
- if (vector_elements == 4)
- ir_to_mesa_emit_op2(ir, OPCODE_DP4, result_dst, temp, temp);
- else if (vector_elements == 3)
- ir_to_mesa_emit_op2(ir, OPCODE_DP3, result_dst, temp, temp);
- else
- ir_to_mesa_emit_op2(ir, OPCODE_DP2, result_dst, temp, temp);
+ ir_to_mesa_emit_dp(ir, result_dst, temp, temp, vector_elements);
ir_to_mesa_emit_op2(ir, OPCODE_SNE,
result_dst, result_src, src_reg_for_float(0.0));
} else {
@@ -1009,20 +1288,9 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
break;
case ir_unop_any:
- switch (ir->operands[0]->type->vector_elements) {
- case 4:
- ir_to_mesa_emit_op2(ir, OPCODE_DP4, result_dst, op[0], op[0]);
- break;
- case 3:
- ir_to_mesa_emit_op2(ir, OPCODE_DP3, result_dst, op[0], op[0]);
- break;
- case 2:
- ir_to_mesa_emit_op2(ir, OPCODE_DP2, result_dst, op[0], op[0]);
- break;
- default:
- assert(!"unreached: ir_unop_any of non-bvec");
- break;
- }
+ assert(ir->operands[0]->type->is_vector());
+ ir_to_mesa_emit_dp(ir, result_dst, op[0], op[0],
+ ir->operands[0]->type->vector_elements);
ir_to_mesa_emit_op2(ir, OPCODE_SNE,
result_dst, result_src, src_reg_for_float(0.0));
break;
@@ -1050,26 +1318,10 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
break;
case ir_binop_dot:
- if (ir->operands[0]->type == vec4_type) {
- assert(ir->operands[1]->type == vec4_type);
- ir_to_mesa_emit_op2(ir, OPCODE_DP4,
- result_dst,
- op[0], op[1]);
- } else if (ir->operands[0]->type == vec3_type) {
- assert(ir->operands[1]->type == vec3_type);
- ir_to_mesa_emit_op2(ir, OPCODE_DP3,
- result_dst,
- op[0], op[1]);
- } else if (ir->operands[0]->type == vec2_type) {
- assert(ir->operands[1]->type == vec2_type);
- ir_to_mesa_emit_op2(ir, OPCODE_DP2,
- result_dst,
- op[0], op[1]);
- }
- break;
-
- case ir_binop_cross:
- ir_to_mesa_emit_op2(ir, OPCODE_XPD, result_dst, op[0], op[1]);
+ assert(ir->operands[0]->type->is_vector());
+ assert(ir->operands[0]->type == ir->operands[1]->type);
+ ir_to_mesa_emit_dp(ir, result_dst, op[0], op[1],
+ ir->operands[0]->type->vector_elements);
break;
case ir_unop_sqrt:
@@ -1133,6 +1385,12 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
case ir_unop_round_even:
assert(!"GLSL 1.30 features unsupported");
break;
+
+ case ir_quadop_vector:
+ /* This operation should have already been handled.
+ */
+ assert(!"Should not get here.");
+ break;
}
this->result = result_src;
@@ -1340,6 +1598,93 @@ get_assignment_lhs(ir_dereference *ir, ir_to_mesa_visitor *v)
return ir_to_mesa_dst_reg_from_src(v->result);
}
+/**
+ * Process the condition of a conditional assignment
+ *
+ * Examines the condition of a conditional assignment to generate the optimal
+ * first operand of a \c CMP instruction. If the condition is a relational
+ * operator with 0 (e.g., \c ir_binop_less), the value being compared will be
+ * used as the source for the \c CMP instruction. Otherwise the comparison
+ * is processed to a boolean result, and the boolean result is used as the
+ * operand to the CMP instruction.
+ */
+bool
+ir_to_mesa_visitor::process_move_condition(ir_rvalue *ir)
+{
+ ir_rvalue *src_ir = ir;
+ bool negate = true;
+ bool switch_order = false;
+
+ ir_expression *const expr = ir->as_expression();
+ if ((expr != NULL) && (expr->get_num_operands() == 2)) {
+ bool zero_on_left = false;
+
+ if (expr->operands[0]->is_zero()) {
+ src_ir = expr->operands[1];
+ zero_on_left = true;
+ } else if (expr->operands[1]->is_zero()) {
+ src_ir = expr->operands[0];
+ zero_on_left = false;
+ }
+
+ /* a is - 0 + - 0 +
+ * (a < 0) T F F ( a < 0) T F F
+ * (0 < a) F F T (-a < 0) F F T
+ * (a <= 0) T T F (-a < 0) F F T (swap order of other operands)
+ * (0 <= a) F T T ( a < 0) T F F (swap order of other operands)
+ * (a > 0) F F T (-a < 0) F F T
+ * (0 > a) T F F ( a < 0) T F F
+ * (a >= 0) F T T ( a < 0) T F F (swap order of other operands)
+ * (0 >= a) T T F (-a < 0) F F T (swap order of other operands)
+ *
+ * Note that exchanging the order of 0 and 'a' in the comparison simply
+ * means that the value of 'a' should be negated.
+ */
+ if (src_ir != ir) {
+ switch (expr->operation) {
+ case ir_binop_less:
+ switch_order = false;
+ negate = zero_on_left;
+ break;
+
+ case ir_binop_greater:
+ switch_order = false;
+ negate = !zero_on_left;
+ break;
+
+ case ir_binop_lequal:
+ switch_order = true;
+ negate = !zero_on_left;
+ break;
+
+ case ir_binop_gequal:
+ switch_order = true;
+ negate = zero_on_left;
+ break;
+
+ default:
+ /* This isn't the right kind of comparison afterall, so make sure
+ * the whole condition is visited.
+ */
+ src_ir = ir;
+ break;
+ }
+ }
+ }
+
+ src_ir->accept(this);
+
+ /* We use the OPCODE_CMP (a < 0 ? b : c) for conditional moves, and the
+ * condition we produced is 0.0 or 1.0. By flipping the sign, we can
+ * choose which value OPCODE_CMP produces without an extra instruction
+ * computing the condition.
+ */
+ if (negate)
+ this->result.negate = ~this->result.negate;
+
+ return switch_order;
+}
+
void
ir_to_mesa_visitor::visit(ir_assignment *ir)
{
@@ -1399,20 +1744,18 @@ ir_to_mesa_visitor::visit(ir_assignment *ir)
assert(r.file != PROGRAM_UNDEFINED);
if (ir->condition) {
- ir_to_mesa_src_reg condition;
-
- ir->condition->accept(this);
- condition = this->result;
+ const bool switch_order = this->process_move_condition(ir->condition);
+ ir_to_mesa_src_reg condition = this->result;
- /* We use the OPCODE_CMP (a < 0 ? b : c) for conditional moves,
- * and the condition we produced is 0.0 or 1.0. By flipping the
- * sign, we can choose which value OPCODE_CMP produces without
- * an extra computing the condition.
- */
- condition.negate = ~condition.negate;
for (i = 0; i < type_size(ir->lhs->type); i++) {
- ir_to_mesa_emit_op3(ir, OPCODE_CMP, l,
- condition, r, ir_to_mesa_src_reg_from_dst(l));
+ if (switch_order) {
+ ir_to_mesa_emit_op3(ir, OPCODE_CMP, l,
+ condition, ir_to_mesa_src_reg_from_dst(l), r);
+ } else {
+ ir_to_mesa_emit_op3(ir, OPCODE_CMP, l,
+ condition, r, ir_to_mesa_src_reg_from_dst(l));
+ }
+
l.index++;
r.index++;
}
@@ -2365,6 +2708,8 @@ get_mesa_program(struct gl_context *ctx, struct gl_shader_program *shader_progra
mesa_inst->Opcode = inst->op;
mesa_inst->CondUpdate = inst->cond_update;
+ if (inst->saturate)
+ mesa_inst->SaturateMode = SATURATE_ZERO_ONE;
mesa_inst->DstReg.File = inst->dst_reg.file;
mesa_inst->DstReg.Index = inst->dst_reg.index;
mesa_inst->DstReg.CondMask = inst->dst_reg.cond_mask;
@@ -2485,14 +2830,15 @@ _mesa_ir_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
/* Lowering */
do_mat_op_to_vec(ir);
- do_mod_to_fract(ir);
- do_div_to_mul_rcp(ir);
- do_explog_to_explog2(ir);
+ lower_instructions(ir, MOD_TO_FRACT | DIV_TO_MUL_RCP | EXP_TO_EXP2
+ | LOG_TO_LOG2);
progress = do_lower_jumps(ir, true, true, options->EmitNoMainReturn, options->EmitNoCont, options->EmitNoLoops) || progress;
progress = do_common_optimization(ir, true, options->MaxUnrollIterations) || progress;
+ progress = lower_quadop_vector(ir, true) || progress;
+
if (options->EmitNoIfs)
progress = do_if_to_cond_assign(ir) || progress;
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c
index cdcf4ec265..4cacde9aed 100644
--- a/src/mesa/program/program.c
+++ b/src/mesa/program/program.c
@@ -796,7 +796,7 @@ _mesa_combine_programs(struct gl_context *ctx,
if (p->Type == PROGRAM_STATE_VAR &&
p->StateIndexes[0] == STATE_INTERNAL &&
p->StateIndexes[1] == STATE_CURRENT_ATTRIB &&
- p->StateIndexes[2] == VERT_ATTRIB_COLOR0) {
+ (int) p->StateIndexes[2] == (int) VERT_ATTRIB_COLOR0) {
progB_inputsRead |= FRAG_BIT_COL0;
progB_colorFile = PROGRAM_STATE_VAR;
progB_colorIndex = i;
diff --git a/src/mesa/program/sampler.cpp b/src/mesa/program/sampler.cpp
index 0e58aef9c9..9a813c8795 100644
--- a/src/mesa/program/sampler.cpp
+++ b/src/mesa/program/sampler.cpp
@@ -23,15 +23,15 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <stdio.h>
+#include <cstdio>
+#include "ir.h"
+#include "glsl_types.h"
+#include "ir_visitor.h"
extern "C" {
#include "main/compiler.h"
#include "main/mtypes.h"
#include "program/prog_parameter.h"
-#include "ir.h"
-#include "ir_visitor.h"
-#include "glsl_types.h"
}
static void fail_link(struct gl_shader_program *prog, const char *fmt, ...) PRINTFLIKE(2, 3);
diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index 11a93d47f6..9a78a23aa7 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -58,8 +58,10 @@ MAIN_SOURCES = \
main/mm.c \
main/multisample.c \
main/nvprogram.c \
+ main/pack.c \
main/pixel.c \
main/pixelstore.c \
+ main/pixeltransfer.c \
main/points.c \
main/polygon.c \
main/queryobj.c \
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 6f9d71e845..8d1dc792bc 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -90,8 +90,11 @@ void st_upload_constants( struct st_context *st,
st->pipe->set_constant_buffer(st->pipe, shader_type, 0, *cbuf);
}
- else {
+ else if (*cbuf) {
st->constants.tracked_state[shader_type].dirty.mesa = 0x0;
+
+ pipe_resource_reference(cbuf, NULL);
+ st->pipe->set_constant_buffer(st->pipe, shader_type, 0, NULL);
}
}
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index 451299cef0..f92ca13d5e 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -96,9 +96,8 @@ static void update_raster_state( struct st_context *st )
*/
if (ctx->VertexProgram._Current) {
if (ctx->VertexProgram._Enabled ||
- (ctx->Shader.CurrentProgram &&
- ctx->Shader.CurrentProgram->VertexProgram &&
- ctx->Shader.CurrentProgram->LinkStatus)) {
+ (ctx->Shader.CurrentVertexProgram &&
+ ctx->Shader.CurrentVertexProgram->LinkStatus)) {
/* user-defined vertex program or shader */
raster->light_twoside = ctx->VertexProgram.TwoSideEnabled;
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 94b80f69f2..d80c068ea8 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -34,6 +34,7 @@
#include "main/image.h"
#include "main/bufferobj.h"
#include "main/macros.h"
+#include "main/pack.h"
#include "main/texformat.h"
#include "main/texstore.h"
#include "program/program.h"
@@ -298,8 +299,8 @@ make_passthrough_vertex_shader(struct st_context *st,
/**
- * Return a texture internalFormat for drawing/copying an image
- * of the given type.
+ * Return a texture base format for drawing/copying an image
+ * of the given format.
*/
static GLenum
base_format(GLenum format)
@@ -318,6 +319,47 @@ base_format(GLenum format)
/**
+ * Return a texture internalFormat for drawing/copying an image
+ * of the given format and type.
+ */
+static GLenum
+internal_format(GLenum format, GLenum type)
+{
+ switch (format) {
+ case GL_DEPTH_COMPONENT:
+ return GL_DEPTH_COMPONENT;
+ case GL_DEPTH_STENCIL:
+ return GL_DEPTH_STENCIL;
+ case GL_STENCIL_INDEX:
+ return GL_STENCIL_INDEX;
+ default:
+ if (_mesa_is_integer_format(format)) {
+ switch (type) {
+ case GL_BYTE:
+ return GL_RGBA8I;
+ case GL_UNSIGNED_BYTE:
+ return GL_RGBA8UI;
+ case GL_SHORT:
+ return GL_RGBA16I;
+ case GL_UNSIGNED_SHORT:
+ return GL_RGBA16UI;
+ case GL_INT:
+ return GL_RGBA32I;
+ case GL_UNSIGNED_INT:
+ return GL_RGBA32UI;
+ default:
+ assert(0 && "Unexpected type in internal_format()");
+ return GL_RGBA_INTEGER;
+ }
+ }
+ else {
+ return GL_RGBA;
+ }
+ }
+}
+
+
+/**
* Create a temporary texture to hold an image of the given size.
* If width, height are not POT and the driver only handles POT textures,
* allocate the next larger size of texture that is POT.
@@ -351,11 +393,12 @@ make_texture(struct st_context *st,
struct pipe_resource *pt;
enum pipe_format pipeFormat;
GLuint cpp;
- GLenum baseFormat;
+ GLenum baseFormat, intFormat;
baseFormat = base_format(format);
+ intFormat = internal_format(format, type);
- mformat = st_ChooseTextureFormat_renderable(ctx, baseFormat,
+ mformat = st_ChooseTextureFormat_renderable(ctx, intFormat,
format, type, GL_FALSE);
assert(mformat);
@@ -548,7 +591,6 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
assert(width <= maxSize);
assert(height <= maxSize);
- cso_save_depth_stencil_alpha(cso);
cso_save_rasterizer(cso);
cso_save_viewport(cso);
cso_save_samplers(cso);
@@ -556,6 +598,10 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_save_fragment_shader(cso);
cso_save_vertex_shader(cso);
cso_save_vertex_elements(cso);
+ if (write_stencil) {
+ cso_save_depth_stencil_alpha(cso);
+ cso_save_blend(cso);
+ }
/* rasterizer state: just scissor */
{
@@ -566,22 +612,30 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_set_rasterizer(cso, &rasterizer);
}
- if (write_depth || write_stencil)
- {
+ if (write_stencil) {
+ /* Stencil writing bypasses the normal fragment pipeline to
+ * disable color writing and set stencil test to always pass.
+ */
struct pipe_depth_stencil_alpha_state dsa;
+ struct pipe_blend_state blend;
+
+ /* depth/stencil */
memset(&dsa, 0, sizeof(dsa));
+ dsa.stencil[0].enabled = 1;
+ dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
+ dsa.stencil[0].writemask = ctx->Stencil.WriteMask[0] & 0xff;
+ dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_REPLACE;
if (write_depth) {
- dsa.depth.enabled = 1;
- dsa.depth.func = PIPE_FUNC_ALWAYS;
- dsa.depth.writemask = 1;
- }
- if (write_stencil) {
- dsa.stencil[0].enabled = 1;
- dsa.stencil[0].func = PIPE_FUNC_ALWAYS;
- dsa.stencil[0].writemask = 0xff;
- dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_REPLACE;
+ /* writing depth+stencil: depth test always passes */
+ dsa.depth.enabled = 1;
+ dsa.depth.writemask = ctx->Depth.Mask;
+ dsa.depth.func = PIPE_FUNC_ALWAYS;
}
cso_set_depth_stencil_alpha(cso, &dsa);
+
+ /* blend (colormask) */
+ memset(&blend, 0, sizeof(blend));
+ cso_set_blend(cso, &blend);
}
/* fragment shader state: TEX lookup program */
@@ -653,7 +707,6 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
normalized ? ((GLfloat) height / sv[0]->texture->height0) : (GLfloat)height);
/* restore state */
- cso_restore_depth_stencil_alpha(cso);
cso_restore_rasterizer(cso);
cso_restore_viewport(cso);
cso_restore_samplers(cso);
@@ -661,6 +714,10 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_restore_fragment_shader(cso);
cso_restore_vertex_shader(cso);
cso_restore_vertex_elements(cso);
+ if (write_stencil) {
+ cso_restore_depth_stencil_alpha(cso);
+ cso_restore_blend(cso);
+ }
}
@@ -951,6 +1008,18 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
GL_STENCIL_INDEX, GL_UNSIGNED_BYTE,
&ctx->DefaultPacking, buffer);
+ if (0) {
+ /* debug code: dump stencil values */
+ GLint row, col;
+ for (row = 0; row < height; row++) {
+ printf("%3d: ", row);
+ for (col = 0; col < width; col++) {
+ printf("%02x ", buffer[col + row * width]);
+ }
+ printf("\n");
+ }
+ }
+
if (util_format_get_component_bits(rbDraw->format,
UTIL_FORMAT_COLORSPACE_ZS, 0) != 0)
usage = PIPE_TRANSFER_READ_WRITE;
diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c
index 298f8a5b12..c4b84de790 100644
--- a/src/mesa/state_tracker/st_cb_eglimage.c
+++ b/src/mesa/state_tracker/st_cb_eglimage.c
@@ -106,6 +106,7 @@ st_bind_surface(struct gl_context *ctx, GLenum target,
struct st_texture_object *stObj;
struct st_texture_image *stImage;
GLenum internalFormat;
+ gl_format texFormat;
/* map pipe format to base format */
if (util_format_get_component_bits(ps->format, UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
@@ -122,13 +123,15 @@ st_bind_surface(struct gl_context *ctx, GLenum target,
stObj->surface_based = GL_TRUE;
}
+ texFormat = st_pipe_format_to_mesa_format(ps->format);
+
_mesa_init_teximage_fields(ctx, target, texImage,
- ps->width, ps->height, 1, 0, internalFormat);
- texImage->TexFormat = st_pipe_format_to_mesa_format(ps->format);
- _mesa_set_fetch_functions(texImage, 2);
+ ps->width, ps->height, 1, 0, internalFormat,
+ texFormat);
/* FIXME create a non-default sampler view from the pipe_surface? */
pipe_resource_reference(&stObj->pt, ps->texture);
+ pipe_sampler_view_reference(&stObj->sampler_view, NULL);
pipe_resource_reference(&stImage->pt, stObj->pt);
stObj->width0 = ps->width;
diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
index 724464a33f..aa31b3710b 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/src/mesa/state_tracker/st_cb_queryobj.c
@@ -35,7 +35,6 @@
#include "main/imports.h"
#include "main/context.h"
-#include "main/image.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 0aad733e34..bcd46ac9d5 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -37,6 +37,7 @@
#include "main/bufferobj.h"
#include "main/context.h"
#include "main/image.h"
+#include "main/pack.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 062dd34865..15e69e1fa0 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -34,6 +34,8 @@
#include "main/imports.h"
#include "main/macros.h"
#include "main/mipmap.h"
+#include "main/pack.h"
+#include "main/pixeltransfer.h"
#include "main/texcompress.h"
#include "main/texfetch.h"
#include "main/texgetimage.h"
@@ -547,14 +549,18 @@ st_TexImage(struct gl_context * ctx,
/* switch to "normal" */
if (stObj->surface_based) {
+ gl_format texFormat;
+
_mesa_clear_texture_object(ctx, texObj);
pipe_resource_reference(&stObj->pt, NULL);
/* oops, need to init this image again */
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, format, type);
+
_mesa_init_teximage_fields(ctx, target, texImage,
- width, height, depth, border, internalFormat);
- _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
- internalFormat, format, type);
+ width, height, depth, border,
+ internalFormat, texFormat);
stObj->surface_based = GL_FALSE;
}
@@ -1948,7 +1954,7 @@ st_get_default_texture(struct st_context *st)
_mesa_init_teximage_fields(st->ctx, target, texImg,
16, 16, 1, 0, /* w, h, d, border */
- GL_RGBA);
+ GL_RGBA, MESA_FORMAT_RGBA8888);
st_TexImage(st->ctx, 2, target,
0, GL_RGBA, /* level, intformat */
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 75fd69540f..d0dcdd4e29 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -236,6 +236,13 @@ void st_destroy_context( struct st_context *st )
}
pipe_surface_reference(&st->state.framebuffer.zsbuf, NULL);
+ pipe->set_index_buffer(pipe, NULL);
+
+ for (i = 0; i < PIPE_SHADER_TYPES; i++) {
+ pipe->set_constant_buffer(pipe, PIPE_SHADER_VERTEX, 0, NULL);
+ pipe_resource_reference(&st->state.constants[PIPE_SHADER_VERTEX], NULL);
+ }
+
_mesa_delete_program_cache(st->ctx, st->pixel_xfer.cache);
_vbo_DestroyContext(st->ctx);
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 5387499eb9..61a0e1b087 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -547,11 +547,21 @@ setup_index_buffer(struct gl_context *ctx,
static void
check_uniforms(struct gl_context *ctx)
{
- const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
- if (shProg && shProg->LinkStatus) {
- GLuint i;
- for (i = 0; i < shProg->Uniforms->NumUniforms; i++) {
- const struct gl_uniform *u = &shProg->Uniforms->Uniforms[i];
+ struct gl_shader_program *shProg[3] = {
+ ctx->Shader.CurrentVertexProgram,
+ ctx->Shader.CurrentGeometryProgram,
+ ctx->Shader.CurrentFragmentProgram,
+ };
+ unsigned j;
+
+ for (j = 0; j < 3; j++) {
+ unsigned i;
+
+ if (shProg[j] == NULL || !shProg[j]->LinkStatus)
+ continue;
+
+ for (i = 0; i < shProg[j]->Uniforms->NumUniforms; i++) {
+ const struct gl_uniform *u = &shProg[j]->Uniforms->Uniforms[i];
if (!u->Initialized) {
_mesa_warning(ctx,
"Using shader with uninitialized uniform: %s",
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 2720f44645..62f84ed6b4 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -175,6 +175,15 @@ void st_init_limits(struct st_context *st)
options->EmitNoCont = !screen->get_shader_param(screen, i, PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED);
+ options->EmitNoIndirectInput = !screen->get_shader_param(screen, i,
+ PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR);
+ options->EmitNoIndirectOutput = !screen->get_shader_param(screen, i,
+ PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR);
+ options->EmitNoIndirectTemp = !screen->get_shader_param(screen, i,
+ PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR);
+ options->EmitNoIndirectUniform = !screen->get_shader_param(screen, i,
+ PIPE_SHADER_CAP_INDIRECT_CONST_ADDR);
+
if(options->EmitNoLoops)
options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);
}
@@ -289,6 +298,8 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ARB_vertex_shader = GL_TRUE;
ctx->Extensions.ARB_shader_objects = GL_TRUE;
ctx->Extensions.ARB_shading_language_100 = GL_TRUE;
+ ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE;
+ ctx->Extensions.EXT_separate_shader_objects = GL_TRUE;
}
if (screen->get_param(screen, PIPE_CAP_TEXTURE_MIRROR_REPEAT) > 0) {
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 7ad48ecea0..955d821a65 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -210,6 +210,25 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_R8G8_UNORM;
case MESA_FORMAT_RG1616:
return PIPE_FORMAT_R16G16_UNORM;
+ case MESA_FORMAT_RGBA_16:
+ return PIPE_FORMAT_R16G16B16A16_UNORM;
+
+ /* signed int formats */
+ case MESA_FORMAT_RGBA_INT8:
+ return PIPE_FORMAT_R8G8B8A8_SSCALED;
+ case MESA_FORMAT_RGBA_INT16:
+ return PIPE_FORMAT_R16G16B16A16_SSCALED;
+ case MESA_FORMAT_RGBA_INT32:
+ return PIPE_FORMAT_R32G32B32A32_SSCALED;
+
+ /* unsigned int formats */
+ case MESA_FORMAT_RGBA_UINT8:
+ return PIPE_FORMAT_R8G8B8A8_USCALED;
+ case MESA_FORMAT_RGBA_UINT16:
+ return PIPE_FORMAT_R16G16B16A16_USCALED;
+ case MESA_FORMAT_RGBA_UINT32:
+ return PIPE_FORMAT_R32G32B32A32_USCALED;
+
default:
assert(0);
return PIPE_FORMAT_NONE;
@@ -253,6 +272,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_S8_USCALED:
return MESA_FORMAT_S8;
+ case PIPE_FORMAT_R16G16B16A16_UNORM:
+ return MESA_FORMAT_RGBA_16;
case PIPE_FORMAT_R16G16B16A16_SNORM:
return MESA_FORMAT_SIGNED_RGBA_16;
@@ -316,6 +337,23 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_RG88;
case PIPE_FORMAT_R16G16_UNORM:
return MESA_FORMAT_RG1616;
+
+ /* signed int formats */
+ case PIPE_FORMAT_R8G8B8A8_SSCALED:
+ return MESA_FORMAT_RGBA_INT8;
+ case PIPE_FORMAT_R16G16B16A16_SSCALED:
+ return MESA_FORMAT_RGBA_INT16;
+ case PIPE_FORMAT_R32G32B32A32_SSCALED:
+ return MESA_FORMAT_RGBA_INT32;
+
+ /* unsigned int formats */
+ case PIPE_FORMAT_R8G8B8A8_USCALED:
+ return MESA_FORMAT_RGBA_UINT8;
+ case PIPE_FORMAT_R16G16B16A16_USCALED:
+ return MESA_FORMAT_RGBA_UINT16;
+ case PIPE_FORMAT_R32G32B32A32_USCALED:
+ return MESA_FORMAT_RGBA_UINT32;
+
default:
assert(0);
return MESA_FORMAT_NONE;
@@ -435,14 +473,19 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_RGBA:
case GL_RGBA8:
case GL_RGB10_A2:
- case GL_RGBA12:
return default_rgba_format( screen, target, sample_count, bindings,
geom_flags );
+
case 3:
case GL_RGB:
return default_rgb_format( screen, target, sample_count, bindings,
geom_flags );
+ case GL_RGBA12:
case GL_RGBA16:
+ if (screen->is_format_supported( screen, PIPE_FORMAT_R16G16B16A16_UNORM,
+ target, sample_count, bindings,
+ geom_flags ))
+ return PIPE_FORMAT_R16G16B16A16_UNORM;
return default_rgba_format( screen, target, sample_count, bindings,
geom_flags );
@@ -756,6 +799,92 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
return PIPE_FORMAT_RGTC2_SNORM;
return PIPE_FORMAT_NONE;
+ /* signed/unsigned integer formats.
+ * XXX Mesa only has formats for RGBA signed/unsigned integer formats.
+ * If/when new formats are added this code should be updated.
+ */
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_RGB_INTEGER_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
+ /* fall-through */
+ case GL_RGBA8I_EXT:
+ case GL_RGB8I_EXT:
+ case GL_ALPHA8I_EXT:
+ case GL_INTENSITY8I_EXT:
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE_ALPHA8I_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_SSCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R8G8B8A8_SSCALED;
+ return PIPE_FORMAT_NONE;
+ case GL_RGBA16I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_SSCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R16G16B16A16_SSCALED;
+ return PIPE_FORMAT_NONE;
+ case GL_RGBA32I_EXT:
+ case GL_RGB32I_EXT:
+ case GL_ALPHA32I_EXT:
+ case GL_INTENSITY32I_EXT:
+ case GL_LUMINANCE32I_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ /* xxx */
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_SSCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R32G32B32A32_SSCALED;
+ return PIPE_FORMAT_NONE;
+
+ case GL_RGBA8UI_EXT:
+ case GL_RGB8UI_EXT:
+ case GL_ALPHA8UI_EXT:
+ case GL_INTENSITY8UI_EXT:
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R8G8B8A8_USCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R8G8B8A8_USCALED;
+ return PIPE_FORMAT_NONE;
+
+ case GL_RGBA16UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_USCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R16G16B16A16_USCALED;
+ return PIPE_FORMAT_NONE;
+
+ case GL_RGBA32UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_ALPHA32UI_EXT:
+ case GL_INTENSITY32UI_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ if (screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_USCALED,
+ target,
+ sample_count, bindings, geom_flags))
+ return PIPE_FORMAT_R32G32B32A32_USCALED;
+ return PIPE_FORMAT_NONE;
+
default:
return PIPE_FORMAT_NONE;
}
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index fe31418ddd..1fc4f40488 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -29,7 +29,6 @@
#include "main/imports.h"
#include "main/mipmap.h"
#include "main/teximage.h"
-#include "main/texformat.h"
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
@@ -400,9 +399,8 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target,
/* initialize new image */
_mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight,
- dstDepth, border, srcImage->InternalFormat);
-
- dstImage->TexFormat = srcImage->TexFormat;
+ dstDepth, border, srcImage->InternalFormat,
+ srcImage->TexFormat);
stImage = st_texture_image(dstImage);
stImage->level = dstLevel;
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 183477a3f3..05733e818e 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -40,7 +40,6 @@
#include "main/texobj.h"
#include "main/teximage.h"
#include "main/texstate.h"
-#include "main/texfetch.h"
#include "main/framebuffer.h"
#include "main/fbobject.h"
#include "main/renderbuffer.h"
@@ -556,6 +555,8 @@ st_context_teximage(struct st_context_iface *stctxi, enum st_texture_type target
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
stImage = st_texture_image(texImage);
if (tex) {
+ gl_format texFormat;
+
/*
* XXX When internal_format and tex->format differ, st_finalize_texture
* needs to allocate a new texture with internal_format and copy the
@@ -573,11 +574,13 @@ st_context_teximage(struct st_context_iface *stctxi, enum st_texture_type target
internalFormat = GL_RGBA;
else
internalFormat = GL_RGB;
+
+ texFormat = st_ChooseTextureFormat(ctx, internalFormat,
+ GL_RGBA, GL_UNSIGNED_BYTE);
+
_mesa_init_teximage_fields(ctx, target, texImage,
- tex->width0, tex->height0, 1, 0, internalFormat);
- texImage->TexFormat = st_ChooseTextureFormat(ctx, internalFormat,
- GL_RGBA, GL_UNSIGNED_BYTE);
- _mesa_set_fetch_functions(texImage, 2);
+ tex->width0, tex->height0, 1, 0,
+ internalFormat, texFormat);
width = tex->width0;
height = tex->height0;
@@ -611,6 +614,26 @@ st_context_teximage(struct st_context_iface *stctxi, enum st_texture_type target
}
static void
+st_context_copy(struct st_context_iface *stctxi,
+ struct st_context_iface *stsrci, unsigned mask)
+{
+ struct st_context *st = (struct st_context *) stctxi;
+ struct st_context *src = (struct st_context *) stsrci;
+
+ _mesa_copy_context(src->ctx, st->ctx, mask);
+}
+
+static boolean
+st_context_share(struct st_context_iface *stctxi,
+ struct st_context_iface *stsrci)
+{
+ struct st_context *st = (struct st_context *) stctxi;
+ struct st_context *src = (struct st_context *) stsrci;
+
+ return _mesa_share_state(st->ctx, src->ctx);
+}
+
+static void
st_context_destroy(struct st_context_iface *stctxi)
{
struct st_context *st = (struct st_context *) stctxi;
@@ -677,7 +700,8 @@ st_api_create_context(struct st_api *stapi, struct st_manager *smapi,
st_context_notify_invalid_framebuffer;
st->iface.flush = st_context_flush;
st->iface.teximage = st_context_teximage;
- st->iface.copy = NULL;
+ st->iface.copy = st_context_copy;
+ st->iface.share = st_context_share;
st->iface.st_context_private = (void *) smapi;
return &st->iface;
@@ -865,6 +889,7 @@ st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *
}
static const struct st_api st_gl_api = {
+ "Mesa " MESA_VERSION_STRING,
ST_API_OPENGL,
#if FEATURE_GL
ST_PROFILE_DEFAULT_MASK |
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 95e6bd7dac..76799287fe 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -718,12 +718,42 @@ st_translate_geometry_program(struct st_context *st,
void
st_print_shaders(struct gl_context *ctx)
{
- struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
- if (shProg) {
- GLuint i;
- for (i = 0; i < shProg->NumShaders; i++) {
- printf("GLSL shader %u of %u:\n", i, shProg->NumShaders);
- printf("%s\n", shProg->Shaders[i]->Source);
+ struct gl_shader_program *shProg[3] = {
+ ctx->Shader.CurrentVertexProgram,
+ ctx->Shader.CurrentGeometryProgram,
+ ctx->Shader.CurrentFragmentProgram,
+ };
+ unsigned j;
+
+ for (j = 0; j < 3; j++) {
+ unsigned i;
+
+ if (shProg[j] == NULL)
+ continue;
+
+ for (i = 0; i < shProg[j]->NumShaders; i++) {
+ struct gl_shader *sh;
+
+ switch (shProg[j]->Shaders[i]->Type) {
+ case GL_VERTEX_SHADER:
+ sh = (i != 0) ? NULL : shProg[j]->Shaders[i];
+ break;
+ case GL_GEOMETRY_SHADER_ARB:
+ sh = (i != 1) ? NULL : shProg[j]->Shaders[i];
+ break;
+ case GL_FRAGMENT_SHADER:
+ sh = (i != 2) ? NULL : shProg[j]->Shaders[i];
+ break;
+ default:
+ assert(0);
+ sh = NULL;
+ break;
+ }
+
+ if (sh != NULL) {
+ printf("GLSL shader %u of %u:\n", i, shProg[j]->NumShaders);
+ printf("%s\n", sh->Source);
+ }
}
}
}
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 86fe3e0a89..46d6379282 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -27,8 +27,8 @@
#include "main/context.h"
#include "main/colormac.h"
#include "main/condrender.h"
-#include "main/image.h"
#include "main/macros.h"
+#include "main/pixeltransfer.h"
#include "main/imports.h"
#include "s_context.h"
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 8fbb0a8d10..4e9b5307cc 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -28,8 +28,10 @@
#include "main/condrender.h"
#include "main/context.h"
#include "main/image.h"
-#include "main/macros.h"
#include "main/imports.h"
+#include "main/macros.h"
+#include "main/pack.h"
+#include "main/pixeltransfer.h"
#include "main/state.h"
#include "s_context.h"
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c
index e421d218d7..e391043f4d 100644
--- a/src/mesa/swrast/s_fragprog.c
+++ b/src/mesa/swrast/s_fragprog.c
@@ -169,7 +169,7 @@ init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
machine->Samplers = program->Base.SamplerUnits;
/* if running a GLSL program (not ARB_fragment_program) */
- if (ctx->Shader.CurrentProgram) {
+ if (ctx->Shader.CurrentFragmentProgram) {
/* Store front/back facing value */
machine->Attribs[FRAG_ATTRIB_FACE][col][0] = 1.0F - span->facing;
}
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 55fa60749e..5e6356c0d5 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -29,8 +29,9 @@
#include "main/feedback.h"
#include "main/formats.h"
#include "main/image.h"
-#include "main/macros.h"
#include "main/imports.h"
+#include "main/macros.h"
+#include "main/pack.h"
#include "main/state.h"
#include "s_context.h"
@@ -513,7 +514,7 @@ _swrast_ReadPixels( struct gl_context *ctx,
type, pixels, &clippedPacking);
break;
default:
- _mesa_problem(ctx, "unexpected format in _swrast_ReadPixels");
+ _mesa_problem(ctx, "unexpected format 0x%x in _swrast_ReadPixels", format);
/* don't return yet, clean-up */
}
diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c
index 1775810eff..1836d074ae 100644
--- a/src/mesa/swrast/s_texcombine.c
+++ b/src/mesa/swrast/s_texcombine.c
@@ -27,8 +27,8 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/colormac.h"
-#include "main/image.h"
#include "main/imports.h"
+#include "main/pixeltransfer.h"
#include "program/prog_instruction.h"
#include "s_context.h"
diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h
index 7a889b8e2f..3c235accf3 100644
--- a/src/mesa/vbo/vbo_attrib_tmp.h
+++ b/src/mesa/vbo/vbo_attrib_tmp.h
@@ -25,6 +25,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
+/* float */
#define ATTR1FV( A, V ) ATTR( A, 1, (V)[0], 0, 0, 1 )
#define ATTR2FV( A, V ) ATTR( A, 2, (V)[0], (V)[1], 0, 1 )
#define ATTR3FV( A, V ) ATTR( A, 3, (V)[0], (V)[1], (V)[2], 1 )
@@ -35,235 +36,307 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define ATTR3F( A, X, Y, Z ) ATTR( A, 3, X, Y, Z, 1 )
#define ATTR4F( A, X, Y, Z, W ) ATTR( A, 4, X, Y, Z, W )
+/* int */
+#define ATTR2IV( A, V ) ATTR( A, 2, (V)[0], (V)[1], 0, 1 )
+#define ATTR3IV( A, V ) ATTR( A, 3, (V)[0], (V)[1], (V)[2], 1 )
+#define ATTR4IV( A, V ) ATTR( A, 4, (V)[0], (V)[1], (V)[2], (V)[3] )
+
+#define ATTR1I( A, X ) ATTR( A, 1, X, 0, 0, 1 )
+#define ATTR2I( A, X, Y ) ATTR( A, 2, X, Y, 0, 1 )
+#define ATTR3I( A, X, Y, Z ) ATTR( A, 3, X, Y, Z, 1 )
+#define ATTR4I( A, X, Y, Z, W ) ATTR( A, 4, X, Y, Z, W )
+
+
+/* uint */
+#define ATTR2UIV( A, V ) ATTR( A, 2, (V)[0], (V)[1], 0, 1 )
+#define ATTR3UIV( A, V ) ATTR( A, 3, (V)[0], (V)[1], (V)[2], 1 )
+#define ATTR4UIV( A, V ) ATTR( A, 4, (V)[0], (V)[1], (V)[2], (V)[3] )
+
+#define ATTR1UI( A, X ) ATTR( A, 1, X, 0, 0, 1 )
+#define ATTR2UI( A, X, Y ) ATTR( A, 2, X, Y, 0, 1 )
+#define ATTR3UI( A, X, Y, Z ) ATTR( A, 3, X, Y, Z, 1 )
+#define ATTR4UI( A, X, Y, Z, W ) ATTR( A, 4, X, Y, Z, W )
+
#define MAT_ATTR( A, N, V ) ATTR( A, N, (V)[0], (V)[1], (V)[2], (V)[3] )
-static void GLAPIENTRY TAG(Vertex2f)( GLfloat x, GLfloat y )
+
+
+static void GLAPIENTRY
+TAG(Vertex2f)(GLfloat x, GLfloat y)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR2F( VBO_ATTRIB_POS, x, y );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR2F(VBO_ATTRIB_POS, x, y);
}
-static void GLAPIENTRY TAG(Vertex2fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(Vertex2fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR2FV( VBO_ATTRIB_POS, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR2FV(VBO_ATTRIB_POS, v);
}
-static void GLAPIENTRY TAG(Vertex3f)( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+TAG(Vertex3f)(GLfloat x, GLfloat y, GLfloat z)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3F( VBO_ATTRIB_POS, x, y, z );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3F(VBO_ATTRIB_POS, x, y, z);
}
-static void GLAPIENTRY TAG(Vertex3fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(Vertex3fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3FV( VBO_ATTRIB_POS, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3FV(VBO_ATTRIB_POS, v);
}
-static void GLAPIENTRY TAG(Vertex4f)( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+static void GLAPIENTRY
+TAG(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR4F( VBO_ATTRIB_POS, x, y, z, w );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR4F(VBO_ATTRIB_POS, x, y, z, w);
}
-static void GLAPIENTRY TAG(Vertex4fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(Vertex4fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR4FV( VBO_ATTRIB_POS, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR4FV(VBO_ATTRIB_POS, v);
}
-static void GLAPIENTRY TAG(TexCoord1f)( GLfloat x )
+
+
+static void GLAPIENTRY
+TAG(TexCoord1f)(GLfloat x)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR1F( VBO_ATTRIB_TEX0, x );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR1F(VBO_ATTRIB_TEX0, x);
}
-static void GLAPIENTRY TAG(TexCoord1fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(TexCoord1fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR1FV( VBO_ATTRIB_TEX0, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR1FV(VBO_ATTRIB_TEX0, v);
}
-static void GLAPIENTRY TAG(TexCoord2f)( GLfloat x, GLfloat y )
+static void GLAPIENTRY
+TAG(TexCoord2f)(GLfloat x, GLfloat y)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR2F( VBO_ATTRIB_TEX0, x, y );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR2F(VBO_ATTRIB_TEX0, x, y);
}
-static void GLAPIENTRY TAG(TexCoord2fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(TexCoord2fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR2FV( VBO_ATTRIB_TEX0, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR2FV(VBO_ATTRIB_TEX0, v);
}
-static void GLAPIENTRY TAG(TexCoord3f)( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+TAG(TexCoord3f)(GLfloat x, GLfloat y, GLfloat z)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3F( VBO_ATTRIB_TEX0, x, y, z );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3F(VBO_ATTRIB_TEX0, x, y, z);
}
-static void GLAPIENTRY TAG(TexCoord3fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(TexCoord3fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3FV( VBO_ATTRIB_TEX0, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3FV(VBO_ATTRIB_TEX0, v);
}
-static void GLAPIENTRY TAG(TexCoord4f)( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+static void GLAPIENTRY
+TAG(TexCoord4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR4F( VBO_ATTRIB_TEX0, x, y, z, w );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR4F(VBO_ATTRIB_TEX0, x, y, z, w);
}
-static void GLAPIENTRY TAG(TexCoord4fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(TexCoord4fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR4FV( VBO_ATTRIB_TEX0, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR4FV(VBO_ATTRIB_TEX0, v);
}
-static void GLAPIENTRY TAG(Normal3f)( GLfloat x, GLfloat y, GLfloat z )
+
+
+static void GLAPIENTRY
+TAG(Normal3f)(GLfloat x, GLfloat y, GLfloat z)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3F( VBO_ATTRIB_NORMAL, x, y, z );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3F(VBO_ATTRIB_NORMAL, x, y, z);
}
-static void GLAPIENTRY TAG(Normal3fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(Normal3fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3FV( VBO_ATTRIB_NORMAL, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3FV(VBO_ATTRIB_NORMAL, v);
}
-static void GLAPIENTRY TAG(FogCoordfEXT)( GLfloat x )
+
+
+static void GLAPIENTRY
+TAG(FogCoordfEXT)(GLfloat x)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR1F( VBO_ATTRIB_FOG, x );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR1F(VBO_ATTRIB_FOG, x);
}
-static void GLAPIENTRY TAG(FogCoordfvEXT)( const GLfloat *v )
+
+
+static void GLAPIENTRY
+TAG(FogCoordfvEXT)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR1FV( VBO_ATTRIB_FOG, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR1FV(VBO_ATTRIB_FOG, v);
}
-static void GLAPIENTRY TAG(Color3f)( GLfloat x, GLfloat y, GLfloat z )
+static void GLAPIENTRY
+TAG(Color3f)(GLfloat x, GLfloat y, GLfloat z)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3F( VBO_ATTRIB_COLOR0, x, y, z );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3F(VBO_ATTRIB_COLOR0, x, y, z);
}
-static void GLAPIENTRY TAG(Color3fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(Color3fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3FV( VBO_ATTRIB_COLOR0, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3FV(VBO_ATTRIB_COLOR0, v);
}
-static void GLAPIENTRY TAG(Color4f)( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
+static void GLAPIENTRY
+TAG(Color4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR4F( VBO_ATTRIB_COLOR0, x, y, z, w );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR4F(VBO_ATTRIB_COLOR0, x, y, z, w);
}
-static void GLAPIENTRY TAG(Color4fv)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(Color4fv)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR4FV( VBO_ATTRIB_COLOR0, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR4FV(VBO_ATTRIB_COLOR0, v);
}
-static void GLAPIENTRY TAG(SecondaryColor3fEXT)( GLfloat x, GLfloat y, GLfloat z )
+
+
+static void GLAPIENTRY
+TAG(SecondaryColor3fEXT)(GLfloat x, GLfloat y, GLfloat z)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3F( VBO_ATTRIB_COLOR1, x, y, z );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3F(VBO_ATTRIB_COLOR1, x, y, z);
}
-static void GLAPIENTRY TAG(SecondaryColor3fvEXT)( const GLfloat *v )
+static void GLAPIENTRY
+TAG(SecondaryColor3fvEXT)(const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR3FV( VBO_ATTRIB_COLOR1, v );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR3FV(VBO_ATTRIB_COLOR1, v);
}
-static void GLAPIENTRY TAG(EdgeFlag)( GLboolean b )
+
+static void GLAPIENTRY
+TAG(EdgeFlag)(GLboolean b)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR1F( VBO_ATTRIB_EDGEFLAG, (GLfloat)b );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR1F(VBO_ATTRIB_EDGEFLAG, (GLfloat) b);
}
-static void GLAPIENTRY TAG(Indexf)( GLfloat f )
+
+
+static void GLAPIENTRY
+TAG(Indexf)(GLfloat f)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR1F( VBO_ATTRIB_INDEX, f );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR1F(VBO_ATTRIB_INDEX, f);
}
-static void GLAPIENTRY TAG(Indexfv)( const GLfloat *f )
+static void GLAPIENTRY
+TAG(Indexfv)(const GLfloat * f)
{
- GET_CURRENT_CONTEXT( ctx );
- ATTR1FV( VBO_ATTRIB_INDEX, f );
+ GET_CURRENT_CONTEXT(ctx);
+ ATTR1FV(VBO_ATTRIB_INDEX, f);
}
-static void GLAPIENTRY TAG(MultiTexCoord1f)( GLenum target, GLfloat x )
+
+static void GLAPIENTRY
+TAG(MultiTexCoord1f)(GLenum target, GLfloat x)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
- ATTR1F( attr, x );
+ ATTR1F(attr, x);
}
-static void GLAPIENTRY TAG(MultiTexCoord1fv)( GLenum target, const GLfloat *v )
+static void GLAPIENTRY
+TAG(MultiTexCoord1fv)(GLenum target, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
- ATTR1FV( attr, v );
+ ATTR1FV(attr, v);
}
-static void GLAPIENTRY TAG(MultiTexCoord2f)( GLenum target, GLfloat x, GLfloat y )
+static void GLAPIENTRY
+TAG(MultiTexCoord2f)(GLenum target, GLfloat x, GLfloat y)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
- ATTR2F( attr, x, y );
+ ATTR2F(attr, x, y);
}
-static void GLAPIENTRY TAG(MultiTexCoord2fv)( GLenum target, const GLfloat *v )
+static void GLAPIENTRY
+TAG(MultiTexCoord2fv)(GLenum target, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
- ATTR2FV( attr, v );
+ ATTR2FV(attr, v);
}
-static void GLAPIENTRY TAG(MultiTexCoord3f)( GLenum target, GLfloat x, GLfloat y,
- GLfloat z)
+static void GLAPIENTRY
+TAG(MultiTexCoord3f)(GLenum target, GLfloat x, GLfloat y, GLfloat z)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
- ATTR3F( attr, x, y, z );
+ ATTR3F(attr, x, y, z);
}
-static void GLAPIENTRY TAG(MultiTexCoord3fv)( GLenum target, const GLfloat *v )
+static void GLAPIENTRY
+TAG(MultiTexCoord3fv)(GLenum target, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
- ATTR3FV( attr, v );
+ ATTR3FV(attr, v);
}
-static void GLAPIENTRY TAG(MultiTexCoord4f)( GLenum target, GLfloat x, GLfloat y,
- GLfloat z, GLfloat w )
+static void GLAPIENTRY
+TAG(MultiTexCoord4f)(GLenum target, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
- ATTR4F( attr, x, y, z, w );
+ ATTR4F(attr, x, y, z, w);
}
-static void GLAPIENTRY TAG(MultiTexCoord4fv)( GLenum target, const GLfloat *v )
+static void GLAPIENTRY
+TAG(MultiTexCoord4fv)(GLenum target, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
- ATTR4FV( attr, v );
+ ATTR4FV(attr, v);
}
-static void GLAPIENTRY TAG(VertexAttrib1fARB)( GLuint index, GLfloat x )
+
+static void GLAPIENTRY
+TAG(VertexAttrib1fARB)(GLuint index, GLfloat x)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index == 0)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
ATTR1F(0, x);
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR1F(VBO_ATTRIB_GENERIC0 + index, x);
@@ -271,11 +344,11 @@ static void GLAPIENTRY TAG(VertexAttrib1fARB)( GLuint index, GLfloat x )
ERROR();
}
-static void GLAPIENTRY TAG(VertexAttrib1fvARB)( GLuint index,
- const GLfloat *v )
+static void GLAPIENTRY
+TAG(VertexAttrib1fvARB)(GLuint index, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index == 0)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
ATTR1FV(0, v);
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR1FV(VBO_ATTRIB_GENERIC0 + index, v);
@@ -283,11 +356,11 @@ static void GLAPIENTRY TAG(VertexAttrib1fvARB)( GLuint index,
ERROR();
}
-static void GLAPIENTRY TAG(VertexAttrib2fARB)( GLuint index, GLfloat x,
- GLfloat y )
+static void GLAPIENTRY
+TAG(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index == 0)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
ATTR2F(0, x, y);
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR2F(VBO_ATTRIB_GENERIC0 + index, x, y);
@@ -295,11 +368,11 @@ static void GLAPIENTRY TAG(VertexAttrib2fARB)( GLuint index, GLfloat x,
ERROR();
}
-static void GLAPIENTRY TAG(VertexAttrib2fvARB)( GLuint index,
- const GLfloat *v )
+static void GLAPIENTRY
+TAG(VertexAttrib2fvARB)(GLuint index, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index == 0)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
ATTR2FV(0, v);
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR2FV(VBO_ATTRIB_GENERIC0 + index, v);
@@ -307,11 +380,11 @@ static void GLAPIENTRY TAG(VertexAttrib2fvARB)( GLuint index,
ERROR();
}
-static void GLAPIENTRY TAG(VertexAttrib3fARB)( GLuint index, GLfloat x,
- GLfloat y, GLfloat z )
+static void GLAPIENTRY
+TAG(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index == 0)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
ATTR3F(0, x, y, z);
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR3F(VBO_ATTRIB_GENERIC0 + index, x, y, z);
@@ -319,11 +392,11 @@ static void GLAPIENTRY TAG(VertexAttrib3fARB)( GLuint index, GLfloat x,
ERROR();
}
-static void GLAPIENTRY TAG(VertexAttrib3fvARB)( GLuint index,
- const GLfloat *v )
+static void GLAPIENTRY
+TAG(VertexAttrib3fvARB)(GLuint index, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index == 0)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
ATTR3FV(0, v);
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR3FV(VBO_ATTRIB_GENERIC0 + index, v);
@@ -331,12 +404,11 @@ static void GLAPIENTRY TAG(VertexAttrib3fvARB)( GLuint index,
ERROR();
}
-static void GLAPIENTRY TAG(VertexAttrib4fARB)( GLuint index, GLfloat x,
- GLfloat y, GLfloat z,
- GLfloat w )
+static void GLAPIENTRY
+TAG(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index == 0)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
ATTR4F(0, x, y, z, w);
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR4F(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
@@ -344,11 +416,11 @@ static void GLAPIENTRY TAG(VertexAttrib4fARB)( GLuint index, GLfloat x,
ERROR();
}
-static void GLAPIENTRY TAG(VertexAttrib4fvARB)( GLuint index,
- const GLfloat *v )
+static void GLAPIENTRY
+TAG(VertexAttrib4fvARB)(GLuint index, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index == 0)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
ATTR4FV(0, v);
else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
ATTR4FV(VBO_ATTRIB_GENERIC0 + index, v);
@@ -357,76 +429,257 @@ static void GLAPIENTRY TAG(VertexAttrib4fvARB)( GLuint index,
}
+
+/* Integer-valued generic attributes.
+ * XXX: the integers just get converted to floats at this time
+ */
+static void GLAPIENTRY
+TAG(VertexAttribI1i)(GLuint index, GLint x)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR1I(0, x);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR1I(VBO_ATTRIB_GENERIC0 + index, x);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI2i)(GLuint index, GLint x, GLint y)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR2I(0, x, y);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR2I(VBO_ATTRIB_GENERIC0 + index, x, y);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR3I(0, x, y, z);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR3I(VBO_ATTRIB_GENERIC0 + index, x, y, z);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR4I(0, x, y, z, w);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR4I(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI2iv)(GLuint index, const GLint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR2IV(0, v);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR2IV(VBO_ATTRIB_GENERIC0 + index, v);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI3iv)(GLuint index, const GLint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR3IV(0, v);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR3IV(VBO_ATTRIB_GENERIC0 + index, v);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI4iv)(GLuint index, const GLint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR4IV(0, v);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR4IV(VBO_ATTRIB_GENERIC0 + index, v);
+ else
+ ERROR();
+}
+
+
+
+/* Unsigned integer-valued generic attributes.
+ * XXX: the integers just get converted to floats at this time
+ */
+static void GLAPIENTRY
+TAG(VertexAttribI1ui)(GLuint index, GLuint x)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR1UI(0, x);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR1UI(VBO_ATTRIB_GENERIC0 + index, x);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI2ui)(GLuint index, GLuint x, GLuint y)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR2UI(0, x, y);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR2UI(VBO_ATTRIB_GENERIC0 + index, x, y);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR3UI(0, x, y, z);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR3UI(VBO_ATTRIB_GENERIC0 + index, x, y, z);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR4UI(0, x, y, z, w);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR4UI(VBO_ATTRIB_GENERIC0 + index, x, y, z, w);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI2uiv)(GLuint index, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR2UIV(0, v);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR2UIV(VBO_ATTRIB_GENERIC0 + index, v);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI3uiv)(GLuint index, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR3UIV(0, v);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR3UIV(VBO_ATTRIB_GENERIC0 + index, v);
+ else
+ ERROR();
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribI4uiv)(GLuint index, const GLuint *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (index == 0)
+ ATTR4UIV(0, v);
+ else if (index < MAX_VERTEX_GENERIC_ATTRIBS)
+ ATTR4UIV(VBO_ATTRIB_GENERIC0 + index, v);
+ else
+ ERROR();
+}
+
+
+
/* In addition to supporting NV_vertex_program, these entrypoints are
* used by the display list and other code specifically because of
* their property of aliasing with other attributes. (See
* vbo_save_loopback.c)
*/
-static void GLAPIENTRY TAG(VertexAttrib1fNV)( GLuint index, GLfloat x )
+static void GLAPIENTRY
+TAG(VertexAttrib1fNV)(GLuint index, GLfloat x)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
if (index < VBO_ATTRIB_MAX)
ATTR1F(index, x);
}
-static void GLAPIENTRY TAG(VertexAttrib1fvNV)( GLuint index,
- const GLfloat *v )
+static void GLAPIENTRY
+TAG(VertexAttrib1fvNV)(GLuint index, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index < VBO_ATTRIB_MAX)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index < VBO_ATTRIB_MAX)
ATTR1FV(index, v);
}
-static void GLAPIENTRY TAG(VertexAttrib2fNV)( GLuint index, GLfloat x,
- GLfloat y )
+static void GLAPIENTRY
+TAG(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index < VBO_ATTRIB_MAX)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index < VBO_ATTRIB_MAX)
ATTR2F(index, x, y);
}
-static void GLAPIENTRY TAG(VertexAttrib2fvNV)( GLuint index,
- const GLfloat *v )
+static void GLAPIENTRY
+TAG(VertexAttrib2fvNV)(GLuint index, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index < VBO_ATTRIB_MAX)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index < VBO_ATTRIB_MAX)
ATTR2FV(index, v);
}
-static void GLAPIENTRY TAG(VertexAttrib3fNV)( GLuint index, GLfloat x,
- GLfloat y, GLfloat z )
+static void GLAPIENTRY
+TAG(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index < VBO_ATTRIB_MAX)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index < VBO_ATTRIB_MAX)
ATTR3F(index, x, y, z);
}
-static void GLAPIENTRY TAG(VertexAttrib3fvNV)( GLuint index,
- const GLfloat *v )
+static void GLAPIENTRY
+TAG(VertexAttrib3fvNV)(GLuint index,
+ const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index < VBO_ATTRIB_MAX)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index < VBO_ATTRIB_MAX)
ATTR3FV(index, v);
}
-static void GLAPIENTRY TAG(VertexAttrib4fNV)( GLuint index, GLfloat x,
- GLfloat y, GLfloat z,
- GLfloat w )
+static void GLAPIENTRY
+TAG(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index < VBO_ATTRIB_MAX)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index < VBO_ATTRIB_MAX)
ATTR4F(index, x, y, z, w);
}
-static void GLAPIENTRY TAG(VertexAttrib4fvNV)( GLuint index,
- const GLfloat *v )
+static void GLAPIENTRY
+TAG(VertexAttrib4fvNV)(GLuint index, const GLfloat * v)
{
- GET_CURRENT_CONTEXT( ctx );
- if (index < VBO_ATTRIB_MAX)
+ GET_CURRENT_CONTEXT(ctx);
+ if (index < VBO_ATTRIB_MAX)
ATTR4FV(index, v);
}
+
#define MAT( ATTR, N, face, params ) \
do { \
if (face != GL_BACK) \
@@ -438,32 +691,33 @@ do { \
/* Colormaterial conflicts are dealt with later.
*/
-static void GLAPIENTRY TAG(Materialfv)( GLenum face, GLenum pname,
- const GLfloat *params )
+static void GLAPIENTRY
+TAG(Materialfv)(GLenum face, GLenum pname,
+ const GLfloat * params)
{
- GET_CURRENT_CONTEXT( ctx );
+ GET_CURRENT_CONTEXT(ctx);
switch (pname) {
case GL_EMISSION:
- MAT( VBO_ATTRIB_MAT_FRONT_EMISSION, 4, face, params );
+ MAT(VBO_ATTRIB_MAT_FRONT_EMISSION, 4, face, params);
break;
case GL_AMBIENT:
- MAT( VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params );
+ MAT(VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params);
break;
case GL_DIFFUSE:
- MAT( VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params );
+ MAT(VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params);
break;
case GL_SPECULAR:
- MAT( VBO_ATTRIB_MAT_FRONT_SPECULAR, 4, face, params );
+ MAT(VBO_ATTRIB_MAT_FRONT_SPECULAR, 4, face, params);
break;
case GL_SHININESS:
- MAT( VBO_ATTRIB_MAT_FRONT_SHININESS, 1, face, params );
+ MAT(VBO_ATTRIB_MAT_FRONT_SHININESS, 1, face, params);
break;
case GL_COLOR_INDEXES:
- MAT( VBO_ATTRIB_MAT_FRONT_INDEXES, 3, face, params );
+ MAT(VBO_ATTRIB_MAT_FRONT_INDEXES, 3, face, params);
break;
case GL_AMBIENT_AND_DIFFUSE:
- MAT( VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params );
- MAT( VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params );
+ MAT(VBO_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params);
+ MAT(VBO_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params);
break;
default:
ERROR();
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 1ef4917419..9b2d59f9e4 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -220,8 +220,9 @@ static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
struct gl_context *ctx = exec->ctx;
struct vbo_context *vbo = vbo_context(ctx);
GLint lastcount = exec->vtx.vert_count;
- GLfloat *tmp;
- GLuint oldsz;
+ GLfloat *old_attrptr[VBO_ATTRIB_MAX];
+ GLuint old_vtx_size = exec->vtx.vertex_size;
+ GLuint oldsz = exec->vtx.attrsz[attr];
GLuint i;
/* Run pipeline on current vertices, copy wrapped vertices
@@ -229,86 +230,103 @@ static void vbo_exec_wrap_upgrade_vertex( struct vbo_exec_context *exec,
*/
vbo_exec_wrap_buffers( exec );
+ if (unlikely(exec->vtx.copied.nr)) {
+ /* We're in the middle of a primitive, keep the old vertex
+ * format around to be able to translate the copied vertices to
+ * the new format.
+ */
+ memcpy(old_attrptr, exec->vtx.attrptr, sizeof(old_attrptr));
+ }
- /* Do a COPY_TO_CURRENT to ensure back-copying works for the case
- * when the attribute already exists in the vertex and is having
- * its size increased.
- */
- vbo_exec_copy_to_current( exec );
-
+ if (unlikely(oldsz)) {
+ /* Do a COPY_TO_CURRENT to ensure back-copying works for the
+ * case when the attribute already exists in the vertex and is
+ * having its size increased.
+ */
+ vbo_exec_copy_to_current( exec );
+ }
/* Heuristic: Attempt to isolate attributes received outside
* begin/end so that they don't bloat the vertices.
*/
if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END &&
- exec->vtx.attrsz[attr] == 0 &&
- lastcount > 8 &&
- exec->vtx.vertex_size) {
+ !oldsz && lastcount > 8 && exec->vtx.vertex_size) {
+ vbo_exec_copy_to_current( exec );
reset_attrfv( exec );
}
/* Fix up sizes:
*/
- oldsz = exec->vtx.attrsz[attr];
exec->vtx.attrsz[attr] = newsz;
-
exec->vtx.vertex_size += newsz - oldsz;
exec->vtx.max_vert = ((VBO_VERT_BUFFER_SIZE - exec->vtx.buffer_used) /
(exec->vtx.vertex_size * sizeof(GLfloat)));
exec->vtx.vert_count = 0;
exec->vtx.buffer_ptr = exec->vtx.buffer_map;
-
- /* Recalculate all the attrptr[] values
- */
- for (i = 0, tmp = exec->vtx.vertex ; i < VBO_ATTRIB_MAX ; i++) {
- if (exec->vtx.attrsz[i]) {
- exec->vtx.attrptr[i] = tmp;
- tmp += exec->vtx.attrsz[i];
+ if (unlikely(oldsz)) {
+ /* Size changed, recalculate all the attrptr[] values
+ */
+ GLfloat *tmp = exec->vtx.vertex;
+
+ for (i = 0 ; i < VBO_ATTRIB_MAX ; i++) {
+ if (exec->vtx.attrsz[i]) {
+ exec->vtx.attrptr[i] = tmp;
+ tmp += exec->vtx.attrsz[i];
+ }
+ else
+ exec->vtx.attrptr[i] = NULL; /* will not be dereferenced */
}
- else
- exec->vtx.attrptr[i] = NULL; /* will not be dereferenced */
- }
- /* Copy from current to repopulate the vertex with correct values.
- */
- vbo_exec_copy_from_current( exec );
+ /* Copy from current to repopulate the vertex with correct
+ * values.
+ */
+ vbo_exec_copy_from_current( exec );
+
+ } else {
+ /* Just have to append the new attribute at the end */
+ exec->vtx.attrptr[attr] = exec->vtx.vertex +
+ exec->vtx.vertex_size - newsz;
+ }
/* Replay stored vertices to translate them
* to new format here.
*
* -- No need to replay - just copy piecewise
*/
- if (exec->vtx.copied.nr)
- {
+ if (unlikely(exec->vtx.copied.nr)) {
GLfloat *data = exec->vtx.copied.buffer;
GLfloat *dest = exec->vtx.buffer_ptr;
GLuint j;
assert(exec->vtx.buffer_ptr == exec->vtx.buffer_map);
-
+
for (i = 0 ; i < exec->vtx.copied.nr ; i++) {
for (j = 0 ; j < VBO_ATTRIB_MAX ; j++) {
- if (exec->vtx.attrsz[j]) {
+ GLuint sz = exec->vtx.attrsz[j];
+
+ if (sz) {
+ GLint old_offset = old_attrptr[j] - exec->vtx.vertex;
+ GLint new_offset = exec->vtx.attrptr[j] - exec->vtx.vertex;
+
if (j == attr) {
if (oldsz) {
- COPY_CLEAN_4V( dest, oldsz, data );
- data += oldsz;
- dest += newsz;
+ GLfloat tmp[4];
+ COPY_CLEAN_4V(tmp, oldsz, data + old_offset);
+ COPY_SZ_4V(dest + new_offset, newsz, tmp);
} else {
- const GLfloat *current = (const GLfloat *)vbo->currval[j].Ptr;
- COPY_SZ_4V( dest, newsz, current );
- dest += newsz;
+ GLfloat *current = (GLfloat *)vbo->currval[j].Ptr;
+ COPY_SZ_4V(dest + new_offset, sz, current);
}
}
else {
- GLuint sz = exec->vtx.attrsz[j];
- COPY_SZ_4V( dest, sz, data );
- dest += sz;
- data += sz;
+ COPY_SZ_4V(dest + new_offset, sz, data + old_offset);
}
}
}
+
+ data += old_vtx_size;
+ dest += exec->vtx.vertex_size;
}
exec->vtx.buffer_ptr = dest;
@@ -658,6 +676,24 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec )
vfmt->VertexAttrib4fNV = vbo_VertexAttrib4fNV;
vfmt->VertexAttrib4fvNV = vbo_VertexAttrib4fvNV;
+ /* integer-valued */
+ vfmt->VertexAttribI1i = vbo_VertexAttribI1i;
+ vfmt->VertexAttribI2i = vbo_VertexAttribI2i;
+ vfmt->VertexAttribI3i = vbo_VertexAttribI3i;
+ vfmt->VertexAttribI4i = vbo_VertexAttribI4i;
+ vfmt->VertexAttribI2iv = vbo_VertexAttribI2iv;
+ vfmt->VertexAttribI3iv = vbo_VertexAttribI3iv;
+ vfmt->VertexAttribI4iv = vbo_VertexAttribI4iv;
+
+ /* unsigned integer-valued */
+ vfmt->VertexAttribI1ui = vbo_VertexAttribI1ui;
+ vfmt->VertexAttribI2ui = vbo_VertexAttribI2ui;
+ vfmt->VertexAttribI3ui = vbo_VertexAttribI3ui;
+ vfmt->VertexAttribI4ui = vbo_VertexAttribI4ui;
+ vfmt->VertexAttribI2uiv = vbo_VertexAttribI2uiv;
+ vfmt->VertexAttribI3uiv = vbo_VertexAttribI3uiv;
+ vfmt->VertexAttribI4uiv = vbo_VertexAttribI4uiv;
+
vfmt->Materialfv = vbo_Materialfv;
vfmt->EdgeFlag = vbo_EdgeFlag;
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 71ac0066ca..94aa021ac9 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -160,7 +160,6 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
struct vbo_exec_context *exec = &vbo->exec;
struct gl_client_array *arrays = exec->vtx.arrays;
const GLuint count = exec->vtx.vert_count;
- const GLubyte *data = (GLubyte *) exec->vtx.buffer_map;
const GLuint *map;
GLuint attr;
GLbitfield varying_inputs = 0x0;
@@ -215,6 +214,9 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
const GLuint src = map[attr];
if (exec->vtx.attrsz[src]) {
+ GLsizeiptr offset = (GLbyte *)exec->vtx.attrptr[src] -
+ (GLbyte *)exec->vtx.vertex;
+
/* override the default array set above */
ASSERT(attr < Elements(exec->vtx.inputs));
ASSERT(attr < Elements(exec->vtx.arrays)); /* arrays[] */
@@ -222,17 +224,13 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
if (_mesa_is_bufferobj(exec->vtx.bufferobj)) {
/* a real buffer obj: Ptr is an offset, not a pointer*/
- GLsizeiptr offset;
assert(exec->vtx.bufferobj->Pointer); /* buf should be mapped */
- offset = (GLbyte *) data -
- (GLbyte *) exec->vtx.bufferobj->Pointer +
- exec->vtx.bufferobj->Offset;
assert(offset >= 0);
- arrays[attr].Ptr = (void *) offset;
+ arrays[attr].Ptr = (GLubyte *)exec->vtx.bufferobj->Offset + offset;
}
else {
/* Ptr into ordinary app memory */
- arrays[attr].Ptr = (void *) data;
+ arrays[attr].Ptr = (GLubyte *)exec->vtx.buffer_map + offset;
}
arrays[attr].Size = exec->vtx.attrsz[src];
arrays[attr].StrideB = exec->vtx.vertex_size * sizeof(GLfloat);
@@ -245,7 +243,6 @@ vbo_exec_bind_arrays( struct gl_context *ctx )
exec->vtx.bufferobj);
arrays[attr]._MaxElement = count; /* ??? */
- data += exec->vtx.attrsz[src] * sizeof(GLfloat);
varying_inputs |= 1 << attr;
}
}
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 19c4b15d5f..817d478e2a 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -705,56 +705,56 @@ static void GLAPIENTRY _save_EvalCoord1f( GLfloat u )
{
GET_CURRENT_CONTEXT(ctx);
DO_FALLBACK(ctx);
- ctx->Save->EvalCoord1f( u );
+ CALL_EvalCoord1f(ctx->Save, (u));
}
static void GLAPIENTRY _save_EvalCoord1fv( const GLfloat *v )
{
GET_CURRENT_CONTEXT(ctx);
DO_FALLBACK(ctx);
- ctx->Save->EvalCoord1fv( v );
+ CALL_EvalCoord1fv(ctx->Save, (v));
}
static void GLAPIENTRY _save_EvalCoord2f( GLfloat u, GLfloat v )
{
GET_CURRENT_CONTEXT(ctx);
DO_FALLBACK(ctx);
- ctx->Save->EvalCoord2f( u, v );
+ CALL_EvalCoord2f(ctx->Save, (u, v));
}
static void GLAPIENTRY _save_EvalCoord2fv( const GLfloat *v )
{
GET_CURRENT_CONTEXT(ctx);
DO_FALLBACK(ctx);
- ctx->Save->EvalCoord2fv( v );
+ CALL_EvalCoord2fv(ctx->Save, (v));
}
static void GLAPIENTRY _save_EvalPoint1( GLint i )
{
GET_CURRENT_CONTEXT(ctx);
DO_FALLBACK(ctx);
- ctx->Save->EvalPoint1( i );
+ CALL_EvalPoint1(ctx->Save, (i));
}
static void GLAPIENTRY _save_EvalPoint2( GLint i, GLint j )
{
GET_CURRENT_CONTEXT(ctx);
DO_FALLBACK(ctx);
- ctx->Save->EvalPoint2( i, j );
+ CALL_EvalPoint2(ctx->Save, (i, j));
}
static void GLAPIENTRY _save_CallList( GLuint l )
{
GET_CURRENT_CONTEXT(ctx);
DO_FALLBACK(ctx);
- ctx->Save->CallList( l );
+ CALL_CallList(ctx->Save, (l));
}
static void GLAPIENTRY _save_CallLists( GLsizei n, GLenum type, const GLvoid *v )
{
GET_CURRENT_CONTEXT(ctx);
DO_FALLBACK(ctx);
- ctx->Save->CallLists( n, type, v );
+ CALL_CallLists(ctx->Save, (n, type, v));
}
@@ -1065,6 +1065,24 @@ static void _save_vtxfmt_init( struct gl_context *ctx )
vfmt->VertexAttrib4fNV = _save_VertexAttrib4fNV;
vfmt->VertexAttrib4fvNV = _save_VertexAttrib4fvNV;
+ /* integer-valued */
+ vfmt->VertexAttribI1i = _save_VertexAttribI1i;
+ vfmt->VertexAttribI2i = _save_VertexAttribI2i;
+ vfmt->VertexAttribI3i = _save_VertexAttribI3i;
+ vfmt->VertexAttribI4i = _save_VertexAttribI4i;
+ vfmt->VertexAttribI2iv = _save_VertexAttribI2iv;
+ vfmt->VertexAttribI3iv = _save_VertexAttribI3iv;
+ vfmt->VertexAttribI4iv = _save_VertexAttribI4iv;
+
+ /* unsigned integer-valued */
+ vfmt->VertexAttribI1ui = _save_VertexAttribI1ui;
+ vfmt->VertexAttribI2ui = _save_VertexAttribI2ui;
+ vfmt->VertexAttribI3ui = _save_VertexAttribI3ui;
+ vfmt->VertexAttribI4ui = _save_VertexAttribI4ui;
+ vfmt->VertexAttribI2uiv = _save_VertexAttribI2uiv;
+ vfmt->VertexAttribI3uiv = _save_VertexAttribI3uiv;
+ vfmt->VertexAttribI4uiv = _save_VertexAttribI4uiv;
+
/* This will all require us to fallback to saving the list as opcodes:
*/
_MESA_INIT_DLIST_VTXFMT(vfmt, _save_); /* inside begin/end */