summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/common/driverfuncs.c13
-rw-r--r--src/mesa/drivers/common/meta.c8
-rw-r--r--src/mesa/drivers/dri/Makefile2
-rw-r--r--src/mesa/drivers/dri/Makefile.template6
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c11
-rw-r--r--src/mesa/drivers/dri/common/spantmp2.h154
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_vbtmp.h8
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_render.c10
-rw-r--r--src/mesa/drivers/dri/i915/i830_texstate.c10
-rw-r--r--src/mesa/drivers/dri/i915/i830_vtbl.c15
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.h1
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c2
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c32
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c17
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c10
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c79
-rw-r--r--src/mesa/drivers/dri/i965/brw_cc.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.h9
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_line.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_tri.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h28
-rw-r--r--src/mesa/drivers/dri/i965/brw_curbe.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_defines.h16
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c21
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu.h10
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.h9
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs_emit.c38
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_emit.c18
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_state.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h9
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_cache.c60
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c5
-rw-r--r--src/mesa/drivers/dri/i965/brw_util.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_util.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c85
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_state.c37
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_surface_state.c15
-rw-r--r--src/mesa/drivers/dri/i965/brw_vtbl.c30
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c17
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.h145
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_emit.c665
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_fp.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_glsl.c1196
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass0.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass2.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_state.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c8
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.c41
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.h12
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c5
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffer_objects.c21
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.c21
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_clear.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c63
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h81
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c32
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c24
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c31
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.h3
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_bitmap.c7
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_copy.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c58
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c38
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.c16
-rw-r--r--src/mesa/drivers/dri/intel/intel_spantmp.h4
-rw-r--r--src/mesa/drivers/dri/intel/intel_state.c20
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c12
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_format.c12
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c17
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_obj.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_validate.c12
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_native_vb.c30
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h36
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_vbtmp.h86
-rw-r--r--src/mesa/drivers/dri/r128/r128_tris.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos_arrays.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c7
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_state_init.c17
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.c15
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.c21
-rw-r--r--src/mesa/drivers/dri/r200/r200_texstate.c36
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program.h2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c10
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c19
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c6
-rw-r--r--src/mesa/drivers/dri/r300/r300_draw.c15
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.h1
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_swtcl.c18
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c23
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c34
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.c27
-rw-r--r--src/mesa/drivers/dri/r600/r600_reg_r6xx.h6
-rw-r--r--src/mesa/drivers/dri/r600/r600_reg_r7xx.h2
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.c17
-rw-r--r--src/mesa/drivers/dri/r600/r600_texstate.c50
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c2687
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.h131
-rw-r--r--src/mesa/drivers/dri/r600/r700_chip.c119
-rw-r--r--src/mesa/drivers/dri/r600/r700_fragprog.c178
-rw-r--r--src/mesa/drivers/dri/r600/r700_fragprog.h6
-rw-r--r--src/mesa/drivers/dri/r600/r700_render.c221
-rw-r--r--src/mesa/drivers/dri/r600/r700_shader.c9
-rw-r--r--src/mesa/drivers/dri/r600/r700_shader.h3
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c75
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.h2
-rw-r--r--src/mesa/drivers/dri/r600/r700_vertprog.c45
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bo_drm.h13
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_buffer_objects.c5
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c13
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c60
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.h9
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_dma.c35
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c34
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_lock.c9
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_arrays.c46
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h58
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_verts.c26
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c567
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h31
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_queryobj.c37
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c12
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_span.c132
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state_init.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c18
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c54
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c525
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.h3
-rw-r--r--src/mesa/drivers/dri/savage/savagerender.c8
-rw-r--r--src/mesa/drivers/dri/savage/savagetris.c18
-rw-r--r--src/mesa/drivers/dri/sis/sis_tris.c4
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_span.c72
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_vb.c14
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h30
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.c4
-rw-r--r--src/mesa/drivers/glide/fxvb.c34
-rw-r--r--src/mesa/drivers/glide/fxvbtmp.h35
-rw-r--r--src/mesa/drivers/glslcompiler/Makefile2
-rw-r--r--src/mesa/drivers/windows/gdi/mesa.def11
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c20
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c20
-rw-r--r--src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c2
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c20
-rw-r--r--src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c2
-rw-r--r--src/mesa/drivers/x11/xm_span.c8
-rw-r--r--src/mesa/glapi/ARB_framebuffer_object.xml34
-rw-r--r--src/mesa/glapi/EXT_framebuffer_object.xml40
-rw-r--r--src/mesa/glapi/EXT_packed_depth_stencil.xml18
-rw-r--r--src/mesa/glapi/EXT_texture_array.xml1
-rw-r--r--src/mesa/glapi/Makefile7
-rw-r--r--src/mesa/glapi/gl_API.xml25
-rw-r--r--src/mesa/glapi/glapitemp.h6
-rw-r--r--src/mesa/glapi/glprocs.h198
-rw-r--r--src/mesa/main/buffers.c55
-rw-r--r--src/mesa/main/colormac.h6
-rw-r--r--src/mesa/main/compiler.h7
-rw-r--r--src/mesa/main/config.h2
-rw-r--r--src/mesa/main/context.c9
-rw-r--r--src/mesa/main/dd.h28
-rw-r--r--src/mesa/main/enums.c5282
-rw-r--r--src/mesa/main/extensions.c7
-rw-r--r--src/mesa/main/fbobject.c132
-rw-r--r--src/mesa/main/ffvertex_prog.c3
-rw-r--r--src/mesa/main/formats.c38
-rw-r--r--src/mesa/main/formats.h5
-rw-r--r--src/mesa/main/get.c350
-rw-r--r--src/mesa/main/get_gen.py4
-rw-r--r--src/mesa/main/histogram.c7
-rw-r--r--src/mesa/main/imports.c8
-rw-r--r--src/mesa/main/mtypes.h31
-rw-r--r--src/mesa/main/points.c7
-rw-r--r--src/mesa/main/remap_helper.h2292
-rw-r--r--src/mesa/main/texenv.c5
-rw-r--r--src/mesa/main/texenvprogram.c2
-rw-r--r--src/mesa/main/texfetch.c23
-rw-r--r--src/mesa/main/texfetch_tmp.h72
-rw-r--r--src/mesa/main/texformat.c6
-rw-r--r--src/mesa/main/texgen.c10
-rw-r--r--src/mesa/main/texgetimage.c46
-rw-r--r--src/mesa/main/teximage.c65
-rw-r--r--src/mesa/main/teximage.h3
-rw-r--r--src/mesa/main/texobj.c3
-rw-r--r--src/mesa/main/texparam.c17
-rw-r--r--src/mesa/main/texstore.c90
-rw-r--r--src/mesa/main/varray.c102
-rw-r--r--src/mesa/main/version.h6
-rw-r--r--src/mesa/shader/arbprogparse.c6
-rw-r--r--src/mesa/shader/arbprogram.c44
-rw-r--r--src/mesa/shader/lex.yy.c419
-rw-r--r--src/mesa/shader/nvprogram.c29
-rw-r--r--src/mesa/shader/prog_instruction.h1
-rw-r--r--src/mesa/shader/prog_optimize.c256
-rw-r--r--src/mesa/shader/prog_print.c6
-rw-r--r--src/mesa/shader/program_lexer.l45
-rw-r--r--src/mesa/shader/program_parse.tab.c1620
-rw-r--r--src/mesa/shader/program_parse.tab.h151
-rw-r--r--src/mesa/shader/program_parse.y54
-rw-r--r--src/mesa/shader/program_parser.h18
-rw-r--r--src/mesa/shader/programopt.c8
-rw-r--r--src/mesa/shader/slang/slang_codegen.c2
-rw-r--r--src/mesa/shader/slang/slang_emit.c201
-rw-r--r--src/mesa/shader/slang/slang_link.c47
-rw-r--r--src/mesa/shader/slang/slang_vartable.c4
-rw-r--r--src/mesa/sparc/glapi_sparc.S1
-rw-r--r--src/mesa/state_tracker/st_atom.c11
-rw-r--r--src/mesa/state_tracker/st_atom.h3
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c5
-rw-r--r--src/mesa/state_tracker/st_atom_pixeltransfer.c2
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c9
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c326
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c8
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c7
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c3
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c166
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c15
-rw-r--r--src/mesa/state_tracker/st_cb_program.c43
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c16
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c120
-rw-r--r--src/mesa/state_tracker/st_context.h2
-rw-r--r--src/mesa/state_tracker/st_debug.c3
-rw-r--r--src/mesa/state_tracker/st_draw.c20
-rw-r--r--src/mesa/state_tracker/st_draw_feedback.c8
-rw-r--r--src/mesa/state_tracker/st_extensions.c5
-rw-r--r--src/mesa/state_tracker/st_format.c36
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c43
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c35
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.h4
-rw-r--r--src/mesa/state_tracker/st_program.c372
-rw-r--r--src/mesa/state_tracker/st_program.h75
-rw-r--r--src/mesa/state_tracker/st_texture.c42
-rw-r--r--src/mesa/swrast/s_fragprog.c12
-rw-r--r--src/mesa/swrast/s_readpix.c28
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h18
-rw-r--r--src/mesa/tnl/t_context.c2
-rw-r--r--src/mesa/tnl/t_context.h22
-rw-r--r--src/mesa/tnl/t_draw.c20
-rw-r--r--src/mesa/tnl/t_pipeline.c4
-rw-r--r--src/mesa/tnl/t_vb_fog.c14
-rw-r--r--src/mesa/tnl/t_vb_light.c16
-rw-r--r--src/mesa/tnl/t_vb_lighttmp.h28
-rw-r--r--src/mesa/tnl/t_vb_normals.c1
-rw-r--r--src/mesa/tnl/t_vb_program.c17
-rw-r--r--src/mesa/tnl/t_vb_texgen.c3
-rw-r--r--src/mesa/tnl/t_vb_texmat.c1
-rw-r--r--src/mesa/tnl/t_vb_vertex.c6
-rw-r--r--src/mesa/tnl/t_vertex_generic.c46
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp.h4
-rw-r--r--src/mesa/tnl_dd/t_dd_tritmp.h38
-rw-r--r--src/mesa/tnl_dd/t_dd_vb.c30
-rw-r--r--src/mesa/tnl_dd/t_dd_vbtmp.h88
-rw-r--r--src/mesa/vbo/vbo_exec.h6
-rw-r--r--src/mesa/vbo/vbo_exec_api.c25
-rw-r--r--src/mesa/vbo/vbo_exec_array.c2
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c4
-rw-r--r--src/mesa/x86-64/glapi_x86-64.S1
-rw-r--r--src/mesa/x86/gen_matypes.c20
-rw-r--r--src/mesa/x86/glapi_x86.S1
276 files changed, 13182 insertions, 10045 deletions
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index e5aab02a42c..4ca0e7bcc37 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -183,19 +183,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->TexParameter = NULL;
driver->Viewport = NULL;
- /* vertex arrays */
- driver->VertexPointer = NULL;
- driver->NormalPointer = NULL;
- driver->ColorPointer = NULL;
- driver->FogCoordPointer = NULL;
- driver->IndexPointer = NULL;
- driver->SecondaryColorPointer = NULL;
- driver->TexCoordPointer = NULL;
- driver->EdgeFlagPointer = NULL;
- driver->VertexAttribPointer = NULL;
- driver->LockArraysEXT = NULL;
- driver->UnlockArraysEXT = NULL;
-
/* state queries */
driver->GetBooleanv = NULL;
driver->GetDoublev = NULL;
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 22cd6de5640..a4315191434 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -2464,7 +2464,6 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
GLenum internalFormat, GLint x, GLint y,
GLsizei width, GLsizei height, GLint border)
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLsizei postConvWidth = width, postConvHeight = height;
@@ -2472,8 +2471,7 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
GLint bpp;
void *buf;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
format = _mesa_base_tex_format(ctx, internalFormat);
@@ -2583,15 +2581,13 @@ copy_tex_sub_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level,
GLint x, GLint y,
GLsizei width, GLsizei height)
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GLenum format, type;
GLint bpp;
void *buf;
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
format = _mesa_get_format_base_format(texImage->TexFormat);
diff --git a/src/mesa/drivers/dri/Makefile b/src/mesa/drivers/dri/Makefile
index 32db0978613..264648c3fbc 100644
--- a/src/mesa/drivers/dri/Makefile
+++ b/src/mesa/drivers/dri/Makefile
@@ -25,7 +25,7 @@ pcedit = sed \
-e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
-e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
- -e 's,@DRI_DRIVER_DIR@,$(DRI_DRIVER_SEARCH_DIR),' \
+ -e 's,@DRI_DRIVER_DIR@,$(DRI_DRIVER_INSTALL_DIR),' \
-e 's,@DRI_PC_REQ_PRIV@,$(DRI_PC_REQ_PRIV),'
dri.pc: dri.pc.in
diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index 1ce9315530c..39d25ce3f47 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -60,9 +60,13 @@ SHARED_INCLUDES = \
##### TARGETS #####
-default: symlinks subdirs depend $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
+default: subdirs lib
+.PHONY: lib
+lib: symlinks subdirs depend
+ @$(MAKE) $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
+
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(EXTRA_MODULES) $(WINOBJ) Makefile \
$(TOP)/src/mesa/drivers/dri/Makefile.template
$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index e48e10d7c06..da81ec9de51 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -167,11 +167,12 @@ static int driBindContext(__DRIcontext *pcp,
__DRIdrawable *pdp,
__DRIdrawable *prp)
{
- __DRIscreenPrivate *psp = pcp->driScreenPriv;
+ __DRIscreenPrivate *psp;
/* Bind the drawable to the context */
if (pcp) {
+ psp = pcp->driScreenPriv;
pcp->driDrawablePriv = pdp;
pcp->driReadablePriv = prp;
if (pdp) {
@@ -498,11 +499,11 @@ static void dri_put_drawable(__DRIdrawable *pdp)
{
__DRIscreenPrivate *psp;
- pdp->refcount--;
- if (pdp->refcount)
- return;
-
if (pdp) {
+ pdp->refcount--;
+ if (pdp->refcount)
+ return;
+
psp = pdp->driScreenPriv;
(*psp->DriverAPI.DestroyBuffer)(pdp);
if (pdp->pClipRects) {
diff --git a/src/mesa/drivers/dri/common/spantmp2.h b/src/mesa/drivers/dri/common/spantmp2.h
index 89c815722f6..95f97414a98 100644
--- a/src/mesa/drivers/dri/common/spantmp2.h
+++ b/src/mesa/drivers/dri/common/spantmp2.h
@@ -82,6 +82,72 @@
rgba[3] = 0xff; \
} while (0)
+#elif (SPANTMP_PIXEL_FMT == GL_RGB) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_5_6_5_REV)
+
+/**
+ ** GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV
+ **/
+
+#ifndef GET_VALUE
+#ifndef GET_PTR
+#define GET_PTR(_x, _y) (buf + (_x) * 2 + (_y) * pitch)
+#endif
+
+#define GET_VALUE(_x, _y) *(volatile GLushort *)(GET_PTR(_x, _y))
+#define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v)
+#endif /* GET_VALUE */
+
+#define INIT_MONO_PIXEL(p, color) \
+ p = PACK_COLOR_565_REV( color[0], color[1], color[2] )
+
+#define WRITE_RGBA( _x, _y, r, g, b, a ) \
+ PUT_VALUE(_x, _y, PACK_COLOR_565_REV( r, g, b ))
+
+#define WRITE_PIXEL( _x, _y, p ) PUT_VALUE(_x, _y, p)
+
+#define READ_RGBA( rgba, _x, _y ) \
+ do { \
+ GLushort p = GET_VALUE(_x, _y); \
+ p = p << 8 | p >> 8; \
+ rgba[0] = ((p >> 8) & 0xf8) * 255 / 0xf8; \
+ rgba[1] = ((p >> 3) & 0xfc) * 255 / 0xfc; \
+ rgba[2] = ((p << 3) & 0xf8) * 255 / 0xf8; \
+ rgba[3] = 0xff; \
+ } while (0)
+
+#elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_4_4_4_4)
+
+/**
+ ** GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4
+ **/
+
+#ifndef GET_VALUE
+#ifndef GET_PTR
+#define GET_PTR(_x, _y) (buf + (_x) * 2 + (_y) * pitch)
+#endif
+
+#define GET_VALUE(_x, _y) *(volatile GLushort *)(GET_PTR(_x, _y))
+#define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v)
+#endif /* GET_VALUE */
+
+#define INIT_MONO_PIXEL(p, color) \
+ p = PACK_COLOR_4444_REV(color[3], color[0], color[1], color[2])
+
+#define WRITE_RGBA( _x, _y, r, g, b, a ) \
+ PUT_VALUE(_x, _y, PACK_COLOR_4444_REV(a, r, g, b)) \
+
+#define WRITE_PIXEL( _x, _y, p ) PUT_VALUE(_x, _y, p)
+
+#define READ_RGBA( rgba, _x, _y ) \
+ do { \
+ GLushort p = GET_VALUE(_x, _y); \
+ rgba[0] = ((p >> 0) & 0xf) * 0x11; \
+ rgba[1] = ((p >> 12) & 0xf) * 0x11; \
+ rgba[2] = ((p >> 4) & 0xf) * 0x11; \
+ rgba[3] = ((p >> 8) & 0xf) * 0x11; \
+ } while (0)
+
+
#elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_4_4_4_4_REV)
/**
@@ -147,6 +213,39 @@
rgba[3] = ((p >> 15) & 0x1) * 0xff; \
} while (0)
+#elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_SHORT_1_5_5_5)
+
+/**
+ ** GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5
+ **/
+
+#ifndef GET_VALUE
+#ifndef GET_PTR
+#define GET_PTR(_x, _y) (buf + (_x) * 2 + (_y) * pitch)
+#endif
+
+#define GET_VALUE(_x, _y) *(volatile GLushort *)(GET_PTR(_x, _y))
+#define PUT_VALUE(_x, _y, _v) *(volatile GLushort *)(GET_PTR(_x, _y)) = (_v)
+#endif /* GET_VALUE */
+
+#define INIT_MONO_PIXEL(p, color) \
+ p = PACK_COLOR_1555_REV(color[3], color[0], color[1], color[2])
+
+#define WRITE_RGBA( _x, _y, r, g, b, a ) \
+ PUT_VALUE(_x, _y, PACK_COLOR_1555_REV(a, r, g, b)) \
+
+#define WRITE_PIXEL( _x, _y, p ) PUT_VALUE(_x, _y, p)
+
+#define READ_RGBA( rgba, _x, _y ) \
+ do { \
+ GLushort p = GET_VALUE(_x, _y); \
+ p = p << 8 | p >> 8; \
+ rgba[0] = ((p >> 7) & 0xf8) * 255 / 0xf8; \
+ rgba[1] = ((p >> 2) & 0xf8) * 255 / 0xf8; \
+ rgba[2] = ((p << 3) & 0xf8) * 255 / 0xf8; \
+ rgba[3] = ((p >> 15) & 0x1) * 0xff; \
+ } while (0)
+
#elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8_REV)
/**
@@ -202,6 +301,61 @@
} while (0)
# endif
+#elif (SPANTMP_PIXEL_FMT == GL_BGRA) && (SPANTMP_PIXEL_TYPE == GL_UNSIGNED_INT_8_8_8_8)
+
+/**
+ ** GL_BGRA, GL_UNSIGNED_INT_8_8_8_8
+ **/
+
+#ifndef GET_VALUE
+#ifndef GET_PTR
+#define GET_PTR(_x, _y) ( buf + (_x) * 4 + (_y) * pitch)
+#endif
+
+#define GET_VALUE(_x, _y) *(volatile GLuint *)(GET_PTR(_x, _y))
+#define PUT_VALUE(_x, _y, _v) *(volatile GLuint *)(GET_PTR(_x, _y)) = (_v)
+#endif /* GET_VALUE */
+
+# define INIT_MONO_PIXEL(p, color) \
+ p = PACK_COLOR_8888(color[2], color[1], color[0], color[3])
+
+# define WRITE_RGBA(_x, _y, r, g, b, a) \
+ PUT_VALUE(_x, _y, ((r << 8) | \
+ (g << 16) | \
+ (b << 24) | \
+ (a << 0)))
+
+#define WRITE_PIXEL(_x, _y, p) PUT_VALUE(_x, _y, p)
+
+# if defined( USE_X86_ASM )
+# define READ_RGBA(rgba, _x, _y) \
+ do { \
+ GLuint p = GET_VALUE(_x, _y); \
+ __asm__ __volatile__( "rorl $8, %0" \
+ : "=r" (p) : "0" (p) ); \
+ ((GLuint *)rgba)[0] = p; \
+ } while (0)
+# elif defined( MESA_BIG_ENDIAN )
+ /* On PowerPC with GCC 3.4.2 the shift madness below becomes a single
+ * rotlwi instruction. It also produces good code on SPARC.
+ */
+# define READ_RGBA( rgba, _x, _y ) \
+ do { \
+ GLuint p = CPU_TO_LE32(GET_VALUE(_x, _y)); \
+ GLuint t = p; \
+ *((uint32_t *) rgba) = (t >> 24) | (p << 8); \
+ } while (0)
+# else
+# define READ_RGBA( rgba, _x, _y ) \
+ do { \
+ GLuint p = GET_VALUE(_x, _y); \
+ rgba[0] = (p >> 8) & 0xff; \
+ rgba[1] = (p >> 16) & 0xff; \
+ rgba[2] = (p >> 24) & 0xff; \
+ rgba[3] = (p >> 0) & 0xff; \
+ } while (0)
+# endif
+
#else
#error SPANTMP_PIXEL_FMT must be set to a valid value!
#endif
diff --git a/src/mesa/drivers/dri/ffb/ffb_vbtmp.h b/src/mesa/drivers/dri/ffb/ffb_vbtmp.h
index 0495d0e2767..c548ef3ad58 100644
--- a/src/mesa/drivers/dri/ffb/ffb_vbtmp.h
+++ b/src/mesa/drivers/dri/ffb/ffb_vbtmp.h
@@ -38,11 +38,11 @@ static void TAG(emit)(GLcontext *ctx, GLuint start, GLuint end)
#endif
#if (IND & (FFB_VB_RGBA_BIT))
- col0 = VB->ColorPtr[0]->data;
- col0_stride = VB->ColorPtr[0]->stride;
+ col0 = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col0_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
#if (IND & (FFB_VB_TWOSIDE_BIT))
- col1 = VB->ColorPtr[1]->data;
- col1_stride = VB->ColorPtr[1]->stride;
+ col1 = VB->BackfaceColorPtr->data;
+ col1_stride = VB->BackfaceColorPtr->stride;
#endif
#endif
diff --git a/src/mesa/drivers/dri/gamma/gamma_render.c b/src/mesa/drivers/dri/gamma/gamma_render.c
index 1b9fd169f46..a03a93d132c 100644
--- a/src/mesa/drivers/dri/gamma/gamma_render.c
+++ b/src/mesa/drivers/dri/gamma/gamma_render.c
@@ -53,13 +53,13 @@ static void gamma_emit( GLcontext *ctx, GLuint start, GLuint end)
GLfloat (*tc0)[4] = 0;
GLuint tc0_size = 0;
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
if (ctx->Texture.Unit[0]._ReallyEnabled) {
- tc0_stride = VB->TexCoordPtr[0]->stride;
- tc0 = VB->TexCoordPtr[0]->data;
- tc0_size = VB->TexCoordPtr[0]->size;
+ tc0_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0]->stride;
+ tc0 = VB->AttribPtr[_TNL_ATTRIB_TEX0]->data;
+ tc0_size = VB->AttribPtr[_TNL_ATTRIB_TEX0]->size;
coord = VB->ClipPtr->data;
coord_stride = VB->ClipPtr->stride;
} else {
diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c
index f4bbb53b863..c62281d341e 100644
--- a/src/mesa/drivers/dri/i915/i830_texstate.c
+++ b/src/mesa/drivers/dri/i915/i830_texstate.c
@@ -27,6 +27,7 @@
#include "main/mtypes.h"
#include "main/enums.h"
+#include "main/colormac.h"
#include "intel_mipmap_tree.h"
#include "intel_tex.h"
@@ -311,11 +312,10 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
CLAMPED_FLOAT_TO_UBYTE(border[2], tObj->BorderColor[2]);
CLAMPED_FLOAT_TO_UBYTE(border[3], tObj->BorderColor[3]);
- state[I830_TEXREG_TM0S4] = INTEL_PACKCOLOR8888(border[0],
- border[1],
- border[2],
- border[3]);
-
+ state[I830_TEXREG_TM0S4] = PACK_COLOR_8888(border[3],
+ border[0],
+ border[1],
+ border[2]);
I830_ACTIVESTATE(i830, I830_UPLOAD_TEX(unit), GL_TRUE);
/* memcmp was already disabled, but definitely won't work as the
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index 41336961294..c05c7759ac5 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -126,7 +126,7 @@ i830_render_start(struct intel_context *intel)
for (i = 0; i < I830_TEX_UNITS; i++) {
if (RENDERINPUTS_TEST(index_bitset, _TNL_ATTRIB_TEX(i))) {
- GLuint sz = VB->TexCoordPtr[i]->size;
+ GLuint sz = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->size;
GLuint emit;
GLuint mcs = (i830->state.Tex[i][I830_TEXREG_MCS] &
~TEXCOORDTYPE_MASK);
@@ -714,20 +714,8 @@ i830_new_batch(struct intel_context *intel)
{
struct i830_context *i830 = i830_context(&intel->ctx);
i830->state.emitted = 0;
-
- /* Check that we didn't just wrap our batchbuffer at a bad time. */
- assert(!intel->no_batch_wrap);
-}
-
-
-
-static GLuint
-i830_flush_cmd(void)
-{
- return MI_FLUSH | FLUSH_MAP_CACHE;
}
-
static void
i830_assert_not_dirty( struct intel_context *intel )
{
@@ -753,7 +741,6 @@ i830InitVtbl(struct i830_context *i830)
i830->intel.vtbl.reduced_primitive_state = i830_reduced_primitive_state;
i830->intel.vtbl.set_draw_region = i830_set_draw_region;
i830->intel.vtbl.update_texture_state = i830UpdateTextureState;
- i830->intel.vtbl.flush_cmd = i830_flush_cmd;
i830->intel.vtbl.render_start = i830_render_start;
i830->intel.vtbl.render_prevalidate = i830_render_prevalidate;
i830->intel.vtbl.assert_not_dirty = i830_assert_not_dirty;
diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h
index 082d6144425..25418d5f7aa 100644
--- a/src/mesa/drivers/dri/i915/i915_context.h
+++ b/src/mesa/drivers/dri/i915/i915_context.h
@@ -39,6 +39,7 @@
#define I915_FALLBACK_LOGICOP 0x20000
#define I915_FALLBACK_POLYGON_SMOOTH 0x40000
#define I915_FALLBACK_POINT_SMOOTH 0x80000
+#define I915_FALLBACK_POINT_SPRITE_COORD_ORIGIN 0x100000
#define I915_UPLOAD_CTX 0x1
#define I915_UPLOAD_BUFFERS 0x2
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index d9c61446f52..9e4d3180360 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -1301,7 +1301,7 @@ i915ValidateFragmentProgram(struct i915_context *i915)
for (i = 0; i < p->ctx->Const.MaxTextureCoordUnits; i++) {
if (inputsRead & FRAG_BIT_TEX(i)) {
- int sz = VB->TexCoordPtr[i]->size;
+ int sz = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->size;
s2 &= ~S2_TEXCOORD_FMT(i, S2_TEXCOORD_FMT0_MASK);
s2 |= S2_TEXCOORD_FMT(i, SZ_TO_HW(sz));
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index b60efea75bd..cc98d125dbc 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -585,7 +585,7 @@ i915PointSize(GLcontext * ctx, GLfloat size)
{
struct i915_context *i915 = I915_CONTEXT(ctx);
int lis4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_POINT_WIDTH_MASK;
- GLint point_size = (int) size;
+ GLint point_size = (int) round(size);
DBG("%s\n", __FUNCTION__);
@@ -599,6 +599,24 @@ i915PointSize(GLcontext * ctx, GLfloat size)
}
+static void
+i915PointParameterfv(GLcontext * ctx, GLenum pname, const GLfloat *params)
+{
+ struct i915_context *i915 = I915_CONTEXT(ctx);
+
+ switch (pname) {
+ case GL_POINT_SPRITE_COORD_ORIGIN:
+ /* This could be supported, but it would require modifying the fragment
+ * program to invert the y component of the texture coordinate by
+ * inserting a 'SUB tc.y, {1.0}.xxxx, tc' instruction.
+ */
+ FALLBACK(&i915->intel, I915_FALLBACK_POINT_SPRITE_COORD_ORIGIN,
+ (params[0] != GL_UPPER_LEFT));
+ break;
+ }
+}
+
+
/* =============================================================
* Color masks
*/
@@ -939,6 +957,17 @@ i915Enable(GLcontext * ctx, GLenum cap, GLboolean state)
case GL_POLYGON_SMOOTH:
break;
+ case GL_POINT_SPRITE:
+ /* This state change is handled in i915_reduced_primitive_state because
+ * the hardware bit should only be set when rendering points.
+ */
+ I915_STATECHANGE(i915, I915_UPLOAD_CTX);
+ if (state)
+ i915->state.Ctx[I915_CTXREG_LIS4] |= S4_SPRITE_POINT_ENABLE;
+ else
+ i915->state.Ctx[I915_CTXREG_LIS4] &= ~S4_SPRITE_POINT_ENABLE;
+ break;
+
case GL_POINT_SMOOTH:
break;
@@ -1108,6 +1137,7 @@ i915InitStateFunctions(struct dd_function_table *functions)
functions->LineWidth = i915LineWidth;
functions->LogicOpcode = i915LogicOp;
functions->PointSize = i915PointSize;
+ functions->PointParameterfv = i915PointParameterfv;
functions->PolygonStipple = i915PolygonStipple;
functions->Scissor = i915Scissor;
functions->ShadeModel = i915ShadeModel;
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index d6689af53f6..1bacd51aec5 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -28,6 +28,7 @@
#include "main/mtypes.h"
#include "main/enums.h"
#include "main/macros.h"
+#include "main/colormac.h"
#include "intel_mipmap_tree.h"
#include "intel_tex.h"
@@ -363,15 +364,15 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
* R channel, while the hardware uses A. Spam R into all the channels
* for safety.
*/
- state[I915_TEXREG_SS4] = INTEL_PACKCOLOR8888(border[0],
- border[0],
- border[0],
- border[0]);
+ state[I915_TEXREG_SS4] = PACK_COLOR_8888(border[0],
+ border[0],
+ border[0],
+ border[0]);
} else {
- state[I915_TEXREG_SS4] = INTEL_PACKCOLOR8888(border[0],
- border[1],
- border[2],
- border[3]);
+ state[I915_TEXREG_SS4] = PACK_COLOR_8888(border[3],
+ border[0],
+ border[1],
+ border[2]);
}
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 3c1b2dd0b0c..3e7b5101cca 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -667,15 +667,6 @@ i915_new_batch(struct intel_context *intel)
* difficulties associated with them (physical address requirements).
*/
i915->state.emitted = 0;
-
- /* Check that we didn't just wrap our batchbuffer at a bad time. */
- assert(!intel->no_batch_wrap);
-}
-
-static GLuint
-i915_flush_cmd(void)
-{
- return MI_FLUSH | FLUSH_MAP_CACHE;
}
static void
@@ -699,7 +690,6 @@ i915InitVtbl(struct i915_context *i915)
i915->intel.vtbl.render_prevalidate = i915_render_prevalidate;
i915->intel.vtbl.set_draw_region = i915_set_draw_region;
i915->intel.vtbl.update_texture_state = i915UpdateTextureState;
- i915->intel.vtbl.flush_cmd = i915_flush_cmd;
i915->intel.vtbl.assert_not_dirty = i915_assert_not_dirty;
i915->intel.vtbl.finish_batch = intel_finish_vb;
}
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index c3cbba8404d..8a3ab39bc28 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -1088,6 +1088,7 @@ intelRenderStart(GLcontext * ctx)
{
struct intel_context *intel = intel_context(ctx);
+ intel_check_front_buffer_rendering(intel);
intel->vtbl.render_start(intel_context(ctx));
intel->vtbl.emit_state(intel);
}
@@ -1249,81 +1250,6 @@ union fi
GLint i;
};
-
-/**********************************************************************/
-/* Used only with the metaops callbacks. */
-/**********************************************************************/
-static void
-intel_meta_draw_poly(struct intel_context *intel,
- GLuint n,
- GLfloat xy[][2],
- GLfloat z, GLuint color, GLfloat tex[][2])
-{
- union fi *vb;
- GLint i;
- unsigned int saved_vertex_size = intel->vertex_size;
-
- LOCK_HARDWARE(intel);
-
- intel->vertex_size = 6;
-
- /* All 3d primitives should be emitted with LOOP_CLIPRECTS,
- * otherwise the drawing origin (DR4) might not be set correctly.
- */
- intel_set_prim(intel, PRIM3D_TRIFAN);
- vb = (union fi *) intel_get_prim_space(intel, n);
-
- for (i = 0; i < n; i++) {
- vb[0].f = xy[i][0];
- vb[1].f = xy[i][1];
- vb[2].f = z;
- vb[3].i = color;
- vb[4].f = tex[i][0];
- vb[5].f = tex[i][1];
- vb += 6;
- }
-
- INTEL_FIREVERTICES(intel);
-
- intel->vertex_size = saved_vertex_size;
-
- UNLOCK_HARDWARE(intel);
-}
-
-static void
-intel_meta_draw_quad(struct intel_context *intel,
- GLfloat x0, GLfloat x1,
- GLfloat y0, GLfloat y1,
- GLfloat z,
- GLuint color,
- GLfloat s0, GLfloat s1, GLfloat t0, GLfloat t1)
-{
- GLfloat xy[4][2];
- GLfloat tex[4][2];
-
- xy[0][0] = x0;
- xy[0][1] = y0;
- xy[1][0] = x1;
- xy[1][1] = y0;
- xy[2][0] = x1;
- xy[2][1] = y1;
- xy[3][0] = x0;
- xy[3][1] = y1;
-
- tex[0][0] = s0;
- tex[0][1] = t0;
- tex[1][0] = s1;
- tex[1][1] = t0;
- tex[2][0] = s1;
- tex[2][1] = t1;
- tex[3][0] = s0;
- tex[3][1] = t1;
-
- intel_meta_draw_poly(intel, 4, xy, z, color, tex);
-}
-
-
-
/**********************************************************************/
/* Initialization. */
/**********************************************************************/
@@ -1332,7 +1258,6 @@ intel_meta_draw_quad(struct intel_context *intel,
void
intelInitTriFuncs(GLcontext * ctx)
{
- struct intel_context *intel = intel_context(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
static int firsttime = 1;
@@ -1349,6 +1274,4 @@ intelInitTriFuncs(GLcontext * ctx)
tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
tnl->Driver.Render.CopyPV = _tnl_copy_pv;
tnl->Driver.Render.Interp = _tnl_interp;
-
- intel->vtbl.meta_draw_quad = intel_meta_draw_quad;
}
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index 5cca605c3f1..d4ccd28c9e8 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -55,7 +55,8 @@ static void prepare_cc_vp( struct brw_context *brw )
}
dri_bo_unreference(brw->cc.vp_bo);
- brw->cc.vp_bo = brw_cache_data( &brw->cache, BRW_CC_VP, &ccv, NULL, 0 );
+ brw->cc.vp_bo = brw_cache_data(&brw->cache, BRW_CC_VP, &ccv, sizeof(ccv),
+ NULL, 0);
}
const struct brw_tracked_state brw_cc_vp = {
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index 20a927cf386..dbd10a52974 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -78,7 +78,7 @@ static void compile_clip_prog( struct brw_context *brw,
delta = REG_SIZE;
for (i = 0; i < VERT_RESULT_MAX; i++)
- if (c.key.attrs & (1<<i)) {
+ if (c.key.attrs & BITFIELD64_BIT(i)) {
c.offset[i] = delta;
delta += ATTR_SIZE;
}
@@ -156,6 +156,7 @@ static void upload_clip_prog(struct brw_context *brw)
key.attrs = brw->vs.prog_data->outputs_written;
/* _NEW_LIGHT */
key.do_flat_shading = (ctx->Light.ShadeModel == GL_FLAT);
+ key.pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
/* _NEW_TRANSFORM */
key.nr_userclip = brw_count_bits(ctx->Transform.ClipPlanesEnabled);
diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h
index 957df441ab0..1c6825510a2 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.h
+++ b/src/mesa/drivers/dri/i965/brw_clip.h
@@ -42,22 +42,21 @@
* up polygon offset and flatshading at this point:
*/
struct brw_clip_prog_key {
- GLuint attrs:32;
+ GLbitfield64 attrs;
GLuint primitive:4;
GLuint nr_userclip:3;
GLuint do_flat_shading:1;
+ GLuint pv_first:1;
GLuint do_unfilled:1;
GLuint fill_cw:2; /* includes cull information */
GLuint fill_ccw:2; /* includes cull information */
GLuint offset_cw:1;
GLuint offset_ccw:1;
- GLuint pad0:17;
-
GLuint copy_bfc_cw:1;
GLuint copy_bfc_ccw:1;
GLuint clip_mode:3;
- GLuint pad1:27;
-
+ GLuint pad0:11;
+
GLfloat offset_factor;
GLfloat offset_units;
};
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
index 048ca620fab..fa9648f50f3 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_line.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
@@ -269,8 +269,12 @@ void brw_emit_line_clip( struct brw_clip_compile *c )
brw_clip_line_alloc_regs(c);
brw_clip_init_ff_sync(c);
- if (c->key.do_flat_shading)
- brw_clip_copy_colors(c, 0, 1);
+ if (c->key.do_flat_shading) {
+ if (c->key.pv_first)
+ brw_clip_copy_colors(c, 1, 0);
+ else
+ brw_clip_copy_colors(c, 0, 1);
+ }
clip_and_emit_line(c);
}
diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri/i965/brw_clip_tri.c
index 0efd77225e2..cf79224be43 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_tri.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_tri.c
@@ -188,14 +188,20 @@ void brw_clip_tri_flat_shade( struct brw_clip_compile *c )
brw_imm_ud(_3DPRIM_POLYGON));
is_poly = brw_IF(p, BRW_EXECUTE_1);
- {
+ {
brw_clip_copy_colors(c, 1, 0);
brw_clip_copy_colors(c, 2, 0);
}
is_poly = brw_ELSE(p, is_poly);
{
- brw_clip_copy_colors(c, 0, 2);
- brw_clip_copy_colors(c, 1, 2);
+ if (c->key.pv_first) {
+ brw_clip_copy_colors(c, 1, 0);
+ brw_clip_copy_colors(c, 2, 0);
+ }
+ else {
+ brw_clip_copy_colors(c, 0, 2);
+ brw_clip_copy_colors(c, 1, 2);
+ }
}
brw_ENDIF(p, is_poly);
}
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 48685c087b8..8bdda60697b 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -111,6 +111,7 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
ctx->Const.MaxTextureUnits = MIN2(ctx->Const.MaxTextureCoordUnits,
ctx->Const.MaxTextureImageUnits);
ctx->Const.MaxVertexTextureImageUnits = 0; /* no vertex shader textures */
+ ctx->Const.MaxCombinedTextureImageUnits = 0;
/* Mesa limits textures to 4kx4k; it would be nice to fix that someday
*/
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index 59f9475b5ac..e73e21433c5 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -172,8 +172,8 @@ struct brw_fragment_program {
GLuint id; /**< serial no. to identify frag progs, never re-used */
GLboolean isGLSL; /**< really, any IF/LOOP/CONT/BREAK instructions */
- dri_bo *const_buffer; /** Program constant buffer/surface */
GLboolean use_const_buffer;
+ dri_bo *const_buffer; /** Program constant buffer/surface */
/** for debugging, which texture units are referenced */
GLbitfield tex_units_used;
@@ -231,7 +231,7 @@ struct brw_vs_prog_data {
GLuint curb_read_length;
GLuint urb_read_length;
GLuint total_grf;
- GLuint outputs_written;
+ GLbitfield64 outputs_written;
GLuint nr_params; /**< number of float params/constants */
GLuint inputs_read;
@@ -320,7 +320,6 @@ struct brw_cache_item {
GLuint nr_reloc_bufs;
dri_bo *bo;
- GLuint data_size;
struct brw_cache_item *next;
};
@@ -333,7 +332,6 @@ struct brw_cache {
struct brw_cache_item **items;
GLuint size, n_items;
- GLuint key_size[BRW_MAX_CACHE]; /* for fixed-size keys */
GLuint aux_size[BRW_MAX_CACHE];
char *name[BRW_MAX_CACHE];
@@ -413,23 +411,6 @@ struct brw_vertex_info {
GLuint sizes[ATTRIB_BIT_DWORDS * 2]; /* sizes:2[VERT_ATTRIB_MAX] */
};
-
-
-
-/* Cache for TNL programs.
- */
-struct brw_tnl_cache_item {
- GLuint hash;
- void *key;
- void *data;
- struct brw_tnl_cache_item *next;
-};
-
-struct brw_tnl_cache {
- struct brw_tnl_cache_item **items;
- GLuint size, n_items;
-};
-
struct brw_query_object {
struct gl_query_object Base;
@@ -457,7 +438,6 @@ struct brw_context
GLuint primitive;
GLboolean emit_state_always;
- GLboolean no_batch_wrap;
struct {
struct brw_state_flags dirty;
@@ -761,9 +741,5 @@ brw_fragment_program_const(const struct gl_fragment_program *p)
return (const struct brw_fragment_program *) p;
}
-
-
-#define DO_SETUP_BITS ((1<<(FRAG_ATTRIB_MAX)) - 1)
-
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index 4be6c77aa1e..aadcfbe2dac 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -130,7 +130,7 @@ static void calculate_curbe_offsets( struct brw_context *brw )
const struct brw_tracked_state brw_curbe_offsets = {
.dirty = {
.mesa = _NEW_TRANSFORM,
- .brw = BRW_NEW_VERTEX_PROGRAM,
+ .brw = BRW_NEW_VERTEX_PROGRAM | BRW_NEW_CONTEXT,
.cache = CACHE_NEW_WM_PROG
},
.prepare = calculate_curbe_offsets
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index 78d457ad2be..c19510bbd42 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -673,18 +673,10 @@
#define BRW_SAMPLER_MESSAGE_SIMD8_LD 3
#define BRW_SAMPLER_MESSAGE_SIMD16_LD 3
-#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_IGDNG 0
-#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_IGDNG 0
-#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_IGDNG 0
-#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_BIAS_IGDNG 1
-#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_BIAS_IGDNG 1
-#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS_IGDNG 1
-#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_LOD_IGDNG 2
-#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_LOD_IGDNG 2
-#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_LOD_IGDNG 2
-#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_COMPARE_IGDNG 3
-#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_COMPARE_IGDNG 3
-#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE_IGDNG 3
+#define BRW_SAMPLER_MESSAGE_SAMPLE_IGDNG 0
+#define BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_IGDNG 1
+#define BRW_SAMPLER_MESSAGE_SAMPLE_LOD_IGDNG 2
+#define BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_IGDNG 3
/* for IGDNG only */
#define BRW_SAMPLER_SIMD_MODE_SIMD4X2 0
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 44bb7bd5882..7ad860898fc 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -145,7 +145,7 @@ static void brw_emit_prim(struct brw_context *brw,
prim_packet.base_vert_location = prim->basevertex;
/* Can't wrap here, since we rely on the validated state. */
- brw->no_batch_wrap = GL_TRUE;
+ intel->no_batch_wrap = GL_TRUE;
/* If we're set to always flush, do it before and after the primitive emit.
* We want to catch both missed flushes that hurt instruction/state cache
@@ -153,21 +153,17 @@ static void brw_emit_prim(struct brw_context *brw,
* the besides the draw code.
*/
if (intel->always_flush_cache) {
- BEGIN_BATCH(1, IGNORE_CLIPRECTS);
- OUT_BATCH(intel->vtbl.flush_cmd());
- ADVANCE_BATCH();
+ intel_batchbuffer_emit_mi_flush(intel->batch);
}
if (prim_packet.verts_per_instance) {
intel_batchbuffer_data( brw->intel.batch, &prim_packet,
sizeof(prim_packet), LOOP_CLIPRECTS);
}
if (intel->always_flush_cache) {
- BEGIN_BATCH(1, IGNORE_CLIPRECTS);
- OUT_BATCH(intel->vtbl.flush_cmd());
- ADVANCE_BATCH();
+ intel_batchbuffer_emit_mi_flush(intel->batch);
}
- brw->no_batch_wrap = GL_FALSE;
+ intel->no_batch_wrap = GL_FALSE;
}
static void brw_merge_inputs( struct brw_context *brw,
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 0fefbd9d814..7c796dae936 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -243,14 +243,6 @@ static void wrap_buffers( struct brw_context *brw,
dri_bo_unreference(brw->vb.upload.bo);
brw->vb.upload.bo = dri_bo_alloc(brw->intel.bufmgr, "temporary VBO",
size, 1);
-
- /* Set the internal VBO\ to no-backing-store. We only use them as a
- * temporary within a brw_try_draw_prims while the lock is held.
- */
- /* DON'T DO THIS AS IF WE HAVE TO RE-ORG MEMORY WE NEED SOMEWHERE WITH
- FAKE TO PUSH THIS STUFF */
-// if (!brw->intel.ttm)
-// dri_bo_fake_disable_backing_store(brw->vb.upload.bo, NULL, NULL);
}
static void get_space( struct brw_context *brw,
@@ -536,16 +528,9 @@ static void brw_emit_vertices(struct brw_context *brw)
I915_GEM_DOMAIN_VERTEX, 0,
input->offset);
if (BRW_IS_IGDNG(brw)) {
- if (input->stride) {
- OUT_RELOC(input->bo,
- I915_GEM_DOMAIN_VERTEX, 0,
- input->offset + input->stride * input->count - 1);
- } else {
- assert(input->count == 1);
- OUT_RELOC(input->bo,
- I915_GEM_DOMAIN_VERTEX, 0,
- input->offset + input->element_size - 1);
- }
+ OUT_RELOC(input->bo,
+ I915_GEM_DOMAIN_VERTEX, 0,
+ input->bo->size - 1);
} else
OUT_BATCH(input->stride ? input->count : 0);
OUT_BATCH(0); /* Instance data step rate */
diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h
index 30603bdd0e6..39eb88d7c2b 100644
--- a/src/mesa/drivers/dri/i965/brw_eu.h
+++ b/src/mesa/drivers/dri/i965/brw_eu.h
@@ -170,11 +170,11 @@ static INLINE struct brw_reg brw_reg( GLuint file,
GLuint writemask )
{
struct brw_reg reg;
- if (type == BRW_GENERAL_REGISTER_FILE)
+ if (file == BRW_GENERAL_REGISTER_FILE)
assert(nr < BRW_MAX_GRF);
- else if (type == BRW_MESSAGE_REGISTER_FILE)
- assert(nr < BRW_MAX_MRF);
- else if (type == BRW_ARCHITECTURE_REGISTER_FILE)
+ else if (file == BRW_MESSAGE_REGISTER_FILE)
+ assert((nr & ~(1 << 7)) < BRW_MAX_MRF);
+ else if (file == BRW_ARCHITECTURE_REGISTER_FILE)
assert(nr <= BRW_ARF_IP);
reg.type = type;
@@ -538,7 +538,7 @@ static INLINE struct brw_reg brw_mask_reg( GLuint subnr )
static INLINE struct brw_reg brw_message_reg( GLuint nr )
{
- assert(nr < BRW_MAX_MRF);
+ assert((nr & ~(1 << 7)) < BRW_MAX_MRF);
return brw_vec8_reg(BRW_MESSAGE_REGISTER_FILE,
nr,
0);
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 241cdc33f86..7ceabba288a 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -55,7 +55,8 @@ static void guess_execution_size( struct brw_instruction *insn,
static void brw_set_dest( struct brw_instruction *insn,
struct brw_reg dest )
{
- if (dest.type != BRW_ARCHITECTURE_REGISTER_FILE)
+ if (dest.file != BRW_ARCHITECTURE_REGISTER_FILE &&
+ dest.file != BRW_MESSAGE_REGISTER_FILE)
assert(dest.nr < 128);
insn->bits1.da1.dest_reg_file = dest.file;
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 48c2b9a41ce..610b6c35e2a 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -85,10 +85,10 @@ static void compile_gs_prog( struct brw_context *brw,
*/
switch (key->primitive) {
case GL_QUADS:
- brw_gs_quads( &c );
+ brw_gs_quads( &c, key );
break;
case GL_QUAD_STRIP:
- brw_gs_quad_strip( &c );
+ brw_gs_quad_strip( &c, key );
break;
case GL_LINE_LOOP:
brw_gs_lines( &c );
@@ -149,6 +149,7 @@ static const GLenum gs_prim[GL_POLYGON+1] = {
static void populate_key( struct brw_context *brw,
struct brw_gs_prog_key *key )
{
+ GLcontext *ctx = &brw->intel.ctx;
memset(key, 0, sizeof(*key));
/* CACHE_NEW_VS_PROG */
@@ -158,6 +159,9 @@ static void populate_key( struct brw_context *brw,
key->primitive = gs_prim[brw->primitive];
key->hint_gs_always = 0; /* debug code? */
+
+ /* _NEW_LIGHT */
+ key->pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
key->need_gs_prog = (key->hint_gs_always ||
brw->primitive == GL_QUADS ||
@@ -193,7 +197,7 @@ static void prepare_gs_prog(struct brw_context *brw)
const struct brw_tracked_state brw_gs_prog = {
.dirty = {
- .mesa = 0,
+ .mesa = _NEW_LIGHT,
.brw = BRW_NEW_PRIMITIVE,
.cache = CACHE_NEW_VS_PROG
},
diff --git a/src/mesa/drivers/dri/i965/brw_gs.h b/src/mesa/drivers/dri/i965/brw_gs.h
index bbb991ea2e5..010c1c23521 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.h
+++ b/src/mesa/drivers/dri/i965/brw_gs.h
@@ -40,11 +40,12 @@
#define MAX_GS_VERTS (4)
struct brw_gs_prog_key {
- GLuint attrs:32;
+ GLbitfield64 attrs;
GLuint primitive:4;
GLuint hint_gs_always:1;
+ GLuint pv_first:1;
GLuint need_gs_prog:1;
- GLuint pad:26;
+ GLuint pad:25;
};
struct brw_gs_compile {
@@ -67,8 +68,8 @@ struct brw_gs_compile {
#define ATTR_SIZE (4*4)
-void brw_gs_quads( struct brw_gs_compile *c );
-void brw_gs_quad_strip( struct brw_gs_compile *c );
+void brw_gs_quads( struct brw_gs_compile *c, struct brw_gs_prog_key *key );
+void brw_gs_quad_strip( struct brw_gs_compile *c, struct brw_gs_prog_key *key );
void brw_gs_tris( struct brw_gs_compile *c );
void brw_gs_lines( struct brw_gs_compile *c );
void brw_gs_points( struct brw_gs_compile *c );
diff --git a/src/mesa/drivers/dri/i965/brw_gs_emit.c b/src/mesa/drivers/dri/i965/brw_gs_emit.c
index a9b2aa2eace..0fc5b02c619 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_emit.c
@@ -120,7 +120,7 @@ static void brw_gs_ff_sync(struct brw_gs_compile *c, int num_prim)
}
-void brw_gs_quads( struct brw_gs_compile *c )
+void brw_gs_quads( struct brw_gs_compile *c, struct brw_gs_prog_key *key )
{
brw_gs_alloc_regs(c, 4);
@@ -128,23 +128,39 @@ void brw_gs_quads( struct brw_gs_compile *c )
* is the PV for quads, but vertex 0 for polygons:
*/
if (c->need_ff_sync)
- brw_gs_ff_sync(c, 1);
- brw_gs_emit_vue(c, c->reg.vertex[3], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
- brw_gs_emit_vue(c, c->reg.vertex[0], 0, (_3DPRIM_POLYGON << 2));
- brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_POLYGON << 2));
- brw_gs_emit_vue(c, c->reg.vertex[2], 1, ((_3DPRIM_POLYGON << 2) | R02_PRIM_END));
+ brw_gs_ff_sync(c, 1);
+ if (key->pv_first) {
+ brw_gs_emit_vue(c, c->reg.vertex[0], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
+ brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[2], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[3], 1, ((_3DPRIM_POLYGON << 2) | R02_PRIM_END));
+ }
+ else {
+ brw_gs_emit_vue(c, c->reg.vertex[3], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
+ brw_gs_emit_vue(c, c->reg.vertex[0], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[2], 1, ((_3DPRIM_POLYGON << 2) | R02_PRIM_END));
+ }
}
-void brw_gs_quad_strip( struct brw_gs_compile *c )
+void brw_gs_quad_strip( struct brw_gs_compile *c, struct brw_gs_prog_key *key )
{
brw_gs_alloc_regs(c, 4);
if (c->need_ff_sync)
brw_gs_ff_sync(c, 1);
- brw_gs_emit_vue(c, c->reg.vertex[2], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
- brw_gs_emit_vue(c, c->reg.vertex[3], 0, (_3DPRIM_POLYGON << 2));
- brw_gs_emit_vue(c, c->reg.vertex[0], 0, (_3DPRIM_POLYGON << 2));
- brw_gs_emit_vue(c, c->reg.vertex[1], 1, ((_3DPRIM_POLYGON << 2) | R02_PRIM_END));
+ if (key->pv_first) {
+ brw_gs_emit_vue(c, c->reg.vertex[0], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
+ brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[2], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[3], 1, ((_3DPRIM_POLYGON << 2) | R02_PRIM_END));
+ }
+ else {
+ brw_gs_emit_vue(c, c->reg.vertex[2], 0, ((_3DPRIM_POLYGON << 2) | R02_PRIM_START));
+ brw_gs_emit_vue(c, c->reg.vertex[3], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[0], 0, (_3DPRIM_POLYGON << 2));
+ brw_gs_emit_vue(c, c->reg.vertex[1], 1, ((_3DPRIM_POLYGON << 2) | R02_PRIM_END));
+ }
}
void brw_gs_tris( struct brw_gs_compile *c )
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index ea718575484..4b0d5983360 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -66,7 +66,7 @@ static void upload_blend_constant_color(struct brw_context *brw)
const struct brw_tracked_state brw_blend_constant_color = {
.dirty = {
.mesa = _NEW_COLOR,
- .brw = 0,
+ .brw = BRW_NEW_CONTEXT,
.cache = 0
},
.emit = upload_blend_constant_color
@@ -93,7 +93,7 @@ static void upload_drawing_rect(struct brw_context *brw)
const struct brw_tracked_state brw_drawing_rect = {
.dirty = {
.mesa = _NEW_BUFFERS,
- .brw = 0,
+ .brw = BRW_NEW_CONTEXT,
.cache = 0
},
.emit = upload_drawing_rect
@@ -317,7 +317,7 @@ static void upload_polygon_stipple(struct brw_context *brw)
const struct brw_tracked_state brw_polygon_stipple = {
.dirty = {
.mesa = _NEW_POLYGONSTIPPLE,
- .brw = 0,
+ .brw = BRW_NEW_CONTEXT,
.cache = 0
},
.emit = upload_polygon_stipple
@@ -362,7 +362,7 @@ static void upload_polygon_stipple_offset(struct brw_context *brw)
const struct brw_tracked_state brw_polygon_stipple_offset = {
.dirty = {
.mesa = _NEW_WINDOW_POS,
- .brw = 0,
+ .brw = BRW_NEW_CONTEXT,
.cache = 0
},
.emit = upload_polygon_stipple_offset
@@ -425,7 +425,7 @@ static void upload_line_stipple(struct brw_context *brw)
const struct brw_tracked_state brw_line_stipple = {
.dirty = {
.mesa = _NEW_LINE,
- .brw = 0,
+ .brw = BRW_NEW_CONTEXT,
.cache = 0
},
.emit = upload_line_stipple
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index f350cbd74e6..968890f7fb1 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -61,7 +61,7 @@ static void compile_sf_prog( struct brw_context *brw,
c.key = *key;
c.nr_attrs = brw_count_bits(c.key.attrs);
c.nr_attr_regs = (c.nr_attrs+1)/2;
- c.nr_setup_attrs = brw_count_bits(c.key.attrs & DO_SETUP_BITS);
+ c.nr_setup_attrs = brw_count_bits(c.key.attrs);
c.nr_setup_regs = (c.nr_setup_attrs+1)/2;
c.prog_data.urb_read_length = c.nr_attr_regs;
@@ -70,7 +70,7 @@ static void compile_sf_prog( struct brw_context *brw,
/* Construct map from attribute number to position in the vertex.
*/
for (i = idx = 0; i < VERT_RESULT_MAX; i++)
- if (c.key.attrs & (1<<i)) {
+ if (c.key.attrs & BITFIELD64_BIT(i)) {
c.attr_to_idx[i] = idx;
c.idx_to_attr[idx] = i;
if (i >= VERT_RESULT_TEX0 && i <= VERT_RESULT_TEX7) {
@@ -147,7 +147,7 @@ static void upload_sf_prog(struct brw_context *brw)
* edgeflag testing here, it is already done in the clip
* program.
*/
- if (key.attrs & (1<<VERT_RESULT_EDGE))
+ if (key.attrs & BITFIELD64_BIT(VERT_RESULT_EDGE))
key.primitive = SF_UNFILLED_TRIS;
else
key.primitive = SF_TRIANGLES;
diff --git a/src/mesa/drivers/dri/i965/brw_sf.h b/src/mesa/drivers/dri/i965/brw_sf.h
index e835229a1df..0ba731fac99 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.h
+++ b/src/mesa/drivers/dri/i965/brw_sf.h
@@ -45,7 +45,7 @@
#define SF_UNFILLED_TRIS 3
struct brw_sf_prog_key {
- GLuint attrs:32;
+ GLbitfield64 attrs;
GLuint primitive:2;
GLuint do_twoside_color:1;
GLuint do_flat_shading:1;
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c
index 561fcd501b6..3eae41ee742 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c
@@ -56,7 +56,7 @@ static struct brw_reg get_vert_attr(struct brw_sf_compile *c,
static GLboolean have_attr(struct brw_sf_compile *c,
GLuint attr)
{
- return (c->key.attrs & (1<<attr)) ? 1 : 0;
+ return (c->key.attrs & BITFIELD64_BIT(attr)) ? 1 : 0;
}
/***********************************************************************
@@ -122,8 +122,8 @@ static void do_twoside_color( struct brw_sf_compile *c )
* Flat shading
*/
-#define VERT_RESULT_COLOR_BITS ((1<<VERT_RESULT_COL0) | \
- (1<<VERT_RESULT_COL1))
+#define VERT_RESULT_COLOR_BITS (BITFIELD64_BIT(VERT_RESULT_COL0) | \
+ BITFIELD64_BIT(VERT_RESULT_COL1))
static void copy_colors( struct brw_sf_compile *c,
struct brw_reg dst,
@@ -312,8 +312,8 @@ static GLboolean calculate_masks( struct brw_sf_compile *c,
GLushort *pc_linear)
{
GLboolean is_last_attr = (reg == c->nr_setup_regs - 1);
- GLuint persp_mask;
- GLuint linear_mask;
+ GLbitfield64 persp_mask;
+ GLbitfield64 linear_mask;
if (c->key.do_flat_shading || c->key.linear_color)
persp_mask = c->key.attrs & ~(FRAG_BIT_WPOS |
@@ -331,10 +331,10 @@ static GLboolean calculate_masks( struct brw_sf_compile *c,
*pc_linear = 0;
*pc = 0xf;
- if (persp_mask & (1 << c->idx_to_attr[reg*2]))
+ if (persp_mask & BITFIELD64_BIT(c->idx_to_attr[reg*2]))
*pc_persp = 0xf;
- if (linear_mask & (1 << c->idx_to_attr[reg*2]))
+ if (linear_mask & BITFIELD64_BIT(c->idx_to_attr[reg*2]))
*pc_linear = 0xf;
/* Maybe only processs one attribute on the final round:
@@ -342,10 +342,10 @@ static GLboolean calculate_masks( struct brw_sf_compile *c,
if (reg*2+1 < c->nr_setup_attrs) {
*pc |= 0xf0;
- if (persp_mask & (1 << c->idx_to_attr[reg*2+1]))
+ if (persp_mask & BITFIELD64_BIT(c->idx_to_attr[reg*2+1]))
*pc_persp |= 0xf0;
- if (linear_mask & (1 << c->idx_to_attr[reg*2+1]))
+ if (linear_mask & BITFIELD64_BIT(c->idx_to_attr[reg*2+1]))
*pc_linear |= 0xf0;
}
diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c
index bc0f0760738..bb69435ec0a 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
@@ -93,7 +93,8 @@ static void upload_sf_vp(struct brw_context *brw)
}
dri_bo_unreference(brw->sf.vp_bo);
- brw->sf.vp_bo = brw_cache_data( &brw->cache, BRW_SF_VP, &sfv, NULL, 0 );
+ brw->sf.vp_bo = brw_cache_data(&brw->cache, BRW_SF_VP, &sfv, sizeof(sfv),
+ NULL, 0);
}
const struct brw_tracked_state brw_sf_vp = {
@@ -113,7 +114,8 @@ struct brw_sf_unit_key {
unsigned int nr_urb_entries, urb_size, sfsize;
- GLenum front_face, cull_face, provoking_vertex;
+ GLenum front_face, cull_face;
+ unsigned pv_first:1;
unsigned scissor:1;
unsigned line_smooth:1;
unsigned point_sprite:1;
@@ -154,7 +156,7 @@ sf_unit_populate_key(struct brw_context *brw, struct brw_sf_unit_key *key)
key->point_attenuated = ctx->Point._Attenuated;
/* _NEW_LIGHT */
- key->provoking_vertex = ctx->Light.ProvokingVertex;
+ key->pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
key->render_to_fbo = brw->intel.ctx.DrawBuffer->Name != 0;
}
@@ -287,7 +289,7 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
/* might be BRW_NEW_PRIMITIVE if we have to adjust pv for polygons:
*/
- if (key->provoking_vertex == GL_LAST_VERTEX_CONVENTION) {
+ if (!key->pv_first) {
sf.sf7.trifan_pv = 2;
sf.sf7.linestrip_pv = 1;
sf.sf7.tristrip_pv = 2;
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index d639656b9d4..b129b1f1c3f 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -112,6 +112,7 @@ void brw_validate_state(struct brw_context *brw);
void brw_upload_state(struct brw_context *brw);
void brw_init_state(struct brw_context *brw);
void brw_destroy_state(struct brw_context *brw);
+void brw_clear_validated_bos(struct brw_context *brw);
/***********************************************************************
* brw_state_cache.c
@@ -119,16 +120,10 @@ void brw_destroy_state(struct brw_context *brw);
dri_bo *brw_cache_data(struct brw_cache *cache,
enum brw_cache_id cache_id,
const void *data,
+ GLuint size,
dri_bo **reloc_bufs,
GLuint nr_reloc_bufs);
-dri_bo *brw_cache_data_sz(struct brw_cache *cache,
- enum brw_cache_id cache_id,
- const void *data,
- GLuint data_size,
- dri_bo **reloc_bufs,
- GLuint nr_reloc_bufs);
-
dri_bo *brw_upload_cache( struct brw_cache *cache,
enum brw_cache_id cache_id,
const void *key,
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index c262e1db8b9..e4c9ba7d870 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -245,7 +245,6 @@ brw_upload_cache( struct brw_cache *cache,
item->bo = bo;
dri_bo_reference(bo);
- item->data_size = data_size;
if (cache->n_items > cache->size * 1.5)
rehash(cache);
@@ -275,15 +274,22 @@ brw_upload_cache( struct brw_cache *cache,
/**
- * This doesn't really work with aux data. Use search/upload instead
+ * Wrapper around brw_cache_data_sz using the cache_id's canonical key size.
+ *
+ * If nr_reloc_bufs is nonzero, brw_search_cache()/brw_upload_cache() would be
+ * better to use, as the potentially changing offsets in the data-used-as-key
+ * will result in excessive cache misses.
+ *
+ * If aux data is involved, use search/upload instead.
+
*/
dri_bo *
-brw_cache_data_sz(struct brw_cache *cache,
- enum brw_cache_id cache_id,
- const void *data,
- GLuint data_size,
- dri_bo **reloc_bufs,
- GLuint nr_reloc_bufs)
+brw_cache_data(struct brw_cache *cache,
+ enum brw_cache_id cache_id,
+ const void *data,
+ GLuint data_size,
+ dri_bo **reloc_bufs,
+ GLuint nr_reloc_bufs)
{
dri_bo *bo;
struct brw_cache_item *item;
@@ -306,25 +312,6 @@ brw_cache_data_sz(struct brw_cache *cache,
return bo;
}
-
-/**
- * Wrapper around brw_cache_data_sz using the cache_id's canonical key size.
- *
- * If nr_reloc_bufs is nonzero, brw_search_cache()/brw_upload_cache() would be
- * better to use, as the potentially changing offsets in the data-used-as-key
- * will result in excessive cache misses.
- */
-dri_bo *
-brw_cache_data(struct brw_cache *cache,
- enum brw_cache_id cache_id,
- const void *data,
- dri_bo **reloc_bufs,
- GLuint nr_reloc_bufs)
-{
- return brw_cache_data_sz(cache, cache_id, data, cache->key_size[cache_id],
- reloc_bufs, nr_reloc_bufs);
-}
-
enum pool_type {
DW_SURFACE_STATE,
DW_GENERAL_STATE
@@ -335,11 +322,9 @@ static void
brw_init_cache_id(struct brw_cache *cache,
const char *name,
enum brw_cache_id id,
- GLuint key_size,
GLuint aux_size)
{
cache->name[id] = strdup(name);
- cache->key_size[id] = key_size;
cache->aux_size[id] = aux_size;
}
@@ -359,91 +344,76 @@ brw_init_non_surface_cache(struct brw_context *brw)
brw_init_cache_id(cache,
"CC_VP",
BRW_CC_VP,
- sizeof(struct brw_cc_viewport),
0);
brw_init_cache_id(cache,
"CC_UNIT",
BRW_CC_UNIT,
- sizeof(struct brw_cc_unit_state),
0);
brw_init_cache_id(cache,
"WM_PROG",
BRW_WM_PROG,
- sizeof(struct brw_wm_prog_key),
sizeof(struct brw_wm_prog_data));
brw_init_cache_id(cache,
"SAMPLER_DEFAULT_COLOR",
BRW_SAMPLER_DEFAULT_COLOR,
- sizeof(struct brw_sampler_default_color),
0);
brw_init_cache_id(cache,
"SAMPLER",
BRW_SAMPLER,
- 0, /* variable key/data size */
0);
brw_init_cache_id(cache,
"WM_UNIT",
BRW_WM_UNIT,
- sizeof(struct brw_wm_unit_state),
0);
brw_init_cache_id(cache,
"SF_PROG",
BRW_SF_PROG,
- sizeof(struct brw_sf_prog_key),
sizeof(struct brw_sf_prog_data));
brw_init_cache_id(cache,
"SF_VP",
BRW_SF_VP,
- sizeof(struct brw_sf_viewport),
0);
brw_init_cache_id(cache,
"SF_UNIT",
BRW_SF_UNIT,
- sizeof(struct brw_sf_unit_state),
0);
brw_init_cache_id(cache,
"VS_UNIT",
BRW_VS_UNIT,
- sizeof(struct brw_vs_unit_state),
0);
brw_init_cache_id(cache,
"VS_PROG",
BRW_VS_PROG,
- sizeof(struct brw_vs_prog_key),
sizeof(struct brw_vs_prog_data));
brw_init_cache_id(cache,
"CLIP_UNIT",
BRW_CLIP_UNIT,
- sizeof(struct brw_clip_unit_state),
0);
brw_init_cache_id(cache,
"CLIP_PROG",
BRW_CLIP_PROG,
- sizeof(struct brw_clip_prog_key),
sizeof(struct brw_clip_prog_data));
brw_init_cache_id(cache,
"GS_UNIT",
BRW_GS_UNIT,
- sizeof(struct brw_gs_unit_state),
0);
brw_init_cache_id(cache,
"GS_PROG",
BRW_GS_PROG,
- sizeof(struct brw_gs_prog_key),
sizeof(struct brw_gs_prog_data));
}
@@ -463,13 +433,11 @@ brw_init_surface_cache(struct brw_context *brw)
brw_init_cache_id(cache,
"SS_SURFACE",
BRW_SS_SURFACE,
- sizeof(struct brw_surface_state),
0);
brw_init_cache_id(cache,
"SS_SURF_BIND",
BRW_SS_SURF_BIND,
- 0,
0);
}
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index ee447afa624..af8dfb4c15c 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -34,6 +34,7 @@
#include "brw_context.h"
#include "brw_state.h"
#include "intel_batchbuffer.h"
+#include "intel_buffers.h"
/* This is used to initialize brw->state.atoms[]. We could use this
* list directly except for a single atom, brw_constant_buffer, which
@@ -142,7 +143,7 @@ static void xor_states( struct brw_state_flags *result,
result->cache = a->cache ^ b->cache;
}
-static void
+void
brw_clear_validated_bos(struct brw_context *brw)
{
int i;
@@ -324,6 +325,8 @@ void brw_validate_state( struct brw_context *brw )
}
}
+ intel_check_front_buffer_rendering(intel);
+
/* Make sure that the textures which are referenced by the current
* brw fragment program are actually present/valid.
* If this fails, we can experience GPU lock-ups.
diff --git a/src/mesa/drivers/dri/i965/brw_util.c b/src/mesa/drivers/dri/i965/brw_util.c
index ce21aa48695..bba9249d1b4 100644
--- a/src/mesa/drivers/dri/i965/brw_util.c
+++ b/src/mesa/drivers/dri/i965/brw_util.c
@@ -35,7 +35,7 @@
#include "brw_util.h"
#include "brw_defines.h"
-GLuint brw_count_bits( GLuint val )
+GLuint brw_count_bits(uint64_t val)
{
GLuint i;
for (i = 0; val ; val >>= 1)
diff --git a/src/mesa/drivers/dri/i965/brw_util.h b/src/mesa/drivers/dri/i965/brw_util.h
index 33e7cd87e42..04f3175d3e1 100644
--- a/src/mesa/drivers/dri/i965/brw_util.h
+++ b/src/mesa/drivers/dri/i965/brw_util.h
@@ -35,7 +35,7 @@
#include "main/mtypes.h"
-extern GLuint brw_count_bits( GLuint val );
+extern GLuint brw_count_bits(uint64_t val);
extern GLuint brw_parameter_list_state_flags(struct gl_program_parameter_list *paramList);
extern GLuint brw_translate_blend_factor( GLenum factor );
extern GLuint brw_translate_blend_equation( GLenum mode );
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index f0c79efbd96..fd055e225e0 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -56,7 +56,7 @@ static void do_vs_prog( struct brw_context *brw,
c.prog_data.inputs_read = vp->program.Base.InputsRead;
if (c.key.copy_edgeflag) {
- c.prog_data.outputs_written |= 1<<VERT_RESULT_EDGE;
+ c.prog_data.outputs_written |= BITFIELD64_BIT(VERT_RESULT_EDGE);
c.prog_data.inputs_read |= 1<<VERT_ATTRIB_EDGEFLAG;
}
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index 1638ef81115..00efd3443d1 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -147,7 +147,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
mrf = 4;
for (i = 0; i < VERT_RESULT_MAX; i++) {
- if (c->prog_data.outputs_written & (1 << i)) {
+ if (c->prog_data.outputs_written & BITFIELD64_BIT(i)) {
c->nr_outputs++;
assert(i < Elements(c->regs[PROGRAM_OUTPUT]));
if (i == VERT_RESULT_HPOS) {
@@ -331,63 +331,65 @@ static void unalias3( struct brw_vs_compile *c,
}
}
-static void emit_sop( struct brw_compile *p,
+static void emit_sop( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1,
GLuint cond)
{
+ struct brw_compile *p = &c->func;
+
brw_MOV(p, dst, brw_imm_f(0.0f));
brw_CMP(p, brw_null_reg(), cond, arg0, arg1);
brw_MOV(p, dst, brw_imm_f(1.0f));
brw_set_predicate_control_flag_value(p, 0xff);
}
-static void emit_seq( struct brw_compile *p,
+static void emit_seq( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
{
- emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_EQ);
+ emit_sop(c, dst, arg0, arg1, BRW_CONDITIONAL_EQ);
}
-static void emit_sne( struct brw_compile *p,
+static void emit_sne( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
{
- emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_NEQ);
+ emit_sop(c, dst, arg0, arg1, BRW_CONDITIONAL_NEQ);
}
-static void emit_slt( struct brw_compile *p,
+static void emit_slt( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
{
- emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_L);
+ emit_sop(c, dst, arg0, arg1, BRW_CONDITIONAL_L);
}
-static void emit_sle( struct brw_compile *p,
+static void emit_sle( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
{
- emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_LE);
+ emit_sop(c, dst, arg0, arg1, BRW_CONDITIONAL_LE);
}
-static void emit_sgt( struct brw_compile *p,
+static void emit_sgt( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
{
- emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_G);
+ emit_sop(c, dst, arg0, arg1, BRW_CONDITIONAL_G);
}
-static void emit_sge( struct brw_compile *p,
+static void emit_sge( struct brw_vs_compile *c,
struct brw_reg dst,
struct brw_reg arg0,
struct brw_reg arg1 )
{
- emit_sop(p, dst, arg0, arg1, BRW_CONDITIONAL_GE);
+ emit_sop(c, dst, arg0, arg1, BRW_CONDITIONAL_GE);
}
static void emit_max( struct brw_compile *p,
@@ -912,6 +914,7 @@ get_src_reg( struct brw_vs_compile *c,
case PROGRAM_CONSTANT:
case PROGRAM_UNIFORM:
case PROGRAM_ENV_PARAM:
+ case PROGRAM_LOCAL_PARAM:
if (c->vp->use_const_buffer) {
return get_constant(c, inst, argIndex);
}
@@ -930,7 +933,6 @@ get_src_reg( struct brw_vs_compile *c,
/* this is a normal case since we loop over all three src args */
return brw_null_reg();
- case PROGRAM_LOCAL_PARAM:
case PROGRAM_WRITE_ONLY:
default:
assert(0);
@@ -1122,7 +1124,7 @@ 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 & (1<<VERT_RESULT_PSIZ)) ||
+ if ((c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_PSIZ)) ||
c->key.nr_userclip || BRW_IS_965(p->brw))
{
struct brw_reg header1 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
@@ -1132,7 +1134,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
brw_set_access_mode(p, BRW_ALIGN_16);
- if (c->prog_data.outputs_written & (1<<VERT_RESULT_PSIZ)) {
+ if (c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_PSIZ)) {
struct brw_reg psiz = c->regs[PROGRAM_OUTPUT][VERT_RESULT_PSIZ];
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));
@@ -1222,7 +1224,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
*/
GLuint i, mrf = 0;
for (i = c->first_overflow_output; i < VERT_RESULT_MAX; i++) {
- if (c->prog_data.outputs_written & (1 << i)) {
+ if (c->prog_data.outputs_written & BITFIELD64_BIT(i)) {
/* move from GRF to MRF */
brw_MOV(p, brw_message_reg(4+mrf), c->regs[PROGRAM_OUTPUT][i]);
mrf++;
@@ -1269,6 +1271,38 @@ post_vs_emit( struct brw_vs_compile *c,
}
}
+static GLboolean
+accumulator_contains(struct brw_vs_compile *c, struct brw_reg val)
+{
+ struct brw_compile *p = &c->func;
+ struct brw_instruction *prev_insn = &p->store[p->nr_insn - 1];
+
+ if (p->nr_insn == 0)
+ return GL_FALSE;
+
+ if (val.address_mode != BRW_ADDRESS_DIRECT)
+ return GL_FALSE;
+
+ switch (prev_insn->header.opcode) {
+ case BRW_OPCODE_MOV:
+ case BRW_OPCODE_MAC:
+ case BRW_OPCODE_MUL:
+ if (prev_insn->header.access_mode == BRW_ALIGN_16 &&
+ prev_insn->header.execution_size == val.width &&
+ prev_insn->bits1.da1.dest_reg_file == val.file &&
+ prev_insn->bits1.da1.dest_reg_type == val.type &&
+ prev_insn->bits1.da1.dest_address_mode == val.address_mode &&
+ prev_insn->bits1.da1.dest_reg_nr == val.nr &&
+ prev_insn->bits1.da16.dest_subreg_nr == val.subnr / 16 &&
+ prev_insn->bits1.da16.dest_writemask == 0xf)
+ return GL_TRUE;
+ else
+ return GL_FALSE;
+ default:
+ return GL_FALSE;
+ }
+}
+
static uint32_t
get_predicate(const struct prog_instruction *inst)
{
@@ -1447,7 +1481,8 @@ void brw_vs_emit(struct brw_vs_compile *c )
unalias3(c, dst, args[0], args[1], args[2], emit_lrp_noalias);
break;
case OPCODE_MAD:
- brw_MOV(p, brw_acc_reg(), args[2]);
+ if (!accumulator_contains(c, args[2]))
+ brw_MOV(p, brw_acc_reg(), args[2]);
brw_MAC(p, dst, args[0], args[1]);
break;
case OPCODE_MAX:
@@ -1473,25 +1508,25 @@ void brw_vs_emit(struct brw_vs_compile *c )
break;
case OPCODE_SEQ:
- emit_seq(p, dst, args[0], args[1]);
+ unalias2(c, dst, args[0], args[1], emit_seq);
break;
case OPCODE_SIN:
emit_math1(c, BRW_MATH_FUNCTION_SIN, dst, args[0], BRW_MATH_PRECISION_FULL);
break;
case OPCODE_SNE:
- emit_sne(p, dst, args[0], args[1]);
+ unalias2(c, dst, args[0], args[1], emit_sne);
break;
case OPCODE_SGE:
- emit_sge(p, dst, args[0], args[1]);
+ unalias2(c, dst, args[0], args[1], emit_sge);
break;
case OPCODE_SGT:
- emit_sgt(p, dst, args[0], args[1]);
+ unalias2(c, dst, args[0], args[1], emit_sgt);
break;
case OPCODE_SLT:
- emit_slt(p, dst, args[0], args[1]);
+ unalias2(c, dst, args[0], args[1], emit_slt);
break;
case OPCODE_SLE:
- emit_sle(p, dst, args[0], args[1]);
+ unalias2(c, dst, args[0], args[1], emit_sle);
break;
case OPCODE_SUB:
brw_ADD(p, dst, args[0], negate(args[1]));
diff --git a/src/mesa/drivers/dri/i965/brw_vs_state.c b/src/mesa/drivers/dri/i965/brw_vs_state.c
index d790ab65553..7285466645b 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_state.c
@@ -109,10 +109,39 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
vs.thread3.urb_entry_read_offset = 0;
vs.thread3.const_urb_entry_read_offset = key->curbe_offset * 2;
- if (BRW_IS_IGDNG(brw))
- vs.thread4.nr_urb_entries = key->nr_urb_entries >> 2;
- else
- vs.thread4.nr_urb_entries = key->nr_urb_entries;
+ if (BRW_IS_IGDNG(brw)) {
+ switch (key->nr_urb_entries) {
+ case 8:
+ case 12:
+ case 16:
+ case 32:
+ case 64:
+ case 96:
+ case 128:
+ case 168:
+ case 192:
+ case 224:
+ case 256:
+ vs.thread4.nr_urb_entries = key->nr_urb_entries >> 2;
+ break;
+ default:
+ assert(0);
+ }
+ } else {
+ switch (key->nr_urb_entries) {
+ case 8:
+ case 12:
+ case 16:
+ case 32:
+ break;
+ case 64:
+ assert(BRW_IS_G4X(brw));
+ break;
+ default:
+ assert(0);
+ }
+ vs.thread4.nr_urb_entries = key->nr_urb_entries;
+ }
vs.thread4.urb_entry_allocation_size = key->urb_size - 1;
diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
index 4fa3269bedb..3bc9840a971 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
@@ -52,6 +52,7 @@ brw_vs_update_constant_buffer(struct brw_context *brw)
const struct gl_program_parameter_list *params = vp->program.Base.Parameters;
const int size = params->NumParameters * 4 * sizeof(GLfloat);
drm_intel_bo *const_buffer;
+ int i;
/* BRW_NEW_VERTEX_PROGRAM */
if (!vp->use_const_buffer)
@@ -61,7 +62,19 @@ brw_vs_update_constant_buffer(struct brw_context *brw)
size, 64);
/* _NEW_PROGRAM_CONSTANTS */
- dri_bo_subdata(const_buffer, 0, size, params->ParameterValues);
+
+ /* Updates the ParamaterValues[i] pointers for all parameters of the
+ * basic type of PROGRAM_STATE_VAR.
+ */
+ _mesa_load_state_parameters(&brw->intel.ctx, vp->program.Base.Parameters);
+
+ intel_bo_map_gtt_preferred(intel, const_buffer, GL_TRUE);
+ for (i = 0; i < params->NumParameters; i++) {
+ memcpy(const_buffer->virtual + i * 4 * sizeof(float),
+ params->ParameterValues[i],
+ 4 * sizeof(float));
+ }
+ intel_bo_unmap_gtt_preferred(intel, const_buffer);
return const_buffer;
}
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index 124fde25fe0..72749b3859d 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -46,7 +46,7 @@
#include "brw_state.h"
#include "brw_fallback.h"
#include "brw_vs.h"
-
+#include "brw_wm.h"
static void
dri_bo_release(dri_bo **bo)
@@ -66,8 +66,14 @@ static void brw_destroy_context( struct intel_context *intel )
brw_destroy_state(brw);
brw_draw_destroy( brw );
-
- _mesa_free(brw->wm.compile_data);
+ brw_clear_validated_bos(brw);
+ if (brw->wm.compile_data) {
+ _mesa_free(brw->wm.compile_data->instruction);
+ _mesa_free(brw->wm.compile_data->vreg);
+ _mesa_free(brw->wm.compile_data->refs);
+ _mesa_free(brw->wm.compile_data->prog_instructions);
+ _mesa_free(brw->wm.compile_data);
+ }
for (i = 0; i < brw->state.nr_color_regions; i++)
intel_region_release(&brw->state.color_regions[i]);
@@ -144,9 +150,6 @@ static void brw_new_batch( struct intel_context *intel )
{
struct brw_context *brw = brw_context(&intel->ctx);
- /* Check that we didn't just wrap our batchbuffer at a bad time. */
- assert(!brw->no_batch_wrap);
-
brw->curbe.need_new_bo = GL_TRUE;
/* Mark all context state as needing to be re-emitted.
@@ -175,20 +178,6 @@ static void brw_note_fence( struct intel_context *intel, GLuint fence )
brw_context(&intel->ctx)->state.dirty.brw |= BRW_NEW_FENCE;
}
-/* called from intelWaitForIdle() and intelFlush()
- *
- * For now, just flush everything. Could be smarter later.
- */
-static GLuint brw_flush_cmd( void )
-{
- struct brw_mi_flush flush;
- flush.opcode = CMD_MI_FLUSH;
- flush.pad = 0;
- flush.flags = BRW_FLUSH_STATE_CACHE;
- return *(GLuint *)&flush;
-}
-
-
static void brw_invalidate_state( struct intel_context *intel, GLuint new_state )
{
/* nothing */
@@ -209,6 +198,5 @@ void brwInitVtbl( struct brw_context *brw )
brw->intel.vtbl.finish_batch = brw_finish_batch;
brw->intel.vtbl.destroy = brw_destroy_context;
brw->intel.vtbl.set_draw_region = brw_set_draw_region;
- brw->intel.vtbl.flush_cmd = brw_flush_cmd;
brw->intel.vtbl.debug_batch = brw_debug_batch;
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 964ee104c2f..6895f644104 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -152,8 +152,21 @@ static void do_wm_prog( struct brw_context *brw,
*/
return;
}
+ c->instruction = _mesa_calloc(BRW_WM_MAX_INSN * sizeof(*c->instruction));
+ c->prog_instructions = _mesa_calloc(BRW_WM_MAX_INSN *
+ sizeof(*c->prog_instructions));
+ c->vreg = _mesa_calloc(BRW_WM_MAX_VREG * sizeof(*c->vreg));
+ c->refs = _mesa_calloc(BRW_WM_MAX_REF * sizeof(*c->refs));
} else {
+ void *instruction = c->instruction;
+ void *prog_instructions = c->prog_instructions;
+ void *vreg = c->vreg;
+ void *refs = c->refs;
memset(c, 0, sizeof(*brw->wm.compile_data));
+ c->instruction = instruction;
+ c->prog_instructions = prog_instructions;
+ c->vreg = vreg;
+ c->refs = refs;
}
memcpy(&c->key, key, sizeof(*key));
@@ -217,7 +230,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
ctx->Color.AlphaEnabled)
lookup |= IZ_PS_KILL_ALPHATEST_BIT;
- if (fp->program.Base.OutputsWritten & (1<<FRAG_RESULT_DEPTH))
+ if (fp->program.Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH))
lookup |= IZ_PS_COMPUTES_DEPTH_BIT;
/* _NEW_DEPTH */
@@ -333,7 +346,7 @@ static void brw_wm_populate_key( struct brw_context *brw,
key->nr_color_regions = brw->state.nr_color_regions;
/* CACHE_NEW_VS_PROG */
- key->vp_outputs_written = brw->vs.prog_data->outputs_written & DO_SETUP_BITS;
+ key->vp_outputs_written = brw->vs.prog_data->outputs_written;
/* The unique fragment program ID */
key->program_string_id = fp->id;
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index 47aa4da3067..b9b987ea70a 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -76,10 +76,10 @@ struct brw_wm_prog_key {
GLushort tex_swizzles[BRW_MAX_TEX_UNIT];
- GLuint program_string_id:32;
GLushort origin_x, origin_y;
GLushort drawable_height;
- GLuint vp_outputs_written;
+ GLbitfield64 vp_outputs_written;
+ GLuint program_string_id:32;
};
@@ -162,6 +162,8 @@ struct brw_wm_instruction {
#define BRW_WM_MAX_CONST 256
#define BRW_WM_MAX_SUBROUTINE 16
+/* used in masks next to WRITEMASK_*. */
+#define SATURATE (1<<5)
/* New opcodes to track internal operations required for WM unit.
@@ -200,7 +202,7 @@ struct brw_wm_compile {
* simplifying and adding instructions for interpolation and
* framebuffer writes.
*/
- struct prog_instruction prog_instructions[BRW_WM_MAX_INSN];
+ struct prog_instruction *prog_instructions;
GLuint nr_fp_insns;
GLuint fp_temp;
GLuint fp_interp_emitted;
@@ -211,7 +213,7 @@ struct brw_wm_compile {
struct prog_src_register pixel_w;
- struct brw_wm_value vreg[BRW_WM_MAX_VREG];
+ struct brw_wm_value *vreg;
GLuint nr_vreg;
struct brw_wm_value creg[BRW_WM_MAX_PARAM];
@@ -228,10 +230,10 @@ struct brw_wm_compile {
struct brw_wm_ref undef_ref;
struct brw_wm_value undef_value;
- struct brw_wm_ref refs[BRW_WM_MAX_REF];
+ struct brw_wm_ref *refs;
GLuint nr_refs;
- struct brw_wm_instruction instruction[BRW_WM_MAX_INSN];
+ struct brw_wm_instruction *instruction;
GLuint nr_insns;
struct brw_wm_constref constref[BRW_WM_MAX_CONST];
@@ -306,10 +308,141 @@ void brw_wm_lookup_iz( GLuint line_aa,
GLboolean brw_wm_is_glsl(const struct gl_fragment_program *fp);
void brw_wm_glsl_emit(struct brw_context *brw, struct brw_wm_compile *c);
+/* brw_wm_emit.c */
+void emit_alu1(struct brw_compile *p,
+ struct brw_instruction *(*func)(struct brw_compile *,
+ struct brw_reg,
+ struct brw_reg),
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0);
+void emit_alu2(struct brw_compile *p,
+ struct brw_instruction *(*func)(struct brw_compile *,
+ struct brw_reg,
+ struct brw_reg,
+ struct brw_reg),
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1);
+void emit_cinterp(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0);
void emit_ddxy(struct brw_compile *p,
const struct brw_reg *dst,
GLuint mask,
GLboolean is_ddx,
const struct brw_reg *arg0);
+void emit_delta_xy(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0);
+void emit_dp3(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1);
+void emit_dp4(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1);
+void emit_dph(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1);
+void emit_fb_write(struct brw_wm_compile *c,
+ struct brw_reg *arg0,
+ struct brw_reg *arg1,
+ struct brw_reg *arg2,
+ GLuint target,
+ GLuint eot);
+void emit_frontfacing(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask);
+void emit_linterp(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *deltas);
+void emit_lrp(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1,
+ const struct brw_reg *arg2);
+void emit_mad(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1,
+ const struct brw_reg *arg2);
+void emit_math1(struct brw_wm_compile *c,
+ GLuint function,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0);
+void emit_math2(struct brw_wm_compile *c,
+ GLuint function,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1);
+void emit_min(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1);
+void emit_max(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1);
+void emit_pinterp(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *deltas,
+ const struct brw_reg *w);
+void emit_pixel_xy(struct brw_wm_compile *c,
+ const struct brw_reg *dst,
+ GLuint mask);
+void emit_pixel_w(struct brw_wm_compile *c,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *deltas);
+void emit_sop(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ GLuint cond,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1);
+void emit_tex(struct brw_wm_compile *c,
+ struct brw_reg *dst,
+ GLuint dst_flags,
+ struct brw_reg *arg,
+ struct brw_reg depth_payload,
+ GLuint tex_idx,
+ GLuint sampler,
+ GLboolean shadow);
+void emit_txb(struct brw_wm_compile *c,
+ struct brw_reg *dst,
+ GLuint dst_flags,
+ struct brw_reg *arg,
+ struct brw_reg depth_payload,
+ GLuint tex_idx,
+ GLuint sampler);
+void emit_wpos_xy(struct brw_wm_compile *c,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0);
+void emit_xpd(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1);
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index bf80a2942a4..5390fd25849 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -44,6 +44,7 @@ static INLINE struct brw_reg sechalf( struct brw_reg reg )
return reg;
}
+
/* Payload R0:
*
* R0.0 -- pixel mask, one bit for each of 4 pixels in 4 tiles,
@@ -60,42 +61,50 @@ static INLINE struct brw_reg sechalf( struct brw_reg reg )
* R1.8 -- ?
*/
-
-static void emit_pixel_xy(struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask)
+void emit_pixel_xy(struct brw_wm_compile *c,
+ const struct brw_reg *dst,
+ GLuint mask)
{
+ struct brw_compile *p = &c->func;
struct brw_reg r1 = brw_vec1_grf(1, 0);
struct brw_reg r1_uw = retype(r1, BRW_REGISTER_TYPE_UW);
+ struct brw_reg dst0_uw, dst1_uw;
+ brw_push_insn_state(p);
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
+ if (c->dispatch_width == 16) {
+ dst0_uw = vec16(retype(dst[0], BRW_REGISTER_TYPE_UW));
+ dst1_uw = vec16(retype(dst[1], BRW_REGISTER_TYPE_UW));
+ } else {
+ dst0_uw = vec8(retype(dst[0], BRW_REGISTER_TYPE_UW));
+ dst1_uw = vec8(retype(dst[1], BRW_REGISTER_TYPE_UW));
+ }
+
/* Calculate pixel centers by adding 1 or 0 to each of the
* micro-tile coordinates passed in r1.
*/
if (mask & WRITEMASK_X) {
brw_ADD(p,
- vec16(retype(dst[0], BRW_REGISTER_TYPE_UW)),
+ dst0_uw,
stride(suboffset(r1_uw, 4), 2, 4, 0),
brw_imm_v(0x10101010));
}
if (mask & WRITEMASK_Y) {
brw_ADD(p,
- vec16(retype(dst[1], BRW_REGISTER_TYPE_UW)),
+ dst1_uw,
stride(suboffset(r1_uw,5), 2, 4, 0),
brw_imm_v(0x11001100));
}
-
- brw_set_compression_control(p, BRW_COMPRESSION_COMPRESSED);
+ brw_pop_insn_state(p);
}
-
-static void emit_delta_xy(struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0)
+void emit_delta_xy(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0)
{
struct brw_reg r1 = brw_vec1_grf(1, 0);
@@ -118,10 +127,10 @@ static void emit_delta_xy(struct brw_compile *p,
}
}
-static void emit_wpos_xy(struct brw_wm_compile *c,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0)
+void emit_wpos_xy(struct brw_wm_compile *c,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0)
{
struct brw_compile *p = &c->func;
@@ -146,12 +155,14 @@ static void emit_wpos_xy(struct brw_wm_compile *c,
}
-static void emit_pixel_w( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *deltas)
+void emit_pixel_w(struct brw_wm_compile *c,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *deltas)
{
+ struct brw_compile *p = &c->func;
+
/* Don't need this if all you are doing is interpolating color, for
* instance.
*/
@@ -165,21 +176,29 @@ static void emit_pixel_w( struct brw_compile *p,
brw_MAC(p, brw_message_reg(2), suboffset(interp3, 1), deltas[1]);
/* Calc w */
- brw_math_16( p, dst[3],
- BRW_MATH_FUNCTION_INV,
- BRW_MATH_SATURATE_NONE,
- 2, brw_null_reg(),
- BRW_MATH_PRECISION_FULL);
+ if (c->dispatch_width == 16) {
+ brw_math_16(p, dst[3],
+ BRW_MATH_FUNCTION_INV,
+ BRW_MATH_SATURATE_NONE,
+ 2, brw_null_reg(),
+ BRW_MATH_PRECISION_FULL);
+ } else {
+ brw_math(p, dst[3],
+ BRW_MATH_FUNCTION_INV,
+ BRW_MATH_SATURATE_NONE,
+ 2, brw_null_reg(),
+ BRW_MATH_DATA_VECTOR,
+ BRW_MATH_PRECISION_FULL);
+ }
}
}
-
-static void emit_linterp( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *deltas )
+void emit_linterp(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *deltas)
{
struct brw_reg interp[4];
GLuint nr = arg0[0].nr;
@@ -199,12 +218,12 @@ static void emit_linterp( struct brw_compile *p,
}
-static void emit_pinterp( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *deltas,
- const struct brw_reg *w)
+void emit_pinterp(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *deltas,
+ const struct brw_reg *w)
{
struct brw_reg interp[4];
GLuint nr = arg0[0].nr;
@@ -229,10 +248,10 @@ static void emit_pinterp( struct brw_compile *p,
}
-static void emit_cinterp( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0 )
+void emit_cinterp(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0)
{
struct brw_reg interp[4];
GLuint nr = arg0[0].nr;
@@ -251,9 +270,9 @@ static void emit_cinterp( struct brw_compile *p,
}
/* Sets the destination channels to 1.0 or 0.0 according to glFrontFacing. */
-static void emit_frontfacing( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask )
+void emit_frontfacing(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask)
{
struct brw_reg r1_6ud = retype(brw_vec1_grf(1, 6), BRW_REGISTER_TYPE_UD);
GLuint i;
@@ -352,13 +371,13 @@ void emit_ddxy(struct brw_compile *p,
brw_set_saturate(p, 0);
}
-static void emit_alu1( struct brw_compile *p,
- struct brw_instruction *(*func)(struct brw_compile *,
- struct brw_reg,
- struct brw_reg),
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0 )
+void emit_alu1(struct brw_compile *p,
+ struct brw_instruction *(*func)(struct brw_compile *,
+ struct brw_reg,
+ struct brw_reg),
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0)
{
GLuint i;
@@ -376,15 +395,15 @@ static void emit_alu1( struct brw_compile *p,
}
-static void emit_alu2( struct brw_compile *p,
- struct brw_instruction *(*func)(struct brw_compile *,
- struct brw_reg,
- struct brw_reg,
- struct brw_reg),
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1 )
+void emit_alu2(struct brw_compile *p,
+ struct brw_instruction *(*func)(struct brw_compile *,
+ struct brw_reg,
+ struct brw_reg,
+ struct brw_reg),
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
GLuint i;
@@ -402,12 +421,12 @@ static void emit_alu2( struct brw_compile *p,
}
-static void emit_mad( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1,
- const struct brw_reg *arg2 )
+void emit_mad(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1,
+ const struct brw_reg *arg2)
{
GLuint i;
@@ -422,26 +441,12 @@ static void emit_mad( struct brw_compile *p,
}
}
-static void emit_trunc( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0)
-{
- GLuint i;
-
- for (i = 0; i < 4; i++) {
- if (mask & (1<<i)) {
- brw_RNDZ(p, dst[i], arg0[i]);
- }
- }
-}
-
-static void emit_lrp( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1,
- const struct brw_reg *arg2 )
+void emit_lrp(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1,
+ const struct brw_reg *arg2)
{
GLuint i;
@@ -461,21 +466,24 @@ static void emit_lrp( struct brw_compile *p,
}
}
-static void emit_sop( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- GLuint cond,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1 )
+void emit_sop(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ GLuint cond,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
GLuint i;
for (i = 0; i < 4; i++) {
if (mask & (1<<i)) {
- brw_MOV(p, dst[i], brw_imm_f(0));
+ brw_push_insn_state(p);
brw_CMP(p, brw_null_reg(), cond, arg0[i], arg1[i]);
+ brw_set_predicate_control(p, BRW_PREDICATE_NONE);
+ brw_MOV(p, dst[i], brw_imm_f(0));
+ brw_set_predicate_control(p, BRW_PREDICATE_NORMAL);
brw_MOV(p, dst[i], brw_imm_f(1.0));
- brw_set_predicate_control_flag_value(p, 0xff);
+ brw_pop_insn_state(p);
}
}
}
@@ -559,11 +567,11 @@ static void emit_cmp( struct brw_compile *p,
}
}
-static void emit_max( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1 )
+void emit_max(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
GLuint i;
@@ -583,11 +591,11 @@ static void emit_max( struct brw_compile *p,
}
}
-static void emit_min( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1 )
+void emit_min(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
GLuint i;
@@ -608,11 +616,11 @@ static void emit_min( struct brw_compile *p,
}
-static void emit_dp3( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1 )
+void emit_dp3(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
@@ -630,11 +638,11 @@ static void emit_dp3( struct brw_compile *p,
}
-static void emit_dp4( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1 )
+void emit_dp4(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
@@ -653,11 +661,11 @@ static void emit_dp4( struct brw_compile *p,
}
-static void emit_dph( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1 )
+void emit_dph(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
const int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
@@ -676,11 +684,11 @@ static void emit_dph( struct brw_compile *p,
}
-static void emit_xpd( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1 )
+void emit_xpd(struct brw_compile *p,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
GLuint i;
@@ -701,41 +709,68 @@ static void emit_xpd( struct brw_compile *p,
}
-static void emit_math1( struct brw_compile *p,
- GLuint function,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0 )
+void emit_math1(struct brw_wm_compile *c,
+ GLuint function,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0)
{
+ struct brw_compile *p = &c->func;
int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
+ GLuint saturate = ((mask & SATURATE) ?
+ BRW_MATH_SATURATE_SATURATE :
+ BRW_MATH_SATURATE_NONE);
if (!(mask & WRITEMASK_XYZW))
return; /* Do not emit dead code */
assert(is_power_of_two(mask & WRITEMASK_XYZW));
+ /* If compressed, this will write message reg 2,3 from arg0.x's 16
+ * channels.
+ */
brw_MOV(p, brw_message_reg(2), arg0[0]);
/* Send two messages to perform all 16 operations:
*/
- brw_math_16(p,
- dst[dst_chan],
+ brw_push_insn_state(p);
+ brw_set_compression_control(p, BRW_COMPRESSION_NONE);
+ brw_math(p,
+ dst[dst_chan],
+ function,
+ saturate,
+ 2,
+ brw_null_reg(),
+ BRW_MATH_DATA_VECTOR,
+ BRW_MATH_PRECISION_FULL);
+
+ if (c->dispatch_width == 16) {
+ brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
+ brw_math(p,
+ offset(dst[dst_chan],1),
function,
- (mask & SATURATE) ? BRW_MATH_SATURATE_SATURATE : BRW_MATH_SATURATE_NONE,
- 2,
+ saturate,
+ 3,
brw_null_reg(),
+ BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
+ }
+ brw_pop_insn_state(p);
}
-static void emit_math2( struct brw_compile *p,
- GLuint function,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0,
- const struct brw_reg *arg1)
+void emit_math2(struct brw_wm_compile *c,
+ GLuint function,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
+ struct brw_compile *p = &c->func;
int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
+ GLuint saturate = ((mask & SATURATE) ?
+ BRW_MATH_SATURATE_SATURATE :
+ BRW_MATH_SATURATE_NONE);
if (!(mask & WRITEMASK_XYZW))
return; /* Do not emit dead code */
@@ -746,173 +781,231 @@ static void emit_math2( struct brw_compile *p,
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_MOV(p, brw_message_reg(2), arg0[0]);
- brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
- brw_MOV(p, brw_message_reg(4), sechalf(arg0[0]));
+ if (c->dispatch_width == 16) {
+ brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
+ brw_MOV(p, brw_message_reg(4), sechalf(arg0[0]));
+ }
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_MOV(p, brw_message_reg(3), arg1[0]);
- brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
- brw_MOV(p, brw_message_reg(5), sechalf(arg1[0]));
+ if (c->dispatch_width == 16) {
+ brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
+ brw_MOV(p, brw_message_reg(5), sechalf(arg1[0]));
+ }
-
- /* Send two messages to perform all 16 operations:
- */
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_math(p,
dst[dst_chan],
function,
- (mask & SATURATE) ? BRW_MATH_SATURATE_SATURATE : BRW_MATH_SATURATE_NONE,
+ saturate,
2,
brw_null_reg(),
BRW_MATH_DATA_VECTOR,
BRW_MATH_PRECISION_FULL);
- brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
- brw_math(p,
- offset(dst[dst_chan],1),
- function,
- (mask & SATURATE) ? BRW_MATH_SATURATE_SATURATE : BRW_MATH_SATURATE_NONE,
- 4,
- brw_null_reg(),
- BRW_MATH_DATA_VECTOR,
- BRW_MATH_PRECISION_FULL);
-
+ /* Send two messages to perform all 16 operations:
+ */
+ if (c->dispatch_width == 16) {
+ brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
+ brw_math(p,
+ offset(dst[dst_chan],1),
+ function,
+ saturate,
+ 4,
+ brw_null_reg(),
+ BRW_MATH_DATA_VECTOR,
+ BRW_MATH_PRECISION_FULL);
+ }
brw_pop_insn_state(p);
}
-
-static void emit_tex( struct brw_wm_compile *c,
- const struct brw_wm_instruction *inst,
- struct brw_reg *dst,
- GLuint dst_flags,
- struct brw_reg *arg )
+void emit_tex(struct brw_wm_compile *c,
+ struct brw_reg *dst,
+ GLuint dst_flags,
+ struct brw_reg *arg,
+ struct brw_reg depth_payload,
+ GLuint tex_idx,
+ GLuint sampler,
+ GLboolean shadow)
{
struct brw_compile *p = &c->func;
- GLuint msgLength, responseLength;
- GLuint i, nr;
+ struct brw_reg dst_retyped;
+ GLuint cur_mrf = 2, response_length;
+ GLuint i, nr_texcoords;
GLuint emit;
GLuint msg_type;
+ GLuint mrf_per_channel;
+ GLuint simd_mode;
+
+ if (c->dispatch_width == 16) {
+ mrf_per_channel = 2;
+ response_length = 8;
+ dst_retyped = retype(vec16(dst[0]), BRW_REGISTER_TYPE_UW);
+ simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD16;
+ } else {
+ mrf_per_channel = 1;
+ response_length = 4;
+ dst_retyped = retype(vec8(dst[0]), BRW_REGISTER_TYPE_UW);
+ simd_mode = BRW_SAMPLER_SIMD_MODE_SIMD8;
+ }
/* How many input regs are there?
*/
- switch (inst->tex_idx) {
+ switch (tex_idx) {
case TEXTURE_1D_INDEX:
emit = WRITEMASK_X;
- nr = 1;
+ nr_texcoords = 1;
break;
case TEXTURE_2D_INDEX:
case TEXTURE_RECT_INDEX:
emit = WRITEMASK_XY;
- nr = 2;
+ nr_texcoords = 2;
break;
case TEXTURE_3D_INDEX:
case TEXTURE_CUBE_INDEX:
emit = WRITEMASK_XYZ;
- nr = 3;
+ nr_texcoords = 3;
break;
default:
/* unexpected target */
abort();
}
- if (inst->tex_shadow) {
- nr = 4;
- emit |= WRITEMASK_W;
- }
+ /* Pre-Ironlake, the 8-wide sampler always took u,v,r. */
+ if (!BRW_IS_IGDNG(p->brw) && c->dispatch_width == 8)
+ nr_texcoords = 3;
- msgLength = 1;
+ /* For shadow comparisons, we have to supply u,v,r. */
+ if (shadow)
+ nr_texcoords = 3;
- for (i = 0; i < nr; i++) {
- static const GLuint swz[4] = {0,1,2,2};
- if (emit & (1<<i))
- brw_MOV(p, brw_message_reg(msgLength+1), arg[swz[i]]);
+ /* Emit the texcoords. */
+ for (i = 0; i < nr_texcoords; i++) {
+ if (emit & (1<<i))
+ brw_MOV(p, brw_message_reg(cur_mrf), arg[i]);
else
- brw_MOV(p, brw_message_reg(msgLength+1), brw_imm_f(0));
- msgLength += 2;
+ brw_MOV(p, brw_message_reg(cur_mrf), brw_imm_f(0));
+ cur_mrf += mrf_per_channel;
}
- responseLength = 8; /* always */
+ /* Fill in the shadow comparison reference value. */
+ if (shadow) {
+ if (BRW_IS_IGDNG(p->brw)) {
+ /* Fill in the cube map array index value. */
+ brw_MOV(p, brw_message_reg(cur_mrf), brw_imm_f(0));
+ cur_mrf += mrf_per_channel;
+ } else if (c->dispatch_width == 8) {
+ /* Fill in the LOD bias value. */
+ brw_MOV(p, brw_message_reg(cur_mrf), brw_imm_f(0));
+ cur_mrf += mrf_per_channel;
+ }
+ brw_MOV(p, brw_message_reg(cur_mrf), arg[2]);
+ cur_mrf += mrf_per_channel;
+ }
if (BRW_IS_IGDNG(p->brw)) {
- if (inst->tex_shadow)
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE_IGDNG;
- else
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_IGDNG;
+ if (shadow)
+ msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_IGDNG;
+ else
+ msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_IGDNG;
} else {
- if (inst->tex_shadow)
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE;
- else
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE;
+ /* Note that G45 and older determines shadow compare and dispatch width
+ * from message length for most messages.
+ */
+ if (c->dispatch_width == 16 && shadow)
+ msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE;
+ else
+ msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE;
}
- brw_SAMPLE(p,
- retype(vec16(dst[0]), BRW_REGISTER_TYPE_UW),
+ brw_SAMPLE(p,
+ dst_retyped,
1,
- retype(c->payload.depth[0].hw_reg, BRW_REGISTER_TYPE_UW),
- SURF_INDEX_TEXTURE(inst->tex_unit),
- inst->tex_unit, /* sampler */
- inst->writemask,
- msg_type,
- responseLength,
- msgLength,
- 0,
+ retype(depth_payload, BRW_REGISTER_TYPE_UW),
+ SURF_INDEX_TEXTURE(sampler),
+ sampler,
+ dst_flags & WRITEMASK_XYZW,
+ msg_type,
+ response_length,
+ cur_mrf - 1,
+ 0,
1,
- BRW_SAMPLER_SIMD_MODE_SIMD16);
+ simd_mode);
}
-static void emit_txb( struct brw_wm_compile *c,
- const struct brw_wm_instruction *inst,
- struct brw_reg *dst,
- GLuint dst_flags,
- struct brw_reg *arg )
+void emit_txb(struct brw_wm_compile *c,
+ struct brw_reg *dst,
+ GLuint dst_flags,
+ struct brw_reg *arg,
+ struct brw_reg depth_payload,
+ GLuint tex_idx,
+ GLuint sampler)
{
struct brw_compile *p = &c->func;
GLuint msgLength;
GLuint msg_type;
- /* Shadow ignored for txb.
+ GLuint mrf_per_channel;
+ GLuint response_length;
+ struct brw_reg dst_retyped;
+
+ /* The G45 and older chipsets don't support 8-wide dispatch for LOD biased
+ * samples, so we'll use the 16-wide instruction, leave the second halves
+ * undefined, and trust the execution mask to keep the undefined pixels
+ * from mattering.
*/
- switch (inst->tex_idx) {
+ if (c->dispatch_width == 16 || !BRW_IS_IGDNG(p->brw)) {
+ if (BRW_IS_IGDNG(p->brw))
+ msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_IGDNG;
+ else
+ msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
+ mrf_per_channel = 2;
+ dst_retyped = retype(vec16(dst[0]), BRW_REGISTER_TYPE_UW);
+ response_length = 8;
+ } else {
+ msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_IGDNG;
+ mrf_per_channel = 1;
+ dst_retyped = retype(vec8(dst[0]), BRW_REGISTER_TYPE_UW);
+ response_length = 4;
+ }
+
+ /* Shadow ignored for txb. */
+ switch (tex_idx) {
case TEXTURE_1D_INDEX:
- brw_MOV(p, brw_message_reg(2), arg[0]);
- brw_MOV(p, brw_message_reg(4), brw_imm_f(0));
- brw_MOV(p, brw_message_reg(6), brw_imm_f(0));
+ brw_MOV(p, brw_message_reg(2 + 0 * mrf_per_channel), arg[0]);
+ brw_MOV(p, brw_message_reg(2 + 1 * mrf_per_channel), brw_imm_f(0));
+ brw_MOV(p, brw_message_reg(2 + 2 * mrf_per_channel), brw_imm_f(0));
break;
case TEXTURE_2D_INDEX:
case TEXTURE_RECT_INDEX:
- brw_MOV(p, brw_message_reg(2), arg[0]);
- brw_MOV(p, brw_message_reg(4), arg[1]);
- brw_MOV(p, brw_message_reg(6), brw_imm_f(0));
+ brw_MOV(p, brw_message_reg(2 + 0 * mrf_per_channel), arg[0]);
+ brw_MOV(p, brw_message_reg(2 + 1 * mrf_per_channel), arg[1]);
+ brw_MOV(p, brw_message_reg(2 + 2 * mrf_per_channel), brw_imm_f(0));
break;
case TEXTURE_3D_INDEX:
case TEXTURE_CUBE_INDEX:
- brw_MOV(p, brw_message_reg(2), arg[0]);
- brw_MOV(p, brw_message_reg(4), arg[1]);
- brw_MOV(p, brw_message_reg(6), arg[2]);
+ brw_MOV(p, brw_message_reg(2 + 0 * mrf_per_channel), arg[0]);
+ brw_MOV(p, brw_message_reg(2 + 1 * mrf_per_channel), arg[1]);
+ brw_MOV(p, brw_message_reg(2 + 2 * mrf_per_channel), arg[2]);
break;
default:
/* unexpected target */
abort();
}
- brw_MOV(p, brw_message_reg(8), arg[3]);
- msgLength = 9;
-
- if (BRW_IS_IGDNG(p->brw))
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS_IGDNG;
- else
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
+ brw_MOV(p, brw_message_reg(2 + 3 * mrf_per_channel), arg[3]);
+ msgLength = 2 + 4 * mrf_per_channel - 1;
brw_SAMPLE(p,
- retype(vec16(dst[0]), BRW_REGISTER_TYPE_UW),
+ dst_retyped,
1,
- retype(c->payload.depth[0].hw_reg, BRW_REGISTER_TYPE_UW),
- SURF_INDEX_TEXTURE(inst->tex_unit),
- inst->tex_unit, /* sampler */
- inst->writemask,
+ retype(depth_payload, BRW_REGISTER_TYPE_UW),
+ SURF_INDEX_TEXTURE(sampler),
+ sampler,
+ dst_flags & WRITEMASK_XYZW,
msg_type,
- 8, /* responseLength */
+ response_length,
msgLength,
0,
1,
@@ -920,11 +1013,13 @@ static void emit_txb( struct brw_wm_compile *c,
}
-static void emit_lit( struct brw_compile *p,
- const struct brw_reg *dst,
- GLuint mask,
- const struct brw_reg *arg0 )
+static void emit_lit(struct brw_wm_compile *c,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0)
{
+ struct brw_compile *p = &c->func;
+
assert((mask & WRITEMASK_XW) == 0);
if (mask & WRITEMASK_Y) {
@@ -934,7 +1029,7 @@ static void emit_lit( struct brw_compile *p,
}
if (mask & WRITEMASK_Z) {
- emit_math2(p, BRW_MATH_FUNCTION_POW,
+ emit_math2(c, BRW_MATH_FUNCTION_POW,
&dst[2],
WRITEMASK_X | (mask & SATURATE),
&arg0[1],
@@ -1001,7 +1096,13 @@ static void fire_fb_write( struct brw_wm_compile *c,
GLuint eot )
{
struct brw_compile *p = &c->func;
-
+ struct brw_reg dst;
+
+ if (c->dispatch_width == 16)
+ dst = retype(vec16(brw_null_reg()), BRW_REGISTER_TYPE_UW);
+ else
+ dst = retype(vec8(brw_null_reg()), BRW_REGISTER_TYPE_UW);
+
/* Pass through control information:
*/
/* mov (8) m1.0<1>:ud r1.0<8;8,1>:ud { Align1 NoMask } */
@@ -1018,7 +1119,7 @@ static void fire_fb_write( struct brw_wm_compile *c,
/* Send framebuffer write message: */
/* send (16) null.0<1>:uw m0 r0.0<8;8,1>:uw 0x85a04000:ud { Align1 EOT } */
brw_fb_WRITE(p,
- retype(vec16(brw_null_reg()), BRW_REGISTER_TYPE_UW),
+ dst,
base_reg,
retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW),
target,
@@ -1050,14 +1151,15 @@ static void emit_aa( struct brw_wm_compile *c,
* \param arg1 the pass-through depth value
* \param arg2 the shader-computed depth value
*/
-static void emit_fb_write( struct brw_wm_compile *c,
- struct brw_reg *arg0,
- struct brw_reg *arg1,
- struct brw_reg *arg2,
- GLuint target,
- GLuint eot)
+void emit_fb_write(struct brw_wm_compile *c,
+ struct brw_reg *arg0,
+ struct brw_reg *arg1,
+ struct brw_reg *arg2,
+ GLuint target,
+ GLuint eot)
{
struct brw_compile *p = &c->func;
+ struct brw_context *brw = p->brw;
GLuint nr = 2;
GLuint channel;
@@ -1069,30 +1171,37 @@ static void emit_fb_write( struct brw_wm_compile *c,
/* I don't really understand how this achieves the color interleave
* (ie RGBARGBA) in the result: [Do the saturation here]
*/
- {
- brw_push_insn_state(p);
-
- for (channel = 0; channel < 4; channel++) {
+ brw_push_insn_state(p);
+
+ for (channel = 0; channel < 4; channel++) {
+ if (c->dispatch_width == 16 && (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))) {
+ /* By setting the high bit of the MRF register number, we indicate
+ * that we want COMPR4 mode - instead of doing the usual destination
+ * + 1 for the second half we get destination + 4.
+ */
+ brw_MOV(p,
+ brw_message_reg(nr + channel + (1 << 7)),
+ arg0[channel]);
+ } else {
/* mov (8) m2.0<1>:ud r28.0<8;8,1>:ud { Align1 } */
/* mov (8) m6.0<1>:ud r29.0<8;8,1>:ud { Align1 SecHalf } */
-
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_MOV(p,
brw_message_reg(nr + channel),
arg0[channel]);
-
- brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
- brw_MOV(p,
- brw_message_reg(nr + channel + 4),
- sechalf(arg0[channel]));
- }
- /* skip over the regs populated above:
- */
- nr += 8;
-
- brw_pop_insn_state(p);
+ if (c->dispatch_width == 16) {
+ brw_set_compression_control(p, BRW_COMPRESSION_2NDHALF);
+ brw_MOV(p,
+ brw_message_reg(nr + channel + 4),
+ sechalf(arg0[channel]));
+ }
+ }
}
+ /* skip over the regs populated above:
+ */
+ nr += 8;
+ brw_pop_insn_state(p);
if (c->key.source_depth_to_render_target)
{
@@ -1142,7 +1251,7 @@ static void emit_fb_write( struct brw_wm_compile *c,
get_element_ud(brw_vec8_grf(1,0), 6),
brw_imm_ud(1<<26));
- jmp = brw_JMPI(p, ip, ip, brw_imm_d(0));
+ jmp = brw_JMPI(p, ip, ip, brw_imm_w(0));
{
emit_aa(c, arg1, 2);
fire_fb_write(c, 0, nr, target, eot);
@@ -1156,7 +1265,6 @@ static void emit_fb_write( struct brw_wm_compile *c,
}
}
-
/**
* Move a GPR to scratch memory.
*/
@@ -1294,7 +1402,7 @@ void brw_wm_emit( struct brw_wm_compile *c )
/* Generated instructions for calculating triangle interpolants:
*/
case WM_PIXELXY:
- emit_pixel_xy(p, dst, dst_flags);
+ emit_pixel_xy(c, dst, dst_flags);
break;
case WM_DELTAXY:
@@ -1306,7 +1414,7 @@ void brw_wm_emit( struct brw_wm_compile *c )
break;
case WM_PIXELW:
- emit_pixel_w(p, dst, dst_flags, args[0], args[1]);
+ emit_pixel_w(c, dst, dst_flags, args[0], args[1]);
break;
case WM_LINTERP:
@@ -1364,7 +1472,7 @@ void brw_wm_emit( struct brw_wm_compile *c )
break;
case OPCODE_TRUNC:
- emit_trunc(p, dst, dst_flags, args[0]);
+ emit_alu1(p, brw_RNDZ, dst, dst_flags, args[0]);
break;
case OPCODE_LRP:
@@ -1391,27 +1499,27 @@ void brw_wm_emit( struct brw_wm_compile *c )
/* Higher math functions:
*/
case OPCODE_RCP:
- emit_math1(p, BRW_MATH_FUNCTION_INV, dst, dst_flags, args[0]);
+ emit_math1(c, BRW_MATH_FUNCTION_INV, dst, dst_flags, args[0]);
break;
case OPCODE_RSQ:
- emit_math1(p, BRW_MATH_FUNCTION_RSQ, dst, dst_flags, args[0]);
+ emit_math1(c, BRW_MATH_FUNCTION_RSQ, dst, dst_flags, args[0]);
break;
case OPCODE_SIN:
- emit_math1(p, BRW_MATH_FUNCTION_SIN, dst, dst_flags, args[0]);
+ emit_math1(c, BRW_MATH_FUNCTION_SIN, dst, dst_flags, args[0]);
break;
case OPCODE_COS:
- emit_math1(p, BRW_MATH_FUNCTION_COS, dst, dst_flags, args[0]);
+ emit_math1(c, BRW_MATH_FUNCTION_COS, dst, dst_flags, args[0]);
break;
case OPCODE_EX2:
- emit_math1(p, BRW_MATH_FUNCTION_EXP, dst, dst_flags, args[0]);
+ emit_math1(c, BRW_MATH_FUNCTION_EXP, dst, dst_flags, args[0]);
break;
case OPCODE_LG2:
- emit_math1(p, BRW_MATH_FUNCTION_LOG, dst, dst_flags, args[0]);
+ emit_math1(c, BRW_MATH_FUNCTION_LOG, dst, dst_flags, args[0]);
break;
case OPCODE_SCS:
@@ -1419,13 +1527,13 @@ void brw_wm_emit( struct brw_wm_compile *c )
* fixup for 16-element execution.
*/
if (dst_flags & WRITEMASK_X)
- emit_math1(p, BRW_MATH_FUNCTION_COS, dst, (dst_flags&SATURATE)|WRITEMASK_X, args[0]);
+ emit_math1(c, BRW_MATH_FUNCTION_COS, dst, (dst_flags&SATURATE)|WRITEMASK_X, args[0]);
if (dst_flags & WRITEMASK_Y)
- emit_math1(p, BRW_MATH_FUNCTION_SIN, dst+1, (dst_flags&SATURATE)|WRITEMASK_X, args[0]);
+ emit_math1(c, BRW_MATH_FUNCTION_SIN, dst+1, (dst_flags&SATURATE)|WRITEMASK_X, args[0]);
break;
case OPCODE_POW:
- emit_math2(p, BRW_MATH_FUNCTION_POW, dst, dst_flags, args[0], args[1]);
+ emit_math2(c, BRW_MATH_FUNCTION_POW, dst, dst_flags, args[0], args[1]);
break;
/* Comparisons:
@@ -1463,17 +1571,20 @@ void brw_wm_emit( struct brw_wm_compile *c )
break;
case OPCODE_LIT:
- emit_lit(p, dst, dst_flags, args[0]);
+ emit_lit(c, dst, dst_flags, args[0]);
break;
/* Texturing operations:
*/
case OPCODE_TEX:
- emit_tex(c, inst, dst, dst_flags, args[0]);
+ emit_tex(c, dst, dst_flags, args[0], c->payload.depth[0].hw_reg,
+ inst->tex_idx, inst->tex_unit,
+ inst->tex_shadow);
break;
case OPCODE_TXB:
- emit_txb(c, inst, dst, dst_flags, args[0]);
+ emit_txb(c, dst, dst_flags, args[0], c->payload.depth[0].hw_reg,
+ inst->tex_idx, inst->tex_unit);
break;
case OPCODE_KIL:
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index 0e86d75deac..3737faf26fb 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
@@ -138,7 +138,6 @@ static struct prog_dst_register dst_reg(GLuint file, GLuint idx)
reg.CondMask = COND_TR;
reg.CondSwizzle = 0;
reg.CondSrc = 0;
- reg.pad = 0;
return reg;
}
@@ -182,6 +181,8 @@ static void release_temp( struct brw_wm_compile *c, struct prog_dst_register tem
static struct prog_instruction *get_fp_inst(struct brw_wm_compile *c)
{
assert(c->nr_fp_insns < BRW_WM_MAX_INSN);
+ memset(&c->prog_instructions[c->nr_fp_insns], 0,
+ sizeof(*c->prog_instructions));
return &c->prog_instructions[c->nr_fp_insns++];
}
@@ -448,7 +449,6 @@ static void emit_interp( struct brw_wm_compile *c,
break;
case FRAG_ATTRIB_FACE:
- /* XXX review/test this case */
emit_op(c,
WM_FRONTFACING,
dst_mask(dst, WRITEMASK_X),
@@ -957,7 +957,7 @@ static void precalc_txp( struct brw_wm_compile *c,
-static void emit_fb_write( struct brw_wm_compile *c )
+static void emit_render_target_writes( struct brw_wm_compile *c )
{
struct prog_src_register payload_r0_depth = src_reg(PROGRAM_PAYLOAD, PAYLOAD_DEPTH);
struct prog_src_register outdepth = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_DEPTH);
@@ -985,7 +985,7 @@ static void emit_fb_write( struct brw_wm_compile *c )
}
else {
/* if gl_FragData[0] is written, use it, else use gl_FragColor */
- if (c->fp->program.Base.OutputsWritten & (1 << FRAG_RESULT_DATA0))
+ if (c->fp->program.Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DATA0))
outcolor = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_DATA0);
else
outcolor = src_reg(PROGRAM_OUTPUT, FRAG_RESULT_COLOR);
@@ -1154,7 +1154,7 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
out->DstReg.WriteMask = 0;
break;
case OPCODE_END:
- emit_fb_write(c);
+ emit_render_target_writes(c);
break;
case OPCODE_PRINT:
break;
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 28d6d4eba5c..e8c2cb66ec3 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -371,7 +371,7 @@ static void prealloc_reg(struct brw_wm_compile *c)
for (j = 0; j < 4; j++)
set_reg(c, PROGRAM_PAYLOAD, fp_input, j, reg);
}
- if (c->key.vp_outputs_written & (1 << i)) {
+ if (c->key.vp_outputs_written & BITFIELD64_BIT(i)) {
reg_index += 2;
}
}
@@ -550,42 +550,6 @@ static struct brw_reg get_src_reg(struct brw_wm_compile *c,
}
}
-
-/**
- * Same as \sa get_src_reg() but if the register is a literal, emit
- * a brw_reg encoding the literal.
- * Note that a brw instruction only allows one src operand to be a literal.
- * For instructions with more than one operand, only the second can be a
- * literal. This means that we treat some literals as constants/uniforms
- * (which why PROGRAM_CONSTANT is checked in fetch_constants()).
- *
- */
-static struct brw_reg get_src_reg_imm(struct brw_wm_compile *c,
- const struct prog_instruction *inst,
- GLuint srcRegIndex, GLuint channel)
-{
- const struct prog_src_register *src = &inst->SrcReg[srcRegIndex];
- if (src->File == PROGRAM_CONSTANT) {
- /* a literal */
- const int component = GET_SWZ(src->Swizzle, channel);
- const GLfloat *param =
- c->fp->program.Base.Parameters->ParameterValues[src->Index];
- GLfloat value = param[component];
- if (src->Negate & (1 << channel))
- value = -value;
- if (src->Abs)
- value = FABSF(value);
-#if 0
- printf(" form immed value %f for chan %d\n", value, channel);
-#endif
- return brw_imm_f(value);
- }
- else {
- return get_src_reg(c, inst, srcRegIndex, channel);
- }
-}
-
-
/**
* Subroutines are minimal support for resusable instruction sequences.
* They are implemented as simply as possible to minimise overhead: there
@@ -650,542 +614,110 @@ static void invoke_subroutine( struct brw_wm_compile *c,
}
}
-static void emit_trunc( struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- int i;
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- brw_set_saturate(p, inst->SaturateMode != SATURATE_OFF);
- for (i = 0; i < 4; i++) {
- if (mask & (1<<i)) {
- struct brw_reg src, dst;
- dst = get_dst_reg(c, inst, i);
- src = get_src_reg(c, inst, 0, i);
- brw_RNDZ(p, dst, src);
- }
- }
- brw_set_saturate(p, 0);
-}
-
-static void emit_mov( struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- int i;
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- brw_set_saturate(p, inst->SaturateMode != SATURATE_OFF);
- for (i = 0; i < 4; i++) {
- if (mask & (1<<i)) {
- struct brw_reg src, dst;
- dst = get_dst_reg(c, inst, i);
- /* XXX some moves from immediate value don't work reliably!!! */
- /*src = get_src_reg_imm(c, inst, 0, i);*/
- src = get_src_reg(c, inst, 0, i);
- brw_MOV(p, dst, src);
- }
- }
- brw_set_saturate(p, 0);
-}
-
-static void emit_pixel_xy(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_reg r1 = brw_vec1_grf(1, 0);
- struct brw_reg r1_uw = retype(r1, BRW_REGISTER_TYPE_UW);
-
- struct brw_reg dst0, dst1;
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
-
- dst0 = get_dst_reg(c, inst, 0);
- dst1 = get_dst_reg(c, inst, 1);
- /* Calculate pixel centers by adding 1 or 0 to each of the
- * micro-tile coordinates passed in r1.
- */
- if (mask & WRITEMASK_X) {
- brw_ADD(p,
- vec8(retype(dst0, BRW_REGISTER_TYPE_UW)),
- stride(suboffset(r1_uw, 4), 2, 4, 0),
- brw_imm_v(0x10101010));
- }
-
- if (mask & WRITEMASK_Y) {
- brw_ADD(p,
- vec8(retype(dst1, BRW_REGISTER_TYPE_UW)),
- stride(suboffset(r1_uw, 5), 2, 4, 0),
- brw_imm_v(0x11001100));
- }
-}
-
-static void emit_delta_xy(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_reg r1 = brw_vec1_grf(1, 0);
- struct brw_reg dst0, dst1, src0, src1;
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
-
- dst0 = get_dst_reg(c, inst, 0);
- dst1 = get_dst_reg(c, inst, 1);
- src0 = get_src_reg(c, inst, 0, 0);
- src1 = get_src_reg(c, inst, 0, 1);
- /* Calc delta X,Y by subtracting origin in r1 from the pixel
- * centers.
- */
- if (mask & WRITEMASK_X) {
- brw_ADD(p,
- dst0,
- retype(src0, BRW_REGISTER_TYPE_UW),
- negate(r1));
- }
-
- if (mask & WRITEMASK_Y) {
- brw_ADD(p,
- dst1,
- retype(src1, BRW_REGISTER_TYPE_UW),
- negate(suboffset(r1,1)));
-
- }
-}
-
-static void fire_fb_write( struct brw_wm_compile *c,
- GLuint base_reg,
- GLuint nr,
- GLuint target,
- GLuint eot)
-{
- struct brw_compile *p = &c->func;
- /* Pass through control information:
- */
- /* mov (8) m1.0<1>:ud r1.0<8;8,1>:ud { Align1 NoMask } */
- {
- brw_push_insn_state(p);
- brw_set_mask_control(p, BRW_MASK_DISABLE); /* ? */
- brw_MOV(p,
- brw_message_reg(base_reg + 1),
- brw_vec8_grf(1, 0));
- brw_pop_insn_state(p);
- }
- /* Send framebuffer write message: */
- brw_fb_WRITE(p,
- retype(vec8(brw_null_reg()), BRW_REGISTER_TYPE_UW),
- base_reg,
- retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UW),
- target,
- nr,
- 0,
- eot);
-}
-
-static void emit_fb_write(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- int nr = 2;
- int channel;
- GLuint target, eot;
- struct brw_reg src0;
-
- /* Reserve a space for AA - may not be needed:
- */
- if (c->key.aa_dest_stencil_reg)
- nr += 1;
-
- brw_push_insn_state(p);
- for (channel = 0; channel < 4; channel++) {
- src0 = get_src_reg(c, inst, 0, channel);
- /* mov (8) m2.0<1>:ud r28.0<8;8,1>:ud { Align1 } */
- /* mov (8) m6.0<1>:ud r29.0<8;8,1>:ud { Align1 SecHalf } */
- brw_MOV(p, brw_message_reg(nr + channel), src0);
- }
- /* skip over the regs populated above: */
- nr += 8;
- brw_pop_insn_state(p);
-
- if (c->key.source_depth_to_render_target) {
- if (c->key.computes_depth) {
- src0 = get_src_reg(c, inst, 2, 2);
- brw_MOV(p, brw_message_reg(nr), src0);
- }
- else {
- src0 = get_src_reg(c, inst, 1, 1);
- brw_MOV(p, brw_message_reg(nr), src0);
- }
-
- nr += 2;
- }
-
- if (c->key.dest_depth_reg) {
- const GLuint comp = c->key.dest_depth_reg / 2;
- const GLuint off = c->key.dest_depth_reg % 2;
-
- if (off != 0) {
- /* XXX this code needs review/testing */
- struct brw_reg arg1_0 = get_src_reg(c, inst, 1, comp);
- struct brw_reg arg1_1 = get_src_reg(c, inst, 1, comp+1);
-
- brw_push_insn_state(p);
- brw_set_compression_control(p, BRW_COMPRESSION_NONE);
-
- brw_MOV(p, brw_message_reg(nr), offset(arg1_0, 1));
- /* 2nd half? */
- brw_MOV(p, brw_message_reg(nr+1), arg1_1);
- brw_pop_insn_state(p);
- }
- else
- {
- struct brw_reg src = get_src_reg(c, inst, 1, 1);
- brw_MOV(p, brw_message_reg(nr), src);
- }
- nr += 2;
- }
-
- target = INST_AUX_GET_TARGET(inst->Aux);
- eot = inst->Aux & INST_AUX_EOT;
- fire_fb_write(c, 0, nr, target, eot);
-}
-
-static void emit_pixel_w( struct brw_wm_compile *c,
- const struct prog_instruction *inst)
+/* Workaround for using brw_wm_emit.c's emit functions, which expect
+ * destination regs to be uniquely written. Moves arguments out to
+ * temporaries as necessary for instructions which use their destination as
+ * a temporary.
+ */
+static void
+unalias3(struct brw_wm_compile *c,
+ void (*func)(struct brw_compile *c,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1,
+ const struct brw_reg *arg2),
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1,
+ const struct brw_reg *arg2)
{
struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- if (mask & WRITEMASK_W) {
- struct brw_reg dst, src0, delta0, delta1;
- struct brw_reg interp3;
-
- dst = get_dst_reg(c, inst, 3);
- src0 = get_src_reg(c, inst, 0, 0);
- delta0 = get_src_reg(c, inst, 1, 0);
- delta1 = get_src_reg(c, inst, 1, 1);
-
- interp3 = brw_vec1_grf(src0.nr+1, 4);
- /* Calc 1/w - just linterp wpos[3] optimized by putting the
- * result straight into a message reg.
- */
- brw_LINE(p, brw_null_reg(), interp3, delta0);
- brw_MAC(p, brw_message_reg(2), suboffset(interp3, 1), delta1);
-
- /* Calc w */
- brw_math_16( p, dst,
- BRW_MATH_FUNCTION_INV,
- BRW_MATH_SATURATE_NONE,
- 2, brw_null_reg(),
- BRW_MATH_PRECISION_FULL);
- }
-}
+ struct brw_reg tmp_arg0[4], tmp_arg1[4], tmp_arg2[4];
+ int i, j;
+ int mark = mark_tmps(c);
-static void emit_linterp(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- struct brw_reg interp[4];
- struct brw_reg dst, delta0, delta1;
- struct brw_reg src0;
- GLuint nr, i;
-
- src0 = get_src_reg(c, inst, 0, 0);
- delta0 = get_src_reg(c, inst, 1, 0);
- delta1 = get_src_reg(c, inst, 1, 1);
- nr = src0.nr;
-
- interp[0] = brw_vec1_grf(nr, 0);
- interp[1] = brw_vec1_grf(nr, 4);
- interp[2] = brw_vec1_grf(nr+1, 0);
- interp[3] = brw_vec1_grf(nr+1, 4);
-
- for(i = 0; i < 4; i++ ) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- brw_LINE(p, brw_null_reg(), interp[i], delta0);
- brw_MAC(p, dst, suboffset(interp[i],1), delta1);
- }
+ for (j = 0; j < 4; j++) {
+ tmp_arg0[j] = arg0[j];
+ tmp_arg1[j] = arg1[j];
+ tmp_arg2[j] = arg2[j];
}
-}
-
-static void emit_cinterp(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- struct brw_reg interp[4];
- struct brw_reg dst, src0;
- GLuint nr, i;
-
- src0 = get_src_reg(c, inst, 0, 0);
- nr = src0.nr;
-
- interp[0] = brw_vec1_grf(nr, 0);
- interp[1] = brw_vec1_grf(nr, 4);
- interp[2] = brw_vec1_grf(nr+1, 0);
- interp[3] = brw_vec1_grf(nr+1, 4);
-
- for(i = 0; i < 4; i++ ) {
+ for (i = 0; i < 4; i++) {
if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- brw_MOV(p, dst, suboffset(interp[i],3));
+ for (j = 0; j < 4; j++) {
+ if (arg0[j].file == dst[i].file &&
+ dst[i].nr == arg0[j].nr) {
+ tmp_arg0[j] = alloc_tmp(c);
+ brw_MOV(p, tmp_arg0[j], arg0[j]);
+ }
+ if (arg1[j].file == dst[i].file &&
+ dst[i].nr == arg1[j].nr) {
+ tmp_arg1[j] = alloc_tmp(c);
+ brw_MOV(p, tmp_arg1[j], arg1[j]);
+ }
+ if (arg2[j].file == dst[i].file &&
+ dst[i].nr == arg2[j].nr) {
+ tmp_arg2[j] = alloc_tmp(c);
+ brw_MOV(p, tmp_arg2[j], arg2[j]);
+ }
+ }
}
}
-}
-
-static void emit_pinterp(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
-
- struct brw_reg interp[4];
- struct brw_reg dst, delta0, delta1;
- struct brw_reg src0, w;
- GLuint nr, i;
- src0 = get_src_reg(c, inst, 0, 0);
- delta0 = get_src_reg(c, inst, 1, 0);
- delta1 = get_src_reg(c, inst, 1, 1);
- w = get_src_reg(c, inst, 2, 3);
- nr = src0.nr;
+ func(p, dst, mask, tmp_arg0, tmp_arg1, tmp_arg2);
- interp[0] = brw_vec1_grf(nr, 0);
- interp[1] = brw_vec1_grf(nr, 4);
- interp[2] = brw_vec1_grf(nr+1, 0);
- interp[3] = brw_vec1_grf(nr+1, 4);
-
- for(i = 0; i < 4; i++ ) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- brw_LINE(p, brw_null_reg(), interp[i], delta0);
- brw_MAC(p, dst, suboffset(interp[i],1),
- delta1);
- brw_MUL(p, dst, dst, w);
- }
- }
+ release_tmps(c, mark);
}
-/* Sets the destination channels to 1.0 or 0.0 according to glFrontFacing. */
-static void emit_frontfacing(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
+/* Workaround for using brw_wm_emit.c's emit functions, which expect
+ * destination regs to be uniquely written. Moves arguments out to
+ * temporaries as necessary for instructions which use their destination as
+ * a temporary.
+ */
+static void
+unalias2(struct brw_wm_compile *c,
+ void (*func)(struct brw_compile *c,
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1),
+ const struct brw_reg *dst,
+ GLuint mask,
+ const struct brw_reg *arg0,
+ const struct brw_reg *arg1)
{
struct brw_compile *p = &c->func;
- struct brw_reg r1_6ud = retype(brw_vec1_grf(1, 6), BRW_REGISTER_TYPE_UD);
- struct brw_reg dst;
- GLuint mask = inst->DstReg.WriteMask;
- int i;
+ struct brw_reg tmp_arg0[4], tmp_arg1[4];
+ int i, j;
+ int mark = mark_tmps(c);
- for (i = 0; i < 4; i++) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- brw_MOV(p, dst, brw_imm_f(0.0));
- }
+ for (j = 0; j < 4; j++) {
+ tmp_arg0[j] = arg0[j];
+ tmp_arg1[j] = arg1[j];
}
- /* bit 31 is "primitive is back face", so checking < (1 << 31) gives
- * us front face
- */
- brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_L, r1_6ud, brw_imm_ud(1 << 31));
for (i = 0; i < 4; i++) {
if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- brw_MOV(p, dst, brw_imm_f(1.0));
+ for (j = 0; j < 4; j++) {
+ if (arg0[j].file == dst[i].file &&
+ dst[i].nr == arg0[j].nr) {
+ tmp_arg0[j] = alloc_tmp(c);
+ brw_MOV(p, tmp_arg0[j], arg0[j]);
+ }
+ if (arg1[j].file == dst[i].file &&
+ dst[i].nr == arg1[j].nr) {
+ tmp_arg1[j] = alloc_tmp(c);
+ brw_MOV(p, tmp_arg1[j], arg1[j]);
+ }
+ }
}
}
- brw_set_predicate_control_flag_value(p, 0xff);
-}
-static void emit_xpd(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- int i;
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- for (i = 0; i < 4; i++) {
- GLuint i2 = (i+2)%3;
- GLuint i1 = (i+1)%3;
- if (mask & (1<<i)) {
- struct brw_reg src0, src1, dst;
- dst = get_dst_reg(c, inst, i);
- src0 = negate(get_src_reg(c, inst, 0, i2));
- src1 = get_src_reg_imm(c, inst, 1, i1);
- brw_MUL(p, brw_null_reg(), src0, src1);
- src0 = get_src_reg(c, inst, 0, i1);
- src1 = get_src_reg_imm(c, inst, 1, i2);
- brw_set_saturate(p, inst->SaturateMode != SATURATE_OFF);
- brw_MAC(p, dst, src0, src1);
- brw_set_saturate(p, 0);
- }
- }
- brw_set_saturate(p, 0);
-}
+ func(p, dst, mask, tmp_arg0, tmp_arg1);
-static void emit_dp3(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_reg src0[3], src1[3], dst;
- int i;
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
-
- if (!(mask & WRITEMASK_XYZW))
- return;
-
- assert(is_power_of_two(mask & WRITEMASK_XYZW));
-
- for (i = 0; i < 3; i++) {
- src0[i] = get_src_reg(c, inst, 0, i);
- src1[i] = get_src_reg_imm(c, inst, 1, i);
- }
-
- dst = get_dst_reg(c, inst, dst_chan);
- brw_MUL(p, brw_null_reg(), src0[0], src1[0]);
- brw_MAC(p, brw_null_reg(), src0[1], src1[1]);
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- brw_MAC(p, dst, src0[2], src1[2]);
- brw_set_saturate(p, 0);
-}
-
-static void emit_dp4(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_reg src0[4], src1[4], dst;
- int i;
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
-
- if (!(mask & WRITEMASK_XYZW))
- return;
-
- assert(is_power_of_two(mask & WRITEMASK_XYZW));
-
- for (i = 0; i < 4; i++) {
- src0[i] = get_src_reg(c, inst, 0, i);
- src1[i] = get_src_reg_imm(c, inst, 1, i);
- }
- dst = get_dst_reg(c, inst, dst_chan);
- brw_MUL(p, brw_null_reg(), src0[0], src1[0]);
- brw_MAC(p, brw_null_reg(), src0[1], src1[1]);
- brw_MAC(p, brw_null_reg(), src0[2], src1[2]);
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- brw_MAC(p, dst, src0[3], src1[3]);
- brw_set_saturate(p, 0);
-}
-
-static void emit_dph(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_reg src0[4], src1[4], dst;
- int i;
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
-
- if (!(mask & WRITEMASK_XYZW))
- return;
-
- assert(is_power_of_two(mask & WRITEMASK_XYZW));
-
- for (i = 0; i < 4; i++) {
- src0[i] = get_src_reg(c, inst, 0, i);
- src1[i] = get_src_reg_imm(c, inst, 1, i);
- }
- dst = get_dst_reg(c, inst, dst_chan);
- brw_MUL(p, brw_null_reg(), src0[0], src1[0]);
- brw_MAC(p, brw_null_reg(), src0[1], src1[1]);
- brw_MAC(p, dst, src0[2], src1[2]);
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- brw_ADD(p, dst, dst, src1[3]);
- brw_set_saturate(p, 0);
-}
-
-/**
- * Emit a scalar instruction, like RCP, RSQ, LOG, EXP.
- * Note that the result of the function is smeared across the dest
- * register's X, Y, Z and W channels (subject to writemasking of course).
- */
-static void emit_math1(struct brw_wm_compile *c,
- const struct prog_instruction *inst, GLuint func)
-{
- struct brw_compile *p = &c->func;
- struct brw_reg src0, dst;
- GLuint mask = inst->DstReg.WriteMask;
- int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
-
- if (!(mask & WRITEMASK_XYZW))
- return;
-
- assert(is_power_of_two(mask & WRITEMASK_XYZW));
-
- /* Get first component of source register */
- dst = get_dst_reg(c, inst, dst_chan);
- src0 = get_src_reg(c, inst, 0, 0);
-
- brw_MOV(p, brw_message_reg(2), src0);
- brw_math(p,
- dst,
- func,
- (inst->SaturateMode != SATURATE_OFF) ? BRW_MATH_SATURATE_SATURATE : BRW_MATH_SATURATE_NONE,
- 2,
- brw_null_reg(),
- BRW_MATH_DATA_VECTOR,
- BRW_MATH_PRECISION_FULL);
-}
-
-static void emit_rcp(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_math1(c, inst, BRW_MATH_FUNCTION_INV);
-}
-
-static void emit_rsq(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_math1(c, inst, BRW_MATH_FUNCTION_RSQ);
-}
-
-static void emit_sin(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_math1(c, inst, BRW_MATH_FUNCTION_SIN);
-}
-
-static void emit_cos(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_math1(c, inst, BRW_MATH_FUNCTION_COS);
-}
-
-static void emit_ex2(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_math1(c, inst, BRW_MATH_FUNCTION_EXP);
-}
-
-static void emit_lg2(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_math1(c, inst, BRW_MATH_FUNCTION_LOG);
-}
-
-static void emit_add(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- struct brw_reg src0, src1, dst;
- GLuint mask = inst->DstReg.WriteMask;
- int i;
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- for (i = 0 ; i < 4; i++) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- src0 = get_src_reg(c, inst, 0, i);
- src1 = get_src_reg_imm(c, inst, 1, i);
- brw_ADD(p, dst, src0, src1);
- }
- }
- brw_set_saturate(p, 0);
+ release_tmps(c, mark);
}
static void emit_arl(struct brw_wm_compile *c,
@@ -1201,180 +733,6 @@ static void emit_arl(struct brw_wm_compile *c,
brw_set_saturate(p, 0);
}
-
-static void emit_mul(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- struct brw_reg src0, src1, dst;
- GLuint mask = inst->DstReg.WriteMask;
- int i;
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- for (i = 0 ; i < 4; i++) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- src0 = get_src_reg(c, inst, 0, i);
- src1 = get_src_reg_imm(c, inst, 1, i);
- brw_MUL(p, dst, src0, src1);
- }
- }
- brw_set_saturate(p, 0);
-}
-
-static void emit_frc(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- struct brw_reg src0, dst;
- GLuint mask = inst->DstReg.WriteMask;
- int i;
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- for (i = 0 ; i < 4; i++) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- src0 = get_src_reg_imm(c, inst, 0, i);
- brw_FRC(p, dst, src0);
- }
- }
- if (inst->SaturateMode != SATURATE_OFF)
- brw_set_saturate(p, 0);
-}
-
-static void emit_flr(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- struct brw_reg src0, dst;
- GLuint mask = inst->DstReg.WriteMask;
- int i;
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- for (i = 0 ; i < 4; i++) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- src0 = get_src_reg_imm(c, inst, 0, i);
- brw_RNDD(p, dst, src0);
- }
- }
- brw_set_saturate(p, 0);
-}
-
-
-static void emit_min_max(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- const GLuint mask = inst->DstReg.WriteMask;
- const int mark = mark_tmps(c);
- int i;
- brw_push_insn_state(p);
- for (i = 0; i < 4; i++) {
- if (mask & (1<<i)) {
- struct brw_reg real_dst = get_dst_reg(c, inst, i);
- struct brw_reg src0 = get_src_reg(c, inst, 0, i);
- struct brw_reg src1 = get_src_reg(c, inst, 1, i);
- struct brw_reg dst;
- /* if dst==src0 or dst==src1 we need to use a temp reg */
- GLboolean use_temp = brw_same_reg(dst, src0) ||
- brw_same_reg(dst, src1);
- if (use_temp)
- dst = alloc_tmp(c);
- else
- dst = real_dst;
-
- /*
- printf(" Min/max: dst %d src0 %d src1 %d\n",
- dst.nr, src0.nr, src1.nr);
- */
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- brw_MOV(p, dst, src0);
- brw_set_saturate(p, 0);
-
- if (inst->Opcode == OPCODE_MIN)
- brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_L, src1, src0);
- else
- brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_G, src1, src0);
-
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- brw_set_predicate_control(p, BRW_PREDICATE_NORMAL);
- brw_MOV(p, dst, src1);
- brw_set_saturate(p, 0);
- brw_set_predicate_control_flag_value(p, 0xff);
- if (use_temp)
- brw_MOV(p, real_dst, dst);
- }
- }
- brw_pop_insn_state(p);
- release_tmps(c, mark);
-}
-
-static void emit_pow(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- struct brw_reg dst, src0, src1;
- GLuint mask = inst->DstReg.WriteMask;
- int dst_chan = _mesa_ffs(mask & WRITEMASK_XYZW) - 1;
-
- if (!(mask & WRITEMASK_XYZW))
- return;
-
- assert(is_power_of_two(mask & WRITEMASK_XYZW));
-
- dst = get_dst_reg(c, inst, dst_chan);
- src0 = get_src_reg_imm(c, inst, 0, 0);
- src1 = get_src_reg_imm(c, inst, 1, 0);
-
- brw_MOV(p, brw_message_reg(2), src0);
- brw_MOV(p, brw_message_reg(3), src1);
-
- brw_math(p,
- dst,
- BRW_MATH_FUNCTION_POW,
- (inst->SaturateMode != SATURATE_OFF) ? BRW_MATH_SATURATE_SATURATE : BRW_MATH_SATURATE_NONE,
- 2,
- brw_null_reg(),
- BRW_MATH_DATA_VECTOR,
- BRW_MATH_PRECISION_FULL);
-}
-
-static void emit_lrp(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- struct brw_reg dst, tmp1, tmp2, src0, src1, src2;
- int i;
- int mark = mark_tmps(c);
- for (i = 0; i < 4; i++) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- src0 = get_src_reg(c, inst, 0, i);
-
- src1 = get_src_reg_imm(c, inst, 1, i);
-
- if (src1.nr == dst.nr) {
- tmp1 = alloc_tmp(c);
- brw_MOV(p, tmp1, src1);
- } else
- tmp1 = src1;
-
- src2 = get_src_reg(c, inst, 2, i);
- if (src2.nr == dst.nr) {
- tmp2 = alloc_tmp(c);
- brw_MOV(p, tmp2, src2);
- } else
- tmp2 = src2;
-
- brw_ADD(p, dst, negate(src0), brw_imm_f(1.0));
- brw_MUL(p, brw_null_reg(), dst, tmp2);
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- brw_MAC(p, dst, src0, tmp1);
- brw_set_saturate(p, 0);
- }
- release_tmps(c, mark);
- }
-}
-
/**
* For GLSL shaders, this KIL will be unconditional.
* It may be contained inside an IF/ENDIF structure of course.
@@ -1390,89 +748,6 @@ static void emit_kil(struct brw_wm_compile *c)
brw_pop_insn_state(p);
}
-static void emit_mad(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- struct brw_reg dst, src0, src1, src2;
- int i;
-
- for (i = 0; i < 4; i++) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- src0 = get_src_reg(c, inst, 0, i);
- src1 = get_src_reg_imm(c, inst, 1, i);
- src2 = get_src_reg_imm(c, inst, 2, i);
- brw_MUL(p, dst, src0, src1);
-
- brw_set_saturate(p, (inst->SaturateMode != SATURATE_OFF) ? 1 : 0);
- brw_ADD(p, dst, dst, src2);
- brw_set_saturate(p, 0);
- }
- }
-}
-
-static void emit_sop(struct brw_wm_compile *c,
- const struct prog_instruction *inst, GLuint cond)
-{
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- struct brw_reg dst, src0, src1;
- int i;
-
- for (i = 0; i < 4; i++) {
- if (mask & (1<<i)) {
- dst = get_dst_reg(c, inst, i);
- src0 = get_src_reg(c, inst, 0, i);
- src1 = get_src_reg_imm(c, inst, 1, i);
- brw_push_insn_state(p);
- brw_CMP(p, brw_null_reg(), cond, src0, src1);
- brw_set_predicate_control(p, BRW_PREDICATE_NONE);
- brw_MOV(p, dst, brw_imm_f(0.0));
- brw_set_predicate_control(p, BRW_PREDICATE_NORMAL);
- brw_MOV(p, dst, brw_imm_f(1.0));
- brw_pop_insn_state(p);
- }
- }
-}
-
-static void emit_slt(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_sop(c, inst, BRW_CONDITIONAL_L);
-}
-
-static void emit_sle(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_sop(c, inst, BRW_CONDITIONAL_LE);
-}
-
-static void emit_sgt(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_sop(c, inst, BRW_CONDITIONAL_G);
-}
-
-static void emit_sge(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_sop(c, inst, BRW_CONDITIONAL_GE);
-}
-
-static void emit_seq(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_sop(c, inst, BRW_CONDITIONAL_EQ);
-}
-
-static void emit_sne(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- emit_sop(c, inst, BRW_CONDITIONAL_NEQ);
-}
-
static INLINE struct brw_reg high_words( struct brw_reg reg )
{
return stride( suboffset( retype( reg, BRW_REGISTER_TYPE_W ), 1 ),
@@ -2525,196 +1800,6 @@ static void emit_noise4( struct brw_wm_compile *c,
release_tmps( c, mark );
}
-
-static void emit_wpos_xy(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- GLuint mask = inst->DstReg.WriteMask;
- struct brw_reg src0[2], dst[2];
-
- dst[0] = get_dst_reg(c, inst, 0);
- dst[1] = get_dst_reg(c, inst, 1);
-
- src0[0] = get_src_reg(c, inst, 0, 0);
- src0[1] = get_src_reg(c, inst, 0, 1);
-
- /* Calculate the pixel offset from window bottom left into destination
- * X and Y channels.
- */
- if (mask & WRITEMASK_X) {
- /* X' = X - origin_x */
- brw_ADD(p,
- dst[0],
- retype(src0[0], BRW_REGISTER_TYPE_W),
- brw_imm_d(0 - c->key.origin_x));
- }
-
- if (mask & WRITEMASK_Y) {
- /* Y' = height - (Y - origin_y) = height + origin_y - Y */
- brw_ADD(p,
- dst[1],
- negate(retype(src0[1], BRW_REGISTER_TYPE_W)),
- brw_imm_d(c->key.origin_y + c->key.drawable_height - 1));
- }
-}
-
-/* TODO
- BIAS on SIMD8 not working yet...
- */
-static void emit_txb(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- struct brw_reg dst[4], src[4], payload_reg;
- /* Note: TexSrcUnit was already looked up through SamplerTextures[] */
- const GLuint unit = inst->TexSrcUnit;
- GLuint i;
- GLuint msg_type;
-
- assert(unit < BRW_MAX_TEX_UNIT);
-
- payload_reg = get_reg(c, PROGRAM_PAYLOAD, PAYLOAD_DEPTH, 0, 1, 0, 0);
-
- for (i = 0; i < 4; i++)
- dst[i] = get_dst_reg(c, inst, i);
- for (i = 0; i < 4; i++)
- src[i] = get_src_reg(c, inst, 0, i);
-
- switch (inst->TexSrcTarget) {
- case TEXTURE_1D_INDEX:
- brw_MOV(p, brw_message_reg(2), src[0]); /* s coord */
- brw_MOV(p, brw_message_reg(3), brw_imm_f(0)); /* t coord */
- brw_MOV(p, brw_message_reg(4), brw_imm_f(0)); /* r coord */
- break;
- case TEXTURE_2D_INDEX:
- case TEXTURE_RECT_INDEX:
- brw_MOV(p, brw_message_reg(2), src[0]);
- brw_MOV(p, brw_message_reg(3), src[1]);
- brw_MOV(p, brw_message_reg(4), brw_imm_f(0));
- break;
- case TEXTURE_3D_INDEX:
- case TEXTURE_CUBE_INDEX:
- brw_MOV(p, brw_message_reg(2), src[0]);
- brw_MOV(p, brw_message_reg(3), src[1]);
- brw_MOV(p, brw_message_reg(4), src[2]);
- break;
- default:
- /* invalid target */
- abort();
- }
- brw_MOV(p, brw_message_reg(5), src[3]); /* bias */
- brw_MOV(p, brw_message_reg(6), brw_imm_f(0)); /* ref (unused?) */
-
- if (BRW_IS_IGDNG(p->brw)) {
- msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_BIAS_IGDNG;
- } else {
- /* Does it work well on SIMD8? */
- msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
- }
-
- brw_SAMPLE(p,
- retype(vec8(dst[0]), BRW_REGISTER_TYPE_UW), /* dest */
- 1, /* msg_reg_nr */
- retype(payload_reg, BRW_REGISTER_TYPE_UW), /* src0 */
- SURF_INDEX_TEXTURE(unit),
- unit, /* sampler */
- inst->DstReg.WriteMask, /* writemask */
- msg_type, /* msg_type */
- 4, /* response_length */
- 4, /* msg_length */
- 0, /* eot */
- 1,
- BRW_SAMPLER_SIMD_MODE_SIMD8);
-}
-
-
-static void emit_tex(struct brw_wm_compile *c,
- const struct prog_instruction *inst)
-{
- struct brw_compile *p = &c->func;
- struct brw_reg dst[4], src[4], payload_reg;
- /* Note: TexSrcUnit was already looked up through SamplerTextures[] */
- const GLuint unit = inst->TexSrcUnit;
- GLuint msg_len;
- GLuint i, nr;
- GLuint emit;
- GLboolean shadow = (c->key.shadowtex_mask & (1<<unit)) ? 1 : 0;
- GLuint msg_type;
-
- assert(unit < BRW_MAX_TEX_UNIT);
-
- payload_reg = get_reg(c, PROGRAM_PAYLOAD, PAYLOAD_DEPTH, 0, 1, 0, 0);
-
- for (i = 0; i < 4; i++)
- dst[i] = get_dst_reg(c, inst, i);
- for (i = 0; i < 4; i++)
- src[i] = get_src_reg(c, inst, 0, i);
-
- switch (inst->TexSrcTarget) {
- case TEXTURE_1D_INDEX:
- emit = WRITEMASK_X;
- nr = 1;
- break;
- case TEXTURE_2D_INDEX:
- case TEXTURE_RECT_INDEX:
- emit = WRITEMASK_XY;
- nr = 2;
- break;
- case TEXTURE_3D_INDEX:
- case TEXTURE_CUBE_INDEX:
- emit = WRITEMASK_XYZ;
- nr = 3;
- break;
- default:
- /* invalid target */
- abort();
- }
- msg_len = 1;
-
- /* move/load S, T, R coords */
- for (i = 0; i < nr; i++) {
- static const GLuint swz[4] = {0,1,2,2};
- if (emit & (1<<i))
- brw_MOV(p, brw_message_reg(msg_len+1), src[swz[i]]);
- else
- brw_MOV(p, brw_message_reg(msg_len+1), brw_imm_f(0));
- msg_len += 1;
- }
-
- if (shadow) {
- brw_MOV(p, brw_message_reg(5), brw_imm_f(0)); /* lod / bias */
- brw_MOV(p, brw_message_reg(6), src[2]); /* ref value / R coord */
- }
-
- if (BRW_IS_IGDNG(p->brw)) {
- if (shadow)
- msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_COMPARE_IGDNG;
- else
- msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_IGDNG;
- } else {
- /* Does it work for shadow on SIMD8 ? */
- msg_type = BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE;
- }
-
- brw_SAMPLE(p,
- retype(vec8(dst[0]), BRW_REGISTER_TYPE_UW), /* dest */
- 1, /* msg_reg_nr */
- retype(payload_reg, BRW_REGISTER_TYPE_UW), /* src0 */
- SURF_INDEX_TEXTURE(unit),
- unit, /* sampler */
- inst->DstReg.WriteMask, /* writemask */
- msg_type, /* msg_type */
- 4, /* response_length */
- shadow ? 6 : 4, /* msg_length */
- 0, /* eot */
- 1,
- BRW_SAMPLER_SIMD_MODE_SIMD8);
-
- if (shadow)
- brw_MOV(p, dst[3], brw_imm_f(1.0));
-}
-
/**
* Resolve subroutine calls after code emit is done.
@@ -2771,6 +1856,21 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
if (c->fp->use_const_buffer)
fetch_constants(c, inst);
+ if (inst->Opcode != OPCODE_ARL) {
+ for (j = 0; j < 4; j++) {
+ if (inst->DstReg.WriteMask & (1 << j))
+ dst[j] = get_dst_reg(c, inst, j);
+ else
+ dst[j] = brw_null_reg();
+ }
+ }
+ for (j = 0; j < brw_wm_nr_args(inst->Opcode); j++)
+ get_argument_regs(c, inst, j, args[j], WRITEMASK_XYZW);
+
+ dst_flags = inst->DstReg.WriteMask;
+ if (inst->SaturateMode == SATURATE_ZERO_ONE)
+ dst_flags |= SATURATE;
+
if (inst->CondUpdate)
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
else
@@ -2782,126 +1882,131 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
switch (inst->Opcode) {
case WM_PIXELXY:
- emit_pixel_xy(c, inst);
+ emit_pixel_xy(c, dst, dst_flags);
break;
case WM_DELTAXY:
- emit_delta_xy(c, inst);
+ emit_delta_xy(p, dst, dst_flags, args[0]);
break;
case WM_PIXELW:
- emit_pixel_w(c, inst);
+ emit_pixel_w(c, dst, dst_flags, args[0], args[1]);
break;
case WM_LINTERP:
- emit_linterp(c, inst);
+ emit_linterp(p, dst, dst_flags, args[0], args[1]);
break;
case WM_PINTERP:
- emit_pinterp(c, inst);
+ emit_pinterp(p, dst, dst_flags, args[0], args[1], args[2]);
break;
case WM_CINTERP:
- emit_cinterp(c, inst);
+ emit_cinterp(p, dst, dst_flags, args[0]);
break;
case WM_WPOSXY:
- emit_wpos_xy(c, inst);
+ emit_wpos_xy(c, dst, dst_flags, args[0]);
break;
case WM_FB_WRITE:
- emit_fb_write(c, inst);
+ emit_fb_write(c, args[0], args[1], args[2],
+ INST_AUX_GET_TARGET(inst->Aux),
+ inst->Aux & INST_AUX_EOT);
break;
case WM_FRONTFACING:
- emit_frontfacing(c, inst);
+ emit_frontfacing(p, dst, dst_flags);
break;
case OPCODE_ADD:
- emit_add(c, inst);
+ emit_alu2(p, brw_ADD, dst, dst_flags, args[0], args[1]);
break;
case OPCODE_ARL:
emit_arl(c, inst);
break;
case OPCODE_FRC:
- emit_frc(c, inst);
+ emit_alu1(p, brw_FRC, dst, dst_flags, args[0]);
break;
case OPCODE_FLR:
- emit_flr(c, inst);
+ emit_alu1(p, brw_RNDD, dst, dst_flags, args[0]);
break;
case OPCODE_LRP:
- emit_lrp(c, inst);
+ unalias3(c, emit_lrp,
+ dst, dst_flags, args[0], args[1], args[2]);
break;
case OPCODE_TRUNC:
- emit_trunc(c, inst);
+ emit_alu1(p, brw_RNDZ, dst, dst_flags, args[0]);
break;
case OPCODE_MOV:
case OPCODE_SWZ:
- emit_mov(c, inst);
+ emit_alu1(p, brw_MOV, dst, dst_flags, args[0]);
break;
case OPCODE_DP3:
- emit_dp3(c, inst);
+ emit_dp3(p, dst, dst_flags, args[0], args[1]);
break;
case OPCODE_DP4:
- emit_dp4(c, inst);
+ emit_dp4(p, dst, dst_flags, args[0], args[1]);
break;
case OPCODE_XPD:
- emit_xpd(c, inst);
+ emit_xpd(p, dst, dst_flags, args[0], args[1]);
break;
case OPCODE_DPH:
- emit_dph(c, inst);
+ emit_dph(p, dst, dst_flags, args[0], args[1]);
break;
case OPCODE_RCP:
- emit_rcp(c, inst);
+ emit_math1(c, BRW_MATH_FUNCTION_INV, dst, dst_flags, args[0]);
break;
case OPCODE_RSQ:
- emit_rsq(c, inst);
+ emit_math1(c, BRW_MATH_FUNCTION_RSQ, dst, dst_flags, args[0]);
break;
case OPCODE_SIN:
- emit_sin(c, inst);
+ emit_math1(c, BRW_MATH_FUNCTION_SIN, dst, dst_flags, args[0]);
break;
case OPCODE_COS:
- emit_cos(c, inst);
+ emit_math1(c, BRW_MATH_FUNCTION_COS, dst, dst_flags, args[0]);
break;
case OPCODE_EX2:
- emit_ex2(c, inst);
+ emit_math1(c, BRW_MATH_FUNCTION_EXP, dst, dst_flags, args[0]);
break;
case OPCODE_LG2:
- emit_lg2(c, inst);
+ emit_math1(c, BRW_MATH_FUNCTION_LOG, dst, dst_flags, args[0]);
break;
case OPCODE_MIN:
+ unalias2(c, emit_min, dst, dst_flags, args[0], args[1]);
+ break;
case OPCODE_MAX:
- emit_min_max(c, inst);
+ unalias2(c, emit_max, dst, dst_flags, args[0], args[1]);
break;
case OPCODE_DDX:
case OPCODE_DDY:
- for (j = 0; j < 4; j++) {
- if (inst->DstReg.WriteMask & (1 << j))
- dst[j] = get_dst_reg(c, inst, j);
- else
- dst[j] = brw_null_reg();
- }
- get_argument_regs(c, inst, 0, args[0], WRITEMASK_XYZW);
emit_ddxy(p, dst, dst_flags, (inst->Opcode == OPCODE_DDX),
args[0]);
break;
case OPCODE_SLT:
- emit_slt(c, inst);
+ emit_sop(p, dst, dst_flags,
+ BRW_CONDITIONAL_L, args[0], args[1]);
break;
case OPCODE_SLE:
- emit_sle(c, inst);
+ emit_sop(p, dst, dst_flags,
+ BRW_CONDITIONAL_LE, args[0], args[1]);
break;
case OPCODE_SGT:
- emit_sgt(c, inst);
+ emit_sop(p, dst, dst_flags,
+ BRW_CONDITIONAL_G, args[0], args[1]);
break;
case OPCODE_SGE:
- emit_sge(c, inst);
+ emit_sop(p, dst, dst_flags,
+ BRW_CONDITIONAL_GE, args[0], args[1]);
break;
case OPCODE_SEQ:
- emit_seq(c, inst);
+ emit_sop(p, dst, dst_flags,
+ BRW_CONDITIONAL_EQ, args[0], args[1]);
break;
case OPCODE_SNE:
- emit_sne(c, inst);
+ emit_sop(p, dst, dst_flags,
+ BRW_CONDITIONAL_NEQ, args[0], args[1]);
break;
case OPCODE_MUL:
- emit_mul(c, inst);
+ emit_alu2(p, brw_MUL, dst, dst_flags, args[0], args[1]);
break;
case OPCODE_POW:
- emit_pow(c, inst);
+ emit_math2(c, BRW_MATH_FUNCTION_POW,
+ dst, dst_flags, args[0], args[1]);
break;
case OPCODE_MAD:
- emit_mad(c, inst);
+ emit_mad(p, dst, dst_flags, args[0], args[1], args[2]);
break;
case OPCODE_NOISE1:
emit_noise1(c, inst);
@@ -2916,10 +2021,19 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
emit_noise4(c, inst);
break;
case OPCODE_TEX:
- emit_tex(c, inst);
+ emit_tex(c, dst, dst_flags, args[0],
+ get_reg(c, PROGRAM_PAYLOAD, PAYLOAD_DEPTH,
+ 0, 1, 0, 0),
+ inst->TexSrcTarget,
+ inst->TexSrcUnit,
+ (c->key.shadowtex_mask & (1 << inst->TexSrcUnit)) != 0);
break;
case OPCODE_TXB:
- emit_txb(c, inst);
+ emit_txb(c, dst, dst_flags, args[0],
+ get_reg(c, PROGRAM_PAYLOAD, PAYLOAD_DEPTH,
+ 0, 1, 0, 0),
+ inst->TexSrcTarget,
+ c->fp->program.Base.SamplerUnits[inst->TexSrcUnit]);
break;
case OPCODE_KIL_NV:
emit_kil(c);
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass0.c b/src/mesa/drivers/dri/i965/brw_wm_pass0.c
index 602b1351ef0..ff4c082d5e8 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass0.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass0.c
@@ -42,12 +42,14 @@
static struct brw_wm_ref *get_ref( struct brw_wm_compile *c )
{
assert(c->nr_refs < BRW_WM_MAX_REF);
+ memset(&c->refs[c->nr_refs], 0, sizeof(*c->refs));
return &c->refs[c->nr_refs++];
}
static struct brw_wm_value *get_value( struct brw_wm_compile *c)
{
assert(c->nr_refs < BRW_WM_MAX_VREG);
+ memset(&c->vreg[c->nr_vreg], 0, sizeof(*c->vreg));
return &c->vreg[c->nr_vreg++];
}
@@ -55,6 +57,7 @@ static struct brw_wm_value *get_value( struct brw_wm_compile *c)
static struct brw_wm_instruction *get_instruction( struct brw_wm_compile *c )
{
assert(c->nr_insns < BRW_WM_MAX_INSN);
+ memset(&c->instruction[c->nr_insns], 0, sizeof(*c->instruction));
return &c->instruction[c->nr_insns++];
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass2.c b/src/mesa/drivers/dri/i965/brw_wm_pass2.c
index 6faea018fbc..31303febf09 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass2.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass2.c
@@ -82,8 +82,8 @@ static void init_registers( struct brw_wm_compile *c )
for (j = 0; j < c->nr_creg; j++)
prealloc_reg(c, &c->creg[j], i++);
- for (j = 0; j < FRAG_ATTRIB_MAX; j++) {
- if (c->key.vp_outputs_written & (1<<j)) {
+ for (j = 0; j < VERT_RESULT_MAX; j++) {
+ if (c->key.vp_outputs_written & BITFIELD64_BIT(j)) {
int fp_index;
if (j >= VERT_RESULT_VAR0)
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index 0acb0274313..aa2e5195881 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -73,8 +73,8 @@ static dri_bo *upload_default_color( struct brw_context *brw,
COPY_4V(sdc.color, color);
- return brw_cache_data( &brw->cache, BRW_SAMPLER_DEFAULT_COLOR, &sdc,
- NULL, 0 );
+ return brw_cache_data(&brw->cache, BRW_SAMPLER_DEFAULT_COLOR,
+ &sdc, sizeof(sdc), NULL, 0);
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index 361f91292be..f89ed9bce70 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -106,7 +106,7 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
/* as far as we can tell */
key->computes_depth =
- (fp->Base.OutputsWritten & (1 << FRAG_RESULT_DEPTH)) != 0;
+ (fp->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) != 0;
/* BRW_NEW_DEPTH_BUFFER
* Override for NULL depthbuffer case, required by the Pixel Shader Computed
* Depth field.
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 0bf735c0f2c..47035cc6fc1 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -86,6 +86,9 @@ static GLuint translate_tex_format( gl_format mesa_format,
case MESA_FORMAT_AL88:
return BRW_SURFACEFORMAT_L8A8_UNORM;
+ case MESA_FORMAT_AL1616:
+ return BRW_SURFACEFORMAT_L16A16_UNORM;
+
case MESA_FORMAT_RGB888:
assert(0); /* not supported for sampling */
return BRW_SURFACEFORMAT_R8G8B8_UNORM;
@@ -358,7 +361,10 @@ brw_create_constant_surface( struct brw_context *brw,
NULL, NULL);
if (key->bo) {
- /* Emit relocation to surface contents */
+ /* Emit relocation to surface contents. Section 5.1.1 of the gen4
+ * bspec ("Data Cache") says that the data cache does not exist as
+ * a separate cache and is just the sampler cache.
+ */
dri_bo_emit_reloc(bo,
I915_GEM_DOMAIN_SAMPLER, 0,
0,
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
index e94b8368cde..2eae9b66d87 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
@@ -80,7 +80,7 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch)
batch->buf = NULL;
}
- if (!batch->buffer && intel->ttm == GL_TRUE)
+ if (!batch->buffer)
batch->buffer = malloc (intel->maxBatchSize);
batch->buf = dri_bo_alloc(intel->bufmgr, "batchbuffer",
@@ -210,10 +210,10 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
fprintf(stderr, "%s:%d: Batchbuffer flush with %db used\n", file, line,
used);
+ batch->reserved_space = 0;
/* Emit a flush if the bufmgr doesn't do it for us. */
- if (intel->always_flush_cache || !intel->ttm) {
- *(GLuint *) (batch->ptr) = intel->vtbl.flush_cmd();
- batch->ptr += 4;
+ if (intel->always_flush_cache) {
+ intel_batchbuffer_emit_mi_flush(batch);
used = batch->ptr - batch->map;
}
@@ -244,6 +244,11 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
if (intel->vtbl.finish_batch)
intel->vtbl.finish_batch(intel);
+ /* Check that we didn't just wrap our batchbuffer at a bad time. */
+ assert(!intel->no_batch_wrap);
+
+ batch->reserved_space = BATCH_RESERVED;
+
/* TODO: Just pass the relocation list and dma buffer up to the
* kernel.
*/
@@ -299,3 +304,31 @@ intel_batchbuffer_data(struct intel_batchbuffer *batch,
__memcpy(batch->ptr, data, bytes);
batch->ptr += bytes;
}
+
+/* Emit a pipelined flush to either flush render and texture cache for
+ * reading from a FBO-drawn texture, or flush so that frontbuffer
+ * render appears on the screen in DRI1.
+ *
+ * This is also used for the always_flush_cache driconf debug option.
+ */
+void
+intel_batchbuffer_emit_mi_flush(struct intel_batchbuffer *batch)
+{
+ struct intel_context *intel = batch->intel;
+
+ if (intel->gen >= 4) {
+ BEGIN_BATCH(4, IGNORE_CLIPRECTS);
+ OUT_BATCH(_3DSTATE_PIPE_CONTROL |
+ PIPE_CONTROL_INSTRUCTION_FLUSH |
+ PIPE_CONTROL_WRITE_FLUSH |
+ PIPE_CONTROL_NO_WRITE);
+ OUT_BATCH(0); /* write address */
+ OUT_BATCH(0); /* write data */
+ OUT_BATCH(0); /* write data */
+ ADVANCE_BATCH();
+ } else {
+ BEGIN_BATCH(1, IGNORE_CLIPRECTS);
+ OUT_BATCH(MI_FLUSH);
+ ADVANCE_BATCH();
+ }
+}
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.h b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
index d4899aab7fa..d4a94454dd5 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
@@ -62,6 +62,7 @@ struct intel_batchbuffer
} emit;
GLuint dirty_state;
+ GLuint reserved_space;
};
struct intel_batchbuffer *intel_batchbuffer_alloc(struct intel_context
@@ -95,6 +96,7 @@ GLboolean intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
uint32_t read_domains,
uint32_t write_domain,
uint32_t offset);
+void intel_batchbuffer_emit_mi_flush(struct intel_batchbuffer *batch);
/* Inline functions - might actually be better off with these
* non-inlined. Certainly better off switching all command packets to
@@ -104,7 +106,7 @@ GLboolean intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
static INLINE GLint
intel_batchbuffer_space(struct intel_batchbuffer *batch)
{
- return (batch->size - BATCH_RESERVED) - (batch->ptr - batch->map);
+ return (batch->size - batch->reserved_space) - (batch->ptr - batch->map);
}
@@ -173,12 +175,4 @@ intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
intel->batch->emit.start_ptr = NULL; \
} while(0)
-
-static INLINE void
-intel_batchbuffer_emit_mi_flush(struct intel_batchbuffer *batch)
-{
- intel_batchbuffer_require_space(batch, 4, IGNORE_CLIPRECTS);
- intel_batchbuffer_emit_dword(batch, MI_FLUSH);
-}
-
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 817223da41d..f14854602b6 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -499,10 +499,11 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
switch (irb->texformat) {
case MESA_FORMAT_ARGB8888:
case MESA_FORMAT_XRGB8888:
- clearVal = intel->ClearColor8888;
+ clearVal = PACK_COLOR_8888(clear[3], clear[0],
+ clear[1], clear[2]);
break;
case MESA_FORMAT_RGB565:
- clearVal = intel->ClearColor565;
+ clearVal = PACK_COLOR_565(clear[0], clear[1], clear[2]);
break;
case MESA_FORMAT_ARGB4444:
clearVal = PACK_COLOR_4444(clear[3], clear[0],
diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index ea9d5a6276e..3b7015b5ad3 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -209,10 +209,23 @@ intel_bufferobj_subdata(GLcontext * ctx,
memcpy((char *)intel_obj->sys_buffer + offset, data, size);
else {
/* Flush any existing batchbuffer that might reference this data. */
- if (drm_intel_bo_references(intel->batch->buf, intel_obj->buffer))
- intelFlush(ctx);
+ if (drm_intel_bo_busy(intel_obj->buffer) ||
+ drm_intel_bo_references(intel->batch->buf, intel_obj->buffer)) {
+ drm_intel_bo *temp_bo;
- dri_bo_subdata(intel_obj->buffer, offset, size, data);
+ temp_bo = drm_intel_bo_alloc(intel->bufmgr, "subdata temp", size, 64);
+
+ drm_intel_bo_subdata(temp_bo, 0, size, data);
+
+ intel_emit_linear_blit(intel,
+ intel_obj->buffer, offset,
+ temp_bo, 0,
+ size);
+
+ drm_intel_bo_unreference(temp_bo);
+ } else {
+ dri_bo_subdata(intel_obj->buffer, offset, size, data);
+ }
}
}
@@ -255,6 +268,8 @@ intel_bufferobj_map(GLcontext * ctx,
if (intel_obj->sys_buffer) {
obj->Pointer = intel_obj->sys_buffer;
+ obj->Length = obj->Size;
+ obj->Offset = 0;
return obj->Pointer;
}
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 639ffa64376..6b12d484d85 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -133,6 +133,25 @@ intel_get_cliprects(struct intel_context *intel,
/**
+ * Check if we're about to draw into the front color buffer.
+ * If so, set the intel->front_buffer_dirty field to true.
+ */
+void
+intel_check_front_buffer_rendering(struct intel_context *intel)
+{
+ const struct gl_framebuffer *fb = intel->ctx.DrawBuffer;
+ if (fb->Name == 0) {
+ /* drawing to window system buffer */
+ if (fb->_NumColorDrawBuffers > 0) {
+ if (fb->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {
+ intel->front_buffer_dirty = GL_TRUE;
+ }
+ }
+ }
+}
+
+
+/**
* Update the hardware state for drawing into a window or framebuffer object.
*
* Called by glDrawBuffer, glBindFramebufferEXT, MakeCurrent, and other
@@ -202,8 +221,6 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
intel_batchbuffer_flush(intel->batch);
intel->front_cliprects = GL_TRUE;
colorRegions[0] = intel_get_rb_region(fb, BUFFER_FRONT_LEFT);
-
- intel->front_buffer_dirty = GL_TRUE;
}
else {
if (!intel->constant_cliprect && intel->front_cliprects)
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.h b/src/mesa/drivers/dri/intel/intel_buffers.h
index 6069d38e9eb..d7800f2ca2f 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.h
+++ b/src/mesa/drivers/dri/intel/intel_buffers.h
@@ -45,6 +45,8 @@ extern struct intel_region *intel_readbuf_region(struct intel_context *intel);
extern struct intel_region *intel_drawbuf_region(struct intel_context *intel);
+extern void intel_check_front_buffer_rendering(struct intel_context *intel);
+
extern void intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb);
extern void intelInitBufferFuncs(struct dd_function_table *functions);
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index fb62f0f430a..f682ee3de5b 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -75,6 +75,10 @@ intelClear(GLcontext *ctx, GLbitfield mask)
struct gl_framebuffer *fb = ctx->DrawBuffer;
GLuint i;
+ if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT)) {
+ intel->front_buffer_dirty = GL_TRUE;
+ }
+
if (0)
fprintf(stderr, "%s\n", __FUNCTION__);
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index a7d94ced9a9..1434ae530be 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -176,9 +176,7 @@ intelGetString(GLcontext * ctx, GLenum name)
break;
}
- (void) driGetRendererString(buffer, chipset,
- (intel->ttm) ? DRIVER_DATE_GEM : DRIVER_DATE,
- 0);
+ (void) driGetRendererString(buffer, chipset, DRIVER_DATE_GEM, 0);
return (GLubyte *) buffer;
default:
@@ -477,7 +475,7 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
if (intel->Fallback)
_swrast_flush(ctx);
- if (!IS_965(intel->intelScreen->deviceID))
+ if (intel->gen < 4)
INTEL_FIREVERTICES(intel);
/* Emit a flush so that any frontbuffer rendering that might have occurred
@@ -601,6 +599,7 @@ intelInitContext(struct intel_context *intel,
__DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private;
int fthrottle_mode;
+ int bo_reuse_mode;
if (!_mesa_initialize_context(&intel->ctx, mesaVis, shareCtx,
functions, (void *) intel)) {
@@ -614,6 +613,13 @@ intelInitContext(struct intel_context *intel,
intel->sarea = intelScreen->sarea;
intel->driContext = driContextPriv;
+ if (IS_965(intel->intelScreen->deviceID))
+ intel->gen = 4;
+ else if (IS_9XX(intel->intelScreen->deviceID))
+ intel->gen = 3;
+ else
+ intel->gen = 2;
+
/* Dri stuff */
intel->hHWContext = driContextPriv->hHWContext;
intel->driFd = sPriv->fd;
@@ -621,25 +627,21 @@ intelInitContext(struct intel_context *intel,
driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache,
intel->driScreen->myNum,
- IS_965(intelScreen->deviceID) ? "i965" : "i915");
+ (intel->gen >= 4) ? "i965" : "i915");
if (intelScreen->deviceID == PCI_CHIP_I865_G)
intel->maxBatchSize = 4096;
else
intel->maxBatchSize = BATCH_SZ;
intel->bufmgr = intelScreen->bufmgr;
- intel->ttm = intelScreen->ttm;
- if (intel->ttm) {
- int bo_reuse_mode;
- bo_reuse_mode = driQueryOptioni(&intel->optionCache, "bo_reuse");
- switch (bo_reuse_mode) {
- case DRI_CONF_BO_REUSE_DISABLED:
- break;
- case DRI_CONF_BO_REUSE_ALL:
- intel_bufmgr_gem_enable_reuse(intel->bufmgr);
- break;
- }
+ bo_reuse_mode = driQueryOptioni(&intel->optionCache, "bo_reuse");
+ switch (bo_reuse_mode) {
+ case DRI_CONF_BO_REUSE_DISABLED:
+ break;
+ case DRI_CONF_BO_REUSE_ALL:
+ intel_bufmgr_gem_enable_reuse(intel->bufmgr);
+ break;
}
/* This doesn't yet catch all non-conformant rendering, but it's a
@@ -683,7 +685,7 @@ intelInitContext(struct intel_context *intel,
meta_init_metaops(ctx, &intel->meta);
ctx->Const.MaxColorAttachments = 4; /* XXX FBO: review this */
- if (IS_965(intelScreen->deviceID)) {
+ if (intel->gen >= 4) {
if (MAX_WIDTH > 8192)
ctx->Const.MaxRenderbufferSize = 8192;
} else {
@@ -720,25 +722,19 @@ intelInitContext(struct intel_context *intel,
break;
}
- if (IS_965(intelScreen->deviceID))
+ if (intel->gen >= 4)
intel->polygon_offset_scale /= 0xffff;
intel->RenderIndex = ~0;
fthrottle_mode = driQueryOptioni(&intel->optionCache, "fthrottle_mode");
- intel->irqsEmitted = 0;
-
- intel->do_irqs = (intel->intelScreen->irq_active &&
- fthrottle_mode == DRI_CONF_FTHROTTLE_IRQS);
-
- intel->do_usleeps = (fthrottle_mode == DRI_CONF_FTHROTTLE_USLEEPS);
- if (IS_965(intelScreen->deviceID) && !intel->intelScreen->irq_active) {
+ if (intel->gen >= 4 && !intel->intelScreen->irq_active) {
_mesa_printf("IRQs not active. Exiting\n");
exit(1);
}
- intelInitExtensions(ctx, GL_FALSE);
+ intelInitExtensions(ctx);
INTEL_DEBUG = driParseDebugString(getenv("INTEL_DEBUG"), debug_control);
if (INTEL_DEBUG & DEBUG_BUFMGR)
@@ -1051,21 +1047,6 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
sarea->ctxOwner = me;
}
- /* If the last consumer of the texture memory wasn't us, notify the fake
- * bufmgr and record the new owner. We should have the memory shared
- * between contexts of a single fake bufmgr, but this will at least make
- * things correct for now.
- */
- if (!intel->ttm && sarea->texAge != intel->hHWContext) {
- sarea->texAge = intel->hHWContext;
- intel_bufmgr_fake_contended_lock_take(intel->bufmgr);
- if (INTEL_DEBUG & DEBUG_BATCH)
- intel_decode_context_reset();
- if (INTEL_DEBUG & DEBUG_BUFMGR)
- fprintf(stderr, "Lost Textures: sarea->texAge %x hw context %x\n",
- sarea->ctxOwner, intel->hHWContext);
- }
-
/* Drawable changed?
*/
if (dPriv && intel->lastStamp != dPriv->lastStamp) {
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 356fa4d1e58..481202c971b 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -117,8 +117,6 @@ struct intel_context
struct intel_region * depth_region,
GLuint num_regions);
- GLuint (*flush_cmd) (void);
-
void (*reduced_primitive_state) (struct intel_context * intel,
GLenum rprim);
@@ -137,14 +135,6 @@ struct intel_context
struct intel_region * draw_region,
struct intel_region * depth_region);
- void (*meta_draw_quad)(struct intel_context *intel,
- GLfloat x0, GLfloat x1,
- GLfloat y0, GLfloat y1,
- GLfloat z,
- GLuint color, /* ARGB32 */
- GLfloat s0, GLfloat s1,
- GLfloat t0, GLfloat t1);
-
void (*meta_color_mask) (struct intel_context * intel, GLboolean);
void (*meta_stencil_replace) (struct intel_context * intel,
@@ -176,27 +166,24 @@ struct intel_context
struct dri_metaops meta;
- GLint refcount;
GLbitfield Fallback; /**< mask of INTEL_FALLBACK_x bits */
GLuint NewGLState;
dri_bufmgr *bufmgr;
unsigned int maxBatchSize;
+ /**
+ * Generation number of the hardware: 2 is 8xx, 3 is 9xx pre-965, 4 is 965.
+ */
+ int gen;
+
struct intel_region *front_region;
struct intel_region *back_region;
struct intel_region *depth_region;
- /**
- * This value indicates that the kernel memory manager is being used
- * instead of the fake client-side memory manager.
- */
- GLboolean ttm;
-
struct intel_batchbuffer *batch;
drm_intel_bo *first_post_swapbuffers_batch;
GLboolean no_batch_wrap;
- unsigned batch_id;
struct
{
@@ -216,10 +203,6 @@ struct intel_context
char *prevLockFile;
int prevLockLine;
- GLuint ClearColor565;
- GLuint ClearColor8888;
-
-
/* Offsets of fields within the current vertex:
*/
GLuint coloroffset;
@@ -236,6 +219,7 @@ struct intel_context
GLboolean hw_stipple;
GLboolean depth_buffer_is_float;
GLboolean no_rast;
+ GLboolean no_hw;
GLboolean always_flush_batch;
GLboolean always_flush_cache;
@@ -301,13 +285,6 @@ struct intel_context
GLboolean use_early_z;
drm_clip_rect_t fboRect; /**< cliprect for FBO rendering */
- int perf_boxes;
-
- GLuint do_usleeps;
- int do_irqs;
- GLuint irqsEmitted;
-
- GLboolean scissor;
drm_clip_rect_t draw_rect;
drm_clip_rect_t scissor_rect;
@@ -324,8 +301,6 @@ struct intel_context
GLuint lastStamp;
- GLboolean no_hw;
-
/**
* Configuration cache
*/
@@ -373,29 +348,6 @@ do { \
} while (0)
/* ================================================================
- * Color packing:
- */
-
-#define INTEL_PACKCOLOR4444(r,g,b,a) \
- ((((a) & 0xf0) << 8) | (((r) & 0xf0) << 4) | ((g) & 0xf0) | ((b) >> 4))
-
-#define INTEL_PACKCOLOR1555(r,g,b,a) \
- ((((r) & 0xf8) << 7) | (((g) & 0xf8) << 2) | (((b) & 0xf8) >> 3) | \
- ((a) ? 0x8000 : 0))
-
-#define INTEL_PACKCOLOR565(r,g,b) \
- ((((r) & 0xf8) << 8) | (((g) & 0xfc) << 3) | (((b) & 0xf8) >> 3))
-
-#define INTEL_PACKCOLOR8888(r,g,b,a) \
- ((a<<24) | (r<<16) | (g<<8) | b)
-
-#define INTEL_PACKCOLOR(format, r, g, b, a) \
-(format == DV_PF_555 ? INTEL_PACKCOLOR1555(r,g,b,a) : \
- (format == DV_PF_565 ? INTEL_PACKCOLOR565(r,g,b) : \
- (format == DV_PF_8888 ? INTEL_PACKCOLOR8888(r,g,b,a) : \
- 0)))
-
-/* ================================================================
* From linux kernel i386 header files, copes with odd sizes better
* than COPY_DWORDS would:
* XXX Put this in src/mesa/main/imports.h ???
@@ -587,4 +539,25 @@ is_power_of_two(uint32_t value)
return (value & (value - 1)) == 0;
}
+static inline void
+intel_bo_map_gtt_preferred(struct intel_context *intel,
+ drm_intel_bo *bo,
+ GLboolean write)
+{
+ if (intel->intelScreen->kernel_exec_fencing)
+ drm_intel_gem_bo_map_gtt(bo);
+ else
+ drm_intel_bo_map(bo, write);
+}
+
+static inline void
+intel_bo_unmap_gtt_preferred(struct intel_context *intel,
+ drm_intel_bo *bo)
+{
+ if (intel->intelScreen->kernel_exec_fencing)
+ drm_intel_gem_bo_unmap_gtt(bo);
+ else
+ drm_intel_bo_unmap(bo);
+}
+
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index b6754c9fcb6..86dc42cc510 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -79,6 +79,7 @@ static const struct dri_extension card_extensions[] = {
{ "GL_ARB_half_float_pixel", NULL },
{ "GL_ARB_map_buffer_range", GL_ARB_map_buffer_range_functions },
{ "GL_ARB_multitexture", NULL },
+ { "GL_ARB_pixel_buffer_object", NULL },
{ "GL_ARB_point_parameters", GL_ARB_point_parameters_functions },
{ "GL_ARB_point_sprite", NULL },
{ "GL_ARB_shader_objects", GL_ARB_shader_objects_functions },
@@ -104,6 +105,8 @@ static const struct dri_extension card_extensions[] = {
{ "GL_EXT_blend_logic_op", NULL },
{ "GL_EXT_blend_subtract", NULL },
{ "GL_EXT_cull_vertex", GL_EXT_cull_vertex_functions },
+ { "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions },
+ { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
{ "GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
{ "GL_EXT_gpu_program_parameters", GL_EXT_gpu_program_parameters_functions },
{ "GL_EXT_packed_depth_stencil", NULL },
@@ -121,7 +124,6 @@ static const struct dri_extension card_extensions[] = {
{ "GL_MESA_pack_invert", NULL },
{ "GL_MESA_ycbcr_texture", NULL },
{ "GL_NV_blend_square", NULL },
- { "GL_NV_point_sprite", GL_NV_point_sprite_functions },
{ "GL_NV_vertex_program", GL_NV_vertex_program_functions },
{ "GL_NV_vertex_program1_1", NULL },
{ "GL_SGIS_generate_mipmap", NULL },
@@ -176,14 +178,6 @@ static const struct dri_extension arb_oq_extensions[] = {
{ NULL, NULL }
};
-
-static const struct dri_extension ttm_extensions[] = {
- { "GL_ARB_pixel_buffer_object", NULL },
- { "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions },
- { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
- { NULL, NULL }
-};
-
static const struct dri_extension fragment_shader_extensions[] = {
{ "GL_ARB_fragment_shader", NULL },
{ NULL, NULL }
@@ -194,31 +188,25 @@ static const struct dri_extension fragment_shader_extensions[] = {
* extensions for a context.
*/
void
-intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging)
+intelInitExtensions(GLcontext *ctx)
{
- struct intel_context *intel = ctx?intel_context(ctx):NULL;
+ struct intel_context *intel = intel_context(ctx);
/* Disable imaging extension until convolution is working in teximage paths.
*/
- enable_imaging = GL_FALSE;
-
- driInitExtensions(ctx, card_extensions, enable_imaging);
-
- if (intel == NULL || intel->ttm)
- driInitExtensions(ctx, ttm_extensions, GL_FALSE);
+ driInitExtensions(ctx, card_extensions, GL_FALSE);
- if (intel == NULL || IS_965(intel->intelScreen->deviceID))
+ if (IS_965(intel->intelScreen->deviceID))
driInitExtensions(ctx, brw_extensions, GL_FALSE);
- if (intel == NULL || IS_915(intel->intelScreen->deviceID)
+ if (IS_915(intel->intelScreen->deviceID)
|| IS_945(intel->intelScreen->deviceID)) {
driInitExtensions(ctx, i915_extensions, GL_FALSE);
- if (intel == NULL || driQueryOptionb(&intel->optionCache, "fragment_shader"))
+ if (driQueryOptionb(&intel->optionCache, "fragment_shader"))
driInitExtensions(ctx, fragment_shader_extensions, GL_FALSE);
- if (intel == NULL || driQueryOptionb(&intel->optionCache,
- "stub_occlusion_query"))
+ if (driQueryOptionb(&intel->optionCache, "stub_occlusion_query"))
driInitExtensions(ctx, arb_oq_extensions, GL_FALSE);
}
}
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.h b/src/mesa/drivers/dri/intel/intel_extensions.h
index 97147ecdb0f..1d1c97a4a9b 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.h
+++ b/src/mesa/drivers/dri/intel/intel_extensions.h
@@ -30,7 +30,7 @@
extern void
-intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging);
+intelInitExtensions(GLcontext *ctx);
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index d8ac4d36637..b6e0d823ed2 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -126,7 +126,7 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
case GL_RGB16:
rb->Format = MESA_FORMAT_ARGB8888;
rb->DataType = GL_UNSIGNED_BYTE;
- irb->texformat = MESA_FORMAT_ARGB8888; /* XXX: Need xrgb8888 */
+ irb->texformat = MESA_FORMAT_XRGB8888;
cpp = 4;
break;
case GL_RGBA:
@@ -314,10 +314,6 @@ intel_create_renderbuffer(gl_format format)
irb->Base.DataType = GL_UNSIGNED_BYTE;
break;
case MESA_FORMAT_XRGB8888:
- /* XXX this is a hack since XRGB surfaces don't seem to work
- * properly yet. Reading the alpha channel returns 0 instead of 1.
- */
- format = MESA_FORMAT_ARGB8888;
irb->Base._BaseFormat = GL_RGB;
irb->Base.DataType = GL_UNSIGNED_BYTE;
break;
@@ -577,6 +573,7 @@ intel_render_texture(GLcontext * ctx,
dst_x) * intel_image->mt->cpp;
intel_image->mt->region->draw_x = dst_x;
intel_image->mt->region->draw_y = dst_y;
+ intel_image->used_as_render_target = GL_TRUE;
/* update drawing region, etc */
intel_draw_buffer(ctx, fb);
@@ -590,16 +587,13 @@ static void
intel_finish_render_texture(GLcontext * ctx,
struct gl_renderbuffer_attachment *att)
{
- /* no-op
- * Previously we released the renderbuffer's intel_region but
- * that's not necessary and actually caused problems when trying
- * to do a glRead/CopyPixels from the renderbuffer later.
- * The region will be released later if the texture is replaced
- * or the renderbuffer deleted.
- *
- * The intention of this driver hook is more of a "done rendering
- * to texture, please re-twiddle/etc if necessary".
- */
+ struct gl_texture_object *tex_obj = att->Texture;
+ struct gl_texture_image *image =
+ tex_obj->Image[att->CubeMapFace][att->TextureLevel];
+ struct intel_texture_image *intel_image = intel_texture_image(image);
+
+ /* Flag that this image may now be validated into the object's miptree. */
+ intel_image->used_as_render_target = GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 3996c100a55..6a565f80cf4 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -122,7 +122,7 @@ intel_miptree_create(struct intel_context *intel,
if (intel->use_texture_tiling && compress_byte == 0 &&
intel->intelScreen->kernel_exec_fencing) {
- if (IS_965(intel->intelScreen->deviceID) &&
+ if (intel->gen >= 4 &&
(base_format == GL_DEPTH_COMPONENT ||
base_format == GL_DEPTH_STENCIL_EXT))
tiling = I915_TILING_Y;
@@ -224,16 +224,12 @@ int intel_miptree_pitch_align (struct intel_context *intel,
if (!mt->compressed) {
int pitch_align;
- if (intel->ttm) {
- /* XXX: Align pitch to multiple of 64 bytes for now to allow
- * render-to-texture to work in all cases. This should probably be
- * replaced at some point by some scheme to only do this when really
- * necessary.
- */
- pitch_align = 64;
- } else {
- pitch_align = 4;
- }
+ /* XXX: Align pitch to multiple of 64 bytes for now to allow
+ * render-to-texture to work in all cases. This should probably be
+ * replaced at some point by some scheme to only do this when really
+ * necessary.
+ */
+ pitch_align = 64;
if (tiling == I915_TILING_X)
pitch_align = 512;
@@ -315,17 +311,14 @@ intel_miptree_release(struct intel_context *intel,
*/
GLboolean
intel_miptree_match_image(struct intel_mipmap_tree *mt,
- struct gl_texture_image *image,
- GLuint face, GLuint level)
+ struct gl_texture_image *image)
{
GLboolean isCompressed = _mesa_is_format_compressed(image->TexFormat);
+ struct intel_texture_image *intelImage = intel_texture_image(image);
+ GLuint level = intelImage->level;
- /* Images with borders are never pulled into mipmap trees.
- */
- if (image->Border ||
- ((image->_BaseFormat == GL_DEPTH_COMPONENT) &&
- ((image->TexObject->WrapS == GL_CLAMP_TO_BORDER) ||
- (image->TexObject->WrapT == GL_CLAMP_TO_BORDER))))
+ /* Images with borders are never pulled into mipmap trees. */
+ if (image->Border)
return GL_FALSE;
if (image->InternalFormat != mt->internal_format ||
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
index 3bce54daa15..b19c548def3 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.h
@@ -165,8 +165,7 @@ void intel_miptree_release(struct intel_context *intel,
/* Check if an image fits an existing mipmap tree layout
*/
GLboolean intel_miptree_match_image(struct intel_mipmap_tree *mt,
- struct gl_texture_image *image,
- GLuint face, GLuint level);
+ struct gl_texture_image *image);
/* Return a pointer to an image within a tree. Return image stride as
* well.
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
index 99330b6ddfe..668697cb5eb 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -228,10 +228,9 @@ do_blit_bitmap( GLcontext *ctx,
UNCLAMPED_FLOAT_TO_UBYTE(ubcolor[3], tmpColor[3]);
if (dst->cpp == 2)
- color = INTEL_PACKCOLOR565(ubcolor[0], ubcolor[1], ubcolor[2]);
+ color = PACK_COLOR_565(ubcolor[0], ubcolor[1], ubcolor[2]);
else
- color = INTEL_PACKCOLOR8888(ubcolor[0], ubcolor[1],
- ubcolor[2], ubcolor[3]);
+ color = PACK_COLOR_8888(ubcolor[3], ubcolor[0], ubcolor[1], ubcolor[2]);
if (!intel_check_blit_fragment_ops(ctx, tmpColor[3] == 1.0F))
return GL_FALSE;
@@ -336,6 +335,8 @@ out:
unpack->BufferObj);
}
+ intel_check_front_buffer_rendering(intel);
+
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
index f058b3c8e4d..622aaa22d67 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
@@ -222,6 +222,8 @@ do_blit_copypixels(GLcontext * ctx,
out:
UNLOCK_HARDWARE(intel);
+ intel_check_front_buffer_rendering(intel);
+
DBG("%s: success\n", __FUNCTION__);
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index a86c66a8443..d6b9dc44466 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -542,56 +542,18 @@ intel_recreate_static(struct intel_context *intel,
region->buffer = NULL;
}
- if (intel->ttm) {
- assert(region_desc->bo_handle != -1);
- region->buffer = intel_bo_gem_create_from_name(intel->bufmgr,
- name,
- region_desc->bo_handle);
-
- ret = dri_bo_get_tiling(region->buffer, &region->tiling,
- &region->bit_6_swizzle);
- if (ret != 0) {
- fprintf(stderr, "Couldn't get tiling of buffer %d (%s): %s\n",
- region_desc->bo_handle, name, strerror(-ret));
- intel_region_release(&region);
- return NULL;
- }
- } else {
- if (region->classic_map != NULL) {
- drmUnmap(region->classic_map,
- region->pitch * region->cpp * region->height);
- region->classic_map = NULL;
- }
- ret = drmMap(intel->driFd, region_desc->handle,
- region->pitch * region->cpp * region->height,
- &region->classic_map);
- if (ret != 0) {
- fprintf(stderr, "Failed to drmMap %s buffer\n", name);
- free(region);
- return NULL;
- }
-
- region->buffer = intel_bo_fake_alloc_static(intel->bufmgr,
+ assert(region_desc->bo_handle != -1);
+ region->buffer = intel_bo_gem_create_from_name(intel->bufmgr,
name,
- region_desc->offset,
- region->pitch * region->cpp *
- region->height,
- region->classic_map);
-
- /* The sarea just gives us a boolean for whether it's tiled or not,
- * instead of which tiling mode it is. Guess.
- */
- if (region_desc->tiled) {
- if (IS_965(intel->intelScreen->deviceID) &&
- region_desc == &intelScreen->depth)
- region->tiling = I915_TILING_Y;
- else
- region->tiling = I915_TILING_X;
- } else {
- region->tiling = I915_TILING_NONE;
- }
+ region_desc->bo_handle);
- region->bit_6_swizzle = I915_BIT_6_SWIZZLE_NONE;
+ ret = dri_bo_get_tiling(region->buffer, &region->tiling,
+ &region->bit_6_swizzle);
+ if (ret != 0) {
+ fprintf(stderr, "Couldn't get tiling of buffer %d (%s): %s\n",
+ region_desc->bo_handle, name, strerror(-ret));
+ intel_region_release(&region);
+ return NULL;
}
assert(region->buffer != NULL);
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 789135b49f9..2c5a884a9b4 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -605,7 +605,6 @@ intelFillInModes(__DRIscreenPrivate *psp,
static GLboolean
intel_init_bufmgr(intelScreenPrivate *intelScreen)
{
- GLboolean gem_disable = getenv("INTEL_NO_GEM") != NULL;
int gem_kernel = 0;
GLboolean gem_supported;
struct drm_i915_getparam gp;
@@ -622,43 +621,24 @@ intel_init_bufmgr(intelScreenPrivate *intelScreen)
/* If we've got a new enough DDX that's initializing GEM and giving us
* object handles for the shared buffers, use that.
*/
- intelScreen->ttm = GL_FALSE;
if (intelScreen->driScrnPriv->dri2.enabled)
gem_supported = GL_TRUE;
else if (intelScreen->driScrnPriv->ddx_version.minor >= 9 &&
gem_kernel &&
intelScreen->front.bo_handle != -1)
gem_supported = GL_TRUE;
- else
- gem_supported = GL_FALSE;
-
- if (!gem_disable && gem_supported) {
- intelScreen->bufmgr = intel_bufmgr_gem_init(spriv->fd, BATCH_SZ);
- if (intelScreen->bufmgr != NULL)
- intelScreen->ttm = GL_TRUE;
+ else {
+ fprintf(stderr, "[%s:%u] Error initializing GEM.\n",
+ __func__, __LINE__);
+ return GL_FALSE;
}
+
+ intelScreen->bufmgr = intel_bufmgr_gem_init(spriv->fd, BATCH_SZ);
/* Otherwise, use the classic buffer manager. */
if (intelScreen->bufmgr == NULL) {
- if (gem_disable) {
- _mesa_warning(NULL, "GEM disabled. Using classic.");
- } else {
- _mesa_warning(NULL,
- "Failed to initialize GEM. Falling back to classic.");
- }
-
- if (intelScreen->tex.size == 0) {
- fprintf(stderr, "[%s:%u] Error initializing buffer manager.\n",
- __func__, __LINE__);
- return GL_FALSE;
- }
-
- intelScreen->bufmgr =
- intel_bufmgr_fake_init(spriv->fd,
- intelScreen->tex.offset,
- intelScreen->tex.map,
- intelScreen->tex.size,
- (unsigned int * volatile)
- &intelScreen->sarea->last_dispatch);
+ fprintf(stderr, "[%s:%u] Error initializing buffer manager.\n",
+ __func__, __LINE__);
+ return GL_FALSE;
}
if (intel_get_param(spriv, I915_PARAM_NUM_FENCES_AVAIL, &num_fences))
diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h
index a9b9e109a6a..14ca0903b6c 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.h
+++ b/src/mesa/drivers/dri/intel/intel_screen.h
@@ -77,7 +77,6 @@ typedef struct
GLboolean no_hw;
GLboolean no_vbo;
- int ttm;
dri_bufmgr *bufmgr;
GLboolean kernel_exec_fencing;
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index 638e05f2add..2c89a66a95f 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -292,7 +292,6 @@ static uint32_t y_tile_swizzle(struct intel_renderbuffer *irb,
#define Y_FLIP(_y) ((_y) * yScale + yBias)
-/* XXX with GEM, these need to tell the kernel */
#define HW_LOCK()
#define HW_UNLOCK()
@@ -501,6 +500,8 @@ intel_map_unmap_framebuffer(struct intel_context *intel,
else
intel_renderbuffer_unmap(intel, fb->_StencilBuffer->Wrapped);
}
+
+ intel_check_front_buffer_rendering(intel);
}
/**
@@ -612,15 +613,7 @@ intel_set_span_functions(struct intel_context *intel,
struct gl_renderbuffer *rb)
{
struct intel_renderbuffer *irb = (struct intel_renderbuffer *) rb;
- uint32_t tiling;
-
- /* If in GEM mode, we need to do the tile address swizzling ourselves,
- * instead of the fence registers handling it.
- */
- if (intel->ttm)
- tiling = irb->region->tiling;
- else
- tiling = I915_TILING_NONE;
+ uint32_t tiling = irb->region->tiling;
if (intel->intelScreen->kernel_exec_fencing) {
switch (irb->texformat) {
@@ -672,6 +665,9 @@ intel_set_span_functions(struct intel_context *intel,
return;
}
+ /* If in GEM mode, we need to do the tile address swizzling ourselves,
+ * instead of the fence registers handling it.
+ */
switch (irb->texformat) {
case MESA_FORMAT_RGB565:
switch (tiling) {
diff --git a/src/mesa/drivers/dri/intel/intel_spantmp.h b/src/mesa/drivers/dri/intel/intel_spantmp.h
index 98cc6585f4a..bad03398f68 100644
--- a/src/mesa/drivers/dri/intel/intel_spantmp.h
+++ b/src/mesa/drivers/dri/intel/intel_spantmp.h
@@ -54,8 +54,8 @@
#define SPANTMP_PIXEL_FMT INTEL_PIXEL_FMT
#define SPANTMP_PIXEL_TYPE INTEL_PIXEL_TYPE
-#define PUT_VALUE(_x, _y, v) INTEL_WRITE_VALUE(X_TILE(_x, _y), v)
-#define GET_VALUE(_x, _y) INTEL_READ_VALUE(X_TILE(_x, _y))
+#define PUT_VALUE(_x, _y, v) INTEL_WRITE_VALUE(Y_TILE(_x, _y), v)
+#define GET_VALUE(_x, _y) INTEL_READ_VALUE(Y_TILE(_x, _y))
#define TAG(x) INTEL_TAG(intel_YTile_##x)
#define TAG2(x, y) INTEL_TAG(intel_YTile_##x)##y
#include "spantmp2.h"
diff --git a/src/mesa/drivers/dri/intel/intel_state.c b/src/mesa/drivers/dri/intel/intel_state.c
index 4ee742377d6..aefae53eb20 100644
--- a/src/mesa/drivers/dri/intel/intel_state.c
+++ b/src/mesa/drivers/dri/intel/intel_state.c
@@ -196,25 +196,6 @@ intel_translate_logic_op(GLenum opcode)
}
}
-
-static void
-intelClearColor(GLcontext *ctx, const GLfloat color[4])
-{
- struct intel_context *intel = intel_context(ctx);
- GLubyte clear[4];
-
- CLAMPED_FLOAT_TO_UBYTE(clear[0], color[0]);
- CLAMPED_FLOAT_TO_UBYTE(clear[1], color[1]);
- CLAMPED_FLOAT_TO_UBYTE(clear[2], color[2]);
- CLAMPED_FLOAT_TO_UBYTE(clear[3], color[3]);
-
- /* compute both 32 and 16-bit clear values */
- intel->ClearColor8888 = INTEL_PACKCOLOR8888(clear[0], clear[1],
- clear[2], clear[3]);
- intel->ClearColor565 = INTEL_PACKCOLOR565(clear[0], clear[1], clear[2]);
-}
-
-
/* Fallback to swrast for select and feedback.
*/
static void
@@ -229,5 +210,4 @@ void
intelInitStateFuncs(struct dd_function_table *functions)
{
functions->RenderMode = intelRenderMode;
- functions->ClearColor = intelClearColor;
}
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index bb21dd5ed94..767d04d2f4b 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -109,7 +109,7 @@ do_copy_texsubimage(struct intel_context *intel,
return GL_FALSE;
}
- intelFlush(ctx);
+ // intelFlush(ctx);
LOCK_HARDWARE(intel);
{
drm_intel_bo *dst_bo = intel_region_buffer(intel,
@@ -221,6 +221,8 @@ intelCopyTexImage1D(GLcontext * ctx, GLenum target, GLint level,
return;
fail:
+ if (INTEL_DEBUG & DEBUG_FALLBACKS)
+ fprintf(stderr, "%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexImage1D(ctx, target, level, internalFormat, x, y,
width, border);
}
@@ -268,6 +270,8 @@ intelCopyTexImage2D(GLcontext * ctx, GLenum target, GLint level,
return;
fail:
+ if (INTEL_DEBUG & DEBUG_FALLBACKS)
+ fprintf(stderr, "%s - fallback to swrast\n", __FUNCTION__);
_mesa_meta_CopyTexImage2D(ctx, target, level, internalFormat, x, y,
width, height, border);
}
@@ -292,6 +296,8 @@ intelCopyTexSubImage1D(GLcontext * 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__);
_mesa_meta_CopyTexSubImage1D(ctx, target, level, xoffset, x, y, width);
}
}
@@ -317,8 +323,8 @@ intelCopyTexSubImage2D(GLcontext * ctx, GLenum target, GLint level,
internalFormat,
xoffset, yoffset, x, y, width, height)) {
- DBG("%s - fallback to _mesa_meta_CopyTexSubImage2D\n", __FUNCTION__);
-
+ if (INTEL_DEBUG & DEBUG_FALLBACKS)
+ fprintf(stderr, "%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_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c
index f37a545c7f8..bfa3dba1f5c 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_format.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_format.c
@@ -95,14 +95,20 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
case GL_COMPRESSED_LUMINANCE:
return MESA_FORMAT_L8;
+ case GL_LUMINANCE12_ALPHA4:
+ case GL_LUMINANCE12_ALPHA12:
+ case GL_LUMINANCE16_ALPHA16:
+#ifndef I915
+ return MESA_FORMAT_AL1616;
+#else
+ /* FALLTHROUGH */
+#endif
+
case 2:
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE4_ALPHA4:
case GL_LUMINANCE6_ALPHA2:
case GL_LUMINANCE8_ALPHA8:
- case GL_LUMINANCE12_ALPHA4:
- case GL_LUMINANCE12_ALPHA12:
- case GL_LUMINANCE16_ALPHA16:
case GL_COMPRESSED_LUMINANCE_ALPHA:
return MESA_FORMAT_AL88;
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 3412e761ca9..66d61f93ea9 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -115,7 +115,8 @@ guess_and_alloc_mipmap_tree(struct intel_context *intel,
*/
if ((intelObj->base.MinFilter == GL_NEAREST ||
intelObj->base.MinFilter == GL_LINEAR) &&
- intelImage->level == firstLevel) {
+ intelImage->level == firstLevel &&
+ (intel->gen < 4 || firstLevel == 0)) {
lastLevel = firstLevel;
}
else {
@@ -368,8 +369,7 @@ intelTexImage(GLcontext * ctx,
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,
- intelImage->face, intelImage->level)) {
+ !intel_miptree_match_image(intelObj->mt, &intelImage->base)) {
DBG("release it\n");
intel_miptree_release(intel, &intelObj->mt);
@@ -386,8 +386,7 @@ intelTexImage(GLcontext * ctx,
assert(!intelImage->mt);
if (intelObj->mt &&
- intel_miptree_match_image(intelObj->mt, &intelImage->base,
- intelImage->face, intelImage->level)) {
+ intel_miptree_match_image(intelObj->mt, &intelImage->base)) {
intel_miptree_reference(&intelImage->mt, intelObj->mt);
assert(intelImage->mt);
@@ -735,17 +734,16 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
{
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
struct intel_context *intel = pDRICtx->driverPrivate;
+ GLcontext *ctx = &intel->ctx;
struct intel_texture_object *intelObj;
struct intel_texture_image *intelImage;
struct intel_mipmap_tree *mt;
struct intel_renderbuffer *rb;
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
int level = 0, internalFormat;
- texUnit = &intel->ctx.Texture.Unit[intel->ctx.Texture.CurrentUnit];
- texObj = _mesa_select_tex_object(&intel->ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
intelObj = intel_texture_object(texObj);
if (!intelObj)
@@ -797,8 +795,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
texImage->RowStride = rb->region->pitch;
intel_miptree_reference(&intelImage->mt, intelObj->mt);
- if (!intel_miptree_match_image(intelObj->mt, &intelImage->base,
- intelImage->face, intelImage->level)) {
+ if (!intel_miptree_match_image(intelObj->mt, &intelImage->base)) {
fprintf(stderr, "miptree doesn't match image\n");
}
diff --git a/src/mesa/drivers/dri/intel/intel_tex_obj.h b/src/mesa/drivers/dri/intel/intel_tex_obj.h
index 5a934615259..3ad10d3d238 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_obj.h
+++ b/src/mesa/drivers/dri/intel/intel_tex_obj.h
@@ -66,6 +66,7 @@ struct intel_texture_image
* Else there is no image data.
*/
struct intel_mipmap_tree *mt;
+ GLboolean used_as_render_target;
};
static INLINE struct intel_texture_object *
diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
index 504993989ae..c9a24ac3983 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -42,7 +42,7 @@ intel_calculate_first_last_level(struct intel_context *intel,
firstLevel = lastLevel = tObj->BaseLevel;
}
else {
- if (!IS_9XX(intel->intelScreen->deviceID)) {
+ if (intel->gen == 2) {
firstLevel = tObj->BaseLevel + (GLint) (tObj->MinLod + 0.5);
firstLevel = MAX2(firstLevel, tObj->BaseLevel);
firstLevel = MIN2(firstLevel, tObj->BaseLevel + baseImage->MaxLog2);
@@ -138,8 +138,7 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
/* What levels must the tree include at a minimum?
*/
intel_calculate_first_last_level(intel, intelObj);
- firstImage =
- intel_texture_image(intelObj->base.Image[0][intelObj->firstLevel]);
+ firstImage = intel_texture_image(tObj->Image[0][intelObj->firstLevel]);
/* Fallback case:
*/
@@ -223,8 +222,13 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
intel_texture_image(intelObj->base.Image[face][i]);
/* Need to import images in main memory or held in other trees.
+ * If it's a render target, then its data isn't needed to be in
+ * the object tree (otherwise we'd be FBO incomplete), and we need
+ * to keep track of the image's MT as needing to be pulled in still,
+ * or we'll lose the rendering that's done to it.
*/
- if (intelObj->mt != intelImage->mt) {
+ if (intelObj->mt != intelImage->mt &&
+ !intelImage->used_as_render_target) {
copy_image_data_to_tree(intel, intelObj, intelImage);
}
}
diff --git a/src/mesa/drivers/dri/mach64/mach64_native_vb.c b/src/mesa/drivers/dri/mach64/mach64_native_vb.c
index 99f1a14e171..816682ec5f1 100644
--- a/src/mesa/drivers/dri/mach64/mach64_native_vb.c
+++ b/src/mesa/drivers/dri/mach64/mach64_native_vb.c
@@ -207,19 +207,19 @@ INTERP_QUALIFIER void TAG(interp_extras)( GLcontext *ctx,
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- if (VB->ColorPtr[1]) {
- assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat));
+ if (VB->BackfaceColorPtr) {
+ assert(VB->BackfaceColorPtr->stride == 4 * sizeof(GLfloat));
INTERP_4F( t,
- GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], out),
- GET_COLOR(VB->ColorPtr[1], in) );
+ GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, out),
+ GET_COLOR(VB->BackfaceColorPtr, in) );
- if (VB->SecondaryColorPtr[1]) {
+ if (VB->BackfaceSecondaryColorPtr) {
INTERP_3F( t,
- GET_COLOR(VB->SecondaryColorPtr[1], dst),
- GET_COLOR(VB->SecondaryColorPtr[1], out),
- GET_COLOR(VB->SecondaryColorPtr[1], in) );
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, dst),
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, out),
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, in) );
}
}
@@ -236,13 +236,13 @@ INTERP_QUALIFIER void TAG(copy_pv_extras)( GLcontext *ctx,
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- if (VB->ColorPtr[1]) {
- COPY_4FV( GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], src) );
+ if (VB->BackfaceColorPtr) {
+ COPY_4FV( GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, src) );
- if (VB->SecondaryColorPtr[1]) {
- COPY_4FV( GET_COLOR(VB->SecondaryColorPtr[1], dst),
- GET_COLOR(VB->SecondaryColorPtr[1], src) );
+ if (VB->BackfaceSecondaryColorPtr) {
+ COPY_4FV( GET_COLOR(VB->BackfaceSecondaryColorPtr, dst),
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, src) );
}
}
diff --git a/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h b/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
index 684f2acc890..6e5fa3520e1 100644
--- a/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
+++ b/src/mesa/drivers/dri/mach64/mach64_native_vbtmp.h
@@ -103,10 +103,10 @@ static void TAG(emit)( GLcontext *ctx,
#if DO_TEX1
{
const GLuint t1 = GET_TEXSOURCE(1);
- tc1 = VB->TexCoordPtr[t1]->data;
- tc1_stride = VB->TexCoordPtr[t1]->stride;
+ tc1 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->data;
+ tc1_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->stride;
#if DO_PTEX
- tc1_size = VB->TexCoordPtr[t1]->size;
+ tc1_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->size;
#endif
}
#endif
@@ -114,18 +114,18 @@ static void TAG(emit)( GLcontext *ctx,
#if DO_TEX0
{
const GLuint t0 = GET_TEXSOURCE(0);
- tc0 = VB->TexCoordPtr[t0]->data;
- tc0_stride = VB->TexCoordPtr[t0]->stride;
+ tc0 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->data;
+ tc0_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->stride;
#if DO_PTEX
- tc0_size = VB->TexCoordPtr[t0]->size;
+ tc0_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->size;
#endif
}
#endif
#if DO_SPEC
- if (VB->SecondaryColorPtr[0]) {
- spec = VB->SecondaryColorPtr[0]->data;
- spec_stride = VB->SecondaryColorPtr[0]->stride;
+ if (VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
+ spec = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->data;
+ spec_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->stride;
} else {
spec = (GLfloat (*)[4])ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
spec_stride = 0;
@@ -133,9 +133,9 @@ static void TAG(emit)( GLcontext *ctx,
#endif
#if DO_FOG
- if (VB->FogCoordPtr) {
- fog = VB->FogCoordPtr->data;
- fog_stride = VB->FogCoordPtr->stride;
+ if (VB->AttribPtr[_TNL_ATTRIB_FOG]) {
+ fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
+ fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
} else {
static GLfloat tmp[4] = {0, 0, 0, 0};
fog = &tmp;
@@ -144,8 +144,8 @@ static void TAG(emit)( GLcontext *ctx,
#endif
#if DO_RGBA
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
#endif
coord = VB->NdcPtr->data;
@@ -319,8 +319,8 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
/* Force 'missing' texcoords to something valid.
*/
- if (DO_TEX1 && VB->TexCoordPtr[0] == 0)
- VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
+ if (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0] = VB->AttribPtr[_TNL_ATTRIB_TEX1];
if (DO_PTEX)
return GL_TRUE;
@@ -328,12 +328,12 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
/* No hardware support for projective texture. Can fake it for
* TEX0 only.
*/
- if ((DO_TEX1 && VB->TexCoordPtr[GET_TEXSOURCE(1)]->size == 4)) {
+ if ((DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(1)]->size == 4)) {
PTEX_FALLBACK();
return GL_FALSE;
}
- if (DO_TEX0 && VB->TexCoordPtr[GET_TEXSOURCE(0)]->size == 4) {
+ if (DO_TEX0 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(0)]->size == 4) {
if (DO_TEX1) {
PTEX_FALLBACK();
}
diff --git a/src/mesa/drivers/dri/mach64/mach64_vbtmp.h b/src/mesa/drivers/dri/mach64/mach64_vbtmp.h
index 938804af9ec..60bfab8f6dc 100644
--- a/src/mesa/drivers/dri/mach64/mach64_vbtmp.h
+++ b/src/mesa/drivers/dri/mach64/mach64_vbtmp.h
@@ -156,53 +156,53 @@ static void TAG(emit)( GLcontext *ctx,
if (DO_TEX3) {
const GLuint t3 = GET_TEXSOURCE(3);
- tc3 = VB->TexCoordPtr[t3]->data;
- tc3_stride = VB->TexCoordPtr[t3]->stride;
+ tc3 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t3]->data;
+ tc3_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t3]->stride;
if (DO_PTEX)
- tc3_size = VB->TexCoordPtr[t3]->size;
+ tc3_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t3]->size;
}
if (DO_TEX2) {
const GLuint t2 = GET_TEXSOURCE(2);
- tc2 = VB->TexCoordPtr[t2]->data;
- tc2_stride = VB->TexCoordPtr[t2]->stride;
+ tc2 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->data;
+ tc2_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->stride;
if (DO_PTEX)
- tc2_size = VB->TexCoordPtr[t2]->size;
+ tc2_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->size;
}
if (DO_TEX1) {
const GLuint t1 = GET_TEXSOURCE(1);
- tc1 = VB->TexCoordPtr[t1]->data;
- tc1_stride = VB->TexCoordPtr[t1]->stride;
+ tc1 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->data;
+ tc1_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->stride;
if (DO_PTEX)
- tc1_size = VB->TexCoordPtr[t1]->size;
+ tc1_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->size;
}
if (DO_TEX0) {
const GLuint t0 = GET_TEXSOURCE(0);
- tc0_stride = VB->TexCoordPtr[t0]->stride;
- tc0 = VB->TexCoordPtr[t0]->data;
+ tc0_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->stride;
+ tc0 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->data;
if (DO_PTEX)
- tc0_size = VB->TexCoordPtr[t0]->size;
+ tc0_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->size;
}
if (DO_RGBA) {
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
}
if (DO_SPEC) {
- spec = VB->SecondaryColorPtr[0]->data;
- spec_stride = VB->SecondaryColorPtr[0]->stride;
+ spec = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->data;
+ spec_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->stride;
} else {
spec = (GLfloat (*)[4])ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
spec_stride = 0;
}
if (DO_FOG) {
- if (VB->FogCoordPtr) {
- fog = VB->FogCoordPtr->data;
- fog_stride = VB->FogCoordPtr->stride;
+ if (VB->AttribPtr[_TNL_ATTRIB_FOG]) {
+ fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
+ fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
} else {
static GLfloat tmp[4] = {0, 0, 0, 0};
fog = &tmp;
@@ -384,8 +384,8 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
ASSERT(stride == 4);
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
/* Pack what's left into a 4-dword vertex. Color is in a different
* place, and there is no 'w' coordinate.
@@ -432,8 +432,8 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
GLfloat *v = (GLfloat *)dest;
int i;
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
if (start)
STRIDE_4F(col, col_stride * start);
@@ -473,22 +473,22 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
/* Force 'missing' texcoords to something valid.
*/
- if (DO_TEX3 && VB->TexCoordPtr[2] == 0)
- VB->TexCoordPtr[2] = VB->TexCoordPtr[3];
+ if (DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX2] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX2] = VB->AttribPtr[_TNL_ATTRIB_TEX3];
- if (DO_TEX2 && VB->TexCoordPtr[1] == 0)
- VB->TexCoordPtr[1] = VB->TexCoordPtr[2];
+ if (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX1] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX1] = VB->AttribPtr[_TNL_ATTRIB_TEX2];
- if (DO_TEX1 && VB->TexCoordPtr[0] == 0)
- VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
+ if (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0] = VB->AttribPtr[_TNL_ATTRIB_TEX1];
if (DO_PTEX)
return GL_TRUE;
- if ((DO_TEX3 && VB->TexCoordPtr[GET_TEXSOURCE(3)]->size == 4) ||
- (DO_TEX2 && VB->TexCoordPtr[GET_TEXSOURCE(2)]->size == 4) ||
- (DO_TEX1 && VB->TexCoordPtr[GET_TEXSOURCE(1)]->size == 4) ||
- (DO_TEX0 && VB->TexCoordPtr[GET_TEXSOURCE(0)]->size == 4))
+ if ((DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(3)]->size == 4) ||
+ (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(2)]->size == 4) ||
+ (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(1)]->size == 4) ||
+ (DO_TEX0 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(0)]->size == 4))
return GL_FALSE;
return GL_TRUE;
@@ -501,14 +501,14 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
/* Force 'missing' texcoords to something valid.
*/
- if (DO_TEX3 && VB->TexCoordPtr[2] == 0)
- VB->TexCoordPtr[2] = VB->TexCoordPtr[3];
+ if (DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX2] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX2] = VB->AttribPtr[_TNL_ATTRIB_TEX3];
- if (DO_TEX2 && VB->TexCoordPtr[1] == 0)
- VB->TexCoordPtr[1] = VB->TexCoordPtr[2];
+ if (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX1] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX1] = VB->AttribPtr[_TNL_ATTRIB_TEX2];
- if (DO_TEX1 && VB->TexCoordPtr[0] == 0)
- VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
+ if (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0] = VB->AttribPtr[_TNL_ATTRIB_TEX1];
if (DO_PTEX)
return GL_TRUE;
@@ -516,14 +516,14 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
/* No hardware support for projective texture. Can fake it for
* TEX0 only.
*/
- if ((DO_TEX3 && VB->TexCoordPtr[GET_TEXSOURCE(3)]->size == 4) ||
- (DO_TEX2 && VB->TexCoordPtr[GET_TEXSOURCE(2)]->size == 4) ||
- (DO_TEX1 && VB->TexCoordPtr[GET_TEXSOURCE(1)]->size == 4)) {
+ if ((DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(3)]->size == 4) ||
+ (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(2)]->size == 4) ||
+ (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(1)]->size == 4)) {
PTEX_FALLBACK();
return GL_FALSE;
}
- if (DO_TEX0 && VB->TexCoordPtr[GET_TEXSOURCE(0)]->size == 4) {
+ if (DO_TEX0 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(0)]->size == 4) {
if (DO_TEX1 || DO_TEX2 || DO_TEX3) {
PTEX_FALLBACK();
}
diff --git a/src/mesa/drivers/dri/r128/r128_tris.c b/src/mesa/drivers/dri/r128/r128_tris.c
index 5b91271d740..448e34e047c 100644
--- a/src/mesa/drivers/dri/r128/r128_tris.c
+++ b/src/mesa/drivers/dri/r128/r128_tris.c
@@ -650,12 +650,12 @@ static void r128RenderStart( GLcontext *ctx )
}
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX(rmesa->tmu_source[0]) )) {
- if ( VB->TexCoordPtr[rmesa->tmu_source[0]]->size > 2 )
+ if ( VB->AttribPtr[_TNL_ATTRIB_TEX0 + rmesa->tmu_source[0]]->size > 2 )
fallback_projtex = GL_TRUE;
EMIT_ATTR( _TNL_ATTRIB_TEX0, EMIT_2F, R128_CCE_VC_FRMT_S_T, 8 );
}
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX(rmesa->tmu_source[1]) )) {
- if ( VB->TexCoordPtr[rmesa->tmu_source[1]]->size > 2 )
+ if ( VB->AttribPtr[_TNL_ATTRIB_TEX0 + rmesa->tmu_source[1]]->size > 2 )
fallback_projtex = GL_TRUE;
EMIT_ATTR( _TNL_ATTRIB_TEX1, EMIT_2F, R128_CCE_VC_FRMT_S2_T2, 8 );
}
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index e3ae839235e..5f985d624d8 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -325,9 +325,9 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
_mesa_init_driver_functions(&functions);
r200InitDriverFuncs(&functions);
r200InitIoctlFuncs(&functions);
- r200InitStateFuncs(&functions, screen->kernel_mm);
+ r200InitStateFuncs(&functions);
r200InitTextureFuncs(&functions);
- r200InitShaderFuncs(&functions);
+ r200InitShaderFuncs(&functions);
radeonInitQueryObjFunctions(&functions);
if (!radeonInitContext(&rmesa->radeon, &functions,
diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
index 383a0c4b0d3..249c0bbc11d 100644
--- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c
+++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
@@ -90,12 +90,14 @@ static void r200_emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
aos->components = size;
aos->count = count;
+ radeon_bo_map(aos->bo, 1);
out = (uint32_t*)((char*)aos->bo->ptr + aos->offset);
for (i = 0; i < count; i++) {
out[0] = r200ComputeFogBlendFactor( ctx, *(GLfloat *)data );
out++;
data += stride;
}
+ radeon_bo_unmap(aos->bo);
}
/* Emit any changed arrays to new GART memory, re-emit a packet to
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index d28e96d9d98..6d99c039ded 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -2476,7 +2476,7 @@ static void r200PolygonStipple( GLcontext *ctx, const GLubyte *mask )
}
/* Initialize the driver's state functions.
*/
-void r200InitStateFuncs( struct dd_function_table *functions, GLboolean dri2 )
+void r200InitStateFuncs( struct dd_function_table *functions )
{
functions->UpdateState = r200InvalidateState;
functions->LightingSpaceChange = r200LightingSpaceChange;
@@ -2510,10 +2510,7 @@ void r200InitStateFuncs( struct dd_function_table *functions, GLboolean dri2 )
functions->LogicOpcode = r200LogicOpCode;
functions->PolygonMode = r200PolygonMode;
functions->PolygonOffset = r200PolygonOffset;
- if (dri2)
- functions->PolygonStipple = r200PolygonStipple;
- else
- functions->PolygonStipple = radeonPolygonStipplePreKMS;
+ functions->PolygonStipple = r200PolygonStipple;
functions->PointParameterfv = r200PointParameter;
functions->PointSize = r200PointSize;
functions->RenderMode = r200RenderMode;
diff --git a/src/mesa/drivers/dri/r200/r200_state.h b/src/mesa/drivers/dri/r200/r200_state.h
index 9c62f0a6446..7b9b0c106aa 100644
--- a/src/mesa/drivers/dri/r200/r200_state.h
+++ b/src/mesa/drivers/dri/r200/r200_state.h
@@ -38,7 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_context.h"
extern void r200InitState( r200ContextPtr rmesa );
-extern void r200InitStateFuncs( struct dd_function_table *functions, GLboolean dri2 );
+extern void r200InitStateFuncs( struct dd_function_table *functions );
extern void r200InitTnlFuncs( GLcontext *ctx );
extern void r200UpdateMaterial( GLcontext *ctx );
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 68bfeea701a..6c5a0b79eed 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -640,7 +640,7 @@ static void tex_emit(GLcontext *ctx, struct radeon_state_atom *atom)
OUT_BATCH_TABLE(atom->cmd, 10);
if (t && t->mt && !t->image_override) {
- OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, 0,
+ OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, get_base_teximage_offset(t),
RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
} else if (!t) {
/* workaround for old CS mechanism */
@@ -887,10 +887,8 @@ void r200InitState( r200ContextPtr rmesa )
}
}
}
- /* polygon stipple is done with irq for non-kms */
- if (rmesa->radeon.radeonScreen->kernel_mm) {
- ALLOC_STATE( stp, always, STP_STATE_SIZE, "STP/stp", 0 );
- }
+
+ ALLOC_STATE( stp, always, STP_STATE_SIZE, "STP/stp", 0 );
for (i = 0; i < 6; i++)
if (rmesa->radeon.radeonScreen->kernel_mm)
@@ -1122,12 +1120,11 @@ void r200InitState( r200ContextPtr rmesa )
rmesa->hw.sci.cmd[SCI_CMD_1] = CP_PACKET0(R200_RE_TOP_LEFT, 0);
rmesa->hw.sci.cmd[SCI_CMD_2] = CP_PACKET0(R200_RE_WIDTH_HEIGHT, 0);
- if (rmesa->radeon.radeonScreen->kernel_mm) {
-
- rmesa->hw.stp.cmd[STP_CMD_0] = CP_PACKET0(RADEON_RE_STIPPLE_ADDR, 0);
- rmesa->hw.stp.cmd[STP_DATA_0] = 0;
- rmesa->hw.stp.cmd[STP_CMD_1] = CP_PACKET0_ONE(RADEON_RE_STIPPLE_DATA, 31);
+ rmesa->hw.stp.cmd[STP_CMD_0] = CP_PACKET0(RADEON_RE_STIPPLE_ADDR, 0);
+ rmesa->hw.stp.cmd[STP_DATA_0] = 0;
+ rmesa->hw.stp.cmd[STP_CMD_1] = CP_PACKET0_ONE(RADEON_RE_STIPPLE_DATA, 31);
+ if (rmesa->radeon.radeonScreen->kernel_mm) {
rmesa->hw.mtl[0].emit = mtl_emit;
rmesa->hw.mtl[1].emit = mtl_emit;
diff --git a/src/mesa/drivers/dri/r200/r200_swtcl.c b/src/mesa/drivers/dri/r200/r200_swtcl.c
index 240fb450780..4596912ddc7 100644
--- a/src/mesa/drivers/dri/r200/r200_swtcl.c
+++ b/src/mesa/drivers/dri/r200/r200_swtcl.c
@@ -168,7 +168,7 @@ static void r200SetVertexFormat( GLcontext *ctx )
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX(i) )) {
- GLuint sz = VB->TexCoordPtr[i]->size;
+ GLuint sz = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->size;
fmt_1 |= sz << (3 * i);
EMIT_ATTR( _TNL_ATTRIB_TEX0+i, EMIT_1F + sz - 1, 0 );
@@ -297,7 +297,7 @@ void r200_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
radeonEmitState(&rmesa->radeon);
r200EmitVertexAOS( rmesa,
rmesa->radeon.swtcl.vertex_size,
- first_elem(&rmesa->radeon.dma.reserved)->bo,
+ rmesa->radeon.swtcl.bo,
current_offset);
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index c702910ef21..e7d48a7f29f 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -509,25 +509,26 @@ static GLboolean r200_run_tcl_render( GLcontext *ctx,
prog to a not enabled output however, so just don't mess with it.
We only need to change compsel. */
GLuint out_compsel = 0;
- GLuint vp_out = rmesa->curr_vp_hw->mesa_program.Base.OutputsWritten;
+ const GLbitfield64 vp_out =
+ rmesa->curr_vp_hw->mesa_program.Base.OutputsWritten;
vimap_rev = &rmesa->curr_vp_hw->inputmap_rev[0];
- assert(vp_out & (1 << VERT_RESULT_HPOS));
+ assert(vp_out & BITFIELD64_BIT(VERT_RESULT_HPOS));
out_compsel = R200_OUTPUT_XYZW;
- if (vp_out & (1 << VERT_RESULT_COL0)) {
+ if (vp_out & BITFIELD64_BIT(VERT_RESULT_COL0)) {
out_compsel |= R200_OUTPUT_COLOR_0;
}
- if (vp_out & (1 << VERT_RESULT_COL1)) {
+ if (vp_out & BITFIELD64_BIT(VERT_RESULT_COL1)) {
out_compsel |= R200_OUTPUT_COLOR_1;
}
- if (vp_out & (1 << VERT_RESULT_FOGC)) {
+ if (vp_out & BITFIELD64_BIT(VERT_RESULT_FOGC)) {
out_compsel |= R200_OUTPUT_DISCRETE_FOG;
}
- if (vp_out & (1 << VERT_RESULT_PSIZ)) {
+ if (vp_out & BITFIELD64_BIT(VERT_RESULT_PSIZ)) {
out_compsel |= R200_OUTPUT_PT_SIZE;
}
for (i = VERT_RESULT_TEX0; i < VERT_RESULT_TEX6; i++) {
- if (vp_out & (1 << i)) {
+ if (vp_out & BITFIELD64_BIT(i)) {
out_compsel |= R200_OUTPUT_TEX_0 << (i - VERT_RESULT_TEX0);
}
}
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index 5a21a8b9c5a..a4177215537 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -385,16 +385,7 @@ static void r200TexParameter( GLcontext *ctx, GLenum target,
case GL_TEXTURE_MAX_LEVEL:
case GL_TEXTURE_MIN_LOD:
case GL_TEXTURE_MAX_LOD:
- /* This isn't the most efficient solution but there doesn't appear to
- * be a nice alternative. Since there's no LOD clamping,
- * we just have to rely on loading the right subset of mipmap levels
- * to simulate a clamped LOD.
- */
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = 0;
- t->validated = GL_FALSE;
- }
+ t->validated = GL_FALSE;
break;
default:
@@ -413,7 +404,7 @@ static void r200DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
(void *)texObj,
_mesa_lookup_enum_by_nr(texObj->Target));
}
-
+
if (rmesa) {
int i;
radeon_firevertices(&rmesa->radeon);
@@ -425,11 +416,9 @@ static void r200DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
}
}
}
-
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = 0;
- }
+
+ radeon_miptree_unreference(&t->mt);
+
_mesa_delete_texture_object(ctx, texObj);
}
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index 7d0afa1add8..e2f9cf0ea86 100644
--- a/src/mesa/drivers/dri/r200/r200_texstate.c
+++ b/src/mesa/drivers/dri/r200/r200_texstate.c
@@ -797,24 +797,13 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
return;
}
- radeon_update_renderbuffers(pDRICtx, dPriv);
- /* back & depth buffer are useless free them right away */
- rb = (void*)rfb->base.Attachment[BUFFER_DEPTH].Renderbuffer;
- if (rb && rb->bo) {
- radeon_bo_unref(rb->bo);
- rb->bo = NULL;
- }
- rb = (void*)rfb->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer;
- if (rb && rb->bo) {
- radeon_bo_unref(rb->bo);
- rb->bo = NULL;
- }
+ radeon_update_renderbuffers(pDRICtx, dPriv, GL_TRUE);
rb = rfb->color_rb[0];
if (rb->bo == NULL) {
/* Failed to BO for the buffer */
return;
}
-
+
_mesa_lock_texture(radeon->glCtx, texObj);
if (t->bo) {
radeon_bo_unref(t->bo);
@@ -824,14 +813,10 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
radeon_bo_unref(rImage->bo);
rImage->bo = NULL;
}
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = NULL;
- }
- if (rImage->mt) {
- radeon_miptree_unreference(rImage->mt);
- rImage->mt = NULL;
- }
+
+ 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;
@@ -1423,10 +1408,9 @@ void set_re_cntl_d3d( GLcontext *ctx, int unit, GLboolean use_d3d )
*/
static void setup_hardware_state(r200ContextPtr rmesa, radeonTexObj *t)
{
- int firstlevel = t->mt ? t->mt->firstLevel : 0;
- const struct gl_texture_image *firstImage = t->base.Image[0][firstlevel];
+ const struct gl_texture_image *firstImage = t->base.Image[0][t->minLod];
GLint log2Width, log2Height, log2Depth, texelBytes;
-
+
if ( t->bo ) {
return;
}
@@ -1454,9 +1438,9 @@ static void setup_hardware_state(r200ContextPtr rmesa, radeonTexObj *t)
return;
}
}
-
+
t->pp_txfilter &= ~R200_MAX_MIP_LEVEL_MASK;
- t->pp_txfilter |= (t->mt->lastLevel - t->mt->firstLevel) << R200_MAX_MIP_LEVEL_SHIFT;
+ t->pp_txfilter |= (t->maxLod - t->minLod) << R200_MAX_MIP_LEVEL_SHIFT;
t->pp_txformat &= ~(R200_TXFORMAT_WIDTH_MASK |
R200_TXFORMAT_HEIGHT_MASK |
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.h b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
index 33db3ea0ff8..03592884eb2 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
@@ -191,7 +191,7 @@ struct rc_src_register lmul_swizzle(unsigned int swizzle, struct rc_src_register
static inline void reset_srcreg(struct rc_src_register* reg)
{
- memset(reg, 0, sizeof(reg));
+ memset(reg, 0, sizeof(struct rc_src_register));
reg->Swizzle = RC_SWIZZLE_XYZW;
}
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
index 0326d252339..ced66af1eb5 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c
@@ -560,23 +560,23 @@ static void sincos_constants(struct radeon_compiler* c, unsigned int *constants)
* MAD dest, tmp.y, weight, tmp.x
*/
static void sin_approx(
- struct radeon_compiler* c, struct rc_instruction * before,
+ struct radeon_compiler* c, struct rc_instruction * inst,
struct rc_dst_register dst, struct rc_src_register src, const unsigned int* constants)
{
unsigned int tempreg = rc_find_free_temporary(c);
- emit2(c, before, RC_OPCODE_MUL, 0, dstregtmpmask(tempreg, RC_MASK_XY),
+ emit2(c, inst->Prev, RC_OPCODE_MUL, 0, dstregtmpmask(tempreg, RC_MASK_XY),
swizzle(src, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X),
srcreg(RC_FILE_CONSTANT, constants[0]));
- emit3(c, before, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_X),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_X),
swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y),
absolute(swizzle(src, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X)),
swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X));
- emit3(c, before, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_Y),
+ emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_Y),
swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X),
absolute(swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X)),
negate(swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X)));
- emit3(c, before, RC_OPCODE_MAD, 0, dst,
+ emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dst,
swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y),
swizzle(srcreg(RC_FILE_CONSTANT, constants[0]), RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W),
swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X));
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 1e2a54f6342..ad8db6e68e0 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -46,14 +46,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_context.h"
#include "r300_ioctl.h"
-#include "radeon_reg.h"
#include "r300_reg.h"
#include "r300_cmdbuf.h"
#include "r300_emit.h"
#include "radeon_bocs_wrapper.h"
#include "radeon_mipmap_tree.h"
#include "r300_state.h"
-#include "radeon_reg.h"
#include "radeon_queryobj.h"
/** # of dwords reserved for additional instructions that may need to be written
@@ -171,7 +169,7 @@ static void emit_tex_offsets(GLcontext *ctx, struct radeon_state_atom * atom)
if (t && !t->image_override) {
BEGIN_BATCH_NO_AUTOSTATE(4);
OUT_BATCH_REGSEQ(R300_TX_OFFSET_0 + (i * 4), 1);
- OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, 0,
+ OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, get_base_teximage_offset(t),
RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
END_BATCH();
} else if (!t) {
@@ -281,12 +279,27 @@ static void emit_cb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
cbpitch |= R300_COLOR_FORMAT_ARGB8888;
else switch (rrb->base.Format) {
case MESA_FORMAT_RGB565:
+ assert(_mesa_little_endian());
+ cbpitch |= R300_COLOR_FORMAT_RGB565;
+ break;
+ case MESA_FORMAT_RGB565_REV:
+ assert(!_mesa_little_endian());
cbpitch |= R300_COLOR_FORMAT_RGB565;
break;
case MESA_FORMAT_ARGB4444:
+ assert(_mesa_little_endian());
+ cbpitch |= R300_COLOR_FORMAT_ARGB4444;
+ break;
+ case MESA_FORMAT_ARGB4444_REV:
+ assert(!_mesa_little_endian());
cbpitch |= R300_COLOR_FORMAT_ARGB4444;
break;
case MESA_FORMAT_ARGB1555:
+ assert(_mesa_little_endian());
+ cbpitch |= R300_COLOR_FORMAT_ARGB1555;
+ break;
+ case MESA_FORMAT_ARGB1555_REV:
+ assert(!_mesa_little_endian());
cbpitch |= R300_COLOR_FORMAT_ARGB1555;
break;
default:
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 6f66e970e48..5f07b956349 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -439,11 +439,11 @@ static void r300InitGLExtensions(GLcontext *ctx)
if (r300->options.stencil_two_side_disabled)
_mesa_disable_extension(ctx, "GL_EXT_stencil_two_side");
- if (r300->options.s3tc_force_enabled) {
+ if (r300->options.s3tc_force_disabled) {
+ _mesa_disable_extension(ctx, "GL_EXT_texture_compression_s3tc");
+ } else if (ctx->Mesa_DXTn || r300->options.s3tc_force_enabled) {
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
_mesa_enable_extension(ctx, "GL_S3_s3tc");
- } else if (r300->options.s3tc_force_disabled) {
- _mesa_disable_extension(ctx, "GL_EXT_texture_compression_s3tc");
}
if (!r300->radeon.radeonScreen->drmSupportsOcclusionQueries) {
diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c
index e9968f9ffef..3dcd986e226 100644
--- a/src/mesa/drivers/dri/r300/r300_draw.c
+++ b/src/mesa/drivers/dri/r300/r300_draw.c
@@ -100,7 +100,7 @@ static void r300FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
GLubyte *in = (GLubyte *)src_ptr;
radeonAllocDmaRegion(&r300->radeon, &r300->ind_buf.bo, &r300->ind_buf.bo_offset, size, 4);
-
+ radeon_bo_map(r300->ind_buf.bo, 1);
assert(r300->ind_buf.bo->ptr != NULL);
out = (GLuint *)ADD_POINTERS(r300->ind_buf.bo->ptr, r300->ind_buf.bo_offset);
@@ -111,7 +111,7 @@ static void r300FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
if (i < mesa_ind_buf->count) {
*out++ = in[i];
}
-
+ radeon_bo_unmap(r300->ind_buf.bo);
#if MESA_BIG_ENDIAN
} else { /* if (mesa_ind_buf->type == GL_UNSIGNED_SHORT) */
GLushort *in = (GLushort *)src_ptr;
@@ -120,6 +120,7 @@ static void r300FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
radeonAllocDmaRegion(&r300->radeon, &r300->ind_buf.bo,
&r300->ind_buf.bo_offset, size, 4);
+ radeon_bo_map(r300->ind_buf.bo, 1);
assert(r300->ind_buf.bo->ptr != NULL);
out = (GLuint *)ADD_POINTERS(r300->ind_buf.bo->ptr, r300->ind_buf.bo_offset);
@@ -130,6 +131,7 @@ static void r300FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
if (i < mesa_ind_buf->count) {
*out++ = in[i];
}
+ radeon_bo_unmap(r300->ind_buf.bo);
#endif
}
@@ -173,10 +175,12 @@ static void r300SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
radeonAllocDmaRegion(&r300->radeon, &r300->ind_buf.bo, &r300->ind_buf.bo_offset, size, 4);
+ radeon_bo_map(r300->ind_buf.bo, 1);
assert(r300->ind_buf.bo->ptr != NULL);
dst_ptr = ADD_POINTERS(r300->ind_buf.bo->ptr, r300->ind_buf.bo_offset);
_mesa_memcpy(dst_ptr, src_ptr, size);
+ radeon_bo_unmap(r300->ind_buf.bo);
r300->ind_buf.is_32bit = (mesa_ind_buf->type == GL_UNSIGNED_INT);
r300->ind_buf.count = mesa_ind_buf->count;
@@ -242,6 +246,7 @@ static void r300ConvertAttrib(GLcontext *ctx, int count, const struct gl_client_
}
radeonAllocDmaRegion(&r300->radeon, &attr->bo, &attr->bo_offset, sizeof(GLfloat) * input->Size * count, 32);
+ radeon_bo_map(attr->bo, 1);
dst_ptr = (GLfloat *)ADD_POINTERS(attr->bo->ptr, attr->bo_offset);
radeon_print(RADEON_FALLBACKS, RADEON_IMPORTANT,
@@ -280,6 +285,7 @@ static void r300ConvertAttrib(GLcontext *ctx, int count, const struct gl_client_
break;
}
+ radeon_bo_unmap(attr->bo);
if (mapped_named_bo) {
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
}
@@ -294,6 +300,8 @@ static void r300AlignDataToDword(GLcontext *ctx, const struct gl_client_array *i
radeonAllocDmaRegion(&r300->radeon, &attr->bo, &attr->bo_offset, size, 32);
+ radeon_bo_map(attr->bo, 1);
+
if (!input->BufferObj->Pointer) {
ctx->Driver.MapBuffer(ctx, GL_ARRAY_BUFFER, GL_READ_ONLY_ARB, input->BufferObj);
mapped_named_bo = GL_TRUE;
@@ -317,6 +325,7 @@ static void r300AlignDataToDword(GLcontext *ctx, const struct gl_client_array *i
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
}
+ radeon_bo_unmap(attr->bo);
attr->stride = dst_stride;
}
@@ -527,6 +536,7 @@ static void r300AllocDmaRegions(GLcontext *ctx, const struct gl_client_array *in
}
radeonAllocDmaRegion(&r300->radeon, &vbuf->attribs[index].bo, &vbuf->attribs[index].bo_offset, size, 32);
+ radeon_bo_map(vbuf->attribs[index].bo, 1);
assert(vbuf->attribs[index].bo->ptr != NULL);
dst = (uint32_t *)ADD_POINTERS(vbuf->attribs[index].bo->ptr, vbuf->attribs[index].bo_offset);
switch (vbuf->attribs[index].dwords) {
@@ -536,6 +546,7 @@ static void r300AllocDmaRegions(GLcontext *ctx, const struct gl_client_array *in
case 4: radeonEmitVec16(dst, input[i]->Ptr, input[i]->StrideB, local_count); break;
default: assert(0); break;
}
+ radeon_bo_unmap(vbuf->attribs[index].bo);
}
}
diff --git a/src/mesa/drivers/dri/r300/r300_emit.h b/src/mesa/drivers/dri/r300/r300_emit.h
index 8e57e354d1d..a456d8867c4 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.h
+++ b/src/mesa/drivers/dri/r300/r300_emit.h
@@ -42,7 +42,6 @@
#include "main/glheader.h"
#include "r300_context.h"
#include "r300_cmdbuf.h"
-#include "radeon_reg.h"
static INLINE uint32_t cmdpacket0(struct radeon_screen *rscrn,
int reg, int count)
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index 623da60333f..ea684e7df18 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -1789,6 +1789,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_ALU_DSTC_OUTPUT_X (1 << 26)
# define R300_ALU_DSTC_OUTPUT_Y (1 << 27)
# define R300_ALU_DSTC_OUTPUT_Z (1 << 28)
+# define R300_RGB_TARGET(x) ((x) << 29)
#define R300_US_ALU_ALPHA_ADDR_0 0x47C0
# define R300_ALU_SRC0A_SHIFT 0
@@ -1806,6 +1807,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_ALU_DSTA_REG (1 << 23)
# define R300_ALU_DSTA_OUTPUT (1 << 24)
# define R300_ALU_DSTA_DEPTH (1 << 27)
+# define R300_ALPHA_TARGET(x) ((x) << 25)
#define R300_US_ALU_RGB_INST_0 0x48C0
# define R300_ALU_ARGC_SRC0C_XYZ 0
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 3cd38753b8a..4ae593cbe79 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -67,8 +67,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "vbo/vbo_split.h"
#include "tnl/tnl.h"
#include "tnl/t_vp_build.h"
-#include "radeon_reg.h"
-#include "radeon_macros.h"
#include "r300_context.h"
#include "r300_ioctl.h"
#include "r300_state.h"
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c
index ee2c71e1a7f..383c8a274b5 100644
--- a/src/mesa/drivers/dri/r300/r300_swtcl.c
+++ b/src/mesa/drivers/dri/r300/r300_swtcl.c
@@ -124,7 +124,7 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_
}
if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) {
- VB->AttribPtr[VERT_ATTRIB_GENERIC0] = VB->ColorPtr[1];
+ VB->AttribPtr[VERT_ATTRIB_GENERIC0] = VB->BackfaceColorPtr;
OutputsWritten |= 1 << VERT_RESULT_BFC0;
#if MESA_LITTLE_ENDIAN
EMIT_ATTR( _TNL_ATTRIB_GENERIC0, EMIT_4UB_4F_RGBA );
@@ -134,7 +134,7 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_
ADD_ATTR(VERT_ATTRIB_GENERIC0, R300_DATA_TYPE_BYTE, SWTCL_OVM_COLOR2, SWIZZLE_XYZW, MASK_XYZW, 1);
#endif
if (fp_reads & FRAG_BIT_COL1) {
- VB->AttribPtr[VERT_ATTRIB_GENERIC1] = VB->SecondaryColorPtr[1];
+ VB->AttribPtr[VERT_ATTRIB_GENERIC1] = VB->BackfaceSecondaryColorPtr;
GLuint swiz = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_ONE);
OutputsWritten |= 1 << VERT_RESULT_BFC1;
#if MESA_LITTLE_ENDIAN
@@ -159,7 +159,7 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_
int tex_id = rmesa->selected_fp->wpos_attr - FRAG_ATTRIB_TEX0;
VB->AttribPtr[VERT_ATTRIB_TEX0 + tex_id] = VB->AttribPtr[VERT_ATTRIB_POS];
- VB->TexCoordPtr[tex_id] = VB->AttribPtr[VERT_ATTRIB_POS];
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + tex_id] = VB->AttribPtr[VERT_ATTRIB_POS];
RENDERINPUTS_SET(tnl->render_inputs_bitset, _TNL_ATTRIB_TEX0 + tex_id);
}
@@ -167,7 +167,7 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_
int tex_id = rmesa->selected_fp->fog_attr - FRAG_ATTRIB_TEX0;
VB->AttribPtr[VERT_ATTRIB_TEX0 + tex_id] = VB->AttribPtr[VERT_ATTRIB_FOG];
- VB->TexCoordPtr[tex_id] = VB->AttribPtr[VERT_ATTRIB_FOG];
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + tex_id] = VB->AttribPtr[VERT_ATTRIB_FOG];
RENDERINPUTS_SET(tnl->render_inputs_bitset, _TNL_ATTRIB_TEX0 + tex_id);
}
@@ -180,7 +180,7 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_
GLuint swiz, format, hw_format;
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
if (fp_reads & FRAG_BIT_TEX(i)) {
- switch (VB->TexCoordPtr[i]->size) {
+ switch (VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->size) {
case 1:
format = EMIT_1F;
hw_format = R300_DATA_TYPE_FLOAT_1;
@@ -665,11 +665,11 @@ void r300_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
r300EmitCacheFlush(rmesa);
radeonEmitState(&rmesa->radeon);
- r300_emit_scissor(ctx);
+ r300_emit_scissor(ctx);
r300EmitVertexAOS(rmesa,
- rmesa->radeon.swtcl.vertex_size,
- first_elem(&rmesa->radeon.dma.reserved)->bo,
- current_offset);
+ rmesa->radeon.swtcl.vertex_size,
+ rmesa->radeon.swtcl.bo,
+ current_offset);
r300EmitVbufPrim(rmesa,
rmesa->radeon.swtcl.hw_primitive,
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 27b78a912fa..726b3ff98e1 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -223,16 +223,7 @@ static void r300TexParameter(GLcontext * ctx, GLenum target,
case GL_TEXTURE_MAX_LEVEL:
case GL_TEXTURE_MIN_LOD:
case GL_TEXTURE_MAX_LOD:
- /* This isn't the most efficient solution but there doesn't appear to
- * be a nice alternative. Since there's no LOD clamping,
- * we just have to rely on loading the right subset of mipmap levels
- * to simulate a clamped LOD.
- */
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = 0;
- t->validated = GL_FALSE;
- }
+ t->validated = GL_FALSE;
break;
case GL_DEPTH_TEXTURE_MODE:
@@ -270,7 +261,11 @@ static void r300DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
if (rmesa) {
int i;
- radeon_firevertices(&rmesa->radeon);
+ struct radeon_bo *bo;
+ bo = !t->mt ? t->bo : t->mt->bo;
+ if (bo && radeon_bo_is_referenced_by_cs(bo, rmesa->radeon.cmdbuf.cs)) {
+ radeon_firevertices(&rmesa->radeon);
+ }
for(i = 0; i < R300_MAX_TEXTURE_UNITS; ++i)
if (rmesa->hw.textures[i] == t)
@@ -282,10 +277,8 @@ static void r300DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
t->bo = NULL;
}
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = 0;
- }
+ radeon_miptree_unreference(&t->mt);
+
_mesa_delete_texture_object(ctx, texObj);
}
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index 44ca24daf81..9eaf390b460 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -83,6 +83,7 @@ static const struct tx_table {
_ASSIGN(ARGB8888, R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8)),
_ASSIGN(ARGB8888_REV, R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)),
#endif
+ _ASSIGN(XRGB8888, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)),
_ASSIGN(RGB888, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)),
_ASSIGN(RGB565, R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5)),
_ASSIGN(RGB565_REV, R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5)),
@@ -202,9 +203,7 @@ void r300SetDepthTexMode(struct gl_texture_object *tObj)
static void setup_hardware_state(r300ContextPtr rmesa, radeonTexObj *t)
{
const struct gl_texture_image *firstImage;
- int firstlevel = t->mt ? t->mt->firstLevel : 0;
-
- firstImage = t->base.Image[0][firstlevel];
+ firstImage = t->base.Image[0][t->minLod];
if (!t->image_override
&& VALID_FORMAT(firstImage->TexFormat)) {
@@ -227,7 +226,7 @@ static void setup_hardware_state(r300ContextPtr rmesa, radeonTexObj *t)
t->pp_txsize = (((R300_TX_WIDTHMASK_MASK & ((firstImage->Width - 1) << R300_TX_WIDTHMASK_SHIFT)))
| ((R300_TX_HEIGHTMASK_MASK & ((firstImage->Height - 1) << R300_TX_HEIGHTMASK_SHIFT)))
| ((R300_TX_DEPTHMASK_MASK & ((firstImage->DepthLog2) << R300_TX_DEPTHMASK_SHIFT)))
- | ((R300_TX_MAX_MIP_LEVEL_MASK & ((t->mt->lastLevel - t->mt->firstLevel) << R300_TX_MAX_MIP_LEVEL_SHIFT))));
+ | ((R300_TX_MAX_MIP_LEVEL_MASK & ((t->maxLod - t->minLod) << R300_TX_MAX_MIP_LEVEL_SHIFT))));
t->tile_bits = 0;
@@ -238,7 +237,7 @@ static void setup_hardware_state(r300ContextPtr rmesa, radeonTexObj *t)
if (t->base.Target == GL_TEXTURE_RECTANGLE_NV) {
- unsigned int align = (64 / t->mt->bpp) - 1;
+ unsigned int align = (64 / _mesa_get_format_bytes(firstImage->TexFormat)) - 1;
t->pp_txsize |= R300_TX_SIZE_TXPITCH_EN;
if (!t->image_override)
t->pp_txpitch = ((firstImage->Width + align) & ~align) - 1;
@@ -410,18 +409,7 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
return;
}
- radeon_update_renderbuffers(pDRICtx, dPriv);
- /* back & depth buffer are useless free them right away */
- rb = (void*)rfb->base.Attachment[BUFFER_DEPTH].Renderbuffer;
- if (rb && rb->bo) {
- radeon_bo_unref(rb->bo);
- rb->bo = NULL;
- }
- rb = (void*)rfb->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer;
- if (rb && rb->bo) {
- radeon_bo_unref(rb->bo);
- rb->bo = NULL;
- }
+ radeon_update_renderbuffers(pDRICtx, dPriv, GL_TRUE);
rb = rfb->color_rb[0];
if (rb->bo == NULL) {
/* Failed to BO for the buffer */
@@ -437,14 +425,10 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
radeon_bo_unref(rImage->bo);
rImage->bo = NULL;
}
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = NULL;
- }
- if (rImage->mt) {
- radeon_miptree_unreference(rImage->mt);
- rImage->mt = NULL;
- }
+
+ 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;
diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c
index dbd233729c0..25314eff563 100644
--- a/src/mesa/drivers/dri/r600/r600_context.c
+++ b/src/mesa/drivers/dri/r600/r600_context.c
@@ -74,6 +74,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "utils.h"
#include "xmlpool.h" /* for symbolic values of enum-type options */
+//#define R600_ENABLE_GLSL_TEST 1
+
#define need_GL_VERSION_2_0
#define need_GL_ARB_occlusion_query
#define need_GL_ARB_point_parameters
@@ -109,6 +111,7 @@ static const struct dri_extension card_extensions[] = {
{"GL_ARB_texture_env_crossbar", NULL},
{"GL_ARB_texture_env_dot3", NULL},
{"GL_ARB_texture_mirrored_repeat", NULL},
+ {"GL_ARB_texture_non_power_of_two", NULL},
{"GL_ARB_vertex_program", GL_ARB_vertex_program_functions},
{"GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions},
{"GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions},
@@ -155,7 +158,11 @@ static const struct dri_extension mm_extensions[] = {
* functions added by GL_ATI_separate_stencil.
*/
static const struct dri_extension gl_20_extension[] = {
+#ifdef R600_ENABLE_GLSL_TEST
+ {"GL_ARB_shading_language_100", GL_VERSION_2_0_functions },
+#else
{"GL_VERSION_2_0", GL_VERSION_2_0_functions },
+#endif /* R600_ENABLE_GLSL_TEST */
};
static const struct tnl_pipeline_stage *r600_pipeline[] = {
@@ -308,6 +315,26 @@ static void r600InitGLExtensions(GLcontext *ctx)
if (r600->radeon.radeonScreen->kernel_mm)
driInitExtensions(ctx, mm_extensions, GL_FALSE);
+#ifdef R600_ENABLE_GLSL_TEST
+ driInitExtensions(ctx, gl_20_extension, GL_TRUE);
+ //_mesa_enable_2_0_extensions(ctx);
+ //1.5
+ ctx->Extensions.ARB_occlusion_query = GL_TRUE;
+ ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;
+ ctx->Extensions.EXT_shadow_funcs = GL_TRUE;
+ //2.0
+ ctx->Extensions.ARB_draw_buffers = GL_TRUE;
+ ctx->Extensions.ARB_point_sprite = GL_TRUE;
+ ctx->Extensions.ARB_shader_objects = GL_TRUE;
+ ctx->Extensions.ARB_vertex_shader = GL_TRUE;
+ ctx->Extensions.ARB_fragment_shader = GL_TRUE;
+ ctx->Extensions.EXT_blend_equation_separate = GL_TRUE;
+ ctx->Extensions.ATI_separate_stencil = GL_TRUE;
+
+ /* glsl compiler has problem if this is not GL_TRUE */
+ ctx->Shader.EmitCondCodes = GL_TRUE;
+#endif /* R600_ENABLE_GLSL_TEST */
+
if (driQueryOptionb
(&r600->radeon.optionCache, "disable_stencil_two_side"))
_mesa_disable_extension(ctx, "GL_EXT_stencil_two_side");
diff --git a/src/mesa/drivers/dri/r600/r600_reg_r6xx.h b/src/mesa/drivers/dri/r600/r600_reg_r6xx.h
index f7702c46de5..74af7b4fed7 100644
--- a/src/mesa/drivers/dri/r600/r600_reg_r6xx.h
+++ b/src/mesa/drivers/dri/r600/r600_reg_r6xx.h
@@ -415,11 +415,11 @@ enum {
ALPHA_TO_MASK_ENABLE = 1 << 0,
ALPHA_TO_MASK_OFFSET0_mask = 0x03 << 8,
ALPHA_TO_MASK_OFFSET0_shift = 8,
- ALPHA_TO_MASK_OFFSET1_mask = 0x03 << 8,
+ ALPHA_TO_MASK_OFFSET1_mask = 0x03 << 10,
ALPHA_TO_MASK_OFFSET1_shift = 10,
- ALPHA_TO_MASK_OFFSET2_mask = 0x03 << 8,
+ ALPHA_TO_MASK_OFFSET2_mask = 0x03 << 12,
ALPHA_TO_MASK_OFFSET2_shift = 12,
- ALPHA_TO_MASK_OFFSET3_mask = 0x03 << 8,
+ ALPHA_TO_MASK_OFFSET3_mask = 0x03 << 14,
ALPHA_TO_MASK_OFFSET3_shift = 14,
// SQ_VTX_CONSTANT_WORD2_0 = 0x00038008,
diff --git a/src/mesa/drivers/dri/r600/r600_reg_r7xx.h b/src/mesa/drivers/dri/r600/r600_reg_r7xx.h
index e5c01c861aa..eb169bd885d 100644
--- a/src/mesa/drivers/dri/r600/r600_reg_r7xx.h
+++ b/src/mesa/drivers/dri/r600/r600_reg_r7xx.h
@@ -143,6 +143,8 @@ enum {
// SQ_TEX_SAMPLER_MISC_0 = 0x0003d03c,
R7xx_TRUNCATE_COORD_bit = 1 << 9,
R7xx_DISABLE_CUBE_WRAP_bit = 1 << 10,
+// DB_RENDER_CONTROL = 0x00028d0c,
+ PERFECT_ZPASS_COUNTS_bit = 1 << 15,
} ;
diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c
index 20965bb3c84..9d83a64e220 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.c
+++ b/src/mesa/drivers/dri/r600/r600_tex.c
@@ -312,16 +312,7 @@ static void r600TexParameter(GLcontext * ctx, GLenum target,
case GL_TEXTURE_MAX_LEVEL:
case GL_TEXTURE_MIN_LOD:
case GL_TEXTURE_MAX_LOD:
- /* This isn't the most efficient solution but there doesn't appear to
- * be a nice alternative. Since there's no LOD clamping,
- * we just have to rely on loading the right subset of mipmap levels
- * to simulate a clamped LOD.
- */
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = 0;
- t->validated = GL_FALSE;
- }
+ t->validated = GL_FALSE;
break;
case GL_DEPTH_TEXTURE_MODE:
@@ -369,10 +360,8 @@ static void r600DeleteTexture(GLcontext * ctx, struct gl_texture_object *texObj)
t->bo = NULL;
}
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = 0;
- }
+ radeon_miptree_unreference(&t->mt);
+
_mesa_delete_texture_object(ctx, texObj);
}
diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c
index 27c8354923c..2a4a6e6ee14 100644
--- a/src/mesa/drivers/dri/r600/r600_texstate.c
+++ b/src/mesa/drivers/dri/r600/r600_texstate.c
@@ -649,7 +649,6 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex
{
radeonTexObj *t = radeon_tex_obj(texObj);
const struct gl_texture_image *firstImage;
- int firstlevel = t->mt ? t->mt->firstLevel : 0;
GLuint uTexelPitch, row_align;
if (rmesa->radeon.radeonScreen->driScreen->dri2.enabled &&
@@ -657,7 +656,7 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex
t->bo)
return;
- firstImage = t->base.Image[0][firstlevel];
+ firstImage = t->base.Image[0][t->minLod];
if (!t->image_override) {
if (!r600GetTexFormat(texObj, firstImage->TexFormat)) {
@@ -692,7 +691,8 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex
}
row_align = rmesa->radeon.texture_row_align - 1;
- uTexelPitch = ((firstImage->Width * t->mt->bpp + row_align) & ~row_align) / t->mt->bpp;
+ uTexelPitch = (_mesa_format_row_stride(firstImage->TexFormat, firstImage->Width) + row_align) & ~row_align;
+ uTexelPitch = uTexelPitch / _mesa_get_format_bytes(firstImage->TexFormat);
uTexelPitch = (uTexelPitch + R700_TEXEL_PITCH_ALIGNMENT_MASK)
& ~R700_TEXEL_PITCH_ALIGNMENT_MASK;
@@ -706,10 +706,10 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex
SETfield(t->SQ_TEX_RESOURCE1, firstImage->Height - 1,
TEX_HEIGHT_shift, TEX_HEIGHT_mask);
- if ((t->mt->lastLevel - t->mt->firstLevel) > 0) {
- t->SQ_TEX_RESOURCE3 = t->mt->levels[0].size / 256;
- SETfield(t->SQ_TEX_RESOURCE4, t->mt->firstLevel, BASE_LEVEL_shift, BASE_LEVEL_mask);
- SETfield(t->SQ_TEX_RESOURCE5, t->mt->lastLevel, LAST_LEVEL_shift, LAST_LEVEL_mask);
+ if ((t->maxLod - t->minLod) > 0) {
+ t->SQ_TEX_RESOURCE3 = t->mt->levels[t->minLod].size / 256;
+ SETfield(t->SQ_TEX_RESOURCE4, 0, BASE_LEVEL_shift, BASE_LEVEL_mask);
+ SETfield(t->SQ_TEX_RESOURCE5, t->maxLod - t->minLod, LAST_LEVEL_shift, LAST_LEVEL_mask);
}
}
@@ -808,9 +808,8 @@ void r600SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
struct gl_texture_object *tObj =
_mesa_lookup_texture(rmesa->radeon.glCtx, texname);
radeonTexObjPtr t = radeon_tex_obj(tObj);
- int firstlevel = t->mt ? t->mt->firstLevel : 0;
const struct gl_texture_image *firstImage;
- uint32_t pitch_val, size, row_align, bpp;
+ uint32_t pitch_val, size, row_align;
if (!tObj)
return;
@@ -820,13 +819,9 @@ void r600SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
if (!offset)
return;
- bpp = depth / 8;
- if (bpp == 3)
- bpp = 4;
-
- firstImage = t->base.Image[0][firstlevel];
+ firstImage = t->base.Image[0][t->minLod];
row_align = rmesa->radeon.texture_row_align - 1;
- size = ((firstImage->Width * bpp + row_align) & ~row_align) * firstImage->Height;
+ size = ((_mesa_format_row_stride(firstImage->TexFormat, firstImage->Width) + row_align) & ~row_align) * firstImage->Height;
if (t->bo) {
radeon_bo_unref(t->bo);
t->bo = NULL;
@@ -922,18 +917,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
return;
}
- radeon_update_renderbuffers(pDRICtx, dPriv);
- /* back & depth buffer are useless free them right away */
- rb = (void*)rfb->base.Attachment[BUFFER_DEPTH].Renderbuffer;
- if (rb && rb->bo) {
- radeon_bo_unref(rb->bo);
- rb->bo = NULL;
- }
- rb = (void*)rfb->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer;
- if (rb && rb->bo) {
- radeon_bo_unref(rb->bo);
- rb->bo = NULL;
- }
+ radeon_update_renderbuffers(pDRICtx, dPriv, GL_TRUE);
rb = rfb->color_rb[0];
if (rb->bo == NULL) {
/* Failed to BO for the buffer */
@@ -949,14 +933,10 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
radeon_bo_unref(rImage->bo);
rImage->bo = NULL;
}
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = NULL;
- }
- if (rImage->mt) {
- radeon_miptree_unreference(rImage->mt);
- rImage->mt = NULL;
- }
+
+ 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;
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 917318c02ab..309c90fdd0c 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -38,6 +38,9 @@
#include "r700_assembler.h"
+#define USE_CF_FOR_CONTINUE_BREAK 1
+#define USE_CF_FOR_POP_AFTER 1
+
BITS addrmode_PVSDST(PVSDST * pPVSDST)
{
return pPVSDST->addrmode0 | ((BITS)pPVSDST->addrmode1 << 1);
@@ -337,12 +340,17 @@ unsigned int r700GetNumOperands(r700_AssemblerBase* pAsm)
switch (pAsm->D.dst.opcode)
{
case SQ_OP2_INST_ADD:
+ case SQ_OP2_INST_KILLE:
case SQ_OP2_INST_KILLGT:
+ case SQ_OP2_INST_KILLGE:
+ case SQ_OP2_INST_KILLNE:
case SQ_OP2_INST_MUL:
case SQ_OP2_INST_MAX:
case SQ_OP2_INST_MIN:
//case SQ_OP2_INST_MAX_DX10:
//case SQ_OP2_INST_MIN_DX10:
+ case SQ_OP2_INST_SETE:
+ case SQ_OP2_INST_SETNE:
case SQ_OP2_INST_SETGT:
case SQ_OP2_INST_SETGE:
case SQ_OP2_INST_PRED_SETE:
@@ -358,6 +366,7 @@ unsigned int r700GetNumOperands(r700_AssemblerBase* pAsm)
case SQ_OP2_INST_MOVA_FLOOR:
case SQ_OP2_INST_FRACT:
case SQ_OP2_INST_FLOOR:
+ case SQ_OP2_INST_TRUNC:
case SQ_OP2_INST_EXP_IEEE:
case SQ_OP2_INST_LOG_CLAMPED:
case SQ_OP2_INST_LOG_IEEE:
@@ -383,98 +392,115 @@ int Init_r700_AssemblerBase(SHADER_PIPE_TYPE spt, r700_AssemblerBase* pAsm, R700
pAsm->pR700Shader = pShader;
pAsm->currentShaderType = spt;
- pAsm->cf_last_export_ptr = NULL;
+ pAsm->cf_last_export_ptr = NULL;
- pAsm->cf_current_export_clause_ptr = NULL;
- pAsm->cf_current_alu_clause_ptr = NULL;
- pAsm->cf_current_tex_clause_ptr = NULL;
- pAsm->cf_current_vtx_clause_ptr = NULL;
- pAsm->cf_current_cf_clause_ptr = NULL;
+ pAsm->cf_current_export_clause_ptr = NULL;
+ pAsm->cf_current_alu_clause_ptr = NULL;
+ pAsm->cf_current_tex_clause_ptr = NULL;
+ pAsm->cf_current_vtx_clause_ptr = NULL;
+ pAsm->cf_current_cf_clause_ptr = NULL;
- // No clause has been created yet
- pAsm->cf_current_clause_type = CF_EMPTY_CLAUSE;
+ // No clause has been created yet
+ pAsm->cf_current_clause_type = CF_EMPTY_CLAUSE;
- pAsm->number_of_colorandz_exports = 0;
- pAsm->number_of_exports = 0;
- pAsm->number_of_export_opcodes = 0;
+ pAsm->number_of_colorandz_exports = 0;
+ pAsm->number_of_exports = 0;
+ pAsm->number_of_export_opcodes = 0;
+ pAsm->alu_x_opcode = 0;
- pAsm->D.bits = 0;
- pAsm->S[0].bits = 0;
- pAsm->S[1].bits = 0;
- pAsm->S[2].bits = 0;
+ pAsm->D2.bits = 0;
- pAsm->uLastPosUpdate = 0;
+ pAsm->D.bits = 0;
+ pAsm->S[0].bits = 0;
+ pAsm->S[1].bits = 0;
+ pAsm->S[2].bits = 0;
+
+ pAsm->uLastPosUpdate = 0;
- *(BITS *) &pAsm->fp_stOutFmt0 = 0;
+ *(BITS *) &pAsm->fp_stOutFmt0 = 0;
- pAsm->uIIns = 0;
- pAsm->uOIns = 0;
- pAsm->number_used_registers = 0;
- pAsm->uUsedConsts = 256;
+ pAsm->uIIns = 0;
+ pAsm->uOIns = 0;
+ pAsm->number_used_registers = 0;
+ pAsm->uUsedConsts = 256;
- // Fragment programs
- pAsm->uBoolConsts = 0;
- pAsm->uIntConsts = 0;
- pAsm->uInsts = 0;
- pAsm->uConsts = 0;
+ // Fragment programs
+ pAsm->uBoolConsts = 0;
+ pAsm->uIntConsts = 0;
+ pAsm->uInsts = 0;
+ pAsm->uConsts = 0;
- pAsm->FCSP = 0;
- pAsm->fc_stack[0].type = FC_NONE;
+ pAsm->FCSP = 0;
+ pAsm->fc_stack[0].type = FC_NONE;
- pAsm->branch_depth = 0;
- pAsm->max_branch_depth = 0;
+ pAsm->aArgSubst[0] =
+ pAsm->aArgSubst[1] =
+ pAsm->aArgSubst[2] =
+ pAsm->aArgSubst[3] = (-1);
- pAsm->aArgSubst[0] =
- pAsm->aArgSubst[1] =
- pAsm->aArgSubst[2] =
- pAsm->aArgSubst[3] = (-1);
+ pAsm->uOutputs = 0;
- pAsm->uOutputs = 0;
+ for (i=0; i<NUMBER_OF_OUTPUT_COLORS; i++)
+ {
+ pAsm->color_export_register_number[i] = (-1);
+ }
- for (i=0; i<NUMBER_OF_OUTPUT_COLORS; i++)
- {
- pAsm->color_export_register_number[i] = (-1);
- }
+ pAsm->depth_export_register_number = (-1);
+ pAsm->stencil_export_register_number = (-1);
+ pAsm->coverage_to_mask_export_register_number = (-1);
+ pAsm->mask_export_register_number = (-1);
- pAsm->depth_export_register_number = (-1);
- pAsm->stencil_export_register_number = (-1);
- pAsm->coverage_to_mask_export_register_number = (-1);
- pAsm->mask_export_register_number = (-1);
+ pAsm->starting_export_register_number = 0;
+ pAsm->starting_vfetch_register_number = 0;
+ pAsm->starting_temp_register_number = 0;
+ pAsm->uFirstHelpReg = 0;
- pAsm->starting_export_register_number = 0;
- pAsm->starting_vfetch_register_number = 0;
- pAsm->starting_temp_register_number = 0;
- pAsm->uFirstHelpReg = 0;
+ pAsm->input_position_is_used = GL_FALSE;
+ pAsm->input_normal_is_used = GL_FALSE;
+ for (i=0; i<NUMBER_OF_INPUT_COLORS; i++)
+ {
+ pAsm->input_color_is_used[ i ] = GL_FALSE;
+ }
- pAsm->input_position_is_used = GL_FALSE;
- pAsm->input_normal_is_used = GL_FALSE;
+ for (i=0; i<NUMBER_OF_TEXTURE_UNITS; i++)
+ {
+ pAsm->input_texture_unit_is_used[ i ] = GL_FALSE;
+ }
+ for (i=0; i<VERT_ATTRIB_MAX; i++)
+ {
+ pAsm->vfetch_instruction_ptr_array[ i ] = NULL;
+ }
- for (i=0; i<NUMBER_OF_INPUT_COLORS; i++)
- {
- pAsm->input_color_is_used[ i ] = GL_FALSE;
- }
+ pAsm->number_of_inputs = 0;
- for (i=0; i<NUMBER_OF_TEXTURE_UNITS; i++)
- {
- pAsm->input_texture_unit_is_used[ i ] = GL_FALSE;
- }
+ pAsm->is_tex = GL_FALSE;
+ pAsm->need_tex_barrier = GL_FALSE;
- for (i=0; i<VERT_ATTRIB_MAX; i++)
- {
- pAsm->vfetch_instruction_ptr_array[ i ] = NULL;
- }
+ pAsm->subs = NULL;
+ pAsm->unSubArraySize = 0;
+ pAsm->unSubArrayPointer = 0;
+ pAsm->callers = NULL;
+ pAsm->unCallerArraySize = 0;
+ pAsm->unCallerArrayPointer = 0;
+
+ pAsm->CALLSP = 0;
+ pAsm->CALLSTACK[0].FCSP_BeforeEntry = 0;
+ pAsm->CALLSTACK[0].plstCFInstructions_local
+ = &(pAsm->pR700Shader->lstCFInstructions);
- pAsm->number_of_inputs = 0;
+ pAsm->CALLSTACK[0].max = 0;
+ pAsm->CALLSTACK[0].current = 0;
- pAsm->is_tex = GL_FALSE;
- pAsm->need_tex_barrier = GL_FALSE;
+ SetActiveCFlist(pAsm->pR700Shader, pAsm->CALLSTACK[0].plstCFInstructions_local);
- return 0;
+ pAsm->unCFflags = 0;
+
+ return 0;
}
GLboolean IsTex(gl_inst_opcode Opcode)
@@ -592,6 +618,31 @@ int check_current_clause(r700_AssemblerBase* pAsm,
return GL_TRUE;
}
+GLboolean add_cf_instruction(r700_AssemblerBase* pAsm)
+{
+ if(GL_FALSE == check_current_clause(pAsm, CF_OTHER_CLAUSE))
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->cf_current_cf_clause_ptr =
+ (R700ControlFlowGenericClause*) CALLOC_STRUCT(R700ControlFlowGenericClause);
+
+ if (pAsm->cf_current_cf_clause_ptr != NULL)
+ {
+ Init_R700ControlFlowGenericClause(pAsm->cf_current_cf_clause_ptr);
+ AddCFInstruction( pAsm->pR700Shader,
+ (R700ControlFlowInstruction *)pAsm->cf_current_cf_clause_ptr );
+ }
+ else
+ {
+ radeon_error("Could not allocate a new VFetch CF instruction.\n");
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
GLboolean add_vfetch_instruction(r700_AssemblerBase* pAsm,
R700VertexInstruction* vertex_instruction_ptr)
{
@@ -987,7 +1038,8 @@ GLboolean checkop2(r700_AssemblerBase* pAsm)
checkop_init(pAsm);
- if( (pILInst->SrcReg[0].File == PROGRAM_CONSTANT) ||
+ if( (pILInst->SrcReg[0].File == PROGRAM_UNIFORM) ||
+ (pILInst->SrcReg[0].File == PROGRAM_CONSTANT) ||
(pILInst->SrcReg[0].File == PROGRAM_LOCAL_PARAM) ||
(pILInst->SrcReg[0].File == PROGRAM_ENV_PARAM) ||
(pILInst->SrcReg[0].File == PROGRAM_STATE_VAR) )
@@ -998,7 +1050,8 @@ GLboolean checkop2(r700_AssemblerBase* pAsm)
{
bSrcConst[0] = GL_FALSE;
}
- if( (pILInst->SrcReg[1].File == PROGRAM_CONSTANT) ||
+ if( (pILInst->SrcReg[1].File == PROGRAM_UNIFORM) ||
+ (pILInst->SrcReg[1].File == PROGRAM_CONSTANT) ||
(pILInst->SrcReg[1].File == PROGRAM_LOCAL_PARAM) ||
(pILInst->SrcReg[1].File == PROGRAM_ENV_PARAM) ||
(pILInst->SrcReg[1].File == PROGRAM_STATE_VAR) )
@@ -1031,7 +1084,8 @@ GLboolean checkop3(r700_AssemblerBase* pAsm)
checkop_init(pAsm);
- if( (pILInst->SrcReg[0].File == PROGRAM_CONSTANT) ||
+ if( (pILInst->SrcReg[0].File == PROGRAM_UNIFORM) ||
+ (pILInst->SrcReg[0].File == PROGRAM_CONSTANT) ||
(pILInst->SrcReg[0].File == PROGRAM_LOCAL_PARAM) ||
(pILInst->SrcReg[0].File == PROGRAM_ENV_PARAM) ||
(pILInst->SrcReg[0].File == PROGRAM_STATE_VAR) )
@@ -1042,7 +1096,8 @@ GLboolean checkop3(r700_AssemblerBase* pAsm)
{
bSrcConst[0] = GL_FALSE;
}
- if( (pILInst->SrcReg[1].File == PROGRAM_CONSTANT) ||
+ if( (pILInst->SrcReg[1].File == PROGRAM_UNIFORM) ||
+ (pILInst->SrcReg[1].File == PROGRAM_CONSTANT) ||
(pILInst->SrcReg[1].File == PROGRAM_LOCAL_PARAM) ||
(pILInst->SrcReg[1].File == PROGRAM_ENV_PARAM) ||
(pILInst->SrcReg[1].File == PROGRAM_STATE_VAR) )
@@ -1053,7 +1108,8 @@ GLboolean checkop3(r700_AssemblerBase* pAsm)
{
bSrcConst[1] = GL_FALSE;
}
- if( (pILInst->SrcReg[2].File == PROGRAM_CONSTANT) ||
+ if( (pILInst->SrcReg[2].File == PROGRAM_UNIFORM) ||
+ (pILInst->SrcReg[2].File == PROGRAM_CONSTANT) ||
(pILInst->SrcReg[2].File == PROGRAM_LOCAL_PARAM) ||
(pILInst->SrcReg[2].File == PROGRAM_ENV_PARAM) ||
(pILInst->SrcReg[2].File == PROGRAM_STATE_VAR) )
@@ -1153,6 +1209,7 @@ GLboolean assemble_src(r700_AssemblerBase *pAsm,
case PROGRAM_LOCAL_PARAM:
case PROGRAM_ENV_PARAM:
case PROGRAM_STATE_VAR:
+ case PROGRAM_UNIFORM:
if (1 == pILInst->SrcReg[src].RelAddr)
{
setaddrmode_PVSSRC(&(pAsm->S[fld].src), ADDR_RELATIVE_A0);
@@ -1166,7 +1223,7 @@ GLboolean assemble_src(r700_AssemblerBase *pAsm,
pAsm->S[fld].src.reg = pILInst->SrcReg[src].Index;
break;
case PROGRAM_INPUT:
- setaddrmode_PVSSRC(&(pAsm->S[fld].src), ADDR_ABSOLUTE);
+ setaddrmode_PVSSRC(&(pAsm->S[fld].src), ADDR_ABSOLUTE);
pAsm->S[fld].src.rtype = SRC_REG_INPUT;
switch (pAsm->currentShaderType)
{
@@ -1179,7 +1236,7 @@ GLboolean assemble_src(r700_AssemblerBase *pAsm,
}
break;
default:
- radeon_error("Invalid source argument type\n");
+ radeon_error("Invalid source argument type : %d \n", pILInst->SrcReg[src].File);
return GL_FALSE;
}
}
@@ -1294,6 +1351,7 @@ GLboolean tex_src(r700_AssemblerBase *pAsm)
else
{
switch (pILInst->SrcReg[0].File) {
+ case PROGRAM_UNIFORM:
case PROGRAM_CONSTANT:
case PROGRAM_LOCAL_PARAM:
case PROGRAM_ENV_PARAM:
@@ -1315,7 +1373,7 @@ GLboolean tex_src(r700_AssemblerBase *pAsm)
case FRAG_ATTRIB_TEX0:
case FRAG_ATTRIB_TEX1:
case FRAG_ATTRIB_TEX2:
- case FRAG_ATTRIB_TEX3:
+ case FRAG_ATTRIB_TEX3:
case FRAG_ATTRIB_TEX4:
case FRAG_ATTRIB_TEX5:
case FRAG_ATTRIB_TEX6:
@@ -1331,10 +1389,17 @@ GLboolean tex_src(r700_AssemblerBase *pAsm)
case FRAG_ATTRIB_PNTC:
fprintf(stderr, "FRAG_ATTRIB_PNTC unsupported\n");
break;
- case FRAG_ATTRIB_VAR0:
- fprintf(stderr, "FRAG_ATTRIB_VAR0 unsupported\n");
- break;
}
+
+ if( (pILInst->SrcReg[0].Index >= FRAG_ATTRIB_VAR0) ||
+ (pILInst->SrcReg[0].Index < FRAG_ATTRIB_MAX) )
+ {
+ bValidTexCoord = GL_TRUE;
+ pAsm->S[0].src.reg =
+ pAsm->uiFP_AttributeMap[pILInst->SrcReg[0].Index];
+ pAsm->S[0].src.rtype = SRC_REG_INPUT;
+ }
+
break;
}
}
@@ -1517,6 +1582,10 @@ GLboolean assemble_alu_src(R700ALUInstruction* alu_instruction_ptr,
{
src_sel = pSource->reg + CFILE_REGISTER_OFFSET;
}
+ else if (pSource->rtype == SRC_REC_LITERAL)
+ {
+ src_sel = SQ_ALU_SRC_LITERAL;
+ }
else
{
radeon_error("Source (%d) register type (%d) not one of TEMP, INPUT, or CONSTANT.\n",
@@ -1606,7 +1675,8 @@ GLboolean add_alu_instruction(r700_AssemblerBase* pAsm,
return GL_FALSE;
}
- if ( pAsm->cf_current_alu_clause_ptr == NULL ||
+ if ( pAsm->alu_x_opcode != 0 ||
+ pAsm->cf_current_alu_clause_ptr == NULL ||
( (pAsm->cf_current_alu_clause_ptr != NULL) &&
(pAsm->cf_current_alu_clause_ptr->m_Word1.f.count >= (GetCFMaxInstructions(pAsm->cf_current_alu_clause_ptr->m_ShaderInstType)-contiguous_slots_needed-1) )
) )
@@ -1636,9 +1706,17 @@ GLboolean add_alu_instruction(r700_AssemblerBase* pAsm,
pAsm->cf_current_alu_clause_ptr->m_Word1.f.kcache_addr0 = 0x0;
pAsm->cf_current_alu_clause_ptr->m_Word1.f.kcache_addr1 = 0x0;
- //cf_current_alu_clause_ptr->m_Word1.f.count = number_of_scalar_operations - 1;
pAsm->cf_current_alu_clause_ptr->m_Word1.f.count = 0x0;
- pAsm->cf_current_alu_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_ALU;
+
+ if(pAsm->alu_x_opcode != 0)
+ {
+ pAsm->cf_current_alu_clause_ptr->m_Word1.f.cf_inst = pAsm->alu_x_opcode;
+ pAsm->alu_x_opcode = 0;
+ }
+ else
+ {
+ pAsm->cf_current_alu_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_ALU;
+ }
pAsm->cf_current_alu_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
@@ -2045,7 +2123,7 @@ GLboolean check_vector(r700_AssemblerBase* pAsm,
if( is_gpr(sel) )
{
if( GL_FALSE == cycle_for_vector_bank_swizzle(bank_swizzle, src, &cycle) )
- {
+ {
return GL_FALSE;
}
@@ -2057,7 +2135,7 @@ GLboolean check_vector(r700_AssemblerBase* pAsm,
else
{
if( GL_FALSE == reserve_gpr(pAsm, sel, chan, cycle) )
- {
+ {
return GL_FALSE;
}
}
@@ -2069,7 +2147,7 @@ GLboolean check_vector(r700_AssemblerBase* pAsm,
if( is_cfile(sel) )
{
if( GL_FALSE == reserve_cfile(pAsm, sel, chan) )
- {
+ {
return GL_FALSE;
}
}
@@ -2172,7 +2250,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
current_source_index,
pcurrent_source,
scalar_channel_index) )
- {
+ {
return GL_FALSE;
}
@@ -2186,7 +2264,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
current_source_index,
pcurrent_source,
scalar_channel_index) )
- {
+ {
return GL_FALSE;
}
}
@@ -2215,7 +2293,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
alu_instruction_ptr->m_Word1.f.dst_gpr = pAsm->D.dst.reg;
}
else
- {
+ {
radeon_error("Only temp destination registers supported for ALU dest regs.\n");
return GL_FALSE;
}
@@ -2329,6 +2407,253 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
}
if(GL_FALSE == add_alu_instruction(pAsm, alu_instruction_ptr, contiguous_slots_needed) )
+ {
+ return GL_FALSE;
+ }
+
+ /*
+ * Judge the type of current instruction, is it vector or scalar
+ * instruction.
+ */
+ if (is_single_scalar_operation)
+ {
+ if(GL_FALSE == check_scalar(pAsm, alu_instruction_ptr) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ if(GL_FALSE == check_vector(pAsm, alu_instruction_ptr) )
+ {
+ return GL_FALSE;
+ }
+ }
+
+ contiguous_slots_needed = 0;
+ }
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_alu_instruction2(r700_AssemblerBase *pAsm)
+{
+ GLuint number_of_scalar_operations;
+ GLboolean is_single_scalar_operation;
+ GLuint scalar_channel_index;
+
+ PVSSRC * pcurrent_source;
+ int current_source_index;
+ GLuint contiguous_slots_needed;
+
+ GLuint uNumSrc = r700GetNumOperands(pAsm);
+
+ GLboolean bSplitInst = GL_FALSE;
+
+ if (1 == pAsm->D.dst.math)
+ {
+ is_single_scalar_operation = GL_TRUE;
+ number_of_scalar_operations = 1;
+ }
+ else
+ {
+ is_single_scalar_operation = GL_FALSE;
+ number_of_scalar_operations = 4;
+ }
+
+ contiguous_slots_needed = 0;
+
+ if(GL_TRUE == is_reduction_opcode(&(pAsm->D)) )
+ {
+ contiguous_slots_needed = 4;
+ }
+
+ initialize(pAsm);
+
+ for (scalar_channel_index=0;
+ scalar_channel_index < number_of_scalar_operations;
+ scalar_channel_index++)
+ {
+ R700ALUInstruction* alu_instruction_ptr = (R700ALUInstruction*) CALLOC_STRUCT(R700ALUInstruction);
+ if (alu_instruction_ptr == NULL)
+ {
+ return GL_FALSE;
+ }
+ Init_R700ALUInstruction(alu_instruction_ptr);
+
+ //src 0
+ current_source_index = 0;
+ pcurrent_source = &(pAsm->S[0].src);
+
+ if (GL_FALSE == assemble_alu_src(alu_instruction_ptr,
+ current_source_index,
+ pcurrent_source,
+ scalar_channel_index) )
+ {
+ return GL_FALSE;
+ }
+
+ if (uNumSrc > 1)
+ {
+ // Process source 1
+ current_source_index = 1;
+ pcurrent_source = &(pAsm->S[current_source_index].src);
+
+ if (GL_FALSE == assemble_alu_src(alu_instruction_ptr,
+ current_source_index,
+ pcurrent_source,
+ scalar_channel_index) )
+ {
+ return GL_FALSE;
+ }
+ }
+
+ //other bits
+ alu_instruction_ptr->m_Word0.f.index_mode = SQ_INDEX_LOOP;
+
+ if( (is_single_scalar_operation == GL_TRUE)
+ || (GL_TRUE == bSplitInst) )
+ {
+ alu_instruction_ptr->m_Word0.f.last = 1;
+ }
+ else
+ {
+ alu_instruction_ptr->m_Word0.f.last = (scalar_channel_index == 3) ? 1 : 0;
+ }
+
+ alu_instruction_ptr->m_Word0.f.pred_sel = (pAsm->D.dst.pred_inv > 0) ? 1 : 0;
+ if(1 == pAsm->D.dst.predicated)
+ {
+ alu_instruction_ptr->m_Word1_OP2.f.update_pred = 0x1;
+ alu_instruction_ptr->m_Word1_OP2.f.update_execute_mask = 0x1;
+ }
+ else
+ {
+ alu_instruction_ptr->m_Word1_OP2.f.update_pred = 0x0;
+ alu_instruction_ptr->m_Word1_OP2.f.update_execute_mask = 0x0;
+ }
+
+ // dst
+ if( (pAsm->D.dst.rtype == DST_REG_TEMPORARY) ||
+ (pAsm->D.dst.rtype == DST_REG_OUT) )
+ {
+ alu_instruction_ptr->m_Word1.f.dst_gpr = pAsm->D.dst.reg;
+ }
+ else
+ {
+ radeon_error("Only temp destination registers supported for ALU dest regs.\n");
+ return GL_FALSE;
+ }
+
+ alu_instruction_ptr->m_Word1.f.dst_rel = SQ_ABSOLUTE; //D.rtype
+
+ if ( is_single_scalar_operation == GL_TRUE )
+ {
+ // Override scalar_channel_index since only one scalar value will be written
+ if(pAsm->D.dst.writex)
+ {
+ scalar_channel_index = 0;
+ }
+ else if(pAsm->D.dst.writey)
+ {
+ scalar_channel_index = 1;
+ }
+ else if(pAsm->D.dst.writez)
+ {
+ scalar_channel_index = 2;
+ }
+ else if(pAsm->D.dst.writew)
+ {
+ scalar_channel_index = 3;
+ }
+ }
+
+ alu_instruction_ptr->m_Word1.f.dst_chan = scalar_channel_index;
+
+ alu_instruction_ptr->m_Word1.f.clamp = pAsm->D2.dst2.SaturateMode;
+
+ if (pAsm->D.dst.op3)
+ {
+ //op3
+
+ alu_instruction_ptr->m_Word1_OP3.f.alu_inst = pAsm->D.dst.opcode;
+
+ //There's 3rd src for op3
+ current_source_index = 2;
+ pcurrent_source = &(pAsm->S[current_source_index].src);
+
+ if ( GL_FALSE == assemble_alu_src(alu_instruction_ptr,
+ current_source_index,
+ pcurrent_source,
+ scalar_channel_index) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ //op2
+ if (pAsm->bR6xx)
+ {
+ alu_instruction_ptr->m_Word1_OP2.f6.alu_inst = pAsm->D.dst.opcode;
+
+ alu_instruction_ptr->m_Word1_OP2.f6.src0_abs = 0x0;
+ alu_instruction_ptr->m_Word1_OP2.f6.src1_abs = 0x0;
+
+ //alu_instruction_ptr->m_Word1_OP2.f6.update_execute_mask = 0x0;
+ //alu_instruction_ptr->m_Word1_OP2.f6.update_pred = 0x0;
+ switch (scalar_channel_index)
+ {
+ case 0:
+ alu_instruction_ptr->m_Word1_OP2.f6.write_mask = pAsm->D.dst.writex;
+ break;
+ case 1:
+ alu_instruction_ptr->m_Word1_OP2.f6.write_mask = pAsm->D.dst.writey;
+ break;
+ case 2:
+ alu_instruction_ptr->m_Word1_OP2.f6.write_mask = pAsm->D.dst.writez;
+ break;
+ case 3:
+ alu_instruction_ptr->m_Word1_OP2.f6.write_mask = pAsm->D.dst.writew;
+ break;
+ default:
+ alu_instruction_ptr->m_Word1_OP2.f6.write_mask = 1; //SQ_SEL_MASK;
+ break;
+ }
+ alu_instruction_ptr->m_Word1_OP2.f6.omod = SQ_ALU_OMOD_OFF;
+ }
+ else
+ {
+ alu_instruction_ptr->m_Word1_OP2.f.alu_inst = pAsm->D.dst.opcode;
+
+ alu_instruction_ptr->m_Word1_OP2.f.src0_abs = 0x0;
+ alu_instruction_ptr->m_Word1_OP2.f.src1_abs = 0x0;
+
+ //alu_instruction_ptr->m_Word1_OP2.f.update_execute_mask = 0x0;
+ //alu_instruction_ptr->m_Word1_OP2.f.update_pred = 0x0;
+ switch (scalar_channel_index)
+ {
+ case 0:
+ alu_instruction_ptr->m_Word1_OP2.f.write_mask = pAsm->D.dst.writex;
+ break;
+ case 1:
+ alu_instruction_ptr->m_Word1_OP2.f.write_mask = pAsm->D.dst.writey;
+ break;
+ case 2:
+ alu_instruction_ptr->m_Word1_OP2.f.write_mask = pAsm->D.dst.writez;
+ break;
+ case 3:
+ alu_instruction_ptr->m_Word1_OP2.f.write_mask = pAsm->D.dst.writew;
+ break;
+ default:
+ alu_instruction_ptr->m_Word1_OP2.f.write_mask = 1; //SQ_SEL_MASK;
+ break;
+ }
+ alu_instruction_ptr->m_Word1_OP2.f.omod = SQ_ALU_OMOD_OFF;
+ }
+ }
+
+ if(GL_FALSE == add_alu_instruction(pAsm, alu_instruction_ptr, contiguous_slots_needed) )
{
return GL_FALSE;
}
@@ -2348,7 +2673,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
{
if(GL_FALSE == check_vector(pAsm, alu_instruction_ptr) )
{
- return 1;
+ return GL_FALSE;
}
}
@@ -2358,6 +2683,259 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
+GLboolean assemble_alu_instruction_literal(r700_AssemblerBase *pAsm, GLfloat * pLiteral)
+{
+ R700ALUInstruction * alu_instruction_ptr;
+ R700ALUInstructionHalfLiteral * alu_instruction_ptr_hl;
+ R700ALUInstructionFullLiteral * alu_instruction_ptr_fl;
+
+ GLuint number_of_scalar_operations;
+ GLboolean is_single_scalar_operation;
+ GLuint scalar_channel_index;
+
+ GLuint contiguous_slots_needed;
+ GLuint lastInstruction;
+ GLuint not_masked[4];
+
+ GLuint uNumSrc = r700GetNumOperands(pAsm);
+
+ GLboolean bSplitInst = GL_FALSE;
+
+ number_of_scalar_operations = 0;
+ contiguous_slots_needed = 0;
+
+ if(1 == pAsm->D.dst.writew)
+ {
+ lastInstruction = 3;
+ number_of_scalar_operations++;
+ not_masked[3] = 1;
+ }
+ else
+ {
+ not_masked[3] = 0;
+ }
+ if(1 == pAsm->D.dst.writez)
+ {
+ lastInstruction = 2;
+ number_of_scalar_operations++;
+ not_masked[2] = 1;
+ }
+ else
+ {
+ not_masked[2] = 0;
+ }
+ if(1 == pAsm->D.dst.writey)
+ {
+ lastInstruction = 1;
+ number_of_scalar_operations++;
+ not_masked[1] = 1;
+ }
+ else
+ {
+ not_masked[1] = 0;
+ }
+ if(1 == pAsm->D.dst.writex)
+ {
+ lastInstruction = 0;
+ number_of_scalar_operations++;
+ not_masked[0] = 1;
+ }
+ else
+ {
+ not_masked[0] = 0;
+ }
+
+ if(GL_TRUE == is_reduction_opcode(&(pAsm->D)) )
+ {
+ contiguous_slots_needed = 4;
+ }
+ else
+ {
+ contiguous_slots_needed = number_of_scalar_operations;
+ }
+
+ if(1 == pAsm->D2.dst2.literal)
+ {
+ contiguous_slots_needed += 1;
+ }
+ else if(2 == pAsm->D2.dst2.literal)
+ {
+ contiguous_slots_needed += 2;
+ }
+
+ initialize(pAsm);
+
+ for (scalar_channel_index=0; scalar_channel_index < 4; scalar_channel_index++)
+ {
+ if(0 == not_masked[scalar_channel_index])
+ {
+ continue;
+ }
+
+ if(scalar_channel_index == lastInstruction)
+ {
+ switch (pAsm->D2.dst2.literal)
+ {
+ case 0:
+ alu_instruction_ptr = (R700ALUInstruction*) CALLOC_STRUCT(R700ALUInstruction);
+ if (alu_instruction_ptr == NULL)
+ {
+ return GL_FALSE;
+ }
+ Init_R700ALUInstruction(alu_instruction_ptr);
+ break;
+ case 1:
+ alu_instruction_ptr_hl = (R700ALUInstructionHalfLiteral*) CALLOC_STRUCT(R700ALUInstructionHalfLiteral);
+ if (alu_instruction_ptr_hl == NULL)
+ {
+ return GL_FALSE;
+ }
+ Init_R700ALUInstructionHalfLiteral(alu_instruction_ptr_hl, pLiteral[0], pLiteral[1]);
+ alu_instruction_ptr = (R700ALUInstruction*)alu_instruction_ptr_hl;
+ break;
+ case 2:
+ alu_instruction_ptr_fl = (R700ALUInstructionFullLiteral*) CALLOC_STRUCT(R700ALUInstructionFullLiteral);
+ if (alu_instruction_ptr_fl == NULL)
+ {
+ return GL_FALSE;
+ }
+ Init_R700ALUInstructionFullLiteral(alu_instruction_ptr_fl, pLiteral[0], pLiteral[1], pLiteral[2], pLiteral[3]);
+ alu_instruction_ptr = (R700ALUInstruction*)alu_instruction_ptr_fl;
+ break;
+ default:
+ break;
+ };
+ }
+ else
+ {
+ alu_instruction_ptr = (R700ALUInstruction*) CALLOC_STRUCT(R700ALUInstruction);
+ if (alu_instruction_ptr == NULL)
+ {
+ return GL_FALSE;
+ }
+ Init_R700ALUInstruction(alu_instruction_ptr);
+ }
+
+ //src 0
+ if (GL_FALSE == assemble_alu_src(alu_instruction_ptr,
+ 0,
+ &(pAsm->S[0].src),
+ scalar_channel_index) )
+ {
+ return GL_FALSE;
+ }
+
+ if (uNumSrc > 1)
+ {
+ // Process source 1
+ if (GL_FALSE == assemble_alu_src(alu_instruction_ptr,
+ 1,
+ &(pAsm->S[1].src),
+ scalar_channel_index) )
+ {
+ return GL_FALSE;
+ }
+ }
+
+ //other bits
+ alu_instruction_ptr->m_Word0.f.index_mode = SQ_INDEX_LOOP;
+
+ if(scalar_channel_index == lastInstruction)
+ {
+ alu_instruction_ptr->m_Word0.f.last = 1;
+ }
+
+ alu_instruction_ptr->m_Word0.f.pred_sel = 0x0;
+ if(1 == pAsm->D.dst.predicated)
+ {
+ alu_instruction_ptr->m_Word1_OP2.f.update_pred = 0x1;
+ alu_instruction_ptr->m_Word1_OP2.f.update_execute_mask = 0x1;
+ }
+ else
+ {
+ alu_instruction_ptr->m_Word1_OP2.f.update_pred = 0;
+ alu_instruction_ptr->m_Word1_OP2.f.update_execute_mask = 0;
+ }
+
+ // dst
+ if( (pAsm->D.dst.rtype == DST_REG_TEMPORARY) ||
+ (pAsm->D.dst.rtype == DST_REG_OUT) )
+ {
+ alu_instruction_ptr->m_Word1.f.dst_gpr = pAsm->D.dst.reg;
+ }
+ else
+ {
+ radeon_error("Only temp destination registers supported for ALU dest regs.\n");
+ return GL_FALSE;
+ }
+
+ alu_instruction_ptr->m_Word1.f.dst_rel = SQ_ABSOLUTE; //D.rtype
+
+ alu_instruction_ptr->m_Word1.f.dst_chan = scalar_channel_index;
+
+ alu_instruction_ptr->m_Word1.f.clamp = pAsm->D2.dst2.SaturateMode;
+
+ if (pAsm->D.dst.op3)
+ {
+ //op3
+ alu_instruction_ptr->m_Word1_OP3.f.alu_inst = pAsm->D.dst.opcode;
+
+ //There's 3rd src for op3
+ if ( GL_FALSE == assemble_alu_src(alu_instruction_ptr,
+ 2,
+ &(pAsm->S[2].src),
+ scalar_channel_index) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ //op2
+ if (pAsm->bR6xx)
+ {
+ alu_instruction_ptr->m_Word1_OP2.f6.alu_inst = pAsm->D.dst.opcode;
+ alu_instruction_ptr->m_Word1_OP2.f6.src0_abs = 0x0;
+ alu_instruction_ptr->m_Word1_OP2.f6.src1_abs = 0x0;
+ alu_instruction_ptr->m_Word1_OP2.f6.write_mask = 1;
+ alu_instruction_ptr->m_Word1_OP2.f6.omod = SQ_ALU_OMOD_OFF;
+ }
+ else
+ {
+ alu_instruction_ptr->m_Word1_OP2.f.alu_inst = pAsm->D.dst.opcode;
+ alu_instruction_ptr->m_Word1_OP2.f.src0_abs = 0x0;
+ alu_instruction_ptr->m_Word1_OP2.f.src1_abs = 0x0;
+ alu_instruction_ptr->m_Word1_OP2.f.write_mask = 1;
+ alu_instruction_ptr->m_Word1_OP2.f.omod = SQ_ALU_OMOD_OFF;
+ }
+ }
+
+ if(GL_FALSE == add_alu_instruction(pAsm, alu_instruction_ptr, contiguous_slots_needed) )
+ {
+ return GL_FALSE;
+ }
+
+ if (1 == number_of_scalar_operations)
+ {
+ if(GL_FALSE == check_scalar(pAsm, alu_instruction_ptr) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ if(GL_FALSE == check_vector(pAsm, alu_instruction_ptr) )
+ {
+ return GL_FALSE;
+ }
+ }
+
+ contiguous_slots_needed -= 2;
+ }
+
+ return GL_TRUE;
+}
+
GLboolean next_ins(r700_AssemblerBase *pAsm)
{
struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]);
@@ -2403,6 +2981,70 @@ GLboolean next_ins(r700_AssemblerBase *pAsm)
//reset for next inst.
pAsm->D.bits = 0;
+ pAsm->D2.bits = 0;
+ pAsm->S[0].bits = 0;
+ pAsm->S[1].bits = 0;
+ pAsm->S[2].bits = 0;
+ pAsm->is_tex = GL_FALSE;
+ pAsm->need_tex_barrier = GL_FALSE;
+
+ return GL_TRUE;
+}
+
+GLboolean next_ins2(r700_AssemblerBase *pAsm)
+{
+ struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]);
+
+ //ALU
+ if( GL_FALSE == assemble_alu_instruction2(pAsm) )
+ {
+ radeon_error("Error assembling ALU instruction\n");
+ return GL_FALSE;
+ }
+
+ if(pAsm->D.dst.rtype == DST_REG_OUT)
+ {
+ if(pAsm->D.dst.op3)
+ {
+ // There is no mask for OP3 instructions, so all channels are written
+ pAsm->pucOutMask[pAsm->D.dst.reg - pAsm->starting_export_register_number] = 0xF;
+ }
+ else
+ {
+ pAsm->pucOutMask[pAsm->D.dst.reg - pAsm->starting_export_register_number]
+ |= (unsigned char)pAsm->pILInst[pAsm->uiCurInst].DstReg.WriteMask;
+ }
+ }
+
+ //reset for next inst.
+ pAsm->D.bits = 0;
+ pAsm->D2.bits = 0;
+ pAsm->S[0].bits = 0;
+ pAsm->S[1].bits = 0;
+ pAsm->S[2].bits = 0;
+ pAsm->is_tex = GL_FALSE;
+ pAsm->need_tex_barrier = GL_FALSE;
+
+ pAsm->D2.bits = 0;
+
+ return GL_TRUE;
+}
+
+/* not work yet */
+GLboolean next_ins_literal(r700_AssemblerBase *pAsm, GLfloat * pLiteral)
+{
+ struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]);
+
+ //ALU
+ if( GL_FALSE == assemble_alu_instruction_literal(pAsm, pLiteral) )
+ {
+ radeon_error("Error assembling ALU instruction\n");
+ return GL_FALSE;
+ }
+
+ //reset for next inst.
+ pAsm->D.bits = 0;
+ pAsm->D2.bits = 0;
pAsm->S[0].bits = 0;
pAsm->S[1].bits = 0;
pAsm->S[2].bits = 0;
@@ -2729,6 +3371,133 @@ GLboolean assemble_EX2(r700_AssemblerBase *pAsm)
{
return assemble_math_function(pAsm, SQ_OP2_INST_EXP_IEEE);
}
+
+GLboolean assemble_EXP(r700_AssemblerBase *pAsm)
+{
+ BITS tmp;
+
+ checkop1(pAsm);
+
+ tmp = gethelpr(pAsm);
+
+ // FLOOR tmp.x, a.x
+ // EX2 dst.x tmp.x
+
+ if (pAsm->pILInst->DstReg.WriteMask & 0x1) {
+ pAsm->D.dst.opcode = SQ_OP2_INST_FLOOR;
+
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = tmp;
+ pAsm->D.dst.writex = 1;
+
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_EXP_IEEE;
+ pAsm->D.dst.math = 1;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.writey = pAsm->D.dst.writez = pAsm->D.dst.writew = 0;
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[0].src.reg = tmp;
+
+ setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+ }
+
+ // FRACT dst.y a.x
+
+ if ((pAsm->pILInst->DstReg.WriteMask >> 1) & 0x1) {
+ pAsm->D.dst.opcode = SQ_OP2_INST_FRACT;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.writex = pAsm->D.dst.writez = pAsm->D.dst.writew = 0;
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+ }
+
+ // EX2 dst.z, a.x
+
+ if ((pAsm->pILInst->DstReg.WriteMask >> 2) & 0x1) {
+ pAsm->D.dst.opcode = SQ_OP2_INST_EXP_IEEE;
+ pAsm->D.dst.math = 1;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.writex = pAsm->D.dst.writey = pAsm->D.dst.writew = 0;
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+ }
+
+ // MOV dst.w 1.0
+
+ if ((pAsm->pILInst->DstReg.WriteMask >> 3) & 0x1) {
+ pAsm->D.dst.opcode = SQ_OP2_INST_MOV;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.writex = pAsm->D.dst.writey = pAsm->D.dst.writez = 0;
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
+ pAsm->S[0].src.reg = tmp;
+
+ setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_1);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+ }
+
+ return GL_TRUE;
+}
GLboolean assemble_FLR(r700_AssemblerBase *pAsm)
{
@@ -2783,13 +3552,12 @@ GLboolean assemble_FRC(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
-GLboolean assemble_KIL(r700_AssemblerBase *pAsm)
-{
- /* TODO: doc says KILL has to be last(end) ALU clause */
-
- checkop1(pAsm);
+GLboolean assemble_KIL(r700_AssemblerBase *pAsm, GLuint opcode)
+{
+ checkop2(pAsm);
- pAsm->D.dst.opcode = SQ_OP2_INST_KILLGT;
+ pAsm->D.dst.opcode = opcode;
+ pAsm->D.dst.math = 1;
setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
pAsm->D.dst.rtype = DST_REG_TEMPORARY;
@@ -2799,24 +3567,24 @@ GLboolean assemble_KIL(r700_AssemblerBase *pAsm)
pAsm->D.dst.writez = 0;
pAsm->D.dst.writew = 0;
- setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
- pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
- pAsm->S[0].src.reg = 0;
-
- setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_0);
- noneg_PVSSRC(&(pAsm->S[0].src));
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
- if ( GL_FALSE == assemble_src(pAsm, 0, 1) )
+ if( GL_FALSE == assemble_src(pAsm, 1, -1) )
{
return GL_FALSE;
}
- if ( GL_FALSE == next_ins(pAsm) )
+ if ( GL_FALSE == next_ins2(pAsm) )
{
return GL_FALSE;
}
+ /* Doc says KILL has to be last(end) ALU clause */
pAsm->pR700Shader->killIsUsed = GL_TRUE;
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
return GL_TRUE;
}
@@ -2880,6 +3648,7 @@ GLboolean assemble_LRP(r700_AssemblerBase *pAsm)
{
return GL_FALSE;
}
+
if( GL_FALSE == assemble_src(pAsm, 2, -1) )
{
return GL_FALSE;
@@ -2910,6 +3679,217 @@ GLboolean assemble_LRP(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
+GLboolean assemble_LOG(r700_AssemblerBase *pAsm)
+{
+ BITS tmp1, tmp2, tmp3;
+
+ checkop1(pAsm);
+
+ tmp1 = gethelpr(pAsm);
+ tmp2 = gethelpr(pAsm);
+ tmp3 = gethelpr(pAsm);
+
+ // FIXME: The hardware can do fabs() directly on input
+ // elements, but the compiler doesn't have the
+ // capability to use that.
+
+ // MAX tmp1.x, a.x, -a.x (fabs(a.x))
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_MAX;
+
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = tmp1;
+ pAsm->D.dst.writex = 1;
+
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->S[1].bits = pAsm->S[0].bits;
+ flipneg_PVSSRC(&(pAsm->S[1].src));
+
+ if ( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ // Entire algo:
+ //
+ // LG2 tmp2.x, tmp1.x
+ // FLOOR tmp3.x, tmp2.x
+ // MOV dst.x, tmp3.x
+ // ADD tmp3.x, tmp2.x, -tmp3.x
+ // EX2 dst.y, tmp3.x
+ // MOV dst.z, tmp2.x
+ // MOV dst.w, 1.0
+
+ // LG2 tmp2.x, tmp1.x
+ // FLOOR tmp3.x, tmp2.x
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_LOG_IEEE;
+ pAsm->D.dst.math = 1;
+
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = tmp2;
+ pAsm->D.dst.writex = 1;
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[0].src.reg = tmp1;
+
+ setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_FLOOR;
+
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = tmp3;
+ pAsm->D.dst.writex = 1;
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[0].src.reg = tmp2;
+
+ setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ // MOV dst.x, tmp3.x
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_MOV;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.writey = pAsm->D.dst.writez = pAsm->D.dst.writew = 0;
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[0].src.reg = tmp3;
+
+ setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ // ADD tmp3.x, tmp2.x, -tmp3.x
+ // EX2 dst.y, tmp3.x
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_ADD;
+
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = tmp3;
+ pAsm->D.dst.writex = 1;
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[0].src.reg = tmp2;
+
+ setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE);
+ pAsm->S[1].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[1].src.reg = tmp3;
+
+ setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_X);
+ neg_PVSSRC(&(pAsm->S[1].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_EXP_IEEE;
+ pAsm->D.dst.math = 1;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.writex = pAsm->D.dst.writez = pAsm->D.dst.writew = 0;
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[0].src.reg = tmp3;
+
+ setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ // MOV dst.z, tmp2.x
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_MOV;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.writex = pAsm->D.dst.writey = pAsm->D.dst.writew = 0;
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[0].src.reg = tmp2;
+
+ setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ // MOV dst.w 1.0
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_MOV;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.writex = pAsm->D.dst.writey = pAsm->D.dst.writez = 0;
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
+ pAsm->S[0].src.reg = tmp1;
+
+ setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_1);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
GLboolean assemble_MAD(struct r700_AssemblerBase *pAsm)
{
int tmp, ii;
@@ -3478,6 +4458,74 @@ GLboolean assemble_SCS(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
+
+GLboolean assemble_LOGIC(r700_AssemblerBase *pAsm, BITS opcode)
+{
+ if( GL_FALSE == checkop2(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.opcode = opcode;
+ pAsm->D.dst.math = 1;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == assemble_src(pAsm, 1, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_LOGIC_PRED(r700_AssemblerBase *pAsm, BITS opcode)
+{
+ if( GL_FALSE == checkop2(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->D.dst.opcode = opcode;
+ pAsm->D.dst.math = 1;
+ pAsm->D.dst.predicated = 1;
+ pAsm->D2.dst2.SaturateMode = pAsm->pILInst[pAsm->uiCurInst].SaturateMode;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == assemble_src(pAsm, 0, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == assemble_src(pAsm, 1, -1) )
+ {
+ return GL_FALSE;
+ }
+
+ if( GL_FALSE == next_ins2(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
GLboolean assemble_SGE(r700_AssemblerBase *pAsm)
{
@@ -3557,6 +4605,7 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
switch (pAsm->pILInst[pAsm->uiCurInst].SrcReg[0].File)
{
+ case PROGRAM_UNIFORM:
case PROGRAM_CONSTANT:
case PROGRAM_LOCAL_PARAM:
case PROGRAM_ENV_PARAM:
@@ -3935,27 +4984,876 @@ GLboolean assemble_EXPORT(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
-GLboolean assemble_IF(r700_AssemblerBase *pAsm)
+static inline void decreaseCurrent(r700_AssemblerBase *pAsm, GLuint uReason)
{
+ switch (uReason)
+ {
+ case FC_PUSH_VPM:
+ pAsm->CALLSTACK[pAsm->CALLSP].current--;
+ break;
+ case FC_PUSH_WQM:
+ pAsm->CALLSTACK[pAsm->CALLSP].current -= 4;
+ break;
+ case FC_LOOP:
+ pAsm->CALLSTACK[pAsm->CALLSP].current -= 4;
+ break;
+ case FC_REP:
+ /* TODO : for 16 vp asic, should -= 2; */
+ pAsm->CALLSTACK[pAsm->CALLSP].current -= 1;
+ break;
+ };
+}
+
+static inline void checkStackDepth(r700_AssemblerBase *pAsm, GLuint uReason, GLboolean bCheckMaxOnly)
+{
+ if(GL_TRUE == bCheckMaxOnly)
+ {
+ switch (uReason)
+ {
+ case FC_PUSH_VPM:
+ if((pAsm->CALLSTACK[pAsm->CALLSP].current + 1)
+ > pAsm->CALLSTACK[pAsm->CALLSP].max)
+ {
+ pAsm->CALLSTACK[pAsm->CALLSP].max =
+ pAsm->CALLSTACK[pAsm->CALLSP].current + 1;
+ }
+ break;
+ case FC_PUSH_WQM:
+ if((pAsm->CALLSTACK[pAsm->CALLSP].current + 4)
+ > pAsm->CALLSTACK[pAsm->CALLSP].max)
+ {
+ pAsm->CALLSTACK[pAsm->CALLSP].max =
+ pAsm->CALLSTACK[pAsm->CALLSP].current + 4;
+ }
+ break;
+ }
+ return;
+ }
+
+ switch (uReason)
+ {
+ case FC_PUSH_VPM:
+ pAsm->CALLSTACK[pAsm->CALLSP].current++;
+ break;
+ case FC_PUSH_WQM:
+ pAsm->CALLSTACK[pAsm->CALLSP].current += 4;
+ break;
+ case FC_LOOP:
+ pAsm->CALLSTACK[pAsm->CALLSP].current += 4;
+ break;
+ case FC_REP:
+ /* TODO : for 16 vp asic, should += 2; */
+ pAsm->CALLSTACK[pAsm->CALLSP].current += 1;
+ break;
+ };
+
+ if(pAsm->CALLSTACK[pAsm->CALLSP].current
+ > pAsm->CALLSTACK[pAsm->CALLSP].max)
+ {
+ pAsm->CALLSTACK[pAsm->CALLSP].max =
+ pAsm->CALLSTACK[pAsm->CALLSP].current;
+ }
+}
+
+GLboolean jumpToOffest(r700_AssemblerBase *pAsm, GLuint pops, GLint offset)
+{
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = pops;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_JUMP;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word0.f.addr = pAsm->cf_current_cf_clause_ptr->m_uIndex + offset;
+
+ return GL_TRUE;
+}
+
+GLboolean pops(r700_AssemblerBase *pAsm, GLuint pops)
+{
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = pops;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_POP;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+ pAsm->cf_current_cf_clause_ptr->m_Word0.f.addr = pAsm->cf_current_cf_clause_ptr->m_uIndex + 1;
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_IF(r700_AssemblerBase *pAsm, GLboolean bHasElse)
+{
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ if(GL_TRUE != bHasElse)
+ {
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 1;
+ }
+ else
+ {
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 0;
+ }
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_JUMP;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+
+ pAsm->FCSP++;
+ pAsm->fc_stack[pAsm->FCSP].type = FC_IF;
+ pAsm->fc_stack[pAsm->FCSP].mid = NULL;
+ pAsm->fc_stack[pAsm->FCSP].midLen= 0;
+ pAsm->fc_stack[pAsm->FCSP].first = pAsm->cf_current_cf_clause_ptr;
+
+#ifndef USE_CF_FOR_POP_AFTER
+ if(GL_TRUE != bHasElse)
+ {
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU_POP_AFTER;
+ }
+#endif /* USE_CF_FOR_POP_AFTER */
+
+ checkStackDepth(pAsm, FC_PUSH_VPM, GL_FALSE);
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_ELSE(r700_AssemblerBase *pAsm)
+{
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 1; ///
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_ELSE;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+
+ pAsm->fc_stack[pAsm->FCSP].mid = (R700ControlFlowGenericClause **)_mesa_realloc( (void *)pAsm->fc_stack[pAsm->FCSP].mid,
+ 0,
+ sizeof(R700ControlFlowGenericClause *) );
+ pAsm->fc_stack[pAsm->FCSP].mid[0] = pAsm->cf_current_cf_clause_ptr;
+ //pAsm->fc_stack[pAsm->FCSP].unNumMid = 1;
+
+#ifndef USE_CF_FOR_POP_AFTER
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU_POP_AFTER;
+#endif /* USE_CF_FOR_POP_AFTER */
+
+ pAsm->fc_stack[pAsm->FCSP].first->m_Word0.f.addr = pAsm->pR700Shader->plstCFInstructions_active->uNumOfNode - 1;
+
return GL_TRUE;
}
GLboolean assemble_ENDIF(r700_AssemblerBase *pAsm)
{
+#ifdef USE_CF_FOR_POP_AFTER
+ pops(pAsm, 1);
+#endif /* USE_CF_FOR_POP_AFTER */
+
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
+
+ if(NULL == pAsm->fc_stack[pAsm->FCSP].mid)
+ {
+ /* no else in between */
+ pAsm->fc_stack[pAsm->FCSP].first->m_Word0.f.addr = pAsm->pR700Shader->plstCFInstructions_active->uNumOfNode;
+ }
+ else
+ {
+ pAsm->fc_stack[pAsm->FCSP].mid[0]->m_Word0.f.addr = pAsm->pR700Shader->plstCFInstructions_active->uNumOfNode;
+ }
+
+ if(NULL != pAsm->fc_stack[pAsm->FCSP].mid)
+ {
+ FREE(pAsm->fc_stack[pAsm->FCSP].mid);
+ }
+
+ if(pAsm->fc_stack[pAsm->FCSP].type != FC_IF)
+ {
+ radeon_error("if/endif in shader code are not paired. \n");
+ return GL_FALSE;
+ }
+
+ pAsm->FCSP--;
+
+ decreaseCurrent(pAsm, FC_PUSH_VPM);
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_BGNLOOP(r700_AssemblerBase *pAsm)
+{
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_LOOP_START_NO_AL;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+
+ pAsm->FCSP++;
+ pAsm->fc_stack[pAsm->FCSP].type = FC_LOOP;
+ pAsm->fc_stack[pAsm->FCSP].mid = NULL;
+ pAsm->fc_stack[pAsm->FCSP].unNumMid = 0;
+ pAsm->fc_stack[pAsm->FCSP].midLen = 0;
+ pAsm->fc_stack[pAsm->FCSP].first = pAsm->cf_current_cf_clause_ptr;
+
+ checkStackDepth(pAsm, FC_LOOP, GL_FALSE);
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_BRK(r700_AssemblerBase *pAsm)
+{
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ unsigned int unFCSP;
+ for(unFCSP=pAsm->FCSP; unFCSP>0; unFCSP--)
+ {
+ if(FC_LOOP == pAsm->fc_stack[unFCSP].type)
+ {
+ break;
+ }
+ }
+ if(0 == FC_LOOP)
+ {
+ radeon_error("Break is not inside loop/endloop pair.\n");
+ return GL_FALSE;
+ }
+
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 1;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_LOOP_BREAK;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+
+ pAsm->fc_stack[unFCSP].mid = (R700ControlFlowGenericClause **)_mesa_realloc(
+ (void *)pAsm->fc_stack[unFCSP].mid,
+ sizeof(R700ControlFlowGenericClause *) * pAsm->fc_stack[unFCSP].unNumMid,
+ sizeof(R700ControlFlowGenericClause *) * (pAsm->fc_stack[unFCSP].unNumMid + 1) );
+ pAsm->fc_stack[unFCSP].mid[pAsm->fc_stack[unFCSP].unNumMid] = pAsm->cf_current_cf_clause_ptr;
+ pAsm->fc_stack[unFCSP].unNumMid++;
+
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 1;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_POP;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+ pAsm->cf_current_cf_clause_ptr->m_Word0.f.addr = pAsm->cf_current_cf_clause_ptr->m_uIndex + 1;
+
+ checkStackDepth(pAsm, FC_PUSH_VPM, GL_TRUE);
+
+#endif //USE_CF_FOR_CONTINUE_BREAK
return GL_TRUE;
}
-GLboolean AssembleInstr(GLuint uiNumberInsts,
+GLboolean assemble_CONT(r700_AssemblerBase *pAsm)
+{
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ unsigned int unFCSP;
+ for(unFCSP=pAsm->FCSP; unFCSP>0; unFCSP--)
+ {
+ if(FC_LOOP == pAsm->fc_stack[unFCSP].type)
+ {
+ break;
+ }
+ }
+ if(0 == FC_LOOP)
+ {
+ radeon_error("Continue is not inside loop/endloop pair.\n");
+ return GL_FALSE;
+ }
+
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 1;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_LOOP_CONTINUE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+
+ pAsm->fc_stack[unFCSP].mid = (R700ControlFlowGenericClause **)_mesa_realloc(
+ (void *)pAsm->fc_stack[unFCSP].mid,
+ sizeof(R700ControlFlowGenericClause *) * pAsm->fc_stack[unFCSP].unNumMid,
+ sizeof(R700ControlFlowGenericClause *) * (pAsm->fc_stack[unFCSP].unNumMid + 1) );
+ pAsm->fc_stack[unFCSP].mid[pAsm->fc_stack[unFCSP].unNumMid] = pAsm->cf_current_cf_clause_ptr;
+ pAsm->fc_stack[unFCSP].unNumMid++;
+
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 1;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_POP;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+ pAsm->cf_current_cf_clause_ptr->m_Word0.f.addr = pAsm->cf_current_cf_clause_ptr->m_uIndex + 1;
+
+ checkStackDepth(pAsm, FC_PUSH_VPM, GL_TRUE);
+
+#endif /* USE_CF_FOR_CONTINUE_BREAK */
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_ENDLOOP(r700_AssemblerBase *pAsm)
+{
+ GLuint i;
+
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_LOOP_END;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word0.f.addr = pAsm->fc_stack[pAsm->FCSP].first->m_uIndex + 1;
+ pAsm->fc_stack[pAsm->FCSP].first->m_Word0.f.addr = pAsm->cf_current_cf_clause_ptr->m_uIndex + 1;
+
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ for(i=0; i<pAsm->fc_stack[pAsm->FCSP].unNumMid; i++)
+ {
+ pAsm->fc_stack[pAsm->FCSP].mid[i]->m_Word0.f.addr = pAsm->cf_current_cf_clause_ptr->m_uIndex;
+ }
+ if(NULL != pAsm->fc_stack[pAsm->FCSP].mid)
+ {
+ FREE(pAsm->fc_stack[pAsm->FCSP].mid);
+ }
+#endif
+
+ if(pAsm->fc_stack[pAsm->FCSP].type != FC_LOOP)
+ {
+ radeon_error("loop/endloop in shader code are not paired. \n");
+ return GL_FALSE;
+ }
+
+ GLuint unFCSP;
+ GLuint unIF = 0;
+ if((pAsm->unCFflags & HAS_CURRENT_LOOPRET) > 0)
+ {
+ for(unFCSP=(pAsm->FCSP-1); unFCSP>pAsm->CALLSTACK[pAsm->CALLSP].FCSP_BeforeEntry; unFCSP--)
+ {
+ if(FC_LOOP == pAsm->fc_stack[unFCSP].type)
+ {
+ breakLoopOnFlag(pAsm, unFCSP);
+ break;
+ }
+ else if(FC_IF == pAsm->fc_stack[unFCSP].type)
+ {
+ unIF++;
+ }
+ }
+ if(unFCSP <= pAsm->CALLSTACK[pAsm->CALLSP].FCSP_BeforeEntry)
+ {
+#ifdef USE_CF_FOR_POP_AFTER
+ returnOnFlag(pAsm, unIF);
+#else
+ returnOnFlag(pAsm, 0);
+#endif /* USE_CF_FOR_POP_AFTER */
+ pAsm->unCFflags &= ~HAS_CURRENT_LOOPRET;
+ }
+ }
+
+ pAsm->FCSP--;
+
+ decreaseCurrent(pAsm, FC_LOOP);
+
+ return GL_TRUE;
+}
+
+void add_return_inst(r700_AssemblerBase *pAsm)
+{
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+ //pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 1;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_RETURN;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+}
+
+GLboolean assemble_BGNSUB(r700_AssemblerBase *pAsm, GLint nILindex)
+{
+ /* Put in sub */
+ if( (pAsm->unSubArrayPointer + 1) > pAsm->unSubArraySize )
+ {
+ pAsm->subs = (SUB_OFFSET*)_mesa_realloc( (void *)pAsm->subs,
+ sizeof(SUB_OFFSET) * pAsm->unSubArraySize,
+ sizeof(SUB_OFFSET) * (pAsm->unSubArraySize + 10) );
+ if(NULL == pAsm->subs)
+ {
+ return GL_FALSE;
+ }
+ pAsm->unSubArraySize += 10;
+ }
+
+ pAsm->subs[pAsm->unSubArrayPointer].subIL_Offset = nILindex;
+ pAsm->subs[pAsm->unSubArrayPointer].lstCFInstructions_local.pHead=NULL;
+ pAsm->subs[pAsm->unSubArrayPointer].lstCFInstructions_local.pTail=NULL;
+ pAsm->subs[pAsm->unSubArrayPointer].lstCFInstructions_local.uNumOfNode=0;
+
+ pAsm->CALLSP++;
+ pAsm->CALLSTACK[pAsm->CALLSP].subDescIndex = pAsm->unSubArrayPointer;
+ pAsm->CALLSTACK[pAsm->CALLSP].FCSP_BeforeEntry = pAsm->FCSP;
+ pAsm->CALLSTACK[pAsm->CALLSP].plstCFInstructions_local
+ = &(pAsm->subs[pAsm->unSubArrayPointer].lstCFInstructions_local);
+ pAsm->CALLSTACK[pAsm->CALLSP].max = 0;
+ pAsm->CALLSTACK[pAsm->CALLSP].current = 0;
+ SetActiveCFlist(pAsm->pR700Shader,
+ pAsm->CALLSTACK[pAsm->CALLSP].plstCFInstructions_local);
+
+ pAsm->unSubArrayPointer++;
+
+ /* start sub */
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
+
+ pAsm->FCSP++;
+ pAsm->fc_stack[pAsm->FCSP].type = FC_REP;
+
+ checkStackDepth(pAsm, FC_REP, GL_FALSE);
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_ENDSUB(r700_AssemblerBase *pAsm)
+{
+ if(pAsm->fc_stack[pAsm->FCSP].type != FC_REP)
+ {
+ radeon_error("BGNSUB/ENDSUB in shader code are not paired. \n");
+ return GL_FALSE;
+ }
+
+ /* copy max to sub structure */
+ pAsm->subs[pAsm->CALLSTACK[pAsm->CALLSP].subDescIndex].unStackDepthMax
+ = pAsm->CALLSTACK[pAsm->CALLSP].max;
+
+ decreaseCurrent(pAsm, FC_REP);
+
+ pAsm->CALLSP--;
+ SetActiveCFlist(pAsm->pR700Shader,
+ pAsm->CALLSTACK[pAsm->CALLSP].plstCFInstructions_local);
+
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
+
+ pAsm->FCSP--;
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_RET(r700_AssemblerBase *pAsm)
+{
+ GLuint unIF = 0;
+
+ if(pAsm->CALLSP > 0)
+ { /* in sub */
+ GLuint unFCSP;
+ for(unFCSP=pAsm->FCSP; unFCSP>pAsm->CALLSTACK[pAsm->CALLSP].FCSP_BeforeEntry; unFCSP--)
+ {
+ if(FC_LOOP == pAsm->fc_stack[unFCSP].type)
+ {
+ setRetInLoopFlag(pAsm, SQ_SEL_1);
+ breakLoopOnFlag(pAsm, unFCSP);
+ pAsm->unCFflags |= LOOPRET_FLAGS;
+
+ return GL_TRUE;
+ }
+ else if(FC_IF == pAsm->fc_stack[unFCSP].type)
+ {
+ unIF++;
+ }
+ }
+ }
+
+#ifdef USE_CF_FOR_POP_AFTER
+ if(unIF > 0)
+ {
+ pops(pAsm, unIF);
+ }
+#endif /* USE_CF_FOR_POP_AFTER */
+
+ add_return_inst(pAsm);
+
+ return GL_TRUE;
+}
+
+GLboolean assemble_CAL(r700_AssemblerBase *pAsm,
+ GLint nILindex,
+ GLuint uiNumberInsts,
+ struct prog_instruction *pILInst)
+{
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
+
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.call_count = 1;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_CALL;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+
+ /* Put in caller */
+ if( (pAsm->unCallerArrayPointer + 1) > pAsm->unCallerArraySize )
+ {
+ pAsm->callers = (CALLER_POINTER*)_mesa_realloc( (void *)pAsm->callers,
+ sizeof(CALLER_POINTER) * pAsm->unCallerArraySize,
+ sizeof(CALLER_POINTER) * (pAsm->unCallerArraySize + 10) );
+ if(NULL == pAsm->callers)
+ {
+ return GL_FALSE;
+ }
+ pAsm->unCallerArraySize += 10;
+ }
+
+ pAsm->callers[pAsm->unCallerArrayPointer].subIL_Offset = nILindex;
+ pAsm->callers[pAsm->unCallerArrayPointer].cf_ptr = pAsm->cf_current_cf_clause_ptr;
+
+ pAsm->unCallerArrayPointer++;
+
+ int j;
+ GLuint max;
+ GLuint unSubID;
+ GLboolean bRet;
+ for(j=0; j<pAsm->unSubArrayPointer; j++)
+ {
+ if(nILindex == pAsm->subs[j].subIL_Offset)
+ { /* compiled before */
+
+ max = pAsm->subs[j].unStackDepthMax
+ + pAsm->CALLSTACK[pAsm->CALLSP].current;
+ if(max > pAsm->CALLSTACK[pAsm->CALLSP].max)
+ {
+ pAsm->CALLSTACK[pAsm->CALLSP].max = max;
+ }
+
+ pAsm->callers[pAsm->unCallerArrayPointer - 1].subDescIndex = j;
+ return GL_TRUE;
+ }
+ }
+
+ pAsm->callers[pAsm->unCallerArrayPointer - 1].subDescIndex = pAsm->unSubArrayPointer;
+ unSubID = pAsm->unSubArrayPointer;
+
+ bRet = AssembleInstr(nILindex, uiNumberInsts, pILInst, pAsm);
+
+ if(GL_TRUE == bRet)
+ {
+ max = pAsm->subs[unSubID].unStackDepthMax
+ + pAsm->CALLSTACK[pAsm->CALLSP].current;
+ if(max > pAsm->CALLSTACK[pAsm->CALLSP].max)
+ {
+ pAsm->CALLSTACK[pAsm->CALLSP].max = max;
+ }
+ }
+
+ return bRet;
+}
+
+GLboolean setRetInLoopFlag(r700_AssemblerBase *pAsm, GLuint flagValue)
+{
+ GLfloat fLiteral[2] = {0.1, 0.0};
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_MOV;
+ pAsm->D.dst.op3 = 0;
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = pAsm->flag_reg_index;
+ pAsm->D.dst.writex = 1;
+ pAsm->D.dst.writey = 0;
+ pAsm->D.dst.writez = 0;
+ pAsm->D.dst.writew = 0;
+ pAsm->D2.dst2.literal = 1;
+ pAsm->D2.dst2.SaturateMode = SATURATE_OFF;
+ pAsm->D.dst.predicated = 0;
+ /* in reloc where dislink flag init inst, only one slot alu inst is handled. */
+ pAsm->D.dst.math = 1; /* TODO : not math really, but one channel op, more generic alu assembler needed */
+#if 0
+ pAsm->S[0].src.rtype = SRC_REC_LITERAL;
+ //pAsm->S[0].src.reg = 0;
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+ pAsm->S[0].src.swizzlex = SQ_SEL_X;
+ pAsm->S[0].src.swizzley = SQ_SEL_Y;
+ pAsm->S[0].src.swizzlez = SQ_SEL_Z;
+ pAsm->S[0].src.swizzlew = SQ_SEL_W;
+
+ if( GL_FALSE == next_ins_literal(pAsm, &(fLiteral[0])) )
+ {
+ return GL_FALSE;
+ }
+#else
+ pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[0].src.reg = 0;
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+ pAsm->S[0].src.swizzlex = flagValue;
+ pAsm->S[0].src.swizzley = flagValue;
+ pAsm->S[0].src.swizzlez = flagValue;
+ pAsm->S[0].src.swizzlew = flagValue;
+
+ if( GL_FALSE == next_ins2(pAsm) )
+ {
+ return GL_FALSE;
+ }
+#endif
+
+ return GL_TRUE;
+}
+
+GLboolean testFlag(r700_AssemblerBase *pAsm)
+{
+ GLfloat fLiteral[2] = {0.1, 0.0};
+
+ //Test flag
+ GLuint tmp = gethelpr(pAsm);
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_PRED_SETE;
+ pAsm->D.dst.math = 1;
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = tmp;
+ pAsm->D.dst.writex = 1;
+ pAsm->D.dst.writey = 0;
+ pAsm->D.dst.writez = 0;
+ pAsm->D.dst.writew = 0;
+ pAsm->D2.dst2.literal = 1;
+ pAsm->D2.dst2.SaturateMode = SATURATE_OFF;
+ pAsm->D.dst.predicated = 1;
+
+ pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[0].src.reg = pAsm->flag_reg_index;
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+ pAsm->S[0].src.swizzlex = SQ_SEL_X;
+ pAsm->S[0].src.swizzley = SQ_SEL_Y;
+ pAsm->S[0].src.swizzlez = SQ_SEL_Z;
+ pAsm->S[0].src.swizzlew = SQ_SEL_W;
+#if 0
+ pAsm->S[1].src.rtype = SRC_REC_LITERAL;
+ //pAsm->S[1].src.reg = 0;
+ setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE);
+ noneg_PVSSRC(&(pAsm->S[1].src));
+ pAsm->S[1].src.swizzlex = SQ_SEL_X;
+ pAsm->S[1].src.swizzley = SQ_SEL_Y;
+ pAsm->S[1].src.swizzlez = SQ_SEL_Z;
+ pAsm->S[1].src.swizzlew = SQ_SEL_W;
+
+ if( GL_FALSE == next_ins_literal(pAsm, &(fLiteral[0])) )
+ {
+ return GL_FALSE;
+ }
+#else
+ pAsm->S[1].src.rtype = DST_REG_TEMPORARY;
+ pAsm->S[1].src.reg = 0;
+ setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE);
+ noneg_PVSSRC(&(pAsm->S[1].src));
+ pAsm->S[1].src.swizzlex = SQ_SEL_1;
+ pAsm->S[1].src.swizzley = SQ_SEL_1;
+ pAsm->S[1].src.swizzlez = SQ_SEL_1;
+ pAsm->S[1].src.swizzlew = SQ_SEL_1;
+
+ if( GL_FALSE == next_ins2(pAsm) )
+ {
+ return GL_FALSE;
+ }
+#endif
+
+ checkStackDepth(pAsm, FC_PUSH_VPM, GL_TRUE);
+
+ return GL_TRUE;
+}
+
+GLboolean returnOnFlag(r700_AssemblerBase *pAsm, GLuint unIF)
+{
+ testFlag(pAsm);
+ jumpToOffest(pAsm, 1, 4);
+ setRetInLoopFlag(pAsm, SQ_SEL_0);
+ pops(pAsm, unIF + 1);
+ add_return_inst(pAsm);
+
+ return GL_TRUE;
+}
+
+GLboolean breakLoopOnFlag(r700_AssemblerBase *pAsm, GLuint unFCSP)
+{
+ testFlag(pAsm);
+
+ //break
+ if(GL_FALSE == add_cf_instruction(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.pop_count = 1;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_const = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cond = SQ_CF_COND_ACTIVE;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.end_of_program = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.valid_pixel_mode = 0x0;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.cf_inst = SQ_CF_INST_LOOP_BREAK;
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.whole_quad_mode = 0x0;
+
+ pAsm->cf_current_cf_clause_ptr->m_Word1.f.barrier = 0x1;
+
+ pAsm->fc_stack[unFCSP].mid = (R700ControlFlowGenericClause **)_mesa_realloc(
+ (void *)pAsm->fc_stack[unFCSP].mid,
+ sizeof(R700ControlFlowGenericClause *) * pAsm->fc_stack[unFCSP].unNumMid,
+ sizeof(R700ControlFlowGenericClause *) * (pAsm->fc_stack[unFCSP].unNumMid + 1) );
+ pAsm->fc_stack[unFCSP].mid[pAsm->fc_stack[unFCSP].unNumMid] = pAsm->cf_current_cf_clause_ptr;
+ pAsm->fc_stack[unFCSP].unNumMid++;
+
+ pops(pAsm, 1);
+
+ return GL_TRUE;
+}
+
+GLboolean AssembleInstr(GLuint uiFirstInst,
+ GLuint uiNumberInsts,
struct prog_instruction *pILInst,
r700_AssemblerBase *pR700AsmCode)
{
GLuint i;
pR700AsmCode->pILInst = pILInst;
- for(i=0; i<uiNumberInsts; i++)
+ for(i=uiFirstInst; i<uiNumberInsts; i++)
{
pR700AsmCode->uiCurInst = i;
+#ifndef USE_CF_FOR_CONTINUE_BREAK
+ if(OPCODE_BRK == pILInst[i+1].Opcode)
+ {
+ switch(pILInst[i].Opcode)
+ {
+ case OPCODE_SLE:
+ pILInst[i].Opcode = OPCODE_SGT;
+ break;
+ case OPCODE_SLT:
+ pILInst[i].Opcode = OPCODE_SGE;
+ break;
+ case OPCODE_SGE:
+ pILInst[i].Opcode = OPCODE_SLT;
+ break;
+ case OPCODE_SGT:
+ pILInst[i].Opcode = OPCODE_SLE;
+ break;
+ case OPCODE_SEQ:
+ pILInst[i].Opcode = OPCODE_SNE;
+ break;
+ case OPCODE_SNE:
+ pILInst[i].Opcode = OPCODE_SEQ;
+ break;
+ default:
+ break;
+ }
+ }
+#endif
+
switch (pILInst[i].Opcode)
{
case OPCODE_ABS:
@@ -4004,16 +5902,16 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_FALSE;
break;
case OPCODE_EXP:
- radeon_error("Not yet implemented instruction OPCODE_EXP \n");
- //if ( GL_FALSE == assemble_BAD("EXP") )
+ if ( GL_FALSE == assemble_EXP(pR700AsmCode) )
return GL_FALSE;
- break; // approx of EX2
+ break;
case OPCODE_FLR:
if ( GL_FALSE == assemble_FLR(pR700AsmCode) )
return GL_FALSE;
break;
- //case OP_FLR_INT:
+ //case OP_FLR_INT: ;
+
// if ( GL_FALSE == assemble_FLR_INT() )
// return GL_FALSE;
// break;
@@ -4024,8 +5922,10 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
break;
case OPCODE_KIL:
- if ( GL_FALSE == assemble_KIL(pR700AsmCode) )
- return GL_FALSE;
+ case OPCODE_KIL_NV:
+ /* done at OPCODE_SE/SGT...etc. */
+ /* if ( GL_FALSE == assemble_KIL(pR700AsmCode) )
+ return GL_FALSE; */
break;
case OPCODE_LG2:
if ( GL_FALSE == assemble_LG2(pR700AsmCode) )
@@ -4040,10 +5940,9 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_FALSE;
break;
case OPCODE_LOG:
- radeon_error("Not yet implemented instruction OPCODE_LOG \n");
- //if ( GL_FALSE == assemble_BAD("LOG") )
+ if ( GL_FALSE == assemble_LOG(pR700AsmCode) )
return GL_FALSE;
- break; // approx of LG2
+ break;
case OPCODE_MAD:
if ( GL_FALSE == assemble_MAD(pR700AsmCode) )
@@ -4086,16 +5985,340 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
case OPCODE_SCS:
if ( GL_FALSE == assemble_SCS(pR700AsmCode) )
return GL_FALSE;
- break;
+ break;
+
+ case OPCODE_SEQ:
+ if(OPCODE_IF == pILInst[i+1].Opcode)
+ {
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_BRK == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_BREAK;
+#endif
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_CONT == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_CONTINUE;
+#endif
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if((OPCODE_KIL == pILInst[i+1].Opcode)||(OPCODE_KIL_NV == pILInst[i+1].Opcode))
+ {
+ if ( GL_FALSE == assemble_KIL(pR700AsmCode, SQ_OP2_INST_KILLE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ if ( GL_FALSE == assemble_LOGIC(pR700AsmCode, SQ_OP2_INST_SETE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ break;
+
+ case OPCODE_SGT:
+ if(OPCODE_IF == pILInst[i+1].Opcode)
+ {
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGT) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_BRK == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_BREAK;
+#endif
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGT) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_CONT == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_CONTINUE;
+#endif
+
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGT) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if((OPCODE_KIL == pILInst[i+1].Opcode)||(OPCODE_KIL_NV == pILInst[i+1].Opcode))
+ {
+ if ( GL_FALSE == assemble_KIL(pR700AsmCode, SQ_OP2_INST_KILLGT) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ if ( GL_FALSE == assemble_LOGIC(pR700AsmCode, SQ_OP2_INST_SETGT) )
+ {
+ return GL_FALSE;
+ }
+ }
+ break;
case OPCODE_SGE:
- if ( GL_FALSE == assemble_SGE(pR700AsmCode) )
- return GL_FALSE;
- break;
+ if(OPCODE_IF == pILInst[i+1].Opcode)
+ {
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_BRK == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_BREAK;
+#endif
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_CONT == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_CONTINUE;
+#endif
+
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if((OPCODE_KIL == pILInst[i+1].Opcode)||(OPCODE_KIL_NV == pILInst[i+1].Opcode))
+ {
+ if ( GL_FALSE == assemble_KIL(pR700AsmCode, SQ_OP2_INST_KILLGE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ if ( GL_FALSE == assemble_SGE(pR700AsmCode) )
+ {
+ return GL_FALSE;
+ }
+ }
+ break;
+
+ /* NO LT, LE, TODO : use GE => LE, GT => LT : reverse 2 src order would be simpliest. Or use SQ_CF_COND_FALSE for SQ_CF_COND_ACTIVE.*/
case OPCODE_SLT:
- if ( GL_FALSE == assemble_SLT(pR700AsmCode) )
- return GL_FALSE;
- break;
+ {
+ struct prog_src_register SrcRegSave[2];
+ SrcRegSave[0] = pILInst[i].SrcReg[0];
+ SrcRegSave[1] = pILInst[i].SrcReg[1];
+ pILInst[i].SrcReg[0] = SrcRegSave[1];
+ pILInst[i].SrcReg[1] = SrcRegSave[0];
+ if(OPCODE_IF == pILInst[i+1].Opcode)
+ {
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGT) )
+ {
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_BRK == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_BREAK;
+#endif
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGT) )
+ {
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_CONT == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_CONTINUE;
+#endif
+
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGT) )
+ {
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ return GL_FALSE;
+ }
+ }
+ else if((OPCODE_KIL == pILInst[i+1].Opcode)||(OPCODE_KIL_NV == pILInst[i+1].Opcode))
+ {
+ if ( GL_FALSE == assemble_KIL(pR700AsmCode, SQ_OP2_INST_KILLGT) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ if ( GL_FALSE == assemble_LOGIC(pR700AsmCode, SQ_OP2_INST_SETGT) )
+ {
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ return GL_FALSE;
+ }
+ }
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ }
+ break;
+
+ case OPCODE_SLE:
+ {
+ struct prog_src_register SrcRegSave[2];
+ SrcRegSave[0] = pILInst[i].SrcReg[0];
+ SrcRegSave[1] = pILInst[i].SrcReg[1];
+ pILInst[i].SrcReg[0] = SrcRegSave[1];
+ pILInst[i].SrcReg[1] = SrcRegSave[0];
+ if(OPCODE_IF == pILInst[i+1].Opcode)
+ {
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGE) )
+ {
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_BRK == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_BREAK;
+#endif
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGE) )
+ {
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_CONT == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_CONTINUE;
+#endif
+
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETGE) )
+ {
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ return GL_FALSE;
+ }
+ }
+ else if((OPCODE_KIL == pILInst[i+1].Opcode)||(OPCODE_KIL_NV == pILInst[i+1].Opcode))
+ {
+ if ( GL_FALSE == assemble_KIL(pR700AsmCode, SQ_OP2_INST_KILLGE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ if ( GL_FALSE == assemble_LOGIC(pR700AsmCode, SQ_OP2_INST_SETGE) )
+ {
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ return GL_FALSE;
+ }
+ }
+ pILInst[i].SrcReg[0] = SrcRegSave[0];
+ pILInst[i].SrcReg[1] = SrcRegSave[1];
+ }
+ break;
+
+ case OPCODE_SNE:
+ if(OPCODE_IF == pILInst[i+1].Opcode)
+ {
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETNE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_BRK == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_BREAK;
+#endif
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETNE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if(OPCODE_CONT == pILInst[i+1].Opcode)
+ {
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+#else
+ pR700AsmCode->alu_x_opcode = SQ_CF_INST_ALU_CONTINUE;
+#endif
+ if ( GL_FALSE == assemble_LOGIC_PRED(pR700AsmCode, SQ_OP2_INST_PRED_SETNE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else if((OPCODE_KIL == pILInst[i+1].Opcode)||(OPCODE_KIL_NV == pILInst[i+1].Opcode))
+ {
+ if ( GL_FALSE == assemble_KIL(pR700AsmCode, SQ_OP2_INST_KILLNE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ else
+ {
+ if ( GL_FALSE == assemble_LOGIC(pR700AsmCode, SQ_OP2_INST_SETNE) )
+ {
+ return GL_FALSE;
+ }
+ }
+ break;
//case OP_STP:
// if ( GL_FALSE == assemble_STP(pR700AsmCode) )
@@ -4129,30 +6352,102 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_FALSE;
break;
+ case OPCODE_TRUNC:
+ if ( GL_FALSE == assemble_math_function(pR700AsmCode, SQ_OP2_INST_TRUNC) )
+ return GL_FALSE;
+ break;
+
case OPCODE_XPD:
if ( GL_FALSE == assemble_XPD(pR700AsmCode) )
return GL_FALSE;
break;
case OPCODE_IF :
- if ( GL_FALSE == assemble_IF(pR700AsmCode) )
- return GL_FALSE;
+ {
+ GLboolean bHasElse = GL_FALSE;
+
+ if(pILInst[pILInst[i].BranchTarget - 1].Opcode == OPCODE_ELSE)
+ {
+ bHasElse = GL_TRUE;
+ }
+
+ if ( GL_FALSE == assemble_IF(pR700AsmCode, bHasElse) )
+ {
+ return GL_FALSE;
+ }
+ }
break;
+
case OPCODE_ELSE :
- radeon_error("Not yet implemented instruction OPCODE_ELSE \n");
- //if ( GL_FALSE == assemble_BAD("ELSE") )
+ if ( GL_FALSE == assemble_ELSE(pR700AsmCode) )
return GL_FALSE;
break;
+
case OPCODE_ENDIF:
if ( GL_FALSE == assemble_ENDIF(pR700AsmCode) )
return GL_FALSE;
break;
+ case OPCODE_BGNLOOP:
+ if( GL_FALSE == assemble_BGNLOOP(pR700AsmCode) )
+ {
+ return GL_FALSE;
+ }
+ break;
+
+ case OPCODE_BRK:
+ if( GL_FALSE == assemble_BRK(pR700AsmCode) )
+ {
+ return GL_FALSE;
+ }
+ break;
+
+ case OPCODE_CONT:
+ if( GL_FALSE == assemble_CONT(pR700AsmCode) )
+ {
+ return GL_FALSE;
+ }
+ break;
+
+ case OPCODE_ENDLOOP:
+ if( GL_FALSE == assemble_ENDLOOP(pR700AsmCode) )
+ {
+ return GL_FALSE;
+ }
+ break;
+
+ case OPCODE_BGNSUB:
+ if( GL_FALSE == assemble_BGNSUB(pR700AsmCode, i) )
+ {
+ return GL_FALSE;
+ }
+ break;
+
+ case OPCODE_RET:
+ if( GL_FALSE == assemble_RET(pR700AsmCode) )
+ {
+ return GL_FALSE;
+ }
+ break;
+
+ case OPCODE_CAL:
+ if( GL_FALSE == assemble_CAL(pR700AsmCode,
+ pILInst[i].BranchTarget,
+ uiNumberInsts,
+ pILInst) )
+ {
+ return GL_FALSE;
+ }
+ break;
+
//case OPCODE_EXPORT:
// if ( GL_FALSE == assemble_EXPORT() )
// return GL_FALSE;
// break;
+ case OPCODE_ENDSUB:
+ return assemble_ENDSUB(pR700AsmCode);
+
case OPCODE_END:
//pR700AsmCode->uiCurInst = i;
//This is to remaind that if in later exoort there is depth/stencil
@@ -4169,6 +6464,123 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_TRUE;
}
+GLboolean InitShaderProgram(r700_AssemblerBase * pAsm)
+{
+ setRetInLoopFlag(pAsm, SQ_SEL_0);
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
+ return GL_TRUE;
+}
+
+GLboolean RelocProgram(r700_AssemblerBase * pAsm)
+{
+ GLuint i;
+ GLuint unCFoffset;
+ TypedShaderList * plstCFmain;
+ TypedShaderList * plstCFsub;
+
+ R700ShaderInstruction * pInst;
+ R700ControlFlowGenericClause * pCFInst;
+
+ plstCFmain = pAsm->CALLSTACK[0].plstCFInstructions_local;
+
+ /* remove flags init if they are not used */
+ if((pAsm->unCFflags & HAS_LOOPRET) == 0)
+ {
+ R700ControlFlowALUClause * pCF_ALU;
+ pInst = plstCFmain->pHead;
+ while(pInst)
+ {
+ if(SIT_CF_ALU == pInst->m_ShaderInstType)
+ {
+ pCF_ALU = (R700ControlFlowALUClause *)pInst;
+ if(0 == pCF_ALU->m_Word1.f.count)
+ {
+ pCF_ALU->m_Word1.f.cf_inst = SQ_CF_INST_NOP;
+ }
+ else
+ {
+ R700ALUInstruction * pALU = pCF_ALU->m_pLinkedALUInstruction;
+
+ pALU->m_pLinkedALUClause = NULL;
+ pALU = (R700ALUInstruction *)(pALU->pNextInst);
+ pALU->m_pLinkedALUClause = pCF_ALU;
+ pCF_ALU->m_pLinkedALUInstruction = pALU;
+
+ pCF_ALU->m_Word1.f.count--;
+ }
+ break;
+ }
+ pInst = pInst->pNextInst;
+ };
+ }
+
+ if(pAsm->CALLSTACK[0].max > 0)
+ {
+ pAsm->pR700Shader->uStackSize = ((pAsm->CALLSTACK[0].max + 3)>>2) + 2;
+ }
+
+ if(0 == pAsm->unSubArrayPointer)
+ {
+ return GL_TRUE;
+ }
+
+ unCFoffset = plstCFmain->uNumOfNode;
+
+ /* Reloc subs */
+ for(i=0; i<pAsm->unSubArrayPointer; i++)
+ {
+ pAsm->subs[i].unCFoffset = unCFoffset;
+ plstCFsub = &(pAsm->subs[i].lstCFInstructions_local);
+
+ pInst = plstCFsub->pHead;
+
+ /* reloc instructions */
+ while(pInst)
+ {
+ if(SIT_CF_GENERIC == pInst->m_ShaderInstType)
+ {
+ pCFInst = (R700ControlFlowGenericClause *)pInst;
+
+ switch (pCFInst->m_Word1.f.cf_inst)
+ {
+ case SQ_CF_INST_POP:
+ case SQ_CF_INST_JUMP:
+ case SQ_CF_INST_ELSE:
+ case SQ_CF_INST_LOOP_END:
+ case SQ_CF_INST_LOOP_START:
+ case SQ_CF_INST_LOOP_START_NO_AL:
+ case SQ_CF_INST_LOOP_CONTINUE:
+ case SQ_CF_INST_LOOP_BREAK:
+ pCFInst->m_Word0.f.addr += unCFoffset;
+ break;
+ default:
+ break;
+ }
+ }
+
+ pInst->m_uIndex += unCFoffset;
+
+ pInst = pInst->pNextInst;
+ };
+
+ /* Put sub into main */
+ plstCFmain->pTail->pNextInst = plstCFsub->pHead;
+ plstCFmain->pTail = plstCFsub->pTail;
+ plstCFmain->uNumOfNode += plstCFsub->uNumOfNode;
+
+ unCFoffset += plstCFsub->uNumOfNode;
+ }
+
+ /* reloc callers */
+ for(i=0; i<pAsm->unCallerArrayPointer; i++)
+ {
+ pAsm->callers[i].cf_ptr->m_Word0.f.addr
+ = pAsm->subs[pAsm->callers[i].subDescIndex].unCFoffset;
+ }
+
+ return GL_TRUE;
+}
+
GLboolean Process_Export(r700_AssemblerBase* pAsm,
GLuint type,
GLuint export_starting_index,
@@ -4463,6 +6875,25 @@ GLboolean Process_Vertex_Exports(r700_AssemblerBase *pR700AsmCode,
export_starting_index++;
}
}
+
+ for(i=VERT_RESULT_VAR0; i<VERT_RESULT_MAX; i++)
+ {
+ unBit = 1 << i;
+ if(OutputsWritten & unBit)
+ {
+ if( GL_FALSE == Process_Export(pR700AsmCode,
+ SQ_EXPORT_PARAM,
+ export_starting_index,
+ 1,
+ pR700AsmCode->ucVP_OutputMap[i],
+ GL_FALSE) )
+ {
+ return GL_FALSE;
+ }
+
+ export_starting_index++;
+ }
+ }
// At least one param should be exported
if (export_count)
@@ -4497,6 +6928,16 @@ GLboolean Clean_Up_Assembler(r700_AssemblerBase *pR700AsmCode)
{
FREE(pR700AsmCode->pucOutMask);
FREE(pR700AsmCode->pInstDeps);
+
+ if(NULL != pR700AsmCode->subs)
+ {
+ FREE(pR700AsmCode->subs);
+ }
+ if(NULL != pR700AsmCode->callers)
+ {
+ FREE(pR700AsmCode->callers);
+ }
+
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.h b/src/mesa/drivers/dri/r600/r700_assembler.h
index 8cbca066e95..130fc89dae1 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.h
+++ b/src/mesa/drivers/dri/r600/r700_assembler.h
@@ -72,7 +72,8 @@ typedef enum SrcRegisterType
SRC_REG_INPUT = 1,
SRC_REG_CONSTANT = 2,
SRC_REG_ALT_TEMPORARY = 3,
- NUMBER_OF_SRC_REG_TYPE = 4
+ SRC_REC_LITERAL = 4,
+ NUMBER_OF_SRC_REG_TYPE = 5
} SrcRegisterType;
typedef enum DstRegisterType
@@ -111,6 +112,12 @@ typedef struct PVSDSTtag
BITS addrmode1:1; //32
} PVSDST;
+typedef struct PVSINSTtag
+{
+ BITS literal :2;
+ BITS SaturateMode :2;
+} PVSINST;
+
typedef struct PVSSRCtag
{
BITS rtype:4;
@@ -148,6 +155,7 @@ typedef union PVSDWORDtag
{
BITS bits;
PVSDST dst;
+ PVSINST dst2;
PVSSRC src;
PVSMATH math;
float f;
@@ -251,6 +259,8 @@ enum
FC_IF = 1,
FC_LOOP = 2,
FC_REP = 3,
+ FC_PUSH_VPM = 4,
+ FC_PUSH_WQM = 5,
COND_NONE = 0,
COND_BOOL = 1,
@@ -263,22 +273,52 @@ enum
typedef struct FC_LEVEL
{
- unsigned int first; ///< first fc instruction on level (if, rep, loop)
- unsigned int* mid; ///< middle instructions - else or all breaks on this level
- unsigned int midLen;
- unsigned int type;
- unsigned int cond;
- unsigned int inv;
- unsigned int bpush; ///< 1 if first instruction does branch stack push
- int id; ///< id of bool or int variable
+ R700ControlFlowGenericClause * first;
+ R700ControlFlowGenericClause ** mid;
+ unsigned int unNumMid;
+ unsigned int midLen;
+ unsigned int type;
+ unsigned int cond;
+ unsigned int inv;
+ int id; ///< id of bool or int variable
} FC_LEVEL;
typedef struct VTX_FETCH_METHOD
{
- GLboolean bEnableMini;
- GLuint mega_fetch_remainder;
+ GLboolean bEnableMini;
+ GLuint mega_fetch_remainder;
} VTX_FETCH_METHOD;
+typedef struct SUB_OFFSET
+{
+ GLint subIL_Offset;
+ GLuint unCFoffset;
+ GLuint unStackDepthMax;
+ TypedShaderList lstCFInstructions_local;
+} SUB_OFFSET;
+
+typedef struct CALLER_POINTER
+{
+ GLint subIL_Offset;
+ GLint subDescIndex;
+ R700ControlFlowGenericClause* cf_ptr;
+} CALLER_POINTER;
+
+#define SQ_MAX_CALL_DEPTH 0x00000020
+
+typedef struct CALL_LEVEL
+{
+ unsigned int FCSP_BeforeEntry;
+ GLint subDescIndex;
+ GLushort current;
+ GLushort max;
+ TypedShaderList * plstCFInstructions_local;
+} CALL_LEVEL;
+
+#define HAS_CURRENT_LOOPRET 0x1L
+#define HAS_LOOPRET 0x2L
+#define LOOPRET_FLAGS HAS_LOOPRET | HAS_CURRENT_LOOPRET
+
typedef struct r700_AssemblerBase
{
R700ControlFlowSXClause* cf_last_export_ptr;
@@ -294,11 +334,14 @@ typedef struct r700_AssemblerBase
// No clause has been created yet
CF_CLAUSE_TYPE cf_current_clause_type;
+ BITS alu_x_opcode;
+
GLuint number_of_exports;
GLuint number_of_colorandz_exports;
GLuint number_of_export_opcodes;
PVSDWORD D;
+ PVSDWORD D2;
PVSDWORD S[3];
unsigned int uLastPosUpdate;
@@ -310,6 +353,8 @@ typedef struct r700_AssemblerBase
unsigned int number_used_registers;
unsigned int uUsedConsts;
+ unsigned int flag_reg_index;
+
// Fragment programs
unsigned int uiFP_AttributeMap[FRAG_ATTRIB_MAX];
unsigned int uiFP_OutputMap[FRAG_RESULT_MAX];
@@ -330,9 +375,6 @@ typedef struct r700_AssemblerBase
unsigned int FCSP;
FC_LEVEL fc_stack[32];
- unsigned int branch_depth;
- unsigned int max_branch_depth;
-
//-----------------------------------------------------------------------------------
// ArgSubst used in Assemble_Source() function
//-----------------------------------------------------------------------------------
@@ -378,6 +420,18 @@ typedef struct r700_AssemblerBase
GLboolean is_tex;
/* we inserted helper intructions and need barrier on next TEX ins */
GLboolean need_tex_barrier;
+
+ SUB_OFFSET * subs;
+ GLuint unSubArraySize;
+ GLuint unSubArrayPointer;
+ CALLER_POINTER * callers;
+ GLuint unCallerArraySize;
+ GLuint unCallerArrayPointer;
+ unsigned int CALLSP;
+ CALL_LEVEL CALLSTACK[SQ_MAX_CALL_DEPTH];
+
+ GLuint unCFflags;
+
} r700_AssemblerBase;
//Internal use
@@ -446,6 +500,10 @@ GLboolean assemble_alu_src(R700ALUInstruction* alu_instruction_ptr,
GLboolean add_alu_instruction(r700_AssemblerBase* pAsm,
R700ALUInstruction* alu_instruction_ptr,
GLuint contiguous_slots_needed);
+
+GLboolean add_cf_instruction(r700_AssemblerBase* pAsm);
+void add_return_inst(r700_AssemblerBase *pAsm);
+
void get_src_properties(R700ALUInstruction* alu_instruction_ptr,
int source_index,
BITS* psrc_sel,
@@ -467,6 +525,21 @@ GLboolean check_vector(r700_AssemblerBase* pAsm,
R700ALUInstruction* alu_instruction_ptr);
GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm);
GLboolean next_ins(r700_AssemblerBase *pAsm);
+
+GLboolean next_ins2(r700_AssemblerBase *pAsm);
+GLboolean assemble_alu_instruction2(r700_AssemblerBase *pAsm);
+
+/* TODO : merge next_ins/2/literal, assemble_alu_instruction/2/literal */
+GLboolean next_ins_literal(r700_AssemblerBase *pAsm, GLfloat * pLiteral);
+GLboolean assemble_alu_instruction_literal(r700_AssemblerBase *pAsm, GLfloat * pLiteral);
+
+GLboolean pops(r700_AssemblerBase *pAsm, GLuint pops);
+GLboolean jumpToOffest(r700_AssemblerBase *pAsm, GLuint pops, GLint offset);
+GLboolean setRetInLoopFlag(r700_AssemblerBase *pAsm, GLuint flagValue);
+GLboolean testFlag(r700_AssemblerBase *pAsm);
+GLboolean breakLoopOnFlag(r700_AssemblerBase *pAsm, GLuint unFCSP);
+GLboolean returnOnFlag(r700_AssemblerBase *pAsm, GLuint unIF);
+
GLboolean assemble_math_function(r700_AssemblerBase* pAsm, BITS opcode);
GLboolean assemble_ABS(r700_AssemblerBase *pAsm);
GLboolean assemble_ADD(r700_AssemblerBase *pAsm);
@@ -477,12 +550,14 @@ GLboolean assemble_COS(r700_AssemblerBase *pAsm);
GLboolean assemble_DOT(r700_AssemblerBase *pAsm);
GLboolean assemble_DST(r700_AssemblerBase *pAsm);
GLboolean assemble_EX2(r700_AssemblerBase *pAsm);
+GLboolean assemble_EXP(r700_AssemblerBase *pAsm);
GLboolean assemble_FLR(r700_AssemblerBase *pAsm);
GLboolean assemble_FLR_INT(r700_AssemblerBase *pAsm);
GLboolean assemble_FRC(r700_AssemblerBase *pAsm);
-GLboolean assemble_KIL(r700_AssemblerBase *pAsm);
+GLboolean assemble_KIL(r700_AssemblerBase *pAsm, GLuint opcode);
GLboolean assemble_LG2(r700_AssemblerBase *pAsm);
GLboolean assemble_LRP(r700_AssemblerBase *pAsm);
+GLboolean assemble_LOG(r700_AssemblerBase *pAsm);
GLboolean assemble_MAD(r700_AssemblerBase *pAsm);
GLboolean assemble_LIT(r700_AssemblerBase *pAsm);
GLboolean assemble_MAX(r700_AssemblerBase *pAsm);
@@ -495,14 +570,32 @@ GLboolean assemble_RSQ(r700_AssemblerBase *pAsm);
GLboolean assemble_SIN(r700_AssemblerBase *pAsm);
GLboolean assemble_SCS(r700_AssemblerBase *pAsm);
GLboolean assemble_SGE(r700_AssemblerBase *pAsm);
+
+GLboolean assemble_LOGIC(r700_AssemblerBase *pAsm, BITS opcode);
+GLboolean assemble_LOGIC_PRED(r700_AssemblerBase *pAsm, BITS opcode);
+
GLboolean assemble_SLT(r700_AssemblerBase *pAsm);
GLboolean assemble_STP(r700_AssemblerBase *pAsm);
GLboolean assemble_TEX(r700_AssemblerBase *pAsm);
GLboolean assemble_XPD(r700_AssemblerBase *pAsm);
GLboolean assemble_EXPORT(r700_AssemblerBase *pAsm);
-GLboolean assemble_IF(r700_AssemblerBase *pAsm);
+GLboolean assemble_IF(r700_AssemblerBase *pAsm, GLboolean bHasElse);
+GLboolean assemble_ELSE(r700_AssemblerBase *pAsm);
GLboolean assemble_ENDIF(r700_AssemblerBase *pAsm);
+GLboolean assemble_BGNLOOP(r700_AssemblerBase *pAsm);
+GLboolean assemble_BRK(r700_AssemblerBase *pAsm);
+GLboolean assemble_COND(r700_AssemblerBase *pAsm);
+GLboolean assemble_ENDLOOP(r700_AssemblerBase *pAsm);
+
+GLboolean assemble_BGNSUB(r700_AssemblerBase *pAsm, GLint nILindex);
+GLboolean assemble_ENDSUB(r700_AssemblerBase *pAsm);
+GLboolean assemble_RET(r700_AssemblerBase *pAsm);
+GLboolean assemble_CAL(r700_AssemblerBase *pAsm,
+ GLint nILindex,
+ GLuint uiNumberInsts,
+ struct prog_instruction *pILInst);
+
GLboolean Process_Export(r700_AssemblerBase* pAsm,
GLuint type,
GLuint export_starting_index,
@@ -514,12 +607,16 @@ GLboolean Move_Depth_Exports_To_Correct_Channels(r700_AssemblerBase *pAsm,
//Interface
-GLboolean AssembleInstr(GLuint uiNumberInsts,
+GLboolean AssembleInstr(GLuint uiFirstInst,
+ GLuint uiNumberInsts,
struct prog_instruction *pILInst,
r700_AssemblerBase *pR700AsmCode);
GLboolean Process_Fragment_Exports(r700_AssemblerBase *pR700AsmCode, GLbitfield OutputsWritten);
GLboolean Process_Vertex_Exports(r700_AssemblerBase *pR700AsmCode, GLbitfield OutputsWritten);
+GLboolean RelocProgram(r700_AssemblerBase * pAsm);
+GLboolean InitShaderProgram(r700_AssemblerBase * pAsm);
+
int Init_r700_AssemblerBase(SHADER_PIPE_TYPE spt, r700_AssemblerBase* pAsm, R700_Shader* pShader);
GLboolean Clean_Up_Assembler(r700_AssemblerBase *pR700AsmCode);
diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c
index 47b38d2e36f..8126777bf48 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.c
+++ b/src/mesa/drivers/dri/r600/r700_chip.c
@@ -54,11 +54,15 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) {
if (ctx->Texture.Unit[i]._ReallyEnabled) {
radeonTexObj *t = r700->textures[i];
+ uint32_t offset;
if (t) {
- if (!t->image_override)
+ if (!t->image_override) {
bo = t->mt->bo;
- else
+ offset = get_base_teximage_offset(t);
+ } else {
bo = t->bo;
+ offset = 0;
+ }
if (bo) {
r700SyncSurf(context, bo,
@@ -77,7 +81,7 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE6);
R600_OUT_BATCH_RELOC(r700->textures[i]->SQ_TEX_RESOURCE2,
bo,
- 0,
+ offset,
RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
R600_OUT_BATCH_RELOC(r700->textures[i]->SQ_TEX_RESOURCE3,
bo,
@@ -442,68 +446,77 @@ static void r700SendRenderTargetState(GLcontext *ctx, struct radeon_state_atom *
static void r700SendPSState(GLcontext *ctx, struct radeon_state_atom *atom)
{
- context_t *context = R700_CONTEXT(ctx);
- R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
- struct radeon_bo * pbo;
- BATCH_LOCALS(&context->radeon);
- radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
+ context_t *context = R700_CONTEXT(ctx);
+ R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
+ struct radeon_bo * pbo;
+ BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
- pbo = (struct radeon_bo *)r700GetActiveFpShaderBo(GL_CONTEXT(context));
+ pbo = (struct radeon_bo *)r700GetActiveFpShaderBo(GL_CONTEXT(context));
- if (!pbo)
- return;
+ if (!pbo)
+ return;
- r700SyncSurf(context, pbo, RADEON_GEM_DOMAIN_GTT, 0, SH_ACTION_ENA_bit);
+ r700SyncSurf(context, pbo, RADEON_GEM_DOMAIN_GTT, 0, SH_ACTION_ENA_bit);
- BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
- R600_OUT_BATCH_REGSEQ(SQ_PGM_START_PS, 1);
- R600_OUT_BATCH(r700->ps.SQ_PGM_START_PS.u32All);
- R600_OUT_BATCH_RELOC(r700->ps.SQ_PGM_START_PS.u32All,
- pbo,
- r700->ps.SQ_PGM_START_PS.u32All,
- RADEON_GEM_DOMAIN_GTT, 0, 0);
- END_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(SQ_PGM_START_PS, 1);
+ R600_OUT_BATCH(r700->ps.SQ_PGM_START_PS.u32All);
+ R600_OUT_BATCH_RELOC(r700->ps.SQ_PGM_START_PS.u32All,
+ pbo,
+ r700->ps.SQ_PGM_START_PS.u32All,
+ RADEON_GEM_DOMAIN_GTT, 0, 0);
+ END_BATCH();
- BEGIN_BATCH_NO_AUTOSTATE(9);
- R600_OUT_BATCH_REGVAL(SQ_PGM_RESOURCES_PS, r700->ps.SQ_PGM_RESOURCES_PS.u32All);
- R600_OUT_BATCH_REGVAL(SQ_PGM_EXPORTS_PS, r700->ps.SQ_PGM_EXPORTS_PS.u32All);
- R600_OUT_BATCH_REGVAL(SQ_PGM_CF_OFFSET_PS, r700->ps.SQ_PGM_CF_OFFSET_PS.u32All);
- END_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(9);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_RESOURCES_PS, r700->ps.SQ_PGM_RESOURCES_PS.u32All);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_EXPORTS_PS, r700->ps.SQ_PGM_EXPORTS_PS.u32All);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_CF_OFFSET_PS, r700->ps.SQ_PGM_CF_OFFSET_PS.u32All);
+ END_BATCH();
- COMMIT_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(3);
+ R600_OUT_BATCH_REGVAL(SQ_LOOP_CONST_0, 0x01000FFF);
+ END_BATCH();
+
+ COMMIT_BATCH();
}
static void r700SendVSState(GLcontext *ctx, struct radeon_state_atom *atom)
{
- context_t *context = R700_CONTEXT(ctx);
- R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
- struct radeon_bo * pbo;
- BATCH_LOCALS(&context->radeon);
- radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
+ context_t *context = R700_CONTEXT(ctx);
+ R700_CHIP_CONTEXT *r700 = R700_CONTEXT_STATES(context);
+ struct radeon_bo * pbo;
+ BATCH_LOCALS(&context->radeon);
+ radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
- pbo = (struct radeon_bo *)r700GetActiveVpShaderBo(GL_CONTEXT(context));
+ pbo = (struct radeon_bo *)r700GetActiveVpShaderBo(GL_CONTEXT(context));
- if (!pbo)
- return;
+ if (!pbo)
+ return;
- r700SyncSurf(context, pbo, RADEON_GEM_DOMAIN_GTT, 0, SH_ACTION_ENA_bit);
+ r700SyncSurf(context, pbo, RADEON_GEM_DOMAIN_GTT, 0, SH_ACTION_ENA_bit);
- BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
- R600_OUT_BATCH_REGSEQ(SQ_PGM_START_VS, 1);
- R600_OUT_BATCH(r700->vs.SQ_PGM_START_VS.u32All);
- R600_OUT_BATCH_RELOC(r700->vs.SQ_PGM_START_VS.u32All,
- pbo,
- r700->vs.SQ_PGM_START_VS.u32All,
- RADEON_GEM_DOMAIN_GTT, 0, 0);
- END_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(SQ_PGM_START_VS, 1);
+ R600_OUT_BATCH(r700->vs.SQ_PGM_START_VS.u32All);
+ R600_OUT_BATCH_RELOC(r700->vs.SQ_PGM_START_VS.u32All,
+ pbo,
+ r700->vs.SQ_PGM_START_VS.u32All,
+ RADEON_GEM_DOMAIN_GTT, 0, 0);
+ END_BATCH();
- BEGIN_BATCH_NO_AUTOSTATE(6);
- R600_OUT_BATCH_REGVAL(SQ_PGM_RESOURCES_VS, r700->vs.SQ_PGM_RESOURCES_VS.u32All);
- R600_OUT_BATCH_REGVAL(SQ_PGM_CF_OFFSET_VS, r700->vs.SQ_PGM_CF_OFFSET_VS.u32All);
- END_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(6);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_RESOURCES_VS, r700->vs.SQ_PGM_RESOURCES_VS.u32All);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_CF_OFFSET_VS, r700->vs.SQ_PGM_CF_OFFSET_VS.u32All);
+ END_BATCH();
- COMMIT_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(3);
+ R600_OUT_BATCH_REGVAL((SQ_LOOP_CONST_0 + 32*4), 0x0100000F);
+ //R600_OUT_BATCH_REGVAL((SQ_LOOP_CONST_0 + (SQ_LOOP_CONST_vs<2)), 0x0100000F);
+ END_BATCH();
+
+ COMMIT_BATCH();
}
static void r700SendFSState(GLcontext *ctx, struct radeon_state_atom *atom)
@@ -784,8 +797,7 @@ static void r700SendDBState(GLcontext *ctx, struct radeon_state_atom *atom)
BATCH_LOCALS(&context->radeon);
radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
- BEGIN_BATCH_NO_AUTOSTATE(23);
- R600_OUT_BATCH_REGVAL(DB_HTILE_DATA_BASE, r700->DB_HTILE_DATA_BASE.u32All);
+ BEGIN_BATCH_NO_AUTOSTATE(17);
R600_OUT_BATCH_REGSEQ(DB_STENCIL_CLEAR, 2);
R600_OUT_BATCH(r700->DB_STENCIL_CLEAR.u32All);
@@ -798,7 +810,6 @@ static void r700SendDBState(GLcontext *ctx, struct radeon_state_atom *atom)
R600_OUT_BATCH(r700->DB_RENDER_CONTROL.u32All);
R600_OUT_BATCH(r700->DB_RENDER_OVERRIDE.u32All);
- R600_OUT_BATCH_REGVAL(DB_HTILE_SURFACE, r700->DB_HTILE_SURFACE.u32All);
R600_OUT_BATCH_REGVAL(DB_ALPHA_TO_MASK, r700->DB_ALPHA_TO_MASK.u32All);
END_BATCH();
@@ -1282,7 +1293,7 @@ void r600InitAtoms(context_t *context)
context->radeon.hw.atomlist.name = "atom-list";
ALLOC_STATE(sq, always, 34, r700SendSQConfig);
- ALLOC_STATE(db, always, 23, r700SendDBState);
+ ALLOC_STATE(db, always, 17, r700SendDBState);
ALLOC_STATE(stencil, always, 4, r700SendStencilState);
ALLOC_STATE(db_target, always, 12, r700SendDepthTargetState);
ALLOC_STATE(sc, always, 15, r700SendSCState);
@@ -1303,8 +1314,8 @@ void r600InitAtoms(context_t *context)
ALLOC_STATE(spi, always, (59 + R700_MAX_SHADER_EXPORTS), r700SendSPIState);
ALLOC_STATE(vpt, always, 16, r700SendViewportState);
ALLOC_STATE(fs, always, 18, r700SendFSState);
- ALLOC_STATE(vs, always, 18, r700SendVSState);
- ALLOC_STATE(ps, always, 21, r700SendPSState);
+ ALLOC_STATE(vs, always, 21, r700SendVSState);
+ ALLOC_STATE(ps, always, 24, r700SendPSState);
ALLOC_STATE(vs_consts, vs_consts, (2 + (R700_MAX_DX9_CONSTS * 4)), r700SendVSConsts);
ALLOC_STATE(ps_consts, ps_consts, (2 + (R700_MAX_DX9_CONSTS * 4)), r700SendPSConsts);
ALLOC_STATE(vtx, vtx, (6 + (VERT_ATTRIB_MAX * 18)), r700SendVTXState);
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c
index 0f549ead9cc..e9ef6c86953 100644
--- a/src/mesa/drivers/dri/r600/r700_fragprog.c
+++ b/src/mesa/drivers/dri/r600/r700_fragprog.c
@@ -44,12 +44,18 @@
//TODO : Validate FP input with VP output.
void Map_Fragment_Program(r700_AssemblerBase *pAsm,
- struct gl_fragment_program *mesa_fp)
+ struct gl_fragment_program *mesa_fp,
+ GLcontext *ctx)
{
unsigned int unBit;
unsigned int i;
GLuint ui;
+ /* match fp inputs with vp exports. */
+ struct r700_vertex_program_cont *vpc =
+ (struct r700_vertex_program_cont *)ctx->VertexProgram._Current;
+ GLbitfield OutputsWritten = vpc->mesa_program.Base.OutputsWritten;
+
pAsm->number_used_registers = 0;
//Input mapping : mesa_fp->Base.InputsRead set the flag, set in
@@ -61,33 +67,89 @@ void Map_Fragment_Program(r700_AssemblerBase *pAsm,
pAsm->uiFP_AttributeMap[FRAG_ATTRIB_WPOS] = pAsm->number_used_registers++;
}
- unBit = 1 << FRAG_ATTRIB_COL0;
- if(mesa_fp->Base.InputsRead & unBit)
+ unBit = 1 << VERT_RESULT_COL0;
+ if(OutputsWritten & unBit)
{
pAsm->uiFP_AttributeMap[FRAG_ATTRIB_COL0] = pAsm->number_used_registers++;
}
- unBit = 1 << FRAG_ATTRIB_COL1;
- if(mesa_fp->Base.InputsRead & unBit)
+ unBit = 1 << VERT_RESULT_COL1;
+ if(OutputsWritten & unBit)
{
pAsm->uiFP_AttributeMap[FRAG_ATTRIB_COL1] = pAsm->number_used_registers++;
}
- unBit = 1 << FRAG_ATTRIB_FOGC;
- if(mesa_fp->Base.InputsRead & unBit)
- {
- pAsm->uiFP_AttributeMap[FRAG_ATTRIB_FOGC] = pAsm->number_used_registers++;
- }
+ unBit = 1 << VERT_RESULT_FOGC;
+ if(OutputsWritten & unBit)
+ {
+ pAsm->uiFP_AttributeMap[FRAG_ATTRIB_FOGC] = pAsm->number_used_registers++;
+ }
for(i=0; i<8; i++)
{
- unBit = 1 << (FRAG_ATTRIB_TEX0 + i);
- if(mesa_fp->Base.InputsRead & unBit)
+ unBit = 1 << (VERT_RESULT_TEX0 + i);
+ if(OutputsWritten & unBit)
{
pAsm->uiFP_AttributeMap[FRAG_ATTRIB_TEX0 + i] = pAsm->number_used_registers++;
}
}
+/* order has been taken care of */
+#if 1
+ for(i=VERT_RESULT_VAR0; i<VERT_RESULT_MAX; i++)
+ {
+ unBit = 1 << i;
+ if(OutputsWritten & unBit)
+ {
+ pAsm->uiFP_AttributeMap[i-VERT_RESULT_VAR0+FRAG_ATTRIB_VAR0] = pAsm->number_used_registers++;
+ }
+ }
+#else
+ if( (mesa_fp->Base.InputsRead >> FRAG_ATTRIB_VAR0) > 0 )
+ {
+ struct r700_vertex_program_cont *vpc =
+ (struct r700_vertex_program_cont *)ctx->VertexProgram._Current;
+ struct gl_program_parameter_list * VsVarying = vpc->mesa_program.Base.Varying;
+ struct gl_program_parameter_list * PsVarying = mesa_fp->Base.Varying;
+ struct gl_program_parameter * pVsParam;
+ struct gl_program_parameter * pPsParam;
+ GLuint j, k;
+ GLuint unMaxVarying = 0;
+
+ for(i=0; i<VsVarying->NumParameters; i++)
+ {
+ pAsm->uiFP_AttributeMap[i + FRAG_ATTRIB_VAR0] = 0;
+ }
+
+ for(i=FRAG_ATTRIB_VAR0; i<FRAG_ATTRIB_MAX; i++)
+ {
+ unBit = 1 << i;
+ if(mesa_fp->Base.InputsRead & unBit)
+ {
+ j = i - FRAG_ATTRIB_VAR0;
+ pPsParam = PsVarying->Parameters + j;
+
+ for(k=0; k<VsVarying->NumParameters; k++)
+ {
+ pVsParam = VsVarying->Parameters + k;
+
+ if( strcmp(pPsParam->Name, pVsParam->Name) == 0)
+ {
+ pAsm->uiFP_AttributeMap[i] = pAsm->number_used_registers + k;
+ if(k > unMaxVarying)
+ {
+ unMaxVarying = k;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ pAsm->number_used_registers += unMaxVarying + 1;
+ }
+#endif
+
/* Map temporary registers (GPRs) */
pAsm->starting_temp_register_number = pAsm->number_used_registers;
@@ -127,6 +189,8 @@ void Map_Fragment_Program(r700_AssemblerBase *pAsm,
pAsm->pucOutMask[ui] = 0x0;
}
+ pAsm->flag_reg_index = pAsm->number_used_registers++;
+
pAsm->uFirstHelpReg = pAsm->number_used_registers;
}
@@ -233,7 +297,8 @@ GLboolean Find_Instruction_Dependencies_fp(struct r700_fragment_program *fp,
}
GLboolean r700TranslateFragmentShader(struct r700_fragment_program *fp,
- struct gl_fragment_program *mesa_fp)
+ struct gl_fragment_program *mesa_fp,
+ GLcontext *ctx)
{
GLuint number_of_colors_exported;
GLboolean z_enabled = GL_FALSE;
@@ -241,14 +306,17 @@ GLboolean r700TranslateFragmentShader(struct r700_fragment_program *fp,
//Init_Program
Init_r700_AssemblerBase( SPT_FP, &(fp->r700AsmCode), &(fp->r700Shader) );
- Map_Fragment_Program(&(fp->r700AsmCode), mesa_fp);
+ Map_Fragment_Program(&(fp->r700AsmCode), mesa_fp, ctx);
if( GL_FALSE == Find_Instruction_Dependencies_fp(fp, mesa_fp) )
{
return GL_FALSE;
}
+
+ InitShaderProgram(&(fp->r700AsmCode));
- if( GL_FALSE == AssembleInstr(mesa_fp->Base.NumInstructions,
+ if( GL_FALSE == AssembleInstr(0,
+ mesa_fp->Base.NumInstructions,
&(mesa_fp->Base.Instructions[0]),
&(fp->r700AsmCode)) )
{
@@ -260,6 +328,11 @@ GLboolean r700TranslateFragmentShader(struct r700_fragment_program *fp,
return GL_FALSE;
}
+ if( GL_FALSE == RelocProgram(&(fp->r700AsmCode)) )
+ {
+ return GL_FALSE;
+ }
+
fp->r700Shader.nRegs = (fp->r700AsmCode.number_used_registers == 0) ? 0
: (fp->r700AsmCode.number_used_registers - 1);
@@ -300,7 +373,7 @@ void r700SelectFragmentShader(GLcontext *ctx)
}
if (GL_FALSE == fp->translated)
- r700TranslateFragmentShader(fp, &(fp->mesa_program));
+ r700TranslateFragmentShader(fp, &(fp->mesa_program), ctx);
}
void * r700GetActiveFpShaderBo(GLcontext * ctx)
@@ -393,27 +466,10 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
SETfield(r700->ps.SQ_PGM_EXPORTS_PS.u32All, fp->r700Shader.exportMode,
EXPORT_MODE_shift, EXPORT_MODE_mask);
- R600_STATECHANGE(context, db);
-
- if(fp->r700Shader.killIsUsed)
- {
- SETbit(r700->DB_SHADER_CONTROL.u32All, KILL_ENABLE_bit);
- }
- else
- {
- CLEARbit(r700->DB_SHADER_CONTROL.u32All, KILL_ENABLE_bit);
- }
-
- if(fp->r700Shader.depthIsExported)
- {
- SETbit(r700->DB_SHADER_CONTROL.u32All, Z_EXPORT_ENABLE_bit);
- }
- else
- {
- CLEARbit(r700->DB_SHADER_CONTROL.u32All, Z_EXPORT_ENABLE_bit);
- }
-
// emit ps input map
+ struct r700_vertex_program_cont *vpc =
+ (struct r700_vertex_program_cont *)ctx->VertexProgram._Current;
+ GLbitfield OutputsWritten = vpc->mesa_program.Base.OutputsWritten;
unBit = 1 << FRAG_ATTRIB_WPOS;
if(mesa_fp->Base.InputsRead & unBit)
{
@@ -427,8 +483,8 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
- unBit = 1 << FRAG_ATTRIB_COL0;
- if(mesa_fp->Base.InputsRead & unBit)
+ unBit = 1 << VERT_RESULT_COL0;
+ if(OutputsWritten & unBit)
{
ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_COL0];
SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
@@ -440,8 +496,8 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
- unBit = 1 << FRAG_ATTRIB_COL1;
- if(mesa_fp->Base.InputsRead & unBit)
+ unBit = 1 << VERT_RESULT_COL1;
+ if(OutputsWritten & unBit)
{
ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_COL1];
SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
@@ -453,8 +509,8 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
}
- unBit = 1 << FRAG_ATTRIB_FOGC;
- if(mesa_fp->Base.InputsRead & unBit)
+ unBit = 1 << VERT_RESULT_FOGC;
+ if(OutputsWritten & unBit)
{
ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_FOGC];
SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
@@ -468,8 +524,8 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
for(i=0; i<8; i++)
{
- unBit = 1 << (FRAG_ATTRIB_TEX0 + i);
- if(mesa_fp->Base.InputsRead & unBit)
+ unBit = 1 << (VERT_RESULT_TEX0 + i);
+ if(OutputsWritten & unBit)
{
ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_TEX0 + i];
SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
@@ -479,14 +535,34 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
}
}
- R600_STATECHANGE(context, cb);
+ for(i=VERT_RESULT_VAR0; i<VERT_RESULT_MAX; i++)
+ {
+ unBit = 1 << i;
+ if(OutputsWritten & unBit)
+ {
+ ui = pAsm->uiFP_AttributeMap[i-VERT_RESULT_VAR0+FRAG_ATTRIB_VAR0];
+ SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit);
+ SETfield(r700->SPI_PS_INPUT_CNTL[ui].u32All, ui,
+ SEMANTIC_shift, SEMANTIC_mask);
+ if (r700->SPI_INTERP_CONTROL_0.u32All & FLAT_SHADE_ENA_bit)
+ SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+ else
+ CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+ }
+ }
+
exportCount = (r700->ps.SQ_PGM_EXPORTS_PS.u32All & EXPORT_MODE_mask) / (1 << EXPORT_MODE_shift);
- r700->CB_SHADER_CONTROL.u32All = (1 << exportCount) - 1;
+ if (r700->CB_SHADER_CONTROL.u32All != ((1 << exportCount) - 1))
+ {
+ R600_STATECHANGE(context, cb);
+ r700->CB_SHADER_CONTROL.u32All = (1 << exportCount) - 1;
+ }
/* sent out shader constants. */
paramList = fp->mesa_program.Base.Parameters;
- if(NULL != paramList) {
+ if(NULL != paramList)
+ {
_mesa_load_state_parameters(ctx, paramList);
if (paramList->NumParameters > R700_MAX_DX9_CONSTS)
@@ -499,10 +575,10 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
unNumParamData = paramList->NumParameters;
for(ui=0; ui<unNumParamData; ui++) {
- r700->ps.consts[ui][0].f32All = paramList->ParameterValues[ui][0];
- r700->ps.consts[ui][1].f32All = paramList->ParameterValues[ui][1];
- r700->ps.consts[ui][2].f32All = paramList->ParameterValues[ui][2];
- r700->ps.consts[ui][3].f32All = paramList->ParameterValues[ui][3];
+ r700->ps.consts[ui][0].f32All = paramList->ParameterValues[ui][0];
+ r700->ps.consts[ui][1].f32All = paramList->ParameterValues[ui][1];
+ r700->ps.consts[ui][2].f32All = paramList->ParameterValues[ui][2];
+ r700->ps.consts[ui][3].f32All = paramList->ParameterValues[ui][3];
}
} else
r700->ps.num_consts = 0;
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.h b/src/mesa/drivers/dri/r600/r700_fragprog.h
index cbb108d2128..e562bfa4789 100644
--- a/src/mesa/drivers/dri/r600/r700_fragprog.h
+++ b/src/mesa/drivers/dri/r600/r700_fragprog.h
@@ -49,12 +49,14 @@ struct r700_fragment_program
/* Internal */
void Map_Fragment_Program(r700_AssemblerBase *pAsm,
- struct gl_fragment_program *mesa_fp);
+ struct gl_fragment_program *mesa_fp,
+ GLcontext *ctx);
GLboolean Find_Instruction_Dependencies_fp(struct r700_fragment_program *fp,
struct gl_fragment_program *mesa_fp);
GLboolean r700TranslateFragmentShader(struct r700_fragment_program *fp,
- struct gl_fragment_program *mesa_vp);
+ struct gl_fragment_program *mesa_vp,
+ GLcontext *ctx);
/* Interface */
extern void r700SelectFragmentShader(GLcontext *ctx);
diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c
index 268bfd8bf0b..eab27cbd842 100644
--- a/src/mesa/drivers/dri/r600/r700_render.c
+++ b/src/mesa/drivers/dri/r600/r700_render.c
@@ -59,9 +59,7 @@
void r700WaitForIdle(context_t *context);
void r700WaitForIdleClean(context_t *context);
-GLboolean r700SendTextureState(context_t *context);
static unsigned int r700PrimitiveType(int prim);
-void r600UpdateTextureState(GLcontext * ctx);
GLboolean r700SyncSurf(context_t *context,
struct radeon_bo *pbo,
uint32_t read_domain,
@@ -259,16 +257,6 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim
uint32_t vgt_index_type = 0;
uint32_t vgt_primitive_type = 0;
uint32_t vgt_num_indices = 0;
- GLboolean bUseDrawIndex;
-
- if(NULL != context->ind_buf.bo)
- {
- bUseDrawIndex = GL_TRUE;
- }
- else
- {
- bUseDrawIndex = GL_FALSE;
- }
type = r700PrimitiveType(prim);
num_indices = r700NumVerts(end - start, prim);
@@ -280,85 +268,154 @@ static void r700RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim
if (type < 0 || num_indices <= 0)
return;
- if(GL_TRUE == bUseDrawIndex)
- {
- total_emit = 3 /* VGT_PRIMITIVE_TYPE */
- + 2 /* VGT_INDEX_TYPE */
- + 2 /* NUM_INSTANCES */
- + 3 /* VGT_INDEX_OFFSET */
- + 5 + 2; /* DRAW_INDEX */
- }
- else
- {
- total_emit = 3 /* VGT_PRIMITIVE_TYPE */
- + 2 /* VGT_INDEX_TYPE */
- + 2 /* NUM_INSTANCES */
- + 3 /* VGT_INDEX_OFFSET */
- + 3; /* DRAW_INDEX_AUTO */
- }
-
- BEGIN_BATCH_NO_AUTOSTATE(total_emit);
- // prim
SETfield(vgt_primitive_type, type,
VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift, VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask);
- R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_CONFIG_REG, 1));
- R600_OUT_BATCH(mmVGT_PRIMITIVE_TYPE - ASIC_CONFIG_BASE_INDEX);
- R600_OUT_BATCH(vgt_primitive_type);
- // index type
SETfield(vgt_index_type, DI_INDEX_SIZE_32_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask);
- if(GL_TRUE == bUseDrawIndex)
+ if(GL_TRUE != context->ind_buf.is_32bit)
{
- if(GL_TRUE != context->ind_buf.is_32bit)
- {
SETfield(vgt_index_type, DI_INDEX_SIZE_16_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask);
- }
}
+ vgt_num_indices = num_indices;
+ SETfield(vgt_draw_initiator, DI_SRC_SEL_DMA, SOURCE_SELECT_shift, SOURCE_SELECT_mask);
+ SETfield(vgt_draw_initiator, DI_MAJOR_MODE_0, MAJOR_MODE_shift, MAJOR_MODE_mask);
+
+ total_emit = 3 /* VGT_PRIMITIVE_TYPE */
+ + 2 /* VGT_INDEX_TYPE */
+ + 2 /* NUM_INSTANCES */
+ + 5 + 2; /* DRAW_INDEX */
+
+ BEGIN_BATCH_NO_AUTOSTATE(total_emit);
+ // prim
+ R600_OUT_BATCH_REGSEQ(VGT_PRIMITIVE_TYPE, 1);
+ R600_OUT_BATCH(vgt_primitive_type);
+ // index type
R600_OUT_BATCH(CP_PACKET3(R600_IT_INDEX_TYPE, 0));
R600_OUT_BATCH(vgt_index_type);
-
// num instances
R600_OUT_BATCH(CP_PACKET3(R600_IT_NUM_INSTANCES, 0));
R600_OUT_BATCH(1);
-
// draw packet
- vgt_num_indices = num_indices;
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX, 3));
+ R600_OUT_BATCH(context->ind_buf.bo_offset);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(vgt_num_indices);
+ R600_OUT_BATCH(vgt_draw_initiator);
+ R600_OUT_BATCH_RELOC(context->ind_buf.bo_offset,
+ context->ind_buf.bo,
+ context->ind_buf.bo_offset,
+ RADEON_GEM_DOMAIN_GTT, 0, 0);
+ END_BATCH();
+ COMMIT_BATCH();
+}
+
+static void r700RunRenderPrimitiveImmediate(GLcontext * ctx, int start, int end, int prim)
+{
+ context_t *context = R700_CONTEXT(ctx);
+ BATCH_LOCALS(&context->radeon);
+ int type, i;
+ uint32_t num_indices, total_emit = 0;
+ uint32_t vgt_draw_initiator = 0;
+ uint32_t vgt_index_type = 0;
+ uint32_t vgt_primitive_type = 0;
+ uint32_t vgt_num_indices = 0;
+
+ type = r700PrimitiveType(prim);
+ num_indices = r700NumVerts(end - start, prim);
+
+ radeon_print(RADEON_RENDER, RADEON_TRACE,
+ "%s type %x num_indices %d\n",
+ __func__, type, num_indices);
- if(GL_TRUE == bUseDrawIndex)
+ if (type < 0 || num_indices <= 0)
+ return;
+
+ SETfield(vgt_primitive_type, type,
+ VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift, VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask);
+
+ if (num_indices > 0xffff)
{
- SETfield(vgt_draw_initiator, DI_SRC_SEL_DMA, SOURCE_SELECT_shift, SOURCE_SELECT_mask);
+ SETfield(vgt_index_type, DI_INDEX_SIZE_32_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask);
}
else
{
- SETfield(vgt_draw_initiator, DI_SRC_SEL_AUTO_INDEX, SOURCE_SELECT_shift, SOURCE_SELECT_mask);
+ SETfield(vgt_index_type, DI_INDEX_SIZE_16_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask);
}
+ vgt_num_indices = num_indices;
SETfield(vgt_draw_initiator, DI_MAJOR_MODE_0, MAJOR_MODE_shift, MAJOR_MODE_mask);
- if(GL_TRUE == bUseDrawIndex)
+ if (start == 0)
{
- R600_OUT_BATCH_REGSEQ(VGT_INDX_OFFSET, 1);
- R600_OUT_BATCH(0);
- R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX, 3));
- R600_OUT_BATCH(context->ind_buf.bo_offset);
- R600_OUT_BATCH(0);
- R600_OUT_BATCH(vgt_num_indices);
- R600_OUT_BATCH(vgt_draw_initiator);
- R600_OUT_BATCH_RELOC(context->ind_buf.bo_offset,
- context->ind_buf.bo,
- context->ind_buf.bo_offset,
- RADEON_GEM_DOMAIN_GTT, 0, 0);
+ SETfield(vgt_draw_initiator, DI_SRC_SEL_AUTO_INDEX, SOURCE_SELECT_shift, SOURCE_SELECT_mask);
}
else
{
- R600_OUT_BATCH_REGSEQ(VGT_INDX_OFFSET, 1);
- R600_OUT_BATCH(start);
- R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_AUTO,1));
+ if (num_indices > 0xffff)
+ {
+ total_emit += num_indices;
+ }
+ else
+ {
+ total_emit += (num_indices + 1) / 2;
+ }
+ SETfield(vgt_draw_initiator, DI_SRC_SEL_IMMEDIATE, SOURCE_SELECT_shift, SOURCE_SELECT_mask);
+ }
+
+ total_emit += 3 /* VGT_PRIMITIVE_TYPE */
+ + 2 /* VGT_INDEX_TYPE */
+ + 2 /* NUM_INSTANCES */
+ + 3; /* DRAW */
+
+ BEGIN_BATCH_NO_AUTOSTATE(total_emit);
+ // prim
+ R600_OUT_BATCH_REGSEQ(VGT_PRIMITIVE_TYPE, 1);
+ R600_OUT_BATCH(vgt_primitive_type);
+ // index type
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_INDEX_TYPE, 0));
+ R600_OUT_BATCH(vgt_index_type);
+ // num instances
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_NUM_INSTANCES, 0));
+ R600_OUT_BATCH(1);
+ // draw packet
+ if(start == 0)
+ {
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_AUTO, 1));
R600_OUT_BATCH(vgt_num_indices);
R600_OUT_BATCH(vgt_draw_initiator);
}
+ else
+ {
+ if (num_indices > 0xffff)
+ {
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_IMMD, (num_indices + 1)));
+ R600_OUT_BATCH(vgt_num_indices);
+ R600_OUT_BATCH(vgt_draw_initiator);
+ for (i = start; i < (start + num_indices); i++)
+ {
+ R600_OUT_BATCH(i);
+ }
+ }
+ else
+ {
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_IMMD, (((num_indices + 1) / 2) + 1)));
+ R600_OUT_BATCH(vgt_num_indices);
+ R600_OUT_BATCH(vgt_draw_initiator);
+ for (i = start; i < (start + num_indices); i += 2)
+ {
+ if ((i + 1) == (start + num_indices))
+ {
+ R600_OUT_BATCH(i);
+ }
+ else
+ {
+ R600_OUT_BATCH(((i + 1) << 16) | (i));
+ }
+ }
+ }
+ }
END_BATCH();
COMMIT_BATCH();
@@ -383,7 +440,12 @@ static GLuint r700PredictRenderSize(GLcontext* ctx,
else {
for (i = 0; i < nr_prims; ++i)
{
- dwords += 13;
+ if (prim[i].start == 0)
+ dwords += 10;
+ else if (prim[i].count > 0xffff)
+ dwords += prim[i].count + 10;
+ else
+ dwords += ((prim[i].count + 1) / 2) + 10;
}
}
@@ -464,6 +526,9 @@ static void r700ConvertAttrib(GLcontext *ctx, int count,
radeonAllocDmaRegion(&context->radeon, &attr->bo, &attr->bo_offset,
sizeof(GLfloat) * input->Size * count, 32);
+
+ radeon_bo_map(attr->bo, 1);
+
dst_ptr = (GLfloat *)ADD_POINTERS(attr->bo->ptr, attr->bo_offset);
assert(src_ptr != NULL);
@@ -497,6 +562,8 @@ static void r700ConvertAttrib(GLcontext *ctx, int count,
break;
}
+ radeon_bo_unmap(attr->bo);
+
if (mapped_named_bo)
{
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
@@ -515,6 +582,8 @@ static void r700AlignDataToDword(GLcontext *ctx,
radeonAllocDmaRegion(&context->radeon, &attr->bo, &attr->bo_offset, size, 32);
+ radeon_bo_map(attr->bo, 1);
+
if (!input->BufferObj->Pointer)
{
ctx->Driver.MapBuffer(ctx, GL_ARRAY_BUFFER, GL_READ_ONLY_ARB, input->BufferObj);
@@ -534,6 +603,7 @@ static void r700AlignDataToDword(GLcontext *ctx,
}
}
+ radeon_bo_unmap(attr->bo);
if (mapped_named_bo)
{
ctx->Driver.UnmapBuffer(ctx, GL_ARRAY_BUFFER, input->BufferObj);
@@ -602,14 +672,18 @@ static void r700SetupStreams(GLcontext *ctx, const struct gl_client_array *input
radeonAllocDmaRegion(&context->radeon, &context->stream_desc[index].bo,
&context->stream_desc[index].bo_offset, size, 32);
+
+ radeon_bo_map(context->stream_desc[index].bo, 1);
assert(context->stream_desc[index].bo->ptr != NULL);
+
+
dst = (uint32_t *)ADD_POINTERS(context->stream_desc[index].bo->ptr,
context->stream_desc[index].bo_offset);
switch (context->stream_desc[index].dwords)
{
case 1:
- radeonEmitVec4(dst, input[i]->Ptr, input[i]->StrideB, local_count);
+ radeonEmitVec4(dst, input[i]->Ptr, input[i]->StrideB, local_count);
break;
case 2:
radeonEmitVec8(dst, input[i]->Ptr, input[i]->StrideB, local_count);
@@ -624,6 +698,7 @@ static void r700SetupStreams(GLcontext *ctx, const struct gl_client_array *input
assert(0);
break;
}
+ radeon_bo_unmap(context->stream_desc[index].bo);
}
}
@@ -695,6 +770,7 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo,
&context->ind_buf.bo_offset, size, 4);
+ radeon_bo_map(context->ind_buf.bo, 1);
assert(context->ind_buf.bo->ptr != NULL);
out = (GLuint *)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset);
@@ -708,6 +784,7 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
*out++ = in[i];
}
+ radeon_bo_unmap(context->ind_buf.bo);
#if MESA_BIG_ENDIAN
}
else
@@ -718,6 +795,7 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo,
&context->ind_buf.bo_offset, size, 4);
+ radeon_bo_map(context->ind_buf.bo, 1);
assert(context->ind_buf.bo->ptr != NULL);
out = (GLuint *)ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset);
@@ -730,6 +808,7 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
{
*out++ = in[i];
}
+ radeon_bo_unmap(context->ind_buf.bo);
#endif
}
@@ -775,11 +854,13 @@ static void r700SetupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
radeonAllocDmaRegion(&context->radeon, &context->ind_buf.bo,
&context->ind_buf.bo_offset, size, 4);
+ radeon_bo_map(context->ind_buf.bo, 1);
assert(context->ind_buf.bo->ptr != NULL);
dst_ptr = ADD_POINTERS(context->ind_buf.bo->ptr, context->ind_buf.bo_offset);
_mesa_memcpy(dst_ptr, src_ptr, size);
+ radeon_bo_unmap(context->ind_buf.bo);
context->ind_buf.is_32bit = (mesa_ind_buf->type == GL_UNSIGNED_INT);
context->ind_buf.count = mesa_ind_buf->count;
@@ -827,7 +908,7 @@ static GLboolean r700TryDrawPrims(GLcontext *ctx,
r700SetScissor(context);
r700SetupVertexProgram(ctx);
r700SetupFragmentProgram(ctx);
- r600UpdateTextureState(ctx);
+ r700UpdateShaderStates(ctx);
GLuint emit_end = r700PredictRenderSize(ctx, prim, ib, nr_prims)
+ context->radeon.cmdbuf.cs->cdw;
@@ -840,10 +921,16 @@ static GLboolean r700TryDrawPrims(GLcontext *ctx,
radeon_debug_add_indent();
for (i = 0; i < nr_prims; ++i)
{
- r700RunRenderPrimitive(ctx,
- prim[i].start,
- prim[i].start + prim[i].count,
- prim[i].mode);
+ if (context->ind_buf.bo)
+ r700RunRenderPrimitive(ctx,
+ prim[i].start,
+ prim[i].start + prim[i].count,
+ prim[i].mode);
+ else
+ r700RunRenderPrimitiveImmediate(ctx,
+ prim[i].start,
+ prim[i].start + prim[i].count,
+ prim[i].mode);
}
radeon_debug_remove_indent();
diff --git a/src/mesa/drivers/dri/r600/r700_shader.c b/src/mesa/drivers/dri/r600/r700_shader.c
index 955ea4e4e1d..2eed1acc2f5 100644
--- a/src/mesa/drivers/dri/r600/r700_shader.c
+++ b/src/mesa/drivers/dri/r600/r700_shader.c
@@ -159,13 +159,18 @@ void Init_R700_Shader(R700_Shader * pShader)
pShader->lstVTXInstructions.uNumOfNode=0;
}
+void SetActiveCFlist(R700_Shader *pShader, TypedShaderList * plstCF)
+{
+ pShader->plstCFInstructions_active = plstCF;
+}
+
void AddCFInstruction(R700_Shader *pShader, R700ControlFlowInstruction *pCFInst)
{
R700ControlFlowSXClause* pSXClause;
R700ControlFlowSMXClause* pSMXClause;
- pCFInst->m_uIndex = pShader->lstCFInstructions.uNumOfNode;
- AddInstToList(&(pShader->lstCFInstructions),
+ pCFInst->m_uIndex = pShader->plstCFInstructions_active->uNumOfNode;
+ AddInstToList(pShader->plstCFInstructions_active,
(R700ShaderInstruction*)pCFInst);
pShader->uShaderBinaryDWORDSize += GetInstructionSize(pCFInst->m_ShaderInstType);
diff --git a/src/mesa/drivers/dri/r600/r700_shader.h b/src/mesa/drivers/dri/r600/r700_shader.h
index c6a058617ec..0599ffd901f 100644
--- a/src/mesa/drivers/dri/r600/r700_shader.h
+++ b/src/mesa/drivers/dri/r600/r700_shader.h
@@ -109,6 +109,7 @@ typedef struct R700_Shader
GLuint uStackSize;
GLuint uMaxCallDepth;
+ TypedShaderList * plstCFInstructions_active;
TypedShaderList lstCFInstructions;
TypedShaderList lstALUInstructions;
TypedShaderList lstTEXInstructions;
@@ -132,13 +133,13 @@ void TakeInstOutFromList(TypedShaderList * plstCFInstructions, R700ShaderInstruc
void ResolveLinks(R700_Shader *pShader);
void Assemble(R700_Shader *pShader);
-
//Interface
void Init_R700_Shader(R700_Shader * pShader);
void AddCFInstruction(R700_Shader *pShader, R700ControlFlowInstruction *pCFInst);
void AddVTXInstruction(R700_Shader *pShader, R700VertexInstruction *pVTXInst);
void AddTEXInstruction(R700_Shader *pShader, R700TextureInstruction *pTEXInst);
void AddALUInstruction(R700_Shader *pShader, R700ALUInstruction *pALUInst);
+void SetActiveCFlist(R700_Shader *pShader, TypedShaderList * plstCF);
void LoadProgram(R700_Shader *pShader);
void UpdateShaderRegisters(R700_Shader *pShader);
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index b2788872666..d7420678ff0 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -54,7 +54,7 @@
#include "r700_fragprog.h"
#include "r700_vertprog.h"
-
+void r600UpdateTextureState(GLcontext * ctx);
static void r700SetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean state);
static void r700UpdatePolygonMode(GLcontext * ctx);
static void r700SetPolygonOffsetState(GLcontext * ctx, GLboolean state);
@@ -191,6 +191,67 @@ static void r700InvalidateState(GLcontext * ctx, GLuint new_state) //-----------
context->radeon.NewGLState |= new_state;
}
+static void r700SetDBRenderState(GLcontext * ctx)
+{
+ context_t *context = R700_CONTEXT(ctx);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
+ struct r700_fragment_program *fp = (struct r700_fragment_program *)
+ (ctx->FragmentProgram._Current);
+
+ R600_STATECHANGE(context, db);
+
+ SETbit(r700->DB_SHADER_CONTROL.u32All, DUAL_EXPORT_ENABLE_bit);
+ SETfield(r700->DB_SHADER_CONTROL.u32All, EARLY_Z_THEN_LATE_Z, Z_ORDER_shift, Z_ORDER_mask);
+ /* XXX need to enable htile for hiz/s */
+ SETfield(r700->DB_RENDER_OVERRIDE.u32All, FORCE_DISABLE, FORCE_HIZ_ENABLE_shift, FORCE_HIZ_ENABLE_mask);
+ SETfield(r700->DB_RENDER_OVERRIDE.u32All, FORCE_DISABLE, FORCE_HIS_ENABLE0_shift, FORCE_HIS_ENABLE0_mask);
+ SETfield(r700->DB_RENDER_OVERRIDE.u32All, FORCE_DISABLE, FORCE_HIS_ENABLE1_shift, FORCE_HIS_ENABLE1_mask);
+
+ if (context->radeon.query.current)
+ {
+ SETbit(r700->DB_RENDER_OVERRIDE.u32All, NOOP_CULL_DISABLE_bit);
+ if (context->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV770)
+ {
+ SETbit(r700->DB_RENDER_CONTROL.u32All, PERFECT_ZPASS_COUNTS_bit);
+ }
+ }
+ else
+ {
+ CLEARbit(r700->DB_RENDER_OVERRIDE.u32All, NOOP_CULL_DISABLE_bit);
+ if (context->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV770)
+ {
+ CLEARbit(r700->DB_RENDER_CONTROL.u32All, PERFECT_ZPASS_COUNTS_bit);
+ }
+ }
+
+ if (fp)
+ {
+ if (fp->r700Shader.killIsUsed)
+ {
+ SETbit(r700->DB_SHADER_CONTROL.u32All, KILL_ENABLE_bit);
+ }
+ else
+ {
+ CLEARbit(r700->DB_SHADER_CONTROL.u32All, KILL_ENABLE_bit);
+ }
+
+ if (fp->r700Shader.depthIsExported)
+ {
+ SETbit(r700->DB_SHADER_CONTROL.u32All, Z_EXPORT_ENABLE_bit);
+ }
+ else
+ {
+ CLEARbit(r700->DB_SHADER_CONTROL.u32All, Z_EXPORT_ENABLE_bit);
+ }
+ }
+}
+
+void r700UpdateShaderStates(GLcontext * ctx)
+{
+ r700SetDBRenderState(ctx);
+ r600UpdateTextureState(ctx);
+}
+
static void r700SetDepthState(GLcontext * ctx)
{
context_t *context = R700_CONTEXT(ctx);
@@ -1672,20 +1733,10 @@ void r700InitState(GLcontext * ctx) //-------------------
r700Enable(ctx, GL_DEPTH_TEST, ctx->Depth.Test);
r700DepthMask(ctx, ctx->Depth.Mask);
r700DepthFunc(ctx, ctx->Depth.Func);
- SETbit(r700->DB_SHADER_CONTROL.u32All, DUAL_EXPORT_ENABLE_bit);
-
r700->DB_DEPTH_CLEAR.u32All = 0x3F800000;
-
- r700->DB_RENDER_CONTROL.u32All = 0;
SETbit(r700->DB_RENDER_CONTROL.u32All, STENCIL_COMPRESS_DISABLE_bit);
SETbit(r700->DB_RENDER_CONTROL.u32All, DEPTH_COMPRESS_DISABLE_bit);
- r700->DB_RENDER_OVERRIDE.u32All = 0;
- if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770)
- SETbit(r700->DB_RENDER_OVERRIDE.u32All, FORCE_SHADER_Z_ORDER_bit);
- SETfield(r700->DB_RENDER_OVERRIDE.u32All, FORCE_DISABLE, FORCE_HIZ_ENABLE_shift, FORCE_HIZ_ENABLE_mask);
- SETfield(r700->DB_RENDER_OVERRIDE.u32All, FORCE_DISABLE, FORCE_HIS_ENABLE0_shift, FORCE_HIS_ENABLE0_mask);
- SETfield(r700->DB_RENDER_OVERRIDE.u32All, FORCE_DISABLE, FORCE_HIS_ENABLE1_shift, FORCE_HIS_ENABLE1_mask);
- SETbit(r700->DB_RENDER_OVERRIDE.u32All, NOOP_CULL_DISABLE_bit);
+ r700SetDBRenderState(ctx);
r700->DB_ALPHA_TO_MASK.u32All = 0;
SETfield(r700->DB_ALPHA_TO_MASK.u32All, 2, ALPHA_TO_MASK_OFFSET0_shift, ALPHA_TO_MASK_OFFSET0_mask);
diff --git a/src/mesa/drivers/dri/r600/r700_state.h b/src/mesa/drivers/dri/r600/r700_state.h
index 209189d8d72..60c6a7f23ca 100644
--- a/src/mesa/drivers/dri/r600/r700_state.h
+++ b/src/mesa/drivers/dri/r600/r700_state.h
@@ -35,7 +35,7 @@
extern void r700UpdateStateParameters(GLcontext * ctx, GLuint new_state);
extern void r700UpdateShaders (GLcontext * ctx);
-extern void r700UpdateShaders2(GLcontext * ctx);
+extern void r700UpdateShaderStates(GLcontext * ctx);
extern void r700UpdateViewportOffset(GLcontext * ctx);
diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c
index ffc6068bd88..d3d1da79592 100644
--- a/src/mesa/drivers/dri/r600/r700_vertprog.c
+++ b/src/mesa/drivers/dri/r600/r700_vertprog.c
@@ -111,6 +111,15 @@ unsigned int Map_Vertex_Output(r700_AssemblerBase *pAsm,
}
}
+ for(i=VERT_RESULT_VAR0; i<VERT_RESULT_MAX; i++)
+ {
+ unBit = 1 << i;
+ if(mesa_vp->Base.OutputsWritten & unBit)
+ {
+ pAsm->ucVP_OutputMap[i] = unTotal++;
+ }
+ }
+
return (unTotal - unStart);
}
@@ -235,6 +244,8 @@ void Map_Vertex_Program(GLcontext *ctx,
pAsm->number_used_registers += mesa_vp->Base.NumTemporaries;
}
+ pAsm->flag_reg_index = pAsm->number_used_registers++;
+
pAsm->uFirstHelpReg = pAsm->number_used_registers;
}
@@ -324,7 +335,10 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx,
return NULL;
}
- if(GL_FALSE == AssembleInstr(vp->mesa_program->Base.NumInstructions,
+ InitShaderProgram(&(vp->r700AsmCode));
+
+ if(GL_FALSE == AssembleInstr(0,
+ vp->mesa_program->Base.NumInstructions,
&(vp->mesa_program->Base.Instructions[0]),
&(vp->r700AsmCode)) )
{
@@ -336,6 +350,11 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx,
return NULL;
}
+ if( GL_FALSE == RelocProgram(&(vp->r700AsmCode)) )
+ {
+ return GL_FALSE;
+ }
+
vp->r700Shader.nRegs = (vp->r700AsmCode.number_used_registers == 0) ? 0
: (vp->r700AsmCode.number_used_registers - 1);
@@ -612,6 +631,12 @@ GLboolean r700SetupVertexProgram(GLcontext * ctx)
paramList = vp->mesa_program->Base.Parameters;
if(NULL != paramList) {
+ /* vp->mesa_program was cloned, not updated by glsl shader api. */
+ /* _mesa_reference_program has already checked glsl shProg is ok and set ctx->VertexProgem._Current */
+ /* so, use ctx->VertexProgem._Current */
+ struct gl_program_parameter_list *paramListOrginal =
+ paramListOrginal = ctx->VertexProgram._Current->Base.Parameters;
+
_mesa_load_state_parameters(ctx, paramList);
if (paramList->NumParameters > R700_MAX_DX9_CONSTS)
@@ -624,10 +649,20 @@ GLboolean r700SetupVertexProgram(GLcontext * ctx)
unNumParamData = paramList->NumParameters;
for(ui=0; ui<unNumParamData; ui++) {
- r700->vs.consts[ui][0].f32All = paramList->ParameterValues[ui][0];
- r700->vs.consts[ui][1].f32All = paramList->ParameterValues[ui][1];
- r700->vs.consts[ui][2].f32All = paramList->ParameterValues[ui][2];
- r700->vs.consts[ui][3].f32All = paramList->ParameterValues[ui][3];
+ if(paramList->Parameters[ui].Type == PROGRAM_UNIFORM)
+ {
+ r700->vs.consts[ui][0].f32All = paramListOrginal->ParameterValues[ui][0];
+ r700->vs.consts[ui][1].f32All = paramListOrginal->ParameterValues[ui][1];
+ r700->vs.consts[ui][2].f32All = paramListOrginal->ParameterValues[ui][2];
+ r700->vs.consts[ui][3].f32All = paramListOrginal->ParameterValues[ui][3];
+ }
+ else
+ {
+ r700->vs.consts[ui][0].f32All = paramList->ParameterValues[ui][0];
+ r700->vs.consts[ui][1].f32All = paramList->ParameterValues[ui][1];
+ r700->vs.consts[ui][2].f32All = paramList->ParameterValues[ui][2];
+ r700->vs.consts[ui][3].f32All = paramList->ParameterValues[ui][3];
+ }
}
} else
r700->vs.num_consts = 0;
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_drm.h b/src/mesa/drivers/dri/radeon/radeon_bo_drm.h
index 71413716333..46e30b905a0 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bo_drm.h
+++ b/src/mesa/drivers/dri/radeon/radeon_bo_drm.h
@@ -39,6 +39,7 @@
#define RADEON_BO_FLAGS_MICRO_TILE 2
struct radeon_bo_manager;
+struct radeon_cs;
struct radeon_bo {
uint32_t alignment;
@@ -74,6 +75,7 @@ struct radeon_bo_funcs {
int (*bo_get_tiling)(struct radeon_bo *bo, uint32_t *tiling_flags,
uint32_t *pitch);
int (*bo_is_busy)(struct radeon_bo *bo, uint32_t *domain);
+ int (*bo_is_referenced_by_cs)(struct radeon_bo *bo, struct radeon_cs *cs);
};
struct radeon_bo_manager {
@@ -199,6 +201,15 @@ static inline int radeon_bo_is_static(struct radeon_bo *bo)
return 0;
}
+static inline int _radeon_bo_is_referenced_by_cs(struct radeon_bo *bo,
+ struct radeon_cs *cs,
+ const char *file,
+ const char *func,
+ unsigned line)
+{
+ return bo->cref > 1;
+}
+
#define radeon_bo_open(bom, h, s, a, d, f)\
_radeon_bo_open(bom, h, s, a, d, f, __FILE__, __FUNCTION__, __LINE__)
#define radeon_bo_ref(bo)\
@@ -215,5 +226,7 @@ static inline int radeon_bo_is_static(struct radeon_bo *bo)
_radeon_bo_wait(bo, __FILE__, __func__, __LINE__)
#define radeon_bo_is_busy(bo, domain) \
_radeon_bo_is_busy(bo, domain, __FILE__, __func__, __LINE__)
+#define radeon_bo_is_referenced_by_cs(bo, cs) \
+ _radeon_bo_is_referenced_by_cs(bo, cs, __FILE__, __FUNCTION__, __LINE__)
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
index 8fac5c6c512..99d3ec7005e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
+++ b/src/mesa/drivers/dri/radeon/radeon_buffer_objects.c
@@ -136,8 +136,13 @@ radeonBufferSubData(GLcontext * ctx,
const GLvoid * data,
struct gl_buffer_object *obj)
{
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_buffer_object *radeon_obj = get_radeon_buffer_object(obj);
+ if (radeon_bo_is_referenced_by_cs(radeon_obj->bo, radeon->cmdbuf.cs)) {
+ radeon_firevertices(radeon);
+ }
+
radeon_bo_map(radeon_obj->bo, GL_TRUE);
_mesa_memcpy(radeon_obj->bo->ptr + offset, data, size);
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 097ab7cf613..c81e80e820e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -840,7 +840,7 @@ void radeonDrawBuffer( GLcontext *ctx, GLenum mode )
*/
if (!was_front_buffer_rendering && radeon->is_front_buffer_rendering) {
radeon_update_renderbuffers(radeon->dri.context,
- radeon->dri.context->driDrawablePriv);
+ radeon->dri.context->driDrawablePriv, GL_FALSE);
}
}
@@ -857,7 +857,7 @@ void radeonReadBuffer( GLcontext *ctx, GLenum mode )
if (!was_front_buffer_reading && rmesa->is_front_buffer_reading) {
radeon_update_renderbuffers(rmesa->dri.context,
- rmesa->dri.context->driReadablePriv);
+ rmesa->dri.context->driReadablePriv, GL_FALSE);
}
}
/* nothing, until we implement h/w glRead/CopyPixels or CopyTexImage */
@@ -908,9 +908,9 @@ void radeon_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei he
if (radeon->is_front_buffer_rendering) {
ctx->Driver.Flush(ctx);
}
- radeon_update_renderbuffers(driContext, driContext->driDrawablePriv);
+ radeon_update_renderbuffers(driContext, driContext->driDrawablePriv, GL_FALSE);
if (driContext->driDrawablePriv != driContext->driReadablePriv)
- radeon_update_renderbuffers(driContext, driContext->driReadablePriv);
+ radeon_update_renderbuffers(driContext, driContext->driReadablePriv, GL_FALSE);
}
old_viewport = ctx->Driver.Viewport;
@@ -1123,8 +1123,6 @@ void radeonFlush(GLcontext *ctx)
if (radeon->dma.flush)
radeon->dma.flush( ctx );
- radeonEmitState(radeon);
-
if (radeon->cmdbuf.cs->cdw)
rcommonFlushCmdBuf(radeon, __FUNCTION__);
@@ -1147,9 +1145,6 @@ void radeonFlush(GLcontext *ctx)
}
}
}
-
- make_empty_list(&radeon->query.not_flushed_head);
-
}
/* Make sure all commands have been sent to the hardware and have
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index fe99644907f..5c68bf5df6c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -262,10 +262,9 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
else
radeon->texture_row_align = 32;
radeon->texture_rect_row_align = 64;
- radeon->texture_compressed_row_align = 64;
+ radeon->texture_compressed_row_align = 32;
}
- make_empty_list(&radeon->query.not_flushed_head);
radeon_init_dma(radeon);
return GL_TRUE;
@@ -500,7 +499,8 @@ radeon_bits_per_pixel(const struct radeon_renderbuffer *rb)
}
void
-radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
+radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
+ GLboolean front_only)
{
unsigned int attachments[10];
__DRIbuffer *buffers = NULL;
@@ -526,7 +526,7 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
struct radeon_renderbuffer *stencil_rb;
i = 0;
- if ((radeon->is_front_buffer_rendering ||
+ if ((front_only || radeon->is_front_buffer_rendering ||
radeon->is_front_buffer_reading ||
!draw->color_rb[1])
&& draw->color_rb[0]) {
@@ -534,23 +534,25 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
attachments[i++] = radeon_bits_per_pixel(draw->color_rb[0]);
}
- if (draw->color_rb[1]) {
- attachments[i++] = __DRI_BUFFER_BACK_LEFT;
- attachments[i++] = radeon_bits_per_pixel(draw->color_rb[1]);
- }
+ if (!front_only) {
+ if (draw->color_rb[1]) {
+ attachments[i++] = __DRI_BUFFER_BACK_LEFT;
+ attachments[i++] = radeon_bits_per_pixel(draw->color_rb[1]);
+ }
- depth_rb = radeon_get_renderbuffer(&draw->base, BUFFER_DEPTH);
- stencil_rb = radeon_get_renderbuffer(&draw->base, BUFFER_STENCIL);
-
- if ((depth_rb != NULL) && (stencil_rb != NULL)) {
- attachments[i++] = __DRI_BUFFER_DEPTH_STENCIL;
- attachments[i++] = radeon_bits_per_pixel(depth_rb);
- } else if (depth_rb != NULL) {
- attachments[i++] = __DRI_BUFFER_DEPTH;
- attachments[i++] = radeon_bits_per_pixel(depth_rb);
- } else if (stencil_rb != NULL) {
- attachments[i++] = __DRI_BUFFER_STENCIL;
- attachments[i++] = radeon_bits_per_pixel(stencil_rb);
+ depth_rb = radeon_get_renderbuffer(&draw->base, BUFFER_DEPTH);
+ stencil_rb = radeon_get_renderbuffer(&draw->base, BUFFER_STENCIL);
+
+ if ((depth_rb != NULL) && (stencil_rb != NULL)) {
+ attachments[i++] = __DRI_BUFFER_DEPTH_STENCIL;
+ attachments[i++] = radeon_bits_per_pixel(depth_rb);
+ } else if (depth_rb != NULL) {
+ attachments[i++] = __DRI_BUFFER_DEPTH;
+ attachments[i++] = radeon_bits_per_pixel(depth_rb);
+ } else if (stencil_rb != NULL) {
+ attachments[i++] = __DRI_BUFFER_STENCIL;
+ attachments[i++] = radeon_bits_per_pixel(stencil_rb);
+ }
}
buffers = (*screen->dri2.loader->getBuffersWithFormat)(drawable,
@@ -563,12 +565,14 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
i = 0;
if (draw->color_rb[0])
attachments[i++] = __DRI_BUFFER_FRONT_LEFT;
- if (draw->color_rb[1])
- attachments[i++] = __DRI_BUFFER_BACK_LEFT;
- if (radeon_get_renderbuffer(&draw->base, BUFFER_DEPTH))
- attachments[i++] = __DRI_BUFFER_DEPTH;
- if (radeon_get_renderbuffer(&draw->base, BUFFER_STENCIL))
- attachments[i++] = __DRI_BUFFER_STENCIL;
+ if (!front_only) {
+ if (draw->color_rb[1])
+ attachments[i++] = __DRI_BUFFER_BACK_LEFT;
+ if (radeon_get_renderbuffer(&draw->base, BUFFER_DEPTH))
+ attachments[i++] = __DRI_BUFFER_DEPTH;
+ if (radeon_get_renderbuffer(&draw->base, BUFFER_STENCIL))
+ attachments[i++] = __DRI_BUFFER_STENCIL;
+ }
buffers = (*screen->dri2.loader->getBuffers)(drawable,
&drawable->w,
@@ -736,9 +740,9 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
readfb = driReadPriv->driverPrivate;
if (driContextPriv->driScreenPriv->dri2.enabled) {
- radeon_update_renderbuffers(driContextPriv, driDrawPriv);
+ radeon_update_renderbuffers(driContextPriv, driDrawPriv, GL_FALSE);
if (driDrawPriv != driReadPriv)
- radeon_update_renderbuffers(driContextPriv, driReadPriv);
+ radeon_update_renderbuffers(driContextPriv, driReadPriv, GL_FALSE);
_mesa_reference_renderbuffer(&radeon->state.color.rb,
&(radeon_get_renderbuffer(&drfb->base, BUFFER_BACK_LEFT)->base));
_mesa_reference_renderbuffer(&radeon->state.depth.rb,
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h b/src/mesa/drivers/dri/radeon/radeon_common_context.h
index 0309345393d..49a9ec56106 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
@@ -208,6 +208,10 @@ struct radeon_tex_obj {
* and so on.
*/
GLboolean validated;
+ /* Minimum LOD to be used during rendering */
+ unsigned minLod;
+ /* Miximum LOD to be used during rendering */
+ unsigned maxLod;
GLuint override_offset;
GLboolean image_override; /* Image overridden by GLX_EXT_tfp */
@@ -324,6 +328,7 @@ struct radeon_swtcl_info {
GLuint vertex_attr_count;
GLuint emit_prediction;
+ struct radeon_bo *bo;
};
#define RADEON_MAX_AOS_ARRAYS 16
@@ -502,7 +507,6 @@ struct radeon_context {
struct {
struct radeon_query_object *current;
- struct radeon_query_object not_flushed_head;
struct radeon_state_atom queryobj;
} query;
@@ -585,7 +589,8 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
void radeonCleanupContext(radeonContextPtr radeon);
GLboolean radeonUnbindContext(__DRIcontextPrivate * driContextPriv);
-void radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable);
+void radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
+ GLboolean front_only);
GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
__DRIdrawablePrivate * driDrawPriv,
__DRIdrawablePrivate * driReadPriv);
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c
index c6edbae9a1b..b8c65f4ce62 100644
--- a/src/mesa/drivers/dri/radeon/radeon_dma.c
+++ b/src/mesa/drivers/dri/radeon/radeon_dma.c
@@ -151,6 +151,7 @@ void rcommon_emit_vector(GLcontext * ctx, struct radeon_aos *aos,
aos->components = size;
aos->count = count;
+ radeon_bo_map(aos->bo, 1);
out = (uint32_t*)((char*)aos->bo->ptr + aos->offset);
switch (size) {
case 1: radeonEmitVec4(out, data, stride, count); break;
@@ -161,6 +162,7 @@ void rcommon_emit_vector(GLcontext * ctx, struct radeon_aos *aos,
assert(0);
break;
}
+ radeon_bo_unmap(aos->bo);
}
void radeon_init_dma(radeonContextPtr rmesa)
@@ -183,10 +185,6 @@ void radeonRefillCurrentDmaRegion(radeonContextPtr rmesa, int size)
__FUNCTION__, size, rmesa->dma.minimum_size);
- /* unmap old reserved bo */
- if (!is_empty_list(&rmesa->dma.reserved))
- radeon_bo_unmap(first_elem(&rmesa->dma.reserved)->bo);
-
if (is_empty_list(&rmesa->dma.free)
|| last_elem(&rmesa->dma.free)->bo->size < size) {
dma_bo = CALLOC_STRUCT(radeon_dma_bo);
@@ -207,6 +205,7 @@ again_alloc:
counter on unused buffers for later freeing them from
begin of list */
dma_bo = last_elem(&rmesa->dma.free);
+ assert(dma_bo->bo->cref == 1);
remove_from_list(dma_bo);
insert_at_head(&rmesa->dma.reserved, dma_bo);
}
@@ -223,8 +222,6 @@ again_alloc:
/* Cmd buff have been flushed in radeon_revalidate_bos */
goto again_alloc;
}
-
- radeon_bo_map(first_elem(&rmesa->dma.reserved)->bo, 1);
}
/* Allocates a region from rmesa->dma.current. If there isn't enough
@@ -281,7 +278,6 @@ void radeonFreeDmaRegions(radeonContextPtr rmesa)
foreach_s(dma_bo, temp, &rmesa->dma.reserved) {
remove_from_list(dma_bo);
- radeon_bo_unmap(dma_bo->bo);
radeon_bo_unref(dma_bo->bo);
FREE(dma_bo);
}
@@ -306,10 +302,6 @@ static int radeon_bo_is_idle(struct radeon_bo* bo)
WARN_ONCE("Your libdrm or kernel doesn't have support for busy query.\n"
"This may cause small performance drop for you.\n");
}
- /* Protect against bug in legacy bo handling that causes bos stay
- * referenced even after they should be freed */
- if (bo->cref != 1)
- return 0;
return ret != -EBUSY;
}
@@ -346,9 +338,7 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa)
foreach_s(dma_bo, temp, &rmesa->dma.wait) {
if (dma_bo->expire_counter == time) {
WARN_ONCE("Leaking dma buffer object!\n");
- /* force free of buffer so we don't realy start
- * leaking stuff now*/
- while ((dma_bo->bo = radeon_bo_unref(dma_bo->bo))) {}
+ radeon_bo_unref(dma_bo->bo);
remove_from_list(dma_bo);
FREE(dma_bo);
continue;
@@ -367,9 +357,6 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa)
insert_at_tail(&rmesa->dma.free, dma_bo);
}
- /* unmap the last dma region */
- if (!is_empty_list(&rmesa->dma.reserved))
- radeon_bo_unmap(first_elem(&rmesa->dma.reserved)->bo);
/* move reserved to wait list */
foreach_s(dma_bo, temp, &rmesa->dma.reserved) {
/* free objects that are too small to be used because of large request */
@@ -403,11 +390,12 @@ void rcommon_flush_last_swtcl_prim( GLcontext *ctx )
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
struct radeon_dma *dma = &rmesa->dma;
-
if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
dma->flush = NULL;
+ radeon_bo_unmap(rmesa->swtcl.bo);
+
if (!is_empty_list(&dma->reserved)) {
GLuint current_offset = dma->current_used;
@@ -422,6 +410,8 @@ void rcommon_flush_last_swtcl_prim( GLcontext *ctx )
}
rmesa->swtcl.numverts = 0;
}
+ radeon_bo_unref(rmesa->swtcl.bo);
+ rmesa->swtcl.bo = NULL;
}
/* Alloc space in the current dma region.
*/
@@ -432,6 +422,7 @@ rcommonAllocDmaLowVerts( radeonContextPtr rmesa, int nverts, int vsize )
void *head;
if (RADEON_DEBUG & RADEON_IOCTL)
fprintf(stderr, "%s\n", __FUNCTION__);
+
if(is_empty_list(&rmesa->dma.reserved)
||rmesa->dma.current_vertexptr + bytes > first_elem(&rmesa->dma.reserved)->bo->size) {
if (rmesa->dma.flush) {
@@ -455,7 +446,13 @@ rcommonAllocDmaLowVerts( radeonContextPtr rmesa, int nverts, int vsize )
rmesa->swtcl.numverts * rmesa->swtcl.vertex_size * 4 ==
rmesa->dma.current_vertexptr );
- head = (first_elem(&rmesa->dma.reserved)->bo->ptr + rmesa->dma.current_vertexptr);
+ if (!rmesa->swtcl.bo) {
+ rmesa->swtcl.bo = first_elem(&rmesa->dma.reserved)->bo;
+ radeon_bo_ref(rmesa->swtcl.bo);
+ radeon_bo_map(rmesa->swtcl.bo, 1);
+ }
+
+ head = (rmesa->swtcl.bo->ptr + rmesa->dma.current_vertexptr);
rmesa->dma.current_vertexptr += bytes;
rmesa->swtcl.numverts += nverts;
return head;
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index bf69cd93370..7ec641ff18a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -90,7 +90,7 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
case GL_R3_G3_B2:
case GL_RGB4:
case GL_RGB5:
- rb->Format = MESA_FORMAT_RGB565;
+ rb->Format = _dri_texformat_rgb565;
rb->DataType = GL_UNSIGNED_BYTE;
cpp = 2;
break;
@@ -99,7 +99,7 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
- rb->Format = MESA_FORMAT_ARGB8888;
+ rb->Format = _dri_texformat_argb8888;
rb->DataType = GL_UNSIGNED_BYTE;
cpp = 4;
break;
@@ -111,7 +111,7 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
case GL_RGB10_A2:
case GL_RGBA12:
case GL_RGBA16:
- rb->Format = MESA_FORMAT_ARGB8888;
+ rb->Format = _dri_texformat_argb8888;
rb->DataType = GL_UNSIGNED_BYTE;
cpp = 4;
break;
@@ -261,14 +261,32 @@ radeon_create_renderbuffer(gl_format format, __DRIdrawablePrivate *driDrawPriv)
switch (format) {
case MESA_FORMAT_RGB565:
+ assert(_mesa_little_endian());
+ rrb->base.DataType = GL_UNSIGNED_BYTE;
+ rrb->base._BaseFormat = GL_RGB;
+ break;
+ case MESA_FORMAT_RGB565_REV:
+ assert(!_mesa_little_endian());
rrb->base.DataType = GL_UNSIGNED_BYTE;
rrb->base._BaseFormat = GL_RGB;
break;
case MESA_FORMAT_XRGB8888:
+ assert(_mesa_little_endian());
+ rrb->base.DataType = GL_UNSIGNED_BYTE;
+ rrb->base._BaseFormat = GL_RGB;
+ break;
+ case MESA_FORMAT_XRGB8888_REV:
+ assert(!_mesa_little_endian());
rrb->base.DataType = GL_UNSIGNED_BYTE;
rrb->base._BaseFormat = GL_RGB;
break;
case MESA_FORMAT_ARGB8888:
+ assert(_mesa_little_endian());
+ rrb->base.DataType = GL_UNSIGNED_BYTE;
+ rrb->base._BaseFormat = GL_RGBA;
+ break;
+ case MESA_FORMAT_ARGB8888_REV:
+ assert(!_mesa_little_endian());
rrb->base.DataType = GL_UNSIGNED_BYTE;
rrb->base._BaseFormat = GL_RGBA;
break;
@@ -359,21 +377,21 @@ radeon_update_wrapper(GLcontext *ctx, struct radeon_renderbuffer *rrb,
gl_format texFormat;
restart:
- if (texImage->TexFormat == MESA_FORMAT_ARGB8888) {
+ if (texImage->TexFormat == _dri_texformat_argb8888) {
rrb->base.DataType = GL_UNSIGNED_BYTE;
DBG("Render to RGBA8 texture OK\n");
}
- else if (texImage->TexFormat == MESA_FORMAT_RGB565) {
+ else if (texImage->TexFormat == _dri_texformat_rgb565) {
rrb->base.DataType = GL_UNSIGNED_BYTE;
DBG("Render to RGB5 texture OK\n");
}
- else if (texImage->TexFormat == MESA_FORMAT_ARGB1555) {
+ else if (texImage->TexFormat == _dri_texformat_argb1555) {
rrb->base.DataType = GL_UNSIGNED_BYTE;
DBG("Render to ARGB1555 texture OK\n");
}
- else if (texImage->TexFormat == MESA_FORMAT_ARGB4444) {
+ else if (texImage->TexFormat == _dri_texformat_argb4444) {
rrb->base.DataType = GL_UNSIGNED_BYTE;
- DBG("Render to ARGB1555 texture OK\n");
+ DBG("Render to ARGB4444 texture OK\n");
}
else if (texImage->TexFormat == MESA_FORMAT_Z16) {
rrb->base.DataType = GL_UNSIGNED_SHORT;
diff --git a/src/mesa/drivers/dri/radeon/radeon_lock.c b/src/mesa/drivers/dri/radeon/radeon_lock.c
index 02de8e5fd1d..7ad781ba619 100644
--- a/src/mesa/drivers/dri/radeon/radeon_lock.c
+++ b/src/mesa/drivers/dri/radeon/radeon_lock.c
@@ -62,8 +62,6 @@ void radeonGetLock(radeonContextPtr rmesa, GLuint flags)
__DRIdrawablePrivate *const readable = radeon_get_readable(rmesa);
__DRIscreenPrivate *sPriv = rmesa->dri.screen;
- assert(drawable != NULL);
-
drmGetLock(rmesa->dri.fd, rmesa->dri.hwContext, flags);
/* The window might have moved, so we might need to get new clip
@@ -74,12 +72,13 @@ void radeonGetLock(radeonContextPtr rmesa, GLuint flags)
* Since the hardware state depends on having the latest drawable
* clip rects, all state checking must be done _after_ this call.
*/
- DRI_VALIDATE_DRAWABLE_INFO(sPriv, drawable);
- if (drawable != readable) {
+ if (drawable)
+ DRI_VALIDATE_DRAWABLE_INFO(sPriv, drawable);
+ if (readable && drawable != readable) {
DRI_VALIDATE_DRAWABLE_INFO(sPriv, readable);
}
- if (rmesa->lastStamp != drawable->lastStamp) {
+ if (drawable && (rmesa->lastStamp != drawable->lastStamp)) {
radeon_window_moved(rmesa);
rmesa->lastStamp = drawable->lastStamp;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c b/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
index 08e1c5d00df..d810e6080eb 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_arrays.c
@@ -76,12 +76,14 @@ static void emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
/* Emit the data
*/
+ radeon_bo_map(aos->bo, 1);
out = (uint32_t*)((char*)aos->bo->ptr + aos->offset);
for (i = 0; i < count; i++) {
out[0] = radeonComputeFogBlendFactor( ctx, *(GLfloat *)data );
out++;
data += stride;
}
+ radeon_bo_unmap(aos->bo);
}
static void emit_s0_vec(uint32_t *out, GLvoid *data, int stride, int count)
@@ -151,6 +153,7 @@ static void emit_tex_vector(GLcontext *ctx, struct radeon_aos *aos,
/* Emit the data
*/
+ radeon_bo_map(aos->bo, 1);
out = (uint32_t*)((char*)aos->bo->ptr + aos->offset);
switch (size) {
case 1:
@@ -170,6 +173,7 @@ static void emit_tex_vector(GLcontext *ctx, struct radeon_aos *aos,
exit(1);
break;
}
+ radeon_bo_unmap(aos->bo);
}
@@ -196,12 +200,12 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
if (!rmesa->tcl.obj.buf)
rcommon_emit_vector( ctx,
&(rmesa->tcl.aos[nr]),
- (char *)VB->ObjPtr->data,
- VB->ObjPtr->size,
- VB->ObjPtr->stride,
+ (char *)VB->AttribPtr[_TNL_ATTRIB_POS]->data,
+ VB->AttribPtr[_TNL_ATTRIB_POS]->size,
+ VB->AttribPtr[_TNL_ATTRIB_POS]->stride,
count);
- switch( VB->ObjPtr->size ) {
+ switch( VB->AttribPtr[_TNL_ATTRIB_POS]->size ) {
case 4: vfmt |= RADEON_CP_VC_FRMT_W0;
case 3: vfmt |= RADEON_CP_VC_FRMT_Z;
case 2: vfmt |= RADEON_CP_VC_FRMT_XY;
@@ -216,9 +220,9 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
if (!rmesa->tcl.norm.buf)
rcommon_emit_vector( ctx,
&(rmesa->tcl.aos[nr]),
- (char *)VB->NormalPtr->data,
+ (char *)VB->AttribPtr[_TNL_ATTRIB_NORMAL]->data,
3,
- VB->NormalPtr->stride,
+ VB->AttribPtr[_TNL_ATTRIB_NORMAL]->stride,
count);
vfmt |= RADEON_CP_VC_FRMT_N0;
@@ -227,9 +231,9 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
if (inputs & VERT_BIT_COLOR0) {
int emitsize;
- if (VB->ColorPtr[0]->size == 4 &&
- (VB->ColorPtr[0]->stride != 0 ||
- VB->ColorPtr[0]->data[0][3] != 1.0)) {
+ if (VB->AttribPtr[_TNL_ATTRIB_COLOR0]->size == 4 &&
+ (VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride != 0 ||
+ VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data[0][3] != 1.0)) {
vfmt |= RADEON_CP_VC_FRMT_FPCOLOR | RADEON_CP_VC_FRMT_FPALPHA;
emitsize = 4;
}
@@ -242,9 +246,9 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
if (!rmesa->tcl.rgba.buf)
rcommon_emit_vector( ctx,
&(rmesa->tcl.aos[nr]),
- (char *)VB->ColorPtr[0]->data,
+ (char *)VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data,
emitsize,
- VB->ColorPtr[0]->stride,
+ VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride,
count);
nr++;
@@ -256,9 +260,9 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
rcommon_emit_vector( ctx,
&(rmesa->tcl.aos[nr]),
- (char *)VB->SecondaryColorPtr[0]->data,
+ (char *)VB->AttribPtr[_TNL_ATTRIB_COLOR1]->data,
3,
- VB->SecondaryColorPtr[0]->stride,
+ VB->AttribPtr[_TNL_ATTRIB_COLOR1]->stride,
count);
}
@@ -273,8 +277,8 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
if (!rmesa->tcl.fog.buf)
emit_vecfog( ctx,
&(rmesa->tcl.aos[nr]),
- (char *)VB->FogCoordPtr->data,
- VB->FogCoordPtr->stride,
+ (char *)VB->AttribPtr[_TNL_ATTRIB_FOG]->data,
+ VB->AttribPtr[_TNL_ATTRIB_FOG]->stride,
count);
vfmt |= RADEON_CP_VC_FRMT_FPFOG;
@@ -290,24 +294,24 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
if (!rmesa->tcl.tex[unit].buf)
emit_tex_vector( ctx,
&(rmesa->tcl.aos[nr]),
- (char *)VB->TexCoordPtr[unit]->data,
- VB->TexCoordPtr[unit]->size,
- VB->TexCoordPtr[unit]->stride,
+ (char *)VB->AttribPtr[_TNL_ATTRIB_TEX0 + unit]->data,
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + unit]->size,
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + unit]->stride,
count );
nr++;
vfmt |= RADEON_ST_BIT(unit);
/* assume we need the 3rd coord if texgen is active for r/q OR at least
3 coords are submitted. This may not be 100% correct */
- if (VB->TexCoordPtr[unit]->size >= 3) {
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0 + unit]->size >= 3) {
vtx |= RADEON_Q_BIT(unit);
vfmt |= RADEON_Q_BIT(unit);
}
if ( (ctx->Texture.Unit[unit].TexGenEnabled & (R_BIT | Q_BIT)) )
vtx |= RADEON_Q_BIT(unit);
- else if ((VB->TexCoordPtr[unit]->size >= 3) &&
+ else if ((VB->AttribPtr[_TNL_ATTRIB_TEX0 + unit]->size >= 3) &&
((ctx->Texture.Unit[unit]._ReallyEnabled & (TEXTURE_CUBE_BIT)) == 0)) {
- GLuint swaptexmatcol = (VB->TexCoordPtr[unit]->size - 3);
+ GLuint swaptexmatcol = (VB->AttribPtr[_TNL_ATTRIB_TEX0 + unit]->size - 3);
if (((rmesa->NeedTexMatrix >> unit) & 1) &&
(swaptexmatcol != ((rmesa->TexMatColSwap >> unit) & 1)))
radeonUploadTexMatrix( rmesa, unit, swaptexmatcol ) ;
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h b/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h
index 515783135d6..d764ccb9826 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_vbtmp.h
@@ -56,18 +56,18 @@ static void TAG(emit)( GLcontext *ctx,
radeon_print(RADEON_SWRENDER, RADEON_VERBOSE, "%s\n", __FUNCTION__);
- coord = (GLuint (*)[4])VB->ObjPtr->data;
- coord_stride = VB->ObjPtr->stride;
+ coord = (GLuint (*)[4])VB->AttribPtr[_TNL_ATTRIB_POS]->data;
+ coord_stride = VB->AttribPtr[_TNL_ATTRIB_POS]->stride;
if (DO_TEX2) {
- if (VB->TexCoordPtr[2]) {
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX2]) {
const GLuint t2 = GET_TEXSOURCE(2);
- tc2 = (GLuint (*)[4])VB->TexCoordPtr[t2]->data;
- tc2_stride = VB->TexCoordPtr[t2]->stride;
- if (DO_PTEX && VB->TexCoordPtr[t2]->size < 3) {
+ tc2 = (GLuint (*)[4])VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->data;
+ tc2_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->stride;
+ if (DO_PTEX && VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->size < 3) {
fill_tex |= (1<<2);
}
- else if (DO_PTEX && VB->TexCoordPtr[t2]->size < 4) {
+ else if (DO_PTEX && VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->size < 4) {
rqcoordsnoswap |= (1<<2);
}
} else {
@@ -77,14 +77,14 @@ static void TAG(emit)( GLcontext *ctx,
}
if (DO_TEX1) {
- if (VB->TexCoordPtr[1]) {
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]) {
const GLuint t1 = GET_TEXSOURCE(1);
- tc1 = (GLuint (*)[4])VB->TexCoordPtr[t1]->data;
- tc1_stride = VB->TexCoordPtr[t1]->stride;
- if (DO_PTEX && VB->TexCoordPtr[t1]->size < 3) {
+ tc1 = (GLuint (*)[4])VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->data;
+ tc1_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->stride;
+ if (DO_PTEX && VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->size < 3) {
fill_tex |= (1<<1);
}
- else if (DO_PTEX && VB->TexCoordPtr[t1]->size < 4) {
+ else if (DO_PTEX && VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->size < 4) {
rqcoordsnoswap |= (1<<1);
}
} else {
@@ -94,14 +94,14 @@ static void TAG(emit)( GLcontext *ctx,
}
if (DO_TEX0) {
- if (VB->TexCoordPtr[0]) {
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]) {
const GLuint t0 = GET_TEXSOURCE(0);
- tc0_stride = VB->TexCoordPtr[t0]->stride;
- tc0 = (GLuint (*)[4])VB->TexCoordPtr[t0]->data;
- if (DO_PTEX && VB->TexCoordPtr[t0]->size < 3) {
+ tc0_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->stride;
+ tc0 = (GLuint (*)[4])VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->data;
+ if (DO_PTEX && VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->size < 3) {
fill_tex |= (1<<0);
}
- else if (DO_PTEX && VB->TexCoordPtr[t0]->size < 4) {
+ else if (DO_PTEX && VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->size < 4) {
rqcoordsnoswap |= (1<<0);
}
} else {
@@ -112,9 +112,9 @@ static void TAG(emit)( GLcontext *ctx,
}
if (DO_NORM) {
- if (VB->NormalPtr) {
- norm_stride = VB->NormalPtr->stride;
- norm = (GLuint (*)[4])VB->NormalPtr->data;
+ if (VB->AttribPtr[_TNL_ATTRIB_NORMAL]) {
+ norm_stride = VB->AttribPtr[_TNL_ATTRIB_NORMAL]->stride;
+ norm = (GLuint (*)[4])VB->AttribPtr[_TNL_ATTRIB_NORMAL]->data;
} else {
norm_stride = 0;
norm = (GLuint (*)[4])&ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
@@ -122,9 +122,9 @@ static void TAG(emit)( GLcontext *ctx,
}
if (DO_RGBA) {
- if (VB->ColorPtr[0]) {
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
+ if (VB->AttribPtr[_TNL_ATTRIB_COLOR0]) {
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
} else {
col = (GLfloat (*)[4])ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
col_stride = 0;
@@ -132,9 +132,9 @@ static void TAG(emit)( GLcontext *ctx,
}
if (DO_SPEC_OR_FOG) {
- if (VB->SecondaryColorPtr[0]) {
- spec = VB->SecondaryColorPtr[0]->data;
- spec_stride = VB->SecondaryColorPtr[0]->stride;
+ if (VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
+ spec = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->data;
+ spec_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->stride;
} else {
spec = (GLfloat (*)[4])ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
spec_stride = 0;
@@ -142,9 +142,9 @@ static void TAG(emit)( GLcontext *ctx,
}
if (DO_SPEC_OR_FOG) {
- if (VB->FogCoordPtr) {
- fog = VB->FogCoordPtr->data;
- fog_stride = VB->FogCoordPtr->stride;
+ if (VB->AttribPtr[_TNL_ATTRIB_FOG]) {
+ fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
+ fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
} else {
fog = (GLfloat (*)[4])ctx->Current.Attrib[VERT_ATTRIB_FOG];
fog_stride = 0;
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
index 78ec1193026..98f96ff2a76 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
@@ -326,7 +326,7 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
if (1) {
req |= RADEON_CP_VC_FRMT_Z;
- if (VB->ObjPtr->size == 4) {
+ if (VB->AttribPtr[_TNL_ATTRIB_POS]->size == 4) {
req |= RADEON_CP_VC_FRMT_W0;
}
}
@@ -348,15 +348,15 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
req |= RADEON_ST_BIT(unit);
/* assume we need the 3rd coord if texgen is active for r/q OR at least
3 coords are submitted. This may not be 100% correct */
- if (VB->TexCoordPtr[unit]->size >= 3) {
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0 + unit]->size >= 3) {
req |= RADEON_Q_BIT(unit);
vtx |= RADEON_Q_BIT(unit);
}
if ( (ctx->Texture.Unit[unit].TexGenEnabled & (R_BIT | Q_BIT)) )
vtx |= RADEON_Q_BIT(unit);
- else if ((VB->TexCoordPtr[unit]->size >= 3) &&
+ else if ((VB->AttribPtr[_TNL_ATTRIB_TEX0 + unit]->size >= 3) &&
((ctx->Texture.Unit[unit]._ReallyEnabled & (TEXTURE_CUBE_BIT)) == 0)) {
- GLuint swaptexmatcol = (VB->TexCoordPtr[unit]->size - 3);
+ GLuint swaptexmatcol = (VB->AttribPtr[_TNL_ATTRIB_TEX0 + unit]->size - 3);
if (((rmesa->NeedTexMatrix >> unit) & 1) &&
(swaptexmatcol != ((rmesa->TexMatColSwap >> unit) & 1)))
radeonUploadTexMatrix( rmesa, unit, swaptexmatcol ) ;
@@ -390,19 +390,19 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
* this, add more vertex code (for obj-2, obj-3) or preferably move
* to maos.
*/
- if (VB->ObjPtr->size < 3 ||
- (VB->ObjPtr->size == 3 &&
+ if (VB->AttribPtr[_TNL_ATTRIB_POS]->size < 3 ||
+ (VB->AttribPtr[_TNL_ATTRIB_POS]->size == 3 &&
(setup_tab[i].vertex_format & RADEON_CP_VC_FRMT_W0))) {
_math_trans_4f( rmesa->tcl.ObjClean.data,
- VB->ObjPtr->data,
- VB->ObjPtr->stride,
+ VB->AttribPtr[_TNL_ATTRIB_POS]->data,
+ VB->AttribPtr[_TNL_ATTRIB_POS]->stride,
GL_FLOAT,
- VB->ObjPtr->size,
+ VB->AttribPtr[_TNL_ATTRIB_POS]->size,
0,
VB->Count );
- switch (VB->ObjPtr->size) {
+ switch (VB->AttribPtr[_TNL_ATTRIB_POS]->size) {
case 1:
_mesa_vector4f_clean_elem(&rmesa->tcl.ObjClean, VB->Count, 1);
case 2:
@@ -416,14 +416,14 @@ void radeonEmitArrays( GLcontext *ctx, GLuint inputs )
break;
}
- VB->ObjPtr = &rmesa->tcl.ObjClean;
+ VB->AttribPtr[_TNL_ATTRIB_POS] = &rmesa->tcl.ObjClean;
}
-
+ radeon_bo_map(rmesa->radeon.tcl.aos[0].bo, 1);
setup_tab[i].emit( ctx, 0, VB->Count,
rmesa->radeon.tcl.aos[0].bo->ptr + rmesa->radeon.tcl.aos[0].offset);
-
+ radeon_bo_unmap(rmesa->radeon.tcl.aos[0].bo);
// rmesa->radeon.tcl.aos[0].size = setup_tab[i].vertex_size;
rmesa->radeon.tcl.aos[0].stride = setup_tab[i].vertex_size;
rmesa->tcl.vertex_format = setup_tab[i].vertex_format;
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index dadc72f4c1b..bdbb9460bf0 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2009 Maciej Cencora.
* Copyright (C) 2008 Nicolai Haehnle.
*
* All Rights Reserved.
@@ -32,50 +33,52 @@
#include "main/simple_list.h"
#include "main/texcompress.h"
-
-static GLuint radeon_compressed_texture_size(GLcontext *ctx,
- GLsizei width, GLsizei height, GLsizei depth,
- GLuint mesaFormat)
+#include "main/teximage.h"
+#include "main/texobj.h"
+#include "radeon_texture.h"
+
+static unsigned get_aligned_compressed_row_stride(
+ gl_format format,
+ unsigned width,
+ unsigned minStride)
{
- GLuint size = _mesa_format_image_size(mesaFormat, width, height, depth);
-
- if (mesaFormat == MESA_FORMAT_RGB_DXT1 ||
- mesaFormat == MESA_FORMAT_RGBA_DXT1) {
- if (width + 3 < 8) /* width one block */
- size = size * 4;
- else if (width + 3 < 16)
- size = size * 2;
- } else {
- /* DXT3/5, 16 bytes per block */
- // WARN_ONCE("DXT 3/5 suffers from multitexturing problems!\n");
- if (width + 3 < 8)
- size = size * 2;
+ const unsigned blockSize = _mesa_get_format_bytes(format);
+ unsigned blockWidth, blockHeight, numXBlocks;
+
+ _mesa_get_format_block_size(format, &blockWidth, &blockHeight);
+ numXBlocks = (width + blockWidth - 1) / blockWidth;
+
+ while (numXBlocks * blockSize < minStride)
+ {
+ ++numXBlocks;
}
- return size;
+ return numXBlocks * blockSize;
}
+static unsigned get_compressed_image_size(
+ gl_format format,
+ unsigned rowStride,
+ unsigned height)
+{
+ unsigned blockWidth, blockHeight;
+
+ _mesa_get_format_block_size(format, &blockWidth, &blockHeight);
-static int radeon_compressed_num_bytes(GLuint mesaFormat)
+ return rowStride * ((height + blockHeight - 1) / blockHeight);
+}
+
+static int find_next_power_of_two(GLuint value)
{
- int bytes = 0;
- switch(mesaFormat) {
-
- case MESA_FORMAT_RGB_FXT1:
- case MESA_FORMAT_RGBA_FXT1:
- case MESA_FORMAT_RGB_DXT1:
- case MESA_FORMAT_RGBA_DXT1:
- bytes = 2;
- break;
-
- case MESA_FORMAT_RGBA_DXT3:
- case MESA_FORMAT_RGBA_DXT5:
- bytes = 4;
- default:
- break;
- }
-
- return bytes;
+ int i, tmp;
+
+ i = 0;
+ tmp = value - 1;
+ while (tmp) {
+ tmp >>= 1;
+ i++;
+ }
+ return (1 << i);
}
/**
@@ -90,28 +93,28 @@ static void compute_tex_image_offset(radeonContextPtr rmesa, radeon_mipmap_tree
{
radeon_mipmap_level *lvl = &mt->levels[level];
uint32_t row_align;
+ GLuint height;
+
+ height = find_next_power_of_two(lvl->height);
/* Find image size in bytes */
- if (mt->compressed) {
- /* TODO: Is this correct? Need test cases for compressed textures! */
- row_align = rmesa->texture_compressed_row_align - 1;
- lvl->rowstride = (lvl->width * mt->bpp + row_align) & ~row_align;
- lvl->size = radeon_compressed_texture_size(mt->radeon->glCtx,
- lvl->width, lvl->height, lvl->depth, mt->compressed);
+ if (_mesa_is_format_compressed(mt->mesaFormat)) {
+ lvl->rowstride = get_aligned_compressed_row_stride(mt->mesaFormat, lvl->width, rmesa->texture_compressed_row_align);
+ lvl->size = get_compressed_image_size(mt->mesaFormat, lvl->rowstride, height);
} else if (mt->target == GL_TEXTURE_RECTANGLE_NV) {
row_align = rmesa->texture_rect_row_align - 1;
- lvl->rowstride = (lvl->width * mt->bpp + row_align) & ~row_align;
- lvl->size = lvl->rowstride * lvl->height;
+ lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) + row_align) & ~row_align;
+ lvl->size = lvl->rowstride * height;
} else if (mt->tilebits & RADEON_TXO_MICRO_TILE) {
/* tile pattern is 16 bytes x2. mipmaps stay 32 byte aligned,
* though the actual offset may be different (if texture is less than
* 32 bytes width) to the untiled case */
- lvl->rowstride = (lvl->width * mt->bpp * 2 + 31) & ~31;
- lvl->size = lvl->rowstride * ((lvl->height + 1) / 2) * lvl->depth;
+ lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) * 2 + 31) & ~31;
+ lvl->size = lvl->rowstride * ((height + 1) / 2) * lvl->depth;
} else {
row_align = rmesa->texture_row_align - 1;
- lvl->rowstride = (lvl->width * mt->bpp + row_align) & ~row_align;
- lvl->size = lvl->rowstride * lvl->height * lvl->depth;
+ lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) + row_align) & ~row_align;
+ lvl->size = lvl->rowstride * height * lvl->depth;
}
assert(lvl->size > 0);
@@ -123,7 +126,7 @@ static void compute_tex_image_offset(radeonContextPtr rmesa, radeon_mipmap_tree
if (RADEON_DEBUG & RADEON_TEXTURE)
fprintf(stderr,
"level %d, face %d: rs:%d %dx%d at %d\n",
- level, face, lvl->rowstride, lvl->width, lvl->height, lvl->faces[face].offset);
+ level, face, lvl->rowstride, lvl->width, height, lvl->faces[face].offset);
}
static GLuint minify(GLuint size, GLuint levels)
@@ -137,22 +140,19 @@ static GLuint minify(GLuint size, GLuint levels)
static void calculate_miptree_layout_r100(radeonContextPtr rmesa, radeon_mipmap_tree *mt)
{
- GLuint curOffset;
- GLuint numLevels;
- GLuint i;
- GLuint face;
+ GLuint curOffset, i, face, level;
- numLevels = mt->lastLevel - mt->firstLevel + 1;
- assert(numLevels <= rmesa->glCtx->Const.MaxTextureLevels);
+ assert(mt->numLevels <= rmesa->glCtx->Const.MaxTextureLevels);
curOffset = 0;
for(face = 0; face < mt->faces; face++) {
- for(i = 0; i < numLevels; i++) {
- mt->levels[i].width = minify(mt->width0, i);
- mt->levels[i].height = minify(mt->height0, i);
- mt->levels[i].depth = minify(mt->depth0, i);
- compute_tex_image_offset(rmesa, mt, face, i, &curOffset);
+ for(i = 0, level = mt->baseLevel; i < mt->numLevels; i++, level++) {
+ mt->levels[level].valid = 1;
+ mt->levels[level].width = minify(mt->width0, i);
+ mt->levels[level].height = minify(mt->height0, i);
+ mt->levels[level].depth = minify(mt->depth0, i);
+ compute_tex_image_offset(rmesa, mt, face, level, &curOffset);
}
}
@@ -162,23 +162,21 @@ static void calculate_miptree_layout_r100(radeonContextPtr rmesa, radeon_mipmap_
static void calculate_miptree_layout_r300(radeonContextPtr rmesa, radeon_mipmap_tree *mt)
{
- GLuint curOffset;
- GLuint numLevels;
- GLuint i;
+ GLuint curOffset, i, level;
- numLevels = mt->lastLevel - mt->firstLevel + 1;
- assert(numLevels <= rmesa->glCtx->Const.MaxTextureLevels);
+ assert(mt->numLevels <= rmesa->glCtx->Const.MaxTextureLevels);
curOffset = 0;
- for(i = 0; i < numLevels; i++) {
+ for(i = 0, level = mt->baseLevel; i < mt->numLevels; i++, level++) {
GLuint face;
- mt->levels[i].width = minify(mt->width0, i);
- mt->levels[i].height = minify(mt->height0, i);
- mt->levels[i].depth = minify(mt->depth0, i);
+ mt->levels[level].valid = 1;
+ mt->levels[level].width = minify(mt->width0, i);
+ mt->levels[level].height = minify(mt->height0, i);
+ mt->levels[level].depth = minify(mt->depth0, i);
for(face = 0; face < mt->faces; face++)
- compute_tex_image_offset(rmesa, mt, face, i, &curOffset);
+ compute_tex_image_offset(rmesa, mt, face, level, &curOffset);
}
/* Note the required size in memory */
@@ -188,27 +186,22 @@ static void calculate_miptree_layout_r300(radeonContextPtr rmesa, radeon_mipmap_
/**
* Create a new mipmap tree, calculate its layout and allocate memory.
*/
-radeon_mipmap_tree* radeon_miptree_create(radeonContextPtr rmesa, radeonTexObj *t,
- GLenum target, GLenum internal_format, GLuint firstLevel, GLuint lastLevel,
- GLuint width0, GLuint height0, GLuint depth0,
- GLuint bpp, GLuint tilebits, GLuint compressed)
+static radeon_mipmap_tree* radeon_miptree_create(radeonContextPtr rmesa,
+ GLenum target, gl_format mesaFormat, GLuint baseLevel, GLuint numLevels,
+ GLuint width0, GLuint height0, GLuint depth0, GLuint tilebits)
{
radeon_mipmap_tree *mt = CALLOC_STRUCT(_radeon_mipmap_tree);
- mt->radeon = rmesa;
- mt->internal_format = internal_format;
+ mt->mesaFormat = mesaFormat;
mt->refcount = 1;
- mt->t = t;
mt->target = target;
mt->faces = (target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
- mt->firstLevel = firstLevel;
- mt->lastLevel = lastLevel;
+ mt->baseLevel = baseLevel;
+ mt->numLevels = numLevels;
mt->width0 = width0;
mt->height0 = height0;
mt->depth0 = depth0;
- mt->bpp = compressed ? radeon_compressed_num_bytes(compressed) : bpp;
mt->tilebits = tilebits;
- mt->compressed = compressed;
if (rmesa->radeonScreen->chip_family >= CHIP_FAMILY_R300)
calculate_miptree_layout_r300(rmesa, mt);
@@ -223,53 +216,43 @@ radeon_mipmap_tree* radeon_miptree_create(radeonContextPtr rmesa, radeonTexObj *
return mt;
}
-void radeon_miptree_reference(radeon_mipmap_tree *mt)
+void radeon_miptree_reference(radeon_mipmap_tree *mt, radeon_mipmap_tree **ptr)
{
+ assert(!*ptr);
+
mt->refcount++;
assert(mt->refcount > 0);
+
+ *ptr = mt;
}
-void radeon_miptree_unreference(radeon_mipmap_tree *mt)
+void radeon_miptree_unreference(radeon_mipmap_tree **ptr)
{
+ radeon_mipmap_tree *mt = *ptr;
if (!mt)
return;
assert(mt->refcount > 0);
+
mt->refcount--;
if (!mt->refcount) {
radeon_bo_unref(mt->bo);
free(mt);
}
-}
+ *ptr = 0;
+}
/**
- * Calculate first and last mip levels for the given texture object,
- * where the dimensions are taken from the given texture image at
- * the given level.
- *
- * Note: level is the OpenGL level number, which is not necessarily the same
- * as the first level that is actually present.
- *
- * The base level image of the given texture face must be non-null,
- * or this will fail.
+ * Calculate min and max LOD for the given texture object.
+ * @param[in] tObj texture object whose LOD values to calculate
+ * @param[out] pminLod minimal LOD
+ * @param[out] pmaxLod maximal LOD
*/
-static void calculate_first_last_level(struct gl_texture_object *tObj,
- GLuint *pfirstLevel, GLuint *plastLevel,
- GLuint face, GLuint level)
+static void calculate_min_max_lod(struct gl_texture_object *tObj,
+ unsigned *pminLod, unsigned *pmaxLod)
{
- const struct gl_texture_image * const baseImage =
- tObj->Image[face][level];
-
- assert(baseImage);
-
- /* These must be signed values. MinLod and MaxLod can be negative numbers,
- * and having firstLevel and lastLevel as signed prevents the need for
- * extra sign checks.
- */
- int firstLevel;
- int lastLevel;
-
+ int minLod, maxLod;
/* Yes, this looks overly complicated, but it's all needed.
*/
switch (tObj->Target) {
@@ -280,32 +263,30 @@ static void calculate_first_last_level(struct gl_texture_object *tObj,
if (tObj->MinFilter == GL_NEAREST || tObj->MinFilter == GL_LINEAR) {
/* GL_NEAREST and GL_LINEAR only care about GL_TEXTURE_BASE_LEVEL.
*/
- firstLevel = lastLevel = tObj->BaseLevel;
+ minLod = maxLod = tObj->BaseLevel;
} else {
- firstLevel = tObj->BaseLevel + (GLint)(tObj->MinLod + 0.5);
- firstLevel = MAX2(firstLevel, tObj->BaseLevel);
- firstLevel = MIN2(firstLevel, level + baseImage->MaxLog2);
- lastLevel = tObj->BaseLevel + (GLint)(tObj->MaxLod + 0.5);
- lastLevel = MAX2(lastLevel, tObj->BaseLevel);
- lastLevel = MIN2(lastLevel, level + baseImage->MaxLog2);
- lastLevel = MIN2(lastLevel, tObj->MaxLevel);
- lastLevel = MAX2(firstLevel, lastLevel); /* need at least one level */
+ minLod = tObj->BaseLevel + (GLint)(tObj->MinLod);
+ minLod = MAX2(minLod, tObj->BaseLevel);
+ minLod = MIN2(minLod, tObj->MaxLevel);
+ maxLod = tObj->BaseLevel + (GLint)(tObj->MaxLod + 0.5);
+ maxLod = MIN2(maxLod, tObj->MaxLevel);
+ maxLod = MIN2(maxLod, tObj->Image[0][minLod]->MaxLog2 + minLod);
+ maxLod = MAX2(maxLod, minLod); /* need at least one level */
}
break;
case GL_TEXTURE_RECTANGLE_NV:
case GL_TEXTURE_4D_SGIS:
- firstLevel = lastLevel = 0;
+ minLod = maxLod = 0;
break;
default:
return;
}
/* save these values */
- *pfirstLevel = firstLevel;
- *plastLevel = lastLevel;
+ *pminLod = minLod;
+ *pmaxLod = maxLod;
}
-
/**
* Checks whether the given miptree can hold the given texture image at the
* given face and level.
@@ -313,23 +294,17 @@ static void calculate_first_last_level(struct gl_texture_object *tObj,
GLboolean radeon_miptree_matches_image(radeon_mipmap_tree *mt,
struct gl_texture_image *texImage, GLuint face, GLuint level)
{
- GLboolean isCompressed = _mesa_is_format_compressed(texImage->TexFormat);
radeon_mipmap_level *lvl;
- if (face >= mt->faces || level < mt->firstLevel || level > mt->lastLevel)
+ if (face >= mt->faces)
return GL_FALSE;
- if (texImage->InternalFormat != mt->internal_format ||
- isCompressed != mt->compressed)
+ if (texImage->TexFormat != mt->mesaFormat)
return GL_FALSE;
- if (!isCompressed &&
- !mt->compressed &&
- _mesa_get_format_bytes(texImage->TexFormat) != mt->bpp)
- return GL_FALSE;
-
- lvl = &mt->levels[level - mt->firstLevel];
- if (lvl->width != texImage->Width ||
+ lvl = &mt->levels[level];
+ if (!lvl->valid ||
+ lvl->width != texImage->Width ||
lvl->height != texImage->Height ||
lvl->depth != texImage->Depth)
return GL_FALSE;
@@ -337,64 +312,72 @@ GLboolean radeon_miptree_matches_image(radeon_mipmap_tree *mt,
return GL_TRUE;
}
-
/**
* Checks whether the given miptree has the right format to store the given texture object.
*/
-GLboolean radeon_miptree_matches_texture(radeon_mipmap_tree *mt, struct gl_texture_object *texObj)
+static GLboolean radeon_miptree_matches_texture(radeon_mipmap_tree *mt, struct gl_texture_object *texObj)
{
struct gl_texture_image *firstImage;
- GLuint compressed;
- GLuint numfaces = 1;
- GLuint firstLevel, lastLevel;
- GLuint texelBytes;
-
- calculate_first_last_level(texObj, &firstLevel, &lastLevel, 0, texObj->BaseLevel);
- if (texObj->Target == GL_TEXTURE_CUBE_MAP)
- numfaces = 6;
-
- firstImage = texObj->Image[0][firstLevel];
- compressed = _mesa_is_format_compressed(firstImage->TexFormat) ? firstImage->TexFormat : 0;
- texelBytes = _mesa_get_format_bytes(firstImage->TexFormat);
-
- return (mt->firstLevel == firstLevel &&
- mt->lastLevel == lastLevel &&
- mt->width0 == firstImage->Width &&
- mt->height0 == firstImage->Height &&
- mt->depth0 == firstImage->Depth &&
- mt->compressed == compressed &&
- (!mt->compressed ? (mt->bpp == texelBytes) : 1));
-}
+ unsigned numLevels;
+ radeon_mipmap_level *mtBaseLevel;
+ if (texObj->BaseLevel < mt->baseLevel)
+ return GL_FALSE;
+
+ mtBaseLevel = &mt->levels[texObj->BaseLevel - mt->baseLevel];
+ firstImage = texObj->Image[0][texObj->BaseLevel];
+ numLevels = MIN2(texObj->MaxLevel - texObj->BaseLevel + 1, firstImage->MaxLog2 + 1);
+
+ if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "Checking if miptree %p matches texObj %p\n", mt, texObj);
+ fprintf(stderr, "target %d vs %d\n", mt->target, texObj->Target);
+ fprintf(stderr, "format %d vs %d\n", mt->mesaFormat, firstImage->TexFormat);
+ fprintf(stderr, "numLevels %d vs %d\n", mt->numLevels, numLevels);
+ fprintf(stderr, "width0 %d vs %d\n", mtBaseLevel->width, firstImage->Width);
+ fprintf(stderr, "height0 %d vs %d\n", mtBaseLevel->height, firstImage->Height);
+ fprintf(stderr, "depth0 %d vs %d\n", mtBaseLevel->depth, firstImage->Depth);
+ if (mt->target == texObj->Target &&
+ mt->mesaFormat == firstImage->TexFormat &&
+ mt->numLevels >= numLevels &&
+ mtBaseLevel->width == firstImage->Width &&
+ mtBaseLevel->height == firstImage->Height &&
+ mtBaseLevel->depth == firstImage->Depth) {
+ fprintf(stderr, "MATCHED\n");
+ } else {
+ fprintf(stderr, "NOT MATCHED\n");
+ }
+ }
+
+ return (mt->target == texObj->Target &&
+ mt->mesaFormat == firstImage->TexFormat &&
+ mt->numLevels >= numLevels &&
+ mtBaseLevel->width == firstImage->Width &&
+ mtBaseLevel->height == firstImage->Height &&
+ mtBaseLevel->depth == firstImage->Depth);
+}
/**
- * Try to allocate a mipmap tree for the given texture that will fit the
- * given image in the given position.
+ * Try to allocate a mipmap tree for the given texture object.
+ * @param[in] rmesa radeon context
+ * @param[in] t radeon texture object
*/
-void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t,
- radeon_texture_image *image, GLuint face, GLuint level)
+void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t)
{
- GLuint compressed = _mesa_is_format_compressed(image->base.TexFormat) ? image->base.TexFormat : 0;
- GLuint numfaces = 1;
- GLuint firstLevel, lastLevel;
- GLuint texelBytes;
+ struct gl_texture_object *texObj = &t->base;
+ struct gl_texture_image *texImg = texObj->Image[0][texObj->BaseLevel];
+ GLuint numLevels;
assert(!t->mt);
- calculate_first_last_level(&t->base, &firstLevel, &lastLevel, face, level);
- if (t->base.Target == GL_TEXTURE_CUBE_MAP)
- numfaces = 6;
-
- if (level != firstLevel || face >= numfaces)
+ if (!texImg)
return;
- texelBytes = _mesa_get_format_bytes(image->base.TexFormat);
+ numLevels = MIN2(texObj->MaxLevel - texObj->BaseLevel + 1, texImg->MaxLog2 + 1);
- t->mt = radeon_miptree_create(rmesa, t, t->base.Target,
- image->base.InternalFormat,
- firstLevel, lastLevel,
- image->base.Width, image->base.Height, image->base.Depth,
- texelBytes, t->tile_bits, compressed);
+ t->mt = radeon_miptree_create(rmesa, t->base.Target,
+ texImg->TexFormat, texObj->BaseLevel,
+ numLevels, texImg->Width, texImg->Height,
+ texImg->Depth, t->tile_bits);
}
/* Although we use the image_offset[] array to store relative offsets
@@ -406,21 +389,233 @@ void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t,
void
radeon_miptree_depth_offsets(radeon_mipmap_tree *mt, GLuint level, GLuint *offsets)
{
- if (mt->target != GL_TEXTURE_3D || mt->faces == 1)
- offsets[0] = 0;
- else {
- int i;
- for (i = 0; i < 6; i++)
- offsets[i] = mt->levels[level].faces[i].offset;
- }
+ if (mt->target != GL_TEXTURE_3D || mt->faces == 1) {
+ offsets[0] = 0;
+ } else {
+ int i;
+ for (i = 0; i < 6; i++) {
+ offsets[i] = mt->levels[level].faces[i].offset;
+ }
+ }
}
GLuint
radeon_miptree_image_offset(radeon_mipmap_tree *mt,
GLuint face, GLuint level)
{
- if (mt->target == GL_TEXTURE_CUBE_MAP_ARB)
- return (mt->levels[level].faces[face].offset);
- else
- return mt->levels[level].faces[0].offset;
+ if (mt->target == GL_TEXTURE_CUBE_MAP_ARB)
+ return (mt->levels[level].faces[face].offset);
+ else
+ return mt->levels[level].faces[0].offset;
}
+
+/**
+ * Ensure that the given image is stored in the given miptree from now on.
+ */
+static void migrate_image_to_miptree(radeon_mipmap_tree *mt,
+ radeon_texture_image *image,
+ int face, int level)
+{
+ radeon_mipmap_level *dstlvl = &mt->levels[level];
+ unsigned char *dest;
+
+ assert(image->mt != mt);
+ assert(dstlvl->valid);
+ assert(dstlvl->width == image->base.Width);
+ assert(dstlvl->height == image->base.Height);
+ assert(dstlvl->depth == image->base.Depth);
+
+ radeon_bo_map(mt->bo, GL_TRUE);
+ dest = mt->bo->ptr + dstlvl->faces[face].offset;
+
+ if (image->mt) {
+ /* Format etc. should match, so we really just need a memcpy().
+ * In fact, that memcpy() could be done by the hardware in many
+ * cases, provided that we have a proper memory manager.
+ */
+ assert(mt->mesaFormat == image->base.TexFormat);
+
+ radeon_mipmap_level *srclvl = &image->mt->levels[image->mtlevel];
+
+ assert(image->mtlevel == level);
+ assert(srclvl->size == dstlvl->size);
+ assert(srclvl->rowstride == dstlvl->rowstride);
+
+ radeon_bo_map(image->mt->bo, GL_FALSE);
+
+ memcpy(dest,
+ image->mt->bo->ptr + srclvl->faces[face].offset,
+ dstlvl->size);
+ radeon_bo_unmap(image->mt->bo);
+
+ radeon_miptree_unreference(&image->mt);
+ } else {
+ /* need to confirm this value is correct */
+ if (_mesa_is_format_compressed(image->base.TexFormat)) {
+ unsigned size = _mesa_format_image_size(image->base.TexFormat,
+ image->base.Width,
+ image->base.Height,
+ image->base.Depth);
+ memcpy(dest, image->base.Data, size);
+ } else {
+ uint32_t srcrowstride;
+ uint32_t height;
+
+ height = image->base.Height * image->base.Depth;
+ srcrowstride = image->base.Width * _mesa_get_format_bytes(image->base.TexFormat);
+ copy_rows(dest, dstlvl->rowstride, image->base.Data, srcrowstride,
+ height, srcrowstride);
+ }
+
+ _mesa_free_texmemory(image->base.Data);
+ image->base.Data = 0;
+ }
+
+ radeon_bo_unmap(mt->bo);
+
+ radeon_miptree_reference(mt, &image->mt);
+ image->mtface = face;
+ image->mtlevel = level;
+}
+
+/**
+ * Filter matching miptrees, and select one with the most of data.
+ * @param[in] texObj radeon texture object
+ * @param[in] firstLevel first texture level to check
+ * @param[in] lastLevel last texture level to check
+ */
+static radeon_mipmap_tree * get_biggest_matching_miptree(radeonTexObj *texObj,
+ unsigned firstLevel,
+ unsigned lastLevel)
+{
+ const unsigned numLevels = lastLevel - firstLevel + 1;
+ unsigned *mtSizes = calloc(numLevels, sizeof(unsigned));
+ radeon_mipmap_tree **mts = calloc(numLevels, sizeof(radeon_mipmap_tree *));
+ unsigned mtCount = 0;
+ unsigned maxMtIndex = 0;
+ radeon_mipmap_tree *tmp;
+
+ for (unsigned level = firstLevel; level <= lastLevel; ++level) {
+ radeon_texture_image *img = get_radeon_texture_image(texObj->base.Image[0][level]);
+ unsigned found = 0;
+ // TODO: why this hack??
+ if (!img)
+ break;
+
+ if (!img->mt)
+ continue;
+
+ for (int i = 0; i < mtCount; ++i) {
+ if (mts[i] == img->mt) {
+ found = 1;
+ mtSizes[i] += img->mt->levels[img->mtlevel].size;
+ break;
+ }
+ }
+
+ if (!found && radeon_miptree_matches_texture(img->mt, &texObj->base)) {
+ mtSizes[mtCount] = img->mt->levels[img->mtlevel].size;
+ mts[mtCount] = img->mt;
+ mtCount++;
+ }
+ }
+
+ if (mtCount == 0) {
+ return NULL;
+ }
+
+ for (int i = 1; i < mtCount; ++i) {
+ if (mtSizes[i] > mtSizes[maxMtIndex]) {
+ maxMtIndex = i;
+ }
+ }
+
+ tmp = mts[maxMtIndex];
+ free(mtSizes);
+ free(mts);
+
+ return tmp;
+}
+
+/**
+ * Validate texture mipmap tree.
+ * If individual images are stored in different mipmap trees
+ * use the mipmap tree that has the most of the correct data.
+ */
+int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *texObj)
+{
+ radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
+ radeonTexObj *t = radeon_tex_obj(texObj);
+
+ if (t->validated || t->image_override) {
+ return GL_TRUE;
+ }
+
+ if (texObj->Image[0][texObj->BaseLevel]->Border > 0)
+ return GL_FALSE;
+
+ _mesa_test_texobj_completeness(rmesa->glCtx, texObj);
+ if (!texObj->_Complete) {
+ return GL_FALSE;
+ }
+
+ calculate_min_max_lod(&t->base, &t->minLod, &t->maxLod);
+
+ if (RADEON_DEBUG & RADEON_TEXTURE)
+ fprintf(stderr, "%s: Validating texture %p now, minLod = %d, maxLod = %d\n",
+ __FUNCTION__, texObj ,t->minLod, t->maxLod);
+
+ radeon_mipmap_tree *dst_miptree;
+ dst_miptree = get_biggest_matching_miptree(t, t->minLod, t->maxLod);
+
+ if (!dst_miptree) {
+ radeon_miptree_unreference(&t->mt);
+ radeon_try_alloc_miptree(rmesa, t);
+ dst_miptree = t->mt;
+ if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "%s: No matching miptree found, allocated new one %p\n", __FUNCTION__, t->mt);
+ }
+ } else if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "%s: Using miptree %p\n", __FUNCTION__, t->mt);
+ }
+
+ const unsigned faces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
+ unsigned face, level;
+ radeon_texture_image *img;
+ /* Validate only the levels that will actually be used during rendering */
+ for (face = 0; face < faces; ++face) {
+ for (level = t->minLod; level <= t->maxLod; ++level) {
+ img = get_radeon_texture_image(texObj->Image[face][level]);
+
+ if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "Checking image level %d, face %d, mt %p ... ", level, face, img->mt);
+ }
+
+ if (img->mt != dst_miptree) {
+ if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "MIGRATING\n");
+ }
+ struct radeon_bo *src_bo = (img->mt) ? img->mt->bo : img->bo;
+ if (src_bo && radeon_bo_is_referenced_by_cs(src_bo, rmesa->cmdbuf.cs)) {
+ radeon_firevertices(rmesa);
+ }
+ migrate_image_to_miptree(dst_miptree, img, face, level);
+ } else if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "OK\n");
+ }
+ }
+ }
+
+ t->validated = GL_TRUE;
+
+ return GL_TRUE;
+}
+
+uint32_t get_base_teximage_offset(radeonTexObj *texObj)
+{
+ if (!texObj->mt) {
+ return 0;
+ } else {
+ return radeon_miptree_image_offset(texObj->mt, 0, texObj->minLod);
+ }
+} \ No newline at end of file
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
index db28252da37..a10649b5aea 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
@@ -44,6 +44,7 @@ struct _radeon_mipmap_level {
GLuint depth;
GLuint size; /** Size of each image, in bytes */
GLuint rowstride; /** in bytes */
+ GLuint valid;
radeon_mipmap_image faces[6];
};
@@ -59,43 +60,35 @@ struct _radeon_mipmap_level {
* changed.
*/
struct _radeon_mipmap_tree {
- radeonContextPtr radeon;
- radeonTexObj *t;
struct radeon_bo *bo;
GLuint refcount;
GLuint totalsize; /** total size of the miptree, in bytes */
GLenum target; /** GL_TEXTURE_xxx */
- GLenum internal_format;
+ GLenum mesaFormat; /** MESA_FORMAT_xxx */
GLuint faces; /** # of faces: 6 for cubemaps, 1 otherwise */
- GLuint firstLevel; /** First mip level stored in this mipmap tree */
- GLuint lastLevel; /** Last mip level stored in this mipmap tree */
+ GLuint baseLevel; /** gl_texture_object->baseLevel it was created for */
+ GLuint numLevels; /** Number of mip levels stored in this mipmap tree */
- GLuint width0; /** Width of firstLevel image */
- GLuint height0; /** Height of firstLevel image */
- GLuint depth0; /** Depth of firstLevel image */
+ GLuint width0; /** Width of baseLevel image */
+ GLuint height0; /** Height of baseLevel image */
+ GLuint depth0; /** Depth of baseLevel image */
- GLuint bpp; /** Bytes per texel */
GLuint tilebits; /** RADEON_TXO_xxx_TILE */
- GLuint compressed; /** MESA_FORMAT_xxx indicating a compressed format, or 0 if uncompressed */
radeon_mipmap_level levels[RADEON_MIPTREE_MAX_TEXTURE_LEVELS];
};
-radeon_mipmap_tree* radeon_miptree_create(radeonContextPtr rmesa, radeonTexObj *t,
- GLenum target, GLenum internal_format, GLuint firstLevel, GLuint lastLevel,
- GLuint width0, GLuint height0, GLuint depth0,
- GLuint bpp, GLuint tilebits, GLuint compressed);
-void radeon_miptree_reference(radeon_mipmap_tree *mt);
-void radeon_miptree_unreference(radeon_mipmap_tree *mt);
+void radeon_miptree_reference(radeon_mipmap_tree *mt, radeon_mipmap_tree **ptr);
+void radeon_miptree_unreference(radeon_mipmap_tree **ptr);
GLboolean radeon_miptree_matches_image(radeon_mipmap_tree *mt,
struct gl_texture_image *texImage, GLuint face, GLuint level);
-GLboolean radeon_miptree_matches_texture(radeon_mipmap_tree *mt, struct gl_texture_object *texObj);
-void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t,
- radeon_texture_image *texImage, GLuint face, GLuint level);
+void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t);
GLuint radeon_miptree_image_offset(radeon_mipmap_tree *mt,
GLuint face, GLuint level);
void radeon_miptree_depth_offsets(radeon_mipmap_tree *mt, GLuint level, GLuint *offsets);
+
+uint32_t get_base_teximage_offset(radeonTexObj *texObj);
#endif /* __RADEON_MIPMAP_TREE_H_ */
diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.c b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
index 6539c36268f..98117cdfc14 100644
--- a/src/mesa/drivers/dri/radeon/radeon_queryobj.c
+++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.c
@@ -31,24 +31,11 @@
#include "main/imports.h"
#include "main/simple_list.h"
-static int radeonQueryIsFlushed(GLcontext *ctx, struct gl_query_object *q)
-{
- radeonContextPtr radeon = RADEON_CONTEXT(ctx);
- struct radeon_query_object *tmp, *query = (struct radeon_query_object *)q;
-
- foreach(tmp, &radeon->query.not_flushed_head) {
- if (tmp == query) {
- return 0;
- }
- }
-
- return 1;
-}
-
static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = (struct radeon_query_object *)q;
+ uint32_t *result;
int i;
radeon_print(RADEON_STATE, RADEON_VERBOSE,
@@ -56,6 +43,7 @@ static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q)
__FUNCTION__, query->Base.Id, (int) query->Base.Result);
radeon_bo_map(query->bo, GL_FALSE);
+ result = query->bo->ptr;
query->Base.Result = 0;
if (IS_R600_CLASS(radeon->radeonScreen)) {
@@ -66,10 +54,11 @@ static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q)
* hw writes zpass end counts to qwords 1, 3, 5, 7.
* then we substract. MSB is the valid bit.
*/
- uint64_t *result = query->bo->ptr;
- for (i = 0; i < 8; i += 2) {
- uint64_t start = result[i];
- uint64_t end = result[i + 1];
+ for (i = 0; i < 16; i += 4) {
+ uint64_t start = (uint64_t)LE32_TO_CPU(result[i]) |
+ (uint64_t)LE32_TO_CPU(result[i + 1]) << 32;
+ uint64_t end = (uint64_t)LE32_TO_CPU(result[i + 2]) |
+ (uint64_t)LE32_TO_CPU(result[i + 3]) << 32;
if ((start & 0x8000000000000000) && (end & 0x8000000000000000)) {
uint64_t query_count = end - start;
query->Base.Result += query_count;
@@ -79,10 +68,9 @@ static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q)
"%d start: %lx, end: %lx %ld\n", i, start, end, end - start);
}
} else {
- uint32_t *result = query->bo->ptr;
for (i = 0; i < query->curr_offset/sizeof(uint32_t); ++i) {
- query->Base.Result += result[i];
- radeon_print(RADEON_STATE, RADEON_TRACE, "result[%d] = %d\n", i, result[i]);
+ query->Base.Result += LE32_TO_CPU(result[i]);
+ radeon_print(RADEON_STATE, RADEON_TRACE, "result[%d] = %d\n", i, LE32_TO_CPU(result[i]));
}
}
@@ -120,10 +108,11 @@ static void radeonDeleteQuery(GLcontext *ctx, struct gl_query_object *q)
static void radeonWaitQuery(GLcontext *ctx, struct gl_query_object *q)
{
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
struct radeon_query_object *query = (struct radeon_query_object *)q;
/* If the cmdbuf with packets for this query hasn't been flushed yet, do it now */
- if (!radeonQueryIsFlushed(ctx, q))
+ if (radeon_bo_is_referenced_by_cs(query->bo, radeon->cmdbuf.cs))
ctx->Driver.Flush(ctx);
radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s: query id %d, bo %p, offset %d\n", __FUNCTION__, q->Id, query->bo, query->curr_offset);
@@ -155,8 +144,6 @@ static void radeonBeginQuery(GLcontext *ctx, struct gl_query_object *q)
radeon->query.queryobj.dirty = GL_TRUE;
radeon->hw.is_dirty = GL_TRUE;
- insert_at_tail(&radeon->query.not_flushed_head, query);
-
}
void radeonEmitQueryEnd(GLcontext *ctx)
@@ -204,7 +191,7 @@ static void radeonCheckQuery(GLcontext *ctx, struct gl_query_object *q)
uint32_t domain;
/* Need to perform a flush, as per ARB_occlusion_query spec */
- if (!radeonQueryIsFlushed(ctx, q)) {
+ if (radeon_bo_is_referenced_by_cs(query->bo, radeon->cmdbuf.cs)) {
ctx->Driver.Flush(ctx);
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 7a124a8be6c..be2d8365ef5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -390,12 +390,14 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
screen->device_id = device_id;
screen->chip_flags = 0;
switch ( device_id ) {
+ case PCI_CHIP_RN50_515E:
+ case PCI_CHIP_RN50_5969:
+ return -1;
+
case PCI_CHIP_RADEON_LY:
case PCI_CHIP_RADEON_LZ:
case PCI_CHIP_RADEON_QY:
case PCI_CHIP_RADEON_QZ:
- case PCI_CHIP_RN50_515E:
- case PCI_CHIP_RN50_5969:
screen->chip_family = CHIP_FAMILY_RV100;
break;
@@ -1482,11 +1484,11 @@ radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv,
_mesa_initialize_framebuffer(&rfb->base, mesaVis);
if (mesaVis->redBits == 5)
- rgbFormat = MESA_FORMAT_RGB565;
+ rgbFormat = _mesa_little_endian() ? MESA_FORMAT_RGB565 : MESA_FORMAT_RGB565_REV;
else if (mesaVis->alphaBits == 0)
- rgbFormat = MESA_FORMAT_XRGB8888;
+ rgbFormat = _mesa_little_endian() ? MESA_FORMAT_XRGB8888 : MESA_FORMAT_XRGB8888_REV;
else
- rgbFormat = MESA_FORMAT_ARGB8888;
+ rgbFormat = _mesa_little_endian() ? MESA_FORMAT_ARGB8888 : MESA_FORMAT_ARGB8888_REV;
/* front color renderbuffer */
rfb->color_rb[0] = radeon_create_renderbuffer(rgbFormat, driDrawPriv);
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c
index 2bc7d312546..37904dc8dc9 100644
--- a/src/mesa/drivers/dri/radeon/radeon_span.c
+++ b/src/mesa/drivers/dri/radeon/radeon_span.c
@@ -41,6 +41,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
+#include "main/texformat.h"
#include "swrast/swrast.h"
#include "radeon_common.h"
@@ -400,6 +401,18 @@ static GLubyte *radeon_ptr_2byte_8x2(const struct radeon_renderbuffer * rrb,
#endif
#include "spantmp2.h"
+#define SPANTMP_PIXEL_FMT GL_RGB
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_5_6_5_REV
+
+#define TAG(x) radeon##x##_RGB565_REV
+#define TAG2(x,y) radeon##x##_RGB565_REV##y
+#if defined(RADEON_R600)
+#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off)
+#else
+#define GET_PTR(X,Y) radeon_ptr_2byte_8x2(rrb, (X) + x_off, (Y) + y_off)
+#endif
+#include "spantmp2.h"
+
/* 16 bit, ARGB1555 color spanline and pixel functions
*/
#define SPANTMP_PIXEL_FMT GL_BGRA
@@ -414,6 +427,18 @@ static GLubyte *radeon_ptr_2byte_8x2(const struct radeon_renderbuffer * rrb,
#endif
#include "spantmp2.h"
+#define SPANTMP_PIXEL_FMT GL_BGRA
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_1_5_5_5
+
+#define TAG(x) radeon##x##_ARGB1555_REV
+#define TAG2(x,y) radeon##x##_ARGB1555_REV##y
+#if defined(RADEON_R600)
+#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off)
+#else
+#define GET_PTR(X,Y) radeon_ptr_2byte_8x2(rrb, (X) + x_off, (Y) + y_off)
+#endif
+#include "spantmp2.h"
+
/* 16 bit, RGBA4 color spanline and pixel functions
*/
#define SPANTMP_PIXEL_FMT GL_BGRA
@@ -428,6 +453,18 @@ static GLubyte *radeon_ptr_2byte_8x2(const struct radeon_renderbuffer * rrb,
#endif
#include "spantmp2.h"
+#define SPANTMP_PIXEL_FMT GL_BGRA
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_SHORT_4_4_4_4
+
+#define TAG(x) radeon##x##_ARGB4444_REV
+#define TAG2(x,y) radeon##x##_ARGB4444_REV##y
+#if defined(RADEON_R600)
+#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off)
+#else
+#define GET_PTR(X,Y) radeon_ptr_2byte_8x2(rrb, (X) + x_off, (Y) + y_off)
+#endif
+#include "spantmp2.h"
+
/* 32 bit, xRGB8888 color spanline and pixel functions
*/
#define SPANTMP_PIXEL_FMT GL_BGRA
@@ -472,6 +509,42 @@ static GLubyte *radeon_ptr_2byte_8x2(const struct radeon_renderbuffer * rrb,
#endif
#include "spantmp2.h"
+/* 32 bit, BGRx8888 color spanline and pixel functions
+ */
+#define SPANTMP_PIXEL_FMT GL_BGRA
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8
+
+#define TAG(x) radeon##x##_BGRx8888
+#define TAG2(x,y) radeon##x##_BGRx8888##y
+#if defined(RADEON_R600)
+#define GET_VALUE(_x, _y) ((*(GLuint*)(r600_ptr_color(rrb, _x + x_off, _y + y_off)) | 0x000000ff))
+#define PUT_VALUE(_x, _y, d) { \
+ GLuint *_ptr = (GLuint*)r600_ptr_color( rrb, _x + x_off, _y + y_off ); \
+ *_ptr = d; \
+} while (0)
+#else
+#define GET_VALUE(_x, _y) ((*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off)) | 0x000000ff))
+#define PUT_VALUE(_x, _y, d) { \
+ GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
+ *_ptr = d; \
+} while (0)
+#endif
+#include "spantmp2.h"
+
+/* 32 bit, BGRA8888 color spanline and pixel functions
+ */
+#define SPANTMP_PIXEL_FMT GL_BGRA
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8
+
+#define TAG(x) radeon##x##_BGRA8888
+#define TAG2(x,y) radeon##x##_BGRA8888##y
+#if defined(RADEON_R600)
+#define GET_PTR(X,Y) r600_ptr_color(rrb, (X) + x_off, (Y) + y_off)
+#else
+#define GET_PTR(X,Y) radeon_ptr_4byte(rrb, (X) + x_off, (Y) + y_off)
+#endif
+#include "spantmp2.h"
+
/* ================================================================
* Depth buffer
*/
@@ -526,10 +599,10 @@ static GLubyte *radeon_ptr_2byte_8x2(const struct radeon_renderbuffer * rrb,
#define WRITE_DEPTH( _x, _y, d ) \
do { \
GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
- GLuint tmp = *_ptr; \
+ GLuint tmp = LE32_TO_CPU(*_ptr); \
tmp &= 0x000000ff; \
tmp |= ((d << 8) & 0xffffff00); \
- *_ptr = tmp; \
+ *_ptr = CPU_TO_LE32(tmp); \
} while (0)
#elif defined(RADEON_R600)
#define WRITE_DEPTH( _x, _y, d ) \
@@ -544,26 +617,26 @@ do { \
#define WRITE_DEPTH( _x, _y, d ) \
do { \
GLuint *_ptr = (GLuint*)r200_depth_4byte( rrb, _x + x_off, _y + y_off ); \
- GLuint tmp = *_ptr; \
+ GLuint tmp = LE32_TO_CPU(*_ptr); \
tmp &= 0xff000000; \
tmp |= ((d) & 0x00ffffff); \
- *_ptr = tmp; \
+ *_ptr = CPU_TO_LE32(tmp); \
} while (0)
#else
#define WRITE_DEPTH( _x, _y, d ) \
do { \
GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
- GLuint tmp = *_ptr; \
+ GLuint tmp = LE32_TO_CPU(*_ptr); \
tmp &= 0xff000000; \
tmp |= ((d) & 0x00ffffff); \
- *_ptr = tmp; \
+ *_ptr = CPU_TO_LE32(tmp); \
} while (0)
#endif
#if defined(RADEON_R300)
#define READ_DEPTH( d, _x, _y ) \
do { \
- d = (*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off)) & 0xffffff00) >> 8; \
+ d = (LE32_TO_CPU(*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off))) & 0xffffff00) >> 8; \
}while(0)
#elif defined(RADEON_R600)
#define READ_DEPTH( d, _x, _y ) \
@@ -573,11 +646,11 @@ do { \
#elif defined(RADEON_R200)
#define READ_DEPTH( d, _x, _y ) \
do { \
- d = *(GLuint*)(r200_depth_4byte(rrb, _x + x_off, _y + y_off)) & 0x00ffffff; \
+ d = LE32_TO_CPU(*(GLuint*)(r200_depth_4byte(rrb, _x + x_off, _y + y_off))) & 0x00ffffff; \
}while(0)
#else
#define READ_DEPTH( d, _x, _y ) \
- d = *(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off)) & 0x00ffffff;
+ d = LE32_TO_CPU(*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off))) & 0x00ffffff;
#endif
#define TAG(x) radeon##x##_z24
@@ -595,7 +668,7 @@ do { \
#define WRITE_DEPTH( _x, _y, d ) \
do { \
GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
- *_ptr = d; \
+ *_ptr = CPU_TO_LE32((((d) & 0xff000000) >> 24) | (((d) & 0x00ffffff) << 8)); \
} while (0)
#elif defined(RADEON_R600)
#define WRITE_DEPTH( _x, _y, d ) \
@@ -615,20 +688,21 @@ do { \
#define WRITE_DEPTH( _x, _y, d ) \
do { \
GLuint *_ptr = (GLuint*)r200_depth_4byte( rrb, _x + x_off, _y + y_off ); \
- *_ptr = d; \
+ *_ptr = CPU_TO_LE32(d); \
} while (0)
#else
#define WRITE_DEPTH( _x, _y, d ) \
do { \
GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
- *_ptr = d; \
+ *_ptr = CPU_TO_LE32(d); \
} while (0)
#endif
#if defined(RADEON_R300)
#define READ_DEPTH( d, _x, _y ) \
do { \
- d = (*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off))); \
+ GLuint tmp = (*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off))); \
+ d = LE32_TO_CPU(((tmp & 0x000000ff) << 24) | ((tmp & 0xffffff00) >> 8)); \
}while(0)
#elif defined(RADEON_R600)
#define READ_DEPTH( d, _x, _y ) \
@@ -639,11 +713,11 @@ do { \
#elif defined(RADEON_R200)
#define READ_DEPTH( d, _x, _y ) \
do { \
- d = *(GLuint*)(r200_depth_4byte(rrb, _x + x_off, _y + y_off)); \
+ d = LE32_TO_CPU(*(GLuint*)(r200_depth_4byte(rrb, _x + x_off, _y + y_off))); \
}while(0)
#else
#define READ_DEPTH( d, _x, _y ) do { \
- d = *(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off )); \
+ d = LE32_TO_CPU(*(GLuint*)(radeon_ptr_4byte(rrb, _x + x_off, _y + y_off))); \
} while (0)
#endif
@@ -660,10 +734,10 @@ do { \
#define WRITE_STENCIL( _x, _y, d ) \
do { \
GLuint *_ptr = (GLuint*)radeon_ptr_4byte(rrb, _x + x_off, _y + y_off); \
- GLuint tmp = *_ptr; \
+ GLuint tmp = LE32_TO_CPU(*_ptr); \
tmp &= 0xffffff00; \
tmp |= (d) & 0xff; \
- *_ptr = tmp; \
+ *_ptr = CPU_TO_LE32(tmp); \
} while (0)
#elif defined(RADEON_R600)
#define WRITE_STENCIL( _x, _y, d ) \
@@ -678,19 +752,19 @@ do { \
#define WRITE_STENCIL( _x, _y, d ) \
do { \
GLuint *_ptr = (GLuint*)r200_depth_4byte(rrb, _x + x_off, _y + y_off); \
- GLuint tmp = *_ptr; \
+ GLuint tmp = LE32_TO_CPU(*_ptr); \
tmp &= 0x00ffffff; \
tmp |= (((d) & 0xff) << 24); \
- *_ptr = tmp; \
+ *_ptr = CPU_TO_LE32(tmp); \
} while (0)
#else
#define WRITE_STENCIL( _x, _y, d ) \
do { \
GLuint *_ptr = (GLuint*)radeon_ptr_4byte(rrb, _x + x_off, _y + y_off); \
- GLuint tmp = *_ptr; \
+ GLuint tmp = LE32_TO_CPU(*_ptr); \
tmp &= 0x00ffffff; \
tmp |= (((d) & 0xff) << 24); \
- *_ptr = tmp; \
+ *_ptr = CPU_TO_LE32(tmp); \
} while (0)
#endif
@@ -698,7 +772,7 @@ do { \
#define READ_STENCIL( d, _x, _y ) \
do { \
GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
- GLuint tmp = *_ptr; \
+ GLuint tmp = LE32_TO_CPU(*_ptr); \
d = tmp & 0x000000ff; \
} while (0)
#elif defined(RADEON_R600)
@@ -712,14 +786,14 @@ do { \
#define READ_STENCIL( d, _x, _y ) \
do { \
GLuint *_ptr = (GLuint*)r200_depth_4byte( rrb, _x + x_off, _y + y_off ); \
- GLuint tmp = *_ptr; \
+ GLuint tmp = LE32_TO_CPU(*_ptr); \
d = (tmp & 0xff000000) >> 24; \
} while (0)
#else
#define READ_STENCIL( d, _x, _y ) \
do { \
GLuint *_ptr = (GLuint*)radeon_ptr_4byte( rrb, _x + x_off, _y + y_off ); \
- GLuint tmp = *_ptr; \
+ GLuint tmp = LE32_TO_CPU(*_ptr); \
d = (tmp & 0xff000000) >> 24; \
} while (0)
#endif
@@ -848,14 +922,24 @@ static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb)
{
if (rrb->base.Format == MESA_FORMAT_RGB565) {
radeonInitPointers_RGB565(&rrb->base);
+ } else if (rrb->base.Format == MESA_FORMAT_RGB565_REV) {
+ radeonInitPointers_RGB565_REV(&rrb->base);
} else if (rrb->base.Format == MESA_FORMAT_XRGB8888) {
radeonInitPointers_xRGB8888(&rrb->base);
+ } else if (rrb->base.Format == MESA_FORMAT_XRGB8888_REV) {
+ radeonInitPointers_BGRx8888(&rrb->base);
} else if (rrb->base.Format == MESA_FORMAT_ARGB8888) {
radeonInitPointers_ARGB8888(&rrb->base);
+ } else if (rrb->base.Format == MESA_FORMAT_ARGB8888_REV) {
+ radeonInitPointers_BGRA8888(&rrb->base);
} else if (rrb->base.Format == MESA_FORMAT_ARGB4444) {
radeonInitPointers_ARGB4444(&rrb->base);
+ } else if (rrb->base.Format == MESA_FORMAT_ARGB4444_REV) {
+ radeonInitPointers_ARGB4444_REV(&rrb->base);
} else if (rrb->base.Format == MESA_FORMAT_ARGB1555) {
radeonInitPointers_ARGB1555(&rrb->base);
+ } else if (rrb->base.Format == MESA_FORMAT_ARGB1555_REV) {
+ radeonInitPointers_ARGB1555_REV(&rrb->base);
} else if (rrb->base.Format == MESA_FORMAT_Z16) {
radeonInitDepthPointers_z16(&rrb->base);
} else if (rrb->base.Format == MESA_FORMAT_X8_Z24) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c
index 2d19220d8af..dd828882543 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state_init.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c
@@ -645,11 +645,11 @@ static void tex_emit_cs(GLcontext *ctx, struct radeon_state_atom *atom)
OUT_BATCH(CP_PACKET0(RADEON_PP_TXOFFSET_0 + (24 * i), 0));
if (t->mt && !t->image_override) {
if ((ctx->Texture.Unit[i]._ReallyEnabled & TEXTURE_CUBE_BIT)) {
- lvl = &t->mt->levels[0];
+ lvl = &t->mt->levels[t->minLod];
OUT_BATCH_RELOC(lvl->faces[5].offset, t->mt->bo, lvl->faces[5].offset,
RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
} else {
- OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, 0,
+ OUT_BATCH_RELOC(t->tile_bits, t->mt->bo, get_base_teximage_offset(t),
RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
}
} else {
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index e61f59eaeaf..8bf1bfbc575 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -179,7 +179,7 @@ static void radeonSetVertexFormat( GLcontext *ctx )
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX(i) )) {
- GLuint sz = VB->TexCoordPtr[i]->size;
+ GLuint sz = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->size;
switch (sz) {
case 1:
@@ -309,7 +309,7 @@ void r100_swtcl_flush(GLcontext *ctx, uint32_t current_offset)
radeonEmitState(&rmesa->radeon);
radeonEmitVertexAOS( rmesa,
rmesa->radeon.swtcl.vertex_size,
- first_elem(&rmesa->radeon.dma.reserved)->bo,
+ rmesa->radeon.swtcl.bo,
current_offset);
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index 60981aada24..749ab75f201 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -348,17 +348,7 @@ static void radeonTexParameter( GLcontext *ctx, GLenum target,
case GL_TEXTURE_MAX_LEVEL:
case GL_TEXTURE_MIN_LOD:
case GL_TEXTURE_MAX_LOD:
-
- /* This isn't the most efficient solution but there doesn't appear to
- * be a nice alternative. Since there's no LOD clamping,
- * we just have to rely on loading the right subset of mipmap levels
- * to simulate a clamped LOD.
- */
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = 0;
- t->validated = GL_FALSE;
- }
+ t->validated = GL_FALSE;
break;
default:
@@ -388,10 +378,8 @@ static void radeonDeleteTexture( GLcontext *ctx,
}
}
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = 0;
- }
+ radeon_miptree_unreference(&t->mt);
+
/* Free mipmap images and the texture object itself */
_mesa_delete_texture_object(ctx, texObj);
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 429977a8bcc..84ddcfd4fd3 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texstate.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texstate.c
@@ -672,24 +672,13 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
return;
}
- radeon_update_renderbuffers(pDRICtx, dPriv);
- /* back & depth buffer are useless free them right away */
- rb = (void*)rfb->base.Attachment[BUFFER_DEPTH].Renderbuffer;
- if (rb && rb->bo) {
- radeon_bo_unref(rb->bo);
- rb->bo = NULL;
- }
- rb = (void*)rfb->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer;
- if (rb && rb->bo) {
- radeon_bo_unref(rb->bo);
- rb->bo = NULL;
- }
+ radeon_update_renderbuffers(pDRICtx, dPriv, GL_TRUE);
rb = rfb->color_rb[0];
if (rb->bo == NULL) {
/* Failed to BO for the buffer */
return;
}
-
+
_mesa_lock_texture(radeon->glCtx, texObj);
if (t->bo) {
radeon_bo_unref(t->bo);
@@ -699,14 +688,10 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
radeon_bo_unref(rImage->bo);
rImage->bo = NULL;
}
- if (t->mt) {
- radeon_miptree_unreference(t->mt);
- t->mt = NULL;
- }
- if (rImage->mt) {
- radeon_miptree_unreference(rImage->mt);
- rImage->mt = NULL;
- }
+
+ 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;
@@ -718,8 +703,6 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
t->tile_bits = 0;
t->image_override = GL_TRUE;
t->override_offset = 0;
- t->pp_txpitch &= (1 << 13) -1;
- pitch_val = rb->pitch;
switch (rb->cpp) {
case 4:
if (glx_texture_format == GLX_TEXTURE_FORMAT_RGB_EXT)
@@ -738,12 +721,17 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
t->pp_txfilter |= tx_table[MESA_FORMAT_RGB565].filter;
break;
}
- t->pp_txsize = ((rb->base.Width - 1) << RADEON_TEX_USIZE_SHIFT)
- | ((rb->base.Height - 1) << RADEON_TEX_VSIZE_SHIFT);
- t->pp_txformat |= RADEON_TXFORMAT_NON_POWER2;
- t->pp_txpitch = pitch_val;
- t->pp_txpitch -= 32;
+ t->pp_txpitch &= (1 << 13) -1;
+ pitch_val = rb->pitch;
+
+ t->pp_txsize = ((rb->base.Width - 1) << RADEON_TEX_USIZE_SHIFT)
+ | ((rb->base.Height - 1) << RADEON_TEX_VSIZE_SHIFT);
+ if (target == GL_TEXTURE_RECTANGLE_NV) {
+ t->pp_txformat |= RADEON_TXFORMAT_NON_POWER2;
+ t->pp_txpitch = pitch_val;
+ t->pp_txpitch -= 32;
+ }
t->validated = GL_TRUE;
_mesa_unlock_texture(radeon->glCtx, texObj);
return;
@@ -1021,7 +1009,7 @@ static GLboolean setup_hardware_state(r100ContextPtr rmesa, radeonTexObj *t, int
return GL_TRUE;
}
- firstImage = t->base.Image[0][t->mt->firstLevel];
+ firstImage = t->base.Image[0][t->minLod];
if (firstImage->Border > 0) {
fprintf(stderr, "%s: border\n", __FUNCTION__);
@@ -1049,9 +1037,9 @@ static GLboolean setup_hardware_state(r100ContextPtr rmesa, radeonTexObj *t, int
return GL_FALSE;
}
}
-
+
t->pp_txfilter &= ~RADEON_MAX_MIP_LEVEL_MASK;
- t->pp_txfilter |= (t->mt->lastLevel - t->mt->firstLevel) << RADEON_MAX_MIP_LEVEL_SHIFT;
+ t->pp_txfilter |= (t->maxLod - t->minLod) << RADEON_MAX_MIP_LEVEL_SHIFT;
t->pp_txformat &= ~(RADEON_TXFORMAT_WIDTH_MASK |
RADEON_TXFORMAT_HEIGHT_MASK |
@@ -1060,9 +1048,9 @@ static GLboolean setup_hardware_state(r100ContextPtr rmesa, radeonTexObj *t, int
RADEON_TXFORMAT_F5_HEIGHT_MASK);
t->pp_txformat |= ((log2Width << RADEON_TXFORMAT_WIDTH_SHIFT) |
(log2Height << RADEON_TXFORMAT_HEIGHT_SHIFT));
-
+
t->tile_bits = 0;
-
+
if (t->base.Target == GL_TEXTURE_CUBE_MAP) {
ASSERT(log2Width == log2Height);
t->pp_txformat |= ((log2Width << RADEON_TXFORMAT_F5_WIDTH_SHIFT) |
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index baa99b752b1..0390d376ba2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2009 Maciej Cencora.
* Copyright (C) 2008 Nicolai Haehnle.
* Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
*
@@ -46,7 +47,7 @@
#include "radeon_mipmap_tree.h"
-static void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride,
+void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride,
GLuint numrows, GLuint rowsize)
{
assert(rowsize <= dststride);
@@ -81,8 +82,7 @@ void radeonFreeTexImageData(GLcontext *ctx, struct gl_texture_image *timage)
radeon_texture_image* image = get_radeon_texture_image(timage);
if (image->mt) {
- radeon_miptree_unreference(image->mt);
- image->mt = 0;
+ radeon_miptree_unreference(&image->mt);
assert(!image->base.Data);
} else {
_mesa_free_texture_image_data(ctx, timage);
@@ -108,7 +108,7 @@ static void teximage_set_map_data(radeon_texture_image *image)
lvl = &image->mt->levels[image->mtlevel];
image->base.Data = image->mt->bo->ptr + lvl->faces[image->mtface].offset;
- image->base.RowStride = lvl->rowstride / image->mt->bpp;
+ image->base.RowStride = lvl->rowstride / _mesa_get_format_bytes(image->base.TexFormat);
}
@@ -174,7 +174,7 @@ void radeonMapTexture(GLcontext *ctx, struct gl_texture_object *texObj)
radeon_bo_map(t->mt->bo, GL_FALSE);
for(face = 0; face < t->mt->faces; ++face) {
- for(level = t->mt->firstLevel; level <= t->mt->lastLevel; ++level)
+ for(level = t->minLod; level <= t->maxLod; ++level)
teximage_set_map_data(get_radeon_texture_image(texObj->Image[face][level]));
}
}
@@ -191,7 +191,7 @@ void radeonUnmapTexture(GLcontext *ctx, struct gl_texture_object *texObj)
return;
for(face = 0; face < t->mt->faces; ++face) {
- for(level = t->mt->firstLevel; level <= t->mt->lastLevel; ++level)
+ for(level = t->minLod; level <= t->maxLod; ++level)
texObj->Image[face][level]->Data = 0;
}
radeon_bo_unmap(t->mt->bo);
@@ -240,8 +240,7 @@ static void radeon_generate_mipmap(GLcontext *ctx, GLenum target,
image->mtlevel = i;
image->mtface = face;
- radeon_miptree_unreference(image->mt);
- image->mt = NULL;
+ radeon_miptree_unreference(&image->mt);
}
}
@@ -510,6 +509,170 @@ gl_format radeonChooseTextureFormat(GLcontext * ctx,
return MESA_FORMAT_NONE; /* never get here */
}
+/** Check if given image is valid within current texture object.
+ */
+static int image_matches_texture_obj(struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ unsigned level)
+{
+ const struct gl_texture_image *baseImage = texObj->Image[0][level];
+
+ if (level < texObj->BaseLevel || level > texObj->MaxLevel)
+ return 0;
+
+ const unsigned levelDiff = level - texObj->BaseLevel;
+ const unsigned refWidth = baseImage->Width >> levelDiff;
+ const unsigned refHeight = baseImage->Height >> levelDiff;
+ const unsigned refDepth = baseImage->Depth >> levelDiff;
+
+ return (texImage->Width == refWidth &&
+ texImage->Height == refHeight &&
+ texImage->Depth == refDepth);
+}
+
+static void teximage_assign_miptree(radeonContextPtr rmesa,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ unsigned face,
+ unsigned level)
+{
+ radeonTexObj *t = radeon_tex_obj(texObj);
+ radeon_texture_image* image = get_radeon_texture_image(texImage);
+
+ /* Since miptree holds only images for levels <BaseLevel..MaxLevel>
+ * don't allocate the miptree if the teximage won't fit.
+ */
+ if (!image_matches_texture_obj(texObj, texImage, level))
+ return;
+
+ /* Try using current miptree, or create new if there isn't any */
+ if (!t->mt || !radeon_miptree_matches_image(t->mt, texImage, face, level)) {
+ radeon_miptree_unreference(&t->mt);
+ radeon_try_alloc_miptree(rmesa, t);
+ if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "%s: texObj %p, texImage %p, face %d, level %d, "
+ "texObj miptree doesn't match, allocated new miptree %p\n",
+ __FUNCTION__, texObj, texImage, face, level, t->mt);
+ }
+ }
+
+ /* Miptree alocation may have failed,
+ * when there was no image for baselevel specified */
+ if (t->mt) {
+ image->mtface = face;
+ image->mtlevel = level;
+ radeon_miptree_reference(t->mt, &image->mt);
+ }
+}
+
+static GLuint * allocate_image_offsets(GLcontext *ctx,
+ unsigned alignedWidth,
+ unsigned height,
+ unsigned depth)
+{
+ int i;
+ GLuint *offsets;
+
+ offsets = _mesa_malloc(depth * sizeof(GLuint)) ;
+ if (!offsets) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTex[Sub]Image");
+ return NULL;
+ }
+
+ for (i = 0; i < depth; ++i) {
+ offsets[i] = alignedWidth * height * i;
+ }
+
+ return offsets;
+}
+
+/**
+ * Update a subregion of the given texture image.
+ */
+static void radeon_store_teximage(GLcontext* ctx, int dims,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLsizei imageSize,
+ GLenum format, GLenum type,
+ const GLvoid * pixels,
+ const struct gl_pixelstore_attrib *packing,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ int compressed)
+{
+ radeonTexObj *t = radeon_tex_obj(texObj);
+ radeon_texture_image* image = get_radeon_texture_image(texImage);
+
+ GLuint dstRowStride;
+ GLuint *dstImageOffsets;
+
+ if (image->mt) {
+ dstRowStride = image->mt->levels[image->mtlevel].rowstride;
+ } else if (t->bo) {
+ /* TFP case */
+ /* TODO */
+ assert(0);
+ } else {
+ dstRowStride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
+ }
+
+ assert(dstRowStride);
+
+ if (dims == 3) {
+ unsigned alignedWidth = dstRowStride/_mesa_get_format_bytes(texImage->TexFormat);
+ dstImageOffsets = allocate_image_offsets(ctx, alignedWidth, texImage->Height, texImage->Depth);
+ if (!dstImageOffsets) {
+ return;
+ }
+ } else {
+ dstImageOffsets = texImage->ImageOffsets;
+ }
+
+ radeon_teximage_map(image, GL_TRUE);
+
+ if (compressed) {
+ uint32_t srcRowStride, bytesPerRow, rows, block_width, block_height;
+ GLubyte *img_start;
+
+ _mesa_get_format_block_size(texImage->TexFormat, &block_width, &block_height);
+
+ if (!image->mt) {
+ dstRowStride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
+ img_start = _mesa_compressed_image_address(xoffset, yoffset, 0,
+ texImage->TexFormat,
+ texImage->Width, texImage->Data);
+ }
+ else {
+ uint32_t offset;
+ offset = dstRowStride / _mesa_get_format_bytes(texImage->TexFormat) * yoffset / block_height + xoffset / block_width;
+ offset *= _mesa_get_format_bytes(texImage->TexFormat);
+ img_start = texImage->Data + offset;
+ }
+ srcRowStride = _mesa_format_row_stride(texImage->TexFormat, width);
+ bytesPerRow = srcRowStride;
+ rows = (height + block_height - 1) / block_height;
+
+ copy_rows(img_start, dstRowStride, pixels, srcRowStride, rows, bytesPerRow);
+ }
+ else {
+ if (!_mesa_texstore(ctx, dims, texImage->_BaseFormat,
+ texImage->TexFormat, texImage->Data,
+ xoffset, yoffset, zoffset,
+ dstRowStride,
+ dstImageOffsets,
+ width, height, depth,
+ format, type, pixels, packing)) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage");
+ }
+ }
+
+ if (dims == 3) {
+ _mesa_free(dstImageOffsets);
+ }
+
+ radeon_teximage_unmap(image);
+}
+
/**
* All glTexImage calls go through this function.
*/
@@ -528,13 +691,22 @@ static void radeon_teximage(
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
radeonTexObj* t = radeon_tex_obj(texObj);
radeon_texture_image* image = get_radeon_texture_image(texImage);
- GLuint dstRowStride;
GLint postConvWidth = width;
GLint postConvHeight = height;
- GLuint texelBytes;
GLuint face = radeon_face_for_target(target);
- radeon_firevertices(rmesa);
+ {
+ struct radeon_bo *bo;
+ bo = !image->mt ? image->bo : image->mt->bo;
+ if (bo && radeon_bo_is_referenced_by_cs(bo, rmesa->cmdbuf.cs)) {
+ radeon_firevertices(rmesa);
+ }
+ }
+
+ if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "radeon_teximage%dd: texObj %p, texImage %p, face %d, level %d\n",
+ dims, texObj, texImage, face, level);
+ }
t->validated = GL_FALSE;
@@ -543,53 +715,35 @@ static void radeon_teximage(
&postConvHeight);
}
- if (_mesa_is_format_compressed(texImage->TexFormat)) {
- texelBytes = 0;
- } else {
- texelBytes = _mesa_get_format_bytes(texImage->TexFormat);
+ if (!_mesa_is_format_compressed(texImage->TexFormat)) {
+ GLuint texelBytes = _mesa_get_format_bytes(texImage->TexFormat);
/* Minimum pitch of 32 bytes */
if (postConvWidth * texelBytes < 32) {
- postConvWidth = 32 / texelBytes;
- texImage->RowStride = postConvWidth;
+ postConvWidth = 32 / texelBytes;
+ texImage->RowStride = postConvWidth;
}
- if (!image->mt) {
+ if (!image->mt) {
assert(texImage->RowStride == postConvWidth);
}
}
- /* Allocate memory for image */
- radeonFreeTexImageData(ctx, texImage); /* Mesa core only clears texImage->Data but not image->mt */
-
- if (t->mt &&
- t->mt->firstLevel == level &&
- t->mt->lastLevel == level &&
- t->mt->target != GL_TEXTURE_CUBE_MAP_ARB &&
- !radeon_miptree_matches_image(t->mt, texImage, face, level)) {
- radeon_miptree_unreference(t->mt);
- t->mt = NULL;
- }
-
- if (!t->mt)
- radeon_try_alloc_miptree(rmesa, t, image, face, level);
- if (t->mt && radeon_miptree_matches_image(t->mt, texImage, face, level)) {
- radeon_mipmap_level *lvl;
- image->mt = t->mt;
- image->mtlevel = level - t->mt->firstLevel;
- image->mtface = face;
- radeon_miptree_reference(t->mt);
- lvl = &image->mt->levels[image->mtlevel];
- dstRowStride = lvl->rowstride;
- } else {
- int size;
- if (_mesa_is_format_compressed(texImage->TexFormat)) {
- size = _mesa_format_image_size(texImage->TexFormat,
- texImage->Width,
- texImage->Height,
- texImage->Depth);
- } else {
- size = texImage->Width * texImage->Height * texImage->Depth * _mesa_get_format_bytes(texImage->TexFormat);
+ /* Mesa core only clears texImage->Data but not image->mt */
+ radeonFreeTexImageData(ctx, texImage);
+
+ if (!t->bo) {
+ teximage_assign_miptree(rmesa, texObj, texImage, face, level);
+ if (!image->mt) {
+ int size = _mesa_format_image_size(texImage->TexFormat,
+ texImage->Width,
+ texImage->Height,
+ texImage->Depth);
+ texImage->Data = _mesa_alloc_texmemory(size);
+ if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "radeon_teximage%dd: texObj %p, texImage %p, "
+ " no miptree assigned, using local memory %p\n",
+ dims, texObj, texImage, texImage->Data);
+ }
}
- texImage->Data = _mesa_alloc_texmemory(size);
}
/* Upload texture image; note that the spec allows pixels to be NULL */
@@ -603,65 +757,16 @@ static void radeon_teximage(
}
if (pixels) {
- radeon_teximage_map(image, GL_TRUE);
- if (compressed) {
- if (image->mt) {
- uint32_t srcRowStride, bytesPerRow, rows;
- srcRowStride = _mesa_format_row_stride(texImage->TexFormat, width);
- bytesPerRow = srcRowStride;
- rows = (height + 3) / 4;
- copy_rows(texImage->Data, image->mt->levels[level].rowstride,
- pixels, srcRowStride, rows, bytesPerRow);
- } else {
- memcpy(texImage->Data, pixels, imageSize);
- }
- } else {
- GLuint dstRowStride;
- GLuint *dstImageOffsets;
-
- if (image->mt) {
- radeon_mipmap_level *lvl = &image->mt->levels[image->mtlevel];
- dstRowStride = lvl->rowstride;
- } else {
- dstRowStride = texImage->Width * _mesa_get_format_bytes(texImage->TexFormat);
- }
-
- if (dims == 3) {
- int i;
-
- dstImageOffsets = _mesa_malloc(depth * sizeof(GLuint)) ;
- if (!dstImageOffsets)
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage");
-
- for (i = 0; i < depth; ++i) {
- dstImageOffsets[i] = dstRowStride/_mesa_get_format_bytes(texImage->TexFormat) * height * i;
- }
- } else {
- dstImageOffsets = texImage->ImageOffsets;
- }
-
- if (!_mesa_texstore(ctx, dims,
- texImage->_BaseFormat,
- texImage->TexFormat,
- texImage->Data, 0, 0, 0, /* dstX/Y/Zoffset */
- dstRowStride,
- dstImageOffsets,
- width, height, depth,
- format, type, pixels, packing)) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage");
- }
-
- if (dims == 3)
- _mesa_free(dstImageOffsets);
- }
+ radeon_store_teximage(ctx, dims,
+ 0, 0, 0,
+ width, height, depth,
+ imageSize, format, type,
+ pixels, packing,
+ texObj, texImage,
+ compressed);
}
_mesa_unmap_teximage_pbo(ctx, packing);
-
- if (pixels)
- radeon_teximage_unmap(image);
-
-
}
void radeonTexImage1D(GLcontext * ctx, GLenum target, GLint level,
@@ -714,7 +819,7 @@ void radeonTexImage3D(GLcontext * ctx, GLenum target, GLint level,
}
/**
- * Update a subregion of the given texture image.
+ * All glTexSubImage calls go through this function.
*/
static void radeon_texsubimage(GLcontext* ctx, int dims, GLenum target, int level,
GLint xoffset, GLint yoffset, GLint zoffset,
@@ -731,66 +836,39 @@ static void radeon_texsubimage(GLcontext* ctx, int dims, GLenum target, int leve
radeonTexObj* t = radeon_tex_obj(texObj);
radeon_texture_image* image = get_radeon_texture_image(texImage);
- radeon_firevertices(rmesa);
+ {
+ struct radeon_bo *bo;
+ bo = !image->mt ? image->bo : image->mt->bo;
+ if (bo && radeon_bo_is_referenced_by_cs(bo, rmesa->cmdbuf.cs)) {
+ radeon_firevertices(rmesa);
+ }
+ }
+
+ if (RADEON_DEBUG & RADEON_TEXTURE) {
+ fprintf(stderr, "radeon_texsubimage%dd: texObj %p, texImage %p, face %d, level %d\n",
+ dims, texObj, texImage, radeon_face_for_target(target), level);
+ }
t->validated = GL_FALSE;
if (compressed) {
pixels = _mesa_validate_pbo_compressed_teximage(
- ctx, imageSize, pixels, packing, "glCompressedTexImage");
+ ctx, imageSize, pixels, packing, "glCompressedTexSubImage");
} else {
pixels = _mesa_validate_pbo_teximage(ctx, dims,
- width, height, depth, format, type, pixels, packing, "glTexSubImage1D");
+ width, height, depth, format, type, pixels, packing, "glTexSubImage");
}
if (pixels) {
- GLint dstRowStride;
- radeon_teximage_map(image, GL_TRUE);
-
- if (image->mt) {
- radeon_mipmap_level *lvl = &image->mt->levels[image->mtlevel];
- dstRowStride = lvl->rowstride;
- } else {
- dstRowStride = texImage->RowStride * _mesa_get_format_bytes(texImage->TexFormat);
- }
-
- if (compressed) {
- uint32_t srcRowStride, bytesPerRow, rows;
- GLubyte *img_start;
- if (!image->mt) {
- dstRowStride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
- img_start = _mesa_compressed_image_address(xoffset, yoffset, 0,
- texImage->TexFormat,
- texImage->Width, texImage->Data);
- }
- else {
- uint32_t blocks_x = dstRowStride / (image->mt->bpp * 4);
- img_start = texImage->Data + image->mt->bpp * 4 * (blocks_x * (yoffset / 4) + xoffset / 4);
- }
- srcRowStride = _mesa_format_row_stride(texImage->TexFormat, width);
- bytesPerRow = srcRowStride;
- rows = (height + 3) / 4;
-
- copy_rows(img_start, dstRowStride, pixels, srcRowStride, rows, bytesPerRow);
-
- }
- else {
- if (!_mesa_texstore(ctx, dims, texImage->_BaseFormat,
- texImage->TexFormat, texImage->Data,
- xoffset, yoffset, zoffset,
- dstRowStride,
- texImage->ImageOffsets,
- width, height, depth,
- format, type, pixels, packing)) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage");
- }
- }
+ radeon_store_teximage(ctx, dims,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ imageSize, format, type,
+ pixels, packing,
+ texObj, texImage,
+ compressed);
}
- radeon_teximage_unmap(image);
-
_mesa_unmap_teximage_pbo(ctx, packing);
-
-
}
void radeonTexSubImage1D(GLcontext * ctx, GLenum target, GLint level,
@@ -846,143 +924,6 @@ void radeonTexSubImage3D(GLcontext * ctx, GLenum target, GLint level,
format, type, pixels, packing, texObj, texImage, 0);
}
-
-
-/**
- * Ensure that the given image is stored in the given miptree from now on.
- */
-static void migrate_image_to_miptree(radeon_mipmap_tree *mt, radeon_texture_image *image, int face, int level)
-{
- radeon_mipmap_level *dstlvl = &mt->levels[level - mt->firstLevel];
- unsigned char *dest;
-
- assert(image->mt != mt);
- assert(dstlvl->width == image->base.Width);
- assert(dstlvl->height == image->base.Height);
- assert(dstlvl->depth == image->base.Depth);
-
-
- radeon_bo_map(mt->bo, GL_TRUE);
- dest = mt->bo->ptr + dstlvl->faces[face].offset;
-
- if (image->mt) {
- /* Format etc. should match, so we really just need a memcpy().
- * In fact, that memcpy() could be done by the hardware in many
- * cases, provided that we have a proper memory manager.
- */
- radeon_mipmap_level *srclvl = &image->mt->levels[image->mtlevel-image->mt->firstLevel];
-
- assert(srclvl->size == dstlvl->size);
- assert(srclvl->rowstride == dstlvl->rowstride);
-
- radeon_bo_map(image->mt->bo, GL_FALSE);
-
- memcpy(dest,
- image->mt->bo->ptr + srclvl->faces[face].offset,
- dstlvl->size);
- radeon_bo_unmap(image->mt->bo);
-
- radeon_miptree_unreference(image->mt);
- } else {
- uint32_t srcrowstride;
- uint32_t height;
- /* need to confirm this value is correct */
- if (mt->compressed) {
- height = (image->base.Height + 3) / 4;
- srcrowstride = _mesa_format_row_stride(image->base.TexFormat, image->base.Width);
- } else {
- height = image->base.Height * image->base.Depth;
- srcrowstride = image->base.Width * _mesa_get_format_bytes(image->base.TexFormat);
- }
-
-// if (mt->tilebits)
-// WARN_ONCE("%s: tiling not supported yet", __FUNCTION__);
-
- copy_rows(dest, dstlvl->rowstride, image->base.Data, srcrowstride,
- height, srcrowstride);
-
- _mesa_free_texmemory(image->base.Data);
- image->base.Data = 0;
- }
-
- radeon_bo_unmap(mt->bo);
-
- image->mt = mt;
- image->mtface = face;
- image->mtlevel = level;
- radeon_miptree_reference(image->mt);
-}
-
-int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *texObj)
-{
- radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
- radeonTexObj *t = radeon_tex_obj(texObj);
- radeon_texture_image *baseimage = get_radeon_texture_image(texObj->Image[0][texObj->BaseLevel]);
- int face, level;
-
- if (t->validated || t->image_override)
- return GL_TRUE;
-
- if (RADEON_DEBUG & RADEON_TEXTURE)
- fprintf(stderr, "%s: Validating texture %p now\n", __FUNCTION__, texObj);
-
- if (baseimage->base.Border > 0)
- return GL_FALSE;
-
- /* Ensure a matching miptree exists.
- *
- * Differing mipmap trees can result when the app uses TexImage to
- * change texture dimensions.
- *
- * Prefer to use base image's miptree if it
- * exists, since that most likely contains more valid data (remember
- * that the base level is usually significantly larger than the rest
- * of the miptree, so cubemaps are the only possible exception).
- */
- if (baseimage->mt &&
- baseimage->mt != t->mt &&
- radeon_miptree_matches_texture(baseimage->mt, &t->base)) {
- radeon_miptree_unreference(t->mt);
- t->mt = baseimage->mt;
- radeon_miptree_reference(t->mt);
- } else if (t->mt && !radeon_miptree_matches_texture(t->mt, &t->base)) {
- radeon_miptree_unreference(t->mt);
- t->mt = 0;
- }
-
- if (!t->mt) {
- if (RADEON_DEBUG & RADEON_TEXTURE)
- fprintf(stderr, " Allocate new miptree\n");
- radeon_try_alloc_miptree(rmesa, t, baseimage, 0, texObj->BaseLevel);
- if (!t->mt) {
- _mesa_problem(ctx, "radeon_validate_texture failed to alloc miptree");
- return GL_FALSE;
- }
- }
-
- /* Ensure all images are stored in the single main miptree */
- for(face = 0; face < t->mt->faces; ++face) {
- for(level = t->mt->firstLevel; level <= t->mt->lastLevel; ++level) {
- radeon_texture_image *image = get_radeon_texture_image(texObj->Image[face][level]);
- if (RADEON_DEBUG & RADEON_TEXTURE)
- fprintf(stderr, " face %i, level %i... %p vs %p ", face, level, t->mt, image->mt);
- if (t->mt == image->mt || (!image->mt && !image->base.Data)) {
- if (RADEON_DEBUG & RADEON_TEXTURE)
- fprintf(stderr, "OK\n");
-
- continue;
- }
-
- if (RADEON_DEBUG & RADEON_TEXTURE)
- fprintf(stderr, "migrating\n");
- migrate_image_to_miptree(t->mt, image, face, level);
- }
- }
-
- return GL_TRUE;
-}
-
-
/**
* Need to map texture image into memory before copying image data,
* then unmap it.
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h
index 8995546d771..906daf12d0a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.h
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.h
@@ -33,7 +33,8 @@
#include "main/formats.h"
-
+void copy_rows(void* dst, GLuint dststride, const void* src, GLuint srcstride,
+ GLuint numrows, GLuint rowsize);
struct gl_texture_image *radeonNewTextureImage(GLcontext *ctx);
void radeonFreeTexImageData(GLcontext *ctx, struct gl_texture_image *timage);
diff --git a/src/mesa/drivers/dri/savage/savagerender.c b/src/mesa/drivers/dri/savage/savagerender.c
index 32c74f9467e..8221edf3872 100644
--- a/src/mesa/drivers/dri/savage/savagerender.c
+++ b/src/mesa/drivers/dri/savage/savagerender.c
@@ -252,13 +252,13 @@ static GLboolean run_texnorm_stage( GLcontext *ctx,
const GLboolean normalizeS = (texObj->WrapS == GL_REPEAT);
const GLboolean normalizeT = (reallyEnabled & TEXTURE_2D_BIT) &&
(texObj->WrapT == GL_REPEAT);
- const GLfloat *in = (GLfloat *)VB->TexCoordPtr[i]->data;
- const GLint instride = VB->TexCoordPtr[i]->stride;
+ const GLfloat *in = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->data;
+ const GLint instride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->stride;
GLfloat (*out)[4] = store->texcoord[i].data;
GLint j;
if (!ctx->Texture.Unit[i]._ReallyEnabled ||
- VB->TexCoordPtr[i]->size == 4)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->size == 4)
/* Never try to normalize homogenous tex coords! */
continue;
@@ -297,7 +297,7 @@ static GLboolean run_texnorm_stage( GLcontext *ctx,
}
if (normalizeS || normalizeT)
- VB->AttribPtr[VERT_ATTRIB_TEX0+i] = VB->TexCoordPtr[i] = &store->texcoord[i];
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + i] = &store->texcoord[i];
}
}
diff --git a/src/mesa/drivers/dri/savage/savagetris.c b/src/mesa/drivers/dri/savage/savagetris.c
index c04763b40e1..e9529d19391 100644
--- a/src/mesa/drivers/dri/savage/savagetris.c
+++ b/src/mesa/drivers/dri/savage/savagetris.c
@@ -879,13 +879,13 @@ static GLboolean savageCheckPTexHack( GLcontext *ctx )
RENDERINPUTS_COPY( index_bitset, tnl->render_inputs_bitset );
- if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX0 ) && VB->TexCoordPtr[0]->size == 4) {
+ if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX0 ) && VB->AttribPtr[_TNL_ATTRIB_TEX0]->size == 4) {
if (!RENDERINPUTS_TEST_RANGE( index_bitset, _TNL_ATTRIB_TEX1, _TNL_LAST_TEX ))
return GL_TRUE; /* apply ptex hack */
else
FALLBACK(ctx, SAVAGE_FALLBACK_PROJ_TEXTURE, GL_TRUE);
}
- if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX1 ) && VB->TexCoordPtr[1]->size == 4)
+ if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX1 ) && VB->AttribPtr[_TNL_ATTRIB_TEX1]->size == 4)
FALLBACK(ctx, SAVAGE_FALLBACK_PROJ_TEXTURE, GL_TRUE);
return GL_FALSE; /* don't apply ptex hack */
@@ -976,13 +976,13 @@ static INLINE GLuint savageChooseVertexFormat_s3d( GLcontext *ctx )
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX0 )) {
if (imesa->ptexHack)
EMIT_ATTR( _TNL_ATTRIB_TEX0, EMIT_3F_XYW, SAVAGE_EMIT_STQ0, SAVAGE_SKIP_ST0);
- else if (VB->TexCoordPtr[0]->size == 4)
+ else if (VB->AttribPtr[_TNL_ATTRIB_TEX0]->size == 4)
assert (0); /* should be caught by savageCheckPTexHack */
- else if (VB->TexCoordPtr[0]->size >= 2)
+ else if (VB->AttribPtr[_TNL_ATTRIB_TEX0]->size >= 2)
/* The chromium menu emits some 3D tex coords even though no
* 3D texture is enabled. Ignore the 3rd coordinate. */
EMIT_ATTR( _TNL_ATTRIB_TEX0, EMIT_2F, SAVAGE_EMIT_ST0, SAVAGE_SKIP_ST0 );
- else if (VB->TexCoordPtr[0]->size == 1) {
+ else if (VB->AttribPtr[_TNL_ATTRIB_TEX0]->size == 1) {
EMIT_ATTR( _TNL_ATTRIB_TEX0, EMIT_1F, SAVAGE_EMIT_S0, SAVAGE_SKIP_S0 );
EMIT_PAD( 4 );
} else
@@ -1025,9 +1025,9 @@ static INLINE GLuint savageChooseVertexFormat_s4( GLcontext *ctx )
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX0 )) {
if (imesa->ptexHack)
NEED_ATTR( SAVAGE_EMIT_STQ0, SAVAGE_SKIP_ST0);
- else if (VB->TexCoordPtr[0]->size == 4)
+ else if (VB->AttribPtr[_TNL_ATTRIB_TEX0]->size == 4)
assert (0); /* should be caught by savageCheckPTexHack */
- else if (VB->TexCoordPtr[0]->size >= 2)
+ else if (VB->AttribPtr[_TNL_ATTRIB_TEX0]->size >= 2)
/* The chromium menu emits some 3D tex coords even though no
* 3D texture is enabled. Ignore the 3rd coordinate. */
NEED_ATTR( SAVAGE_EMIT_ST0, SAVAGE_SKIP_ST0 );
@@ -1035,10 +1035,10 @@ static INLINE GLuint savageChooseVertexFormat_s4( GLcontext *ctx )
NEED_ATTR( SAVAGE_EMIT_S0, SAVAGE_SKIP_S0 );
}
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX1 )) {
- if (VB->TexCoordPtr[1]->size == 4)
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]->size == 4)
/* projective textures are not supported by the hardware */
assert (0); /* should be caught by savageCheckPTexHack */
- else if (VB->TexCoordPtr[1]->size >= 2)
+ else if (VB->AttribPtr[_TNL_ATTRIB_TEX1]->size >= 2)
NEED_ATTR( SAVAGE_EMIT_ST1, SAVAGE_SKIP_ST1 );
else
NEED_ATTR( SAVAGE_EMIT_S1, SAVAGE_SKIP_S1 );
diff --git a/src/mesa/drivers/dri/sis/sis_tris.c b/src/mesa/drivers/dri/sis/sis_tris.c
index 76d12d07b3c..3cf10007b58 100644
--- a/src/mesa/drivers/dri/sis/sis_tris.c
+++ b/src/mesa/drivers/dri/sis/sis_tris.c
@@ -903,14 +903,14 @@ static void sisRenderStart( GLcontext *ctx )
/* projective textures are not supported by the hardware */
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX0 )) {
- if (VB->TexCoordPtr[0]->size > 2)
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]->size > 2)
tex_fallback = GL_TRUE;
EMIT_ATTR(_TNL_ATTRIB_TEX0, EMIT_2F);
AGPParseSet |= SiS_PS_HAS_UV0;
}
/* Will only hit tex1 on SiS300 */
if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX1 )) {
- if (VB->TexCoordPtr[1]->size > 2)
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]->size > 2)
tex_fallback = GL_TRUE;
EMIT_ATTR(_TNL_ATTRIB_TEX1, EMIT_2F);
AGPParseSet |= SiS_PS_HAS_UV1;
diff --git a/src/mesa/drivers/dri/swrast/swrast_span.c b/src/mesa/drivers/dri/swrast/swrast_span.c
index 2d3c25dcbef..f8e503463fa 100644
--- a/src/mesa/drivers/dri/swrast/swrast_span.c
+++ b/src/mesa/drivers/dri/swrast/swrast_span.c
@@ -63,56 +63,42 @@ static const GLubyte kernel[16] = {
/* 32-bit BGRA */
#define STORE_PIXEL_A8R8G8B8(DST, X, Y, VALUE) \
- DST[3] = VALUE[ACOMP]; \
- DST[2] = VALUE[RCOMP]; \
- DST[1] = VALUE[GCOMP]; \
- DST[0] = VALUE[BCOMP]
+ *DST = VALUE[ACOMP] << 24 | VALUE[RCOMP] << 16 | VALUE[GCOMP] << 8 | VALUE[BCOMP]
#define STORE_PIXEL_RGB_A8R8G8B8(DST, X, Y, VALUE) \
- DST[3] = 0xff; \
- DST[2] = VALUE[RCOMP]; \
- DST[1] = VALUE[GCOMP]; \
- DST[0] = VALUE[BCOMP]
+ *DST = 0xff << 24 | VALUE[RCOMP] << 16 | VALUE[GCOMP] << 8 | VALUE[BCOMP]
#define FETCH_PIXEL_A8R8G8B8(DST, SRC) \
- DST[ACOMP] = SRC[3]; \
- DST[RCOMP] = SRC[2]; \
- DST[GCOMP] = SRC[1]; \
- DST[BCOMP] = SRC[0]
+ DST[ACOMP] = *SRC >> 24; \
+ DST[RCOMP] = (*SRC >> 16) & 0xff; \
+ DST[GCOMP] = (*SRC >> 8) & 0xff; \
+ DST[BCOMP] = *SRC & 0xff
/* 32-bit BGRX */
#define STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE) \
- DST[3] = 0xff; \
- DST[2] = VALUE[RCOMP]; \
- DST[1] = VALUE[GCOMP]; \
- DST[0] = VALUE[BCOMP]
+ *DST = 0xff << 24 | VALUE[RCOMP] << 16 | VALUE[GCOMP] << 8 | VALUE[BCOMP]
#define STORE_PIXEL_RGB_X8R8G8B8(DST, X, Y, VALUE) \
- DST[3] = 0xff; \
- DST[2] = VALUE[RCOMP]; \
- DST[1] = VALUE[GCOMP]; \
- DST[0] = VALUE[BCOMP]
+ *DST = 0xff << 24 | VALUE[RCOMP] << 16 | VALUE[GCOMP] << 8 | VALUE[BCOMP]
#define FETCH_PIXEL_X8R8G8B8(DST, SRC) \
- DST[ACOMP] = 0xff; \
- DST[RCOMP] = SRC[2]; \
- DST[GCOMP] = SRC[1]; \
- DST[BCOMP] = SRC[0]
+ DST[ACOMP] = 0xff; \
+ DST[RCOMP] = (*SRC >> 16) & 0xff; \
+ DST[GCOMP] = (*SRC >> 8) & 0xff; \
+ DST[BCOMP] = *SRC & 0xff
/* 16-bit BGR */
#define STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) \
do { \
int d = DITHER_COMP(X, Y) >> 6; \
- GLushort *p = (GLushort *)DST; \
- *p = ( ((DITHER_CLAMP((VALUE[RCOMP]) + d) & 0xf8) << 8) | \
- ((DITHER_CLAMP((VALUE[GCOMP]) + d) & 0xfc) << 3) | \
- ((DITHER_CLAMP((VALUE[BCOMP]) + d) & 0xf8) >> 3) ); \
+ *DST = ( ((DITHER_CLAMP((VALUE[RCOMP]) + d) & 0xf8) << 8) | \
+ ((DITHER_CLAMP((VALUE[GCOMP]) + d) & 0xfc) << 3) | \
+ ((DITHER_CLAMP((VALUE[BCOMP]) + d) & 0xf8) >> 3) ); \
} while(0)
#define FETCH_PIXEL_R5G6B5(DST, SRC) \
do { \
- GLushort p = *(GLushort *)SRC; \
DST[ACOMP] = 0xff; \
- DST[RCOMP] = ((p >> 8) & 0xf8) * 255 / 0xf8; \
- DST[GCOMP] = ((p >> 3) & 0xfc) * 255 / 0xfc; \
- DST[BCOMP] = ((p << 3) & 0xf8) * 255 / 0xf8; \
+ DST[RCOMP] = ((*SRC >> 8) & 0xf8) * 255 / 0xf8; \
+ DST[GCOMP] = ((*SRC >> 3) & 0xfc) * 255 / 0xfc; \
+ DST[BCOMP] = ((*SRC << 3) & 0xf8) * 255 / 0xf8; \
} while(0)
@@ -145,8 +131,8 @@ static const GLubyte kernel[16] = {
#define SPAN_VARS \
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 4;
-#define INC_PIXEL_PTR(P) P += 4
+ GLuint *P = (GLuint *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch / 4 + (X)
+#define INC_PIXEL_PTR(P) P++
#define STORE_PIXEL(DST, X, Y, VALUE) \
STORE_PIXEL_A8R8G8B8(DST, X, Y, VALUE)
#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
@@ -163,8 +149,8 @@ static const GLubyte kernel[16] = {
#define SPAN_VARS \
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 4;
-#define INC_PIXEL_PTR(P) P += 4
+ GLuint *P = (GLuint *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch / 4 + (X);
+#define INC_PIXEL_PTR(P) P++
#define STORE_PIXEL(DST, X, Y, VALUE) \
STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE)
#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
@@ -181,8 +167,8 @@ static const GLubyte kernel[16] = {
#define SPAN_VARS \
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 2;
-#define INC_PIXEL_PTR(P) P += 2
+ GLushort *P = (GLushort *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch / 2 + (X);
+#define INC_PIXEL_PTR(P) P++
#define STORE_PIXEL(DST, X, Y, VALUE) \
STORE_PIXEL_R5G6B5(DST, X, Y, VALUE)
#define FETCH_PIXEL(DST, SRC) \
@@ -234,8 +220,8 @@ static const GLubyte kernel[16] = {
#define SPAN_VARS \
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = (GLubyte *)row;
-#define INC_PIXEL_PTR(P) P += 4
+ GLuint *P = (GLuint *)row;
+#define INC_PIXEL_PTR(P) P++
#define STORE_PIXEL(DST, X, Y, VALUE) \
STORE_PIXEL_A8R8G8B8(DST, X, Y, VALUE)
#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
@@ -252,8 +238,8 @@ static const GLubyte kernel[16] = {
#define SPAN_VARS \
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = (GLubyte *)row;
-#define INC_PIXEL_PTR(P) P += 4
+ GLuint *P = (GLuint *)row;
+#define INC_PIXEL_PTR(P) P++
#define STORE_PIXEL(DST, X, Y, VALUE) \
STORE_PIXEL_X8R8G8B8(DST, X, Y, VALUE)
#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
@@ -270,7 +256,7 @@ static const GLubyte kernel[16] = {
#define SPAN_VARS \
struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
#define INIT_PIXEL_PTR(P, X, Y) \
- GLubyte *P = (GLubyte *)row;
+ GLushort *P = (GLushort *)row;
#define INC_PIXEL_PTR(P) P += 2
#define STORE_PIXEL(DST, X, Y, VALUE) \
STORE_PIXEL_R5G6B5(DST, X, Y, VALUE)
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_vb.c b/src/mesa/drivers/dri/tdfx/tdfx_vb.c
index 49288022328..c200ba3255a 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_vb.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_vb.c
@@ -69,11 +69,11 @@ static void interp_extras( GLcontext *ctx,
/*fprintf(stderr, "%s\n", __FUNCTION__);*/
- if (VB->ColorPtr[1]) {
+ if (VB->BackfaceColorPtr) {
INTERP_4F( t,
- GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], out),
- GET_COLOR(VB->ColorPtr[1], in) );
+ GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, out),
+ GET_COLOR(VB->BackfaceColorPtr, in) );
}
if (VB->EdgeFlag) {
@@ -88,9 +88,9 @@ static void copy_pv_extras( GLcontext *ctx, GLuint dst, GLuint src )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- if (VB->ColorPtr[1]) {
- COPY_4FV( GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], src) );
+ if (VB->BackfaceColorPtr) {
+ COPY_4FV( GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, src) );
}
setup_tab[TDFX_CONTEXT(ctx)->SetupIndex].copy_pv(ctx, dst, src);
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h b/src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h
index 9b780761f42..19baf7d0d25 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_vbtmp.h
@@ -58,32 +58,32 @@ static void TAG(emit)( GLcontext *ctx,
/* fprintf(stderr, "%s\n", __FUNCTION__); */
if (IND & TDFX_TEX0_BIT) {
- tc0_stride = VB->TexCoordPtr[tmu0_source]->stride;
- tc0 = VB->TexCoordPtr[tmu0_source]->data;
+ tc0_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu0_source]->stride;
+ tc0 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu0_source]->data;
u0scale = fxMesa->sScale0;
v0scale = fxMesa->tScale0;
if (IND & TDFX_PTEX_BIT)
- tc0_size = VB->TexCoordPtr[tmu0_source]->size;
+ tc0_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu0_source]->size;
}
if (IND & TDFX_TEX1_BIT) {
- tc1 = VB->TexCoordPtr[tmu1_source]->data;
- tc1_stride = VB->TexCoordPtr[tmu1_source]->stride;
+ tc1 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu1_source]->data;
+ tc1_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu1_source]->stride;
u1scale = fxMesa->sScale1;
v1scale = fxMesa->tScale1;
if (IND & TDFX_PTEX_BIT)
- tc1_size = VB->TexCoordPtr[tmu1_source]->size;
+ tc1_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu1_source]->size;
}
if (IND & TDFX_RGBA_BIT) {
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
- col_size = VB->ColorPtr[0]->size;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
+ col_size = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->size;
}
if (IND & TDFX_FOGC_BIT) {
- fog = VB->FogCoordPtr->data;
- fog_stride = VB->FogCoordPtr->stride;
+ fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
+ fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
}
{
@@ -168,14 +168,14 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
if (IND & TDFX_TEX1_BIT) {
- if (VB->TexCoordPtr[0] == 0)
- VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0] = VB->AttribPtr[_TNL_ATTRIB_TEX1];
- if (VB->TexCoordPtr[1]->size == 4)
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]->size == 4)
return GL_FALSE;
}
- if (VB->TexCoordPtr[0]->size == 4)
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]->size == 4)
return GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c
index 79e67620c9e..ab457d41dc8 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.c
+++ b/src/mesa/drivers/dri/unichrome/via_tris.c
@@ -832,13 +832,13 @@ static GLboolean viaCheckPTexHack( GLcontext *ctx )
RENDERINPUTS_COPY( index_bitset, tnl->render_inputs_bitset );
- if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX0 ) && VB->TexCoordPtr[0]->size == 4) {
+ if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX0 ) && VB->AttribPtr[_TNL_ATTRIB_TEX0]->size == 4) {
if (!RENDERINPUTS_TEST_RANGE( index_bitset, _TNL_ATTRIB_TEX1, _TNL_LAST_TEX ))
ptexHack = GL_TRUE;
else
fallback = GL_TRUE;
}
- if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX1 ) && VB->TexCoordPtr[1]->size == 4)
+ if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_TEX1 ) && VB->AttribPtr[_TNL_ATTRIB_TEX1]->size == 4)
fallback = GL_TRUE;
FALLBACK(VIA_CONTEXT(ctx), VIA_FALLBACK_PROJ_TEXTURE, fallback);
diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c
index 1dc5f9891a1..cc9ad0e8b83 100644
--- a/src/mesa/drivers/glide/fxvb.c
+++ b/src/mesa/drivers/glide/fxvb.c
@@ -104,24 +104,24 @@ static void interp_extras( GLcontext *ctx,
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- if (VB->ColorPtr[1]) {
- /* If stride is zero, ColorPtr[1] is constant across the VB, so
+ if (VB->BackfaceColorPtr) {
+ /* If stride is zero, BackfaceColorPtr is constant across the VB, so
* there is no point interpolating between two values as they will
* be identical. This case is handled in t_dd_tritmp.h
*/
- if (VB->ColorPtr[1]->stride) {
- assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat));
+ if (VB->BackfaceColorPtr->stride) {
+ assert(VB->BackfaceColorPtr->stride == 4 * sizeof(GLfloat));
INTERP_4F( t,
- GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], out),
- GET_COLOR(VB->ColorPtr[1], in) );
+ GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, out),
+ GET_COLOR(VB->BackfaceColorPtr, in) );
}
- if (VB->SecondaryColorPtr[1]) {
+ if (VB->BackfaceSecondaryColorPtr) {
INTERP_3F( t,
- GET_COLOR(VB->SecondaryColorPtr[1], dst),
- GET_COLOR(VB->SecondaryColorPtr[1], out),
- GET_COLOR(VB->SecondaryColorPtr[1], in) );
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, dst),
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, out),
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, in) );
}
}
@@ -137,13 +137,13 @@ static void copy_pv_extras( GLcontext *ctx, GLuint dst, GLuint src )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- if (VB->ColorPtr[1]) {
- COPY_4FV( GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], src) );
+ if (VB->BackfaceColorPtr) {
+ COPY_4FV( GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, src) );
- if (VB->SecondaryColorPtr[1]) {
- COPY_3FV( GET_COLOR(VB->SecondaryColorPtr[1], dst),
- GET_COLOR(VB->SecondaryColorPtr[1], src) );
+ if (VB->BackfaceSecondaryColorPtr) {
+ COPY_3FV( GET_COLOR(VB->BackfaceSecondaryColorPtr, dst),
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, src) );
}
}
diff --git a/src/mesa/drivers/glide/fxvbtmp.h b/src/mesa/drivers/glide/fxvbtmp.h
index f7970c78e29..f7893c1573f 100644
--- a/src/mesa/drivers/glide/fxvbtmp.h
+++ b/src/mesa/drivers/glide/fxvbtmp.h
@@ -62,37 +62,37 @@ static void TAG(emit)( GLcontext *ctx,
}
if (IND & SETUP_TMU0) {
- tc0 = VB->TexCoordPtr[tmu0_source]->data;
- tc0_stride = VB->TexCoordPtr[tmu0_source]->stride;
+ tc0 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu0_source]->data;
+ tc0_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu0_source]->stride;
u0scale = fxMesa->s0scale;
v0scale = fxMesa->t0scale;
if (IND & SETUP_PTEX)
- tc0_size = VB->TexCoordPtr[tmu0_source]->size;
+ tc0_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu0_source]->size;
}
if (IND & SETUP_TMU1) {
- tc1 = VB->TexCoordPtr[tmu1_source]->data;
- tc1_stride = VB->TexCoordPtr[tmu1_source]->stride;
+ tc1 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu1_source]->data;
+ tc1_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu1_source]->stride;
u1scale = fxMesa->s1scale; /* wrong if tmu1_source == 0, possible? */
v1scale = fxMesa->t1scale;
if (IND & SETUP_PTEX)
- tc1_size = VB->TexCoordPtr[tmu1_source]->size;
+ tc1_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu1_source]->size;
}
if (IND & SETUP_RGBA) {
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
- col_size = VB->ColorPtr[0]->size;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
+ col_size = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->size;
}
if (IND & SETUP_SPEC) {
- spec = VB->SecondaryColorPtr[0]->data;
- spec_stride = VB->SecondaryColorPtr[0]->stride;
+ spec = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->data;
+ spec_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->stride;
}
if (IND & SETUP_FOGC) {
- fog = VB->FogCoordPtr->data;
- fog_stride = VB->FogCoordPtr->stride;
+ fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
+ fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
}
if (start) {
@@ -220,14 +220,15 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
if (IND & SETUP_TMU1) {
- if (VB->TexCoordPtr[0] == 0)
- VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0] = VB->AttribPtr[_TNL_ATTRIB_TEX1];
- if (VB->TexCoordPtr[1]->size == 4)
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]->size == 4)
return GL_FALSE;
}
- if (VB->TexCoordPtr[0] && VB->TexCoordPtr[0]->size == 4)
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0] &&
+ VB->AttribPtr[_TNL_ATTRIB_TEX0]->size == 4)
return GL_FALSE;
}
diff --git a/src/mesa/drivers/glslcompiler/Makefile b/src/mesa/drivers/glslcompiler/Makefile
index ffe4e0a2343..fa8293d039a 100644
--- a/src/mesa/drivers/glslcompiler/Makefile
+++ b/src/mesa/drivers/glslcompiler/Makefile
@@ -37,7 +37,7 @@ glslcompiler: $(OBJECTS)
glslcompiler.o: glslcompiler.c
- $(CC) -c $(CFLAGS) $(INCLUDES) glslcompiler.c -o $@
+ $(CC) -c $(INCLUDES) $(CFLAGS) glslcompiler.c -o $@
clean:
diff --git a/src/mesa/drivers/windows/gdi/mesa.def b/src/mesa/drivers/windows/gdi/mesa.def
index 5abcd1d927e..62f75d9541f 100644
--- a/src/mesa/drivers/windows/gdi/mesa.def
+++ b/src/mesa/drivers/windows/gdi/mesa.def
@@ -867,12 +867,6 @@ EXPORTS
_glapi_get_proc_address
_mesa_add_soft_renderbuffers
_mesa_add_renderbuffer
- _mesa_begin_query
- _mesa_buffer_data
- _mesa_buffer_get_subdata
- _mesa_buffer_map
- _mesa_buffer_subdata
- _mesa_buffer_unmap
_mesa_bzero
_mesa_calloc
_mesa_choose_tex_format
@@ -880,9 +874,7 @@ EXPORTS
_mesa_create_framebuffer
_mesa_create_visual
_mesa_delete_array_object
- _mesa_delete_buffer_object
_mesa_delete_program
- _mesa_delete_query
_mesa_delete_texture_object
_mesa_destroy_framebuffer
_mesa_destroy_visual
@@ -892,7 +884,6 @@ EXPORTS
_mesa_enable_2_0_extensions
_mesa_enable_2_1_extensions
_mesa_enable_sw_extensions
- _mesa_end_query
_mesa_error
_mesa_finish_render_texture
_mesa_framebuffer_renderbuffer
@@ -911,10 +902,8 @@ EXPORTS
_mesa_memcpy
_mesa_memset
_mesa_new_array_object
- _mesa_new_buffer_object
_mesa_new_framebuffer
_mesa_new_program
- _mesa_new_query_object
_mesa_new_renderbuffer
_mesa_new_soft_renderbuffer
_mesa_new_texture_image
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
index c99ba0bba55..0b373814fee 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_primitive_dx7.c
@@ -189,9 +189,9 @@
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
- if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
+ vbcolor = (GLchan (*)[4])VB->BackfaceColorPtr->data; \
+ if (VB->BackfaceSecondaryColorPtr) { \
+ vbspec = (GLchan (*)[4])VB->BackfaceSecondaryColorPtr->data; \
} else { \
vbspec = NULL; \
} \
@@ -241,33 +241,33 @@
DWORD dwColor;
#define GLD_SETUP_3D_VERTEX(v) \
- p4f = VB->ObjPtr->data; \
+ p4f = VB->AttribPtr[_TNL_ATTRIB_POS]->data; \
pV->Position.x = p4f[##v][0]; \
pV->Position.y = p4f[##v][1]; \
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
pV->Diffuse = dwColor;
#define GLD_SETUP_TEX0_3D(v) \
- if (VB->TexCoordPtr[0]) { \
- tc = VB->TexCoordPtr[0]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]) { \
+ tc = VB->AttribPtr[_TNL_ATTRIB_TEX0]->data; \
pV->TexUnit0.x = tc[##v][0]; \
pV->TexUnit0.y = tc[##v][1]; \
}
#define GLD_SETUP_TEX1_3D(v) \
- if (VB->TexCoordPtr[1]) { \
- tc = VB->TexCoordPtr[1]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]) { \
+ tc = VB->AttribPtr[_TNL_ATTRIB_TEX1]->data; \
pV->TexUnit1.x = tc[##v][0]; \
pV->TexUnit1.y = tc[##v][1]; \
}
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
index a85620dde8d..c39775cad32 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_vb_d3d_render_dx7.c
@@ -151,7 +151,7 @@ static GLboolean gld_d3d_render_stage_run(
#if 0
// For debugging: Useful to see if an app passes colour data in
// an unusual format.
- switch (VB->ColorPtr[0]->Type) {
+ switch (VB->AttribPtr[_TNL_ATTRIB_COLOR0]->Type) {
case GL_FLOAT:
ddlogMessage(GLDLOG_SYSTEM, "ColorPtr: GL_FLOAT\n");
break;
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
index a5b5462f039..990922580aa 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_primitive_dx8.c
@@ -189,9 +189,9 @@
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
- if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
+ vbcolor = (GLchan (*)[4])VB->BackfaceColorPtr->data; \
+ if (VB->BackfaceSecondaryColorPtr) { \
+ vbspec = (GLchan (*)[4])VB->BackfaceSecondaryColorPtr->data; \
} else { \
vbspec = NULL; \
} \
@@ -241,33 +241,33 @@
DWORD dwColor;
#define GLD_SETUP_3D_VERTEX(v) \
- p4f = VB->ObjPtr->data; \
+ p4f = VB->AttribPtr[_TNL_ATTRIB_POS]->data; \
pV->Position.x = p4f[##v][0]; \
pV->Position.y = p4f[##v][1]; \
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
pV->Diffuse = dwColor;
#define GLD_SETUP_TEX0_3D(v) \
- if (VB->TexCoordPtr[0]) { \
- tc = VB->TexCoordPtr[0]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]) { \
+ tc = VB->TnlAttribPtr[_TNL_ATTRIB_TEX0]->data; \
pV->TexUnit0.x = tc[##v][0]; \
pV->TexUnit0.y = tc[##v][1]; \
}
#define GLD_SETUP_TEX1_3D(v) \
- if (VB->TexCoordPtr[1]) { \
- tc = VB->TexCoordPtr[1]->data; \
+ if (VB->TnlAttribPtr[_TNL_ATTRIB_TEX1]) { \
+ tc = VB->TnlAttribPtr[_TNL_ATTRIB_TEX1]->data; \
pV->TexUnit1.x = tc[##v][0]; \
pV->TexUnit1.y = tc[##v][1]; \
}
diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
index cafbf4f5c50..265c81fb4a4 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_vb_d3d_render_dx8.c
@@ -149,7 +149,7 @@ static GLboolean gld_d3d_render_stage_run(
#if 0
// For debugging: Useful to see if an app passes colour data in
// an unusual format.
- switch (VB->ColorPtr[0]->Type) {
+ switch (VB->AttribPtr[_TNL_ATTRIB_COLOR0]->Type) {
case GL_FLOAT:
ddlogMessage(GLDLOG_SYSTEM, "ColorPtr: GL_FLOAT\n");
break;
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
index 403a9d5f86e..fd4dd4ed751 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_primitive_dx9.c
@@ -189,9 +189,9 @@
GLfloat ex,ey,fx,fy,cc; \
/* Get vars for later */ \
VB = &TNL_CONTEXT(ctx)->vb; \
- vbcolor = (GLchan (*)[4])VB->ColorPtr[1]->data; \
- if (VB->SecondaryColorPtr[1]) { \
- vbspec = (GLchan (*)[4])VB->SecondaryColorPtr[1]->data; \
+ vbcolor = (GLchan (*)[4])VB->BackfaceColorPtr->data; \
+ if (VB->BackfaceSecondaryColorPtr) { \
+ vbspec = (GLchan (*)[4])VB->BackfaceSecondaryColorPtr->data; \
} else { \
vbspec = NULL; \
} \
@@ -241,33 +241,33 @@
DWORD dwColor;
#define GLD_SETUP_3D_VERTEX(v) \
- p4f = VB->ObjPtr->data; \
+ p4f = VB->AttribPtr[_TNL_ATTRIB_POS]->data; \
pV->Position.x = p4f[##v][0]; \
pV->Position.y = p4f[##v][1]; \
pV->Position.z = p4f[##v][2];
#define GLD_SETUP_SMOOTH_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data; \
pV->Diffuse = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_GET_FLAT_COLOUR_3D(v) \
- p4f = (GLfloat (*)[4])VB->ColorPtr[0]->data; \
+ p4f = (GLfloat (*)[4])VB->AttribPtr[_TNL_ATTRIB_COLOR00]->data; \
dwColor = D3DCOLOR_COLORVALUE(p4f[##v][0], p4f[##v][1], p4f[##v][2], p4f[##v][3]);
#define GLD_SETUP_USE_FLAT_COLOUR_3D \
pV->Diffuse = dwColor;
#define GLD_SETUP_TEX0_3D(v) \
- if (VB->TexCoordPtr[0]) { \
- tc = VB->TexCoordPtr[0]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]) { \
+ tc = VB->AttribPtr[_TNL_ATTRIB_TEX0]->data; \
pV->TexUnit0.x = tc[##v][0]; \
pV->TexUnit0.y = tc[##v][1]; \
}
#define GLD_SETUP_TEX1_3D(v) \
- if (VB->TexCoordPtr[1]) { \
- tc = VB->TexCoordPtr[1]->data; \
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]) { \
+ tc = VB->AttribPtr[_TNL_ATTRIB_TEX1]->data; \
pV->TexUnit1.x = tc[##v][0]; \
pV->TexUnit1.y = tc[##v][1]; \
}
diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
index 4fa6bcaf1ab..91a68b3f2d9 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_vb_d3d_render_dx9.c
@@ -149,7 +149,7 @@ static GLboolean gld_d3d_render_stage_run(
#if 0
// For debugging: Useful to see if an app passes colour data in
// an unusual format.
- switch (VB->ColorPtr[0]->Type) {
+ switch (VB->AttribPtr[_TNL_ATTRIB_COLOR0]->Type) {
case GL_FLOAT:
ddlogMessage(GLDLOG_SYSTEM, "ColorPtr: GL_FLOAT\n");
break;
diff --git a/src/mesa/drivers/x11/xm_span.c b/src/mesa/drivers/x11/xm_span.c
index 309cefcb8e8..c39d87c4516 100644
--- a/src/mesa/drivers/x11/xm_span.c
+++ b/src/mesa/drivers/x11/xm_span.c
@@ -3773,7 +3773,7 @@ static void put_values_ci_ximage( PUT_VALUES_ARGS )
* else return number of pixels to skip in the destination array.
*/
static int
-clip_for_xgetimage(GLcontext *ctx, GLuint *n, GLint *x, GLint *y)
+clip_for_xgetimage(GLcontext *ctx, XMesaPixmap pixmap, GLuint *n, GLint *x, GLint *y)
{
XMesaContext xmesa = XMESA_CONTEXT(ctx);
XMesaBuffer source = XMESA_BUFFER(ctx->DrawBuffer);
@@ -3783,7 +3783,7 @@ clip_for_xgetimage(GLcontext *ctx, GLuint *n, GLint *x, GLint *y)
GLint dx, dy;
if (source->type == PBUFFER || source->type == PIXMAP)
return 0;
- XTranslateCoordinates(xmesa->display, source->frontxrb->pixmap, rootWin,
+ XTranslateCoordinates(xmesa->display, pixmap, rootWin,
*x, *y, &dx, &dy, &child);
if (dx >= screenWidth) {
/* totally clipped on right */
@@ -3827,7 +3827,7 @@ get_row_ci(GLcontext *ctx, struct gl_renderbuffer *rb,
#ifndef XFree86Server
XMesaImage *span = NULL;
int error;
- int k = clip_for_xgetimage(ctx, &n, &x, &y);
+ int k = clip_for_xgetimage(ctx, xrb->pixmap, &n, &x, &y);
if (k < 0)
return;
index += k;
@@ -3892,7 +3892,7 @@ get_row_rgba(GLcontext *ctx, struct gl_renderbuffer *rb,
#else
int k;
y = YFLIP(xrb, y);
- k = clip_for_xgetimage(ctx, &n, &x, &y);
+ k = clip_for_xgetimage(ctx, xrb->pixmap, &n, &x, &y);
if (k < 0)
return;
rgba += k;
diff --git a/src/mesa/glapi/ARB_framebuffer_object.xml b/src/mesa/glapi/ARB_framebuffer_object.xml
index b700e7e77d8..e6bdcd6e509 100644
--- a/src/mesa/glapi/ARB_framebuffer_object.xml
+++ b/src/mesa/glapi/ARB_framebuffer_object.xml
@@ -12,10 +12,10 @@
<enum name="RENDERBUFFER" value="0x8D41"/>
- <enum name="STENCIL_INDEX1_EXT" value="0x8D46"/>
- <enum name="STENCIL_INDEX4_EXT" value="0x8D47"/>
- <enum name="STENCIL_INDEX8_EXT" value="0x8D48"/>
- <enum name="STENCIL_INDEX16_EXT" value="0x8D49"/>
+ <enum name="STENCIL_INDEX1" value="0x8D46"/>
+ <enum name="STENCIL_INDEX4" value="0x8D47"/>
+ <enum name="STENCIL_INDEX8" value="0x8D48"/>
+ <enum name="STENCIL_INDEX16" value="0x8D49"/>
<enum name="RENDERBUFFER_WIDTH" value="0x8D42"/>
<enum name="RENDERBUFFER_HEIGHT" value="0x8D43"/>
@@ -93,33 +93,35 @@
<enum name="STENCIL_ATTACHMENT" value="0x8D20"/>
<enum name="DEPTH_STENCIL_ATTACHMENT" value="0x821A"/>
- <enum name="MAX_SAMPLES" value="0x8D57"/>
+ <enum name="MAX_SAMPLES" count="1" value="0x8D57">
+ <size name="Get" mode="get"/>
+ </enum>
<enum name="FRAMEBUFFER_COMPLETE" value="0x8CD5"/>
<enum name="FRAMEBUFFER_INCOMPLETE_ATTACHMENT" value="0x8CD6"/>
<enum name="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT" value="0x8CD7"/>
- <enum name="FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT" value="0x8CDB"/>
- <enum name="FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT" value="0x8CDC"/>
+ <enum name="FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER" value="0x8CDB"/>
+ <enum name="FRAMEBUFFER_INCOMPLETE_READ_BUFFER" value="0x8CDC"/>
<enum name="FRAMEBUFFER_UNSUPPORTED" value="0x8CDD"/>
<enum name="FRAMEBUFFER_INCOMPLETE_MULTISAMPLE" value="0x8D56"/>
<enum name="FRAMEBUFFER_UNDEFINED" value="0x8219"/>
- <enum name="FRAMEBUFFER_BINDING_EXT" count="1" value="0x8CA6">
+ <enum name="FRAMEBUFFER_BINDING" count="1" value="0x8CA6">
<size name="Get" mode="get"/>
</enum>
- <enum name="DRAW_FRAMEBUFFER_BINDING_EXT" count="1" value="0x8CA6">
+ <enum name="DRAW_FRAMEBUFFER_BINDING" count="1" value="0x8CA6">
<size name="Get" mode="get"/>
</enum>
- <enum name="READ_FRAMEBUFFER_BINDING_EXT" count="1" value="0x8CAA">
+ <enum name="READ_FRAMEBUFFER_BINDING" count="1" value="0x8CAA">
<size name="Get" mode="get"/>
</enum>
- <enum name="RENDERBUFFER_BINDING_EXT" count="1" value="0x8CA7">
+ <enum name="RENDERBUFFER_BINDING" count="1" value="0x8CA7">
<size name="Get" mode="get"/>
</enum>
- <enum name="MAX_COLOR_ATTACHMENTS_EXT" count="1" value="0x8CDF">
+ <enum name="MAX_COLOR_ATTACHMENTS" count="1" value="0x8CDF">
<size name="Get" mode="get"/>
</enum>
- <enum name="MAX_RENDERBUFFER_SIZE_EXT" count="1" value="0x84E8">
+ <enum name="MAX_RENDERBUFFER_SIZE" count="1" value="0x84E8">
<size name="Get" mode="get"/>
</enum>
@@ -131,7 +133,10 @@
<enum name="DEPTH24_STENCIL8" value="0x88F0"/>
- <enum name="TEXTURE_STENCIL_SIZE" value="0x88F1"/>
+ <enum name="TEXTURE_STENCIL_SIZE" count="1" value="0x88F1">
+ <size name="GetTexLevelParameterfv" mode="get"/>
+ <size name="GetTexLevelParameteriv" mode="get"/>
+ </enum>
@@ -168,6 +173,7 @@
<param name="internalformat" type="GLenum"/>
<param name="width" type="GLsizei"/>
<param name="height" type="GLsizei"/>
+ <glx rop="4331"/>
</function>
<function name="GetRenderbufferParameteriv" alias="GetRenderbufferParameterivEXT">
diff --git a/src/mesa/glapi/EXT_framebuffer_object.xml b/src/mesa/glapi/EXT_framebuffer_object.xml
index 5559b48b11a..4f418f7b64c 100644
--- a/src/mesa/glapi/EXT_framebuffer_object.xml
+++ b/src/mesa/glapi/EXT_framebuffer_object.xml
@@ -192,4 +192,44 @@
</function>
</category>
+<category name="GL_EXT_framebuffer_blit" number="316">
+ <enum name="READ_FRAMEBUFFER_EXT" value="0x8CA8"/>
+ <enum name="DRAW_FRAMEBUFFER_EXT" value="0x8CA9"/>
+ <enum name="DRAW_FRAMEBUFFER_BINDING_EXT" count="1" value="0x8CA6">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="READ_FRAMEBUFFER_BINDING_EXT" count="1" value="0x8CAA">
+ <size name="Get" mode="get"/>
+ </enum>
+ <function name="BlitFramebufferEXT" offset="assign" static_dispatch="false">
+ <param name="srcX0" type="GLint"/>
+ <param name="srcY0" type="GLint"/>
+ <param name="srcX1" type="GLint"/>
+ <param name="srcY1" type="GLint"/>
+ <param name="dstX0" type="GLint"/>
+ <param name="dstY0" type="GLint"/>
+ <param name="dstX1" type="GLint"/>
+ <param name="dstY1" type="GLint"/>
+ <param name="mask" type="GLbitfield"/>
+ <param name="filter" type="GLenum"/>
+ <glx rop="4330"/>
+ </function>
+</category>
+
+<category name="GL_EXT_framebuffer_multisample" number="317">
+ <enum name="RENDERBUFFER_SAMPLES_EXT" value="0x8CAB"/>
+ <enum name="FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT" value="0x8D56"/>
+ <enum name="MAX_SAMPLES_EXT" count="1" value="0x8D57">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="RenderbufferStorageMultisampleEXT" alias="RenderbufferStorageMultisample">
+ <param name="target" type="GLenum"/>
+ <param name="samples" type="GLsizei"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </function>
+</category>
+
</OpenGLAPI>
diff --git a/src/mesa/glapi/EXT_packed_depth_stencil.xml b/src/mesa/glapi/EXT_packed_depth_stencil.xml
new file mode 100644
index 00000000000..5be810302f3
--- /dev/null
+++ b/src/mesa/glapi/EXT_packed_depth_stencil.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+<category name="GL_EXT_packed_depth_stencil" number="312">
+ <!-- These enums are shared with GL_NV_packed_depth_stencil. -->
+ <enum name="DEPTH_STENCIL_EXT" value="0x84F9"/>
+ <enum name="UNSIGNED_INT_24_8_EXT" value="0x84FA"/>
+
+ <enum name="DEPTH24_STENCIL8_EXT" value="0x88F0"/>
+
+ <enum name="TEXTURE_STENCIL_SIZE_EXT" count="1" value="0x88F1">
+ <size name="GetTexLevelParameterfv" mode="get"/>
+ <size name="GetTexLevelParameteriv" mode="get"/>
+ </enum>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/glapi/EXT_texture_array.xml b/src/mesa/glapi/EXT_texture_array.xml
index e5bd9f3c697..b5b8bd406f7 100644
--- a/src/mesa/glapi/EXT_texture_array.xml
+++ b/src/mesa/glapi/EXT_texture_array.xml
@@ -35,6 +35,7 @@
<param name="texture" type="GLuint"/>
<param name="level" type="GLint"/>
<param name="layer" type="GLint"/>
+ <glx rop="237"/>
</function>
</category>
diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile
index fb6be1a3a90..71bef68ea5f 100644
--- a/src/mesa/glapi/Makefile
+++ b/src/mesa/glapi/Makefile
@@ -47,16 +47,19 @@ SERVER_OUTPUTS = \
$(SERVER_GLAPI_FILES)
API_XML = gl_API.xml \
- EXT_framebuffer_object.xml \
ARB_copy_buffer.xml \
ARB_depth_clamp.xml \
+ ARB_draw_elements_base_vertex.xml \
ARB_framebuffer_object.xml \
ARB_map_buffer_range.xml \
ARB_seamless_cube_map.xml \
ARB_sync.xml \
ARB_vertex_array_object.xml \
APPLE_vertex_array_object.xml \
- EXT_provoking_vertex.xml
+ EXT_framebuffer_object.xml \
+ EXT_packed_depth_stencil.xml \
+ EXT_provoking_vertex.xml \
+ EXT_texture_array.xml
COMMON = gl_XML.py glX_XML.py license.py $(API_XML) typeexpr.py
COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py
diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml
index da4be14707e..34c7746e1ba 100644
--- a/src/mesa/glapi/gl_API.xml
+++ b/src/mesa/glapi/gl_API.xml
@@ -12238,30 +12238,9 @@
<xi:include href="EXT_framebuffer_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-<xi:include href="EXT_provoking_vertex.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="EXT_packed_depth_stencil.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-<category name="GL_EXT_framebuffer_blit" number="316">
- <enum name="READ_FRAMEBUFFER_EXT" value="0x8CA8"/>
- <enum name="DRAW_FRAMEBUFFER_EXT" value="0x8CA9"/>
- <enum name="DRAW_FRAMEBUFFER_BINDING_EXT" count="1" value="0x8CA6">
- <size name="Get" mode="get"/>
- </enum>
- <enum name="READ_FRAMEBUFFER_BINDING_EXT" count="1" value="0x8CAA">
- <size name="Get" mode="get"/>
- </enum>
- <function name="BlitFramebufferEXT" offset="assign" static_dispatch="false">
- <param name="srcX0" type="GLint"/>
- <param name="srcY0" type="GLint"/>
- <param name="srcX1" type="GLint"/>
- <param name="srcY1" type="GLint"/>
- <param name="dstX0" type="GLint"/>
- <param name="dstY0" type="GLint"/>
- <param name="dstX1" type="GLint"/>
- <param name="dstY1" type="GLint"/>
- <param name="mask" type="GLbitfield"/>
- <param name="filter" type="GLenum"/>
- </function>
-</category>
+<xi:include href="EXT_provoking_vertex.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<category name="GL_APPLE_flush_buffer_range" number="321">
<enum name="BUFFER_SERIALIZED_MODIFY_APPLE" count="1" value="0x8A12">
diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h
index d9a3690f2ad..319a4ab55bd 100644
--- a/src/mesa/glapi/glapitemp.h
+++ b/src/mesa/glapi/glapitemp.h
@@ -4011,6 +4011,11 @@ KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageMultisample)(GLenum target, GLsiz
DISPATCH(RenderbufferStorageMultisample, (target, samples, internalformat, width, height), (F, "glRenderbufferStorageMultisample(0x%x, %d, 0x%x, %d, %d);\n", target, samples, internalformat, width, height));
}
+KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+{
+ DISPATCH(RenderbufferStorageMultisample, (target, samples, internalformat, width, height), (F, "glRenderbufferStorageMultisampleEXT(0x%x, %d, 0x%x, %d, %d);\n", target, samples, internalformat, width, height));
+}
+
KEYWORD1 void KEYWORD2 NAME(FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length)
{
DISPATCH(FlushMappedBufferRange, (target, offset, length), (F, "glFlushMappedBufferRange(0x%x, %d, %d);\n", target, offset, length));
@@ -6837,6 +6842,7 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(GetAttribLocation),
TABLE_ENTRY(DrawBuffers),
TABLE_ENTRY(DrawBuffersATI),
+ TABLE_ENTRY(RenderbufferStorageMultisampleEXT),
TABLE_ENTRY(PointParameterf),
TABLE_ENTRY(PointParameterfARB),
TABLE_ENTRY(PointParameterfv),
diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h
index c29f8b57be9..1ad7e843370 100644
--- a/src/mesa/glapi/glprocs.h
+++ b/src/mesa/glapi/glprocs.h
@@ -1050,6 +1050,7 @@ static const char gl_string_table[] =
"glGetAttribLocation\0"
"glDrawBuffers\0"
"glDrawBuffersATI\0"
+ "glRenderbufferStorageMultisampleEXT\0"
"glSampleMaskEXT\0"
"glSamplePatternEXT\0"
"glPointParameterf\0"
@@ -2257,104 +2258,105 @@ static const glprocs_table_t static_functions[] = {
NAME_FUNC_OFFSET(17904, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
NAME_FUNC_OFFSET(17924, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
NAME_FUNC_OFFSET(17938, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET(17955, gl_dispatch_stub_584, gl_dispatch_stub_584, NULL, _gloffset_SampleMaskSGIS),
- NAME_FUNC_OFFSET(17971, gl_dispatch_stub_585, gl_dispatch_stub_585, NULL, _gloffset_SamplePatternSGIS),
- NAME_FUNC_OFFSET(17990, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(18008, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(18029, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(18051, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(18070, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(18092, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(18115, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
- NAME_FUNC_OFFSET(18134, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
- NAME_FUNC_OFFSET(18154, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
- NAME_FUNC_OFFSET(18173, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
- NAME_FUNC_OFFSET(18193, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
- NAME_FUNC_OFFSET(18212, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
- NAME_FUNC_OFFSET(18232, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
- NAME_FUNC_OFFSET(18251, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
- NAME_FUNC_OFFSET(18271, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
- NAME_FUNC_OFFSET(18290, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
- NAME_FUNC_OFFSET(18310, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
- NAME_FUNC_OFFSET(18330, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
- NAME_FUNC_OFFSET(18351, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
- NAME_FUNC_OFFSET(18371, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
- NAME_FUNC_OFFSET(18392, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
- NAME_FUNC_OFFSET(18412, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
- NAME_FUNC_OFFSET(18433, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
- NAME_FUNC_OFFSET(18457, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
- NAME_FUNC_OFFSET(18475, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
- NAME_FUNC_OFFSET(18495, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
- NAME_FUNC_OFFSET(18513, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
- NAME_FUNC_OFFSET(18525, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
- NAME_FUNC_OFFSET(18538, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
- NAME_FUNC_OFFSET(18550, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
- NAME_FUNC_OFFSET(18563, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(18583, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(18607, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(18621, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(18638, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(18653, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(18671, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(18685, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(18702, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(18717, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(18735, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(18749, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(18766, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(18781, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(18799, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(18813, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(18830, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(18845, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(18863, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(18877, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(18894, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(18909, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(18927, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(18941, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(18958, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(18973, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(18991, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(19005, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(19022, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(19037, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(19055, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(19069, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(19086, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(19101, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(19119, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
- NAME_FUNC_OFFSET(19136, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
- NAME_FUNC_OFFSET(19156, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
- NAME_FUNC_OFFSET(19173, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(19199, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(19228, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
- NAME_FUNC_OFFSET(19243, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
- NAME_FUNC_OFFSET(19261, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
- NAME_FUNC_OFFSET(19280, gl_dispatch_stub_755, gl_dispatch_stub_755, NULL, _gloffset_DeleteVertexArraysAPPLE),
- NAME_FUNC_OFFSET(19301, gl_dispatch_stub_757, gl_dispatch_stub_757, NULL, _gloffset_IsVertexArrayAPPLE),
- NAME_FUNC_OFFSET(19317, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(19341, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(19368, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT),
- NAME_FUNC_OFFSET(19386, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT),
- NAME_FUNC_OFFSET(19405, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT),
- NAME_FUNC_OFFSET(19430, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT),
- NAME_FUNC_OFFSET(19451, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT),
- NAME_FUNC_OFFSET(19473, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT),
- NAME_FUNC_OFFSET(19499, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT),
- NAME_FUNC_OFFSET(19522, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT),
- NAME_FUNC_OFFSET(19545, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT),
- NAME_FUNC_OFFSET(19568, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT),
- NAME_FUNC_OFFSET(19586, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT),
- NAME_FUNC_OFFSET(19605, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT),
- NAME_FUNC_OFFSET(19622, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT),
- NAME_FUNC_OFFSET(19660, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT),
- NAME_FUNC_OFFSET(19689, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT),
- NAME_FUNC_OFFSET(19705, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT),
- NAME_FUNC_OFFSET(19722, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT),
- NAME_FUNC_OFFSET(19744, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, _gloffset_BlitFramebufferEXT),
- NAME_FUNC_OFFSET(19762, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT),
- NAME_FUNC_OFFSET(19788, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
+ NAME_FUNC_OFFSET(17955, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, _gloffset_RenderbufferStorageMultisample),
+ NAME_FUNC_OFFSET(17991, gl_dispatch_stub_584, gl_dispatch_stub_584, NULL, _gloffset_SampleMaskSGIS),
+ NAME_FUNC_OFFSET(18007, gl_dispatch_stub_585, gl_dispatch_stub_585, NULL, _gloffset_SamplePatternSGIS),
+ NAME_FUNC_OFFSET(18026, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18044, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18065, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18087, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18106, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18128, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18151, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
+ NAME_FUNC_OFFSET(18170, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
+ NAME_FUNC_OFFSET(18190, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
+ NAME_FUNC_OFFSET(18209, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
+ NAME_FUNC_OFFSET(18229, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
+ NAME_FUNC_OFFSET(18248, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
+ NAME_FUNC_OFFSET(18268, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
+ NAME_FUNC_OFFSET(18287, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
+ NAME_FUNC_OFFSET(18307, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
+ NAME_FUNC_OFFSET(18326, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
+ NAME_FUNC_OFFSET(18346, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
+ NAME_FUNC_OFFSET(18366, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
+ NAME_FUNC_OFFSET(18387, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
+ NAME_FUNC_OFFSET(18407, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
+ NAME_FUNC_OFFSET(18428, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
+ NAME_FUNC_OFFSET(18448, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
+ NAME_FUNC_OFFSET(18469, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
+ NAME_FUNC_OFFSET(18493, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
+ NAME_FUNC_OFFSET(18511, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
+ NAME_FUNC_OFFSET(18531, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
+ NAME_FUNC_OFFSET(18549, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
+ NAME_FUNC_OFFSET(18561, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
+ NAME_FUNC_OFFSET(18574, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
+ NAME_FUNC_OFFSET(18586, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
+ NAME_FUNC_OFFSET(18599, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(18619, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(18643, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(18657, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(18674, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(18689, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(18707, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(18721, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(18738, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(18753, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(18771, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(18785, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(18802, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(18817, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(18835, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(18849, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(18866, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(18881, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(18899, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(18913, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(18930, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(18945, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(18963, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(18977, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(18994, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(19009, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(19027, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(19041, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(19058, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(19073, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(19091, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(19105, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(19122, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(19137, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(19155, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
+ NAME_FUNC_OFFSET(19172, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
+ NAME_FUNC_OFFSET(19192, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
+ NAME_FUNC_OFFSET(19209, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(19235, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(19264, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
+ NAME_FUNC_OFFSET(19279, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
+ NAME_FUNC_OFFSET(19297, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
+ NAME_FUNC_OFFSET(19316, gl_dispatch_stub_755, gl_dispatch_stub_755, NULL, _gloffset_DeleteVertexArraysAPPLE),
+ NAME_FUNC_OFFSET(19337, gl_dispatch_stub_757, gl_dispatch_stub_757, NULL, _gloffset_IsVertexArrayAPPLE),
+ NAME_FUNC_OFFSET(19353, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(19377, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(19404, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT),
+ NAME_FUNC_OFFSET(19422, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT),
+ NAME_FUNC_OFFSET(19441, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT),
+ NAME_FUNC_OFFSET(19466, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT),
+ NAME_FUNC_OFFSET(19487, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT),
+ NAME_FUNC_OFFSET(19509, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT),
+ NAME_FUNC_OFFSET(19535, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT),
+ NAME_FUNC_OFFSET(19558, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT),
+ NAME_FUNC_OFFSET(19581, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT),
+ NAME_FUNC_OFFSET(19604, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT),
+ NAME_FUNC_OFFSET(19622, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT),
+ NAME_FUNC_OFFSET(19641, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT),
+ NAME_FUNC_OFFSET(19658, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT),
+ NAME_FUNC_OFFSET(19696, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT),
+ NAME_FUNC_OFFSET(19725, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT),
+ NAME_FUNC_OFFSET(19741, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT),
+ NAME_FUNC_OFFSET(19758, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT),
+ NAME_FUNC_OFFSET(19780, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, _gloffset_BlitFramebufferEXT),
+ NAME_FUNC_OFFSET(19798, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT),
+ NAME_FUNC_OFFSET(19824, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
};
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index d8b5f3b1f4a..97f06597581 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -338,13 +338,13 @@ _mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers)
if (ctx->Driver.DrawBuffers)
ctx->Driver.DrawBuffers(ctx, n, buffers);
else if (ctx->Driver.DrawBuffer)
- ctx->Driver.DrawBuffer(ctx, n>0? buffers[0]:GL_NONE);
+ ctx->Driver.DrawBuffer(ctx, n > 0 ? buffers[0] : GL_NONE);
}
/**
* Helper function to set the GL_DRAW_BUFFER state in the context and
- * current FBO.
+ * current FBO. Called via glDrawBuffer(), glDrawBuffersARB()
*
* All error checking will have been done prior to calling this function
* so nothing should go wrong at this point.
@@ -362,6 +362,7 @@ _mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
{
struct gl_framebuffer *fb = ctx->DrawBuffer;
GLbitfield mask[MAX_DRAW_BUFFERS];
+ GLboolean newState = GL_FALSE;
if (!destMask) {
/* compute destMask values now */
@@ -375,34 +376,54 @@ _mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
destMask = mask;
}
+ /*
+ * If n==1, destMask[0] may have up to four bits set.
+ * Otherwise, destMask[x] can only have one bit set.
+ */
if (n == 1) {
- GLuint buf, count = 0;
- /* init to -1 to help catch errors */
- fb->_ColorDrawBufferIndexes[0] = -1;
- for (buf = 0; buf < BUFFER_COUNT; buf++) {
- if (destMask[0] & (1 << buf)) {
- fb->_ColorDrawBufferIndexes[count] = buf;
- count++;
+ GLuint count = 0, destMask0 = destMask[0];
+ while (destMask0) {
+ GLint bufIndex = _mesa_ffs(destMask0) - 1;
+ if (fb->_ColorDrawBufferIndexes[count] != bufIndex) {
+ fb->_ColorDrawBufferIndexes[count] = bufIndex;
+ newState = GL_TRUE;
}
+ count++;
+ destMask0 &= ~(1 << bufIndex);
}
fb->ColorDrawBuffer[0] = buffers[0];
- fb->_NumColorDrawBuffers = count;
+ if (fb->_NumColorDrawBuffers != count) {
+ fb->_NumColorDrawBuffers = count;
+ newState = GL_TRUE;
+ }
}
else {
GLuint buf, count = 0;
for (buf = 0; buf < n; buf++ ) {
if (destMask[buf]) {
- fb->_ColorDrawBufferIndexes[buf] = _mesa_ffs(destMask[buf]) - 1;
+ GLint bufIndex = _mesa_ffs(destMask[buf]) - 1;
+ /* only one bit should be set in the destMask[buf] field */
+ ASSERT(_mesa_bitcount(destMask[buf]) == 1);
+ if (fb->_ColorDrawBufferIndexes[buf] != bufIndex) {
+ fb->_ColorDrawBufferIndexes[buf] = bufIndex;
+ newState = GL_TRUE;
+ }
fb->ColorDrawBuffer[buf] = buffers[buf];
count = buf + 1;
}
else {
- fb->_ColorDrawBufferIndexes[buf] = -1;
+ if (fb->_ColorDrawBufferIndexes[buf] != -1) {
+ fb->_ColorDrawBufferIndexes[buf] = -1;
+ newState = GL_TRUE;
+ }
}
}
/* set remaining outputs to -1 (GL_NONE) */
while (buf < ctx->Const.MaxDrawBuffers) {
- fb->_ColorDrawBufferIndexes[buf] = -1;
+ if (fb->_ColorDrawBufferIndexes[buf] != -1) {
+ fb->_ColorDrawBufferIndexes[buf] = -1;
+ newState = GL_TRUE;
+ }
fb->ColorDrawBuffer[buf] = GL_NONE;
buf++;
}
@@ -413,11 +434,15 @@ _mesa_drawbuffers(GLcontext *ctx, GLuint n, const GLenum *buffers,
/* also set context drawbuffer state */
GLuint buf;
for (buf = 0; buf < ctx->Const.MaxDrawBuffers; buf++) {
- ctx->Color.DrawBuffer[buf] = fb->ColorDrawBuffer[buf];
+ if (ctx->Color.DrawBuffer[buf] != fb->ColorDrawBuffer[buf]) {
+ ctx->Color.DrawBuffer[buf] = fb->ColorDrawBuffer[buf];
+ newState = GL_TRUE;
+ }
}
}
- ctx->NewState |= _NEW_BUFFERS;
+ if (newState)
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
}
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
index 7ae781ae23d..905f4e22837 100644
--- a/src/mesa/main/colormac.h
+++ b/src/mesa/main/colormac.h
@@ -210,6 +210,12 @@ do { \
#define PACK_COLOR_88_REV( L, A ) \
(((A) << 8) | (L))
+#define PACK_COLOR_1616( L, A ) \
+ (((L) << 16) | (A))
+
+#define PACK_COLOR_1616_REV( L, A ) \
+ (((A) << 16) | (L))
+
#define PACK_COLOR_332( R, G, B ) \
(((R) & 0xe0) | (((G) & 0xe0) >> 3) | (((B) & 0xc0) >> 6))
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 380663ec971..87c3b2e5621 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -234,7 +234,12 @@ extern "C" {
#elif defined(__APPLE__)
#include <CoreFoundation/CFByteOrder.h>
#define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x )
-#else /*__linux__ __APPLE__*/
+#elif defined(_AIX)
+#define CPU_TO_LE32( x ) x = ((x & 0x000000ff) << 24) | \
+ ((x & 0x0000ff00) << 8) | \
+ ((x & 0x00ff0000) >> 8) | \
+ ((x & 0xff000000) >> 24);
+#else /*__linux__ */
#include <sys/endian.h>
#define CPU_TO_LE32( x ) bswap32( x )
#endif /*__linux__*/
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index 8a09efdb539..c5048970cca 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -205,7 +205,7 @@
#define MAX_VARYING 16 /**< number of float[4] vectors */
#define MAX_SAMPLERS MAX_TEXTURE_IMAGE_UNITS
#define MAX_PROGRAM_INPUTS 32
-#define MAX_PROGRAM_OUTPUTS 32
+#define MAX_PROGRAM_OUTPUTS 64
/*@}*/
/** For GL_ARB_vertex_program */
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 101d3c6b675..03fc57e6654 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -575,6 +575,7 @@ _mesa_init_constants(GLcontext *ctx)
#if FEATURE_ARB_vertex_shader
ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
+ ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
ctx->Const.MaxVarying = MAX_VARYING;
#endif
@@ -601,9 +602,11 @@ _mesa_init_constants(GLcontext *ctx)
ASSERT(MAX_NV_VERTEX_PROGRAM_INPUTS <= VERT_ATTRIB_MAX);
ASSERT(MAX_NV_VERTEX_PROGRAM_OUTPUTS <= VERT_RESULT_MAX);
- /* check that we don't exceed various 32-bit bitfields */
- ASSERT(VERT_RESULT_MAX <= 32);
- ASSERT(FRAG_ATTRIB_MAX <= 32);
+ /* check that we don't exceed the size of various bitfields */
+ ASSERT(VERT_RESULT_MAX <=
+ (8 * sizeof(ctx->VertexProgram._Current->Base.OutputsWritten)));
+ ASSERT(FRAG_ATTRIB_MAX <=
+ (8 * sizeof(ctx->FragmentProgram._Current->Base.InputsRead)));
}
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 99f2cad4028..27ed921761c 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -709,34 +709,6 @@ struct dd_function_table {
/*@}*/
- /**
- * \name Vertex array functions
- *
- * Called by the corresponding OpenGL functions.
- */
- /*@{*/
- void (*VertexPointer)(GLcontext *ctx, GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*NormalPointer)(GLcontext *ctx, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*ColorPointer)(GLcontext *ctx, GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*FogCoordPointer)(GLcontext *ctx, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*IndexPointer)(GLcontext *ctx, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*SecondaryColorPointer)(GLcontext *ctx, GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*TexCoordPointer)(GLcontext *ctx, GLint size, GLenum type,
- GLsizei stride, const GLvoid *ptr);
- void (*EdgeFlagPointer)(GLcontext *ctx, GLsizei stride, const GLvoid *ptr);
- void (*VertexAttribPointer)(GLcontext *ctx, GLuint index, GLint size,
- GLenum type, GLsizei stride, const GLvoid *ptr);
- void (*LockArraysEXT)( GLcontext *ctx, GLint first, GLsizei count );
- void (*UnlockArraysEXT)( GLcontext *ctx );
- /*@}*/
-
-
/**
* \name State-query functions
*
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 606d50c59ad..f9f4bc78535 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -384,6 +384,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_DELETE_STATUS\0"
"GL_DEPTH\0"
"GL_DEPTH24_STENCIL8\0"
+ "GL_DEPTH24_STENCIL8_EXT\0"
"GL_DEPTH_ATTACHMENT\0"
"GL_DEPTH_ATTACHMENT_EXT\0"
"GL_DEPTH_BIAS\0"
@@ -409,6 +410,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_DEPTH_SCALE\0"
"GL_DEPTH_STENCIL\0"
"GL_DEPTH_STENCIL_ATTACHMENT\0"
+ "GL_DEPTH_STENCIL_EXT\0"
"GL_DEPTH_STENCIL_NV\0"
"GL_DEPTH_STENCIL_TO_BGRA_NV\0"
"GL_DEPTH_STENCIL_TO_RGBA_NV\0"
@@ -478,6 +480,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_DRAW_BUFFER9_ARB\0"
"GL_DRAW_BUFFER9_ATI\0"
"GL_DRAW_FRAMEBUFFER\0"
+ "GL_DRAW_FRAMEBUFFER_BINDING\0"
"GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
"GL_DRAW_FRAMEBUFFER_EXT\0"
"GL_DRAW_PIXEL_TOKEN\0"
@@ -593,6 +596,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\0"
"GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
+ "GL_FRAMEBUFFER_BINDING\0"
"GL_FRAMEBUFFER_BINDING_EXT\0"
"GL_FRAMEBUFFER_COMPLETE\0"
"GL_FRAMEBUFFER_COMPLETE_EXT\0"
@@ -601,12 +605,15 @@ LONGSTRING static const char enum_string_table[] =
"GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT\0"
"GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER\0"
"GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\0"
"GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
"GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER\0"
"GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
"GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
"GL_FRAMEBUFFER_UNDEFINED\0"
@@ -892,6 +899,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_CLIPMAP_DEPTH_SGIX\0"
"GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
"GL_MAX_CLIP_PLANES\0"
+ "GL_MAX_COLOR_ATTACHMENTS\0"
"GL_MAX_COLOR_ATTACHMENTS_EXT\0"
"GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
"GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
@@ -947,8 +955,10 @@ LONGSTRING static const char enum_string_table[] =
"GL_MAX_PROJECTION_STACK_DEPTH\0"
"GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
"GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
+ "GL_MAX_RENDERBUFFER_SIZE\0"
"GL_MAX_RENDERBUFFER_SIZE_EXT\0"
"GL_MAX_SAMPLES\0"
+ "GL_MAX_SAMPLES_EXT\0"
"GL_MAX_SERVER_WAIT_TIMEOUT\0"
"GL_MAX_SHININESS_NV\0"
"GL_MAX_SPOT_EXPONENT_NV\0"
@@ -1327,6 +1337,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_RASTER_POSITION_UNCLIPPED_IBM\0"
"GL_READ_BUFFER\0"
"GL_READ_FRAMEBUFFER\0"
+ "GL_READ_FRAMEBUFFER_BINDING\0"
"GL_READ_FRAMEBUFFER_BINDING_EXT\0"
"GL_READ_FRAMEBUFFER_EXT\0"
"GL_READ_ONLY\0"
@@ -1345,6 +1356,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_RENDER\0"
"GL_RENDERBUFFER\0"
"GL_RENDERBUFFER_ALPHA_SIZE\0"
+ "GL_RENDERBUFFER_BINDING\0"
"GL_RENDERBUFFER_BINDING_EXT\0"
"GL_RENDERBUFFER_BLUE_SIZE\0"
"GL_RENDERBUFFER_DEPTH_SIZE\0"
@@ -1356,6 +1368,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
"GL_RENDERBUFFER_RED_SIZE\0"
"GL_RENDERBUFFER_SAMPLES\0"
+ "GL_RENDERBUFFER_SAMPLES_EXT\0"
"GL_RENDERBUFFER_STENCIL_SIZE\0"
"GL_RENDERBUFFER_WIDTH\0"
"GL_RENDERBUFFER_WIDTH_EXT\0"
@@ -1541,9 +1554,13 @@ LONGSTRING static const char enum_string_table[] =
"GL_STENCIL_FAIL\0"
"GL_STENCIL_FUNC\0"
"GL_STENCIL_INDEX\0"
+ "GL_STENCIL_INDEX1\0"
+ "GL_STENCIL_INDEX16\0"
"GL_STENCIL_INDEX16_EXT\0"
"GL_STENCIL_INDEX1_EXT\0"
+ "GL_STENCIL_INDEX4\0"
"GL_STENCIL_INDEX4_EXT\0"
+ "GL_STENCIL_INDEX8\0"
"GL_STENCIL_INDEX8_EXT\0"
"GL_STENCIL_INDEX_EXT\0"
"GL_STENCIL_PASS_DEPTH_FAIL\0"
@@ -1761,6 +1778,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_TEXTURE_RESIDENT\0"
"GL_TEXTURE_STACK_DEPTH\0"
"GL_TEXTURE_STENCIL_SIZE\0"
+ "GL_TEXTURE_STENCIL_SIZE_EXT\0"
"GL_TEXTURE_STORAGE_HINT_APPLE\0"
"GL_TEXTURE_TOO_LARGE_EXT\0"
"GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
@@ -1804,6 +1822,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_UNSIGNED_INT\0"
"GL_UNSIGNED_INT_10_10_10_2\0"
"GL_UNSIGNED_INT_24_8\0"
+ "GL_UNSIGNED_INT_24_8_EXT\0"
"GL_UNSIGNED_INT_24_8_NV\0"
"GL_UNSIGNED_INT_2_10_10_10_REV\0"
"GL_UNSIGNED_INT_8_8_8_8\0"
@@ -1900,7 +1919,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[1862] =
+static const enum_elt all_enums[1881] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -2250,1600 +2269,1619 @@ static const enum_elt all_enums[1862] =
{ 7144, 0x00008B80 }, /* GL_DELETE_STATUS */
{ 7161, 0x00001801 }, /* GL_DEPTH */
{ 7170, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
- { 7190, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
- { 7210, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
- { 7234, 0x00000D1F }, /* GL_DEPTH_BIAS */
- { 7248, 0x00000D56 }, /* GL_DEPTH_BITS */
- { 7262, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
- { 7282, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
- { 7307, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
- { 7327, 0x0000864F }, /* GL_DEPTH_CLAMP */
- { 7342, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
- { 7360, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
- { 7381, 0x00001902 }, /* GL_DEPTH_COMPONENT */
- { 7400, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
- { 7421, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
- { 7446, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
- { 7472, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
- { 7493, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
- { 7518, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
- { 7544, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
- { 7565, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
- { 7590, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
- { 7616, 0x00000B74 }, /* GL_DEPTH_FUNC */
- { 7630, 0x00000B70 }, /* GL_DEPTH_RANGE */
- { 7645, 0x00000D1E }, /* GL_DEPTH_SCALE */
- { 7660, 0x000084F9 }, /* GL_DEPTH_STENCIL */
- { 7677, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
- { 7705, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
- { 7725, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- { 7753, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- { 7781, 0x00000B71 }, /* GL_DEPTH_TEST */
- { 7795, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
- { 7817, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
- { 7843, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
- { 7862, 0x00001201 }, /* GL_DIFFUSE */
- { 7873, 0x00000BD0 }, /* GL_DITHER */
- { 7883, 0x00000A02 }, /* GL_DOMAIN */
- { 7893, 0x00001100 }, /* GL_DONT_CARE */
- { 7906, 0x000086AE }, /* GL_DOT3_RGB */
- { 7918, 0x000086AF }, /* GL_DOT3_RGBA */
- { 7931, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
- { 7948, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
- { 7965, 0x000086AE }, /* GL_DOT3_RGB_ARB */
- { 7981, 0x00008740 }, /* GL_DOT3_RGB_EXT */
- { 7997, 0x0000140A }, /* GL_DOUBLE */
- { 8007, 0x00000C32 }, /* GL_DOUBLEBUFFER */
- { 8023, 0x00000C01 }, /* GL_DRAW_BUFFER */
- { 8038, 0x00008825 }, /* GL_DRAW_BUFFER0 */
- { 8054, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
- { 8074, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
- { 8094, 0x00008826 }, /* GL_DRAW_BUFFER1 */
- { 8110, 0x0000882F }, /* GL_DRAW_BUFFER10 */
- { 8127, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
- { 8148, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
- { 8169, 0x00008830 }, /* GL_DRAW_BUFFER11 */
- { 8186, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
- { 8207, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
- { 8228, 0x00008831 }, /* GL_DRAW_BUFFER12 */
- { 8245, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
- { 8266, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
- { 8287, 0x00008832 }, /* GL_DRAW_BUFFER13 */
- { 8304, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
- { 8325, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
- { 8346, 0x00008833 }, /* GL_DRAW_BUFFER14 */
- { 8363, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
- { 8384, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
- { 8405, 0x00008834 }, /* GL_DRAW_BUFFER15 */
- { 8422, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
- { 8443, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
- { 8464, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
- { 8484, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
- { 8504, 0x00008827 }, /* GL_DRAW_BUFFER2 */
- { 8520, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
- { 8540, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
- { 8560, 0x00008828 }, /* GL_DRAW_BUFFER3 */
- { 8576, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
- { 8596, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
- { 8616, 0x00008829 }, /* GL_DRAW_BUFFER4 */
- { 8632, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
- { 8652, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
- { 8672, 0x0000882A }, /* GL_DRAW_BUFFER5 */
- { 8688, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
- { 8708, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
- { 8728, 0x0000882B }, /* GL_DRAW_BUFFER6 */
- { 8744, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
- { 8764, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
- { 8784, 0x0000882C }, /* GL_DRAW_BUFFER7 */
- { 8800, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
- { 8820, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
- { 8840, 0x0000882D }, /* GL_DRAW_BUFFER8 */
- { 8856, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
- { 8876, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
- { 8896, 0x0000882E }, /* GL_DRAW_BUFFER9 */
- { 8912, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
- { 8932, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
- { 8952, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
- { 8972, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- { 9004, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
- { 9028, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
- { 9048, 0x00000304 }, /* GL_DST_ALPHA */
- { 9061, 0x00000306 }, /* GL_DST_COLOR */
- { 9074, 0x0000877A }, /* GL_DU8DV8_ATI */
- { 9088, 0x00008779 }, /* GL_DUDV_ATI */
- { 9100, 0x000088EA }, /* GL_DYNAMIC_COPY */
- { 9116, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
- { 9136, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
- { 9152, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
- { 9172, 0x000088E9 }, /* GL_DYNAMIC_READ */
- { 9188, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
- { 9208, 0x00000B43 }, /* GL_EDGE_FLAG */
- { 9221, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
- { 9240, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- { 9274, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
- { 9312, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
- { 9339, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- { 9365, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
- { 9389, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- { 9421, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
- { 9457, 0x00001600 }, /* GL_EMISSION */
- { 9469, 0x00002000 }, /* GL_ENABLE_BIT */
- { 9483, 0x00000202 }, /* GL_EQUAL */
- { 9492, 0x00001509 }, /* GL_EQUIV */
- { 9501, 0x00010000 }, /* GL_EVAL_BIT */
- { 9513, 0x00000800 }, /* GL_EXP */
- { 9520, 0x00000801 }, /* GL_EXP2 */
- { 9528, 0x00001F03 }, /* GL_EXTENSIONS */
- { 9542, 0x00002400 }, /* GL_EYE_LINEAR */
- { 9556, 0x00002502 }, /* GL_EYE_PLANE */
- { 9569, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
- { 9594, 0x0000855B }, /* GL_EYE_RADIAL_NV */
- { 9611, 0x00000000 }, /* GL_FALSE */
- { 9620, 0x00001101 }, /* GL_FASTEST */
- { 9631, 0x00001C01 }, /* GL_FEEDBACK */
- { 9643, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
- { 9670, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
- { 9694, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
- { 9718, 0x00001B02 }, /* GL_FILL */
- { 9726, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
- { 9753, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
- { 9784, 0x00001D00 }, /* GL_FLAT */
- { 9792, 0x00001406 }, /* GL_FLOAT */
- { 9801, 0x00008B5A }, /* GL_FLOAT_MAT2 */
- { 9815, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
- { 9833, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
- { 9849, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
- { 9865, 0x00008B5B }, /* GL_FLOAT_MAT3 */
- { 9879, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
- { 9897, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
- { 9913, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
- { 9929, 0x00008B5C }, /* GL_FLOAT_MAT4 */
- { 9943, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
- { 9961, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
- { 9977, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
- { 9993, 0x00008B50 }, /* GL_FLOAT_VEC2 */
- { 10007, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
- { 10025, 0x00008B51 }, /* GL_FLOAT_VEC3 */
- { 10039, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
- { 10057, 0x00008B52 }, /* GL_FLOAT_VEC4 */
- { 10071, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
- { 10089, 0x00000B60 }, /* GL_FOG */
- { 10096, 0x00000080 }, /* GL_FOG_BIT */
- { 10107, 0x00000B66 }, /* GL_FOG_COLOR */
- { 10120, 0x00008451 }, /* GL_FOG_COORD */
- { 10133, 0x00008451 }, /* GL_FOG_COORDINATE */
- { 10151, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
- { 10175, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- { 10214, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
- { 10257, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- { 10289, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- { 10320, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- { 10349, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
- { 10374, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
- { 10393, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
- { 10427, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
- { 10454, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
- { 10480, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
- { 10504, 0x00008450 }, /* GL_FOG_COORD_SRC */
- { 10521, 0x00000B62 }, /* GL_FOG_DENSITY */
- { 10536, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
- { 10560, 0x00000B64 }, /* GL_FOG_END */
- { 10571, 0x00000C54 }, /* GL_FOG_HINT */
- { 10583, 0x00000B61 }, /* GL_FOG_INDEX */
- { 10596, 0x00000B65 }, /* GL_FOG_MODE */
- { 10608, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
- { 10627, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
- { 10652, 0x00000B63 }, /* GL_FOG_START */
- { 10665, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
- { 10683, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
- { 10707, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
- { 10726, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
- { 10749, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- { 10784, 0x00008D40 }, /* GL_FRAMEBUFFER */
- { 10799, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- { 10836, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- { 10872, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- { 10913, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- { 10954, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- { 10991, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- { 11028, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- { 11066, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
- { 11108, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- { 11146, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
- { 11188, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- { 11223, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- { 11262, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
- { 11311, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- { 11359, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
- { 11411, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- { 11451, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
- { 11495, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- { 11535, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
- { 11579, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
- { 11606, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
- { 11630, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
- { 11658, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
- { 11681, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
- { 11700, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- { 11737, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
- { 11778, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- { 11819, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- { 11861, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- { 11912, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- { 11950, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- { 11995, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
- { 12044, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- { 12082, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- { 12124, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- { 12156, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
- { 12181, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
- { 12208, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
- { 12239, 0x00000404 }, /* GL_FRONT */
- { 12248, 0x00000408 }, /* GL_FRONT_AND_BACK */
- { 12266, 0x00000B46 }, /* GL_FRONT_FACE */
- { 12280, 0x00000400 }, /* GL_FRONT_LEFT */
- { 12294, 0x00000401 }, /* GL_FRONT_RIGHT */
- { 12309, 0x00008006 }, /* GL_FUNC_ADD */
- { 12321, 0x00008006 }, /* GL_FUNC_ADD_EXT */
- { 12337, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
- { 12362, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
- { 12391, 0x0000800A }, /* GL_FUNC_SUBTRACT */
- { 12408, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
- { 12429, 0x00008191 }, /* GL_GENERATE_MIPMAP */
- { 12448, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
- { 12472, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
- { 12501, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
- { 12525, 0x00000206 }, /* GL_GEQUAL */
- { 12535, 0x00000204 }, /* GL_GREATER */
- { 12546, 0x00001904 }, /* GL_GREEN */
- { 12555, 0x00000D19 }, /* GL_GREEN_BIAS */
- { 12569, 0x00000D53 }, /* GL_GREEN_BITS */
- { 12583, 0x00000D18 }, /* GL_GREEN_SCALE */
- { 12598, 0x00008000 }, /* GL_HINT_BIT */
- { 12610, 0x00008024 }, /* GL_HISTOGRAM */
- { 12623, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
- { 12647, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
- { 12675, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
- { 12698, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
- { 12725, 0x00008024 }, /* GL_HISTOGRAM_EXT */
- { 12742, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
- { 12762, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
- { 12786, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
- { 12810, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
- { 12838, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- { 12866, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
- { 12898, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
- { 12920, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
- { 12946, 0x0000802D }, /* GL_HISTOGRAM_SINK */
- { 12964, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
- { 12986, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
- { 13005, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
- { 13028, 0x0000862A }, /* GL_IDENTITY_NV */
- { 13043, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
- { 13063, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- { 13103, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- { 13141, 0x00001E02 }, /* GL_INCR */
- { 13149, 0x00008507 }, /* GL_INCR_WRAP */
- { 13162, 0x00008507 }, /* GL_INCR_WRAP_EXT */
- { 13179, 0x00008222 }, /* GL_INDEX */
- { 13188, 0x00008077 }, /* GL_INDEX_ARRAY */
- { 13203, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- { 13233, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
- { 13267, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
- { 13290, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
- { 13312, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
- { 13332, 0x00000D51 }, /* GL_INDEX_BITS */
- { 13346, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
- { 13367, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
- { 13385, 0x00000C30 }, /* GL_INDEX_MODE */
- { 13399, 0x00000D13 }, /* GL_INDEX_OFFSET */
- { 13415, 0x00000D12 }, /* GL_INDEX_SHIFT */
- { 13430, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
- { 13449, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
- { 13468, 0x00001404 }, /* GL_INT */
- { 13475, 0x00008049 }, /* GL_INTENSITY */
- { 13488, 0x0000804C }, /* GL_INTENSITY12 */
- { 13503, 0x0000804C }, /* GL_INTENSITY12_EXT */
- { 13522, 0x0000804D }, /* GL_INTENSITY16 */
- { 13537, 0x0000804D }, /* GL_INTENSITY16_EXT */
- { 13556, 0x0000804A }, /* GL_INTENSITY4 */
- { 13570, 0x0000804A }, /* GL_INTENSITY4_EXT */
- { 13588, 0x0000804B }, /* GL_INTENSITY8 */
- { 13602, 0x0000804B }, /* GL_INTENSITY8_EXT */
- { 13620, 0x00008049 }, /* GL_INTENSITY_EXT */
- { 13637, 0x00008575 }, /* GL_INTERPOLATE */
- { 13652, 0x00008575 }, /* GL_INTERPOLATE_ARB */
- { 13671, 0x00008575 }, /* GL_INTERPOLATE_EXT */
- { 13690, 0x00008B53 }, /* GL_INT_VEC2 */
- { 13702, 0x00008B53 }, /* GL_INT_VEC2_ARB */
- { 13718, 0x00008B54 }, /* GL_INT_VEC3 */
- { 13730, 0x00008B54 }, /* GL_INT_VEC3_ARB */
- { 13746, 0x00008B55 }, /* GL_INT_VEC4 */
- { 13758, 0x00008B55 }, /* GL_INT_VEC4_ARB */
- { 13774, 0x00000500 }, /* GL_INVALID_ENUM */
- { 13790, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
- { 13823, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
- { 13860, 0x00000502 }, /* GL_INVALID_OPERATION */
- { 13881, 0x00000501 }, /* GL_INVALID_VALUE */
- { 13898, 0x0000862B }, /* GL_INVERSE_NV */
- { 13912, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
- { 13936, 0x0000150A }, /* GL_INVERT */
- { 13946, 0x00001E00 }, /* GL_KEEP */
- { 13954, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
- { 13980, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
- { 14010, 0x00000406 }, /* GL_LEFT */
- { 14018, 0x00000203 }, /* GL_LEQUAL */
- { 14028, 0x00000201 }, /* GL_LESS */
- { 14036, 0x00004000 }, /* GL_LIGHT0 */
- { 14046, 0x00004001 }, /* GL_LIGHT1 */
- { 14056, 0x00004002 }, /* GL_LIGHT2 */
- { 14066, 0x00004003 }, /* GL_LIGHT3 */
- { 14076, 0x00004004 }, /* GL_LIGHT4 */
- { 14086, 0x00004005 }, /* GL_LIGHT5 */
- { 14096, 0x00004006 }, /* GL_LIGHT6 */
- { 14106, 0x00004007 }, /* GL_LIGHT7 */
- { 14116, 0x00000B50 }, /* GL_LIGHTING */
- { 14128, 0x00000040 }, /* GL_LIGHTING_BIT */
- { 14144, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
- { 14167, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- { 14196, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
- { 14229, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- { 14257, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
- { 14281, 0x00001B01 }, /* GL_LINE */
- { 14289, 0x00002601 }, /* GL_LINEAR */
- { 14299, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
- { 14321, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- { 14351, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- { 14382, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
- { 14406, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
- { 14431, 0x00000001 }, /* GL_LINES */
- { 14440, 0x00000004 }, /* GL_LINE_BIT */
- { 14452, 0x00000002 }, /* GL_LINE_LOOP */
- { 14465, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
- { 14485, 0x00000B20 }, /* GL_LINE_SMOOTH */
- { 14500, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
- { 14520, 0x00000B24 }, /* GL_LINE_STIPPLE */
- { 14536, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
- { 14560, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
- { 14583, 0x00000003 }, /* GL_LINE_STRIP */
- { 14597, 0x00000702 }, /* GL_LINE_TOKEN */
- { 14611, 0x00000B21 }, /* GL_LINE_WIDTH */
- { 14625, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
- { 14651, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
- { 14671, 0x00008B82 }, /* GL_LINK_STATUS */
- { 14686, 0x00000B32 }, /* GL_LIST_BASE */
- { 14699, 0x00020000 }, /* GL_LIST_BIT */
- { 14711, 0x00000B33 }, /* GL_LIST_INDEX */
- { 14725, 0x00000B30 }, /* GL_LIST_MODE */
- { 14738, 0x00000101 }, /* GL_LOAD */
- { 14746, 0x00000BF1 }, /* GL_LOGIC_OP */
- { 14758, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
- { 14775, 0x00008CA1 }, /* GL_LOWER_LEFT */
- { 14789, 0x00001909 }, /* GL_LUMINANCE */
- { 14802, 0x00008041 }, /* GL_LUMINANCE12 */
- { 14817, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
- { 14840, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
- { 14867, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
- { 14889, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
- { 14915, 0x00008041 }, /* GL_LUMINANCE12_EXT */
- { 14934, 0x00008042 }, /* GL_LUMINANCE16 */
- { 14949, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
- { 14972, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
- { 14999, 0x00008042 }, /* GL_LUMINANCE16_EXT */
- { 15018, 0x0000803F }, /* GL_LUMINANCE4 */
- { 15032, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
- { 15053, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
- { 15078, 0x0000803F }, /* GL_LUMINANCE4_EXT */
- { 15096, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
- { 15117, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
- { 15142, 0x00008040 }, /* GL_LUMINANCE8 */
- { 15156, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
- { 15177, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
- { 15202, 0x00008040 }, /* GL_LUMINANCE8_EXT */
- { 15220, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
- { 15239, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
- { 15255, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
- { 15275, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
- { 15297, 0x00000D91 }, /* GL_MAP1_INDEX */
- { 15311, 0x00000D92 }, /* GL_MAP1_NORMAL */
- { 15326, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
- { 15350, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
- { 15374, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
- { 15398, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
- { 15422, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
- { 15439, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
- { 15456, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- { 15484, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- { 15513, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- { 15542, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- { 15571, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- { 15600, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- { 15629, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- { 15658, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- { 15686, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- { 15714, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- { 15742, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- { 15770, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- { 15798, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- { 15826, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- { 15854, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- { 15882, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- { 15910, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
- { 15926, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
- { 15946, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
- { 15968, 0x00000DB1 }, /* GL_MAP2_INDEX */
- { 15982, 0x00000DB2 }, /* GL_MAP2_NORMAL */
- { 15997, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
- { 16021, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
- { 16045, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
- { 16069, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
- { 16093, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
- { 16110, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
- { 16127, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- { 16155, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- { 16184, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- { 16213, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- { 16242, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- { 16271, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- { 16300, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- { 16329, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- { 16357, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- { 16385, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- { 16413, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- { 16441, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- { 16469, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- { 16497, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
- { 16525, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- { 16553, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- { 16581, 0x00000D10 }, /* GL_MAP_COLOR */
- { 16594, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
- { 16620, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
- { 16649, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
- { 16677, 0x00000001 }, /* GL_MAP_READ_BIT */
- { 16693, 0x00000D11 }, /* GL_MAP_STENCIL */
- { 16708, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
- { 16734, 0x00000002 }, /* GL_MAP_WRITE_BIT */
- { 16751, 0x000088C0 }, /* GL_MATRIX0_ARB */
- { 16766, 0x00008630 }, /* GL_MATRIX0_NV */
- { 16780, 0x000088CA }, /* GL_MATRIX10_ARB */
- { 16796, 0x000088CB }, /* GL_MATRIX11_ARB */
- { 16812, 0x000088CC }, /* GL_MATRIX12_ARB */
- { 16828, 0x000088CD }, /* GL_MATRIX13_ARB */
- { 16844, 0x000088CE }, /* GL_MATRIX14_ARB */
- { 16860, 0x000088CF }, /* GL_MATRIX15_ARB */
- { 16876, 0x000088D0 }, /* GL_MATRIX16_ARB */
- { 16892, 0x000088D1 }, /* GL_MATRIX17_ARB */
- { 16908, 0x000088D2 }, /* GL_MATRIX18_ARB */
- { 16924, 0x000088D3 }, /* GL_MATRIX19_ARB */
- { 16940, 0x000088C1 }, /* GL_MATRIX1_ARB */
- { 16955, 0x00008631 }, /* GL_MATRIX1_NV */
- { 16969, 0x000088D4 }, /* GL_MATRIX20_ARB */
- { 16985, 0x000088D5 }, /* GL_MATRIX21_ARB */
- { 17001, 0x000088D6 }, /* GL_MATRIX22_ARB */
- { 17017, 0x000088D7 }, /* GL_MATRIX23_ARB */
- { 17033, 0x000088D8 }, /* GL_MATRIX24_ARB */
- { 17049, 0x000088D9 }, /* GL_MATRIX25_ARB */
- { 17065, 0x000088DA }, /* GL_MATRIX26_ARB */
- { 17081, 0x000088DB }, /* GL_MATRIX27_ARB */
- { 17097, 0x000088DC }, /* GL_MATRIX28_ARB */
- { 17113, 0x000088DD }, /* GL_MATRIX29_ARB */
- { 17129, 0x000088C2 }, /* GL_MATRIX2_ARB */
- { 17144, 0x00008632 }, /* GL_MATRIX2_NV */
- { 17158, 0x000088DE }, /* GL_MATRIX30_ARB */
- { 17174, 0x000088DF }, /* GL_MATRIX31_ARB */
- { 17190, 0x000088C3 }, /* GL_MATRIX3_ARB */
- { 17205, 0x00008633 }, /* GL_MATRIX3_NV */
- { 17219, 0x000088C4 }, /* GL_MATRIX4_ARB */
- { 17234, 0x00008634 }, /* GL_MATRIX4_NV */
- { 17248, 0x000088C5 }, /* GL_MATRIX5_ARB */
- { 17263, 0x00008635 }, /* GL_MATRIX5_NV */
- { 17277, 0x000088C6 }, /* GL_MATRIX6_ARB */
- { 17292, 0x00008636 }, /* GL_MATRIX6_NV */
- { 17306, 0x000088C7 }, /* GL_MATRIX7_ARB */
- { 17321, 0x00008637 }, /* GL_MATRIX7_NV */
- { 17335, 0x000088C8 }, /* GL_MATRIX8_ARB */
- { 17350, 0x000088C9 }, /* GL_MATRIX9_ARB */
- { 17365, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
- { 17391, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- { 17425, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- { 17456, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- { 17489, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- { 17520, 0x00000BA0 }, /* GL_MATRIX_MODE */
- { 17535, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
- { 17557, 0x00008008 }, /* GL_MAX */
- { 17564, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
- { 17587, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- { 17619, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
- { 17645, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- { 17678, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- { 17704, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 17738, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
- { 17757, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
- { 17786, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- { 17818, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 17854, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- { 17890, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
- { 17930, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
- { 17956, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
- { 17986, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
- { 18011, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
- { 18040, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- { 18069, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
- { 18102, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
- { 18122, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
- { 18146, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
- { 18170, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
- { 18194, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
- { 18219, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
- { 18237, 0x00008008 }, /* GL_MAX_EXT */
- { 18248, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- { 18283, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
- { 18322, 0x00000D31 }, /* GL_MAX_LIGHTS */
- { 18336, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
- { 18356, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- { 18394, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- { 18423, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
- { 18447, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
- { 18475, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
- { 18498, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 18535, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 18571, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- { 18598, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- { 18627, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- { 18661, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
- { 18697, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- { 18724, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- { 18756, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- { 18792, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- { 18821, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- { 18850, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
- { 18878, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- { 18916, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 18960, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 19003, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 19037, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 19076, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 19113, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 19151, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 19194, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 19237, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- { 19267, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- { 19298, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 19334, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 19370, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
- { 19400, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- { 19434, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
- { 19467, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
- { 19496, 0x00008D57 }, /* GL_MAX_SAMPLES */
- { 19511, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- { 19538, 0x00008504 }, /* GL_MAX_SHININESS_NV */
- { 19558, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
- { 19582, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
- { 19604, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
- { 19630, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- { 19657, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
- { 19688, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
- { 19712, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- { 19746, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
- { 19766, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
- { 19793, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
- { 19814, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
- { 19839, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
- { 19864, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
- { 19899, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
- { 19921, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
- { 19947, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
- { 19969, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- { 19995, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- { 20029, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
- { 20067, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- { 20100, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
- { 20137, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
- { 20161, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
- { 20182, 0x00008007 }, /* GL_MIN */
- { 20189, 0x0000802E }, /* GL_MINMAX */
- { 20199, 0x0000802E }, /* GL_MINMAX_EXT */
- { 20213, 0x0000802F }, /* GL_MINMAX_FORMAT */
- { 20230, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
- { 20251, 0x00008030 }, /* GL_MINMAX_SINK */
- { 20266, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
- { 20285, 0x00008007 }, /* GL_MIN_EXT */
- { 20296, 0x00008370 }, /* GL_MIRRORED_REPEAT */
- { 20315, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
- { 20338, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
- { 20361, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
- { 20381, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
- { 20401, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- { 20431, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
- { 20459, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- { 20487, 0x00001700 }, /* GL_MODELVIEW */
- { 20500, 0x00001700 }, /* GL_MODELVIEW0_ARB */
- { 20518, 0x0000872A }, /* GL_MODELVIEW10_ARB */
- { 20537, 0x0000872B }, /* GL_MODELVIEW11_ARB */
- { 20556, 0x0000872C }, /* GL_MODELVIEW12_ARB */
- { 20575, 0x0000872D }, /* GL_MODELVIEW13_ARB */
- { 20594, 0x0000872E }, /* GL_MODELVIEW14_ARB */
- { 20613, 0x0000872F }, /* GL_MODELVIEW15_ARB */
- { 20632, 0x00008730 }, /* GL_MODELVIEW16_ARB */
- { 20651, 0x00008731 }, /* GL_MODELVIEW17_ARB */
- { 20670, 0x00008732 }, /* GL_MODELVIEW18_ARB */
- { 20689, 0x00008733 }, /* GL_MODELVIEW19_ARB */
- { 20708, 0x0000850A }, /* GL_MODELVIEW1_ARB */
- { 20726, 0x00008734 }, /* GL_MODELVIEW20_ARB */
- { 20745, 0x00008735 }, /* GL_MODELVIEW21_ARB */
- { 20764, 0x00008736 }, /* GL_MODELVIEW22_ARB */
- { 20783, 0x00008737 }, /* GL_MODELVIEW23_ARB */
- { 20802, 0x00008738 }, /* GL_MODELVIEW24_ARB */
- { 20821, 0x00008739 }, /* GL_MODELVIEW25_ARB */
- { 20840, 0x0000873A }, /* GL_MODELVIEW26_ARB */
- { 20859, 0x0000873B }, /* GL_MODELVIEW27_ARB */
- { 20878, 0x0000873C }, /* GL_MODELVIEW28_ARB */
- { 20897, 0x0000873D }, /* GL_MODELVIEW29_ARB */
- { 20916, 0x00008722 }, /* GL_MODELVIEW2_ARB */
- { 20934, 0x0000873E }, /* GL_MODELVIEW30_ARB */
- { 20953, 0x0000873F }, /* GL_MODELVIEW31_ARB */
- { 20972, 0x00008723 }, /* GL_MODELVIEW3_ARB */
- { 20990, 0x00008724 }, /* GL_MODELVIEW4_ARB */
- { 21008, 0x00008725 }, /* GL_MODELVIEW5_ARB */
- { 21026, 0x00008726 }, /* GL_MODELVIEW6_ARB */
- { 21044, 0x00008727 }, /* GL_MODELVIEW7_ARB */
- { 21062, 0x00008728 }, /* GL_MODELVIEW8_ARB */
- { 21080, 0x00008729 }, /* GL_MODELVIEW9_ARB */
- { 21098, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
- { 21118, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
- { 21145, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
- { 21170, 0x00002100 }, /* GL_MODULATE */
- { 21182, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
- { 21202, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
- { 21229, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
- { 21254, 0x00000103 }, /* GL_MULT */
- { 21262, 0x0000809D }, /* GL_MULTISAMPLE */
- { 21277, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
- { 21297, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
- { 21316, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
- { 21335, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
- { 21359, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
- { 21382, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- { 21412, 0x00002A25 }, /* GL_N3F_V3F */
- { 21423, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
- { 21443, 0x0000150E }, /* GL_NAND */
- { 21451, 0x00002600 }, /* GL_NEAREST */
- { 21462, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- { 21493, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- { 21525, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
- { 21550, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
- { 21576, 0x00000200 }, /* GL_NEVER */
- { 21585, 0x00001102 }, /* GL_NICEST */
- { 21595, 0x00000000 }, /* GL_NONE */
- { 21603, 0x00001505 }, /* GL_NOOP */
- { 21611, 0x00001508 }, /* GL_NOR */
- { 21618, 0x00000BA1 }, /* GL_NORMALIZE */
- { 21631, 0x00008075 }, /* GL_NORMAL_ARRAY */
- { 21647, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- { 21678, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
- { 21713, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
- { 21737, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
- { 21760, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
- { 21781, 0x00008511 }, /* GL_NORMAL_MAP */
- { 21795, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
- { 21813, 0x00008511 }, /* GL_NORMAL_MAP_NV */
- { 21830, 0x00000205 }, /* GL_NOTEQUAL */
- { 21842, 0x00000000 }, /* GL_NO_ERROR */
- { 21854, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- { 21888, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
- { 21926, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
- { 21958, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
- { 22000, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
- { 22030, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
- { 22070, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
- { 22101, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
- { 22130, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
- { 22158, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
- { 22188, 0x00002401 }, /* GL_OBJECT_LINEAR */
- { 22205, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
- { 22231, 0x00002501 }, /* GL_OBJECT_PLANE */
- { 22247, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
- { 22282, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
- { 22304, 0x00009112 }, /* GL_OBJECT_TYPE */
- { 22319, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
- { 22338, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
- { 22368, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
- { 22389, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
- { 22417, 0x00000001 }, /* GL_ONE */
- { 22424, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- { 22452, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
- { 22484, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
- { 22512, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
- { 22544, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
- { 22567, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
- { 22590, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
- { 22613, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
- { 22636, 0x00008598 }, /* GL_OPERAND0_ALPHA */
- { 22654, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
- { 22676, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
- { 22698, 0x00008590 }, /* GL_OPERAND0_RGB */
- { 22714, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
- { 22734, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
- { 22754, 0x00008599 }, /* GL_OPERAND1_ALPHA */
- { 22772, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
- { 22794, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
- { 22816, 0x00008591 }, /* GL_OPERAND1_RGB */
- { 22832, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
- { 22852, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
- { 22872, 0x0000859A }, /* GL_OPERAND2_ALPHA */
- { 22890, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
- { 22912, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
- { 22934, 0x00008592 }, /* GL_OPERAND2_RGB */
- { 22950, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
- { 22970, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
- { 22990, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
- { 23011, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
- { 23030, 0x00001507 }, /* GL_OR */
- { 23036, 0x00000A01 }, /* GL_ORDER */
- { 23045, 0x0000150D }, /* GL_OR_INVERTED */
- { 23060, 0x0000150B }, /* GL_OR_REVERSE */
- { 23074, 0x00000505 }, /* GL_OUT_OF_MEMORY */
- { 23091, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
- { 23109, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
- { 23130, 0x00008758 }, /* GL_PACK_INVERT_MESA */
- { 23150, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
- { 23168, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
- { 23187, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
- { 23207, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
- { 23227, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
- { 23245, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
- { 23264, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
- { 23289, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
- { 23313, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
- { 23334, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
- { 23356, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
- { 23378, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
- { 23403, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
- { 23427, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
- { 23448, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
- { 23470, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
- { 23492, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
- { 23514, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
- { 23545, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
- { 23565, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- { 23590, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
- { 23610, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- { 23635, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
- { 23655, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- { 23680, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
- { 23700, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- { 23725, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
- { 23745, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- { 23770, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
- { 23790, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- { 23815, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
- { 23835, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- { 23860, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
- { 23880, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- { 23905, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
- { 23925, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- { 23950, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
- { 23970, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- { 23995, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
- { 24013, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
- { 24034, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
- { 24063, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
- { 24096, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
- { 24121, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
- { 24144, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- { 24175, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
- { 24210, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
- { 24237, 0x00001B00 }, /* GL_POINT */
- { 24246, 0x00000000 }, /* GL_POINTS */
- { 24256, 0x00000002 }, /* GL_POINT_BIT */
- { 24269, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
- { 24299, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
- { 24333, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
- { 24367, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
- { 24402, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
- { 24431, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
- { 24464, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
- { 24497, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
- { 24531, 0x00000B11 }, /* GL_POINT_SIZE */
- { 24545, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
- { 24571, 0x00008127 }, /* GL_POINT_SIZE_MAX */
- { 24589, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
- { 24611, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
- { 24633, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
- { 24656, 0x00008126 }, /* GL_POINT_SIZE_MIN */
- { 24674, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
- { 24696, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
- { 24718, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
- { 24741, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
- { 24761, 0x00000B10 }, /* GL_POINT_SMOOTH */
- { 24777, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
- { 24798, 0x00008861 }, /* GL_POINT_SPRITE */
- { 24814, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
- { 24834, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
- { 24863, 0x00008861 }, /* GL_POINT_SPRITE_NV */
- { 24882, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
- { 24908, 0x00000701 }, /* GL_POINT_TOKEN */
- { 24923, 0x00000009 }, /* GL_POLYGON */
- { 24934, 0x00000008 }, /* GL_POLYGON_BIT */
- { 24949, 0x00000B40 }, /* GL_POLYGON_MODE */
- { 24965, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
- { 24988, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
- { 25013, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
- { 25036, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
- { 25059, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
- { 25083, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
- { 25107, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
- { 25125, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
- { 25148, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
- { 25167, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
- { 25190, 0x00000703 }, /* GL_POLYGON_TOKEN */
- { 25207, 0x00001203 }, /* GL_POSITION */
- { 25219, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- { 25251, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
- { 25287, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- { 25320, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
- { 25357, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- { 25388, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
- { 25423, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- { 25455, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
- { 25491, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- { 25524, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- { 25556, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
- { 25592, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- { 25625, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
- { 25662, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- { 25692, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
- { 25726, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- { 25757, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
- { 25792, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- { 25823, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
- { 25858, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- { 25890, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
- { 25926, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- { 25956, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
- { 25990, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- { 26021, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
- { 26056, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- { 26088, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- { 26119, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
- { 26154, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- { 26186, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
- { 26222, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
- { 26251, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
- { 26284, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
- { 26314, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
- { 26348, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- { 26387, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- { 26420, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- { 26460, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- { 26494, 0x00008578 }, /* GL_PREVIOUS */
- { 26506, 0x00008578 }, /* GL_PREVIOUS_ARB */
- { 26522, 0x00008578 }, /* GL_PREVIOUS_EXT */
- { 26538, 0x00008577 }, /* GL_PRIMARY_COLOR */
- { 26555, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
- { 26576, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
- { 26597, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 26630, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 26662, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
- { 26685, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
- { 26708, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
- { 26738, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
- { 26767, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
- { 26795, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
- { 26817, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- { 26845, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- { 26873, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
- { 26895, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
- { 26916, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 26956, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 26995, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 27025, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 27060, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 27093, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 27127, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 27166, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 27205, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
- { 27227, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
- { 27253, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
- { 27277, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
- { 27300, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
- { 27322, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
- { 27343, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
- { 27364, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
- { 27391, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 27423, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 27455, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- { 27490, 0x00001701 }, /* GL_PROJECTION */
- { 27504, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
- { 27525, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
- { 27551, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
- { 27571, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
- { 27595, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
- { 27616, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
- { 27635, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
- { 27658, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- { 27697, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- { 27735, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
- { 27755, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- { 27785, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
- { 27809, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
- { 27829, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- { 27859, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
- { 27883, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
- { 27903, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- { 27936, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
- { 27962, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
- { 27992, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- { 28023, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
- { 28053, 0x00002003 }, /* GL_Q */
- { 28058, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
- { 28083, 0x00000007 }, /* GL_QUADS */
- { 28092, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- { 28136, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
- { 28184, 0x00008614 }, /* GL_QUAD_MESH_SUN */
- { 28201, 0x00000008 }, /* GL_QUAD_STRIP */
- { 28215, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
- { 28237, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
- { 28263, 0x00008866 }, /* GL_QUERY_RESULT */
- { 28279, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
- { 28299, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
- { 28325, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
- { 28355, 0x00002002 }, /* GL_R */
- { 28360, 0x00002A10 }, /* GL_R3_G3_B2 */
- { 28372, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- { 28405, 0x00000C02 }, /* GL_READ_BUFFER */
- { 28420, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
- { 28440, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- { 28472, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
- { 28496, 0x000088B8 }, /* GL_READ_ONLY */
- { 28509, 0x000088B8 }, /* GL_READ_ONLY_ARB */
- { 28526, 0x000088BA }, /* GL_READ_WRITE */
- { 28540, 0x000088BA }, /* GL_READ_WRITE_ARB */
- { 28558, 0x00001903 }, /* GL_RED */
- { 28565, 0x00008016 }, /* GL_REDUCE */
- { 28575, 0x00008016 }, /* GL_REDUCE_EXT */
- { 28589, 0x00000D15 }, /* GL_RED_BIAS */
- { 28601, 0x00000D52 }, /* GL_RED_BITS */
- { 28613, 0x00000D14 }, /* GL_RED_SCALE */
- { 28626, 0x00008512 }, /* GL_REFLECTION_MAP */
- { 28644, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
- { 28666, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
- { 28687, 0x00001C00 }, /* GL_RENDER */
- { 28697, 0x00008D41 }, /* GL_RENDERBUFFER */
- { 28713, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
- { 28740, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
- { 28768, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
- { 28794, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
- { 28821, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
- { 28841, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
- { 28868, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
- { 28891, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
- { 28918, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- { 28950, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
- { 28986, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
- { 29011, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
- { 29035, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
- { 29064, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
- { 29086, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
- { 29112, 0x00001F01 }, /* GL_RENDERER */
- { 29124, 0x00000C40 }, /* GL_RENDER_MODE */
- { 29139, 0x00002901 }, /* GL_REPEAT */
- { 29149, 0x00001E01 }, /* GL_REPLACE */
- { 29160, 0x00008062 }, /* GL_REPLACE_EXT */
- { 29175, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
- { 29198, 0x0000803A }, /* GL_RESCALE_NORMAL */
- { 29216, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
- { 29238, 0x00000102 }, /* GL_RETURN */
- { 29248, 0x00001907 }, /* GL_RGB */
- { 29255, 0x00008052 }, /* GL_RGB10 */
- { 29264, 0x00008059 }, /* GL_RGB10_A2 */
- { 29276, 0x00008059 }, /* GL_RGB10_A2_EXT */
- { 29292, 0x00008052 }, /* GL_RGB10_EXT */
- { 29305, 0x00008053 }, /* GL_RGB12 */
- { 29314, 0x00008053 }, /* GL_RGB12_EXT */
- { 29327, 0x00008054 }, /* GL_RGB16 */
- { 29336, 0x00008054 }, /* GL_RGB16_EXT */
- { 29349, 0x0000804E }, /* GL_RGB2_EXT */
- { 29361, 0x0000804F }, /* GL_RGB4 */
- { 29369, 0x0000804F }, /* GL_RGB4_EXT */
- { 29381, 0x000083A1 }, /* GL_RGB4_S3TC */
- { 29394, 0x00008050 }, /* GL_RGB5 */
- { 29402, 0x00008057 }, /* GL_RGB5_A1 */
- { 29413, 0x00008057 }, /* GL_RGB5_A1_EXT */
- { 29428, 0x00008050 }, /* GL_RGB5_EXT */
- { 29440, 0x00008051 }, /* GL_RGB8 */
- { 29448, 0x00008051 }, /* GL_RGB8_EXT */
- { 29460, 0x00001908 }, /* GL_RGBA */
- { 29468, 0x0000805A }, /* GL_RGBA12 */
- { 29478, 0x0000805A }, /* GL_RGBA12_EXT */
- { 29492, 0x0000805B }, /* GL_RGBA16 */
- { 29502, 0x0000805B }, /* GL_RGBA16_EXT */
- { 29516, 0x00008055 }, /* GL_RGBA2 */
- { 29525, 0x00008055 }, /* GL_RGBA2_EXT */
- { 29538, 0x00008056 }, /* GL_RGBA4 */
- { 29547, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
- { 29566, 0x00008056 }, /* GL_RGBA4_EXT */
- { 29579, 0x000083A3 }, /* GL_RGBA4_S3TC */
- { 29593, 0x00008058 }, /* GL_RGBA8 */
- { 29602, 0x00008058 }, /* GL_RGBA8_EXT */
- { 29615, 0x00008F97 }, /* GL_RGBA8_SNORM */
- { 29630, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
- { 29648, 0x00000C31 }, /* GL_RGBA_MODE */
- { 29661, 0x000083A2 }, /* GL_RGBA_S3TC */
- { 29674, 0x00008F93 }, /* GL_RGBA_SNORM */
- { 29688, 0x000083A0 }, /* GL_RGB_S3TC */
- { 29700, 0x00008573 }, /* GL_RGB_SCALE */
- { 29713, 0x00008573 }, /* GL_RGB_SCALE_ARB */
- { 29730, 0x00008573 }, /* GL_RGB_SCALE_EXT */
- { 29747, 0x00000407 }, /* GL_RIGHT */
- { 29756, 0x00002000 }, /* GL_S */
- { 29761, 0x00008B5D }, /* GL_SAMPLER_1D */
- { 29775, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
- { 29796, 0x00008B5E }, /* GL_SAMPLER_2D */
- { 29810, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
- { 29831, 0x00008B5F }, /* GL_SAMPLER_3D */
- { 29845, 0x00008B60 }, /* GL_SAMPLER_CUBE */
- { 29861, 0x000080A9 }, /* GL_SAMPLES */
- { 29872, 0x000086B4 }, /* GL_SAMPLES_3DFX */
- { 29888, 0x000080A9 }, /* GL_SAMPLES_ARB */
- { 29903, 0x00008914 }, /* GL_SAMPLES_PASSED */
- { 29921, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
- { 29943, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- { 29971, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
- { 30003, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
- { 30026, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
- { 30053, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
- { 30071, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
- { 30094, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
- { 30116, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
- { 30135, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
- { 30158, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
- { 30184, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
- { 30214, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
- { 30239, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
- { 30268, 0x00080000 }, /* GL_SCISSOR_BIT */
- { 30283, 0x00000C10 }, /* GL_SCISSOR_BOX */
- { 30298, 0x00000C11 }, /* GL_SCISSOR_TEST */
- { 30314, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
- { 30339, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- { 30379, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 30423, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- { 30456, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- { 30486, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- { 30518, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- { 30548, 0x00001C02 }, /* GL_SELECT */
- { 30558, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
- { 30586, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
- { 30611, 0x00008012 }, /* GL_SEPARABLE_2D */
- { 30627, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
- { 30654, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
- { 30685, 0x0000150F }, /* GL_SET */
- { 30692, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
- { 30713, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
- { 30737, 0x00008B4F }, /* GL_SHADER_TYPE */
- { 30752, 0x00000B54 }, /* GL_SHADE_MODEL */
- { 30767, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
- { 30795, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
- { 30818, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- { 30848, 0x00001601 }, /* GL_SHININESS */
- { 30861, 0x00001402 }, /* GL_SHORT */
- { 30870, 0x00009119 }, /* GL_SIGNALED */
- { 30882, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
- { 30903, 0x000081F9 }, /* GL_SINGLE_COLOR */
- { 30919, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
- { 30939, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
- { 30958, 0x00008C46 }, /* GL_SLUMINANCE */
- { 30972, 0x00008C47 }, /* GL_SLUMINANCE8 */
- { 30987, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
- { 31009, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
- { 31029, 0x00001D01 }, /* GL_SMOOTH */
- { 31039, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
- { 31072, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
- { 31099, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
- { 31132, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
- { 31159, 0x00008588 }, /* GL_SOURCE0_ALPHA */
- { 31176, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
- { 31197, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
- { 31218, 0x00008580 }, /* GL_SOURCE0_RGB */
- { 31233, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
- { 31252, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
- { 31271, 0x00008589 }, /* GL_SOURCE1_ALPHA */
- { 31288, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
- { 31309, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
- { 31330, 0x00008581 }, /* GL_SOURCE1_RGB */
- { 31345, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
- { 31364, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
- { 31383, 0x0000858A }, /* GL_SOURCE2_ALPHA */
- { 31400, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
- { 31421, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
- { 31442, 0x00008582 }, /* GL_SOURCE2_RGB */
- { 31457, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
- { 31476, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
- { 31495, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
- { 31515, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
- { 31533, 0x00001202 }, /* GL_SPECULAR */
- { 31545, 0x00002402 }, /* GL_SPHERE_MAP */
- { 31559, 0x00001206 }, /* GL_SPOT_CUTOFF */
- { 31574, 0x00001204 }, /* GL_SPOT_DIRECTION */
- { 31592, 0x00001205 }, /* GL_SPOT_EXPONENT */
- { 31609, 0x00008588 }, /* GL_SRC0_ALPHA */
- { 31623, 0x00008580 }, /* GL_SRC0_RGB */
- { 31635, 0x00008589 }, /* GL_SRC1_ALPHA */
- { 31649, 0x00008581 }, /* GL_SRC1_RGB */
- { 31661, 0x0000858A }, /* GL_SRC2_ALPHA */
- { 31675, 0x00008582 }, /* GL_SRC2_RGB */
- { 31687, 0x00000302 }, /* GL_SRC_ALPHA */
- { 31700, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
- { 31722, 0x00000300 }, /* GL_SRC_COLOR */
- { 31735, 0x00008C40 }, /* GL_SRGB */
- { 31743, 0x00008C41 }, /* GL_SRGB8 */
- { 31752, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
- { 31768, 0x00008C42 }, /* GL_SRGB_ALPHA */
- { 31782, 0x00000503 }, /* GL_STACK_OVERFLOW */
- { 31800, 0x00000504 }, /* GL_STACK_UNDERFLOW */
- { 31819, 0x000088E6 }, /* GL_STATIC_COPY */
- { 31834, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
- { 31853, 0x000088E4 }, /* GL_STATIC_DRAW */
- { 31868, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
- { 31887, 0x000088E5 }, /* GL_STATIC_READ */
- { 31902, 0x000088E5 }, /* GL_STATIC_READ_ARB */
- { 31921, 0x00001802 }, /* GL_STENCIL */
- { 31932, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
- { 31954, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
- { 31980, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
- { 32001, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
- { 32026, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
- { 32047, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
- { 32072, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- { 32104, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
- { 32140, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- { 32172, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
- { 32208, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
- { 32228, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
- { 32255, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
- { 32281, 0x00000D57 }, /* GL_STENCIL_BITS */
- { 32297, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
- { 32319, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
- { 32342, 0x00000B94 }, /* GL_STENCIL_FAIL */
- { 32358, 0x00000B92 }, /* GL_STENCIL_FUNC */
- { 32374, 0x00001901 }, /* GL_STENCIL_INDEX */
- { 32391, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
- { 32414, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
- { 32436, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
- { 32458, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
- { 32480, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
- { 32501, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
- { 32528, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
- { 32555, 0x00000B97 }, /* GL_STENCIL_REF */
- { 32570, 0x00000B90 }, /* GL_STENCIL_TEST */
- { 32586, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- { 32615, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
- { 32637, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
- { 32658, 0x00000C33 }, /* GL_STEREO */
- { 32668, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
- { 32692, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
- { 32717, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
- { 32741, 0x000088E2 }, /* GL_STREAM_COPY */
- { 32756, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
- { 32775, 0x000088E0 }, /* GL_STREAM_DRAW */
- { 32790, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
- { 32809, 0x000088E1 }, /* GL_STREAM_READ */
- { 32824, 0x000088E1 }, /* GL_STREAM_READ_ARB */
- { 32843, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
- { 32860, 0x000084E7 }, /* GL_SUBTRACT */
- { 32872, 0x000084E7 }, /* GL_SUBTRACT_ARB */
- { 32888, 0x00009113 }, /* GL_SYNC_CONDITION */
- { 32906, 0x00009116 }, /* GL_SYNC_FENCE */
- { 32920, 0x00009115 }, /* GL_SYNC_FLAGS */
- { 32934, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
- { 32961, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- { 32991, 0x00009114 }, /* GL_SYNC_STATUS */
- { 33006, 0x00002001 }, /* GL_T */
- { 33011, 0x00002A2A }, /* GL_T2F_C3F_V3F */
- { 33026, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
- { 33045, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
- { 33061, 0x00002A2B }, /* GL_T2F_N3F_V3F */
- { 33076, 0x00002A27 }, /* GL_T2F_V3F */
- { 33087, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
- { 33106, 0x00002A28 }, /* GL_T4F_V4F */
- { 33117, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
- { 33140, 0x00001702 }, /* GL_TEXTURE */
- { 33151, 0x000084C0 }, /* GL_TEXTURE0 */
- { 33163, 0x000084C0 }, /* GL_TEXTURE0_ARB */
- { 33179, 0x000084C1 }, /* GL_TEXTURE1 */
- { 33191, 0x000084CA }, /* GL_TEXTURE10 */
- { 33204, 0x000084CA }, /* GL_TEXTURE10_ARB */
- { 33221, 0x000084CB }, /* GL_TEXTURE11 */
- { 33234, 0x000084CB }, /* GL_TEXTURE11_ARB */
- { 33251, 0x000084CC }, /* GL_TEXTURE12 */
- { 33264, 0x000084CC }, /* GL_TEXTURE12_ARB */
- { 33281, 0x000084CD }, /* GL_TEXTURE13 */
- { 33294, 0x000084CD }, /* GL_TEXTURE13_ARB */
- { 33311, 0x000084CE }, /* GL_TEXTURE14 */
- { 33324, 0x000084CE }, /* GL_TEXTURE14_ARB */
- { 33341, 0x000084CF }, /* GL_TEXTURE15 */
- { 33354, 0x000084CF }, /* GL_TEXTURE15_ARB */
- { 33371, 0x000084D0 }, /* GL_TEXTURE16 */
- { 33384, 0x000084D0 }, /* GL_TEXTURE16_ARB */
- { 33401, 0x000084D1 }, /* GL_TEXTURE17 */
- { 33414, 0x000084D1 }, /* GL_TEXTURE17_ARB */
- { 33431, 0x000084D2 }, /* GL_TEXTURE18 */
- { 33444, 0x000084D2 }, /* GL_TEXTURE18_ARB */
- { 33461, 0x000084D3 }, /* GL_TEXTURE19 */
- { 33474, 0x000084D3 }, /* GL_TEXTURE19_ARB */
- { 33491, 0x000084C1 }, /* GL_TEXTURE1_ARB */
- { 33507, 0x000084C2 }, /* GL_TEXTURE2 */
- { 33519, 0x000084D4 }, /* GL_TEXTURE20 */
- { 33532, 0x000084D4 }, /* GL_TEXTURE20_ARB */
- { 33549, 0x000084D5 }, /* GL_TEXTURE21 */
- { 33562, 0x000084D5 }, /* GL_TEXTURE21_ARB */
- { 33579, 0x000084D6 }, /* GL_TEXTURE22 */
- { 33592, 0x000084D6 }, /* GL_TEXTURE22_ARB */
- { 33609, 0x000084D7 }, /* GL_TEXTURE23 */
- { 33622, 0x000084D7 }, /* GL_TEXTURE23_ARB */
- { 33639, 0x000084D8 }, /* GL_TEXTURE24 */
- { 33652, 0x000084D8 }, /* GL_TEXTURE24_ARB */
- { 33669, 0x000084D9 }, /* GL_TEXTURE25 */
- { 33682, 0x000084D9 }, /* GL_TEXTURE25_ARB */
- { 33699, 0x000084DA }, /* GL_TEXTURE26 */
- { 33712, 0x000084DA }, /* GL_TEXTURE26_ARB */
- { 33729, 0x000084DB }, /* GL_TEXTURE27 */
- { 33742, 0x000084DB }, /* GL_TEXTURE27_ARB */
- { 33759, 0x000084DC }, /* GL_TEXTURE28 */
- { 33772, 0x000084DC }, /* GL_TEXTURE28_ARB */
- { 33789, 0x000084DD }, /* GL_TEXTURE29 */
- { 33802, 0x000084DD }, /* GL_TEXTURE29_ARB */
- { 33819, 0x000084C2 }, /* GL_TEXTURE2_ARB */
- { 33835, 0x000084C3 }, /* GL_TEXTURE3 */
- { 33847, 0x000084DE }, /* GL_TEXTURE30 */
- { 33860, 0x000084DE }, /* GL_TEXTURE30_ARB */
- { 33877, 0x000084DF }, /* GL_TEXTURE31 */
- { 33890, 0x000084DF }, /* GL_TEXTURE31_ARB */
- { 33907, 0x000084C3 }, /* GL_TEXTURE3_ARB */
- { 33923, 0x000084C4 }, /* GL_TEXTURE4 */
- { 33935, 0x000084C4 }, /* GL_TEXTURE4_ARB */
- { 33951, 0x000084C5 }, /* GL_TEXTURE5 */
- { 33963, 0x000084C5 }, /* GL_TEXTURE5_ARB */
- { 33979, 0x000084C6 }, /* GL_TEXTURE6 */
- { 33991, 0x000084C6 }, /* GL_TEXTURE6_ARB */
- { 34007, 0x000084C7 }, /* GL_TEXTURE7 */
- { 34019, 0x000084C7 }, /* GL_TEXTURE7_ARB */
- { 34035, 0x000084C8 }, /* GL_TEXTURE8 */
- { 34047, 0x000084C8 }, /* GL_TEXTURE8_ARB */
- { 34063, 0x000084C9 }, /* GL_TEXTURE9 */
- { 34075, 0x000084C9 }, /* GL_TEXTURE9_ARB */
- { 34091, 0x00000DE0 }, /* GL_TEXTURE_1D */
- { 34105, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
- { 34129, 0x00000DE1 }, /* GL_TEXTURE_2D */
- { 34143, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
- { 34167, 0x0000806F }, /* GL_TEXTURE_3D */
- { 34181, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
- { 34203, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
- { 34229, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
- { 34251, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
- { 34273, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- { 34305, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
- { 34327, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- { 34359, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
- { 34381, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
- { 34409, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
- { 34441, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- { 34474, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
- { 34506, 0x00040000 }, /* GL_TEXTURE_BIT */
- { 34521, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
- { 34542, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
- { 34567, 0x00001005 }, /* GL_TEXTURE_BORDER */
- { 34585, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
- { 34609, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- { 34640, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- { 34670, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- { 34700, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- { 34735, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- { 34766, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 34804, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
- { 34831, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- { 34863, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- { 34897, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
- { 34921, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
- { 34949, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
- { 34973, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
- { 35001, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- { 35034, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
- { 35058, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
- { 35080, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
- { 35102, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
- { 35128, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
- { 35162, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- { 35195, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
- { 35232, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
- { 35260, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
- { 35292, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
- { 35315, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- { 35353, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
- { 35395, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- { 35426, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- { 35454, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- { 35484, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- { 35512, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
- { 35532, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
- { 35556, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- { 35587, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
- { 35622, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- { 35653, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
- { 35688, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- { 35719, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
- { 35754, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- { 35785, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
- { 35820, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- { 35851, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
- { 35886, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- { 35917, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
- { 35952, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- { 35981, 0x00008071 }, /* GL_TEXTURE_DEPTH */
- { 35998, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
- { 36020, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
- { 36046, 0x00002300 }, /* GL_TEXTURE_ENV */
- { 36061, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
- { 36082, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
- { 36102, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
- { 36128, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
- { 36148, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
- { 36165, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
- { 36182, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
- { 36199, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
- { 36216, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
- { 36241, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
- { 36263, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
- { 36289, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
- { 36307, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
- { 36333, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
- { 36359, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
- { 36389, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
- { 36416, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
- { 36441, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
- { 36461, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
- { 36485, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- { 36512, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- { 36539, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- { 36566, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
- { 36592, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
- { 36622, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
- { 36644, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
- { 36662, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- { 36692, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- { 36720, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- { 36748, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- { 36776, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
- { 36797, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
- { 36816, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
- { 36838, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
- { 36857, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
- { 36877, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- { 36907, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- { 36938, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
- { 36963, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
- { 36987, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
- { 37007, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
- { 37031, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
- { 37051, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
- { 37074, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
- { 37098, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- { 37128, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
- { 37153, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- { 37187, 0x00001000 }, /* GL_TEXTURE_WIDTH */
- { 37204, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
- { 37222, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
- { 37240, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
- { 37258, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
- { 37277, 0xFFFFFFFFFFFFFFFF }, /* GL_TIMEOUT_IGNORED */
- { 37296, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 37316, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 37335, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 37364, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 37381, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 37407, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 37437, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 37469, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 37499, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 37533, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 37549, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 37580, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 37615, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 37643, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 37675, 0x00000004 }, /* GL_TRIANGLES */
- { 37688, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 37704, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 37725, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 37743, 0x00000001 }, /* GL_TRUE */
- { 37751, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 37771, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 37794, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 37814, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 37835, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 37857, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 37879, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 37899, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 37920, 0x00009118 }, /* GL_UNSIGNALED */
- { 37934, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 37951, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 37978, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 38001, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 38017, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 38044, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
- { 38065, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 38089, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 38120, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 38144, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 38172, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
- { 38195, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 38213, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 38243, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 38269, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 38299, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 38325, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 38349, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 38377, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 38405, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 38432, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 38464, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 38495, 0x00008CA2 }, /* GL_UPPER_LEFT */
- { 38509, 0x00002A20 }, /* GL_V2F */
- { 38516, 0x00002A21 }, /* GL_V3F */
- { 38523, 0x00008B83 }, /* GL_VALIDATE_STATUS */
- { 38542, 0x00001F00 }, /* GL_VENDOR */
- { 38552, 0x00001F02 }, /* GL_VERSION */
- { 38563, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 38579, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
- { 38603, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 38633, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 38664, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 38699, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 38723, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 38744, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 38767, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 38788, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 38815, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 38843, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 38871, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 38899, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 38927, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 38955, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 38983, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 39010, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 39037, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 39064, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 39091, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 39118, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 39145, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 39172, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 39199, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 39226, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 39264, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 39306, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 39337, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 39372, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 39406, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 39444, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 39475, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 39510, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 39538, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 39570, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 39600, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 39634, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 39662, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 39694, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 39714, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 39736, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 39765, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 39786, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 39815, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 39848, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 39880, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 39907, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 39938, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 39968, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 39985, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 40006, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 40033, 0x00000BA2 }, /* GL_VIEWPORT */
- { 40045, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 40061, 0x0000911D }, /* GL_WAIT_FAILED */
- { 40076, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 40096, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 40127, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 40162, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 40190, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 40215, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 40242, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 40267, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 40291, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 40310, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 40324, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 40342, 0x00001506 }, /* GL_XOR */
- { 40349, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 40368, 0x00008757 }, /* GL_YCBCR_MESA */
- { 40382, 0x00000000 }, /* GL_ZERO */
- { 40390, 0x00000D16 }, /* GL_ZOOM_X */
- { 40400, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 7190, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
+ { 7214, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
+ { 7234, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
+ { 7258, 0x00000D1F }, /* GL_DEPTH_BIAS */
+ { 7272, 0x00000D56 }, /* GL_DEPTH_BITS */
+ { 7286, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
+ { 7306, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ { 7331, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
+ { 7351, 0x0000864F }, /* GL_DEPTH_CLAMP */
+ { 7366, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
+ { 7384, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
+ { 7405, 0x00001902 }, /* GL_DEPTH_COMPONENT */
+ { 7424, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
+ { 7445, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
+ { 7470, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
+ { 7496, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
+ { 7517, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
+ { 7542, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
+ { 7568, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
+ { 7589, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
+ { 7614, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
+ { 7640, 0x00000B74 }, /* GL_DEPTH_FUNC */
+ { 7654, 0x00000B70 }, /* GL_DEPTH_RANGE */
+ { 7669, 0x00000D1E }, /* GL_DEPTH_SCALE */
+ { 7684, 0x000084F9 }, /* GL_DEPTH_STENCIL */
+ { 7701, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ { 7729, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
+ { 7750, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
+ { 7770, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ { 7798, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ { 7826, 0x00000B71 }, /* GL_DEPTH_TEST */
+ { 7840, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
+ { 7862, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
+ { 7888, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
+ { 7907, 0x00001201 }, /* GL_DIFFUSE */
+ { 7918, 0x00000BD0 }, /* GL_DITHER */
+ { 7928, 0x00000A02 }, /* GL_DOMAIN */
+ { 7938, 0x00001100 }, /* GL_DONT_CARE */
+ { 7951, 0x000086AE }, /* GL_DOT3_RGB */
+ { 7963, 0x000086AF }, /* GL_DOT3_RGBA */
+ { 7976, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
+ { 7993, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
+ { 8010, 0x000086AE }, /* GL_DOT3_RGB_ARB */
+ { 8026, 0x00008740 }, /* GL_DOT3_RGB_EXT */
+ { 8042, 0x0000140A }, /* GL_DOUBLE */
+ { 8052, 0x00000C32 }, /* GL_DOUBLEBUFFER */
+ { 8068, 0x00000C01 }, /* GL_DRAW_BUFFER */
+ { 8083, 0x00008825 }, /* GL_DRAW_BUFFER0 */
+ { 8099, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
+ { 8119, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
+ { 8139, 0x00008826 }, /* GL_DRAW_BUFFER1 */
+ { 8155, 0x0000882F }, /* GL_DRAW_BUFFER10 */
+ { 8172, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
+ { 8193, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
+ { 8214, 0x00008830 }, /* GL_DRAW_BUFFER11 */
+ { 8231, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
+ { 8252, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
+ { 8273, 0x00008831 }, /* GL_DRAW_BUFFER12 */
+ { 8290, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
+ { 8311, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
+ { 8332, 0x00008832 }, /* GL_DRAW_BUFFER13 */
+ { 8349, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
+ { 8370, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
+ { 8391, 0x00008833 }, /* GL_DRAW_BUFFER14 */
+ { 8408, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
+ { 8429, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
+ { 8450, 0x00008834 }, /* GL_DRAW_BUFFER15 */
+ { 8467, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
+ { 8488, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
+ { 8509, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
+ { 8529, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
+ { 8549, 0x00008827 }, /* GL_DRAW_BUFFER2 */
+ { 8565, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
+ { 8585, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
+ { 8605, 0x00008828 }, /* GL_DRAW_BUFFER3 */
+ { 8621, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
+ { 8641, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
+ { 8661, 0x00008829 }, /* GL_DRAW_BUFFER4 */
+ { 8677, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
+ { 8697, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
+ { 8717, 0x0000882A }, /* GL_DRAW_BUFFER5 */
+ { 8733, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
+ { 8753, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
+ { 8773, 0x0000882B }, /* GL_DRAW_BUFFER6 */
+ { 8789, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
+ { 8809, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
+ { 8829, 0x0000882C }, /* GL_DRAW_BUFFER7 */
+ { 8845, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
+ { 8865, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
+ { 8885, 0x0000882D }, /* GL_DRAW_BUFFER8 */
+ { 8901, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
+ { 8921, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
+ { 8941, 0x0000882E }, /* GL_DRAW_BUFFER9 */
+ { 8957, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
+ { 8977, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
+ { 8997, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
+ { 9017, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ { 9045, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+ { 9077, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
+ { 9101, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
+ { 9121, 0x00000304 }, /* GL_DST_ALPHA */
+ { 9134, 0x00000306 }, /* GL_DST_COLOR */
+ { 9147, 0x0000877A }, /* GL_DU8DV8_ATI */
+ { 9161, 0x00008779 }, /* GL_DUDV_ATI */
+ { 9173, 0x000088EA }, /* GL_DYNAMIC_COPY */
+ { 9189, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
+ { 9209, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
+ { 9225, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
+ { 9245, 0x000088E9 }, /* GL_DYNAMIC_READ */
+ { 9261, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
+ { 9281, 0x00000B43 }, /* GL_EDGE_FLAG */
+ { 9294, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
+ { 9313, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ { 9347, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
+ { 9385, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ { 9412, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ { 9438, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
+ { 9462, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ { 9494, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
+ { 9530, 0x00001600 }, /* GL_EMISSION */
+ { 9542, 0x00002000 }, /* GL_ENABLE_BIT */
+ { 9556, 0x00000202 }, /* GL_EQUAL */
+ { 9565, 0x00001509 }, /* GL_EQUIV */
+ { 9574, 0x00010000 }, /* GL_EVAL_BIT */
+ { 9586, 0x00000800 }, /* GL_EXP */
+ { 9593, 0x00000801 }, /* GL_EXP2 */
+ { 9601, 0x00001F03 }, /* GL_EXTENSIONS */
+ { 9615, 0x00002400 }, /* GL_EYE_LINEAR */
+ { 9629, 0x00002502 }, /* GL_EYE_PLANE */
+ { 9642, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ { 9667, 0x0000855B }, /* GL_EYE_RADIAL_NV */
+ { 9684, 0x00000000 }, /* GL_FALSE */
+ { 9693, 0x00001101 }, /* GL_FASTEST */
+ { 9704, 0x00001C01 }, /* GL_FEEDBACK */
+ { 9716, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
+ { 9743, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
+ { 9767, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
+ { 9791, 0x00001B02 }, /* GL_FILL */
+ { 9799, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
+ { 9826, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
+ { 9857, 0x00001D00 }, /* GL_FLAT */
+ { 9865, 0x00001406 }, /* GL_FLOAT */
+ { 9874, 0x00008B5A }, /* GL_FLOAT_MAT2 */
+ { 9888, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
+ { 9906, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
+ { 9922, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
+ { 9938, 0x00008B5B }, /* GL_FLOAT_MAT3 */
+ { 9952, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
+ { 9970, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
+ { 9986, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
+ { 10002, 0x00008B5C }, /* GL_FLOAT_MAT4 */
+ { 10016, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
+ { 10034, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
+ { 10050, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
+ { 10066, 0x00008B50 }, /* GL_FLOAT_VEC2 */
+ { 10080, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
+ { 10098, 0x00008B51 }, /* GL_FLOAT_VEC3 */
+ { 10112, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
+ { 10130, 0x00008B52 }, /* GL_FLOAT_VEC4 */
+ { 10144, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
+ { 10162, 0x00000B60 }, /* GL_FOG */
+ { 10169, 0x00000080 }, /* GL_FOG_BIT */
+ { 10180, 0x00000B66 }, /* GL_FOG_COLOR */
+ { 10193, 0x00008451 }, /* GL_FOG_COORD */
+ { 10206, 0x00008451 }, /* GL_FOG_COORDINATE */
+ { 10224, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
+ { 10248, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ { 10287, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
+ { 10330, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ { 10362, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ { 10393, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ { 10422, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
+ { 10447, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
+ { 10466, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
+ { 10500, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
+ { 10527, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
+ { 10553, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
+ { 10577, 0x00008450 }, /* GL_FOG_COORD_SRC */
+ { 10594, 0x00000B62 }, /* GL_FOG_DENSITY */
+ { 10609, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
+ { 10633, 0x00000B64 }, /* GL_FOG_END */
+ { 10644, 0x00000C54 }, /* GL_FOG_HINT */
+ { 10656, 0x00000B61 }, /* GL_FOG_INDEX */
+ { 10669, 0x00000B65 }, /* GL_FOG_MODE */
+ { 10681, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
+ { 10700, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
+ { 10725, 0x00000B63 }, /* GL_FOG_START */
+ { 10738, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
+ { 10756, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
+ { 10780, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
+ { 10799, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
+ { 10822, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ { 10857, 0x00008D40 }, /* GL_FRAMEBUFFER */
+ { 10872, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ { 10909, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ { 10945, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ { 10986, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ { 11027, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ { 11064, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ { 11101, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ { 11139, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+ { 11181, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ { 11219, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+ { 11261, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ { 11296, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ { 11335, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+ { 11384, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ { 11432, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+ { 11484, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ { 11524, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+ { 11568, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ { 11608, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+ { 11652, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
+ { 11675, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
+ { 11702, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
+ { 11726, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+ { 11754, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
+ { 11777, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
+ { 11796, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ { 11833, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+ { 11874, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ { 11915, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ { 11953, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+ { 11995, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ { 12046, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ { 12084, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ { 12129, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+ { 12178, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ { 12216, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
+ { 12258, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ { 12296, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+ { 12338, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ { 12370, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
+ { 12395, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ { 12422, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+ { 12453, 0x00000404 }, /* GL_FRONT */
+ { 12462, 0x00000408 }, /* GL_FRONT_AND_BACK */
+ { 12480, 0x00000B46 }, /* GL_FRONT_FACE */
+ { 12494, 0x00000400 }, /* GL_FRONT_LEFT */
+ { 12508, 0x00000401 }, /* GL_FRONT_RIGHT */
+ { 12523, 0x00008006 }, /* GL_FUNC_ADD */
+ { 12535, 0x00008006 }, /* GL_FUNC_ADD_EXT */
+ { 12551, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
+ { 12576, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
+ { 12605, 0x0000800A }, /* GL_FUNC_SUBTRACT */
+ { 12622, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
+ { 12643, 0x00008191 }, /* GL_GENERATE_MIPMAP */
+ { 12662, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
+ { 12686, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
+ { 12715, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
+ { 12739, 0x00000206 }, /* GL_GEQUAL */
+ { 12749, 0x00000204 }, /* GL_GREATER */
+ { 12760, 0x00001904 }, /* GL_GREEN */
+ { 12769, 0x00000D19 }, /* GL_GREEN_BIAS */
+ { 12783, 0x00000D53 }, /* GL_GREEN_BITS */
+ { 12797, 0x00000D18 }, /* GL_GREEN_SCALE */
+ { 12812, 0x00008000 }, /* GL_HINT_BIT */
+ { 12824, 0x00008024 }, /* GL_HISTOGRAM */
+ { 12837, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+ { 12861, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+ { 12889, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+ { 12912, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+ { 12939, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+ { 12956, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+ { 12976, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+ { 13000, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+ { 13024, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+ { 13052, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ { 13080, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+ { 13112, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+ { 13134, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+ { 13160, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+ { 13178, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+ { 13200, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+ { 13219, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+ { 13242, 0x0000862A }, /* GL_IDENTITY_NV */
+ { 13257, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+ { 13277, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ { 13317, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ { 13355, 0x00001E02 }, /* GL_INCR */
+ { 13363, 0x00008507 }, /* GL_INCR_WRAP */
+ { 13376, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+ { 13393, 0x00008222 }, /* GL_INDEX */
+ { 13402, 0x00008077 }, /* GL_INDEX_ARRAY */
+ { 13417, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ { 13447, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+ { 13481, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+ { 13504, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+ { 13526, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+ { 13546, 0x00000D51 }, /* GL_INDEX_BITS */
+ { 13560, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+ { 13581, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+ { 13599, 0x00000C30 }, /* GL_INDEX_MODE */
+ { 13613, 0x00000D13 }, /* GL_INDEX_OFFSET */
+ { 13629, 0x00000D12 }, /* GL_INDEX_SHIFT */
+ { 13644, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+ { 13663, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+ { 13682, 0x00001404 }, /* GL_INT */
+ { 13689, 0x00008049 }, /* GL_INTENSITY */
+ { 13702, 0x0000804C }, /* GL_INTENSITY12 */
+ { 13717, 0x0000804C }, /* GL_INTENSITY12_EXT */
+ { 13736, 0x0000804D }, /* GL_INTENSITY16 */
+ { 13751, 0x0000804D }, /* GL_INTENSITY16_EXT */
+ { 13770, 0x0000804A }, /* GL_INTENSITY4 */
+ { 13784, 0x0000804A }, /* GL_INTENSITY4_EXT */
+ { 13802, 0x0000804B }, /* GL_INTENSITY8 */
+ { 13816, 0x0000804B }, /* GL_INTENSITY8_EXT */
+ { 13834, 0x00008049 }, /* GL_INTENSITY_EXT */
+ { 13851, 0x00008575 }, /* GL_INTERPOLATE */
+ { 13866, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+ { 13885, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+ { 13904, 0x00008B53 }, /* GL_INT_VEC2 */
+ { 13916, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+ { 13932, 0x00008B54 }, /* GL_INT_VEC3 */
+ { 13944, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+ { 13960, 0x00008B55 }, /* GL_INT_VEC4 */
+ { 13972, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+ { 13988, 0x00000500 }, /* GL_INVALID_ENUM */
+ { 14004, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ { 14037, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ { 14074, 0x00000502 }, /* GL_INVALID_OPERATION */
+ { 14095, 0x00000501 }, /* GL_INVALID_VALUE */
+ { 14112, 0x0000862B }, /* GL_INVERSE_NV */
+ { 14126, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+ { 14150, 0x0000150A }, /* GL_INVERT */
+ { 14160, 0x00001E00 }, /* GL_KEEP */
+ { 14168, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
+ { 14194, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
+ { 14224, 0x00000406 }, /* GL_LEFT */
+ { 14232, 0x00000203 }, /* GL_LEQUAL */
+ { 14242, 0x00000201 }, /* GL_LESS */
+ { 14250, 0x00004000 }, /* GL_LIGHT0 */
+ { 14260, 0x00004001 }, /* GL_LIGHT1 */
+ { 14270, 0x00004002 }, /* GL_LIGHT2 */
+ { 14280, 0x00004003 }, /* GL_LIGHT3 */
+ { 14290, 0x00004004 }, /* GL_LIGHT4 */
+ { 14300, 0x00004005 }, /* GL_LIGHT5 */
+ { 14310, 0x00004006 }, /* GL_LIGHT6 */
+ { 14320, 0x00004007 }, /* GL_LIGHT7 */
+ { 14330, 0x00000B50 }, /* GL_LIGHTING */
+ { 14342, 0x00000040 }, /* GL_LIGHTING_BIT */
+ { 14358, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+ { 14381, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ { 14410, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+ { 14443, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ { 14471, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+ { 14495, 0x00001B01 }, /* GL_LINE */
+ { 14503, 0x00002601 }, /* GL_LINEAR */
+ { 14513, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+ { 14535, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ { 14565, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ { 14596, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+ { 14620, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+ { 14645, 0x00000001 }, /* GL_LINES */
+ { 14654, 0x00000004 }, /* GL_LINE_BIT */
+ { 14666, 0x00000002 }, /* GL_LINE_LOOP */
+ { 14679, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+ { 14699, 0x00000B20 }, /* GL_LINE_SMOOTH */
+ { 14714, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+ { 14734, 0x00000B24 }, /* GL_LINE_STIPPLE */
+ { 14750, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+ { 14774, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+ { 14797, 0x00000003 }, /* GL_LINE_STRIP */
+ { 14811, 0x00000702 }, /* GL_LINE_TOKEN */
+ { 14825, 0x00000B21 }, /* GL_LINE_WIDTH */
+ { 14839, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+ { 14865, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+ { 14885, 0x00008B82 }, /* GL_LINK_STATUS */
+ { 14900, 0x00000B32 }, /* GL_LIST_BASE */
+ { 14913, 0x00020000 }, /* GL_LIST_BIT */
+ { 14925, 0x00000B33 }, /* GL_LIST_INDEX */
+ { 14939, 0x00000B30 }, /* GL_LIST_MODE */
+ { 14952, 0x00000101 }, /* GL_LOAD */
+ { 14960, 0x00000BF1 }, /* GL_LOGIC_OP */
+ { 14972, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+ { 14989, 0x00008CA1 }, /* GL_LOWER_LEFT */
+ { 15003, 0x00001909 }, /* GL_LUMINANCE */
+ { 15016, 0x00008041 }, /* GL_LUMINANCE12 */
+ { 15031, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+ { 15054, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+ { 15081, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+ { 15103, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+ { 15129, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+ { 15148, 0x00008042 }, /* GL_LUMINANCE16 */
+ { 15163, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+ { 15186, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+ { 15213, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+ { 15232, 0x0000803F }, /* GL_LUMINANCE4 */
+ { 15246, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+ { 15267, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+ { 15292, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+ { 15310, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+ { 15331, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+ { 15356, 0x00008040 }, /* GL_LUMINANCE8 */
+ { 15370, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+ { 15391, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+ { 15416, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+ { 15434, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+ { 15453, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+ { 15469, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+ { 15489, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+ { 15511, 0x00000D91 }, /* GL_MAP1_INDEX */
+ { 15525, 0x00000D92 }, /* GL_MAP1_NORMAL */
+ { 15540, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+ { 15564, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+ { 15588, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+ { 15612, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+ { 15636, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+ { 15653, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+ { 15670, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ { 15698, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ { 15727, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ { 15756, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ { 15785, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ { 15814, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ { 15843, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ { 15872, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ { 15900, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ { 15928, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ { 15956, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ { 15984, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ { 16012, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ { 16040, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ { 16068, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ { 16096, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ { 16124, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+ { 16140, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+ { 16160, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+ { 16182, 0x00000DB1 }, /* GL_MAP2_INDEX */
+ { 16196, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+ { 16211, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+ { 16235, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+ { 16259, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+ { 16283, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+ { 16307, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+ { 16324, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+ { 16341, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ { 16369, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ { 16398, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ { 16427, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ { 16456, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ { 16485, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ { 16514, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ { 16543, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ { 16571, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ { 16599, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ { 16627, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ { 16655, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ { 16683, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ { 16711, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+ { 16739, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ { 16767, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ { 16795, 0x00000D10 }, /* GL_MAP_COLOR */
+ { 16808, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
+ { 16834, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
+ { 16863, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
+ { 16891, 0x00000001 }, /* GL_MAP_READ_BIT */
+ { 16907, 0x00000D11 }, /* GL_MAP_STENCIL */
+ { 16922, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
+ { 16948, 0x00000002 }, /* GL_MAP_WRITE_BIT */
+ { 16965, 0x000088C0 }, /* GL_MATRIX0_ARB */
+ { 16980, 0x00008630 }, /* GL_MATRIX0_NV */
+ { 16994, 0x000088CA }, /* GL_MATRIX10_ARB */
+ { 17010, 0x000088CB }, /* GL_MATRIX11_ARB */
+ { 17026, 0x000088CC }, /* GL_MATRIX12_ARB */
+ { 17042, 0x000088CD }, /* GL_MATRIX13_ARB */
+ { 17058, 0x000088CE }, /* GL_MATRIX14_ARB */
+ { 17074, 0x000088CF }, /* GL_MATRIX15_ARB */
+ { 17090, 0x000088D0 }, /* GL_MATRIX16_ARB */
+ { 17106, 0x000088D1 }, /* GL_MATRIX17_ARB */
+ { 17122, 0x000088D2 }, /* GL_MATRIX18_ARB */
+ { 17138, 0x000088D3 }, /* GL_MATRIX19_ARB */
+ { 17154, 0x000088C1 }, /* GL_MATRIX1_ARB */
+ { 17169, 0x00008631 }, /* GL_MATRIX1_NV */
+ { 17183, 0x000088D4 }, /* GL_MATRIX20_ARB */
+ { 17199, 0x000088D5 }, /* GL_MATRIX21_ARB */
+ { 17215, 0x000088D6 }, /* GL_MATRIX22_ARB */
+ { 17231, 0x000088D7 }, /* GL_MATRIX23_ARB */
+ { 17247, 0x000088D8 }, /* GL_MATRIX24_ARB */
+ { 17263, 0x000088D9 }, /* GL_MATRIX25_ARB */
+ { 17279, 0x000088DA }, /* GL_MATRIX26_ARB */
+ { 17295, 0x000088DB }, /* GL_MATRIX27_ARB */
+ { 17311, 0x000088DC }, /* GL_MATRIX28_ARB */
+ { 17327, 0x000088DD }, /* GL_MATRIX29_ARB */
+ { 17343, 0x000088C2 }, /* GL_MATRIX2_ARB */
+ { 17358, 0x00008632 }, /* GL_MATRIX2_NV */
+ { 17372, 0x000088DE }, /* GL_MATRIX30_ARB */
+ { 17388, 0x000088DF }, /* GL_MATRIX31_ARB */
+ { 17404, 0x000088C3 }, /* GL_MATRIX3_ARB */
+ { 17419, 0x00008633 }, /* GL_MATRIX3_NV */
+ { 17433, 0x000088C4 }, /* GL_MATRIX4_ARB */
+ { 17448, 0x00008634 }, /* GL_MATRIX4_NV */
+ { 17462, 0x000088C5 }, /* GL_MATRIX5_ARB */
+ { 17477, 0x00008635 }, /* GL_MATRIX5_NV */
+ { 17491, 0x000088C6 }, /* GL_MATRIX6_ARB */
+ { 17506, 0x00008636 }, /* GL_MATRIX6_NV */
+ { 17520, 0x000088C7 }, /* GL_MATRIX7_ARB */
+ { 17535, 0x00008637 }, /* GL_MATRIX7_NV */
+ { 17549, 0x000088C8 }, /* GL_MATRIX8_ARB */
+ { 17564, 0x000088C9 }, /* GL_MATRIX9_ARB */
+ { 17579, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ { 17605, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ { 17639, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ { 17670, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ { 17703, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ { 17734, 0x00000BA0 }, /* GL_MATRIX_MODE */
+ { 17749, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+ { 17771, 0x00008008 }, /* GL_MAX */
+ { 17778, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+ { 17801, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ { 17833, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ { 17859, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ { 17892, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ { 17918, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 17952, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+ { 17971, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
+ { 17996, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ { 18025, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ { 18057, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 18093, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ { 18129, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+ { 18169, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+ { 18195, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+ { 18225, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+ { 18250, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+ { 18279, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ { 18308, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+ { 18341, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+ { 18361, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+ { 18385, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+ { 18409, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+ { 18433, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+ { 18458, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+ { 18476, 0x00008008 }, /* GL_MAX_EXT */
+ { 18487, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ { 18522, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+ { 18561, 0x00000D31 }, /* GL_MAX_LIGHTS */
+ { 18575, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+ { 18595, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ { 18633, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ { 18662, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+ { 18686, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+ { 18714, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+ { 18737, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 18774, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 18810, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ { 18837, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ { 18866, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ { 18900, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ { 18936, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ { 18963, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ { 18995, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ { 19031, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ { 19060, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ { 19089, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ { 19117, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ { 19155, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 19199, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 19242, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 19276, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 19315, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 19352, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 19390, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 19433, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 19476, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ { 19506, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ { 19537, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 19573, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 19609, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ { 19639, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ { 19673, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+ { 19706, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
+ { 19731, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ { 19760, 0x00008D57 }, /* GL_MAX_SAMPLES */
+ { 19775, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
+ { 19794, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ { 19821, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+ { 19841, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+ { 19865, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+ { 19887, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+ { 19913, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ { 19940, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+ { 19971, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+ { 19995, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 20029, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+ { 20049, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ { 20076, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+ { 20097, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+ { 20122, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+ { 20147, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ { 20182, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+ { 20204, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+ { 20230, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+ { 20252, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+ { 20278, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ { 20312, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+ { 20350, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ { 20383, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+ { 20420, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+ { 20444, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+ { 20465, 0x00008007 }, /* GL_MIN */
+ { 20472, 0x0000802E }, /* GL_MINMAX */
+ { 20482, 0x0000802E }, /* GL_MINMAX_EXT */
+ { 20496, 0x0000802F }, /* GL_MINMAX_FORMAT */
+ { 20513, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+ { 20534, 0x00008030 }, /* GL_MINMAX_SINK */
+ { 20549, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+ { 20568, 0x00008007 }, /* GL_MIN_EXT */
+ { 20579, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+ { 20598, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+ { 20621, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+ { 20644, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+ { 20664, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+ { 20684, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ { 20714, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+ { 20742, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ { 20770, 0x00001700 }, /* GL_MODELVIEW */
+ { 20783, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+ { 20801, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+ { 20820, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+ { 20839, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+ { 20858, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+ { 20877, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+ { 20896, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+ { 20915, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+ { 20934, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+ { 20953, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+ { 20972, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+ { 20991, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+ { 21009, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+ { 21028, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+ { 21047, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+ { 21066, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+ { 21085, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+ { 21104, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+ { 21123, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+ { 21142, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+ { 21161, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+ { 21180, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+ { 21199, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+ { 21217, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+ { 21236, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+ { 21255, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+ { 21273, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+ { 21291, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+ { 21309, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+ { 21327, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+ { 21345, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+ { 21363, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+ { 21381, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+ { 21401, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+ { 21428, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+ { 21453, 0x00002100 }, /* GL_MODULATE */
+ { 21465, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+ { 21485, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+ { 21512, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+ { 21537, 0x00000103 }, /* GL_MULT */
+ { 21545, 0x0000809D }, /* GL_MULTISAMPLE */
+ { 21560, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+ { 21580, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+ { 21599, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+ { 21618, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+ { 21642, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+ { 21665, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ { 21695, 0x00002A25 }, /* GL_N3F_V3F */
+ { 21706, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+ { 21726, 0x0000150E }, /* GL_NAND */
+ { 21734, 0x00002600 }, /* GL_NEAREST */
+ { 21745, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ { 21776, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ { 21808, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+ { 21833, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+ { 21859, 0x00000200 }, /* GL_NEVER */
+ { 21868, 0x00001102 }, /* GL_NICEST */
+ { 21878, 0x00000000 }, /* GL_NONE */
+ { 21886, 0x00001505 }, /* GL_NOOP */
+ { 21894, 0x00001508 }, /* GL_NOR */
+ { 21901, 0x00000BA1 }, /* GL_NORMALIZE */
+ { 21914, 0x00008075 }, /* GL_NORMAL_ARRAY */
+ { 21930, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ { 21961, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+ { 21996, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+ { 22020, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+ { 22043, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+ { 22064, 0x00008511 }, /* GL_NORMAL_MAP */
+ { 22078, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+ { 22096, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+ { 22113, 0x00000205 }, /* GL_NOTEQUAL */
+ { 22125, 0x00000000 }, /* GL_NO_ERROR */
+ { 22137, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ { 22171, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
+ { 22209, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+ { 22241, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+ { 22283, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+ { 22313, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+ { 22353, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+ { 22384, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+ { 22413, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+ { 22441, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+ { 22471, 0x00002401 }, /* GL_OBJECT_LINEAR */
+ { 22488, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+ { 22514, 0x00002501 }, /* GL_OBJECT_PLANE */
+ { 22530, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+ { 22565, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+ { 22587, 0x00009112 }, /* GL_OBJECT_TYPE */
+ { 22602, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+ { 22621, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+ { 22651, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+ { 22672, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+ { 22700, 0x00000001 }, /* GL_ONE */
+ { 22707, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ { 22735, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+ { 22767, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ { 22795, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+ { 22827, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+ { 22850, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+ { 22873, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+ { 22896, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+ { 22919, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+ { 22937, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+ { 22959, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+ { 22981, 0x00008590 }, /* GL_OPERAND0_RGB */
+ { 22997, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+ { 23017, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+ { 23037, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+ { 23055, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+ { 23077, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+ { 23099, 0x00008591 }, /* GL_OPERAND1_RGB */
+ { 23115, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+ { 23135, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+ { 23155, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+ { 23173, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+ { 23195, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+ { 23217, 0x00008592 }, /* GL_OPERAND2_RGB */
+ { 23233, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+ { 23253, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+ { 23273, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+ { 23294, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+ { 23313, 0x00001507 }, /* GL_OR */
+ { 23319, 0x00000A01 }, /* GL_ORDER */
+ { 23328, 0x0000150D }, /* GL_OR_INVERTED */
+ { 23343, 0x0000150B }, /* GL_OR_REVERSE */
+ { 23357, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+ { 23374, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+ { 23392, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+ { 23413, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+ { 23433, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+ { 23451, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+ { 23470, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+ { 23490, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+ { 23510, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+ { 23528, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+ { 23547, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+ { 23572, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+ { 23596, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+ { 23617, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+ { 23639, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+ { 23661, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+ { 23686, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+ { 23710, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+ { 23731, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+ { 23753, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+ { 23775, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+ { 23797, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ { 23828, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+ { 23848, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ { 23873, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+ { 23893, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ { 23918, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+ { 23938, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ { 23963, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+ { 23983, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ { 24008, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+ { 24028, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ { 24053, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+ { 24073, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ { 24098, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+ { 24118, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ { 24143, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+ { 24163, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ { 24188, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+ { 24208, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ { 24233, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+ { 24253, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ { 24278, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+ { 24296, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
+ { 24317, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ { 24346, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+ { 24379, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+ { 24404, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
+ { 24427, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ { 24458, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+ { 24493, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+ { 24520, 0x00001B00 }, /* GL_POINT */
+ { 24529, 0x00000000 }, /* GL_POINTS */
+ { 24539, 0x00000002 }, /* GL_POINT_BIT */
+ { 24552, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+ { 24582, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+ { 24616, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+ { 24650, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+ { 24685, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ { 24714, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+ { 24747, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+ { 24780, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+ { 24814, 0x00000B11 }, /* GL_POINT_SIZE */
+ { 24828, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+ { 24854, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+ { 24872, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+ { 24894, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+ { 24916, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+ { 24939, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+ { 24957, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+ { 24979, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+ { 25001, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+ { 25024, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+ { 25044, 0x00000B10 }, /* GL_POINT_SMOOTH */
+ { 25060, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+ { 25081, 0x00008861 }, /* GL_POINT_SPRITE */
+ { 25097, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+ { 25117, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ { 25146, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+ { 25165, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+ { 25191, 0x00000701 }, /* GL_POINT_TOKEN */
+ { 25206, 0x00000009 }, /* GL_POLYGON */
+ { 25217, 0x00000008 }, /* GL_POLYGON_BIT */
+ { 25232, 0x00000B40 }, /* GL_POLYGON_MODE */
+ { 25248, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+ { 25271, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+ { 25296, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+ { 25319, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+ { 25342, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+ { 25366, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+ { 25390, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+ { 25408, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+ { 25431, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+ { 25450, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+ { 25473, 0x00000703 }, /* GL_POLYGON_TOKEN */
+ { 25490, 0x00001203 }, /* GL_POSITION */
+ { 25502, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ { 25534, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+ { 25570, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ { 25603, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+ { 25640, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ { 25671, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+ { 25706, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ { 25738, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+ { 25774, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 25807, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ { 25839, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+ { 25875, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ { 25908, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+ { 25945, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ { 25975, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+ { 26009, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ { 26040, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+ { 26075, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ { 26106, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+ { 26141, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ { 26173, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+ { 26209, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ { 26239, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+ { 26273, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ { 26304, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+ { 26339, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ { 26371, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ { 26402, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+ { 26437, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ { 26469, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+ { 26505, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+ { 26534, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+ { 26567, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+ { 26597, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+ { 26631, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ { 26670, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ { 26703, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ { 26743, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ { 26777, 0x00008578 }, /* GL_PREVIOUS */
+ { 26789, 0x00008578 }, /* GL_PREVIOUS_ARB */
+ { 26805, 0x00008578 }, /* GL_PREVIOUS_EXT */
+ { 26821, 0x00008577 }, /* GL_PRIMARY_COLOR */
+ { 26838, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+ { 26859, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+ { 26880, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 26913, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 26945, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+ { 26968, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+ { 26991, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ { 27021, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+ { 27050, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+ { 27078, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+ { 27100, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ { 27128, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ { 27156, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+ { 27178, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+ { 27199, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 27239, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 27278, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 27308, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 27343, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 27376, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 27410, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 27449, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 27488, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+ { 27510, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+ { 27536, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+ { 27560, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+ { 27583, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+ { 27605, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+ { 27626, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+ { 27647, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+ { 27674, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 27706, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 27738, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ { 27773, 0x00001701 }, /* GL_PROJECTION */
+ { 27787, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+ { 27808, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+ { 27834, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
+ { 27854, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
+ { 27878, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+ { 27899, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+ { 27918, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+ { 27941, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 27980, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ { 28018, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+ { 28038, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ { 28068, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+ { 28092, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+ { 28112, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ { 28142, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+ { 28166, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+ { 28186, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ { 28219, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ { 28245, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+ { 28275, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ { 28306, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+ { 28336, 0x00002003 }, /* GL_Q */
+ { 28341, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+ { 28366, 0x00000007 }, /* GL_QUADS */
+ { 28375, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ { 28419, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
+ { 28467, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+ { 28484, 0x00000008 }, /* GL_QUAD_STRIP */
+ { 28498, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+ { 28520, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+ { 28546, 0x00008866 }, /* GL_QUERY_RESULT */
+ { 28562, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+ { 28582, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+ { 28608, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+ { 28638, 0x00002002 }, /* GL_R */
+ { 28643, 0x00002A10 }, /* GL_R3_G3_B2 */
+ { 28655, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ { 28688, 0x00000C02 }, /* GL_READ_BUFFER */
+ { 28703, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
+ { 28723, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
+ { 28751, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ { 28783, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+ { 28807, 0x000088B8 }, /* GL_READ_ONLY */
+ { 28820, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+ { 28837, 0x000088BA }, /* GL_READ_WRITE */
+ { 28851, 0x000088BA }, /* GL_READ_WRITE_ARB */
+ { 28869, 0x00001903 }, /* GL_RED */
+ { 28876, 0x00008016 }, /* GL_REDUCE */
+ { 28886, 0x00008016 }, /* GL_REDUCE_EXT */
+ { 28900, 0x00000D15 }, /* GL_RED_BIAS */
+ { 28912, 0x00000D52 }, /* GL_RED_BITS */
+ { 28924, 0x00000D14 }, /* GL_RED_SCALE */
+ { 28937, 0x00008512 }, /* GL_REFLECTION_MAP */
+ { 28955, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+ { 28977, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+ { 28998, 0x00001C00 }, /* GL_RENDER */
+ { 29008, 0x00008D41 }, /* GL_RENDERBUFFER */
+ { 29024, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ { 29051, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
+ { 29075, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+ { 29103, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
+ { 29129, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ { 29156, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+ { 29176, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
+ { 29203, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
+ { 29226, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ { 29253, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ { 29285, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ { 29321, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
+ { 29346, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
+ { 29370, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
+ { 29398, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ { 29427, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
+ { 29449, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+ { 29475, 0x00001F01 }, /* GL_RENDERER */
+ { 29487, 0x00000C40 }, /* GL_RENDER_MODE */
+ { 29502, 0x00002901 }, /* GL_REPEAT */
+ { 29512, 0x00001E01 }, /* GL_REPLACE */
+ { 29523, 0x00008062 }, /* GL_REPLACE_EXT */
+ { 29538, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+ { 29561, 0x0000803A }, /* GL_RESCALE_NORMAL */
+ { 29579, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+ { 29601, 0x00000102 }, /* GL_RETURN */
+ { 29611, 0x00001907 }, /* GL_RGB */
+ { 29618, 0x00008052 }, /* GL_RGB10 */
+ { 29627, 0x00008059 }, /* GL_RGB10_A2 */
+ { 29639, 0x00008059 }, /* GL_RGB10_A2_EXT */
+ { 29655, 0x00008052 }, /* GL_RGB10_EXT */
+ { 29668, 0x00008053 }, /* GL_RGB12 */
+ { 29677, 0x00008053 }, /* GL_RGB12_EXT */
+ { 29690, 0x00008054 }, /* GL_RGB16 */
+ { 29699, 0x00008054 }, /* GL_RGB16_EXT */
+ { 29712, 0x0000804E }, /* GL_RGB2_EXT */
+ { 29724, 0x0000804F }, /* GL_RGB4 */
+ { 29732, 0x0000804F }, /* GL_RGB4_EXT */
+ { 29744, 0x000083A1 }, /* GL_RGB4_S3TC */
+ { 29757, 0x00008050 }, /* GL_RGB5 */
+ { 29765, 0x00008057 }, /* GL_RGB5_A1 */
+ { 29776, 0x00008057 }, /* GL_RGB5_A1_EXT */
+ { 29791, 0x00008050 }, /* GL_RGB5_EXT */
+ { 29803, 0x00008051 }, /* GL_RGB8 */
+ { 29811, 0x00008051 }, /* GL_RGB8_EXT */
+ { 29823, 0x00001908 }, /* GL_RGBA */
+ { 29831, 0x0000805A }, /* GL_RGBA12 */
+ { 29841, 0x0000805A }, /* GL_RGBA12_EXT */
+ { 29855, 0x0000805B }, /* GL_RGBA16 */
+ { 29865, 0x0000805B }, /* GL_RGBA16_EXT */
+ { 29879, 0x00008055 }, /* GL_RGBA2 */
+ { 29888, 0x00008055 }, /* GL_RGBA2_EXT */
+ { 29901, 0x00008056 }, /* GL_RGBA4 */
+ { 29910, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+ { 29929, 0x00008056 }, /* GL_RGBA4_EXT */
+ { 29942, 0x000083A3 }, /* GL_RGBA4_S3TC */
+ { 29956, 0x00008058 }, /* GL_RGBA8 */
+ { 29965, 0x00008058 }, /* GL_RGBA8_EXT */
+ { 29978, 0x00008F97 }, /* GL_RGBA8_SNORM */
+ { 29993, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+ { 30011, 0x00000C31 }, /* GL_RGBA_MODE */
+ { 30024, 0x000083A2 }, /* GL_RGBA_S3TC */
+ { 30037, 0x00008F93 }, /* GL_RGBA_SNORM */
+ { 30051, 0x000083A0 }, /* GL_RGB_S3TC */
+ { 30063, 0x00008573 }, /* GL_RGB_SCALE */
+ { 30076, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+ { 30093, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+ { 30110, 0x00000407 }, /* GL_RIGHT */
+ { 30119, 0x00002000 }, /* GL_S */
+ { 30124, 0x00008B5D }, /* GL_SAMPLER_1D */
+ { 30138, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+ { 30159, 0x00008B5E }, /* GL_SAMPLER_2D */
+ { 30173, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+ { 30194, 0x00008B5F }, /* GL_SAMPLER_3D */
+ { 30208, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+ { 30224, 0x000080A9 }, /* GL_SAMPLES */
+ { 30235, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+ { 30251, 0x000080A9 }, /* GL_SAMPLES_ARB */
+ { 30266, 0x00008914 }, /* GL_SAMPLES_PASSED */
+ { 30284, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+ { 30306, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ { 30334, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+ { 30366, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+ { 30389, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+ { 30416, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+ { 30434, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+ { 30457, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+ { 30479, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+ { 30498, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+ { 30521, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+ { 30547, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+ { 30577, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+ { 30602, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+ { 30631, 0x00080000 }, /* GL_SCISSOR_BIT */
+ { 30646, 0x00000C10 }, /* GL_SCISSOR_BOX */
+ { 30661, 0x00000C11 }, /* GL_SCISSOR_TEST */
+ { 30677, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+ { 30702, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ { 30742, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 30786, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ { 30819, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ { 30849, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ { 30881, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ { 30911, 0x00001C02 }, /* GL_SELECT */
+ { 30921, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+ { 30949, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+ { 30974, 0x00008012 }, /* GL_SEPARABLE_2D */
+ { 30990, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+ { 31017, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+ { 31048, 0x0000150F }, /* GL_SET */
+ { 31055, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+ { 31076, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+ { 31100, 0x00008B4F }, /* GL_SHADER_TYPE */
+ { 31115, 0x00000B54 }, /* GL_SHADE_MODEL */
+ { 31130, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+ { 31158, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+ { 31181, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ { 31211, 0x00001601 }, /* GL_SHININESS */
+ { 31224, 0x00001402 }, /* GL_SHORT */
+ { 31233, 0x00009119 }, /* GL_SIGNALED */
+ { 31245, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
+ { 31266, 0x000081F9 }, /* GL_SINGLE_COLOR */
+ { 31282, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+ { 31302, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+ { 31321, 0x00008C46 }, /* GL_SLUMINANCE */
+ { 31335, 0x00008C47 }, /* GL_SLUMINANCE8 */
+ { 31350, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
+ { 31372, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
+ { 31392, 0x00001D01 }, /* GL_SMOOTH */
+ { 31402, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+ { 31435, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+ { 31462, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+ { 31495, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+ { 31522, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+ { 31539, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+ { 31560, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+ { 31581, 0x00008580 }, /* GL_SOURCE0_RGB */
+ { 31596, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+ { 31615, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+ { 31634, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+ { 31651, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+ { 31672, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+ { 31693, 0x00008581 }, /* GL_SOURCE1_RGB */
+ { 31708, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+ { 31727, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+ { 31746, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+ { 31763, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+ { 31784, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+ { 31805, 0x00008582 }, /* GL_SOURCE2_RGB */
+ { 31820, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+ { 31839, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+ { 31858, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+ { 31878, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+ { 31896, 0x00001202 }, /* GL_SPECULAR */
+ { 31908, 0x00002402 }, /* GL_SPHERE_MAP */
+ { 31922, 0x00001206 }, /* GL_SPOT_CUTOFF */
+ { 31937, 0x00001204 }, /* GL_SPOT_DIRECTION */
+ { 31955, 0x00001205 }, /* GL_SPOT_EXPONENT */
+ { 31972, 0x00008588 }, /* GL_SRC0_ALPHA */
+ { 31986, 0x00008580 }, /* GL_SRC0_RGB */
+ { 31998, 0x00008589 }, /* GL_SRC1_ALPHA */
+ { 32012, 0x00008581 }, /* GL_SRC1_RGB */
+ { 32024, 0x0000858A }, /* GL_SRC2_ALPHA */
+ { 32038, 0x00008582 }, /* GL_SRC2_RGB */
+ { 32050, 0x00000302 }, /* GL_SRC_ALPHA */
+ { 32063, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+ { 32085, 0x00000300 }, /* GL_SRC_COLOR */
+ { 32098, 0x00008C40 }, /* GL_SRGB */
+ { 32106, 0x00008C41 }, /* GL_SRGB8 */
+ { 32115, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
+ { 32131, 0x00008C42 }, /* GL_SRGB_ALPHA */
+ { 32145, 0x00000503 }, /* GL_STACK_OVERFLOW */
+ { 32163, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+ { 32182, 0x000088E6 }, /* GL_STATIC_COPY */
+ { 32197, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+ { 32216, 0x000088E4 }, /* GL_STATIC_DRAW */
+ { 32231, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+ { 32250, 0x000088E5 }, /* GL_STATIC_READ */
+ { 32265, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+ { 32284, 0x00001802 }, /* GL_STENCIL */
+ { 32295, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
+ { 32317, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+ { 32343, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+ { 32364, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
+ { 32389, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+ { 32410, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
+ { 32435, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ { 32467, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
+ { 32503, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ { 32535, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
+ { 32571, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+ { 32591, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+ { 32618, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+ { 32644, 0x00000D57 }, /* GL_STENCIL_BITS */
+ { 32660, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+ { 32682, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+ { 32705, 0x00000B94 }, /* GL_STENCIL_FAIL */
+ { 32721, 0x00000B92 }, /* GL_STENCIL_FUNC */
+ { 32737, 0x00001901 }, /* GL_STENCIL_INDEX */
+ { 32754, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
+ { 32772, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
+ { 32791, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+ { 32814, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+ { 32836, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
+ { 32854, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+ { 32876, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
+ { 32894, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+ { 32916, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+ { 32937, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ { 32964, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+ { 32991, 0x00000B97 }, /* GL_STENCIL_REF */
+ { 33006, 0x00000B90 }, /* GL_STENCIL_TEST */
+ { 33022, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ { 33051, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+ { 33073, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+ { 33094, 0x00000C33 }, /* GL_STEREO */
+ { 33104, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
+ { 33128, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
+ { 33153, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
+ { 33177, 0x000088E2 }, /* GL_STREAM_COPY */
+ { 33192, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+ { 33211, 0x000088E0 }, /* GL_STREAM_DRAW */
+ { 33226, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+ { 33245, 0x000088E1 }, /* GL_STREAM_READ */
+ { 33260, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+ { 33279, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+ { 33296, 0x000084E7 }, /* GL_SUBTRACT */
+ { 33308, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+ { 33324, 0x00009113 }, /* GL_SYNC_CONDITION */
+ { 33342, 0x00009116 }, /* GL_SYNC_FENCE */
+ { 33356, 0x00009115 }, /* GL_SYNC_FLAGS */
+ { 33370, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
+ { 33397, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ { 33427, 0x00009114 }, /* GL_SYNC_STATUS */
+ { 33442, 0x00002001 }, /* GL_T */
+ { 33447, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+ { 33462, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+ { 33481, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+ { 33497, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+ { 33512, 0x00002A27 }, /* GL_T2F_V3F */
+ { 33523, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+ { 33542, 0x00002A28 }, /* GL_T4F_V4F */
+ { 33553, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+ { 33576, 0x00001702 }, /* GL_TEXTURE */
+ { 33587, 0x000084C0 }, /* GL_TEXTURE0 */
+ { 33599, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+ { 33615, 0x000084C1 }, /* GL_TEXTURE1 */
+ { 33627, 0x000084CA }, /* GL_TEXTURE10 */
+ { 33640, 0x000084CA }, /* GL_TEXTURE10_ARB */
+ { 33657, 0x000084CB }, /* GL_TEXTURE11 */
+ { 33670, 0x000084CB }, /* GL_TEXTURE11_ARB */
+ { 33687, 0x000084CC }, /* GL_TEXTURE12 */
+ { 33700, 0x000084CC }, /* GL_TEXTURE12_ARB */
+ { 33717, 0x000084CD }, /* GL_TEXTURE13 */
+ { 33730, 0x000084CD }, /* GL_TEXTURE13_ARB */
+ { 33747, 0x000084CE }, /* GL_TEXTURE14 */
+ { 33760, 0x000084CE }, /* GL_TEXTURE14_ARB */
+ { 33777, 0x000084CF }, /* GL_TEXTURE15 */
+ { 33790, 0x000084CF }, /* GL_TEXTURE15_ARB */
+ { 33807, 0x000084D0 }, /* GL_TEXTURE16 */
+ { 33820, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+ { 33837, 0x000084D1 }, /* GL_TEXTURE17 */
+ { 33850, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+ { 33867, 0x000084D2 }, /* GL_TEXTURE18 */
+ { 33880, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+ { 33897, 0x000084D3 }, /* GL_TEXTURE19 */
+ { 33910, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+ { 33927, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+ { 33943, 0x000084C2 }, /* GL_TEXTURE2 */
+ { 33955, 0x000084D4 }, /* GL_TEXTURE20 */
+ { 33968, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+ { 33985, 0x000084D5 }, /* GL_TEXTURE21 */
+ { 33998, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+ { 34015, 0x000084D6 }, /* GL_TEXTURE22 */
+ { 34028, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+ { 34045, 0x000084D7 }, /* GL_TEXTURE23 */
+ { 34058, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+ { 34075, 0x000084D8 }, /* GL_TEXTURE24 */
+ { 34088, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+ { 34105, 0x000084D9 }, /* GL_TEXTURE25 */
+ { 34118, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+ { 34135, 0x000084DA }, /* GL_TEXTURE26 */
+ { 34148, 0x000084DA }, /* GL_TEXTURE26_ARB */
+ { 34165, 0x000084DB }, /* GL_TEXTURE27 */
+ { 34178, 0x000084DB }, /* GL_TEXTURE27_ARB */
+ { 34195, 0x000084DC }, /* GL_TEXTURE28 */
+ { 34208, 0x000084DC }, /* GL_TEXTURE28_ARB */
+ { 34225, 0x000084DD }, /* GL_TEXTURE29 */
+ { 34238, 0x000084DD }, /* GL_TEXTURE29_ARB */
+ { 34255, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+ { 34271, 0x000084C3 }, /* GL_TEXTURE3 */
+ { 34283, 0x000084DE }, /* GL_TEXTURE30 */
+ { 34296, 0x000084DE }, /* GL_TEXTURE30_ARB */
+ { 34313, 0x000084DF }, /* GL_TEXTURE31 */
+ { 34326, 0x000084DF }, /* GL_TEXTURE31_ARB */
+ { 34343, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+ { 34359, 0x000084C4 }, /* GL_TEXTURE4 */
+ { 34371, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+ { 34387, 0x000084C5 }, /* GL_TEXTURE5 */
+ { 34399, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+ { 34415, 0x000084C6 }, /* GL_TEXTURE6 */
+ { 34427, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+ { 34443, 0x000084C7 }, /* GL_TEXTURE7 */
+ { 34455, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+ { 34471, 0x000084C8 }, /* GL_TEXTURE8 */
+ { 34483, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+ { 34499, 0x000084C9 }, /* GL_TEXTURE9 */
+ { 34511, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+ { 34527, 0x00000DE0 }, /* GL_TEXTURE_1D */
+ { 34541, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
+ { 34565, 0x00000DE1 }, /* GL_TEXTURE_2D */
+ { 34579, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
+ { 34603, 0x0000806F }, /* GL_TEXTURE_3D */
+ { 34617, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+ { 34639, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+ { 34665, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+ { 34687, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+ { 34709, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ { 34741, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+ { 34763, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ { 34795, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+ { 34817, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ { 34845, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+ { 34877, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ { 34910, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+ { 34942, 0x00040000 }, /* GL_TEXTURE_BIT */
+ { 34957, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+ { 34978, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+ { 35003, 0x00001005 }, /* GL_TEXTURE_BORDER */
+ { 35021, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+ { 35045, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ { 35076, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ { 35106, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ { 35136, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ { 35171, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ { 35202, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 35240, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ { 35267, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ { 35299, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ { 35333, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+ { 35357, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+ { 35385, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+ { 35409, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+ { 35437, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ { 35470, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+ { 35494, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+ { 35516, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+ { 35538, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+ { 35564, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 35598, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ { 35631, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+ { 35668, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+ { 35696, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+ { 35728, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+ { 35751, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ { 35789, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+ { 35831, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ { 35862, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ { 35890, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ { 35920, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ { 35948, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+ { 35968, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+ { 35992, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ { 36023, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+ { 36058, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ { 36089, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+ { 36124, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ { 36155, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+ { 36190, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ { 36221, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+ { 36256, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ { 36287, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+ { 36322, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ { 36353, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+ { 36388, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ { 36417, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+ { 36434, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+ { 36456, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+ { 36482, 0x00002300 }, /* GL_TEXTURE_ENV */
+ { 36497, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+ { 36518, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+ { 36538, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+ { 36564, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+ { 36584, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+ { 36601, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+ { 36618, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+ { 36635, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+ { 36652, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ { 36677, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+ { 36699, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+ { 36725, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+ { 36743, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ { 36769, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+ { 36795, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+ { 36825, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+ { 36852, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ { 36877, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+ { 36897, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+ { 36921, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ { 36948, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ { 36975, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ { 37002, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+ { 37028, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+ { 37058, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+ { 37080, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+ { 37098, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 37128, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ { 37156, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ { 37184, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ { 37212, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+ { 37233, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+ { 37252, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+ { 37274, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+ { 37293, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+ { 37313, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ { 37343, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ { 37374, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+ { 37399, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+ { 37423, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+ { 37443, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+ { 37467, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+ { 37487, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+ { 37510, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
+ { 37534, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
+ { 37562, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ { 37592, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+ { 37617, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ { 37651, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+ { 37668, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+ { 37686, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+ { 37704, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+ { 37722, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
+ { 37741, 0xFFFFFFFFFFFFFFFF }, /* GL_TIMEOUT_IGNORED */
+ { 37760, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 37780, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 37799, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 37828, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 37845, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 37871, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 37901, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 37933, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 37963, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 37997, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 38013, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 38044, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 38079, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 38107, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 38139, 0x00000004 }, /* GL_TRIANGLES */
+ { 38152, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 38168, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 38189, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 38207, 0x00000001 }, /* GL_TRUE */
+ { 38215, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 38235, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 38258, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 38278, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 38299, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 38321, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 38343, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 38363, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 38384, 0x00009118 }, /* GL_UNSIGNALED */
+ { 38398, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 38415, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 38442, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 38465, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 38481, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 38508, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
+ { 38529, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
+ { 38554, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 38578, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 38609, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 38633, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 38661, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
+ { 38684, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 38702, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 38732, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 38758, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 38788, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 38814, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 38838, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 38866, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 38894, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 38921, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 38953, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 38984, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 38998, 0x00002A20 }, /* GL_V2F */
+ { 39005, 0x00002A21 }, /* GL_V3F */
+ { 39012, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 39031, 0x00001F00 }, /* GL_VENDOR */
+ { 39041, 0x00001F02 }, /* GL_VERSION */
+ { 39052, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 39068, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
+ { 39092, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 39122, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 39153, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 39188, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 39212, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 39233, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 39256, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 39277, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 39304, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 39332, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 39360, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 39388, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 39416, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 39444, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 39472, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 39499, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 39526, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 39553, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 39580, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 39607, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 39634, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 39661, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 39688, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 39715, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 39753, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 39795, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 39826, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 39861, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 39895, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 39933, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 39964, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 39999, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 40027, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 40059, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 40089, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 40123, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 40151, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 40183, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 40203, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 40225, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 40254, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 40275, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 40304, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 40337, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 40369, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 40396, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 40427, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 40457, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 40474, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 40495, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 40522, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 40534, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 40550, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 40565, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 40585, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 40616, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 40651, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 40679, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 40704, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 40731, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 40756, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 40780, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 40799, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 40813, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 40831, 0x00001506 }, /* GL_XOR */
+ { 40838, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 40857, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 40871, 0x00000000 }, /* GL_ZERO */
+ { 40879, 0x00000D16 }, /* GL_ZOOM_X */
+ { 40889, 0x00000D17 }, /* GL_ZOOM_Y */
};
static const unsigned reduced_enums[1347] =
{
- 476, /* GL_FALSE */
- 694, /* GL_LINES */
- 696, /* GL_LINE_LOOP */
- 703, /* GL_LINE_STRIP */
- 1748, /* GL_TRIANGLES */
- 1751, /* GL_TRIANGLE_STRIP */
- 1749, /* GL_TRIANGLE_FAN */
- 1275, /* GL_QUADS */
- 1279, /* GL_QUAD_STRIP */
- 1161, /* GL_POLYGON */
- 1173, /* GL_POLYGON_STIPPLE_BIT */
- 1122, /* GL_PIXEL_MODE_BIT */
- 681, /* GL_LIGHTING_BIT */
- 506, /* GL_FOG_BIT */
+ 479, /* GL_FALSE */
+ 701, /* GL_LINES */
+ 703, /* GL_LINE_LOOP */
+ 710, /* GL_LINE_STRIP */
+ 1766, /* GL_TRIANGLES */
+ 1769, /* GL_TRIANGLE_STRIP */
+ 1767, /* GL_TRIANGLE_FAN */
+ 1285, /* GL_QUADS */
+ 1289, /* GL_QUAD_STRIP */
+ 1171, /* GL_POLYGON */
+ 1183, /* GL_POLYGON_STIPPLE_BIT */
+ 1132, /* GL_PIXEL_MODE_BIT */
+ 688, /* GL_LIGHTING_BIT */
+ 509, /* GL_FOG_BIT */
8, /* GL_ACCUM */
- 713, /* GL_LOAD */
- 1331, /* GL_RETURN */
- 994, /* GL_MULT */
+ 720, /* GL_LOAD */
+ 1344, /* GL_RETURN */
+ 1004, /* GL_MULT */
23, /* GL_ADD */
- 1010, /* GL_NEVER */
- 671, /* GL_LESS */
- 466, /* GL_EQUAL */
- 670, /* GL_LEQUAL */
- 592, /* GL_GREATER */
- 1025, /* GL_NOTEQUAL */
- 591, /* GL_GEQUAL */
+ 1020, /* GL_NEVER */
+ 678, /* GL_LESS */
+ 469, /* GL_EQUAL */
+ 677, /* GL_LEQUAL */
+ 599, /* GL_GREATER */
+ 1035, /* GL_NOTEQUAL */
+ 598, /* GL_GEQUAL */
47, /* GL_ALWAYS */
- 1472, /* GL_SRC_COLOR */
- 1055, /* GL_ONE_MINUS_SRC_COLOR */
- 1470, /* GL_SRC_ALPHA */
- 1054, /* GL_ONE_MINUS_SRC_ALPHA */
- 445, /* GL_DST_ALPHA */
- 1052, /* GL_ONE_MINUS_DST_ALPHA */
- 446, /* GL_DST_COLOR */
- 1053, /* GL_ONE_MINUS_DST_COLOR */
- 1471, /* GL_SRC_ALPHA_SATURATE */
- 579, /* GL_FRONT_LEFT */
- 580, /* GL_FRONT_RIGHT */
+ 1485, /* GL_SRC_COLOR */
+ 1065, /* GL_ONE_MINUS_SRC_COLOR */
+ 1483, /* GL_SRC_ALPHA */
+ 1064, /* GL_ONE_MINUS_SRC_ALPHA */
+ 448, /* GL_DST_ALPHA */
+ 1062, /* GL_ONE_MINUS_DST_ALPHA */
+ 449, /* GL_DST_COLOR */
+ 1063, /* GL_ONE_MINUS_DST_COLOR */
+ 1484, /* GL_SRC_ALPHA_SATURATE */
+ 586, /* GL_FRONT_LEFT */
+ 587, /* GL_FRONT_RIGHT */
69, /* GL_BACK_LEFT */
70, /* GL_BACK_RIGHT */
- 576, /* GL_FRONT */
+ 583, /* GL_FRONT */
68, /* GL_BACK */
- 669, /* GL_LEFT */
- 1373, /* GL_RIGHT */
- 577, /* GL_FRONT_AND_BACK */
+ 676, /* GL_LEFT */
+ 1386, /* GL_RIGHT */
+ 584, /* GL_FRONT_AND_BACK */
63, /* GL_AUX0 */
64, /* GL_AUX1 */
65, /* GL_AUX2 */
66, /* GL_AUX3 */
- 658, /* GL_INVALID_ENUM */
- 662, /* GL_INVALID_VALUE */
- 661, /* GL_INVALID_OPERATION */
- 1477, /* GL_STACK_OVERFLOW */
- 1478, /* GL_STACK_UNDERFLOW */
- 1080, /* GL_OUT_OF_MEMORY */
- 659, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ 665, /* GL_INVALID_ENUM */
+ 669, /* GL_INVALID_VALUE */
+ 668, /* GL_INVALID_OPERATION */
+ 1490, /* GL_STACK_OVERFLOW */
+ 1491, /* GL_STACK_UNDERFLOW */
+ 1090, /* GL_OUT_OF_MEMORY */
+ 666, /* GL_INVALID_FRAMEBUFFER_OPERATION */
0, /* GL_2D */
2, /* GL_3D */
3, /* GL_3D_COLOR */
4, /* GL_3D_COLOR_TEXTURE */
6, /* GL_4D_COLOR_TEXTURE */
- 1100, /* GL_PASS_THROUGH_TOKEN */
- 1160, /* GL_POINT_TOKEN */
- 704, /* GL_LINE_TOKEN */
- 1174, /* GL_POLYGON_TOKEN */
+ 1110, /* GL_PASS_THROUGH_TOKEN */
+ 1170, /* GL_POINT_TOKEN */
+ 711, /* GL_LINE_TOKEN */
+ 1184, /* GL_POLYGON_TOKEN */
74, /* GL_BITMAP_TOKEN */
- 444, /* GL_DRAW_PIXEL_TOKEN */
+ 447, /* GL_DRAW_PIXEL_TOKEN */
301, /* GL_COPY_PIXEL_TOKEN */
- 697, /* GL_LINE_RESET_TOKEN */
- 469, /* GL_EXP */
- 470, /* GL_EXP2 */
+ 704, /* GL_LINE_RESET_TOKEN */
+ 472, /* GL_EXP */
+ 473, /* GL_EXP2 */
337, /* GL_CW */
125, /* GL_CCW */
146, /* GL_COEFF */
- 1077, /* GL_ORDER */
- 382, /* GL_DOMAIN */
+ 1087, /* GL_ORDER */
+ 384, /* GL_DOMAIN */
311, /* GL_CURRENT_COLOR */
314, /* GL_CURRENT_INDEX */
320, /* GL_CURRENT_NORMAL */
@@ -3854,519 +3892,519 @@ static const unsigned reduced_enums[1347] =
328, /* GL_CURRENT_RASTER_POSITION */
329, /* GL_CURRENT_RASTER_POSITION_VALID */
326, /* GL_CURRENT_RASTER_DISTANCE */
- 1153, /* GL_POINT_SMOOTH */
- 1142, /* GL_POINT_SIZE */
- 1152, /* GL_POINT_SIZE_RANGE */
- 1143, /* GL_POINT_SIZE_GRANULARITY */
- 698, /* GL_LINE_SMOOTH */
- 705, /* GL_LINE_WIDTH */
- 707, /* GL_LINE_WIDTH_RANGE */
- 706, /* GL_LINE_WIDTH_GRANULARITY */
- 700, /* GL_LINE_STIPPLE */
- 701, /* GL_LINE_STIPPLE_PATTERN */
- 702, /* GL_LINE_STIPPLE_REPEAT */
- 712, /* GL_LIST_MODE */
- 877, /* GL_MAX_LIST_NESTING */
- 709, /* GL_LIST_BASE */
- 711, /* GL_LIST_INDEX */
- 1163, /* GL_POLYGON_MODE */
- 1170, /* GL_POLYGON_SMOOTH */
- 1172, /* GL_POLYGON_STIPPLE */
- 455, /* GL_EDGE_FLAG */
+ 1163, /* GL_POINT_SMOOTH */
+ 1152, /* GL_POINT_SIZE */
+ 1162, /* GL_POINT_SIZE_RANGE */
+ 1153, /* GL_POINT_SIZE_GRANULARITY */
+ 705, /* GL_LINE_SMOOTH */
+ 712, /* GL_LINE_WIDTH */
+ 714, /* GL_LINE_WIDTH_RANGE */
+ 713, /* GL_LINE_WIDTH_GRANULARITY */
+ 707, /* GL_LINE_STIPPLE */
+ 708, /* GL_LINE_STIPPLE_PATTERN */
+ 709, /* GL_LINE_STIPPLE_REPEAT */
+ 719, /* GL_LIST_MODE */
+ 885, /* GL_MAX_LIST_NESTING */
+ 716, /* GL_LIST_BASE */
+ 718, /* GL_LIST_INDEX */
+ 1173, /* GL_POLYGON_MODE */
+ 1180, /* GL_POLYGON_SMOOTH */
+ 1182, /* GL_POLYGON_STIPPLE */
+ 458, /* GL_EDGE_FLAG */
304, /* GL_CULL_FACE */
305, /* GL_CULL_FACE_MODE */
- 578, /* GL_FRONT_FACE */
- 680, /* GL_LIGHTING */
- 685, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- 686, /* GL_LIGHT_MODEL_TWO_SIDE */
- 682, /* GL_LIGHT_MODEL_AMBIENT */
- 1419, /* GL_SHADE_MODEL */
+ 585, /* GL_FRONT_FACE */
+ 687, /* GL_LIGHTING */
+ 692, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ 693, /* GL_LIGHT_MODEL_TWO_SIDE */
+ 689, /* GL_LIGHT_MODEL_AMBIENT */
+ 1432, /* GL_SHADE_MODEL */
193, /* GL_COLOR_MATERIAL_FACE */
194, /* GL_COLOR_MATERIAL_PARAMETER */
192, /* GL_COLOR_MATERIAL */
- 505, /* GL_FOG */
- 527, /* GL_FOG_INDEX */
- 523, /* GL_FOG_DENSITY */
- 531, /* GL_FOG_START */
- 525, /* GL_FOG_END */
- 528, /* GL_FOG_MODE */
- 507, /* GL_FOG_COLOR */
- 369, /* GL_DEPTH_RANGE */
- 376, /* GL_DEPTH_TEST */
- 379, /* GL_DEPTH_WRITEMASK */
- 357, /* GL_DEPTH_CLEAR_VALUE */
- 368, /* GL_DEPTH_FUNC */
+ 508, /* GL_FOG */
+ 530, /* GL_FOG_INDEX */
+ 526, /* GL_FOG_DENSITY */
+ 534, /* GL_FOG_START */
+ 528, /* GL_FOG_END */
+ 531, /* GL_FOG_MODE */
+ 510, /* GL_FOG_COLOR */
+ 370, /* GL_DEPTH_RANGE */
+ 378, /* GL_DEPTH_TEST */
+ 381, /* GL_DEPTH_WRITEMASK */
+ 358, /* GL_DEPTH_CLEAR_VALUE */
+ 369, /* GL_DEPTH_FUNC */
12, /* GL_ACCUM_CLEAR_VALUE */
- 1513, /* GL_STENCIL_TEST */
- 1501, /* GL_STENCIL_CLEAR_VALUE */
- 1503, /* GL_STENCIL_FUNC */
- 1515, /* GL_STENCIL_VALUE_MASK */
- 1502, /* GL_STENCIL_FAIL */
- 1510, /* GL_STENCIL_PASS_DEPTH_FAIL */
- 1511, /* GL_STENCIL_PASS_DEPTH_PASS */
- 1512, /* GL_STENCIL_REF */
- 1516, /* GL_STENCIL_WRITEMASK */
- 846, /* GL_MATRIX_MODE */
- 1015, /* GL_NORMALIZE */
- 1842, /* GL_VIEWPORT */
- 989, /* GL_MODELVIEW_STACK_DEPTH */
- 1253, /* GL_PROJECTION_STACK_DEPTH */
- 1723, /* GL_TEXTURE_STACK_DEPTH */
- 987, /* GL_MODELVIEW_MATRIX */
- 1252, /* GL_PROJECTION_MATRIX */
- 1706, /* GL_TEXTURE_MATRIX */
+ 1530, /* GL_STENCIL_TEST */
+ 1514, /* GL_STENCIL_CLEAR_VALUE */
+ 1516, /* GL_STENCIL_FUNC */
+ 1532, /* GL_STENCIL_VALUE_MASK */
+ 1515, /* GL_STENCIL_FAIL */
+ 1527, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ 1528, /* GL_STENCIL_PASS_DEPTH_PASS */
+ 1529, /* GL_STENCIL_REF */
+ 1533, /* GL_STENCIL_WRITEMASK */
+ 853, /* GL_MATRIX_MODE */
+ 1025, /* GL_NORMALIZE */
+ 1861, /* GL_VIEWPORT */
+ 999, /* GL_MODELVIEW_STACK_DEPTH */
+ 1263, /* GL_PROJECTION_STACK_DEPTH */
+ 1740, /* GL_TEXTURE_STACK_DEPTH */
+ 997, /* GL_MODELVIEW_MATRIX */
+ 1262, /* GL_PROJECTION_MATRIX */
+ 1723, /* GL_TEXTURE_MATRIX */
61, /* GL_ATTRIB_STACK_DEPTH */
136, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
43, /* GL_ALPHA_TEST */
44, /* GL_ALPHA_TEST_FUNC */
45, /* GL_ALPHA_TEST_REF */
- 381, /* GL_DITHER */
+ 383, /* GL_DITHER */
78, /* GL_BLEND_DST */
87, /* GL_BLEND_SRC */
75, /* GL_BLEND */
- 715, /* GL_LOGIC_OP_MODE */
- 632, /* GL_INDEX_LOGIC_OP */
+ 722, /* GL_LOGIC_OP_MODE */
+ 639, /* GL_INDEX_LOGIC_OP */
191, /* GL_COLOR_LOGIC_OP */
67, /* GL_AUX_BUFFERS */
- 392, /* GL_DRAW_BUFFER */
- 1289, /* GL_READ_BUFFER */
- 1400, /* GL_SCISSOR_BOX */
- 1401, /* GL_SCISSOR_TEST */
- 631, /* GL_INDEX_CLEAR_VALUE */
- 636, /* GL_INDEX_WRITEMASK */
+ 394, /* GL_DRAW_BUFFER */
+ 1299, /* GL_READ_BUFFER */
+ 1413, /* GL_SCISSOR_BOX */
+ 1414, /* GL_SCISSOR_TEST */
+ 638, /* GL_INDEX_CLEAR_VALUE */
+ 643, /* GL_INDEX_WRITEMASK */
188, /* GL_COLOR_CLEAR_VALUE */
230, /* GL_COLOR_WRITEMASK */
- 633, /* GL_INDEX_MODE */
- 1366, /* GL_RGBA_MODE */
- 391, /* GL_DOUBLEBUFFER */
- 1517, /* GL_STEREO */
- 1324, /* GL_RENDER_MODE */
- 1101, /* GL_PERSPECTIVE_CORRECTION_HINT */
- 1154, /* GL_POINT_SMOOTH_HINT */
- 699, /* GL_LINE_SMOOTH_HINT */
- 1171, /* GL_POLYGON_SMOOTH_HINT */
- 526, /* GL_FOG_HINT */
- 1687, /* GL_TEXTURE_GEN_S */
- 1688, /* GL_TEXTURE_GEN_T */
- 1686, /* GL_TEXTURE_GEN_R */
- 1685, /* GL_TEXTURE_GEN_Q */
- 1114, /* GL_PIXEL_MAP_I_TO_I */
- 1120, /* GL_PIXEL_MAP_S_TO_S */
- 1116, /* GL_PIXEL_MAP_I_TO_R */
- 1112, /* GL_PIXEL_MAP_I_TO_G */
- 1110, /* GL_PIXEL_MAP_I_TO_B */
- 1108, /* GL_PIXEL_MAP_I_TO_A */
- 1118, /* GL_PIXEL_MAP_R_TO_R */
- 1106, /* GL_PIXEL_MAP_G_TO_G */
- 1104, /* GL_PIXEL_MAP_B_TO_B */
- 1102, /* GL_PIXEL_MAP_A_TO_A */
- 1115, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- 1121, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- 1117, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- 1113, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- 1111, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- 1109, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- 1119, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- 1107, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- 1105, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- 1103, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- 1760, /* GL_UNPACK_SWAP_BYTES */
- 1755, /* GL_UNPACK_LSB_FIRST */
- 1756, /* GL_UNPACK_ROW_LENGTH */
- 1759, /* GL_UNPACK_SKIP_ROWS */
- 1758, /* GL_UNPACK_SKIP_PIXELS */
- 1753, /* GL_UNPACK_ALIGNMENT */
- 1089, /* GL_PACK_SWAP_BYTES */
- 1084, /* GL_PACK_LSB_FIRST */
- 1085, /* GL_PACK_ROW_LENGTH */
- 1088, /* GL_PACK_SKIP_ROWS */
- 1087, /* GL_PACK_SKIP_PIXELS */
- 1081, /* GL_PACK_ALIGNMENT */
- 793, /* GL_MAP_COLOR */
- 798, /* GL_MAP_STENCIL */
- 635, /* GL_INDEX_SHIFT */
- 634, /* GL_INDEX_OFFSET */
- 1302, /* GL_RED_SCALE */
- 1300, /* GL_RED_BIAS */
- 1860, /* GL_ZOOM_X */
- 1861, /* GL_ZOOM_Y */
- 596, /* GL_GREEN_SCALE */
- 594, /* GL_GREEN_BIAS */
+ 640, /* GL_INDEX_MODE */
+ 1379, /* GL_RGBA_MODE */
+ 393, /* GL_DOUBLEBUFFER */
+ 1534, /* GL_STEREO */
+ 1337, /* GL_RENDER_MODE */
+ 1111, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ 1164, /* GL_POINT_SMOOTH_HINT */
+ 706, /* GL_LINE_SMOOTH_HINT */
+ 1181, /* GL_POLYGON_SMOOTH_HINT */
+ 529, /* GL_FOG_HINT */
+ 1704, /* GL_TEXTURE_GEN_S */
+ 1705, /* GL_TEXTURE_GEN_T */
+ 1703, /* GL_TEXTURE_GEN_R */
+ 1702, /* GL_TEXTURE_GEN_Q */
+ 1124, /* GL_PIXEL_MAP_I_TO_I */
+ 1130, /* GL_PIXEL_MAP_S_TO_S */
+ 1126, /* GL_PIXEL_MAP_I_TO_R */
+ 1122, /* GL_PIXEL_MAP_I_TO_G */
+ 1120, /* GL_PIXEL_MAP_I_TO_B */
+ 1118, /* GL_PIXEL_MAP_I_TO_A */
+ 1128, /* GL_PIXEL_MAP_R_TO_R */
+ 1116, /* GL_PIXEL_MAP_G_TO_G */
+ 1114, /* GL_PIXEL_MAP_B_TO_B */
+ 1112, /* GL_PIXEL_MAP_A_TO_A */
+ 1125, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ 1131, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ 1127, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ 1123, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ 1121, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ 1119, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ 1129, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ 1117, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ 1115, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ 1113, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ 1778, /* GL_UNPACK_SWAP_BYTES */
+ 1773, /* GL_UNPACK_LSB_FIRST */
+ 1774, /* GL_UNPACK_ROW_LENGTH */
+ 1777, /* GL_UNPACK_SKIP_ROWS */
+ 1776, /* GL_UNPACK_SKIP_PIXELS */
+ 1771, /* GL_UNPACK_ALIGNMENT */
+ 1099, /* GL_PACK_SWAP_BYTES */
+ 1094, /* GL_PACK_LSB_FIRST */
+ 1095, /* GL_PACK_ROW_LENGTH */
+ 1098, /* GL_PACK_SKIP_ROWS */
+ 1097, /* GL_PACK_SKIP_PIXELS */
+ 1091, /* GL_PACK_ALIGNMENT */
+ 800, /* GL_MAP_COLOR */
+ 805, /* GL_MAP_STENCIL */
+ 642, /* GL_INDEX_SHIFT */
+ 641, /* GL_INDEX_OFFSET */
+ 1313, /* GL_RED_SCALE */
+ 1311, /* GL_RED_BIAS */
+ 1879, /* GL_ZOOM_X */
+ 1880, /* GL_ZOOM_Y */
+ 603, /* GL_GREEN_SCALE */
+ 601, /* GL_GREEN_BIAS */
93, /* GL_BLUE_SCALE */
91, /* GL_BLUE_BIAS */
42, /* GL_ALPHA_SCALE */
40, /* GL_ALPHA_BIAS */
- 370, /* GL_DEPTH_SCALE */
- 350, /* GL_DEPTH_BIAS */
- 872, /* GL_MAX_EVAL_ORDER */
- 876, /* GL_MAX_LIGHTS */
- 855, /* GL_MAX_CLIP_PLANES */
- 922, /* GL_MAX_TEXTURE_SIZE */
- 882, /* GL_MAX_PIXEL_MAP_TABLE */
- 851, /* GL_MAX_ATTRIB_STACK_DEPTH */
- 879, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- 880, /* GL_MAX_NAME_STACK_DEPTH */
- 908, /* GL_MAX_PROJECTION_STACK_DEPTH */
- 923, /* GL_MAX_TEXTURE_STACK_DEPTH */
- 937, /* GL_MAX_VIEWPORT_DIMS */
- 852, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- 1527, /* GL_SUBPIXEL_BITS */
- 630, /* GL_INDEX_BITS */
- 1301, /* GL_RED_BITS */
- 595, /* GL_GREEN_BITS */
+ 371, /* GL_DEPTH_SCALE */
+ 351, /* GL_DEPTH_BIAS */
+ 880, /* GL_MAX_EVAL_ORDER */
+ 884, /* GL_MAX_LIGHTS */
+ 862, /* GL_MAX_CLIP_PLANES */
+ 932, /* GL_MAX_TEXTURE_SIZE */
+ 890, /* GL_MAX_PIXEL_MAP_TABLE */
+ 858, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ 887, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ 888, /* GL_MAX_NAME_STACK_DEPTH */
+ 916, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ 933, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ 947, /* GL_MAX_VIEWPORT_DIMS */
+ 859, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ 1544, /* GL_SUBPIXEL_BITS */
+ 637, /* GL_INDEX_BITS */
+ 1312, /* GL_RED_BITS */
+ 602, /* GL_GREEN_BITS */
92, /* GL_BLUE_BITS */
41, /* GL_ALPHA_BITS */
- 351, /* GL_DEPTH_BITS */
- 1499, /* GL_STENCIL_BITS */
+ 352, /* GL_DEPTH_BITS */
+ 1512, /* GL_STENCIL_BITS */
14, /* GL_ACCUM_RED_BITS */
13, /* GL_ACCUM_GREEN_BITS */
10, /* GL_ACCUM_BLUE_BITS */
9, /* GL_ACCUM_ALPHA_BITS */
- 1003, /* GL_NAME_STACK_DEPTH */
+ 1013, /* GL_NAME_STACK_DEPTH */
62, /* GL_AUTO_NORMAL */
- 739, /* GL_MAP1_COLOR_4 */
- 742, /* GL_MAP1_INDEX */
- 743, /* GL_MAP1_NORMAL */
- 744, /* GL_MAP1_TEXTURE_COORD_1 */
- 745, /* GL_MAP1_TEXTURE_COORD_2 */
- 746, /* GL_MAP1_TEXTURE_COORD_3 */
- 747, /* GL_MAP1_TEXTURE_COORD_4 */
- 748, /* GL_MAP1_VERTEX_3 */
- 749, /* GL_MAP1_VERTEX_4 */
- 766, /* GL_MAP2_COLOR_4 */
- 769, /* GL_MAP2_INDEX */
- 770, /* GL_MAP2_NORMAL */
- 771, /* GL_MAP2_TEXTURE_COORD_1 */
- 772, /* GL_MAP2_TEXTURE_COORD_2 */
- 773, /* GL_MAP2_TEXTURE_COORD_3 */
- 774, /* GL_MAP2_TEXTURE_COORD_4 */
- 775, /* GL_MAP2_VERTEX_3 */
- 776, /* GL_MAP2_VERTEX_4 */
- 740, /* GL_MAP1_GRID_DOMAIN */
- 741, /* GL_MAP1_GRID_SEGMENTS */
- 767, /* GL_MAP2_GRID_DOMAIN */
- 768, /* GL_MAP2_GRID_SEGMENTS */
- 1610, /* GL_TEXTURE_1D */
- 1612, /* GL_TEXTURE_2D */
- 479, /* GL_FEEDBACK_BUFFER_POINTER */
- 480, /* GL_FEEDBACK_BUFFER_SIZE */
- 481, /* GL_FEEDBACK_BUFFER_TYPE */
- 1410, /* GL_SELECTION_BUFFER_POINTER */
- 1411, /* GL_SELECTION_BUFFER_SIZE */
- 1728, /* GL_TEXTURE_WIDTH */
- 1692, /* GL_TEXTURE_HEIGHT */
- 1647, /* GL_TEXTURE_COMPONENTS */
- 1631, /* GL_TEXTURE_BORDER_COLOR */
- 1630, /* GL_TEXTURE_BORDER */
- 383, /* GL_DONT_CARE */
- 477, /* GL_FASTEST */
- 1011, /* GL_NICEST */
+ 746, /* GL_MAP1_COLOR_4 */
+ 749, /* GL_MAP1_INDEX */
+ 750, /* GL_MAP1_NORMAL */
+ 751, /* GL_MAP1_TEXTURE_COORD_1 */
+ 752, /* GL_MAP1_TEXTURE_COORD_2 */
+ 753, /* GL_MAP1_TEXTURE_COORD_3 */
+ 754, /* GL_MAP1_TEXTURE_COORD_4 */
+ 755, /* GL_MAP1_VERTEX_3 */
+ 756, /* GL_MAP1_VERTEX_4 */
+ 773, /* GL_MAP2_COLOR_4 */
+ 776, /* GL_MAP2_INDEX */
+ 777, /* GL_MAP2_NORMAL */
+ 778, /* GL_MAP2_TEXTURE_COORD_1 */
+ 779, /* GL_MAP2_TEXTURE_COORD_2 */
+ 780, /* GL_MAP2_TEXTURE_COORD_3 */
+ 781, /* GL_MAP2_TEXTURE_COORD_4 */
+ 782, /* GL_MAP2_VERTEX_3 */
+ 783, /* GL_MAP2_VERTEX_4 */
+ 747, /* GL_MAP1_GRID_DOMAIN */
+ 748, /* GL_MAP1_GRID_SEGMENTS */
+ 774, /* GL_MAP2_GRID_DOMAIN */
+ 775, /* GL_MAP2_GRID_SEGMENTS */
+ 1627, /* GL_TEXTURE_1D */
+ 1629, /* GL_TEXTURE_2D */
+ 482, /* GL_FEEDBACK_BUFFER_POINTER */
+ 483, /* GL_FEEDBACK_BUFFER_SIZE */
+ 484, /* GL_FEEDBACK_BUFFER_TYPE */
+ 1423, /* GL_SELECTION_BUFFER_POINTER */
+ 1424, /* GL_SELECTION_BUFFER_SIZE */
+ 1746, /* GL_TEXTURE_WIDTH */
+ 1709, /* GL_TEXTURE_HEIGHT */
+ 1664, /* GL_TEXTURE_COMPONENTS */
+ 1648, /* GL_TEXTURE_BORDER_COLOR */
+ 1647, /* GL_TEXTURE_BORDER */
+ 385, /* GL_DONT_CARE */
+ 480, /* GL_FASTEST */
+ 1021, /* GL_NICEST */
48, /* GL_AMBIENT */
- 380, /* GL_DIFFUSE */
- 1459, /* GL_SPECULAR */
- 1175, /* GL_POSITION */
- 1462, /* GL_SPOT_DIRECTION */
- 1463, /* GL_SPOT_EXPONENT */
- 1461, /* GL_SPOT_CUTOFF */
+ 382, /* GL_DIFFUSE */
+ 1472, /* GL_SPECULAR */
+ 1185, /* GL_POSITION */
+ 1475, /* GL_SPOT_DIRECTION */
+ 1476, /* GL_SPOT_EXPONENT */
+ 1474, /* GL_SPOT_CUTOFF */
275, /* GL_CONSTANT_ATTENUATION */
- 689, /* GL_LINEAR_ATTENUATION */
- 1274, /* GL_QUADRATIC_ATTENUATION */
+ 696, /* GL_LINEAR_ATTENUATION */
+ 1284, /* GL_QUADRATIC_ATTENUATION */
244, /* GL_COMPILE */
245, /* GL_COMPILE_AND_EXECUTE */
120, /* GL_BYTE */
- 1762, /* GL_UNSIGNED_BYTE */
- 1424, /* GL_SHORT */
- 1773, /* GL_UNSIGNED_SHORT */
- 638, /* GL_INT */
- 1765, /* GL_UNSIGNED_INT */
- 486, /* GL_FLOAT */
+ 1780, /* GL_UNSIGNED_BYTE */
+ 1437, /* GL_SHORT */
+ 1792, /* GL_UNSIGNED_SHORT */
+ 645, /* GL_INT */
+ 1783, /* GL_UNSIGNED_INT */
+ 489, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
7, /* GL_4_BYTES */
- 390, /* GL_DOUBLE */
+ 392, /* GL_DOUBLE */
132, /* GL_CLEAR */
50, /* GL_AND */
52, /* GL_AND_REVERSE */
299, /* GL_COPY */
51, /* GL_AND_INVERTED */
- 1013, /* GL_NOOP */
- 1856, /* GL_XOR */
- 1076, /* GL_OR */
- 1014, /* GL_NOR */
- 467, /* GL_EQUIV */
- 665, /* GL_INVERT */
- 1079, /* GL_OR_REVERSE */
+ 1023, /* GL_NOOP */
+ 1875, /* GL_XOR */
+ 1086, /* GL_OR */
+ 1024, /* GL_NOR */
+ 470, /* GL_EQUIV */
+ 672, /* GL_INVERT */
+ 1089, /* GL_OR_REVERSE */
300, /* GL_COPY_INVERTED */
- 1078, /* GL_OR_INVERTED */
- 1004, /* GL_NAND */
- 1415, /* GL_SET */
- 464, /* GL_EMISSION */
- 1423, /* GL_SHININESS */
+ 1088, /* GL_OR_INVERTED */
+ 1014, /* GL_NAND */
+ 1428, /* GL_SET */
+ 467, /* GL_EMISSION */
+ 1436, /* GL_SHININESS */
49, /* GL_AMBIENT_AND_DIFFUSE */
190, /* GL_COLOR_INDEXES */
- 954, /* GL_MODELVIEW */
- 1251, /* GL_PROJECTION */
- 1545, /* GL_TEXTURE */
+ 964, /* GL_MODELVIEW */
+ 1261, /* GL_PROJECTION */
+ 1562, /* GL_TEXTURE */
147, /* GL_COLOR */
346, /* GL_DEPTH */
- 1485, /* GL_STENCIL */
+ 1498, /* GL_STENCIL */
189, /* GL_COLOR_INDEX */
- 1504, /* GL_STENCIL_INDEX */
- 358, /* GL_DEPTH_COMPONENT */
- 1297, /* GL_RED */
- 593, /* GL_GREEN */
+ 1517, /* GL_STENCIL_INDEX */
+ 359, /* GL_DEPTH_COMPONENT */
+ 1308, /* GL_RED */
+ 600, /* GL_GREEN */
90, /* GL_BLUE */
31, /* GL_ALPHA */
- 1332, /* GL_RGB */
- 1351, /* GL_RGBA */
- 717, /* GL_LUMINANCE */
- 738, /* GL_LUMINANCE_ALPHA */
+ 1345, /* GL_RGB */
+ 1364, /* GL_RGBA */
+ 724, /* GL_LUMINANCE */
+ 745, /* GL_LUMINANCE_ALPHA */
73, /* GL_BITMAP */
- 1131, /* GL_POINT */
- 687, /* GL_LINE */
- 482, /* GL_FILL */
- 1306, /* GL_RENDER */
- 478, /* GL_FEEDBACK */
- 1409, /* GL_SELECT */
- 485, /* GL_FLAT */
- 1434, /* GL_SMOOTH */
- 666, /* GL_KEEP */
- 1326, /* GL_REPLACE */
- 620, /* GL_INCR */
+ 1141, /* GL_POINT */
+ 694, /* GL_LINE */
+ 485, /* GL_FILL */
+ 1317, /* GL_RENDER */
+ 481, /* GL_FEEDBACK */
+ 1422, /* GL_SELECT */
+ 488, /* GL_FLAT */
+ 1447, /* GL_SMOOTH */
+ 673, /* GL_KEEP */
+ 1339, /* GL_REPLACE */
+ 627, /* GL_INCR */
342, /* GL_DECR */
- 1788, /* GL_VENDOR */
- 1323, /* GL_RENDERER */
- 1789, /* GL_VERSION */
- 471, /* GL_EXTENSIONS */
- 1374, /* GL_S */
- 1536, /* GL_T */
- 1286, /* GL_R */
- 1273, /* GL_Q */
- 990, /* GL_MODULATE */
+ 1807, /* GL_VENDOR */
+ 1336, /* GL_RENDERER */
+ 1808, /* GL_VERSION */
+ 474, /* GL_EXTENSIONS */
+ 1387, /* GL_S */
+ 1553, /* GL_T */
+ 1296, /* GL_R */
+ 1283, /* GL_Q */
+ 1000, /* GL_MODULATE */
341, /* GL_DECAL */
- 1682, /* GL_TEXTURE_ENV_MODE */
- 1681, /* GL_TEXTURE_ENV_COLOR */
- 1680, /* GL_TEXTURE_ENV */
- 472, /* GL_EYE_LINEAR */
- 1037, /* GL_OBJECT_LINEAR */
- 1460, /* GL_SPHERE_MAP */
- 1684, /* GL_TEXTURE_GEN_MODE */
- 1039, /* GL_OBJECT_PLANE */
- 473, /* GL_EYE_PLANE */
- 1005, /* GL_NEAREST */
- 688, /* GL_LINEAR */
- 1009, /* GL_NEAREST_MIPMAP_NEAREST */
- 693, /* GL_LINEAR_MIPMAP_NEAREST */
- 1008, /* GL_NEAREST_MIPMAP_LINEAR */
- 692, /* GL_LINEAR_MIPMAP_LINEAR */
- 1705, /* GL_TEXTURE_MAG_FILTER */
- 1713, /* GL_TEXTURE_MIN_FILTER */
- 1730, /* GL_TEXTURE_WRAP_S */
- 1731, /* GL_TEXTURE_WRAP_T */
+ 1699, /* GL_TEXTURE_ENV_MODE */
+ 1698, /* GL_TEXTURE_ENV_COLOR */
+ 1697, /* GL_TEXTURE_ENV */
+ 475, /* GL_EYE_LINEAR */
+ 1047, /* GL_OBJECT_LINEAR */
+ 1473, /* GL_SPHERE_MAP */
+ 1701, /* GL_TEXTURE_GEN_MODE */
+ 1049, /* GL_OBJECT_PLANE */
+ 476, /* GL_EYE_PLANE */
+ 1015, /* GL_NEAREST */
+ 695, /* GL_LINEAR */
+ 1019, /* GL_NEAREST_MIPMAP_NEAREST */
+ 700, /* GL_LINEAR_MIPMAP_NEAREST */
+ 1018, /* GL_NEAREST_MIPMAP_LINEAR */
+ 699, /* GL_LINEAR_MIPMAP_LINEAR */
+ 1722, /* GL_TEXTURE_MAG_FILTER */
+ 1730, /* GL_TEXTURE_MIN_FILTER */
+ 1748, /* GL_TEXTURE_WRAP_S */
+ 1749, /* GL_TEXTURE_WRAP_T */
126, /* GL_CLAMP */
- 1325, /* GL_REPEAT */
- 1169, /* GL_POLYGON_OFFSET_UNITS */
- 1168, /* GL_POLYGON_OFFSET_POINT */
- 1167, /* GL_POLYGON_OFFSET_LINE */
- 1287, /* GL_R3_G3_B2 */
- 1785, /* GL_V2F */
- 1786, /* GL_V3F */
+ 1338, /* GL_REPEAT */
+ 1179, /* GL_POLYGON_OFFSET_UNITS */
+ 1178, /* GL_POLYGON_OFFSET_POINT */
+ 1177, /* GL_POLYGON_OFFSET_LINE */
+ 1297, /* GL_R3_G3_B2 */
+ 1804, /* GL_V2F */
+ 1805, /* GL_V3F */
123, /* GL_C4UB_V2F */
124, /* GL_C4UB_V3F */
121, /* GL_C3F_V3F */
- 1002, /* GL_N3F_V3F */
+ 1012, /* GL_N3F_V3F */
122, /* GL_C4F_N3F_V3F */
- 1541, /* GL_T2F_V3F */
- 1543, /* GL_T4F_V4F */
- 1539, /* GL_T2F_C4UB_V3F */
- 1537, /* GL_T2F_C3F_V3F */
- 1540, /* GL_T2F_N3F_V3F */
- 1538, /* GL_T2F_C4F_N3F_V3F */
- 1542, /* GL_T4F_C4F_N3F_V4F */
+ 1558, /* GL_T2F_V3F */
+ 1560, /* GL_T4F_V4F */
+ 1556, /* GL_T2F_C4UB_V3F */
+ 1554, /* GL_T2F_C3F_V3F */
+ 1557, /* GL_T2F_N3F_V3F */
+ 1555, /* GL_T2F_C4F_N3F_V3F */
+ 1559, /* GL_T4F_C4F_N3F_V4F */
139, /* GL_CLIP_PLANE0 */
140, /* GL_CLIP_PLANE1 */
141, /* GL_CLIP_PLANE2 */
142, /* GL_CLIP_PLANE3 */
143, /* GL_CLIP_PLANE4 */
144, /* GL_CLIP_PLANE5 */
- 672, /* GL_LIGHT0 */
- 673, /* GL_LIGHT1 */
- 674, /* GL_LIGHT2 */
- 675, /* GL_LIGHT3 */
- 676, /* GL_LIGHT4 */
- 677, /* GL_LIGHT5 */
- 678, /* GL_LIGHT6 */
- 679, /* GL_LIGHT7 */
- 597, /* GL_HINT_BIT */
+ 679, /* GL_LIGHT0 */
+ 680, /* GL_LIGHT1 */
+ 681, /* GL_LIGHT2 */
+ 682, /* GL_LIGHT3 */
+ 683, /* GL_LIGHT4 */
+ 684, /* GL_LIGHT5 */
+ 685, /* GL_LIGHT6 */
+ 686, /* GL_LIGHT7 */
+ 604, /* GL_HINT_BIT */
277, /* GL_CONSTANT_COLOR */
- 1050, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 1060, /* GL_ONE_MINUS_CONSTANT_COLOR */
272, /* GL_CONSTANT_ALPHA */
- 1048, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 1058, /* GL_ONE_MINUS_CONSTANT_ALPHA */
76, /* GL_BLEND_COLOR */
- 581, /* GL_FUNC_ADD */
- 938, /* GL_MIN */
- 848, /* GL_MAX */
+ 588, /* GL_FUNC_ADD */
+ 948, /* GL_MIN */
+ 855, /* GL_MAX */
81, /* GL_BLEND_EQUATION */
- 585, /* GL_FUNC_SUBTRACT */
- 583, /* GL_FUNC_REVERSE_SUBTRACT */
+ 592, /* GL_FUNC_SUBTRACT */
+ 590, /* GL_FUNC_REVERSE_SUBTRACT */
280, /* GL_CONVOLUTION_1D */
281, /* GL_CONVOLUTION_2D */
- 1412, /* GL_SEPARABLE_2D */
+ 1425, /* GL_SEPARABLE_2D */
284, /* GL_CONVOLUTION_BORDER_MODE */
288, /* GL_CONVOLUTION_FILTER_SCALE */
286, /* GL_CONVOLUTION_FILTER_BIAS */
- 1298, /* GL_REDUCE */
+ 1309, /* GL_REDUCE */
290, /* GL_CONVOLUTION_FORMAT */
294, /* GL_CONVOLUTION_WIDTH */
292, /* GL_CONVOLUTION_HEIGHT */
- 863, /* GL_MAX_CONVOLUTION_WIDTH */
- 861, /* GL_MAX_CONVOLUTION_HEIGHT */
- 1208, /* GL_POST_CONVOLUTION_RED_SCALE */
- 1204, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- 1199, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- 1195, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- 1206, /* GL_POST_CONVOLUTION_RED_BIAS */
- 1202, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- 1197, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- 1193, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- 598, /* GL_HISTOGRAM */
- 1257, /* GL_PROXY_HISTOGRAM */
- 614, /* GL_HISTOGRAM_WIDTH */
- 604, /* GL_HISTOGRAM_FORMAT */
- 610, /* GL_HISTOGRAM_RED_SIZE */
- 606, /* GL_HISTOGRAM_GREEN_SIZE */
- 601, /* GL_HISTOGRAM_BLUE_SIZE */
- 599, /* GL_HISTOGRAM_ALPHA_SIZE */
- 608, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- 612, /* GL_HISTOGRAM_SINK */
- 939, /* GL_MINMAX */
- 941, /* GL_MINMAX_FORMAT */
- 943, /* GL_MINMAX_SINK */
- 1544, /* GL_TABLE_TOO_LARGE_EXT */
- 1764, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1775, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1777, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1770, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1766, /* GL_UNSIGNED_INT_10_10_10_2 */
- 1166, /* GL_POLYGON_OFFSET_FILL */
- 1165, /* GL_POLYGON_OFFSET_FACTOR */
- 1164, /* GL_POLYGON_OFFSET_BIAS */
- 1329, /* GL_RESCALE_NORMAL */
+ 871, /* GL_MAX_CONVOLUTION_WIDTH */
+ 869, /* GL_MAX_CONVOLUTION_HEIGHT */
+ 1218, /* GL_POST_CONVOLUTION_RED_SCALE */
+ 1214, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ 1209, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ 1205, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ 1216, /* GL_POST_CONVOLUTION_RED_BIAS */
+ 1212, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ 1207, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ 1203, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ 605, /* GL_HISTOGRAM */
+ 1267, /* GL_PROXY_HISTOGRAM */
+ 621, /* GL_HISTOGRAM_WIDTH */
+ 611, /* GL_HISTOGRAM_FORMAT */
+ 617, /* GL_HISTOGRAM_RED_SIZE */
+ 613, /* GL_HISTOGRAM_GREEN_SIZE */
+ 608, /* GL_HISTOGRAM_BLUE_SIZE */
+ 606, /* GL_HISTOGRAM_ALPHA_SIZE */
+ 615, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ 619, /* GL_HISTOGRAM_SINK */
+ 949, /* GL_MINMAX */
+ 951, /* GL_MINMAX_FORMAT */
+ 953, /* GL_MINMAX_SINK */
+ 1561, /* GL_TABLE_TOO_LARGE_EXT */
+ 1782, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 1794, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 1796, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 1789, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 1784, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1176, /* GL_POLYGON_OFFSET_FILL */
+ 1175, /* GL_POLYGON_OFFSET_FACTOR */
+ 1174, /* GL_POLYGON_OFFSET_BIAS */
+ 1342, /* GL_RESCALE_NORMAL */
36, /* GL_ALPHA4 */
38, /* GL_ALPHA8 */
32, /* GL_ALPHA12 */
34, /* GL_ALPHA16 */
- 728, /* GL_LUMINANCE4 */
- 734, /* GL_LUMINANCE8 */
- 718, /* GL_LUMINANCE12 */
- 724, /* GL_LUMINANCE16 */
- 729, /* GL_LUMINANCE4_ALPHA4 */
- 732, /* GL_LUMINANCE6_ALPHA2 */
- 735, /* GL_LUMINANCE8_ALPHA8 */
- 721, /* GL_LUMINANCE12_ALPHA4 */
- 719, /* GL_LUMINANCE12_ALPHA12 */
- 725, /* GL_LUMINANCE16_ALPHA16 */
- 639, /* GL_INTENSITY */
- 644, /* GL_INTENSITY4 */
- 646, /* GL_INTENSITY8 */
- 640, /* GL_INTENSITY12 */
- 642, /* GL_INTENSITY16 */
- 1341, /* GL_RGB2_EXT */
- 1342, /* GL_RGB4 */
- 1345, /* GL_RGB5 */
- 1349, /* GL_RGB8 */
- 1333, /* GL_RGB10 */
- 1337, /* GL_RGB12 */
- 1339, /* GL_RGB16 */
- 1356, /* GL_RGBA2 */
- 1358, /* GL_RGBA4 */
- 1346, /* GL_RGB5_A1 */
- 1362, /* GL_RGBA8 */
- 1334, /* GL_RGB10_A2 */
- 1352, /* GL_RGBA12 */
- 1354, /* GL_RGBA16 */
- 1720, /* GL_TEXTURE_RED_SIZE */
- 1690, /* GL_TEXTURE_GREEN_SIZE */
- 1628, /* GL_TEXTURE_BLUE_SIZE */
- 1615, /* GL_TEXTURE_ALPHA_SIZE */
- 1703, /* GL_TEXTURE_LUMINANCE_SIZE */
- 1694, /* GL_TEXTURE_INTENSITY_SIZE */
- 1327, /* GL_REPLACE_EXT */
- 1261, /* GL_PROXY_TEXTURE_1D */
- 1264, /* GL_PROXY_TEXTURE_2D */
- 1726, /* GL_TEXTURE_TOO_LARGE_EXT */
- 1715, /* GL_TEXTURE_PRIORITY */
- 1722, /* GL_TEXTURE_RESIDENT */
- 1618, /* GL_TEXTURE_BINDING_1D */
- 1620, /* GL_TEXTURE_BINDING_2D */
- 1622, /* GL_TEXTURE_BINDING_3D */
- 1086, /* GL_PACK_SKIP_IMAGES */
- 1082, /* GL_PACK_IMAGE_HEIGHT */
- 1757, /* GL_UNPACK_SKIP_IMAGES */
- 1754, /* GL_UNPACK_IMAGE_HEIGHT */
- 1614, /* GL_TEXTURE_3D */
- 1267, /* GL_PROXY_TEXTURE_3D */
- 1677, /* GL_TEXTURE_DEPTH */
- 1729, /* GL_TEXTURE_WRAP_R */
- 849, /* GL_MAX_3D_TEXTURE_SIZE */
- 1790, /* GL_VERTEX_ARRAY */
- 1016, /* GL_NORMAL_ARRAY */
+ 735, /* GL_LUMINANCE4 */
+ 741, /* GL_LUMINANCE8 */
+ 725, /* GL_LUMINANCE12 */
+ 731, /* GL_LUMINANCE16 */
+ 736, /* GL_LUMINANCE4_ALPHA4 */
+ 739, /* GL_LUMINANCE6_ALPHA2 */
+ 742, /* GL_LUMINANCE8_ALPHA8 */
+ 728, /* GL_LUMINANCE12_ALPHA4 */
+ 726, /* GL_LUMINANCE12_ALPHA12 */
+ 732, /* GL_LUMINANCE16_ALPHA16 */
+ 646, /* GL_INTENSITY */
+ 651, /* GL_INTENSITY4 */
+ 653, /* GL_INTENSITY8 */
+ 647, /* GL_INTENSITY12 */
+ 649, /* GL_INTENSITY16 */
+ 1354, /* GL_RGB2_EXT */
+ 1355, /* GL_RGB4 */
+ 1358, /* GL_RGB5 */
+ 1362, /* GL_RGB8 */
+ 1346, /* GL_RGB10 */
+ 1350, /* GL_RGB12 */
+ 1352, /* GL_RGB16 */
+ 1369, /* GL_RGBA2 */
+ 1371, /* GL_RGBA4 */
+ 1359, /* GL_RGB5_A1 */
+ 1375, /* GL_RGBA8 */
+ 1347, /* GL_RGB10_A2 */
+ 1365, /* GL_RGBA12 */
+ 1367, /* GL_RGBA16 */
+ 1737, /* GL_TEXTURE_RED_SIZE */
+ 1707, /* GL_TEXTURE_GREEN_SIZE */
+ 1645, /* GL_TEXTURE_BLUE_SIZE */
+ 1632, /* GL_TEXTURE_ALPHA_SIZE */
+ 1720, /* GL_TEXTURE_LUMINANCE_SIZE */
+ 1711, /* GL_TEXTURE_INTENSITY_SIZE */
+ 1340, /* GL_REPLACE_EXT */
+ 1271, /* GL_PROXY_TEXTURE_1D */
+ 1274, /* GL_PROXY_TEXTURE_2D */
+ 1744, /* GL_TEXTURE_TOO_LARGE_EXT */
+ 1732, /* GL_TEXTURE_PRIORITY */
+ 1739, /* GL_TEXTURE_RESIDENT */
+ 1635, /* GL_TEXTURE_BINDING_1D */
+ 1637, /* GL_TEXTURE_BINDING_2D */
+ 1639, /* GL_TEXTURE_BINDING_3D */
+ 1096, /* GL_PACK_SKIP_IMAGES */
+ 1092, /* GL_PACK_IMAGE_HEIGHT */
+ 1775, /* GL_UNPACK_SKIP_IMAGES */
+ 1772, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1631, /* GL_TEXTURE_3D */
+ 1277, /* GL_PROXY_TEXTURE_3D */
+ 1694, /* GL_TEXTURE_DEPTH */
+ 1747, /* GL_TEXTURE_WRAP_R */
+ 856, /* GL_MAX_3D_TEXTURE_SIZE */
+ 1809, /* GL_VERTEX_ARRAY */
+ 1026, /* GL_NORMAL_ARRAY */
148, /* GL_COLOR_ARRAY */
- 624, /* GL_INDEX_ARRAY */
- 1655, /* GL_TEXTURE_COORD_ARRAY */
- 456, /* GL_EDGE_FLAG_ARRAY */
- 1796, /* GL_VERTEX_ARRAY_SIZE */
- 1798, /* GL_VERTEX_ARRAY_TYPE */
- 1797, /* GL_VERTEX_ARRAY_STRIDE */
- 1021, /* GL_NORMAL_ARRAY_TYPE */
- 1020, /* GL_NORMAL_ARRAY_STRIDE */
+ 631, /* GL_INDEX_ARRAY */
+ 1672, /* GL_TEXTURE_COORD_ARRAY */
+ 459, /* GL_EDGE_FLAG_ARRAY */
+ 1815, /* GL_VERTEX_ARRAY_SIZE */
+ 1817, /* GL_VERTEX_ARRAY_TYPE */
+ 1816, /* GL_VERTEX_ARRAY_STRIDE */
+ 1031, /* GL_NORMAL_ARRAY_TYPE */
+ 1030, /* GL_NORMAL_ARRAY_STRIDE */
152, /* GL_COLOR_ARRAY_SIZE */
154, /* GL_COLOR_ARRAY_TYPE */
153, /* GL_COLOR_ARRAY_STRIDE */
- 629, /* GL_INDEX_ARRAY_TYPE */
- 628, /* GL_INDEX_ARRAY_STRIDE */
- 1659, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- 1661, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- 1660, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- 460, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1795, /* GL_VERTEX_ARRAY_POINTER */
- 1019, /* GL_NORMAL_ARRAY_POINTER */
+ 636, /* GL_INDEX_ARRAY_TYPE */
+ 635, /* GL_INDEX_ARRAY_STRIDE */
+ 1676, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ 1678, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ 1677, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ 463, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ 1814, /* GL_VERTEX_ARRAY_POINTER */
+ 1029, /* GL_NORMAL_ARRAY_POINTER */
151, /* GL_COLOR_ARRAY_POINTER */
- 627, /* GL_INDEX_ARRAY_POINTER */
- 1658, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- 459, /* GL_EDGE_FLAG_ARRAY_POINTER */
- 995, /* GL_MULTISAMPLE */
- 1386, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- 1388, /* GL_SAMPLE_ALPHA_TO_ONE */
- 1393, /* GL_SAMPLE_COVERAGE */
- 1390, /* GL_SAMPLE_BUFFERS */
- 1381, /* GL_SAMPLES */
- 1397, /* GL_SAMPLE_COVERAGE_VALUE */
- 1395, /* GL_SAMPLE_COVERAGE_INVERT */
+ 634, /* GL_INDEX_ARRAY_POINTER */
+ 1675, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ 462, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ 1005, /* GL_MULTISAMPLE */
+ 1399, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ 1401, /* GL_SAMPLE_ALPHA_TO_ONE */
+ 1406, /* GL_SAMPLE_COVERAGE */
+ 1403, /* GL_SAMPLE_BUFFERS */
+ 1394, /* GL_SAMPLES */
+ 1410, /* GL_SAMPLE_COVERAGE_VALUE */
+ 1408, /* GL_SAMPLE_COVERAGE_INVERT */
195, /* GL_COLOR_MATRIX */
197, /* GL_COLOR_MATRIX_STACK_DEPTH */
- 857, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- 1191, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- 1187, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- 1182, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- 1178, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- 1189, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- 1185, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- 1180, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- 1176, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- 1638, /* GL_TEXTURE_COLOR_TABLE_SGI */
- 1268, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- 1640, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ 865, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ 1201, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ 1197, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ 1192, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ 1188, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ 1199, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ 1195, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ 1190, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ 1186, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ 1655, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ 1278, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ 1657, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
80, /* GL_BLEND_DST_RGB */
89, /* GL_BLEND_SRC_RGB */
79, /* GL_BLEND_DST_ALPHA */
88, /* GL_BLEND_SRC_ALPHA */
201, /* GL_COLOR_TABLE */
- 1201, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- 1184, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- 1256, /* GL_PROXY_COLOR_TABLE */
- 1260, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- 1259, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1211, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ 1194, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1266, /* GL_PROXY_COLOR_TABLE */
+ 1270, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ 1269, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
225, /* GL_COLOR_TABLE_SCALE */
205, /* GL_COLOR_TABLE_BIAS */
210, /* GL_COLOR_TABLE_FORMAT */
@@ -4379,380 +4417,380 @@ static const unsigned reduced_enums[1347] =
216, /* GL_COLOR_TABLE_INTENSITY_SIZE */
71, /* GL_BGR */
72, /* GL_BGRA */
- 871, /* GL_MAX_ELEMENTS_VERTICES */
- 870, /* GL_MAX_ELEMENTS_INDICES */
- 1693, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 879, /* GL_MAX_ELEMENTS_VERTICES */
+ 878, /* GL_MAX_ELEMENTS_INDICES */
+ 1710, /* GL_TEXTURE_INDEX_SIZE_EXT */
145, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- 1148, /* GL_POINT_SIZE_MIN */
- 1144, /* GL_POINT_SIZE_MAX */
- 1138, /* GL_POINT_FADE_THRESHOLD_SIZE */
- 1134, /* GL_POINT_DISTANCE_ATTENUATION */
+ 1158, /* GL_POINT_SIZE_MIN */
+ 1154, /* GL_POINT_SIZE_MAX */
+ 1148, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1144, /* GL_POINT_DISTANCE_ATTENUATION */
127, /* GL_CLAMP_TO_BORDER */
130, /* GL_CLAMP_TO_EDGE */
- 1714, /* GL_TEXTURE_MIN_LOD */
- 1712, /* GL_TEXTURE_MAX_LOD */
- 1617, /* GL_TEXTURE_BASE_LEVEL */
- 1711, /* GL_TEXTURE_MAX_LEVEL */
- 617, /* GL_IGNORE_BORDER_HP */
+ 1731, /* GL_TEXTURE_MIN_LOD */
+ 1729, /* GL_TEXTURE_MAX_LOD */
+ 1634, /* GL_TEXTURE_BASE_LEVEL */
+ 1728, /* GL_TEXTURE_MAX_LEVEL */
+ 624, /* GL_IGNORE_BORDER_HP */
276, /* GL_CONSTANT_BORDER_HP */
- 1328, /* GL_REPLICATE_BORDER_HP */
+ 1341, /* GL_REPLICATE_BORDER_HP */
282, /* GL_CONVOLUTION_BORDER_COLOR */
- 1045, /* GL_OCCLUSION_TEST_HP */
- 1046, /* GL_OCCLUSION_TEST_RESULT_HP */
- 690, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- 1632, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- 1634, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- 1636, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- 1637, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1635, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- 1633, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- 853, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- 854, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1211, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- 1213, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- 1210, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- 1212, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- 1701, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- 1702, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- 1700, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- 587, /* GL_GENERATE_MIPMAP */
- 588, /* GL_GENERATE_MIPMAP_HINT */
- 529, /* GL_FOG_OFFSET_SGIX */
- 530, /* GL_FOG_OFFSET_VALUE_SGIX */
- 1646, /* GL_TEXTURE_COMPARE_SGIX */
- 1645, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- 1697, /* GL_TEXTURE_LEQUAL_R_SGIX */
- 1689, /* GL_TEXTURE_GEQUAL_R_SGIX */
- 359, /* GL_DEPTH_COMPONENT16 */
- 362, /* GL_DEPTH_COMPONENT24 */
- 365, /* GL_DEPTH_COMPONENT32 */
+ 1055, /* GL_OCCLUSION_TEST_HP */
+ 1056, /* GL_OCCLUSION_TEST_RESULT_HP */
+ 697, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ 1649, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ 1651, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ 1653, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ 1654, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1652, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ 1650, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ 860, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ 861, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1221, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ 1223, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ 1220, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ 1222, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ 1718, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ 1719, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ 1717, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ 594, /* GL_GENERATE_MIPMAP */
+ 595, /* GL_GENERATE_MIPMAP_HINT */
+ 532, /* GL_FOG_OFFSET_SGIX */
+ 533, /* GL_FOG_OFFSET_VALUE_SGIX */
+ 1663, /* GL_TEXTURE_COMPARE_SGIX */
+ 1662, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ 1714, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ 1706, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ 360, /* GL_DEPTH_COMPONENT16 */
+ 363, /* GL_DEPTH_COMPONENT24 */
+ 366, /* GL_DEPTH_COMPONENT32 */
306, /* GL_CULL_VERTEX_EXT */
308, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
307, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 1853, /* GL_WRAP_BORDER_SUN */
- 1639, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- 683, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- 1427, /* GL_SINGLE_COLOR */
- 1413, /* GL_SEPARATE_SPECULAR_COLOR */
- 1422, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- 540, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- 541, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- 548, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- 543, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- 539, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- 538, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- 542, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- 549, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- 560, /* GL_FRAMEBUFFER_DEFAULT */
- 573, /* GL_FRAMEBUFFER_UNDEFINED */
- 372, /* GL_DEPTH_STENCIL_ATTACHMENT */
- 623, /* GL_INDEX */
- 1763, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1778, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1779, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1776, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1774, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1771, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1769, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- 1709, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- 1710, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- 1708, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- 946, /* GL_MIRRORED_REPEAT */
- 1369, /* GL_RGB_S3TC */
- 1344, /* GL_RGB4_S3TC */
- 1367, /* GL_RGBA_S3TC */
- 1361, /* GL_RGBA4_S3TC */
- 1365, /* GL_RGBA_DXT5_S3TC */
- 1359, /* GL_RGBA4_DXT5_S3TC */
+ 1872, /* GL_WRAP_BORDER_SUN */
+ 1656, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ 690, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ 1440, /* GL_SINGLE_COLOR */
+ 1426, /* GL_SEPARATE_SPECULAR_COLOR */
+ 1435, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ 543, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ 544, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ 551, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ 546, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ 542, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ 541, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ 545, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ 552, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ 564, /* GL_FRAMEBUFFER_DEFAULT */
+ 580, /* GL_FRAMEBUFFER_UNDEFINED */
+ 373, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ 630, /* GL_INDEX */
+ 1781, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 1797, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 1798, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 1795, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 1793, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 1790, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 1788, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 1726, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ 1727, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ 1725, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ 956, /* GL_MIRRORED_REPEAT */
+ 1382, /* GL_RGB_S3TC */
+ 1357, /* GL_RGB4_S3TC */
+ 1380, /* GL_RGBA_S3TC */
+ 1374, /* GL_RGBA4_S3TC */
+ 1378, /* GL_RGBA_DXT5_S3TC */
+ 1372, /* GL_RGBA4_DXT5_S3TC */
264, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
259, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
260, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
261, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- 1007, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- 1006, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- 691, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- 516, /* GL_FOG_COORDINATE_SOURCE */
- 508, /* GL_FOG_COORD */
- 532, /* GL_FRAGMENT_DEPTH */
+ 1017, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ 1016, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ 698, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ 519, /* GL_FOG_COORDINATE_SOURCE */
+ 511, /* GL_FOG_COORD */
+ 535, /* GL_FRAGMENT_DEPTH */
312, /* GL_CURRENT_FOG_COORD */
- 515, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- 514, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- 513, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- 510, /* GL_FOG_COORDINATE_ARRAY */
+ 518, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ 517, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ 516, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ 513, /* GL_FOG_COORDINATE_ARRAY */
199, /* GL_COLOR_SUM */
332, /* GL_CURRENT_SECONDARY_COLOR */
- 1406, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- 1408, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- 1407, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- 1405, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- 1402, /* GL_SECONDARY_COLOR_ARRAY */
+ 1419, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ 1421, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ 1420, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ 1418, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ 1415, /* GL_SECONDARY_COLOR_ARRAY */
330, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
28, /* GL_ALIASED_POINT_SIZE_RANGE */
27, /* GL_ALIASED_LINE_WIDTH_RANGE */
- 1546, /* GL_TEXTURE0 */
- 1548, /* GL_TEXTURE1 */
- 1570, /* GL_TEXTURE2 */
- 1592, /* GL_TEXTURE3 */
- 1598, /* GL_TEXTURE4 */
- 1600, /* GL_TEXTURE5 */
- 1602, /* GL_TEXTURE6 */
- 1604, /* GL_TEXTURE7 */
- 1606, /* GL_TEXTURE8 */
- 1608, /* GL_TEXTURE9 */
- 1549, /* GL_TEXTURE10 */
- 1551, /* GL_TEXTURE11 */
- 1553, /* GL_TEXTURE12 */
- 1555, /* GL_TEXTURE13 */
- 1557, /* GL_TEXTURE14 */
- 1559, /* GL_TEXTURE15 */
- 1561, /* GL_TEXTURE16 */
- 1563, /* GL_TEXTURE17 */
- 1565, /* GL_TEXTURE18 */
- 1567, /* GL_TEXTURE19 */
- 1571, /* GL_TEXTURE20 */
- 1573, /* GL_TEXTURE21 */
- 1575, /* GL_TEXTURE22 */
- 1577, /* GL_TEXTURE23 */
- 1579, /* GL_TEXTURE24 */
- 1581, /* GL_TEXTURE25 */
- 1583, /* GL_TEXTURE26 */
- 1585, /* GL_TEXTURE27 */
- 1587, /* GL_TEXTURE28 */
- 1589, /* GL_TEXTURE29 */
- 1593, /* GL_TEXTURE30 */
- 1595, /* GL_TEXTURE31 */
+ 1563, /* GL_TEXTURE0 */
+ 1565, /* GL_TEXTURE1 */
+ 1587, /* GL_TEXTURE2 */
+ 1609, /* GL_TEXTURE3 */
+ 1615, /* GL_TEXTURE4 */
+ 1617, /* GL_TEXTURE5 */
+ 1619, /* GL_TEXTURE6 */
+ 1621, /* GL_TEXTURE7 */
+ 1623, /* GL_TEXTURE8 */
+ 1625, /* GL_TEXTURE9 */
+ 1566, /* GL_TEXTURE10 */
+ 1568, /* GL_TEXTURE11 */
+ 1570, /* GL_TEXTURE12 */
+ 1572, /* GL_TEXTURE13 */
+ 1574, /* GL_TEXTURE14 */
+ 1576, /* GL_TEXTURE15 */
+ 1578, /* GL_TEXTURE16 */
+ 1580, /* GL_TEXTURE17 */
+ 1582, /* GL_TEXTURE18 */
+ 1584, /* GL_TEXTURE19 */
+ 1588, /* GL_TEXTURE20 */
+ 1590, /* GL_TEXTURE21 */
+ 1592, /* GL_TEXTURE22 */
+ 1594, /* GL_TEXTURE23 */
+ 1596, /* GL_TEXTURE24 */
+ 1598, /* GL_TEXTURE25 */
+ 1600, /* GL_TEXTURE26 */
+ 1602, /* GL_TEXTURE27 */
+ 1604, /* GL_TEXTURE28 */
+ 1606, /* GL_TEXTURE29 */
+ 1610, /* GL_TEXTURE30 */
+ 1612, /* GL_TEXTURE31 */
18, /* GL_ACTIVE_TEXTURE */
133, /* GL_CLIENT_ACTIVE_TEXTURE */
- 924, /* GL_MAX_TEXTURE_UNITS */
- 1741, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1744, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1746, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1738, /* GL_TRANSPOSE_COLOR_MATRIX */
- 1528, /* GL_SUBTRACT */
- 911, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ 934, /* GL_MAX_TEXTURE_UNITS */
+ 1759, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 1762, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 1764, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 1756, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1545, /* GL_SUBTRACT */
+ 919, /* GL_MAX_RENDERBUFFER_SIZE */
247, /* GL_COMPRESSED_ALPHA */
251, /* GL_COMPRESSED_LUMINANCE */
252, /* GL_COMPRESSED_LUMINANCE_ALPHA */
249, /* GL_COMPRESSED_INTENSITY */
255, /* GL_COMPRESSED_RGB */
256, /* GL_COMPRESSED_RGBA */
- 1653, /* GL_TEXTURE_COMPRESSION_HINT */
- 1718, /* GL_TEXTURE_RECTANGLE_ARB */
- 1625, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- 1271, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- 909, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- 371, /* GL_DEPTH_STENCIL */
- 1767, /* GL_UNSIGNED_INT_24_8 */
- 920, /* GL_MAX_TEXTURE_LOD_BIAS */
- 1707, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- 921, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- 1683, /* GL_TEXTURE_FILTER_CONTROL */
- 1698, /* GL_TEXTURE_LOD_BIAS */
+ 1670, /* GL_TEXTURE_COMPRESSION_HINT */
+ 1735, /* GL_TEXTURE_RECTANGLE_ARB */
+ 1642, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ 1281, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ 917, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ 372, /* GL_DEPTH_STENCIL */
+ 1785, /* GL_UNSIGNED_INT_24_8 */
+ 930, /* GL_MAX_TEXTURE_LOD_BIAS */
+ 1724, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ 931, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1700, /* GL_TEXTURE_FILTER_CONTROL */
+ 1715, /* GL_TEXTURE_LOD_BIAS */
232, /* GL_COMBINE4 */
- 914, /* GL_MAX_SHININESS_NV */
- 915, /* GL_MAX_SPOT_EXPONENT_NV */
- 621, /* GL_INCR_WRAP */
+ 924, /* GL_MAX_SHININESS_NV */
+ 925, /* GL_MAX_SPOT_EXPONENT_NV */
+ 628, /* GL_INCR_WRAP */
343, /* GL_DECR_WRAP */
- 966, /* GL_MODELVIEW1_ARB */
- 1022, /* GL_NORMAL_MAP */
- 1303, /* GL_REFLECTION_MAP */
- 1662, /* GL_TEXTURE_CUBE_MAP */
- 1623, /* GL_TEXTURE_BINDING_CUBE_MAP */
- 1670, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- 1664, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- 1672, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- 1666, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- 1674, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- 1668, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- 1269, /* GL_PROXY_TEXTURE_CUBE_MAP */
- 865, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- 1001, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- 524, /* GL_FOG_DISTANCE_MODE_NV */
- 475, /* GL_EYE_RADIAL_NV */
- 474, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ 976, /* GL_MODELVIEW1_ARB */
+ 1032, /* GL_NORMAL_MAP */
+ 1314, /* GL_REFLECTION_MAP */
+ 1679, /* GL_TEXTURE_CUBE_MAP */
+ 1640, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ 1687, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ 1681, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ 1689, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ 1683, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ 1691, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ 1685, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ 1279, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ 873, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ 1011, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ 527, /* GL_FOG_DISTANCE_MODE_NV */
+ 478, /* GL_EYE_RADIAL_NV */
+ 477, /* GL_EYE_PLANE_ABSOLUTE_NV */
231, /* GL_COMBINE */
238, /* GL_COMBINE_RGB */
233, /* GL_COMBINE_ALPHA */
- 1370, /* GL_RGB_SCALE */
+ 1383, /* GL_RGB_SCALE */
24, /* GL_ADD_SIGNED */
- 649, /* GL_INTERPOLATE */
+ 656, /* GL_INTERPOLATE */
271, /* GL_CONSTANT */
- 1217, /* GL_PRIMARY_COLOR */
- 1214, /* GL_PREVIOUS */
- 1442, /* GL_SOURCE0_RGB */
- 1448, /* GL_SOURCE1_RGB */
- 1454, /* GL_SOURCE2_RGB */
- 1458, /* GL_SOURCE3_RGB_NV */
- 1439, /* GL_SOURCE0_ALPHA */
- 1445, /* GL_SOURCE1_ALPHA */
- 1451, /* GL_SOURCE2_ALPHA */
- 1457, /* GL_SOURCE3_ALPHA_NV */
- 1059, /* GL_OPERAND0_RGB */
- 1065, /* GL_OPERAND1_RGB */
- 1071, /* GL_OPERAND2_RGB */
- 1075, /* GL_OPERAND3_RGB_NV */
- 1056, /* GL_OPERAND0_ALPHA */
- 1062, /* GL_OPERAND1_ALPHA */
- 1068, /* GL_OPERAND2_ALPHA */
- 1074, /* GL_OPERAND3_ALPHA_NV */
- 1791, /* GL_VERTEX_ARRAY_BINDING */
- 1716, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- 1717, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 1857, /* GL_YCBCR_422_APPLE */
- 1780, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1782, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- 1725, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- 1519, /* GL_STORAGE_PRIVATE_APPLE */
- 1518, /* GL_STORAGE_CACHED_APPLE */
- 1520, /* GL_STORAGE_SHARED_APPLE */
- 1429, /* GL_SLICE_ACCUM_SUN */
- 1278, /* GL_QUAD_MESH_SUN */
- 1750, /* GL_TRIANGLE_MESH_SUN */
- 1830, /* GL_VERTEX_PROGRAM_ARB */
- 1841, /* GL_VERTEX_STATE_PROGRAM_NV */
- 1817, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 1823, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 1825, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 1827, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 1227, /* GL_PRIMARY_COLOR */
+ 1224, /* GL_PREVIOUS */
+ 1455, /* GL_SOURCE0_RGB */
+ 1461, /* GL_SOURCE1_RGB */
+ 1467, /* GL_SOURCE2_RGB */
+ 1471, /* GL_SOURCE3_RGB_NV */
+ 1452, /* GL_SOURCE0_ALPHA */
+ 1458, /* GL_SOURCE1_ALPHA */
+ 1464, /* GL_SOURCE2_ALPHA */
+ 1470, /* GL_SOURCE3_ALPHA_NV */
+ 1069, /* GL_OPERAND0_RGB */
+ 1075, /* GL_OPERAND1_RGB */
+ 1081, /* GL_OPERAND2_RGB */
+ 1085, /* GL_OPERAND3_RGB_NV */
+ 1066, /* GL_OPERAND0_ALPHA */
+ 1072, /* GL_OPERAND1_ALPHA */
+ 1078, /* GL_OPERAND2_ALPHA */
+ 1084, /* GL_OPERAND3_ALPHA_NV */
+ 1810, /* GL_VERTEX_ARRAY_BINDING */
+ 1733, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ 1734, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ 1876, /* GL_YCBCR_422_APPLE */
+ 1799, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 1801, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 1743, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ 1536, /* GL_STORAGE_PRIVATE_APPLE */
+ 1535, /* GL_STORAGE_CACHED_APPLE */
+ 1537, /* GL_STORAGE_SHARED_APPLE */
+ 1442, /* GL_SLICE_ACCUM_SUN */
+ 1288, /* GL_QUAD_MESH_SUN */
+ 1768, /* GL_TRIANGLE_MESH_SUN */
+ 1849, /* GL_VERTEX_PROGRAM_ARB */
+ 1860, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 1836, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 1842, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 1844, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 1846, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
334, /* GL_CURRENT_VERTEX_ATTRIB */
- 1230, /* GL_PROGRAM_LENGTH_ARB */
- 1244, /* GL_PROGRAM_STRING_ARB */
- 988, /* GL_MODELVIEW_PROJECTION_NV */
- 616, /* GL_IDENTITY_NV */
- 663, /* GL_INVERSE_NV */
- 1743, /* GL_TRANSPOSE_NV */
- 664, /* GL_INVERSE_TRANSPOSE_NV */
- 895, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- 894, /* GL_MAX_PROGRAM_MATRICES_ARB */
- 802, /* GL_MATRIX0_NV */
- 814, /* GL_MATRIX1_NV */
- 826, /* GL_MATRIX2_NV */
- 830, /* GL_MATRIX3_NV */
- 832, /* GL_MATRIX4_NV */
- 834, /* GL_MATRIX5_NV */
- 836, /* GL_MATRIX6_NV */
- 838, /* GL_MATRIX7_NV */
+ 1240, /* GL_PROGRAM_LENGTH_ARB */
+ 1254, /* GL_PROGRAM_STRING_ARB */
+ 998, /* GL_MODELVIEW_PROJECTION_NV */
+ 623, /* GL_IDENTITY_NV */
+ 670, /* GL_INVERSE_NV */
+ 1761, /* GL_TRANSPOSE_NV */
+ 671, /* GL_INVERSE_TRANSPOSE_NV */
+ 903, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ 902, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ 809, /* GL_MATRIX0_NV */
+ 821, /* GL_MATRIX1_NV */
+ 833, /* GL_MATRIX2_NV */
+ 837, /* GL_MATRIX3_NV */
+ 839, /* GL_MATRIX4_NV */
+ 841, /* GL_MATRIX5_NV */
+ 843, /* GL_MATRIX6_NV */
+ 845, /* GL_MATRIX7_NV */
318, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
315, /* GL_CURRENT_MATRIX_ARB */
- 1833, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- 1836, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- 1242, /* GL_PROGRAM_PARAMETER_NV */
- 1821, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- 1246, /* GL_PROGRAM_TARGET_NV */
- 1243, /* GL_PROGRAM_RESIDENT_NV */
- 1735, /* GL_TRACK_MATRIX_NV */
- 1736, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 1831, /* GL_VERTEX_PROGRAM_BINDING_NV */
- 1224, /* GL_PROGRAM_ERROR_POSITION_ARB */
- 355, /* GL_DEPTH_CLAMP */
- 1799, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 1806, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 1807, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 1808, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 1809, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 1810, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 1811, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 1812, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 1813, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 1814, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1800, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1801, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1802, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1803, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1804, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 1805, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- 750, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- 757, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- 758, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- 759, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- 760, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- 761, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- 762, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- 763, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- 764, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- 765, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- 751, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- 752, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- 753, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- 754, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- 755, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- 756, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- 777, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- 784, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- 785, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- 786, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- 787, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- 788, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- 789, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- 1223, /* GL_PROGRAM_BINDING_ARB */
- 791, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- 792, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- 778, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- 779, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- 780, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- 781, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- 782, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- 783, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- 1651, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- 1648, /* GL_TEXTURE_COMPRESSED */
- 1027, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ 1852, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ 1855, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1252, /* GL_PROGRAM_PARAMETER_NV */
+ 1840, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1256, /* GL_PROGRAM_TARGET_NV */
+ 1253, /* GL_PROGRAM_RESIDENT_NV */
+ 1753, /* GL_TRACK_MATRIX_NV */
+ 1754, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 1850, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1234, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ 356, /* GL_DEPTH_CLAMP */
+ 1818, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 1825, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 1826, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 1827, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 1828, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 1829, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 1830, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 1831, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 1832, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 1833, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 1819, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 1820, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 1821, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 1822, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 1823, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 1824, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 757, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ 764, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ 765, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ 766, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ 767, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ 768, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ 769, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ 770, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ 771, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ 772, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ 758, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ 759, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ 760, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ 761, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ 762, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ 763, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ 784, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ 791, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ 792, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ 793, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ 794, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ 795, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ 796, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ 1233, /* GL_PROGRAM_BINDING_ARB */
+ 798, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ 799, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ 785, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ 786, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ 787, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ 788, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ 789, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ 790, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ 1668, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ 1665, /* GL_TEXTURE_COMPRESSED */
+ 1037, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
269, /* GL_COMPRESSED_TEXTURE_FORMATS */
- 936, /* GL_MAX_VERTEX_UNITS_ARB */
+ 946, /* GL_MAX_VERTEX_UNITS_ARB */
22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 1852, /* GL_WEIGHT_SUM_UNITY_ARB */
- 1829, /* GL_VERTEX_BLEND_ARB */
+ 1871, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 1848, /* GL_VERTEX_BLEND_ARB */
336, /* GL_CURRENT_WEIGHT_ARB */
- 1851, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 1850, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 1849, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 1848, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 1845, /* GL_WEIGHT_ARRAY_ARB */
- 384, /* GL_DOT3_RGB */
- 385, /* GL_DOT3_RGBA */
+ 1870, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 1869, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 1868, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 1867, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 1864, /* GL_WEIGHT_ARRAY_ARB */
+ 386, /* GL_DOT3_RGB */
+ 387, /* GL_DOT3_RGBA */
263, /* GL_COMPRESSED_RGB_FXT1_3DFX */
258, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- 996, /* GL_MULTISAMPLE_3DFX */
- 1391, /* GL_SAMPLE_BUFFERS_3DFX */
- 1382, /* GL_SAMPLES_3DFX */
- 977, /* GL_MODELVIEW2_ARB */
- 980, /* GL_MODELVIEW3_ARB */
- 981, /* GL_MODELVIEW4_ARB */
- 982, /* GL_MODELVIEW5_ARB */
- 983, /* GL_MODELVIEW6_ARB */
- 984, /* GL_MODELVIEW7_ARB */
- 985, /* GL_MODELVIEW8_ARB */
- 986, /* GL_MODELVIEW9_ARB */
- 956, /* GL_MODELVIEW10_ARB */
- 957, /* GL_MODELVIEW11_ARB */
- 958, /* GL_MODELVIEW12_ARB */
- 959, /* GL_MODELVIEW13_ARB */
- 960, /* GL_MODELVIEW14_ARB */
- 961, /* GL_MODELVIEW15_ARB */
- 962, /* GL_MODELVIEW16_ARB */
- 963, /* GL_MODELVIEW17_ARB */
- 964, /* GL_MODELVIEW18_ARB */
- 965, /* GL_MODELVIEW19_ARB */
- 967, /* GL_MODELVIEW20_ARB */
- 968, /* GL_MODELVIEW21_ARB */
- 969, /* GL_MODELVIEW22_ARB */
- 970, /* GL_MODELVIEW23_ARB */
- 971, /* GL_MODELVIEW24_ARB */
- 972, /* GL_MODELVIEW25_ARB */
- 973, /* GL_MODELVIEW26_ARB */
- 974, /* GL_MODELVIEW27_ARB */
- 975, /* GL_MODELVIEW28_ARB */
- 976, /* GL_MODELVIEW29_ARB */
- 978, /* GL_MODELVIEW30_ARB */
- 979, /* GL_MODELVIEW31_ARB */
- 389, /* GL_DOT3_RGB_EXT */
- 387, /* GL_DOT3_RGBA_EXT */
- 950, /* GL_MIRROR_CLAMP_EXT */
- 953, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- 991, /* GL_MODULATE_ADD_ATI */
- 992, /* GL_MODULATE_SIGNED_ADD_ATI */
- 993, /* GL_MODULATE_SUBTRACT_ATI */
- 1858, /* GL_YCBCR_MESA */
- 1083, /* GL_PACK_INVERT_MESA */
+ 1006, /* GL_MULTISAMPLE_3DFX */
+ 1404, /* GL_SAMPLE_BUFFERS_3DFX */
+ 1395, /* GL_SAMPLES_3DFX */
+ 987, /* GL_MODELVIEW2_ARB */
+ 990, /* GL_MODELVIEW3_ARB */
+ 991, /* GL_MODELVIEW4_ARB */
+ 992, /* GL_MODELVIEW5_ARB */
+ 993, /* GL_MODELVIEW6_ARB */
+ 994, /* GL_MODELVIEW7_ARB */
+ 995, /* GL_MODELVIEW8_ARB */
+ 996, /* GL_MODELVIEW9_ARB */
+ 966, /* GL_MODELVIEW10_ARB */
+ 967, /* GL_MODELVIEW11_ARB */
+ 968, /* GL_MODELVIEW12_ARB */
+ 969, /* GL_MODELVIEW13_ARB */
+ 970, /* GL_MODELVIEW14_ARB */
+ 971, /* GL_MODELVIEW15_ARB */
+ 972, /* GL_MODELVIEW16_ARB */
+ 973, /* GL_MODELVIEW17_ARB */
+ 974, /* GL_MODELVIEW18_ARB */
+ 975, /* GL_MODELVIEW19_ARB */
+ 977, /* GL_MODELVIEW20_ARB */
+ 978, /* GL_MODELVIEW21_ARB */
+ 979, /* GL_MODELVIEW22_ARB */
+ 980, /* GL_MODELVIEW23_ARB */
+ 981, /* GL_MODELVIEW24_ARB */
+ 982, /* GL_MODELVIEW25_ARB */
+ 983, /* GL_MODELVIEW26_ARB */
+ 984, /* GL_MODELVIEW27_ARB */
+ 985, /* GL_MODELVIEW28_ARB */
+ 986, /* GL_MODELVIEW29_ARB */
+ 988, /* GL_MODELVIEW30_ARB */
+ 989, /* GL_MODELVIEW31_ARB */
+ 391, /* GL_DOT3_RGB_EXT */
+ 389, /* GL_DOT3_RGBA_EXT */
+ 960, /* GL_MIRROR_CLAMP_EXT */
+ 963, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ 1001, /* GL_MODULATE_ADD_ATI */
+ 1002, /* GL_MODULATE_SIGNED_ADD_ATI */
+ 1003, /* GL_MODULATE_SUBTRACT_ATI */
+ 1877, /* GL_YCBCR_MESA */
+ 1093, /* GL_PACK_INVERT_MESA */
339, /* GL_DEBUG_OBJECT_MESA */
340, /* GL_DEBUG_PRINT_MESA */
338, /* GL_DEBUG_ASSERT_MESA */
@@ -4762,292 +4800,292 @@ static const unsigned reduced_enums[1347] =
117, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
115, /* GL_BUMP_NUM_TEX_UNITS_ATI */
119, /* GL_BUMP_TEX_UNITS_ATI */
- 448, /* GL_DUDV_ATI */
- 447, /* GL_DU8DV8_ATI */
+ 451, /* GL_DUDV_ATI */
+ 450, /* GL_DU8DV8_ATI */
114, /* GL_BUMP_ENVMAP_ATI */
118, /* GL_BUMP_TARGET_ATI */
- 1490, /* GL_STENCIL_BACK_FUNC */
- 1488, /* GL_STENCIL_BACK_FAIL */
- 1492, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- 1494, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- 533, /* GL_FRAGMENT_PROGRAM_ARB */
- 1221, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 1249, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 1248, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- 1233, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 1239, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 1238, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 884, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 907, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 906, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- 897, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 903, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 902, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 867, /* GL_MAX_DRAW_BUFFERS */
- 393, /* GL_DRAW_BUFFER0 */
- 396, /* GL_DRAW_BUFFER1 */
- 417, /* GL_DRAW_BUFFER2 */
- 420, /* GL_DRAW_BUFFER3 */
- 423, /* GL_DRAW_BUFFER4 */
- 426, /* GL_DRAW_BUFFER5 */
- 429, /* GL_DRAW_BUFFER6 */
- 432, /* GL_DRAW_BUFFER7 */
- 435, /* GL_DRAW_BUFFER8 */
- 438, /* GL_DRAW_BUFFER9 */
- 397, /* GL_DRAW_BUFFER10 */
- 400, /* GL_DRAW_BUFFER11 */
- 403, /* GL_DRAW_BUFFER12 */
- 406, /* GL_DRAW_BUFFER13 */
- 409, /* GL_DRAW_BUFFER14 */
- 412, /* GL_DRAW_BUFFER15 */
+ 1503, /* GL_STENCIL_BACK_FUNC */
+ 1501, /* GL_STENCIL_BACK_FAIL */
+ 1505, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ 1507, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ 536, /* GL_FRAGMENT_PROGRAM_ARB */
+ 1231, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1259, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1258, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1243, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1249, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1248, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 892, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 915, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 914, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 905, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 911, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 910, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 875, /* GL_MAX_DRAW_BUFFERS */
+ 395, /* GL_DRAW_BUFFER0 */
+ 398, /* GL_DRAW_BUFFER1 */
+ 419, /* GL_DRAW_BUFFER2 */
+ 422, /* GL_DRAW_BUFFER3 */
+ 425, /* GL_DRAW_BUFFER4 */
+ 428, /* GL_DRAW_BUFFER5 */
+ 431, /* GL_DRAW_BUFFER6 */
+ 434, /* GL_DRAW_BUFFER7 */
+ 437, /* GL_DRAW_BUFFER8 */
+ 440, /* GL_DRAW_BUFFER9 */
+ 399, /* GL_DRAW_BUFFER10 */
+ 402, /* GL_DRAW_BUFFER11 */
+ 405, /* GL_DRAW_BUFFER12 */
+ 408, /* GL_DRAW_BUFFER13 */
+ 411, /* GL_DRAW_BUFFER14 */
+ 414, /* GL_DRAW_BUFFER15 */
82, /* GL_BLEND_EQUATION_ALPHA */
- 847, /* GL_MATRIX_PALETTE_ARB */
- 878, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- 881, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 854, /* GL_MATRIX_PALETTE_ARB */
+ 886, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 889, /* GL_MAX_PALETTE_MATRICES_ARB */
321, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- 841, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 848, /* GL_MATRIX_INDEX_ARRAY_ARB */
316, /* GL_CURRENT_MATRIX_INDEX_ARB */
- 843, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- 845, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- 844, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- 842, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- 1678, /* GL_TEXTURE_DEPTH_SIZE */
- 377, /* GL_DEPTH_TEXTURE_MODE */
- 1643, /* GL_TEXTURE_COMPARE_MODE */
- 1641, /* GL_TEXTURE_COMPARE_FUNC */
+ 850, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ 852, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ 851, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ 849, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ 1695, /* GL_TEXTURE_DEPTH_SIZE */
+ 379, /* GL_DEPTH_TEXTURE_MODE */
+ 1660, /* GL_TEXTURE_COMPARE_MODE */
+ 1658, /* GL_TEXTURE_COMPARE_FUNC */
242, /* GL_COMPARE_R_TO_TEXTURE */
- 1155, /* GL_POINT_SPRITE */
+ 1165, /* GL_POINT_SPRITE */
296, /* GL_COORD_REPLACE */
- 1159, /* GL_POINT_SPRITE_R_MODE_NV */
- 1280, /* GL_QUERY_COUNTER_BITS */
+ 1169, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1290, /* GL_QUERY_COUNTER_BITS */
323, /* GL_CURRENT_QUERY */
- 1282, /* GL_QUERY_RESULT */
- 1284, /* GL_QUERY_RESULT_AVAILABLE */
- 930, /* GL_MAX_VERTEX_ATTRIBS */
- 1819, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- 375, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- 374, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- 916, /* GL_MAX_TEXTURE_COORDS */
- 918, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- 1226, /* GL_PROGRAM_ERROR_STRING_ARB */
- 1228, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- 1227, /* GL_PROGRAM_FORMAT_ARB */
- 1727, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- 353, /* GL_DEPTH_BOUNDS_TEST_EXT */
- 352, /* GL_DEPTH_BOUNDS_EXT */
+ 1292, /* GL_QUERY_RESULT */
+ 1294, /* GL_QUERY_RESULT_AVAILABLE */
+ 940, /* GL_MAX_VERTEX_ATTRIBS */
+ 1838, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 377, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ 376, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ 926, /* GL_MAX_TEXTURE_COORDS */
+ 928, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ 1236, /* GL_PROGRAM_ERROR_STRING_ARB */
+ 1238, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ 1237, /* GL_PROGRAM_FORMAT_ARB */
+ 1745, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ 354, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ 353, /* GL_DEPTH_BOUNDS_EXT */
53, /* GL_ARRAY_BUFFER */
- 461, /* GL_ELEMENT_ARRAY_BUFFER */
+ 464, /* GL_ELEMENT_ARRAY_BUFFER */
54, /* GL_ARRAY_BUFFER_BINDING */
- 462, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1793, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- 1017, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 465, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ 1812, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1027, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
149, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- 625, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- 1656, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- 457, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- 1403, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- 511, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 1846, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 1815, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- 1229, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- 890, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- 1235, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 899, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 1247, /* GL_PROGRAM_TEMPORARIES_ARB */
- 905, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- 1237, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 901, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 1241, /* GL_PROGRAM_PARAMETERS_ARB */
- 904, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- 1236, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- 900, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- 1222, /* GL_PROGRAM_ATTRIBS_ARB */
- 885, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- 1234, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- 898, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- 1220, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- 883, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- 1232, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 896, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 891, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- 887, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- 1250, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- 1740, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- 1293, /* GL_READ_ONLY */
- 1854, /* GL_WRITE_ONLY */
- 1295, /* GL_READ_WRITE */
+ 632, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ 1673, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ 460, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ 1416, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ 514, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ 1865, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 1834, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1239, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ 898, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ 1245, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 907, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1257, /* GL_PROGRAM_TEMPORARIES_ARB */
+ 913, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ 1247, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 909, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1251, /* GL_PROGRAM_PARAMETERS_ARB */
+ 912, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ 1246, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 908, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1232, /* GL_PROGRAM_ATTRIBS_ARB */
+ 893, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ 1244, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 906, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1230, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 891, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1242, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 904, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 899, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ 895, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ 1260, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ 1758, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1304, /* GL_READ_ONLY */
+ 1873, /* GL_WRITE_ONLY */
+ 1306, /* GL_READ_WRITE */
102, /* GL_BUFFER_ACCESS */
105, /* GL_BUFFER_MAPPED */
107, /* GL_BUFFER_MAP_POINTER */
- 1734, /* GL_TIME_ELAPSED_EXT */
- 801, /* GL_MATRIX0_ARB */
- 813, /* GL_MATRIX1_ARB */
- 825, /* GL_MATRIX2_ARB */
- 829, /* GL_MATRIX3_ARB */
- 831, /* GL_MATRIX4_ARB */
- 833, /* GL_MATRIX5_ARB */
- 835, /* GL_MATRIX6_ARB */
- 837, /* GL_MATRIX7_ARB */
- 839, /* GL_MATRIX8_ARB */
- 840, /* GL_MATRIX9_ARB */
- 803, /* GL_MATRIX10_ARB */
- 804, /* GL_MATRIX11_ARB */
- 805, /* GL_MATRIX12_ARB */
- 806, /* GL_MATRIX13_ARB */
- 807, /* GL_MATRIX14_ARB */
- 808, /* GL_MATRIX15_ARB */
- 809, /* GL_MATRIX16_ARB */
- 810, /* GL_MATRIX17_ARB */
- 811, /* GL_MATRIX18_ARB */
- 812, /* GL_MATRIX19_ARB */
- 815, /* GL_MATRIX20_ARB */
- 816, /* GL_MATRIX21_ARB */
- 817, /* GL_MATRIX22_ARB */
- 818, /* GL_MATRIX23_ARB */
- 819, /* GL_MATRIX24_ARB */
- 820, /* GL_MATRIX25_ARB */
- 821, /* GL_MATRIX26_ARB */
- 822, /* GL_MATRIX27_ARB */
- 823, /* GL_MATRIX28_ARB */
- 824, /* GL_MATRIX29_ARB */
- 827, /* GL_MATRIX30_ARB */
- 828, /* GL_MATRIX31_ARB */
- 1523, /* GL_STREAM_DRAW */
- 1525, /* GL_STREAM_READ */
- 1521, /* GL_STREAM_COPY */
- 1481, /* GL_STATIC_DRAW */
- 1483, /* GL_STATIC_READ */
- 1479, /* GL_STATIC_COPY */
- 451, /* GL_DYNAMIC_DRAW */
- 453, /* GL_DYNAMIC_READ */
- 449, /* GL_DYNAMIC_COPY */
- 1123, /* GL_PIXEL_PACK_BUFFER */
- 1127, /* GL_PIXEL_UNPACK_BUFFER */
- 1124, /* GL_PIXEL_PACK_BUFFER_BINDING */
- 1128, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 1752, /* GL_TIME_ELAPSED_EXT */
+ 808, /* GL_MATRIX0_ARB */
+ 820, /* GL_MATRIX1_ARB */
+ 832, /* GL_MATRIX2_ARB */
+ 836, /* GL_MATRIX3_ARB */
+ 838, /* GL_MATRIX4_ARB */
+ 840, /* GL_MATRIX5_ARB */
+ 842, /* GL_MATRIX6_ARB */
+ 844, /* GL_MATRIX7_ARB */
+ 846, /* GL_MATRIX8_ARB */
+ 847, /* GL_MATRIX9_ARB */
+ 810, /* GL_MATRIX10_ARB */
+ 811, /* GL_MATRIX11_ARB */
+ 812, /* GL_MATRIX12_ARB */
+ 813, /* GL_MATRIX13_ARB */
+ 814, /* GL_MATRIX14_ARB */
+ 815, /* GL_MATRIX15_ARB */
+ 816, /* GL_MATRIX16_ARB */
+ 817, /* GL_MATRIX17_ARB */
+ 818, /* GL_MATRIX18_ARB */
+ 819, /* GL_MATRIX19_ARB */
+ 822, /* GL_MATRIX20_ARB */
+ 823, /* GL_MATRIX21_ARB */
+ 824, /* GL_MATRIX22_ARB */
+ 825, /* GL_MATRIX23_ARB */
+ 826, /* GL_MATRIX24_ARB */
+ 827, /* GL_MATRIX25_ARB */
+ 828, /* GL_MATRIX26_ARB */
+ 829, /* GL_MATRIX27_ARB */
+ 830, /* GL_MATRIX28_ARB */
+ 831, /* GL_MATRIX29_ARB */
+ 834, /* GL_MATRIX30_ARB */
+ 835, /* GL_MATRIX31_ARB */
+ 1540, /* GL_STREAM_DRAW */
+ 1542, /* GL_STREAM_READ */
+ 1538, /* GL_STREAM_COPY */
+ 1494, /* GL_STATIC_DRAW */
+ 1496, /* GL_STATIC_READ */
+ 1492, /* GL_STATIC_COPY */
+ 454, /* GL_DYNAMIC_DRAW */
+ 456, /* GL_DYNAMIC_READ */
+ 452, /* GL_DYNAMIC_COPY */
+ 1133, /* GL_PIXEL_PACK_BUFFER */
+ 1137, /* GL_PIXEL_UNPACK_BUFFER */
+ 1134, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ 1138, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
347, /* GL_DEPTH24_STENCIL8 */
- 1724, /* GL_TEXTURE_STENCIL_SIZE */
- 1676, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- 886, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- 889, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- 893, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- 892, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- 850, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- 1514, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ 1741, /* GL_TEXTURE_STENCIL_SIZE */
+ 1693, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ 894, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ 897, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ 901, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ 900, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ 857, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ 1531, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
17, /* GL_ACTIVE_STENCIL_FACE_EXT */
- 951, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- 1384, /* GL_SAMPLES_PASSED */
+ 961, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1397, /* GL_SAMPLES_PASSED */
109, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
104, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- 534, /* GL_FRAGMENT_SHADER */
- 1839, /* GL_VERTEX_SHADER */
- 1240, /* GL_PROGRAM_OBJECT_ARB */
- 1416, /* GL_SHADER_OBJECT_ARB */
- 874, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- 934, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- 928, /* GL_MAX_VARYING_FLOATS */
- 932, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- 859, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- 1043, /* GL_OBJECT_TYPE_ARB */
- 1418, /* GL_SHADER_TYPE */
- 499, /* GL_FLOAT_VEC2 */
- 501, /* GL_FLOAT_VEC3 */
- 503, /* GL_FLOAT_VEC4 */
- 652, /* GL_INT_VEC2 */
- 654, /* GL_INT_VEC3 */
- 656, /* GL_INT_VEC4 */
+ 537, /* GL_FRAGMENT_SHADER */
+ 1858, /* GL_VERTEX_SHADER */
+ 1250, /* GL_PROGRAM_OBJECT_ARB */
+ 1429, /* GL_SHADER_OBJECT_ARB */
+ 882, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ 944, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ 938, /* GL_MAX_VARYING_FLOATS */
+ 942, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ 867, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ 1053, /* GL_OBJECT_TYPE_ARB */
+ 1431, /* GL_SHADER_TYPE */
+ 502, /* GL_FLOAT_VEC2 */
+ 504, /* GL_FLOAT_VEC3 */
+ 506, /* GL_FLOAT_VEC4 */
+ 659, /* GL_INT_VEC2 */
+ 661, /* GL_INT_VEC3 */
+ 663, /* GL_INT_VEC4 */
94, /* GL_BOOL */
96, /* GL_BOOL_VEC2 */
98, /* GL_BOOL_VEC3 */
100, /* GL_BOOL_VEC4 */
- 487, /* GL_FLOAT_MAT2 */
- 491, /* GL_FLOAT_MAT3 */
- 495, /* GL_FLOAT_MAT4 */
- 1375, /* GL_SAMPLER_1D */
- 1377, /* GL_SAMPLER_2D */
- 1379, /* GL_SAMPLER_3D */
- 1380, /* GL_SAMPLER_CUBE */
- 1376, /* GL_SAMPLER_1D_SHADOW */
- 1378, /* GL_SAMPLER_2D_SHADOW */
- 489, /* GL_FLOAT_MAT2x3 */
- 490, /* GL_FLOAT_MAT2x4 */
- 493, /* GL_FLOAT_MAT3x2 */
- 494, /* GL_FLOAT_MAT3x4 */
- 497, /* GL_FLOAT_MAT4x2 */
- 498, /* GL_FLOAT_MAT4x3 */
+ 490, /* GL_FLOAT_MAT2 */
+ 494, /* GL_FLOAT_MAT3 */
+ 498, /* GL_FLOAT_MAT4 */
+ 1388, /* GL_SAMPLER_1D */
+ 1390, /* GL_SAMPLER_2D */
+ 1392, /* GL_SAMPLER_3D */
+ 1393, /* GL_SAMPLER_CUBE */
+ 1389, /* GL_SAMPLER_1D_SHADOW */
+ 1391, /* GL_SAMPLER_2D_SHADOW */
+ 492, /* GL_FLOAT_MAT2x3 */
+ 493, /* GL_FLOAT_MAT2x4 */
+ 496, /* GL_FLOAT_MAT3x2 */
+ 497, /* GL_FLOAT_MAT3x4 */
+ 500, /* GL_FLOAT_MAT4x2 */
+ 501, /* GL_FLOAT_MAT4x3 */
345, /* GL_DELETE_STATUS */
246, /* GL_COMPILE_STATUS */
- 708, /* GL_LINK_STATUS */
- 1787, /* GL_VALIDATE_STATUS */
- 637, /* GL_INFO_LOG_LENGTH */
+ 715, /* GL_LINK_STATUS */
+ 1806, /* GL_VALIDATE_STATUS */
+ 644, /* GL_INFO_LOG_LENGTH */
56, /* GL_ATTACHED_SHADERS */
20, /* GL_ACTIVE_UNIFORMS */
21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- 1417, /* GL_SHADER_SOURCE_LENGTH */
+ 1430, /* GL_SHADER_SOURCE_LENGTH */
15, /* GL_ACTIVE_ATTRIBUTES */
16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
- 536, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- 1420, /* GL_SHADING_LANGUAGE_VERSION */
+ 539, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ 1433, /* GL_SHADING_LANGUAGE_VERSION */
322, /* GL_CURRENT_PROGRAM */
- 1092, /* GL_PALETTE4_RGB8_OES */
- 1094, /* GL_PALETTE4_RGBA8_OES */
- 1090, /* GL_PALETTE4_R5_G6_B5_OES */
- 1093, /* GL_PALETTE4_RGBA4_OES */
- 1091, /* GL_PALETTE4_RGB5_A1_OES */
- 1097, /* GL_PALETTE8_RGB8_OES */
- 1099, /* GL_PALETTE8_RGBA8_OES */
- 1095, /* GL_PALETTE8_R5_G6_B5_OES */
- 1098, /* GL_PALETTE8_RGBA4_OES */
- 1096, /* GL_PALETTE8_RGB5_A1_OES */
- 619, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- 618, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- 1772, /* GL_UNSIGNED_NORMALIZED */
- 1611, /* GL_TEXTURE_1D_ARRAY_EXT */
- 1262, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- 1613, /* GL_TEXTURE_2D_ARRAY_EXT */
- 1265, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- 1619, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- 1621, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- 1473, /* GL_SRGB */
- 1474, /* GL_SRGB8 */
- 1476, /* GL_SRGB_ALPHA */
- 1475, /* GL_SRGB8_ALPHA8 */
- 1433, /* GL_SLUMINANCE_ALPHA */
- 1432, /* GL_SLUMINANCE8_ALPHA8 */
- 1430, /* GL_SLUMINANCE */
- 1431, /* GL_SLUMINANCE8 */
+ 1102, /* GL_PALETTE4_RGB8_OES */
+ 1104, /* GL_PALETTE4_RGBA8_OES */
+ 1100, /* GL_PALETTE4_R5_G6_B5_OES */
+ 1103, /* GL_PALETTE4_RGBA4_OES */
+ 1101, /* GL_PALETTE4_RGB5_A1_OES */
+ 1107, /* GL_PALETTE8_RGB8_OES */
+ 1109, /* GL_PALETTE8_RGBA8_OES */
+ 1105, /* GL_PALETTE8_R5_G6_B5_OES */
+ 1108, /* GL_PALETTE8_RGBA4_OES */
+ 1106, /* GL_PALETTE8_RGB5_A1_OES */
+ 626, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ 625, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ 1791, /* GL_UNSIGNED_NORMALIZED */
+ 1628, /* GL_TEXTURE_1D_ARRAY_EXT */
+ 1272, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ 1630, /* GL_TEXTURE_2D_ARRAY_EXT */
+ 1275, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ 1636, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ 1638, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ 1486, /* GL_SRGB */
+ 1487, /* GL_SRGB8 */
+ 1489, /* GL_SRGB_ALPHA */
+ 1488, /* GL_SRGB8_ALPHA8 */
+ 1446, /* GL_SLUMINANCE_ALPHA */
+ 1445, /* GL_SLUMINANCE8_ALPHA8 */
+ 1443, /* GL_SLUMINANCE */
+ 1444, /* GL_SLUMINANCE8 */
267, /* GL_COMPRESSED_SRGB */
268, /* GL_COMPRESSED_SRGB_ALPHA */
265, /* GL_COMPRESSED_SLUMINANCE */
266, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- 1157, /* GL_POINT_SPRITE_COORD_ORIGIN */
- 716, /* GL_LOWER_LEFT */
- 1784, /* GL_UPPER_LEFT */
- 1496, /* GL_STENCIL_BACK_REF */
- 1497, /* GL_STENCIL_BACK_VALUE_MASK */
- 1498, /* GL_STENCIL_BACK_WRITEMASK */
- 442, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- 1309, /* GL_RENDERBUFFER_BINDING_EXT */
- 1290, /* GL_READ_FRAMEBUFFER */
- 441, /* GL_DRAW_FRAMEBUFFER */
- 1291, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- 1319, /* GL_RENDERBUFFER_SAMPLES */
- 546, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- 544, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- 555, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- 551, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- 553, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- 558, /* GL_FRAMEBUFFER_COMPLETE */
- 562, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- 568, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- 566, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- 564, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- 567, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- 565, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- 571, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- 574, /* GL_FRAMEBUFFER_UNSUPPORTED */
- 572, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- 856, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ 1167, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ 723, /* GL_LOWER_LEFT */
+ 1803, /* GL_UPPER_LEFT */
+ 1509, /* GL_STENCIL_BACK_REF */
+ 1510, /* GL_STENCIL_BACK_VALUE_MASK */
+ 1511, /* GL_STENCIL_BACK_WRITEMASK */
+ 444, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ 1320, /* GL_RENDERBUFFER_BINDING */
+ 1300, /* GL_READ_FRAMEBUFFER */
+ 443, /* GL_DRAW_FRAMEBUFFER */
+ 1301, /* GL_READ_FRAMEBUFFER_BINDING */
+ 1331, /* GL_RENDERBUFFER_SAMPLES */
+ 549, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ 547, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ 558, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ 554, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ 556, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ 562, /* GL_FRAMEBUFFER_COMPLETE */
+ 566, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ 573, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ 571, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ 568, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ 572, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ 569, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ 577, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ 581, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ 579, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ 863, /* GL_MAX_COLOR_ATTACHMENTS */
155, /* GL_COLOR_ATTACHMENT0 */
157, /* GL_COLOR_ATTACHMENT1 */
171, /* GL_COLOR_ATTACHMENT2 */
@@ -5064,57 +5102,57 @@ static const unsigned reduced_enums[1347] =
164, /* GL_COLOR_ATTACHMENT13 */
166, /* GL_COLOR_ATTACHMENT14 */
168, /* GL_COLOR_ATTACHMENT15 */
- 348, /* GL_DEPTH_ATTACHMENT */
- 1486, /* GL_STENCIL_ATTACHMENT */
- 537, /* GL_FRAMEBUFFER */
- 1307, /* GL_RENDERBUFFER */
- 1321, /* GL_RENDERBUFFER_WIDTH */
- 1314, /* GL_RENDERBUFFER_HEIGHT */
- 1316, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- 1509, /* GL_STENCIL_INDEX_EXT */
- 1506, /* GL_STENCIL_INDEX1_EXT */
- 1507, /* GL_STENCIL_INDEX4_EXT */
- 1508, /* GL_STENCIL_INDEX8_EXT */
- 1505, /* GL_STENCIL_INDEX16_EXT */
- 1318, /* GL_RENDERBUFFER_RED_SIZE */
- 1313, /* GL_RENDERBUFFER_GREEN_SIZE */
- 1310, /* GL_RENDERBUFFER_BLUE_SIZE */
- 1308, /* GL_RENDERBUFFER_ALPHA_SIZE */
- 1311, /* GL_RENDERBUFFER_DEPTH_SIZE */
- 1320, /* GL_RENDERBUFFER_STENCIL_SIZE */
- 570, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- 912, /* GL_MAX_SAMPLES */
- 1276, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
- 483, /* GL_FIRST_VERTEX_CONVENTION */
- 667, /* GL_LAST_VERTEX_CONVENTION */
- 1254, /* GL_PROVOKING_VERTEX */
+ 349, /* GL_DEPTH_ATTACHMENT */
+ 1499, /* GL_STENCIL_ATTACHMENT */
+ 540, /* GL_FRAMEBUFFER */
+ 1318, /* GL_RENDERBUFFER */
+ 1334, /* GL_RENDERBUFFER_WIDTH */
+ 1326, /* GL_RENDERBUFFER_HEIGHT */
+ 1328, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ 1526, /* GL_STENCIL_INDEX_EXT */
+ 1518, /* GL_STENCIL_INDEX1 */
+ 1522, /* GL_STENCIL_INDEX4 */
+ 1524, /* GL_STENCIL_INDEX8 */
+ 1519, /* GL_STENCIL_INDEX16 */
+ 1330, /* GL_RENDERBUFFER_RED_SIZE */
+ 1325, /* GL_RENDERBUFFER_GREEN_SIZE */
+ 1322, /* GL_RENDERBUFFER_BLUE_SIZE */
+ 1319, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ 1323, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ 1333, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ 575, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ 921, /* GL_MAX_SAMPLES */
+ 1286, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ 486, /* GL_FIRST_VERTEX_CONVENTION */
+ 674, /* GL_LAST_VERTEX_CONVENTION */
+ 1264, /* GL_PROVOKING_VERTEX */
302, /* GL_COPY_READ_BUFFER */
303, /* GL_COPY_WRITE_BUFFER */
- 1368, /* GL_RGBA_SNORM */
- 1364, /* GL_RGBA8_SNORM */
- 1426, /* GL_SIGNED_NORMALIZED */
- 913, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- 1042, /* GL_OBJECT_TYPE */
- 1530, /* GL_SYNC_CONDITION */
- 1535, /* GL_SYNC_STATUS */
- 1532, /* GL_SYNC_FLAGS */
- 1531, /* GL_SYNC_FENCE */
- 1534, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- 1761, /* GL_UNSIGNALED */
- 1425, /* GL_SIGNALED */
+ 1381, /* GL_RGBA_SNORM */
+ 1377, /* GL_RGBA8_SNORM */
+ 1439, /* GL_SIGNED_NORMALIZED */
+ 923, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ 1052, /* GL_OBJECT_TYPE */
+ 1547, /* GL_SYNC_CONDITION */
+ 1552, /* GL_SYNC_STATUS */
+ 1549, /* GL_SYNC_FLAGS */
+ 1548, /* GL_SYNC_FENCE */
+ 1551, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ 1779, /* GL_UNSIGNALED */
+ 1438, /* GL_SIGNALED */
46, /* GL_ALREADY_SIGNALED */
- 1732, /* GL_TIMEOUT_EXPIRED */
+ 1750, /* GL_TIMEOUT_EXPIRED */
270, /* GL_CONDITION_SATISFIED */
- 1844, /* GL_WAIT_FAILED */
- 468, /* GL_EVAL_BIT */
- 1288, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- 710, /* GL_LIST_BIT */
- 1627, /* GL_TEXTURE_BIT */
- 1399, /* GL_SCISSOR_BIT */
+ 1863, /* GL_WAIT_FAILED */
+ 471, /* GL_EVAL_BIT */
+ 1298, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ 717, /* GL_LIST_BIT */
+ 1644, /* GL_TEXTURE_BIT */
+ 1412, /* GL_SCISSOR_BIT */
29, /* GL_ALL_ATTRIB_BITS */
- 998, /* GL_MULTISAMPLE_BIT */
+ 1008, /* GL_MULTISAMPLE_BIT */
30, /* GL_ALL_CLIENT_ATTRIB_BITS */
- 1733, /* GL_TIMEOUT_IGNORED */
+ 1751, /* GL_TIMEOUT_IGNORED */
};
typedef int (*cfunc)(const void *, const void *);
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 54cf37c5f48..2138bfe40ef 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -104,8 +104,9 @@ static const struct {
{ ON, "GL_EXT_copy_texture", F(EXT_copy_texture) },
{ OFF, "GL_EXT_depth_bounds_test", F(EXT_depth_bounds_test) },
{ ON, "GL_EXT_draw_range_elements", F(EXT_draw_range_elements) },
- { OFF, "GL_EXT_framebuffer_object", F(EXT_framebuffer_object) },
{ OFF, "GL_EXT_framebuffer_blit", F(EXT_framebuffer_blit) },
+ { OFF, "GL_EXT_framebuffer_multisample", F(EXT_framebuffer_multisample) },
+ { OFF, "GL_EXT_framebuffer_object", F(EXT_framebuffer_object) },
{ OFF, "GL_EXT_fog_coord", F(EXT_fog_coord) },
{ OFF, "GL_EXT_gpu_program_parameters", F(EXT_gpu_program_parameters) },
{ OFF, "GL_EXT_histogram", F(EXT_histogram) },
@@ -169,6 +170,7 @@ static const struct {
{ OFF, "GL_NV_fragment_program", F(NV_fragment_program) },
{ OFF, "GL_NV_fragment_program_option", F(NV_fragment_program_option) },
{ ON, "GL_NV_light_max_exponent", F(NV_light_max_exponent) },
+ { OFF, "GL_NV_packed_depth_stencil", F(EXT_packed_depth_stencil) },
{ OFF, "GL_NV_point_sprite", F(NV_point_sprite) },
{ OFF, "GL_NV_texture_env_combine4", F(NV_texture_env_combine4) },
{ OFF, "GL_NV_texture_rectangle", F(NV_texture_rectangle) },
@@ -274,6 +276,9 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
#if FEATURE_EXT_framebuffer_blit
ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
#endif
+#if FEATURE_ARB_framebuffer_object
+ ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
+#endif
ctx->Extensions.EXT_histogram = GL_TRUE;
/*ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;*/
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 4c6528bcf78..7b3599f9322 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -233,9 +233,13 @@ _mesa_set_texture_attachment(GLcontext *ctx,
if (att->Texture == texObj) {
/* re-attaching same texture */
ASSERT(att->Type == GL_TEXTURE);
+ if (ctx->Driver.FinishRenderTexture)
+ ctx->Driver.FinishRenderTexture(ctx, att);
}
else {
/* new attachment */
+ if (ctx->Driver.FinishRenderTexture && att->Texture)
+ ctx->Driver.FinishRenderTexture(ctx, att);
_mesa_remove_attachment(ctx, att);
att->Type = GL_TEXTURE;
assert(!att->Texture);
@@ -712,12 +716,13 @@ _mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (target != GL_RENDERBUFFER_EXT) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "glBindRenderbufferEXT(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindRenderbufferEXT(target)");
return;
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ /* No need to flush here since the render buffer binding has no
+ * effect on rendering state.
+ */
if (renderbuffer) {
newRb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
@@ -1094,7 +1099,9 @@ _mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params)
return;
}
- FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* No need to flush here since we're just quering state which is
+ * not effected by rendering.
+ */
switch (pname) {
case GL_RENDERBUFFER_WIDTH_EXT:
@@ -1142,11 +1149,20 @@ _mesa_IsFramebufferEXT(GLuint framebuffer)
}
+/**
+ * Check if any of the attachments of the given framebuffer are textures
+ * (render to texture). Call ctx->Driver.RenderTexture() for such
+ * attachments.
+ */
static void
check_begin_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
{
GLuint i;
ASSERT(ctx->Driver.RenderTexture);
+
+ if (fb->Name == 0)
+ return; /* can't render to texture with winsys framebuffers */
+
for (i = 0; i < BUFFER_COUNT; i++) {
struct gl_renderbuffer_attachment *att = fb->Attachment + i;
struct gl_texture_object *texObj = att->Texture;
@@ -1166,6 +1182,9 @@ check_begin_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
static void
check_end_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
{
+ if (fb->Name == 0)
+ return; /* can't render to texture with winsys framebuffers */
+
if (ctx->Driver.FinishRenderTexture) {
GLuint i;
for (i = 0; i < BUFFER_COUNT; i++) {
@@ -1181,7 +1200,8 @@ check_end_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
void GLAPIENTRY
_mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
{
- struct gl_framebuffer *newFb, *newFbread;
+ struct gl_framebuffer *newDrawFb, *newReadFb;
+ struct gl_framebuffer *oldDrawFb, *oldReadFb;
GLboolean bindReadBuf, bindDrawBuf;
GET_CURRENT_CONTEXT(ctx);
@@ -1228,73 +1248,90 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
return;
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
-
if (framebuffer) {
/* Binding a user-created framebuffer object */
- newFb = _mesa_lookup_framebuffer(ctx, framebuffer);
- if (newFb == &DummyFramebuffer) {
+ newDrawFb = _mesa_lookup_framebuffer(ctx, framebuffer);
+ if (newDrawFb == &DummyFramebuffer) {
/* ID was reserved, but no real framebuffer object made yet */
- newFb = NULL;
+ newDrawFb = NULL;
}
- else if (!newFb && ctx->Extensions.ARB_framebuffer_object) {
+ else if (!newDrawFb && ctx->Extensions.ARB_framebuffer_object) {
/* All FBO IDs must be Gen'd */
_mesa_error(ctx, GL_INVALID_OPERATION, "glBindFramebuffer(buffer)");
return;
}
- if (!newFb) {
+ if (!newDrawFb) {
/* create new framebuffer object */
- newFb = ctx->Driver.NewFramebuffer(ctx, framebuffer);
- if (!newFb) {
+ newDrawFb = ctx->Driver.NewFramebuffer(ctx, framebuffer);
+ if (!newDrawFb) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindFramebufferEXT");
return;
}
- _mesa_HashInsert(ctx->Shared->FrameBuffers, framebuffer, newFb);
+ _mesa_HashInsert(ctx->Shared->FrameBuffers, framebuffer, newDrawFb);
}
- newFbread = newFb;
+ newReadFb = newDrawFb;
}
else {
/* Binding the window system framebuffer (which was originally set
* with MakeCurrent).
*/
- newFb = ctx->WinSysDrawBuffer;
- newFbread = ctx->WinSysReadBuffer;
+ newDrawFb = ctx->WinSysDrawBuffer;
+ newReadFb = ctx->WinSysReadBuffer;
}
- ASSERT(newFb);
- ASSERT(newFb != &DummyFramebuffer);
+ ASSERT(newDrawFb);
+ ASSERT(newDrawFb != &DummyFramebuffer);
+
+ /* save pointers to current/old framebuffers */
+ oldDrawFb = ctx->DrawBuffer;
+ oldReadFb = ctx->ReadBuffer;
+
+ /* check if really changing bindings */
+ if (oldDrawFb == newDrawFb)
+ bindDrawBuf = GL_FALSE;
+ if (oldReadFb == newReadFb)
+ bindReadBuf = GL_FALSE;
/*
* OK, now bind the new Draw/Read framebuffers, if they're changing.
+ *
+ * We also check if we're beginning and/or ending render-to-texture.
+ * When a framebuffer with texture attachments is unbound, call
+ * ctx->Driver.FinishRenderTexture().
+ * When a framebuffer with texture attachments is bound, call
+ * ctx->Driver.RenderTexture().
+ *
+ * Note that if the ReadBuffer has texture attachments we don't consider
+ * that a render-to-texture case.
*/
-
if (bindReadBuf) {
- if (ctx->ReadBuffer == newFbread)
- bindReadBuf = GL_FALSE; /* no change */
- else
- _mesa_reference_framebuffer(&ctx->ReadBuffer, newFbread);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ /* check if old readbuffer was render-to-texture */
+ check_end_texture_render(ctx, oldReadFb);
+
+ _mesa_reference_framebuffer(&ctx->ReadBuffer, newReadFb);
}
if (bindDrawBuf) {
- /* check if old FB had any texture attachments */
- if (ctx->DrawBuffer->Name != 0) {
- check_end_texture_render(ctx, ctx->DrawBuffer);
- }
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
- if (ctx->DrawBuffer == newFb)
- bindDrawBuf = GL_FALSE; /* no change */
- else
- _mesa_reference_framebuffer(&ctx->DrawBuffer, newFb);
+ /* check if old read/draw buffers were render-to-texture */
+ if (!bindReadBuf)
+ check_end_texture_render(ctx, oldReadFb);
- if (newFb->Name != 0) {
- /* check if newly bound framebuffer has any texture attachments */
- check_begin_texture_render(ctx, newFb);
- }
+ if (oldDrawFb != oldReadFb)
+ check_end_texture_render(ctx, oldDrawFb);
+
+ /* check if newly bound framebuffer has any texture attachments */
+ check_begin_texture_render(ctx, newDrawFb);
+
+ _mesa_reference_framebuffer(&ctx->DrawBuffer, newDrawFb);
}
if ((bindDrawBuf || bindReadBuf) && ctx->Driver.BindFramebuffer) {
- ctx->Driver.BindFramebuffer(ctx, target, newFb, newFbread);
+ ctx->Driver.BindFramebuffer(ctx, target, newDrawFb, newReadFb);
}
}
@@ -1306,7 +1343,7 @@ _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
for (i = 0; i < n; i++) {
if (framebuffers[i] > 0) {
@@ -1411,7 +1448,7 @@ _mesa_CheckFramebufferStatusEXT(GLenum target)
return GL_FRAMEBUFFER_COMPLETE_EXT;
}
- FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+ /* No need to flush here */
if (buffer->_Status != GL_FRAMEBUFFER_COMPLETE) {
_mesa_test_framebuffer_completeness(ctx, buffer);
@@ -1527,7 +1564,7 @@ framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target,
return;
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
_glthread_LOCK_MUTEX(fb->Mutex);
if (texObj) {
@@ -1707,7 +1744,7 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
assert(ctx->Driver.FramebufferRenderbuffer);
ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb);
@@ -1783,7 +1820,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
}
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
+ /* No need to flush here */
switch (pname) {
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
@@ -1905,7 +1942,6 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
void GLAPIENTRY
_mesa_GenerateMipmapEXT(GLenum target)
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
GET_CURRENT_CONTEXT(ctx);
@@ -1924,8 +1960,12 @@ _mesa_GenerateMipmapEXT(GLenum target)
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ if (texObj->BaseLevel >= texObj->MaxLevel) {
+ /* nothing to do */
+ return;
+ }
_mesa_lock_texture(ctx, texObj);
if (target == GL_TEXTURE_CUBE_MAP) {
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index 356476e35a5..5cfa898031e 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -438,7 +438,7 @@ static struct ureg register_input( struct tnl_program *p, GLuint input )
*/
static struct ureg register_output( struct tnl_program *p, GLuint output )
{
- p->program->Base.OutputsWritten |= (1<<output);
+ p->program->Base.OutputsWritten |= BITFIELD64_BIT(output);
return make_ureg(PROGRAM_OUTPUT, output);
}
@@ -523,7 +523,6 @@ static void emit_dst( struct prog_dst_register *dst,
dst->CondMask = COND_TR; /* always pass cond test */
dst->CondSwizzle = SWIZZLE_NOOP;
dst->CondSrc = 0;
- dst->pad = 0;
/* Check that bitfield sizes aren't exceeded */
ASSERT(dst->Index == reg.idx);
}
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index e9b33e489a3..329b7950745 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -133,6 +133,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
+ MESA_FORMAT_XRGB8888_REV, /* Name */
+ "MESA_FORMAT_XRGB8888_REV", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
MESA_FORMAT_RGB888, /* Name */
"MESA_FORMAT_RGB888", /* StrName */
GL_RGB, /* BaseFormat */
@@ -232,6 +241,24 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
+ MESA_FORMAT_AL1616, /* Name */
+ "MESA_FORMAT_AL1616", /* StrName */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
+ 16, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_AL1616_REV, /* Name */
+ "MESA_FORMAT_AL1616_REV", /* StrName */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
+ 16, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
MESA_FORMAT_RGB332, /* Name */
"MESA_FORMAT_RGB332", /* StrName */
GL_RGB, /* BaseFormat */
@@ -444,7 +471,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
"MESA_FORMAT_RGB_FXT1",
GL_RGB,
GL_UNSIGNED_NORMALIZED,
- 8, 8, 8, 0,
+ 4, 4, 4, 0, /* approx Red/Green/BlueBits */
0, 0, 0, 0, 0,
8, 4, 16 /* 16 bytes per 8x4 block */
},
@@ -453,7 +480,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
"MESA_FORMAT_RGBA_FXT1",
GL_RGBA,
GL_UNSIGNED_NORMALIZED,
- 8, 8, 8, 8,
+ 4, 4, 4, 1, /* approx Red/Green/Blue/AlphaBits */
0, 0, 0, 0, 0,
8, 4, 16 /* 16 bytes per 8x4 block */
},
@@ -974,6 +1001,13 @@ _mesa_format_to_type_and_comps(gl_format format,
*datatype = GL_UNSIGNED_BYTE;
*comps = 2;
return;
+
+ case MESA_FORMAT_AL1616:
+ case MESA_FORMAT_AL1616_REV:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 2;
+ return;
+
case MESA_FORMAT_RGB332:
*datatype = GL_UNSIGNED_BYTE_3_3_2;
*comps = 3;
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index fa6359f5c8a..0eeeb8b2bac 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -55,6 +55,7 @@ typedef enum
MESA_FORMAT_ARGB8888, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */
MESA_FORMAT_ARGB8888_REV, /* BBBB BBBB GGGG GGGG RRRR RRRR AAAA AAAA */
MESA_FORMAT_XRGB8888, /* xxxx xxxx RRRR RRRR GGGG GGGG BBBB BBBB */
+ MESA_FORMAT_XRGB8888_REV, /* BBBB BBBB GGGG GGGG RRRR RRRR xxxx xxxx */
MESA_FORMAT_RGB888, /* RRRR RRRR GGGG GGGG BBBB BBBB */
MESA_FORMAT_BGR888, /* BBBB BBBB GGGG GGGG RRRR RRRR */
MESA_FORMAT_RGB565, /* RRRR RGGG GGGB BBBB */
@@ -66,6 +67,8 @@ typedef enum
MESA_FORMAT_ARGB1555_REV, /* GGGB BBBB ARRR RRGG */
MESA_FORMAT_AL88, /* AAAA AAAA LLLL LLLL */
MESA_FORMAT_AL88_REV, /* LLLL LLLL AAAA AAAA */
+ MESA_FORMAT_AL1616, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */
+ MESA_FORMAT_AL1616_REV, /* LLLL LLLL LLLL LLLL AAAA AAAA AAAA AAAA */
MESA_FORMAT_RGB332, /* RRRG GGBB */
MESA_FORMAT_A8, /* AAAA AAAA */
MESA_FORMAT_L8, /* LLLL LLLL */
@@ -137,7 +140,7 @@ typedef enum
MESA_FORMAT_SIGNED_RGBA_16,
/*@}*/
- MESA_FORMAT_COUNT,
+ MESA_FORMAT_COUNT
} gl_format;
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index a6e004a8166..e8932f83b6a 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1876,7 +1876,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetBooleanv");
- params[0] = INT_TO_BOOLEAN(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+ params[0] = INT_TO_BOOLEAN(ctx->Const.MaxCombinedTextureImageUnits);
break;
case GL_CURRENT_PROGRAM:
CHECK_EXT1(ARB_shader_objects, "GetBooleanv");
@@ -3711,7 +3711,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetFloatv");
- params[0] = (GLfloat)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+ params[0] = (GLfloat)(ctx->Const.MaxCombinedTextureImageUnits);
break;
case GL_CURRENT_PROGRAM:
CHECK_EXT1(ARB_shader_objects, "GetFloatv");
@@ -5546,7 +5546,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetIntegerv");
- params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
+ params[0] = ctx->Const.MaxCombinedTextureImageUnits;
break;
case GL_CURRENT_PROGRAM:
CHECK_EXT1(ARB_shader_objects, "GetIntegerv");
@@ -5592,16 +5592,16 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
switch (pname) {
case GL_ACCUM_RED_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumRedBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumRedBits);
break;
case GL_ACCUM_GREEN_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumGreenBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumGreenBits);
break;
case GL_ACCUM_BLUE_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumBlueBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumBlueBits);
break;
case GL_ACCUM_ALPHA_BITS:
- params[0] = ctx->DrawBuffer->Visual.accumAlphaBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.accumAlphaBits);
break;
case GL_ACCUM_CLEAR_VALUE:
params[0] = FLOAT_TO_INT64(ctx->Accum.ClearColor[0]);
@@ -5613,7 +5613,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.AlphaBias);
break;
case GL_ALPHA_BITS:
- params[0] = ctx->DrawBuffer->Visual.alphaBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.alphaBits);
break;
case GL_ALPHA_SCALE:
params[0] = IROUND64(ctx->Pixel.AlphaScale);
@@ -5628,13 +5628,13 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = FLOAT_TO_INT64(ctx->Color.AlphaRef);
break;
case GL_ATTRIB_STACK_DEPTH:
- params[0] = ctx->AttribStackDepth;
+ params[0] = (GLint64)(ctx->AttribStackDepth);
break;
case GL_AUTO_NORMAL:
params[0] = BOOLEAN_TO_INT64(ctx->Eval.AutoNormal);
break;
case GL_AUX_BUFFERS:
- params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.numAuxBuffers);
break;
case GL_BLEND:
params[0] = BOOLEAN_TO_INT64(ctx->Color.BlendEnabled);
@@ -5673,13 +5673,13 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.BlueBias);
break;
case GL_BLUE_BITS:
- params[0] = ctx->DrawBuffer->Visual.blueBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.blueBits);
break;
case GL_BLUE_SCALE:
params[0] = IROUND64(ctx->Pixel.BlueScale);
break;
case GL_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = ctx->ClientAttribStackDepth;
+ params[0] = (GLint64)(ctx->ClientAttribStackDepth);
break;
case GL_CLIP_PLANE0:
params[0] = BOOLEAN_TO_INT64((ctx->Transform.ClipPlanesEnabled >> 0) & 1);
@@ -5715,10 +5715,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Light.ColorMaterialMode);
break;
case GL_COLOR_WRITEMASK:
- params[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0;
- params[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0;
- params[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0;
- params[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0;
+ params[0] = (GLint64)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
+ params[1] = (GLint64)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
+ params[2] = (GLint64)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
+ params[3] = (GLint64)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
break;
case GL_CULL_FACE:
params[0] = BOOLEAN_TO_INT64(ctx->Polygon.CullFlag);
@@ -5799,7 +5799,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.DepthBias);
break;
case GL_DEPTH_BITS:
- params[0] = ctx->DrawBuffer->Visual.depthBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.depthBits);
break;
case GL_DEPTH_CLEAR_VALUE:
params[0] = FLOAT_TO_INT64(((GLfloat) ctx->Depth.Clear));
@@ -5836,7 +5836,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_FEEDBACK_BUFFER_SIZE:
- params[0] = ctx->Feedback.BufferSize;
+ params[0] = (GLint64)(ctx->Feedback.BufferSize);
break;
case GL_FEEDBACK_BUFFER_TYPE:
params[0] = ENUM_TO_INT64(ctx->Feedback.Type);
@@ -5875,28 +5875,28 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.GreenBias);
break;
case GL_GREEN_BITS:
- params[0] = ctx->DrawBuffer->Visual.greenBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.greenBits);
break;
case GL_GREEN_SCALE:
params[0] = IROUND64(ctx->Pixel.GreenScale);
break;
case GL_INDEX_BITS:
- params[0] = ctx->DrawBuffer->Visual.indexBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.indexBits);
break;
case GL_INDEX_CLEAR_VALUE:
- params[0] = ctx->Color.ClearIndex;
+ params[0] = (GLint64)(ctx->Color.ClearIndex);
break;
case GL_INDEX_MODE:
params[0] = BOOLEAN_TO_INT64(!ctx->DrawBuffer->Visual.rgbMode);
break;
case GL_INDEX_OFFSET:
- params[0] = ctx->Pixel.IndexOffset;
+ params[0] = (GLint64)(ctx->Pixel.IndexOffset);
break;
case GL_INDEX_SHIFT:
- params[0] = ctx->Pixel.IndexShift;
+ params[0] = (GLint64)(ctx->Pixel.IndexShift);
break;
case GL_INDEX_WRITEMASK:
- params[0] = ctx->Color.IndexMask;
+ params[0] = (GLint64)(ctx->Color.IndexMask);
break;
case GL_LIGHT0:
params[0] = BOOLEAN_TO_INT64(ctx->Light.Light[0].Enabled);
@@ -5950,10 +5950,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Line.StippleFlag);
break;
case GL_LINE_STIPPLE_PATTERN:
- params[0] = ctx->Line.StipplePattern;
+ params[0] = (GLint64)(ctx->Line.StipplePattern);
break;
case GL_LINE_STIPPLE_REPEAT:
- params[0] = ctx->Line.StippleFactor;
+ params[0] = (GLint64)(ctx->Line.StippleFactor);
break;
case GL_LINE_WIDTH:
params[0] = IROUND64(ctx->Line.Width);
@@ -5970,10 +5970,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[1] = IROUND64(ctx->Const.MaxLineWidth);
break;
case GL_LIST_BASE:
- params[0] = ctx->List.ListBase;
+ params[0] = (GLint64)(ctx->List.ListBase);
break;
case GL_LIST_INDEX:
- params[0] = (ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0);
+ params[0] = (GLint64)((ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0));
break;
case GL_LIST_MODE:
{
@@ -6004,7 +6004,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[1] = IROUND64(ctx->Eval.MapGrid1u2);
break;
case GL_MAP1_GRID_SEGMENTS:
- params[0] = ctx->Eval.MapGrid1un;
+ params[0] = (GLint64)(ctx->Eval.MapGrid1un);
break;
case GL_MAP1_INDEX:
params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map1Index);
@@ -6040,8 +6040,8 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[3] = IROUND64(ctx->Eval.MapGrid2v2);
break;
case GL_MAP2_GRID_SEGMENTS:
- params[0] = ctx->Eval.MapGrid2un;
- params[1] = ctx->Eval.MapGrid2vn;
+ params[0] = (GLint64)(ctx->Eval.MapGrid2un);
+ params[1] = (GLint64)(ctx->Eval.MapGrid2vn);
break;
case GL_MAP2_INDEX:
params[0] = BOOLEAN_TO_INT64(ctx->Eval.Map2Index);
@@ -6077,53 +6077,53 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Transform.MatrixMode);
break;
case GL_MAX_ATTRIB_STACK_DEPTH:
- params[0] = MAX_ATTRIB_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_ATTRIB_STACK_DEPTH);
break;
case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH:
- params[0] = MAX_CLIENT_ATTRIB_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_CLIENT_ATTRIB_STACK_DEPTH);
break;
case GL_MAX_CLIP_PLANES:
- params[0] = ctx->Const.MaxClipPlanes;
+ params[0] = (GLint64)(ctx->Const.MaxClipPlanes);
break;
case GL_MAX_ELEMENTS_VERTICES:
- params[0] = ctx->Const.MaxArrayLockSize;
+ params[0] = (GLint64)(ctx->Const.MaxArrayLockSize);
break;
case GL_MAX_ELEMENTS_INDICES:
- params[0] = ctx->Const.MaxArrayLockSize;
+ params[0] = (GLint64)(ctx->Const.MaxArrayLockSize);
break;
case GL_MAX_EVAL_ORDER:
- params[0] = MAX_EVAL_ORDER;
+ params[0] = (GLint64)(MAX_EVAL_ORDER);
break;
case GL_MAX_LIGHTS:
- params[0] = ctx->Const.MaxLights;
+ params[0] = (GLint64)(ctx->Const.MaxLights);
break;
case GL_MAX_LIST_NESTING:
- params[0] = MAX_LIST_NESTING;
+ params[0] = (GLint64)(MAX_LIST_NESTING);
break;
case GL_MAX_MODELVIEW_STACK_DEPTH:
- params[0] = MAX_MODELVIEW_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_MODELVIEW_STACK_DEPTH);
break;
case GL_MAX_NAME_STACK_DEPTH:
- params[0] = MAX_NAME_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_NAME_STACK_DEPTH);
break;
case GL_MAX_PIXEL_MAP_TABLE:
- params[0] = MAX_PIXEL_MAP_TABLE;
+ params[0] = (GLint64)(MAX_PIXEL_MAP_TABLE);
break;
case GL_MAX_PROJECTION_STACK_DEPTH:
- params[0] = MAX_PROJECTION_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_PROJECTION_STACK_DEPTH);
break;
case GL_MAX_TEXTURE_SIZE:
- params[0] = 1 << (ctx->Const.MaxTextureLevels - 1);
+ params[0] = (GLint64)(1 << (ctx->Const.MaxTextureLevels - 1));
break;
case GL_MAX_3D_TEXTURE_SIZE:
- params[0] = 1 << (ctx->Const.Max3DTextureLevels - 1);
+ params[0] = (GLint64)(1 << (ctx->Const.Max3DTextureLevels - 1));
break;
case GL_MAX_TEXTURE_STACK_DEPTH:
- params[0] = MAX_TEXTURE_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_TEXTURE_STACK_DEPTH);
break;
case GL_MAX_VIEWPORT_DIMS:
- params[0] = ctx->Const.MaxViewportWidth;
- params[1] = ctx->Const.MaxViewportHeight;
+ params[0] = (GLint64)(ctx->Const.MaxViewportWidth);
+ params[1] = (GLint64)(ctx->Const.MaxViewportHeight);
break;
case GL_MODELVIEW_MATRIX:
{
@@ -6147,37 +6147,37 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_MODELVIEW_STACK_DEPTH:
- params[0] = ctx->ModelviewMatrixStack.Depth + 1;
+ params[0] = (GLint64)(ctx->ModelviewMatrixStack.Depth + 1);
break;
case GL_NAME_STACK_DEPTH:
- params[0] = ctx->Select.NameStackDepth;
+ params[0] = (GLint64)(ctx->Select.NameStackDepth);
break;
case GL_NORMALIZE:
params[0] = BOOLEAN_TO_INT64(ctx->Transform.Normalize);
break;
case GL_PACK_ALIGNMENT:
- params[0] = ctx->Pack.Alignment;
+ params[0] = (GLint64)(ctx->Pack.Alignment);
break;
case GL_PACK_LSB_FIRST:
params[0] = BOOLEAN_TO_INT64(ctx->Pack.LsbFirst);
break;
case GL_PACK_ROW_LENGTH:
- params[0] = ctx->Pack.RowLength;
+ params[0] = (GLint64)(ctx->Pack.RowLength);
break;
case GL_PACK_SKIP_PIXELS:
- params[0] = ctx->Pack.SkipPixels;
+ params[0] = (GLint64)(ctx->Pack.SkipPixels);
break;
case GL_PACK_SKIP_ROWS:
- params[0] = ctx->Pack.SkipRows;
+ params[0] = (GLint64)(ctx->Pack.SkipRows);
break;
case GL_PACK_SWAP_BYTES:
params[0] = BOOLEAN_TO_INT64(ctx->Pack.SwapBytes);
break;
case GL_PACK_SKIP_IMAGES_EXT:
- params[0] = ctx->Pack.SkipImages;
+ params[0] = (GLint64)(ctx->Pack.SkipImages);
break;
case GL_PACK_IMAGE_HEIGHT_EXT:
- params[0] = ctx->Pack.ImageHeight;
+ params[0] = (GLint64)(ctx->Pack.ImageHeight);
break;
case GL_PACK_INVERT_MESA:
params[0] = BOOLEAN_TO_INT64(ctx->Pack.Invert);
@@ -6186,34 +6186,34 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Hint.PerspectiveCorrection);
break;
case GL_PIXEL_MAP_A_TO_A_SIZE:
- params[0] = ctx->PixelMaps.AtoA.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.AtoA.Size);
break;
case GL_PIXEL_MAP_B_TO_B_SIZE:
- params[0] = ctx->PixelMaps.BtoB.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.BtoB.Size);
break;
case GL_PIXEL_MAP_G_TO_G_SIZE:
- params[0] = ctx->PixelMaps.GtoG.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.GtoG.Size);
break;
case GL_PIXEL_MAP_I_TO_A_SIZE:
- params[0] = ctx->PixelMaps.ItoA.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoA.Size);
break;
case GL_PIXEL_MAP_I_TO_B_SIZE:
- params[0] = ctx->PixelMaps.ItoB.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoB.Size);
break;
case GL_PIXEL_MAP_I_TO_G_SIZE:
- params[0] = ctx->PixelMaps.ItoG.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoG.Size);
break;
case GL_PIXEL_MAP_I_TO_I_SIZE:
- params[0] = ctx->PixelMaps.ItoI.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoI.Size);
break;
case GL_PIXEL_MAP_I_TO_R_SIZE:
- params[0] = ctx->PixelMaps.ItoR.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.ItoR.Size);
break;
case GL_PIXEL_MAP_R_TO_R_SIZE:
- params[0] = ctx->PixelMaps.RtoR.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.RtoR.Size);
break;
case GL_PIXEL_MAP_S_TO_S_SIZE:
- params[0] = ctx->PixelMaps.StoS.Size;
+ params[0] = (GLint64)(ctx->PixelMaps.StoS.Size);
break;
case GL_POINT_SIZE:
params[0] = IROUND64(ctx->Point.Size);
@@ -6302,7 +6302,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_PROJECTION_STACK_DEPTH:
- params[0] = ctx->ProjectionMatrixStack.Depth + 1;
+ params[0] = (GLint64)(ctx->ProjectionMatrixStack.Depth + 1);
break;
case GL_READ_BUFFER:
params[0] = ENUM_TO_INT64(ctx->ReadBuffer->ColorReadBuffer);
@@ -6311,7 +6311,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Pixel.RedBias);
break;
case GL_RED_BITS:
- params[0] = ctx->DrawBuffer->Visual.redBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.redBits);
break;
case GL_RED_SCALE:
params[0] = IROUND64(ctx->Pixel.RedScale);
@@ -6326,16 +6326,16 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->DrawBuffer->Visual.rgbMode);
break;
case GL_SCISSOR_BOX:
- params[0] = ctx->Scissor.X;
- params[1] = ctx->Scissor.Y;
- params[2] = ctx->Scissor.Width;
- params[3] = ctx->Scissor.Height;
+ params[0] = (GLint64)(ctx->Scissor.X);
+ params[1] = (GLint64)(ctx->Scissor.Y);
+ params[2] = (GLint64)(ctx->Scissor.Width);
+ params[3] = (GLint64)(ctx->Scissor.Height);
break;
case GL_SCISSOR_TEST:
params[0] = BOOLEAN_TO_INT64(ctx->Scissor.Enabled);
break;
case GL_SELECTION_BUFFER_SIZE:
- params[0] = ctx->Select.BufferSize;
+ params[0] = (GLint64)(ctx->Select.BufferSize);
break;
case GL_SHADE_MODEL:
params[0] = ENUM_TO_INT64(ctx->Light.ShadeModel);
@@ -6344,10 +6344,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Texture.SharedPalette);
break;
case GL_STENCIL_BITS:
- params[0] = ctx->DrawBuffer->Visual.stencilBits;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.stencilBits);
break;
case GL_STENCIL_CLEAR_VALUE:
- params[0] = ctx->Stencil.Clear;
+ params[0] = (GLint64)(ctx->Stencil.Clear);
break;
case GL_STENCIL_FAIL:
params[0] = ENUM_TO_INT64(ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]);
@@ -6362,22 +6362,22 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]);
break;
case GL_STENCIL_REF:
- params[0] = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
+ params[0] = (GLint64)(ctx->Stencil.Ref[ctx->Stencil.ActiveFace]);
break;
case GL_STENCIL_TEST:
params[0] = BOOLEAN_TO_INT64(ctx->Stencil.Enabled);
break;
case GL_STENCIL_VALUE_MASK:
- params[0] = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
+ params[0] = (GLint64)(ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]);
break;
case GL_STENCIL_WRITEMASK:
- params[0] = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
+ params[0] = (GLint64)(ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]);
break;
case GL_STEREO:
params[0] = BOOLEAN_TO_INT64(ctx->DrawBuffer->Visual.stereoMode);
break;
case GL_SUBPIXEL_BITS:
- params[0] = ctx->Const.SubPixelBits;
+ params[0] = (GLint64)(ctx->Const.SubPixelBits);
break;
case GL_TEXTURE_1D:
params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_1D));
@@ -6397,21 +6397,21 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(_mesa_IsEnabled(GL_TEXTURE_2D_ARRAY_EXT));
break;
case GL_TEXTURE_BINDING_1D:
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_INDEX]->Name);
break;
case GL_TEXTURE_BINDING_2D:
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name);
break;
case GL_TEXTURE_BINDING_3D:
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name);
break;
case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
CHECK_EXT1(MESA_texture_array, "GetInteger64v");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_1D_ARRAY_INDEX]->Name);
break;
case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
CHECK_EXT1(MESA_texture_array, "GetInteger64v");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_ARRAY_INDEX]->Name);
break;
case GL_TEXTURE_GEN_S:
params[0] = BOOLEAN_TO_INT64(((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0));
@@ -6447,40 +6447,40 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_TEXTURE_STACK_DEPTH:
- params[0] = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1;
+ params[0] = (GLint64)(ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1);
break;
case GL_UNPACK_ALIGNMENT:
- params[0] = ctx->Unpack.Alignment;
+ params[0] = (GLint64)(ctx->Unpack.Alignment);
break;
case GL_UNPACK_LSB_FIRST:
params[0] = BOOLEAN_TO_INT64(ctx->Unpack.LsbFirst);
break;
case GL_UNPACK_ROW_LENGTH:
- params[0] = ctx->Unpack.RowLength;
+ params[0] = (GLint64)(ctx->Unpack.RowLength);
break;
case GL_UNPACK_SKIP_PIXELS:
- params[0] = ctx->Unpack.SkipPixels;
+ params[0] = (GLint64)(ctx->Unpack.SkipPixels);
break;
case GL_UNPACK_SKIP_ROWS:
- params[0] = ctx->Unpack.SkipRows;
+ params[0] = (GLint64)(ctx->Unpack.SkipRows);
break;
case GL_UNPACK_SWAP_BYTES:
params[0] = BOOLEAN_TO_INT64(ctx->Unpack.SwapBytes);
break;
case GL_UNPACK_SKIP_IMAGES_EXT:
- params[0] = ctx->Unpack.SkipImages;
+ params[0] = (GLint64)(ctx->Unpack.SkipImages);
break;
case GL_UNPACK_IMAGE_HEIGHT_EXT:
- params[0] = ctx->Unpack.ImageHeight;
+ params[0] = (GLint64)(ctx->Unpack.ImageHeight);
break;
case GL_UNPACK_CLIENT_STORAGE_APPLE:
params[0] = BOOLEAN_TO_INT64(ctx->Unpack.ClientStorage);
break;
case GL_VIEWPORT:
- params[0] = ctx->Viewport.X;
- params[1] = ctx->Viewport.Y;
- params[2] = ctx->Viewport.Width;
- params[3] = ctx->Viewport.Height;
+ params[0] = (GLint64)(ctx->Viewport.X);
+ params[1] = (GLint64)(ctx->Viewport.Y);
+ params[2] = (GLint64)(ctx->Viewport.Width);
+ params[3] = (GLint64)(ctx->Viewport.Height);
break;
case GL_ZOOM_X:
params[0] = IROUND64(ctx->Pixel.ZoomX);
@@ -6492,16 +6492,16 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->Vertex.Enabled);
break;
case GL_VERTEX_ARRAY_SIZE:
- params[0] = ctx->Array.ArrayObj->Vertex.Size;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Vertex.Size);
break;
case GL_VERTEX_ARRAY_TYPE:
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Vertex.Type);
break;
case GL_VERTEX_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Vertex.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Vertex.Stride);
break;
case GL_VERTEX_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_NORMAL_ARRAY:
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Normal.Enabled);
@@ -6510,25 +6510,25 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Normal.Type);
break;
case GL_NORMAL_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Normal.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Normal.Stride);
break;
case GL_NORMAL_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_COLOR_ARRAY:
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->Color.Enabled);
break;
case GL_COLOR_ARRAY_SIZE:
- params[0] = ctx->Array.ArrayObj->Color.Size;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Color.Size);
break;
case GL_COLOR_ARRAY_TYPE:
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Color.Type);
break;
case GL_COLOR_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Color.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Color.Stride);
break;
case GL_COLOR_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_INDEX_ARRAY:
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->Index.Enabled);
@@ -6537,46 +6537,46 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->Index.Type);
break;
case GL_INDEX_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->Index.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Index.Stride);
break;
case GL_INDEX_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_TEXTURE_COORD_ARRAY:
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled);
break;
case GL_TEXTURE_COORD_ARRAY_SIZE:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size);
break;
case GL_TEXTURE_COORD_ARRAY_TYPE:
params[0] = ENUM_TO_INT64(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type);
break;
case GL_TEXTURE_COORD_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride);
break;
case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_EDGE_FLAG_ARRAY:
params[0] = BOOLEAN_TO_INT64(ctx->Array.ArrayObj->EdgeFlag.Enabled);
break;
case GL_EDGE_FLAG_ARRAY_STRIDE:
- params[0] = ctx->Array.ArrayObj->EdgeFlag.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->EdgeFlag.Stride);
break;
case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
- params[0] = 0;
+ params[0] = (GLint64)(0);
break;
case GL_MAX_TEXTURE_UNITS_ARB:
CHECK_EXT1(ARB_multitexture, "GetInteger64v");
- params[0] = ctx->Const.MaxTextureUnits;
+ params[0] = (GLint64)(ctx->Const.MaxTextureUnits);
break;
case GL_ACTIVE_TEXTURE_ARB:
CHECK_EXT1(ARB_multitexture, "GetInteger64v");
- params[0] = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
+ params[0] = (GLint64)(GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit);
break;
case GL_CLIENT_ACTIVE_TEXTURE_ARB:
CHECK_EXT1(ARB_multitexture, "GetInteger64v");
- params[0] = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
+ params[0] = (GLint64)(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
break;
case GL_TEXTURE_CUBE_MAP_ARB:
CHECK_EXT1(ARB_texture_cube_map, "GetInteger64v");
@@ -6584,17 +6584,17 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
CHECK_EXT1(ARB_texture_cube_map, "GetInteger64v");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name);
break;
case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
CHECK_EXT1(ARB_texture_cube_map, "GetInteger64v");
- params[0] = (1 << (ctx->Const.MaxCubeTextureLevels - 1));
+ params[0] = (GLint64)((1 << (ctx->Const.MaxCubeTextureLevels - 1)));
break;
case GL_TEXTURE_COMPRESSION_HINT_ARB:
- params[0] = ctx->Hint.TextureCompression;
+ params[0] = (GLint64)(ctx->Hint.TextureCompression);
break;
case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
- params[0] = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
+ params[0] = (GLint64)(_mesa_get_compressed_formats(ctx, NULL, GL_FALSE));
break;
case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
{
@@ -6607,11 +6607,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
CHECK_EXT1(EXT_compiled_vertex_array, "GetInteger64v");
- params[0] = ctx->Array.LockFirst;
+ params[0] = (GLint64)(ctx->Array.LockFirst);
break;
case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
CHECK_EXT1(EXT_compiled_vertex_array, "GetInteger64v");
- params[0] = ctx->Array.LockCount;
+ params[0] = (GLint64)(ctx->Array.LockCount);
break;
case GL_TRANSPOSE_COLOR_MATRIX_ARB:
{
@@ -6719,10 +6719,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
}
break;
case GL_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = ctx->ColorMatrixStack.Depth + 1;
+ params[0] = (GLint64)(ctx->ColorMatrixStack.Depth + 1);
break;
case GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI:
- params[0] = MAX_COLOR_STACK_DEPTH;
+ params[0] = (GLint64)(MAX_COLOR_STACK_DEPTH);
break;
case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
params[0] = IROUND64(ctx->Pixel.PostColorMatrixScale[0]);
@@ -6840,11 +6840,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetInteger64v");
- params[0] = ctx->Array.ArrayObj->SecondaryColor.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->SecondaryColor.Stride);
break;
case GL_SECONDARY_COLOR_ARRAY_SIZE_EXT:
CHECK_EXT1(EXT_secondary_color, "GetInteger64v");
- params[0] = ctx->Array.ArrayObj->SecondaryColor.Size;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->SecondaryColor.Size);
break;
case GL_CURRENT_FOG_COORDINATE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
@@ -6863,7 +6863,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_FOG_COORDINATE_ARRAY_STRIDE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
- params[0] = ctx->Array.ArrayObj->FogCoord.Stride;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->FogCoord.Stride);
break;
case GL_FOG_COORDINATE_SOURCE_EXT:
CHECK_EXT1(EXT_fog_coord, "GetInteger64v");
@@ -6896,10 +6896,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Multisample.SampleCoverageInvert);
break;
case GL_SAMPLE_BUFFERS_ARB:
- params[0] = ctx->DrawBuffer->Visual.sampleBuffers;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.sampleBuffers);
break;
case GL_SAMPLES_ARB:
- params[0] = ctx->DrawBuffer->Visual.samples;
+ params[0] = (GLint64)(ctx->DrawBuffer->Visual.samples);
break;
case GL_RASTER_POSITION_UNCLIPPED_IBM:
CHECK_EXT1(IBM_rasterpos_clip, "GetInteger64v");
@@ -6923,7 +6923,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_VERTEX_PROGRAM_BINDING_NV:
CHECK_EXT1(NV_vertex_program, "GetInteger64v");
- params[0] = (ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0);
+ params[0] = (GLint64)((ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0));
break;
case GL_VERTEX_ATTRIB_ARRAY0_NV:
CHECK_EXT1(NV_vertex_program, "GetInteger64v");
@@ -7059,11 +7059,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_FRAGMENT_PROGRAM_BINDING_NV:
CHECK_EXT1(NV_fragment_program, "GetInteger64v");
- params[0] = ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
+ params[0] = (GLint64)(ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0);
break;
case GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV:
CHECK_EXT1(NV_fragment_program, "GetInteger64v");
- params[0] = MAX_NV_FRAGMENT_PROGRAM_PARAMS;
+ params[0] = (GLint64)(MAX_NV_FRAGMENT_PROGRAM_PARAMS);
break;
case GL_TEXTURE_RECTANGLE_NV:
CHECK_EXT1(NV_texture_rectangle, "GetInteger64v");
@@ -7071,11 +7071,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_TEXTURE_BINDING_RECTANGLE_NV:
CHECK_EXT1(NV_texture_rectangle, "GetInteger64v");
- params[0] = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name;
+ params[0] = (GLint64)(ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_RECT_INDEX]->Name);
break;
case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
CHECK_EXT1(NV_texture_rectangle, "GetInteger64v");
- params[0] = ctx->Const.MaxTextureRectSize;
+ params[0] = (GLint64)(ctx->Const.MaxTextureRectSize);
break;
case GL_STENCIL_TEST_TWO_SIDE_EXT:
CHECK_EXT1(EXT_stencil_two_side, "GetInteger64v");
@@ -7094,42 +7094,42 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Const.MaxSpotExponent);
break;
case GL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayBufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayBufferObj->Name);
break;
case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Vertex.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Vertex.BufferObj->Name);
break;
case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Normal.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Normal.BufferObj->Name);
break;
case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Color.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Color.BufferObj->Name);
break;
case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->Index.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Index.BufferObj->Name);
break;
case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name);
break;
case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->EdgeFlag.BufferObj->Name);
break;
case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->SecondaryColor.BufferObj->Name);
break;
case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ArrayObj->FogCoord.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->FogCoord.BufferObj->Name);
break;
case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
- params[0] = ctx->Array.ElementArrayBufferObj->Name;
+ params[0] = (GLint64)(ctx->Array.ElementArrayBufferObj->Name);
break;
case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
CHECK_EXT1(EXT_pixel_buffer_object, "GetInteger64v");
- params[0] = ctx->Pack.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Pack.BufferObj->Name);
break;
case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
CHECK_EXT1(EXT_pixel_buffer_object, "GetInteger64v");
- params[0] = ctx->Unpack.BufferObj->Name;
+ params[0] = (GLint64)(ctx->Unpack.BufferObj->Name);
break;
case GL_VERTEX_PROGRAM_ARB:
CHECK_EXT2(ARB_vertex_program, NV_vertex_program, "GetInteger64v");
@@ -7145,11 +7145,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB:
CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetInteger64v");
- params[0] = ctx->Const.MaxProgramMatrixStackDepth;
+ params[0] = (GLint64)(ctx->Const.MaxProgramMatrixStackDepth);
break;
case GL_MAX_PROGRAM_MATRICES_ARB:
CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetInteger64v");
- params[0] = ctx->Const.MaxProgramMatrices;
+ params[0] = (GLint64)(ctx->Const.MaxProgramMatrices);
break;
case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
CHECK_EXT3(ARB_vertex_program, ARB_fragment_program, NV_vertex_program, "GetInteger64v");
@@ -7201,11 +7201,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_VERTEX_ATTRIBS_ARB:
CHECK_EXT1(ARB_vertex_program, "GetInteger64v");
- params[0] = ctx->Const.VertexProgram.MaxAttribs;
+ params[0] = (GLint64)(ctx->Const.VertexProgram.MaxAttribs);
break;
case GL_PROGRAM_ERROR_POSITION_ARB:
CHECK_EXT4(NV_vertex_program, ARB_vertex_program, NV_fragment_program, ARB_fragment_program, "GetInteger64v");
- params[0] = ctx->Program.ErrorPos;
+ params[0] = (GLint64)(ctx->Program.ErrorPos);
break;
case GL_FRAGMENT_PROGRAM_ARB:
CHECK_EXT1(ARB_fragment_program, "GetInteger64v");
@@ -7213,11 +7213,11 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_TEXTURE_COORDS_ARB:
CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetInteger64v");
- params[0] = ctx->Const.MaxTextureCoordUnits;
+ params[0] = (GLint64)(ctx->Const.MaxTextureCoordUnits);
break;
case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT2(ARB_fragment_program, NV_fragment_program, "GetInteger64v");
- params[0] = ctx->Const.MaxTextureImageUnits;
+ params[0] = (GLint64)(ctx->Const.MaxTextureImageUnits);
break;
case GL_DEPTH_BOUNDS_TEST_EXT:
CHECK_EXT1(EXT_depth_bounds_test, "GetInteger64v");
@@ -7233,7 +7233,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = BOOLEAN_TO_INT64(ctx->Transform.DepthClamp);
break;
case GL_MAX_DRAW_BUFFERS_ARB:
- params[0] = ctx->Const.MaxDrawBuffers;
+ params[0] = (GLint64)(ctx->Const.MaxDrawBuffers);
break;
case GL_DRAW_BUFFER0_ARB:
params[0] = ENUM_TO_INT64(ctx->DrawBuffer->ColorDrawBuffer[0]);
@@ -7273,31 +7273,31 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
CHECK_EXT1(OES_read_format, "GetInteger64v");
- params[0] = ctx->Const.ColorReadType;
+ params[0] = (GLint64)(ctx->Const.ColorReadType);
break;
case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
CHECK_EXT1(OES_read_format, "GetInteger64v");
- params[0] = ctx->Const.ColorReadFormat;
+ params[0] = (GLint64)(ctx->Const.ColorReadFormat);
break;
case GL_NUM_FRAGMENT_REGISTERS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 6;
+ params[0] = (GLint64)(6);
break;
case GL_NUM_FRAGMENT_CONSTANTS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 8;
+ params[0] = (GLint64)(8);
break;
case GL_NUM_PASSES_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 2;
+ params[0] = (GLint64)(2);
break;
case GL_NUM_INSTRUCTIONS_PER_PASS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 8;
+ params[0] = (GLint64)(8);
break;
case GL_NUM_INSTRUCTIONS_TOTAL_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 16;
+ params[0] = (GLint64)(16);
break;
case GL_COLOR_ALPHA_PAIRING_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
@@ -7305,23 +7305,23 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_NUM_LOOPBACK_COMPONENTS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 3;
+ params[0] = (GLint64)(3);
break;
case GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI:
CHECK_EXT1(ATI_fragment_shader, "GetInteger64v");
- params[0] = 3;
+ params[0] = (GLint64)(3);
break;
case GL_STENCIL_BACK_FUNC:
params[0] = ENUM_TO_INT64(ctx->Stencil.Function[1]);
break;
case GL_STENCIL_BACK_VALUE_MASK:
- params[0] = ctx->Stencil.ValueMask[1];
+ params[0] = (GLint64)(ctx->Stencil.ValueMask[1]);
break;
case GL_STENCIL_BACK_WRITEMASK:
- params[0] = ctx->Stencil.WriteMask[1];
+ params[0] = (GLint64)(ctx->Stencil.WriteMask[1]);
break;
case GL_STENCIL_BACK_REF:
- params[0] = ctx->Stencil.Ref[1];
+ params[0] = (GLint64)(ctx->Stencil.Ref[1]);
break;
case GL_STENCIL_BACK_FAIL:
params[0] = ENUM_TO_INT64(ctx->Stencil.FailFunc[1]);
@@ -7334,23 +7334,23 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_FRAMEBUFFER_BINDING_EXT:
CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = ctx->DrawBuffer->Name;
+ params[0] = (GLint64)(ctx->DrawBuffer->Name);
break;
case GL_RENDERBUFFER_BINDING_EXT:
CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
+ params[0] = (GLint64)(ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0);
break;
case GL_MAX_COLOR_ATTACHMENTS_EXT:
CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = ctx->Const.MaxColorAttachments;
+ params[0] = (GLint64)(ctx->Const.MaxColorAttachments);
break;
case GL_MAX_RENDERBUFFER_SIZE_EXT:
CHECK_EXT1(EXT_framebuffer_object, "GetInteger64v");
- params[0] = ctx->Const.MaxRenderbufferSize;
+ params[0] = (GLint64)(ctx->Const.MaxRenderbufferSize);
break;
case GL_READ_FRAMEBUFFER_BINDING_EXT:
CHECK_EXT1(EXT_framebuffer_blit, "GetInteger64v");
- params[0] = ctx->ReadBuffer->Name;
+ params[0] = (GLint64)(ctx->ReadBuffer->Name);
break;
case GL_PROVOKING_VERTEX_EXT:
CHECK_EXT1(EXT_provoking_vertex, "GetInteger64v");
@@ -7362,7 +7362,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetInteger64v");
- params[0] = ctx->Const.FragmentProgram.MaxUniformComponents;
+ params[0] = (GLint64)(ctx->Const.FragmentProgram.MaxUniformComponents);
break;
case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB:
CHECK_EXT1(ARB_fragment_shader, "GetInteger64v");
@@ -7370,31 +7370,31 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = ctx->Const.VertexProgram.MaxUniformComponents;
+ params[0] = (GLint64)(ctx->Const.VertexProgram.MaxUniformComponents);
break;
case GL_MAX_VARYING_FLOATS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = ctx->Const.MaxVarying * 4;
+ params[0] = (GLint64)(ctx->Const.MaxVarying * 4);
break;
case GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = ctx->Const.MaxVertexTextureImageUnits;
+ params[0] = (GLint64)(ctx->Const.MaxVertexTextureImageUnits);
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
+ params[0] = (GLint64)(ctx->Const.MaxCombinedTextureImageUnits);
break;
case GL_CURRENT_PROGRAM:
CHECK_EXT1(ARB_shader_objects, "GetInteger64v");
- params[0] = ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0;
+ params[0] = (GLint64)(ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0);
break;
case GL_MAX_SAMPLES:
CHECK_EXT1(ARB_framebuffer_object, "GetInteger64v");
- params[0] = ctx->Const.MaxSamples;
+ params[0] = (GLint64)(ctx->Const.MaxSamples);
break;
case GL_VERTEX_ARRAY_BINDING_APPLE:
CHECK_EXT1(APPLE_vertex_array_object, "GetInteger64v");
- params[0] = ctx->Array.ArrayObj->Name;
+ params[0] = (GLint64)(ctx->Array.ArrayObj->Name);
break;
case GL_TEXTURE_CUBE_MAP_SEAMLESS:
CHECK_EXT1(ARB_seamless_cube_map, "GetInteger64v");
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index 364d8c55c45..a29962d3348 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -1006,7 +1006,7 @@ StateVars = [
( "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB", GLint,
["ctx->Const.MaxVertexTextureImageUnits"], "", ["ARB_vertex_shader"] ),
( "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB", GLint,
- ["MAX_COMBINED_TEXTURE_IMAGE_UNITS"], "", ["ARB_vertex_shader"] ),
+ ["ctx->Const.MaxCombinedTextureImageUnits"], "", ["ARB_vertex_shader"] ),
# GL_ARB_shader_objects
# Actually, this token isn't part of GL_ARB_shader_objects, but is
@@ -1046,7 +1046,7 @@ def ConversionFunc(fromType, toType):
elif fromType == GLint and toType == GLfloat: # but not GLfloatN!
return "(GLfloat)"
elif fromType == GLint and toType == GLint64:
- return ""
+ return "(GLint64)"
elif fromType == GLint64 and toType == GLfloat: # but not GLfloatN!
return "(GLfloat)"
else:
diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c
index 87816d31329..c7304e8dd75 100644
--- a/src/mesa/main/histogram.c
+++ b/src/mesa/main/histogram.c
@@ -189,16 +189,17 @@ pack_histogram( GLcontext *ctx,
{
/* temporarily store as GLuints */
GLuint temp[4*HISTOGRAM_TABLE_SIZE];
- GLhalfARB *dst = (GLhalfARB *) destination;
+ GLuint *dst = temp;
+ GLhalfARB *half = (GLhalfARB *) destination;
GLuint i;
/* get GLuint values */
PACK_MACRO(GLuint);
/* convert to GLhalf */
for (i = 0; i < n * comps; i++) {
- dst[i] = _mesa_float_to_half((GLfloat) temp[i]);
+ half[i] = _mesa_float_to_half((GLfloat) temp[i]);
}
if (packing->SwapBytes) {
- _mesa_swap2((GLushort *) dst, n * comps);
+ _mesa_swap2((GLushort *) half, n * comps);
}
}
break;
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 91d8d156b8f..c9e00cf7528 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -108,8 +108,8 @@ _mesa_align_malloc(size_t bytes, unsigned long alignment)
{
#if defined(HAVE_POSIX_MEMALIGN)
void *mem;
-
- (void) posix_memalign(& mem, alignment, bytes);
+ int err = posix_memalign(& mem, alignment, bytes);
+ (void) err;
return mem;
#elif defined(_WIN32) && defined(_MSC_VER)
return _aligned_malloc(bytes, alignment);
@@ -629,11 +629,15 @@ _mesa_ffsll(int64_t val)
unsigned int
_mesa_bitcount(unsigned int n)
{
+#if defined(__GNUC__)
+ return __builtin_popcount(n);
+#else
unsigned int bits;
for (bits = 0; n > 0; n = n >> 1) {
bits += (n & 1);
}
return bits;
+#endif
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 94d29a7dbb6..5f012448275 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -79,6 +79,31 @@
/**
+ * \name 64-bit extension of GLbitfield.
+ */
+/*@{*/
+typedef GLuint64 GLbitfield64;
+
+#define BITFIELD64_ONE 1ULL
+#define BITFIELD64_ALLONES ~0ULL
+
+/** Set a single bit */
+#define BITFIELD64_BIT(b) (BITFIELD64_ONE << (b))
+
+/** Set a mask of the least significant \c b bits */
+#define BITFIELD64_MASK(b) (((b) >= 64) ? BITFIELD64_ALLONES : \
+ (BITFIELD64_BIT(b) - 1))
+
+/**
+ * Set all bits from l (low bit) to h (high bit), inclusive.
+ *
+ * \note \C BITFIELD_64_RANGE(0, 63) return 64 set bits.
+ */
+#define BITFIELD64_RANGE(l, h) (BITFIELD64_MASK((h) + 1) & ~BITFIELD64_MASK(l))
+/*@}*/
+
+
+/**
* \name Some forward type declarations
*/
/*@{*/
@@ -1670,7 +1695,7 @@ struct gl_program
struct prog_instruction *Instructions;
GLbitfield InputsRead; /**< Bitmask of which input regs are read */
- GLbitfield OutputsWritten; /**< Bitmask of which output regs are written to */
+ GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */
GLbitfield InputFlags[MAX_PROGRAM_INPUTS]; /**< PROG_PARAM_BIT_x flags */
GLbitfield OutputFlags[MAX_PROGRAM_OUTPUTS]; /**< PROG_PARAM_BIT_x flags */
GLbitfield TexturesUsed[MAX_TEXTURE_UNITS]; /**< TEXTURE_x_BIT bitmask */
@@ -2294,6 +2319,7 @@ struct gl_constants
GLuint MaxTextureCoordUnits;
GLuint MaxTextureImageUnits;
GLuint MaxVertexTextureImageUnits;
+ GLuint MaxCombinedTextureImageUnits;
GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */
GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */
@@ -2412,9 +2438,10 @@ struct gl_extensions
GLboolean EXT_copy_texture;
GLboolean EXT_depth_bounds_test;
GLboolean EXT_draw_range_elements;
- GLboolean EXT_framebuffer_object;
GLboolean EXT_fog_coord;
GLboolean EXT_framebuffer_blit;
+ GLboolean EXT_framebuffer_multisample;
+ GLboolean EXT_framebuffer_object;
GLboolean EXT_gpu_program_parameters;
GLboolean EXT_histogram;
GLboolean EXT_multi_draw_arrays;
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 4c8fc1f72e0..b3305448904 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -200,7 +200,12 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
}
break;
case GL_POINT_SPRITE_COORD_ORIGIN:
- if (ctx->Extensions.ARB_point_sprite || ctx->Extensions.NV_point_sprite) {
+ /* This is not completely correct. GL_POINT_SPRITE_COORD_ORIGIN was
+ * added to point sprites when the extension was merged into OpenGL
+ * 2.0. It is expected that an implementation supporting OpenGL 1.4
+ * and GL_ARB_point_sprite will generate an error here.
+ */
+ if (ctx->Extensions.ARB_point_sprite) {
GLenum value = (GLenum) params[0];
if (value != GL_LOWER_LEFT && value != GL_UPPER_LEFT) {
_mesa_error(ctx, GL_INVALID_VALUE,
diff --git a/src/mesa/main/remap_helper.h b/src/mesa/main/remap_helper.h
index 3886f41862c..c80a524b4f0 100644
--- a/src/mesa/main/remap_helper.h
+++ b/src/mesa/main/remap_helper.h
@@ -1584,2742 +1584,2743 @@ static const char _mesa_function_pool[] =
"ip\0"
"glDeleteFencesNV\0"
"\0"
- /* _mesa_function_pool[10713]: DepthMask (offset 211) */
+ /* _mesa_function_pool[10713]: DeformationMap3dSGIX (dynamic) */
+ "iddiiddiiddiip\0"
+ "glDeformationMap3dSGIX\0"
+ "\0"
+ /* _mesa_function_pool[10752]: DepthMask (offset 211) */
"i\0"
"glDepthMask\0"
"\0"
- /* _mesa_function_pool[10728]: IsShader (will be remapped) */
+ /* _mesa_function_pool[10767]: IsShader (will be remapped) */
"i\0"
"glIsShader\0"
"\0"
- /* _mesa_function_pool[10742]: Indexf (offset 46) */
+ /* _mesa_function_pool[10781]: Indexf (offset 46) */
"f\0"
"glIndexf\0"
"\0"
- /* _mesa_function_pool[10754]: GetImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[10793]: GetImageTransformParameterivHP (dynamic) */
"iip\0"
"glGetImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[10792]: Indexd (offset 44) */
+ /* _mesa_function_pool[10831]: Indexd (offset 44) */
"d\0"
"glIndexd\0"
"\0"
- /* _mesa_function_pool[10804]: GetMaterialiv (offset 270) */
+ /* _mesa_function_pool[10843]: GetMaterialiv (offset 270) */
"iip\0"
"glGetMaterialiv\0"
"\0"
- /* _mesa_function_pool[10825]: StencilOp (offset 244) */
+ /* _mesa_function_pool[10864]: StencilOp (offset 244) */
"iii\0"
"glStencilOp\0"
"\0"
- /* _mesa_function_pool[10842]: WindowPos4ivMESA (will be remapped) */
+ /* _mesa_function_pool[10881]: WindowPos4ivMESA (will be remapped) */
"p\0"
"glWindowPos4ivMESA\0"
"\0"
- /* _mesa_function_pool[10864]: MultiTexCoord3svARB (offset 399) */
+ /* _mesa_function_pool[10903]: MultiTexCoord3svARB (offset 399) */
"ip\0"
"glMultiTexCoord3sv\0"
"glMultiTexCoord3svARB\0"
"\0"
- /* _mesa_function_pool[10909]: TexEnvfv (offset 185) */
+ /* _mesa_function_pool[10948]: TexEnvfv (offset 185) */
"iip\0"
"glTexEnvfv\0"
"\0"
- /* _mesa_function_pool[10925]: MultiTexCoord4iARB (offset 404) */
+ /* _mesa_function_pool[10964]: MultiTexCoord4iARB (offset 404) */
"iiiii\0"
"glMultiTexCoord4i\0"
"glMultiTexCoord4iARB\0"
"\0"
- /* _mesa_function_pool[10971]: Indexs (offset 50) */
+ /* _mesa_function_pool[11010]: Indexs (offset 50) */
"i\0"
"glIndexs\0"
"\0"
- /* _mesa_function_pool[10983]: Binormal3ivEXT (dynamic) */
+ /* _mesa_function_pool[11022]: Binormal3ivEXT (dynamic) */
"p\0"
"glBinormal3ivEXT\0"
"\0"
- /* _mesa_function_pool[11003]: ResizeBuffersMESA (will be remapped) */
+ /* _mesa_function_pool[11042]: ResizeBuffersMESA (will be remapped) */
"\0"
"glResizeBuffersMESA\0"
"\0"
- /* _mesa_function_pool[11025]: GetUniformivARB (will be remapped) */
+ /* _mesa_function_pool[11064]: GetUniformivARB (will be remapped) */
"iip\0"
"glGetUniformiv\0"
"glGetUniformivARB\0"
"\0"
- /* _mesa_function_pool[11063]: PixelTexGenParameteriSGIS (will be remapped) */
+ /* _mesa_function_pool[11102]: PixelTexGenParameteriSGIS (will be remapped) */
"ii\0"
"glPixelTexGenParameteriSGIS\0"
"\0"
- /* _mesa_function_pool[11095]: VertexPointervINTEL (dynamic) */
+ /* _mesa_function_pool[11134]: VertexPointervINTEL (dynamic) */
"iip\0"
"glVertexPointervINTEL\0"
"\0"
- /* _mesa_function_pool[11122]: Vertex2i (offset 130) */
+ /* _mesa_function_pool[11161]: Vertex2i (offset 130) */
"ii\0"
"glVertex2i\0"
"\0"
- /* _mesa_function_pool[11137]: LoadMatrixf (offset 291) */
+ /* _mesa_function_pool[11176]: LoadMatrixf (offset 291) */
"p\0"
"glLoadMatrixf\0"
"\0"
- /* _mesa_function_pool[11154]: Vertex2f (offset 128) */
+ /* _mesa_function_pool[11193]: Vertex2f (offset 128) */
"ff\0"
"glVertex2f\0"
"\0"
- /* _mesa_function_pool[11169]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[11208]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[11222]: Color4bv (offset 26) */
+ /* _mesa_function_pool[11261]: Color4bv (offset 26) */
"p\0"
"glColor4bv\0"
"\0"
- /* _mesa_function_pool[11236]: VertexPointer (offset 321) */
+ /* _mesa_function_pool[11275]: VertexPointer (offset 321) */
"iiip\0"
"glVertexPointer\0"
"\0"
- /* _mesa_function_pool[11258]: SecondaryColor3uiEXT (will be remapped) */
+ /* _mesa_function_pool[11297]: SecondaryColor3uiEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ui\0"
"glSecondaryColor3uiEXT\0"
"\0"
- /* _mesa_function_pool[11306]: StartInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[11345]: StartInstrumentsSGIX (dynamic) */
"\0"
"glStartInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[11331]: SecondaryColor3usvEXT (will be remapped) */
+ /* _mesa_function_pool[11370]: SecondaryColor3usvEXT (will be remapped) */
"p\0"
"glSecondaryColor3usv\0"
"glSecondaryColor3usvEXT\0"
"\0"
- /* _mesa_function_pool[11379]: VertexAttrib2fvNV (will be remapped) */
+ /* _mesa_function_pool[11418]: VertexAttrib2fvNV (will be remapped) */
"ip\0"
"glVertexAttrib2fvNV\0"
"\0"
- /* _mesa_function_pool[11403]: ProgramLocalParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[11442]: ProgramLocalParameter4dvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4dvARB\0"
"\0"
- /* _mesa_function_pool[11438]: DeleteLists (offset 4) */
+ /* _mesa_function_pool[11477]: DeleteLists (offset 4) */
"ii\0"
"glDeleteLists\0"
"\0"
- /* _mesa_function_pool[11456]: LogicOp (offset 242) */
+ /* _mesa_function_pool[11495]: LogicOp (offset 242) */
"i\0"
"glLogicOp\0"
"\0"
- /* _mesa_function_pool[11469]: MatrixIndexuivARB (dynamic) */
+ /* _mesa_function_pool[11508]: MatrixIndexuivARB (dynamic) */
"ip\0"
"glMatrixIndexuivARB\0"
"\0"
- /* _mesa_function_pool[11493]: Vertex2s (offset 132) */
+ /* _mesa_function_pool[11532]: Vertex2s (offset 132) */
"ii\0"
"glVertex2s\0"
"\0"
- /* _mesa_function_pool[11508]: RenderbufferStorageMultisample (will be remapped) */
+ /* _mesa_function_pool[11547]: RenderbufferStorageMultisample (will be remapped) */
"iiiii\0"
"glRenderbufferStorageMultisample\0"
+ "glRenderbufferStorageMultisampleEXT\0"
"\0"
- /* _mesa_function_pool[11548]: TexCoord4fv (offset 121) */
+ /* _mesa_function_pool[11623]: TexCoord4fv (offset 121) */
"p\0"
"glTexCoord4fv\0"
"\0"
- /* _mesa_function_pool[11565]: Tangent3sEXT (dynamic) */
+ /* _mesa_function_pool[11640]: Tangent3sEXT (dynamic) */
"iii\0"
"glTangent3sEXT\0"
"\0"
- /* _mesa_function_pool[11585]: GlobalAlphaFactorfSUN (dynamic) */
+ /* _mesa_function_pool[11660]: GlobalAlphaFactorfSUN (dynamic) */
"f\0"
"glGlobalAlphaFactorfSUN\0"
"\0"
- /* _mesa_function_pool[11612]: MultiTexCoord3iARB (offset 396) */
+ /* _mesa_function_pool[11687]: MultiTexCoord3iARB (offset 396) */
"iiii\0"
"glMultiTexCoord3i\0"
"glMultiTexCoord3iARB\0"
"\0"
- /* _mesa_function_pool[11657]: IsProgram (will be remapped) */
+ /* _mesa_function_pool[11732]: IsProgram (will be remapped) */
"i\0"
"glIsProgram\0"
"\0"
- /* _mesa_function_pool[11672]: TexCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[11747]: TexCoordPointerListIBM (dynamic) */
"iiipi\0"
"glTexCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[11704]: GlobalAlphaFactorusSUN (dynamic) */
+ /* _mesa_function_pool[11779]: GlobalAlphaFactorusSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorusSUN\0"
"\0"
- /* _mesa_function_pool[11732]: VertexAttrib2dvNV (will be remapped) */
+ /* _mesa_function_pool[11807]: VertexAttrib2dvNV (will be remapped) */
"ip\0"
"glVertexAttrib2dvNV\0"
"\0"
- /* _mesa_function_pool[11756]: FramebufferRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[11831]: FramebufferRenderbufferEXT (will be remapped) */
"iiii\0"
"glFramebufferRenderbuffer\0"
"glFramebufferRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[11817]: VertexAttrib1dvNV (will be remapped) */
+ /* _mesa_function_pool[11892]: VertexAttrib1dvNV (will be remapped) */
"ip\0"
"glVertexAttrib1dvNV\0"
"\0"
- /* _mesa_function_pool[11841]: GenTextures (offset 328) */
+ /* _mesa_function_pool[11916]: GenTextures (offset 328) */
"ip\0"
"glGenTextures\0"
"glGenTexturesEXT\0"
"\0"
- /* _mesa_function_pool[11876]: SetFenceNV (will be remapped) */
+ /* _mesa_function_pool[11951]: SetFenceNV (will be remapped) */
"ii\0"
"glSetFenceNV\0"
"\0"
- /* _mesa_function_pool[11893]: FramebufferTexture1DEXT (will be remapped) */
+ /* _mesa_function_pool[11968]: FramebufferTexture1DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture1D\0"
"glFramebufferTexture1DEXT\0"
"\0"
- /* _mesa_function_pool[11949]: GetCombinerOutputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[12024]: GetCombinerOutputParameterivNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterivNV\0"
"\0"
- /* _mesa_function_pool[11988]: MultiModeDrawArraysIBM (will be remapped) */
- "pppii\0"
- "glMultiModeDrawArraysIBM\0"
- "\0"
- /* _mesa_function_pool[12020]: PixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[12063]: PixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[12053]: TextureNormalEXT (dynamic) */
+ /* _mesa_function_pool[12096]: TextureNormalEXT (dynamic) */
"i\0"
"glTextureNormalEXT\0"
"\0"
- /* _mesa_function_pool[12075]: IndexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[12118]: IndexPointerListIBM (dynamic) */
"iipi\0"
"glIndexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[12103]: WeightfvARB (dynamic) */
+ /* _mesa_function_pool[12146]: WeightfvARB (dynamic) */
"ip\0"
"glWeightfvARB\0"
"\0"
- /* _mesa_function_pool[12121]: RasterPos2sv (offset 69) */
+ /* _mesa_function_pool[12164]: RasterPos2sv (offset 69) */
"p\0"
"glRasterPos2sv\0"
"\0"
- /* _mesa_function_pool[12139]: Color4ubv (offset 36) */
+ /* _mesa_function_pool[12182]: Color4ubv (offset 36) */
"p\0"
"glColor4ubv\0"
"\0"
- /* _mesa_function_pool[12154]: DrawBuffer (offset 202) */
+ /* _mesa_function_pool[12197]: DrawBuffer (offset 202) */
"i\0"
"glDrawBuffer\0"
"\0"
- /* _mesa_function_pool[12170]: TexCoord2fv (offset 105) */
+ /* _mesa_function_pool[12213]: TexCoord2fv (offset 105) */
"p\0"
"glTexCoord2fv\0"
"\0"
- /* _mesa_function_pool[12187]: WindowPos4fMESA (will be remapped) */
+ /* _mesa_function_pool[12230]: WindowPos4fMESA (will be remapped) */
"ffff\0"
"glWindowPos4fMESA\0"
"\0"
- /* _mesa_function_pool[12211]: TexCoord1sv (offset 101) */
+ /* _mesa_function_pool[12254]: TexCoord1sv (offset 101) */
"p\0"
"glTexCoord1sv\0"
"\0"
- /* _mesa_function_pool[12228]: WindowPos3dvMESA (will be remapped) */
+ /* _mesa_function_pool[12271]: WindowPos3dvMESA (will be remapped) */
"p\0"
"glWindowPos3dv\0"
"glWindowPos3dvARB\0"
"glWindowPos3dvMESA\0"
"\0"
- /* _mesa_function_pool[12283]: DepthFunc (offset 245) */
+ /* _mesa_function_pool[12326]: DepthFunc (offset 245) */
"i\0"
"glDepthFunc\0"
"\0"
- /* _mesa_function_pool[12298]: PixelMapusv (offset 253) */
+ /* _mesa_function_pool[12341]: PixelMapusv (offset 253) */
"iip\0"
"glPixelMapusv\0"
"\0"
- /* _mesa_function_pool[12317]: GetQueryObjecti64vEXT (will be remapped) */
+ /* _mesa_function_pool[12360]: GetQueryObjecti64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjecti64vEXT\0"
"\0"
- /* _mesa_function_pool[12346]: MultiTexCoord1dARB (offset 376) */
+ /* _mesa_function_pool[12389]: MultiTexCoord1dARB (offset 376) */
"id\0"
"glMultiTexCoord1d\0"
"glMultiTexCoord1dARB\0"
"\0"
- /* _mesa_function_pool[12389]: PointParameterivNV (will be remapped) */
+ /* _mesa_function_pool[12432]: PointParameterivNV (will be remapped) */
"ip\0"
"glPointParameteriv\0"
"glPointParameterivNV\0"
"\0"
- /* _mesa_function_pool[12433]: BlendFunc (offset 241) */
+ /* _mesa_function_pool[12476]: BlendFunc (offset 241) */
"ii\0"
"glBlendFunc\0"
"\0"
- /* _mesa_function_pool[12449]: Uniform2fvARB (will be remapped) */
+ /* _mesa_function_pool[12492]: Uniform2fvARB (will be remapped) */
"iip\0"
"glUniform2fv\0"
"glUniform2fvARB\0"
"\0"
- /* _mesa_function_pool[12483]: BufferParameteriAPPLE (will be remapped) */
+ /* _mesa_function_pool[12526]: BufferParameteriAPPLE (will be remapped) */
"iii\0"
"glBufferParameteriAPPLE\0"
"\0"
- /* _mesa_function_pool[12512]: MultiTexCoord3dvARB (offset 393) */
+ /* _mesa_function_pool[12555]: MultiTexCoord3dvARB (offset 393) */
"ip\0"
"glMultiTexCoord3dv\0"
"glMultiTexCoord3dvARB\0"
"\0"
- /* _mesa_function_pool[12557]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[12600]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[12613]: DeleteObjectARB (will be remapped) */
+ /* _mesa_function_pool[12656]: DeleteObjectARB (will be remapped) */
"i\0"
"glDeleteObjectARB\0"
"\0"
- /* _mesa_function_pool[12634]: MatrixIndexPointerARB (dynamic) */
+ /* _mesa_function_pool[12677]: MatrixIndexPointerARB (dynamic) */
"iiip\0"
"glMatrixIndexPointerARB\0"
"\0"
- /* _mesa_function_pool[12664]: ProgramNamedParameter4dvNV (will be remapped) */
+ /* _mesa_function_pool[12707]: ProgramNamedParameter4dvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[12699]: Tangent3fvEXT (dynamic) */
+ /* _mesa_function_pool[12742]: Tangent3fvEXT (dynamic) */
"p\0"
"glTangent3fvEXT\0"
"\0"
- /* _mesa_function_pool[12718]: Flush (offset 217) */
+ /* _mesa_function_pool[12761]: Flush (offset 217) */
"\0"
"glFlush\0"
"\0"
- /* _mesa_function_pool[12728]: Color4uiv (offset 38) */
+ /* _mesa_function_pool[12771]: Color4uiv (offset 38) */
"p\0"
"glColor4uiv\0"
"\0"
- /* _mesa_function_pool[12743]: GenVertexArrays (will be remapped) */
+ /* _mesa_function_pool[12786]: GenVertexArrays (will be remapped) */
"ip\0"
"glGenVertexArrays\0"
"\0"
- /* _mesa_function_pool[12765]: RasterPos3sv (offset 77) */
+ /* _mesa_function_pool[12808]: RasterPos3sv (offset 77) */
"p\0"
"glRasterPos3sv\0"
"\0"
- /* _mesa_function_pool[12783]: BindFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[12826]: BindFramebufferEXT (will be remapped) */
"ii\0"
"glBindFramebuffer\0"
"glBindFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[12826]: ReferencePlaneSGIX (dynamic) */
+ /* _mesa_function_pool[12869]: ReferencePlaneSGIX (dynamic) */
"p\0"
"glReferencePlaneSGIX\0"
"\0"
- /* _mesa_function_pool[12850]: PushAttrib (offset 219) */
+ /* _mesa_function_pool[12893]: PushAttrib (offset 219) */
"i\0"
"glPushAttrib\0"
"\0"
- /* _mesa_function_pool[12866]: RasterPos2i (offset 66) */
+ /* _mesa_function_pool[12909]: RasterPos2i (offset 66) */
"ii\0"
"glRasterPos2i\0"
"\0"
- /* _mesa_function_pool[12884]: ValidateProgramARB (will be remapped) */
+ /* _mesa_function_pool[12927]: ValidateProgramARB (will be remapped) */
"i\0"
"glValidateProgram\0"
"glValidateProgramARB\0"
"\0"
- /* _mesa_function_pool[12926]: TexParameteriv (offset 181) */
+ /* _mesa_function_pool[12969]: TexParameteriv (offset 181) */
"iip\0"
"glTexParameteriv\0"
"\0"
- /* _mesa_function_pool[12948]: UnlockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[12991]: UnlockArraysEXT (will be remapped) */
"\0"
"glUnlockArraysEXT\0"
"\0"
- /* _mesa_function_pool[12968]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[13011]: TexCoord2fColor3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[13009]: WindowPos3fvMESA (will be remapped) */
+ /* _mesa_function_pool[13052]: WindowPos3fvMESA (will be remapped) */
"p\0"
"glWindowPos3fv\0"
"glWindowPos3fvARB\0"
"glWindowPos3fvMESA\0"
"\0"
- /* _mesa_function_pool[13064]: RasterPos2f (offset 64) */
+ /* _mesa_function_pool[13107]: RasterPos2f (offset 64) */
"ff\0"
"glRasterPos2f\0"
"\0"
- /* _mesa_function_pool[13082]: VertexAttrib1svNV (will be remapped) */
+ /* _mesa_function_pool[13125]: VertexAttrib1svNV (will be remapped) */
"ip\0"
"glVertexAttrib1svNV\0"
"\0"
- /* _mesa_function_pool[13106]: RasterPos2d (offset 62) */
+ /* _mesa_function_pool[13149]: RasterPos2d (offset 62) */
"dd\0"
"glRasterPos2d\0"
"\0"
- /* _mesa_function_pool[13124]: RasterPos3fv (offset 73) */
+ /* _mesa_function_pool[13167]: RasterPos3fv (offset 73) */
"p\0"
"glRasterPos3fv\0"
"\0"
- /* _mesa_function_pool[13142]: CopyTexSubImage3D (offset 373) */
+ /* _mesa_function_pool[13185]: CopyTexSubImage3D (offset 373) */
"iiiiiiiii\0"
"glCopyTexSubImage3D\0"
"glCopyTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[13196]: VertexAttrib2dARB (will be remapped) */
+ /* _mesa_function_pool[13239]: VertexAttrib2dARB (will be remapped) */
"idd\0"
"glVertexAttrib2d\0"
"glVertexAttrib2dARB\0"
"\0"
- /* _mesa_function_pool[13238]: Color4ub (offset 35) */
+ /* _mesa_function_pool[13281]: Color4ub (offset 35) */
"iiii\0"
"glColor4ub\0"
"\0"
- /* _mesa_function_pool[13255]: GetInteger64v (will be remapped) */
+ /* _mesa_function_pool[13298]: GetInteger64v (will be remapped) */
"ip\0"
"glGetInteger64v\0"
"\0"
- /* _mesa_function_pool[13275]: TextureColorMaskSGIS (dynamic) */
+ /* _mesa_function_pool[13318]: TextureColorMaskSGIS (dynamic) */
"iiii\0"
"glTextureColorMaskSGIS\0"
"\0"
- /* _mesa_function_pool[13304]: RasterPos2s (offset 68) */
+ /* _mesa_function_pool[13347]: RasterPos2s (offset 68) */
"ii\0"
"glRasterPos2s\0"
"\0"
- /* _mesa_function_pool[13322]: GetColorTable (offset 343) */
+ /* _mesa_function_pool[13365]: GetColorTable (offset 343) */
"iiip\0"
"glGetColorTable\0"
"glGetColorTableSGI\0"
"glGetColorTableEXT\0"
"\0"
- /* _mesa_function_pool[13382]: SelectBuffer (offset 195) */
+ /* _mesa_function_pool[13425]: SelectBuffer (offset 195) */
"ip\0"
"glSelectBuffer\0"
"\0"
- /* _mesa_function_pool[13401]: Indexiv (offset 49) */
+ /* _mesa_function_pool[13444]: Indexiv (offset 49) */
"p\0"
"glIndexiv\0"
"\0"
- /* _mesa_function_pool[13414]: TexCoord3i (offset 114) */
+ /* _mesa_function_pool[13457]: TexCoord3i (offset 114) */
"iii\0"
"glTexCoord3i\0"
"\0"
- /* _mesa_function_pool[13432]: CopyColorTable (offset 342) */
+ /* _mesa_function_pool[13475]: CopyColorTable (offset 342) */
"iiiii\0"
"glCopyColorTable\0"
"glCopyColorTableSGI\0"
"\0"
- /* _mesa_function_pool[13476]: GetHistogramParameterfv (offset 362) */
+ /* _mesa_function_pool[13519]: GetHistogramParameterfv (offset 362) */
"iip\0"
"glGetHistogramParameterfv\0"
"glGetHistogramParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[13536]: Frustum (offset 289) */
+ /* _mesa_function_pool[13579]: Frustum (offset 289) */
"dddddd\0"
"glFrustum\0"
"\0"
- /* _mesa_function_pool[13554]: GetString (offset 275) */
+ /* _mesa_function_pool[13597]: GetString (offset 275) */
"i\0"
"glGetString\0"
"\0"
- /* _mesa_function_pool[13569]: ColorPointervINTEL (dynamic) */
+ /* _mesa_function_pool[13612]: ColorPointervINTEL (dynamic) */
"iip\0"
"glColorPointervINTEL\0"
"\0"
- /* _mesa_function_pool[13595]: TexEnvf (offset 184) */
+ /* _mesa_function_pool[13638]: TexEnvf (offset 184) */
"iif\0"
"glTexEnvf\0"
"\0"
- /* _mesa_function_pool[13610]: TexCoord3d (offset 110) */
+ /* _mesa_function_pool[13653]: TexCoord3d (offset 110) */
"ddd\0"
"glTexCoord3d\0"
"\0"
- /* _mesa_function_pool[13628]: AlphaFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[13671]: AlphaFragmentOp1ATI (will be remapped) */
"iiiiii\0"
"glAlphaFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[13658]: TexCoord3f (offset 112) */
+ /* _mesa_function_pool[13701]: TexCoord3f (offset 112) */
"fff\0"
"glTexCoord3f\0"
"\0"
- /* _mesa_function_pool[13676]: MultiTexCoord3ivARB (offset 397) */
+ /* _mesa_function_pool[13719]: MultiTexCoord3ivARB (offset 397) */
"ip\0"
"glMultiTexCoord3iv\0"
"glMultiTexCoord3ivARB\0"
"\0"
- /* _mesa_function_pool[13721]: MultiTexCoord2sARB (offset 390) */
+ /* _mesa_function_pool[13764]: MultiTexCoord2sARB (offset 390) */
"iii\0"
"glMultiTexCoord2s\0"
"glMultiTexCoord2sARB\0"
"\0"
- /* _mesa_function_pool[13765]: VertexAttrib1dvARB (will be remapped) */
+ /* _mesa_function_pool[13808]: VertexAttrib1dvARB (will be remapped) */
"ip\0"
"glVertexAttrib1dv\0"
"glVertexAttrib1dvARB\0"
"\0"
- /* _mesa_function_pool[13808]: DeleteTextures (offset 327) */
+ /* _mesa_function_pool[13851]: DeleteTextures (offset 327) */
"ip\0"
"glDeleteTextures\0"
"glDeleteTexturesEXT\0"
"\0"
- /* _mesa_function_pool[13849]: TexCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[13892]: TexCoordPointerEXT (will be remapped) */
"iiiip\0"
"glTexCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[13877]: TexSubImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[13920]: TexSubImage4DSGIS (dynamic) */
"iiiiiiiiiiiip\0"
"glTexSubImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[13912]: TexCoord3s (offset 116) */
+ /* _mesa_function_pool[13955]: TexCoord3s (offset 116) */
"iii\0"
"glTexCoord3s\0"
"\0"
- /* _mesa_function_pool[13930]: GetTexLevelParameteriv (offset 285) */
+ /* _mesa_function_pool[13973]: GetTexLevelParameteriv (offset 285) */
"iiip\0"
"glGetTexLevelParameteriv\0"
"\0"
- /* _mesa_function_pool[13961]: CombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[14004]: CombinerStageParameterfvNV (dynamic) */
"iip\0"
"glCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[13995]: StopInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[14038]: StopInstrumentsSGIX (dynamic) */
"i\0"
"glStopInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[14020]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[14063]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
"fffffffffffffff\0"
"glTexCoord4fColor4fNormal3fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[14076]: ClearAccum (offset 204) */
+ /* _mesa_function_pool[14119]: ClearAccum (offset 204) */
"ffff\0"
"glClearAccum\0"
"\0"
- /* _mesa_function_pool[14095]: DeformSGIX (dynamic) */
+ /* _mesa_function_pool[14138]: DeformSGIX (dynamic) */
"i\0"
"glDeformSGIX\0"
"\0"
- /* _mesa_function_pool[14111]: GetVertexAttribfvARB (will be remapped) */
+ /* _mesa_function_pool[14154]: GetVertexAttribfvARB (will be remapped) */
"iip\0"
"glGetVertexAttribfv\0"
"glGetVertexAttribfvARB\0"
"\0"
- /* _mesa_function_pool[14159]: SecondaryColor3ivEXT (will be remapped) */
+ /* _mesa_function_pool[14202]: SecondaryColor3ivEXT (will be remapped) */
"p\0"
"glSecondaryColor3iv\0"
"glSecondaryColor3ivEXT\0"
"\0"
- /* _mesa_function_pool[14205]: TexCoord4iv (offset 123) */
+ /* _mesa_function_pool[14248]: TexCoord4iv (offset 123) */
"p\0"
"glTexCoord4iv\0"
"\0"
- /* _mesa_function_pool[14222]: UniformMatrix4x2fv (will be remapped) */
+ /* _mesa_function_pool[14265]: UniformMatrix4x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x2fv\0"
"\0"
- /* _mesa_function_pool[14249]: GetDetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14292]: GetDetailTexFuncSGIS (dynamic) */
"ip\0"
"glGetDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14276]: GetCombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[14319]: GetCombinerStageParameterfvNV (dynamic) */
"iip\0"
"glGetCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[14313]: PolygonOffset (offset 319) */
+ /* _mesa_function_pool[14356]: PolygonOffset (offset 319) */
"ff\0"
"glPolygonOffset\0"
"\0"
- /* _mesa_function_pool[14333]: BindVertexArray (will be remapped) */
+ /* _mesa_function_pool[14376]: BindVertexArray (will be remapped) */
"i\0"
"glBindVertexArray\0"
"\0"
- /* _mesa_function_pool[14354]: Color4ubVertex2fvSUN (dynamic) */
+ /* _mesa_function_pool[14397]: Color4ubVertex2fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex2fvSUN\0"
"\0"
- /* _mesa_function_pool[14381]: Rectd (offset 86) */
+ /* _mesa_function_pool[14424]: Rectd (offset 86) */
"dddd\0"
"glRectd\0"
"\0"
- /* _mesa_function_pool[14395]: TexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14438]: TexFilterFuncSGIS (dynamic) */
"iiip\0"
"glTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14421]: SampleMaskSGIS (will be remapped) */
+ /* _mesa_function_pool[14464]: SampleMaskSGIS (will be remapped) */
"fi\0"
"glSampleMaskSGIS\0"
"glSampleMaskEXT\0"
"\0"
- /* _mesa_function_pool[14458]: GetAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[14501]: GetAttribLocationARB (will be remapped) */
"ip\0"
"glGetAttribLocation\0"
"glGetAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[14505]: RasterPos3i (offset 74) */
+ /* _mesa_function_pool[14548]: RasterPos3i (offset 74) */
"iii\0"
"glRasterPos3i\0"
"\0"
- /* _mesa_function_pool[14524]: VertexAttrib4ubvARB (will be remapped) */
+ /* _mesa_function_pool[14567]: VertexAttrib4ubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
"\0"
- /* _mesa_function_pool[14569]: DetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14612]: DetailTexFuncSGIS (dynamic) */
"iip\0"
"glDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14594]: Normal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[14637]: Normal3fVertex3fSUN (dynamic) */
"ffffff\0"
"glNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[14624]: CopyTexImage2D (offset 324) */
+ /* _mesa_function_pool[14667]: CopyTexImage2D (offset 324) */
"iiiiiiii\0"
"glCopyTexImage2D\0"
"glCopyTexImage2DEXT\0"
"\0"
- /* _mesa_function_pool[14671]: GetBufferPointervARB (will be remapped) */
+ /* _mesa_function_pool[14714]: GetBufferPointervARB (will be remapped) */
"iip\0"
"glGetBufferPointerv\0"
"glGetBufferPointervARB\0"
"\0"
- /* _mesa_function_pool[14719]: ProgramEnvParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[14762]: ProgramEnvParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramEnvParameter4fARB\0"
"glProgramParameter4fNV\0"
"\0"
- /* _mesa_function_pool[14777]: Uniform3ivARB (will be remapped) */
+ /* _mesa_function_pool[14820]: Uniform3ivARB (will be remapped) */
"iip\0"
"glUniform3iv\0"
"glUniform3ivARB\0"
"\0"
- /* _mesa_function_pool[14811]: Lightfv (offset 160) */
+ /* _mesa_function_pool[14854]: Lightfv (offset 160) */
"iip\0"
"glLightfv\0"
"\0"
- /* _mesa_function_pool[14826]: ClearDepth (offset 208) */
+ /* _mesa_function_pool[14869]: ClearDepth (offset 208) */
"d\0"
"glClearDepth\0"
"\0"
- /* _mesa_function_pool[14842]: GetFenceivNV (will be remapped) */
+ /* _mesa_function_pool[14885]: GetFenceivNV (will be remapped) */
"iip\0"
"glGetFenceivNV\0"
"\0"
- /* _mesa_function_pool[14862]: WindowPos4dvMESA (will be remapped) */
+ /* _mesa_function_pool[14905]: WindowPos4dvMESA (will be remapped) */
"p\0"
"glWindowPos4dvMESA\0"
"\0"
- /* _mesa_function_pool[14884]: ColorSubTable (offset 346) */
+ /* _mesa_function_pool[14927]: ColorSubTable (offset 346) */
"iiiiip\0"
"glColorSubTable\0"
"glColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[14927]: Color4fv (offset 30) */
+ /* _mesa_function_pool[14970]: Color4fv (offset 30) */
"p\0"
"glColor4fv\0"
"\0"
- /* _mesa_function_pool[14941]: MultiTexCoord4ivARB (offset 405) */
+ /* _mesa_function_pool[14984]: MultiTexCoord4ivARB (offset 405) */
"ip\0"
"glMultiTexCoord4iv\0"
"glMultiTexCoord4ivARB\0"
"\0"
- /* _mesa_function_pool[14986]: ProgramLocalParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[15029]: ProgramLocalParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramLocalParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[15023]: ColorPointer (offset 308) */
+ /* _mesa_function_pool[15066]: ColorPointer (offset 308) */
"iiip\0"
"glColorPointer\0"
"\0"
- /* _mesa_function_pool[15044]: Rects (offset 92) */
+ /* _mesa_function_pool[15087]: Rects (offset 92) */
"iiii\0"
"glRects\0"
"\0"
- /* _mesa_function_pool[15058]: GetMapAttribParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15101]: GetMapAttribParameterfvNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterfvNV\0"
"\0"
- /* _mesa_function_pool[15092]: Lightiv (offset 162) */
+ /* _mesa_function_pool[15135]: Lightiv (offset 162) */
"iip\0"
"glLightiv\0"
"\0"
- /* _mesa_function_pool[15107]: VertexAttrib4sARB (will be remapped) */
+ /* _mesa_function_pool[15150]: VertexAttrib4sARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4s\0"
"glVertexAttrib4sARB\0"
"\0"
- /* _mesa_function_pool[15151]: GetQueryObjectuivARB (will be remapped) */
+ /* _mesa_function_pool[15194]: GetQueryObjectuivARB (will be remapped) */
"iip\0"
"glGetQueryObjectuiv\0"
"glGetQueryObjectuivARB\0"
"\0"
- /* _mesa_function_pool[15199]: GetTexParameteriv (offset 283) */
+ /* _mesa_function_pool[15242]: GetTexParameteriv (offset 283) */
"iip\0"
"glGetTexParameteriv\0"
"\0"
- /* _mesa_function_pool[15224]: MapParameterivNV (dynamic) */
+ /* _mesa_function_pool[15267]: MapParameterivNV (dynamic) */
"iip\0"
"glMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[15248]: GenRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[15291]: GenRenderbuffersEXT (will be remapped) */
"ip\0"
"glGenRenderbuffers\0"
"glGenRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[15293]: VertexAttrib2dvARB (will be remapped) */
+ /* _mesa_function_pool[15336]: VertexAttrib2dvARB (will be remapped) */
"ip\0"
"glVertexAttrib2dv\0"
"glVertexAttrib2dvARB\0"
"\0"
- /* _mesa_function_pool[15336]: EdgeFlagPointerEXT (will be remapped) */
+ /* _mesa_function_pool[15379]: EdgeFlagPointerEXT (will be remapped) */
"iip\0"
"glEdgeFlagPointerEXT\0"
"\0"
- /* _mesa_function_pool[15362]: VertexAttribs2svNV (will be remapped) */
+ /* _mesa_function_pool[15405]: VertexAttribs2svNV (will be remapped) */
"iip\0"
"glVertexAttribs2svNV\0"
"\0"
- /* _mesa_function_pool[15388]: WeightbvARB (dynamic) */
+ /* _mesa_function_pool[15431]: WeightbvARB (dynamic) */
"ip\0"
"glWeightbvARB\0"
"\0"
- /* _mesa_function_pool[15406]: VertexAttrib2fvARB (will be remapped) */
+ /* _mesa_function_pool[15449]: VertexAttrib2fvARB (will be remapped) */
"ip\0"
"glVertexAttrib2fv\0"
"glVertexAttrib2fvARB\0"
"\0"
- /* _mesa_function_pool[15449]: GetBufferParameterivARB (will be remapped) */
+ /* _mesa_function_pool[15492]: GetBufferParameterivARB (will be remapped) */
"iip\0"
"glGetBufferParameteriv\0"
"glGetBufferParameterivARB\0"
"\0"
- /* _mesa_function_pool[15503]: Rectdv (offset 87) */
+ /* _mesa_function_pool[15546]: Rectdv (offset 87) */
"pp\0"
"glRectdv\0"
"\0"
- /* _mesa_function_pool[15516]: ListParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[15559]: ListParameteriSGIX (dynamic) */
"iii\0"
"glListParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[15542]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[15585]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffff\0"
"glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[15601]: InstrumentsBufferSGIX (dynamic) */
+ /* _mesa_function_pool[15644]: InstrumentsBufferSGIX (dynamic) */
"ip\0"
"glInstrumentsBufferSGIX\0"
"\0"
- /* _mesa_function_pool[15629]: VertexAttrib4NivARB (will be remapped) */
+ /* _mesa_function_pool[15672]: VertexAttrib4NivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Niv\0"
"glVertexAttrib4NivARB\0"
"\0"
- /* _mesa_function_pool[15674]: GetAttachedShaders (will be remapped) */
+ /* _mesa_function_pool[15717]: GetAttachedShaders (will be remapped) */
"iipp\0"
"glGetAttachedShaders\0"
"\0"
- /* _mesa_function_pool[15701]: GenVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[15744]: GenVertexArraysAPPLE (will be remapped) */
"ip\0"
"glGenVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[15728]: Materialiv (offset 172) */
+ /* _mesa_function_pool[15771]: Materialiv (offset 172) */
"iip\0"
"glMaterialiv\0"
"\0"
- /* _mesa_function_pool[15746]: PushClientAttrib (offset 335) */
+ /* _mesa_function_pool[15789]: PushClientAttrib (offset 335) */
"i\0"
"glPushClientAttrib\0"
"\0"
- /* _mesa_function_pool[15768]: ProgramEnvParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[15811]: ProgramEnvParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramEnvParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[15803]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[15846]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[15849]: WindowPos2iMESA (will be remapped) */
+ /* _mesa_function_pool[15892]: WindowPos2iMESA (will be remapped) */
"ii\0"
"glWindowPos2i\0"
"glWindowPos2iARB\0"
"glWindowPos2iMESA\0"
"\0"
- /* _mesa_function_pool[15902]: SecondaryColor3fvEXT (will be remapped) */
+ /* _mesa_function_pool[15945]: SecondaryColor3fvEXT (will be remapped) */
"p\0"
"glSecondaryColor3fv\0"
"glSecondaryColor3fvEXT\0"
"\0"
- /* _mesa_function_pool[15948]: PolygonMode (offset 174) */
+ /* _mesa_function_pool[15991]: PolygonMode (offset 174) */
"ii\0"
"glPolygonMode\0"
"\0"
- /* _mesa_function_pool[15966]: CompressedTexSubImage1DARB (will be remapped) */
+ /* _mesa_function_pool[16009]: CompressedTexSubImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexSubImage1D\0"
"glCompressedTexSubImage1DARB\0"
"\0"
- /* _mesa_function_pool[16030]: GetVertexAttribivNV (will be remapped) */
+ /* _mesa_function_pool[16073]: GetVertexAttribivNV (will be remapped) */
"iip\0"
"glGetVertexAttribivNV\0"
"\0"
- /* _mesa_function_pool[16057]: GetProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[16100]: GetProgramStringARB (will be remapped) */
"iip\0"
"glGetProgramStringARB\0"
"\0"
- /* _mesa_function_pool[16084]: TexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[16127]: TexBumpParameterfvATI (will be remapped) */
"ip\0"
"glTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[16112]: CompileShaderARB (will be remapped) */
+ /* _mesa_function_pool[16155]: CompileShaderARB (will be remapped) */
"i\0"
"glCompileShader\0"
"glCompileShaderARB\0"
"\0"
- /* _mesa_function_pool[16150]: DeleteShader (will be remapped) */
+ /* _mesa_function_pool[16193]: DeleteShader (will be remapped) */
"i\0"
"glDeleteShader\0"
"\0"
- /* _mesa_function_pool[16168]: DisableClientState (offset 309) */
+ /* _mesa_function_pool[16211]: DisableClientState (offset 309) */
"i\0"
"glDisableClientState\0"
"\0"
- /* _mesa_function_pool[16192]: TexGeni (offset 192) */
+ /* _mesa_function_pool[16235]: TexGeni (offset 192) */
"iii\0"
"glTexGeni\0"
"\0"
- /* _mesa_function_pool[16207]: TexGenf (offset 190) */
+ /* _mesa_function_pool[16250]: TexGenf (offset 190) */
"iif\0"
"glTexGenf\0"
"\0"
- /* _mesa_function_pool[16222]: Uniform3fARB (will be remapped) */
+ /* _mesa_function_pool[16265]: Uniform3fARB (will be remapped) */
"ifff\0"
"glUniform3f\0"
"glUniform3fARB\0"
"\0"
- /* _mesa_function_pool[16255]: TexGend (offset 188) */
+ /* _mesa_function_pool[16298]: TexGend (offset 188) */
"iid\0"
"glTexGend\0"
"\0"
- /* _mesa_function_pool[16270]: ListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[16313]: ListParameterfvSGIX (dynamic) */
"iip\0"
"glListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[16297]: GetPolygonStipple (offset 274) */
+ /* _mesa_function_pool[16340]: GetPolygonStipple (offset 274) */
"p\0"
"glGetPolygonStipple\0"
"\0"
- /* _mesa_function_pool[16320]: Tangent3dvEXT (dynamic) */
+ /* _mesa_function_pool[16363]: Tangent3dvEXT (dynamic) */
"p\0"
"glTangent3dvEXT\0"
"\0"
- /* _mesa_function_pool[16339]: GetVertexAttribfvNV (will be remapped) */
+ /* _mesa_function_pool[16382]: GetVertexAttribfvNV (will be remapped) */
"iip\0"
"glGetVertexAttribfvNV\0"
"\0"
- /* _mesa_function_pool[16366]: WindowPos3sMESA (will be remapped) */
+ /* _mesa_function_pool[16409]: WindowPos3sMESA (will be remapped) */
"iii\0"
"glWindowPos3s\0"
"glWindowPos3sARB\0"
"glWindowPos3sMESA\0"
"\0"
- /* _mesa_function_pool[16420]: VertexAttrib2svNV (will be remapped) */
+ /* _mesa_function_pool[16463]: VertexAttrib2svNV (will be remapped) */
"ip\0"
"glVertexAttrib2svNV\0"
"\0"
- /* _mesa_function_pool[16444]: VertexAttribs1fvNV (will be remapped) */
+ /* _mesa_function_pool[16487]: VertexAttribs1fvNV (will be remapped) */
"iip\0"
"glVertexAttribs1fvNV\0"
"\0"
- /* _mesa_function_pool[16470]: TexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[16513]: TexCoord2fVertex3fvSUN (dynamic) */
"pp\0"
"glTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[16499]: WindowPos4sMESA (will be remapped) */
+ /* _mesa_function_pool[16542]: WindowPos4sMESA (will be remapped) */
"iiii\0"
"glWindowPos4sMESA\0"
"\0"
- /* _mesa_function_pool[16523]: VertexAttrib4NuivARB (will be remapped) */
+ /* _mesa_function_pool[16566]: VertexAttrib4NuivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4NuivARB\0"
"\0"
- /* _mesa_function_pool[16570]: ClientActiveTextureARB (offset 375) */
+ /* _mesa_function_pool[16613]: ClientActiveTextureARB (offset 375) */
"i\0"
"glClientActiveTexture\0"
"glClientActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[16620]: PixelTexGenSGIX (will be remapped) */
+ /* _mesa_function_pool[16663]: PixelTexGenSGIX (will be remapped) */
"i\0"
"glPixelTexGenSGIX\0"
"\0"
- /* _mesa_function_pool[16641]: ReplacementCodeusvSUN (dynamic) */
+ /* _mesa_function_pool[16684]: ReplacementCodeusvSUN (dynamic) */
"p\0"
"glReplacementCodeusvSUN\0"
"\0"
- /* _mesa_function_pool[16668]: Uniform4fARB (will be remapped) */
+ /* _mesa_function_pool[16711]: Uniform4fARB (will be remapped) */
"iffff\0"
"glUniform4f\0"
"glUniform4fARB\0"
"\0"
- /* _mesa_function_pool[16702]: Color4sv (offset 34) */
+ /* _mesa_function_pool[16745]: Color4sv (offset 34) */
"p\0"
"glColor4sv\0"
"\0"
- /* _mesa_function_pool[16716]: FlushMappedBufferRange (will be remapped) */
+ /* _mesa_function_pool[16759]: FlushMappedBufferRange (will be remapped) */
"iii\0"
"glFlushMappedBufferRange\0"
"\0"
- /* _mesa_function_pool[16746]: IsProgramNV (will be remapped) */
+ /* _mesa_function_pool[16789]: IsProgramNV (will be remapped) */
"i\0"
"glIsProgramARB\0"
"glIsProgramNV\0"
"\0"
- /* _mesa_function_pool[16778]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[16821]: FlushMappedBufferRangeAPPLE (will be remapped) */
"iii\0"
"glFlushMappedBufferRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[16813]: PixelZoom (offset 246) */
+ /* _mesa_function_pool[16856]: PixelZoom (offset 246) */
"ff\0"
"glPixelZoom\0"
"\0"
- /* _mesa_function_pool[16829]: ReplacementCodePointerSUN (dynamic) */
+ /* _mesa_function_pool[16872]: ReplacementCodePointerSUN (dynamic) */
"iip\0"
"glReplacementCodePointerSUN\0"
"\0"
- /* _mesa_function_pool[16862]: ProgramEnvParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[16905]: ProgramEnvParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramEnvParameter4dARB\0"
"glProgramParameter4dNV\0"
"\0"
- /* _mesa_function_pool[16920]: ColorTableParameterfv (offset 340) */
+ /* _mesa_function_pool[16963]: ColorTableParameterfv (offset 340) */
"iip\0"
"glColorTableParameterfv\0"
"glColorTableParameterfvSGI\0"
"\0"
- /* _mesa_function_pool[16976]: FragmentLightModelfSGIX (dynamic) */
+ /* _mesa_function_pool[17019]: FragmentLightModelfSGIX (dynamic) */
"if\0"
"glFragmentLightModelfSGIX\0"
"\0"
- /* _mesa_function_pool[17006]: Binormal3bvEXT (dynamic) */
+ /* _mesa_function_pool[17049]: Binormal3bvEXT (dynamic) */
"p\0"
"glBinormal3bvEXT\0"
"\0"
- /* _mesa_function_pool[17026]: PixelMapuiv (offset 252) */
+ /* _mesa_function_pool[17069]: PixelMapuiv (offset 252) */
"iip\0"
"glPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[17045]: Color3dv (offset 12) */
+ /* _mesa_function_pool[17088]: Color3dv (offset 12) */
"p\0"
"glColor3dv\0"
"\0"
- /* _mesa_function_pool[17059]: IsTexture (offset 330) */
+ /* _mesa_function_pool[17102]: IsTexture (offset 330) */
"i\0"
"glIsTexture\0"
"glIsTextureEXT\0"
"\0"
- /* _mesa_function_pool[17089]: VertexWeightfvEXT (dynamic) */
+ /* _mesa_function_pool[17132]: VertexWeightfvEXT (dynamic) */
"p\0"
"glVertexWeightfvEXT\0"
"\0"
- /* _mesa_function_pool[17112]: VertexAttrib1dARB (will be remapped) */
+ /* _mesa_function_pool[17155]: VertexAttrib1dARB (will be remapped) */
"id\0"
"glVertexAttrib1d\0"
"glVertexAttrib1dARB\0"
"\0"
- /* _mesa_function_pool[17153]: ImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[17196]: ImageTransformParameterivHP (dynamic) */
"iip\0"
"glImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[17188]: TexCoord4i (offset 122) */
+ /* _mesa_function_pool[17231]: TexCoord4i (offset 122) */
"iiii\0"
"glTexCoord4i\0"
"\0"
- /* _mesa_function_pool[17207]: DeleteQueriesARB (will be remapped) */
+ /* _mesa_function_pool[17250]: DeleteQueriesARB (will be remapped) */
"ip\0"
"glDeleteQueries\0"
"glDeleteQueriesARB\0"
"\0"
- /* _mesa_function_pool[17246]: Color4ubVertex2fSUN (dynamic) */
+ /* _mesa_function_pool[17289]: Color4ubVertex2fSUN (dynamic) */
"iiiiff\0"
"glColor4ubVertex2fSUN\0"
"\0"
- /* _mesa_function_pool[17276]: FragmentColorMaterialSGIX (dynamic) */
+ /* _mesa_function_pool[17319]: FragmentColorMaterialSGIX (dynamic) */
"ii\0"
"glFragmentColorMaterialSGIX\0"
"\0"
- /* _mesa_function_pool[17308]: CurrentPaletteMatrixARB (dynamic) */
+ /* _mesa_function_pool[17351]: CurrentPaletteMatrixARB (dynamic) */
"i\0"
"glCurrentPaletteMatrixARB\0"
"\0"
- /* _mesa_function_pool[17337]: GetMapdv (offset 266) */
+ /* _mesa_function_pool[17380]: GetMapdv (offset 266) */
"iip\0"
"glGetMapdv\0"
"\0"
- /* _mesa_function_pool[17353]: SamplePatternSGIS (will be remapped) */
+ /* _mesa_function_pool[17396]: SamplePatternSGIS (will be remapped) */
"i\0"
"glSamplePatternSGIS\0"
"glSamplePatternEXT\0"
"\0"
- /* _mesa_function_pool[17395]: PixelStoref (offset 249) */
+ /* _mesa_function_pool[17438]: PixelStoref (offset 249) */
"if\0"
"glPixelStoref\0"
"\0"
- /* _mesa_function_pool[17413]: IsQueryARB (will be remapped) */
+ /* _mesa_function_pool[17456]: IsQueryARB (will be remapped) */
"i\0"
"glIsQuery\0"
"glIsQueryARB\0"
"\0"
- /* _mesa_function_pool[17439]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[17482]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
"iiiiifff\0"
"glReplacementCodeuiColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[17488]: PixelStorei (offset 250) */
+ /* _mesa_function_pool[17531]: PixelStorei (offset 250) */
"ii\0"
"glPixelStorei\0"
"\0"
- /* _mesa_function_pool[17506]: VertexAttrib4usvARB (will be remapped) */
+ /* _mesa_function_pool[17549]: VertexAttrib4usvARB (will be remapped) */
"ip\0"
"glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
"\0"
- /* _mesa_function_pool[17551]: LinkProgramARB (will be remapped) */
+ /* _mesa_function_pool[17594]: LinkProgramARB (will be remapped) */
"i\0"
"glLinkProgram\0"
"glLinkProgramARB\0"
"\0"
- /* _mesa_function_pool[17585]: VertexAttrib2fNV (will be remapped) */
+ /* _mesa_function_pool[17628]: VertexAttrib2fNV (will be remapped) */
"iff\0"
"glVertexAttrib2fNV\0"
"\0"
- /* _mesa_function_pool[17609]: ShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[17652]: ShaderSourceARB (will be remapped) */
"iipp\0"
"glShaderSource\0"
"glShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[17648]: FragmentMaterialiSGIX (dynamic) */
+ /* _mesa_function_pool[17691]: FragmentMaterialiSGIX (dynamic) */
"iii\0"
"glFragmentMaterialiSGIX\0"
"\0"
- /* _mesa_function_pool[17677]: EvalCoord2dv (offset 233) */
+ /* _mesa_function_pool[17720]: EvalCoord2dv (offset 233) */
"p\0"
"glEvalCoord2dv\0"
"\0"
- /* _mesa_function_pool[17695]: VertexAttrib3svARB (will be remapped) */
+ /* _mesa_function_pool[17738]: VertexAttrib3svARB (will be remapped) */
"ip\0"
"glVertexAttrib3sv\0"
"glVertexAttrib3svARB\0"
"\0"
- /* _mesa_function_pool[17738]: ColorMaterial (offset 151) */
+ /* _mesa_function_pool[17781]: ColorMaterial (offset 151) */
"ii\0"
"glColorMaterial\0"
"\0"
- /* _mesa_function_pool[17758]: CompressedTexSubImage3DARB (will be remapped) */
+ /* _mesa_function_pool[17801]: CompressedTexSubImage3DARB (will be remapped) */
"iiiiiiiiiip\0"
"glCompressedTexSubImage3D\0"
"glCompressedTexSubImage3DARB\0"
"\0"
- /* _mesa_function_pool[17826]: WindowPos2ivMESA (will be remapped) */
+ /* _mesa_function_pool[17869]: WindowPos2ivMESA (will be remapped) */
"p\0"
"glWindowPos2iv\0"
"glWindowPos2ivARB\0"
"glWindowPos2ivMESA\0"
"\0"
- /* _mesa_function_pool[17881]: IsFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[17924]: IsFramebufferEXT (will be remapped) */
"i\0"
"glIsFramebuffer\0"
"glIsFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[17919]: Uniform4ivARB (will be remapped) */
+ /* _mesa_function_pool[17962]: Uniform4ivARB (will be remapped) */
"iip\0"
"glUniform4iv\0"
"glUniform4ivARB\0"
"\0"
- /* _mesa_function_pool[17953]: GetVertexAttribdvARB (will be remapped) */
+ /* _mesa_function_pool[17996]: GetVertexAttribdvARB (will be remapped) */
"iip\0"
"glGetVertexAttribdv\0"
"glGetVertexAttribdvARB\0"
"\0"
- /* _mesa_function_pool[18001]: TexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[18044]: TexBumpParameterivATI (will be remapped) */
"ip\0"
"glTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[18029]: GetSeparableFilter (offset 359) */
+ /* _mesa_function_pool[18072]: GetSeparableFilter (offset 359) */
"iiippp\0"
"glGetSeparableFilter\0"
"glGetSeparableFilterEXT\0"
"\0"
- /* _mesa_function_pool[18082]: Binormal3dEXT (dynamic) */
+ /* _mesa_function_pool[18125]: Binormal3dEXT (dynamic) */
"ddd\0"
"glBinormal3dEXT\0"
"\0"
- /* _mesa_function_pool[18103]: SpriteParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[18146]: SpriteParameteriSGIX (dynamic) */
"ii\0"
"glSpriteParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[18130]: RequestResidentProgramsNV (will be remapped) */
+ /* _mesa_function_pool[18173]: RequestResidentProgramsNV (will be remapped) */
"ip\0"
"glRequestResidentProgramsNV\0"
"\0"
- /* _mesa_function_pool[18162]: TagSampleBufferSGIX (dynamic) */
+ /* _mesa_function_pool[18205]: TagSampleBufferSGIX (dynamic) */
"\0"
"glTagSampleBufferSGIX\0"
"\0"
- /* _mesa_function_pool[18186]: ReplacementCodeusSUN (dynamic) */
+ /* _mesa_function_pool[18229]: ReplacementCodeusSUN (dynamic) */
"i\0"
"glReplacementCodeusSUN\0"
"\0"
- /* _mesa_function_pool[18212]: FeedbackBuffer (offset 194) */
+ /* _mesa_function_pool[18255]: FeedbackBuffer (offset 194) */
"iip\0"
"glFeedbackBuffer\0"
"\0"
- /* _mesa_function_pool[18234]: RasterPos2iv (offset 67) */
+ /* _mesa_function_pool[18277]: RasterPos2iv (offset 67) */
"p\0"
"glRasterPos2iv\0"
"\0"
- /* _mesa_function_pool[18252]: TexImage1D (offset 182) */
+ /* _mesa_function_pool[18295]: TexImage1D (offset 182) */
"iiiiiiip\0"
"glTexImage1D\0"
"\0"
- /* _mesa_function_pool[18275]: ListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[18318]: ListParameterivSGIX (dynamic) */
"iip\0"
"glListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[18302]: MultiDrawElementsEXT (will be remapped) */
+ /* _mesa_function_pool[18345]: MultiDrawElementsEXT (will be remapped) */
"ipipi\0"
"glMultiDrawElements\0"
"glMultiDrawElementsEXT\0"
"\0"
- /* _mesa_function_pool[18352]: Color3s (offset 17) */
+ /* _mesa_function_pool[18395]: Color3s (offset 17) */
"iii\0"
"glColor3s\0"
"\0"
- /* _mesa_function_pool[18367]: Uniform1ivARB (will be remapped) */
+ /* _mesa_function_pool[18410]: Uniform1ivARB (will be remapped) */
"iip\0"
"glUniform1iv\0"
"glUniform1ivARB\0"
"\0"
- /* _mesa_function_pool[18401]: WindowPos2sMESA (will be remapped) */
+ /* _mesa_function_pool[18444]: WindowPos2sMESA (will be remapped) */
"ii\0"
"glWindowPos2s\0"
"glWindowPos2sARB\0"
"glWindowPos2sMESA\0"
"\0"
- /* _mesa_function_pool[18454]: WeightusvARB (dynamic) */
+ /* _mesa_function_pool[18497]: WeightusvARB (dynamic) */
"ip\0"
"glWeightusvARB\0"
"\0"
- /* _mesa_function_pool[18473]: TexCoordPointer (offset 320) */
+ /* _mesa_function_pool[18516]: TexCoordPointer (offset 320) */
"iiip\0"
"glTexCoordPointer\0"
"\0"
- /* _mesa_function_pool[18497]: FogCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[18540]: FogCoordPointerEXT (will be remapped) */
"iip\0"
"glFogCoordPointer\0"
"glFogCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[18541]: IndexMaterialEXT (dynamic) */
+ /* _mesa_function_pool[18584]: IndexMaterialEXT (dynamic) */
"ii\0"
"glIndexMaterialEXT\0"
"\0"
- /* _mesa_function_pool[18564]: Color3i (offset 15) */
+ /* _mesa_function_pool[18607]: Color3i (offset 15) */
"iii\0"
"glColor3i\0"
"\0"
- /* _mesa_function_pool[18579]: FrontFace (offset 157) */
+ /* _mesa_function_pool[18622]: FrontFace (offset 157) */
"i\0"
"glFrontFace\0"
"\0"
- /* _mesa_function_pool[18594]: EvalCoord2d (offset 232) */
+ /* _mesa_function_pool[18637]: EvalCoord2d (offset 232) */
"dd\0"
"glEvalCoord2d\0"
"\0"
- /* _mesa_function_pool[18612]: SecondaryColor3ubvEXT (will be remapped) */
+ /* _mesa_function_pool[18655]: SecondaryColor3ubvEXT (will be remapped) */
"p\0"
"glSecondaryColor3ubv\0"
"glSecondaryColor3ubvEXT\0"
"\0"
- /* _mesa_function_pool[18660]: EvalCoord2f (offset 234) */
+ /* _mesa_function_pool[18703]: EvalCoord2f (offset 234) */
"ff\0"
"glEvalCoord2f\0"
"\0"
- /* _mesa_function_pool[18678]: VertexAttrib4dvARB (will be remapped) */
+ /* _mesa_function_pool[18721]: VertexAttrib4dvARB (will be remapped) */
"ip\0"
"glVertexAttrib4dv\0"
"glVertexAttrib4dvARB\0"
"\0"
- /* _mesa_function_pool[18721]: BindAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[18764]: BindAttribLocationARB (will be remapped) */
"iip\0"
"glBindAttribLocation\0"
"glBindAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[18771]: Color3b (offset 9) */
+ /* _mesa_function_pool[18814]: Color3b (offset 9) */
"iii\0"
"glColor3b\0"
"\0"
- /* _mesa_function_pool[18786]: MultiTexCoord2dARB (offset 384) */
+ /* _mesa_function_pool[18829]: MultiTexCoord2dARB (offset 384) */
"idd\0"
"glMultiTexCoord2d\0"
"glMultiTexCoord2dARB\0"
"\0"
- /* _mesa_function_pool[18830]: ExecuteProgramNV (will be remapped) */
+ /* _mesa_function_pool[18873]: ExecuteProgramNV (will be remapped) */
"iip\0"
"glExecuteProgramNV\0"
"\0"
- /* _mesa_function_pool[18854]: Color3f (offset 13) */
+ /* _mesa_function_pool[18897]: Color3f (offset 13) */
"fff\0"
"glColor3f\0"
"\0"
- /* _mesa_function_pool[18869]: LightEnviSGIX (dynamic) */
+ /* _mesa_function_pool[18912]: LightEnviSGIX (dynamic) */
"ii\0"
"glLightEnviSGIX\0"
"\0"
- /* _mesa_function_pool[18889]: Color3d (offset 11) */
+ /* _mesa_function_pool[18932]: Color3d (offset 11) */
"ddd\0"
"glColor3d\0"
"\0"
- /* _mesa_function_pool[18904]: Normal3dv (offset 55) */
+ /* _mesa_function_pool[18947]: Normal3dv (offset 55) */
"p\0"
"glNormal3dv\0"
"\0"
- /* _mesa_function_pool[18919]: Lightf (offset 159) */
+ /* _mesa_function_pool[18962]: Lightf (offset 159) */
"iif\0"
"glLightf\0"
"\0"
- /* _mesa_function_pool[18933]: ReplacementCodeuiSUN (dynamic) */
+ /* _mesa_function_pool[18976]: ReplacementCodeuiSUN (dynamic) */
"i\0"
"glReplacementCodeuiSUN\0"
"\0"
- /* _mesa_function_pool[18959]: MatrixMode (offset 293) */
+ /* _mesa_function_pool[19002]: MatrixMode (offset 293) */
"i\0"
"glMatrixMode\0"
"\0"
- /* _mesa_function_pool[18975]: GetPixelMapusv (offset 273) */
+ /* _mesa_function_pool[19018]: GetPixelMapusv (offset 273) */
"ip\0"
"glGetPixelMapusv\0"
"\0"
- /* _mesa_function_pool[18996]: Lighti (offset 161) */
+ /* _mesa_function_pool[19039]: Lighti (offset 161) */
"iii\0"
"glLighti\0"
"\0"
- /* _mesa_function_pool[19010]: VertexAttribPointerNV (will be remapped) */
+ /* _mesa_function_pool[19053]: VertexAttribPointerNV (will be remapped) */
"iiiip\0"
"glVertexAttribPointerNV\0"
"\0"
- /* _mesa_function_pool[19041]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[19084]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
"iiip\0"
"glGetFramebufferAttachmentParameteriv\0"
"glGetFramebufferAttachmentParameterivEXT\0"
"\0"
- /* _mesa_function_pool[19126]: PixelTransformParameterfEXT (dynamic) */
+ /* _mesa_function_pool[19169]: PixelTransformParameterfEXT (dynamic) */
"iif\0"
"glPixelTransformParameterfEXT\0"
"\0"
- /* _mesa_function_pool[19161]: MultiTexCoord4dvARB (offset 401) */
+ /* _mesa_function_pool[19204]: MultiTexCoord4dvARB (offset 401) */
"ip\0"
"glMultiTexCoord4dv\0"
"glMultiTexCoord4dvARB\0"
"\0"
- /* _mesa_function_pool[19206]: PixelTransformParameteriEXT (dynamic) */
+ /* _mesa_function_pool[19249]: PixelTransformParameteriEXT (dynamic) */
"iii\0"
"glPixelTransformParameteriEXT\0"
"\0"
- /* _mesa_function_pool[19241]: GetDoublev (offset 260) */
+ /* _mesa_function_pool[19284]: GetDoublev (offset 260) */
"ip\0"
"glGetDoublev\0"
"\0"
- /* _mesa_function_pool[19258]: MultMatrixd (offset 295) */
+ /* _mesa_function_pool[19301]: MultMatrixd (offset 295) */
"p\0"
"glMultMatrixd\0"
"\0"
- /* _mesa_function_pool[19275]: MultMatrixf (offset 294) */
+ /* _mesa_function_pool[19318]: MultMatrixf (offset 294) */
"p\0"
"glMultMatrixf\0"
"\0"
- /* _mesa_function_pool[19292]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[19335]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
"ffiiiifff\0"
"glTexCoord2fColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[19335]: Uniform1iARB (will be remapped) */
+ /* _mesa_function_pool[19378]: Uniform1iARB (will be remapped) */
"ii\0"
"glUniform1i\0"
"glUniform1iARB\0"
"\0"
- /* _mesa_function_pool[19366]: VertexAttribPointerARB (will be remapped) */
+ /* _mesa_function_pool[19409]: VertexAttribPointerARB (will be remapped) */
"iiiiip\0"
"glVertexAttribPointer\0"
"glVertexAttribPointerARB\0"
"\0"
- /* _mesa_function_pool[19421]: SharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[19464]: SharpenTexFuncSGIS (dynamic) */
"iip\0"
"glSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[19447]: MultiTexCoord4fvARB (offset 403) */
+ /* _mesa_function_pool[19490]: MultiTexCoord4fvARB (offset 403) */
"ip\0"
"glMultiTexCoord4fv\0"
"glMultiTexCoord4fvARB\0"
"\0"
- /* _mesa_function_pool[19492]: UniformMatrix2x3fv (will be remapped) */
+ /* _mesa_function_pool[19535]: UniformMatrix2x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x3fv\0"
"\0"
- /* _mesa_function_pool[19519]: TrackMatrixNV (will be remapped) */
+ /* _mesa_function_pool[19562]: TrackMatrixNV (will be remapped) */
"iiii\0"
"glTrackMatrixNV\0"
"\0"
- /* _mesa_function_pool[19541]: CombinerParameteriNV (will be remapped) */
+ /* _mesa_function_pool[19584]: CombinerParameteriNV (will be remapped) */
"ii\0"
"glCombinerParameteriNV\0"
"\0"
- /* _mesa_function_pool[19568]: DeleteAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[19611]: DeleteAsyncMarkersSGIX (dynamic) */
"ii\0"
"glDeleteAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[19597]: IsAsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[19640]: IsAsyncMarkerSGIX (dynamic) */
"i\0"
"glIsAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[19620]: FrameZoomSGIX (dynamic) */
+ /* _mesa_function_pool[19663]: FrameZoomSGIX (dynamic) */
"i\0"
"glFrameZoomSGIX\0"
"\0"
- /* _mesa_function_pool[19639]: Normal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[19682]: Normal3fVertex3fvSUN (dynamic) */
"pp\0"
"glNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[19666]: RasterPos4sv (offset 85) */
+ /* _mesa_function_pool[19709]: RasterPos4sv (offset 85) */
"p\0"
"glRasterPos4sv\0"
"\0"
- /* _mesa_function_pool[19684]: VertexAttrib4NsvARB (will be remapped) */
+ /* _mesa_function_pool[19727]: VertexAttrib4NsvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nsv\0"
"glVertexAttrib4NsvARB\0"
"\0"
- /* _mesa_function_pool[19729]: VertexAttrib3fvARB (will be remapped) */
+ /* _mesa_function_pool[19772]: VertexAttrib3fvARB (will be remapped) */
"ip\0"
"glVertexAttrib3fv\0"
"glVertexAttrib3fvARB\0"
"\0"
- /* _mesa_function_pool[19772]: ClearColor (offset 206) */
+ /* _mesa_function_pool[19815]: ClearColor (offset 206) */
"ffff\0"
"glClearColor\0"
"\0"
- /* _mesa_function_pool[19791]: GetSynciv (will be remapped) */
+ /* _mesa_function_pool[19834]: GetSynciv (will be remapped) */
"iiipp\0"
"glGetSynciv\0"
"\0"
- /* _mesa_function_pool[19810]: DeleteFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[19853]: DeleteFramebuffersEXT (will be remapped) */
"ip\0"
"glDeleteFramebuffers\0"
"glDeleteFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[19859]: GlobalAlphaFactorsSUN (dynamic) */
+ /* _mesa_function_pool[19902]: GlobalAlphaFactorsSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorsSUN\0"
"\0"
- /* _mesa_function_pool[19886]: TexEnviv (offset 187) */
+ /* _mesa_function_pool[19929]: TexEnviv (offset 187) */
"iip\0"
"glTexEnviv\0"
"\0"
- /* _mesa_function_pool[19902]: TexSubImage3D (offset 372) */
+ /* _mesa_function_pool[19945]: TexSubImage3D (offset 372) */
"iiiiiiiiiip\0"
"glTexSubImage3D\0"
"glTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[19950]: Tangent3fEXT (dynamic) */
+ /* _mesa_function_pool[19993]: Tangent3fEXT (dynamic) */
"fff\0"
"glTangent3fEXT\0"
"\0"
- /* _mesa_function_pool[19970]: SecondaryColor3uivEXT (will be remapped) */
+ /* _mesa_function_pool[20013]: SecondaryColor3uivEXT (will be remapped) */
"p\0"
"glSecondaryColor3uiv\0"
"glSecondaryColor3uivEXT\0"
"\0"
- /* _mesa_function_pool[20018]: MatrixIndexubvARB (dynamic) */
+ /* _mesa_function_pool[20061]: MatrixIndexubvARB (dynamic) */
"ip\0"
"glMatrixIndexubvARB\0"
"\0"
- /* _mesa_function_pool[20042]: Color4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[20085]: Color4fNormal3fVertex3fSUN (dynamic) */
"ffffffffff\0"
"glColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[20083]: PixelTexGenParameterfSGIS (will be remapped) */
+ /* _mesa_function_pool[20126]: PixelTexGenParameterfSGIS (will be remapped) */
"if\0"
"glPixelTexGenParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[20115]: CreateShader (will be remapped) */
+ /* _mesa_function_pool[20158]: CreateShader (will be remapped) */
"i\0"
"glCreateShader\0"
"\0"
- /* _mesa_function_pool[20133]: GetColorTableParameterfv (offset 344) */
+ /* _mesa_function_pool[20176]: GetColorTableParameterfv (offset 344) */
"iip\0"
"glGetColorTableParameterfv\0"
"glGetColorTableParameterfvSGI\0"
"glGetColorTableParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[20225]: FragmentLightModelfvSGIX (dynamic) */
+ /* _mesa_function_pool[20268]: FragmentLightModelfvSGIX (dynamic) */
"ip\0"
"glFragmentLightModelfvSGIX\0"
"\0"
- /* _mesa_function_pool[20256]: Bitmap (offset 8) */
+ /* _mesa_function_pool[20299]: Bitmap (offset 8) */
"iiffffp\0"
"glBitmap\0"
"\0"
- /* _mesa_function_pool[20274]: MultiTexCoord3fARB (offset 394) */
+ /* _mesa_function_pool[20317]: MultiTexCoord3fARB (offset 394) */
"ifff\0"
"glMultiTexCoord3f\0"
"glMultiTexCoord3fARB\0"
"\0"
- /* _mesa_function_pool[20319]: GetTexLevelParameterfv (offset 284) */
+ /* _mesa_function_pool[20362]: GetTexLevelParameterfv (offset 284) */
"iiip\0"
"glGetTexLevelParameterfv\0"
"\0"
- /* _mesa_function_pool[20350]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[20393]: GetPixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[20386]: GenFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[20429]: GenFramebuffersEXT (will be remapped) */
"ip\0"
"glGenFramebuffers\0"
"glGenFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[20429]: GetProgramParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[20472]: GetProgramParameterdvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterdvNV\0"
"\0"
- /* _mesa_function_pool[20461]: Vertex2sv (offset 133) */
+ /* _mesa_function_pool[20504]: Vertex2sv (offset 133) */
"p\0"
"glVertex2sv\0"
"\0"
- /* _mesa_function_pool[20476]: GetIntegerv (offset 263) */
+ /* _mesa_function_pool[20519]: GetIntegerv (offset 263) */
"ip\0"
"glGetIntegerv\0"
"\0"
- /* _mesa_function_pool[20494]: IsVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[20537]: IsVertexArrayAPPLE (will be remapped) */
"i\0"
"glIsVertexArray\0"
"glIsVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[20534]: FragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[20577]: FragmentLightfvSGIX (dynamic) */
"iip\0"
"glFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[20561]: DetachShader (will be remapped) */
+ /* _mesa_function_pool[20604]: DetachShader (will be remapped) */
"ii\0"
"glDetachShader\0"
"\0"
- /* _mesa_function_pool[20580]: VertexAttrib4NubARB (will be remapped) */
+ /* _mesa_function_pool[20623]: VertexAttrib4NubARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4Nub\0"
"glVertexAttrib4NubARB\0"
"\0"
- /* _mesa_function_pool[20628]: GetProgramEnvParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[20671]: GetProgramEnvParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterfvARB\0"
"\0"
- /* _mesa_function_pool[20663]: GetTrackMatrixivNV (will be remapped) */
+ /* _mesa_function_pool[20706]: GetTrackMatrixivNV (will be remapped) */
"iiip\0"
"glGetTrackMatrixivNV\0"
"\0"
- /* _mesa_function_pool[20690]: VertexAttrib3svNV (will be remapped) */
+ /* _mesa_function_pool[20733]: VertexAttrib3svNV (will be remapped) */
"ip\0"
"glVertexAttrib3svNV\0"
"\0"
- /* _mesa_function_pool[20714]: Uniform4fvARB (will be remapped) */
+ /* _mesa_function_pool[20757]: Uniform4fvARB (will be remapped) */
"iip\0"
"glUniform4fv\0"
"glUniform4fvARB\0"
"\0"
- /* _mesa_function_pool[20748]: MultTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[20791]: MultTransposeMatrixfARB (will be remapped) */
"p\0"
"glMultTransposeMatrixf\0"
"glMultTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[20800]: GetTexEnviv (offset 277) */
+ /* _mesa_function_pool[20843]: GetTexEnviv (offset 277) */
"iip\0"
"glGetTexEnviv\0"
"\0"
- /* _mesa_function_pool[20819]: ColorFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[20862]: ColorFragmentOp1ATI (will be remapped) */
"iiiiiii\0"
"glColorFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[20850]: GetUniformfvARB (will be remapped) */
+ /* _mesa_function_pool[20893]: GetUniformfvARB (will be remapped) */
"iip\0"
"glGetUniformfv\0"
"glGetUniformfvARB\0"
"\0"
- /* _mesa_function_pool[20888]: PopClientAttrib (offset 334) */
+ /* _mesa_function_pool[20931]: PopClientAttrib (offset 334) */
"\0"
"glPopClientAttrib\0"
"\0"
- /* _mesa_function_pool[20908]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[20951]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffffff\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[20979]: DetachObjectARB (will be remapped) */
+ /* _mesa_function_pool[21022]: DetachObjectARB (will be remapped) */
"ii\0"
"glDetachObjectARB\0"
"\0"
- /* _mesa_function_pool[21001]: VertexBlendARB (dynamic) */
+ /* _mesa_function_pool[21044]: VertexBlendARB (dynamic) */
"i\0"
"glVertexBlendARB\0"
"\0"
- /* _mesa_function_pool[21021]: WindowPos3iMESA (will be remapped) */
+ /* _mesa_function_pool[21064]: WindowPos3iMESA (will be remapped) */
"iii\0"
"glWindowPos3i\0"
"glWindowPos3iARB\0"
"glWindowPos3iMESA\0"
"\0"
- /* _mesa_function_pool[21075]: SeparableFilter2D (offset 360) */
+ /* _mesa_function_pool[21118]: SeparableFilter2D (offset 360) */
"iiiiiipp\0"
"glSeparableFilter2D\0"
"glSeparableFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[21128]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[21171]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[21173]: Map1d (offset 220) */
+ /* _mesa_function_pool[21216]: Map1d (offset 220) */
"iddiip\0"
"glMap1d\0"
"\0"
- /* _mesa_function_pool[21189]: Map1f (offset 221) */
+ /* _mesa_function_pool[21232]: Map1f (offset 221) */
"iffiip\0"
"glMap1f\0"
"\0"
- /* _mesa_function_pool[21205]: CompressedTexImage2DARB (will be remapped) */
+ /* _mesa_function_pool[21248]: CompressedTexImage2DARB (will be remapped) */
"iiiiiiip\0"
"glCompressedTexImage2D\0"
"glCompressedTexImage2DARB\0"
"\0"
- /* _mesa_function_pool[21264]: ArrayElement (offset 306) */
+ /* _mesa_function_pool[21307]: ArrayElement (offset 306) */
"i\0"
"glArrayElement\0"
"glArrayElementEXT\0"
"\0"
- /* _mesa_function_pool[21300]: TexImage2D (offset 183) */
+ /* _mesa_function_pool[21343]: TexImage2D (offset 183) */
"iiiiiiiip\0"
"glTexImage2D\0"
"\0"
- /* _mesa_function_pool[21324]: DepthBoundsEXT (will be remapped) */
+ /* _mesa_function_pool[21367]: DepthBoundsEXT (will be remapped) */
"dd\0"
"glDepthBoundsEXT\0"
"\0"
- /* _mesa_function_pool[21345]: ProgramParameters4fvNV (will be remapped) */
+ /* _mesa_function_pool[21388]: ProgramParameters4fvNV (will be remapped) */
"iiip\0"
"glProgramParameters4fvNV\0"
"\0"
- /* _mesa_function_pool[21376]: DeformationMap3fSGIX (dynamic) */
+ /* _mesa_function_pool[21419]: DeformationMap3fSGIX (dynamic) */
"iffiiffiiffiip\0"
"glDeformationMap3fSGIX\0"
"\0"
- /* _mesa_function_pool[21415]: GetProgramivNV (will be remapped) */
+ /* _mesa_function_pool[21458]: GetProgramivNV (will be remapped) */
"iip\0"
"glGetProgramivNV\0"
"\0"
- /* _mesa_function_pool[21437]: GetMinmaxParameteriv (offset 366) */
+ /* _mesa_function_pool[21480]: GetMinmaxParameteriv (offset 366) */
"iip\0"
"glGetMinmaxParameteriv\0"
"glGetMinmaxParameterivEXT\0"
"\0"
- /* _mesa_function_pool[21491]: PixelTransferf (offset 247) */
+ /* _mesa_function_pool[21534]: PixelTransferf (offset 247) */
"if\0"
"glPixelTransferf\0"
"\0"
- /* _mesa_function_pool[21512]: CopyTexImage1D (offset 323) */
+ /* _mesa_function_pool[21555]: CopyTexImage1D (offset 323) */
"iiiiiii\0"
"glCopyTexImage1D\0"
"glCopyTexImage1DEXT\0"
"\0"
- /* _mesa_function_pool[21558]: PushMatrix (offset 298) */
+ /* _mesa_function_pool[21601]: PushMatrix (offset 298) */
"\0"
"glPushMatrix\0"
"\0"
- /* _mesa_function_pool[21573]: Fogiv (offset 156) */
+ /* _mesa_function_pool[21616]: Fogiv (offset 156) */
"ip\0"
"glFogiv\0"
"\0"
- /* _mesa_function_pool[21585]: TexCoord1dv (offset 95) */
+ /* _mesa_function_pool[21628]: TexCoord1dv (offset 95) */
"p\0"
"glTexCoord1dv\0"
"\0"
- /* _mesa_function_pool[21602]: AlphaFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[21645]: AlphaFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiii\0"
"glAlphaFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[21638]: PixelTransferi (offset 248) */
+ /* _mesa_function_pool[21681]: PixelTransferi (offset 248) */
"ii\0"
"glPixelTransferi\0"
"\0"
- /* _mesa_function_pool[21659]: GetVertexAttribdvNV (will be remapped) */
+ /* _mesa_function_pool[21702]: GetVertexAttribdvNV (will be remapped) */
"iip\0"
"glGetVertexAttribdvNV\0"
"\0"
- /* _mesa_function_pool[21686]: VertexAttrib3fvNV (will be remapped) */
+ /* _mesa_function_pool[21729]: VertexAttrib3fvNV (will be remapped) */
"ip\0"
"glVertexAttrib3fvNV\0"
"\0"
- /* _mesa_function_pool[21710]: Rotatef (offset 300) */
+ /* _mesa_function_pool[21753]: Rotatef (offset 300) */
"ffff\0"
"glRotatef\0"
"\0"
- /* _mesa_function_pool[21726]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[21769]: GetFinalCombinerInputParameterivNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[21768]: Vertex3i (offset 138) */
+ /* _mesa_function_pool[21811]: Vertex3i (offset 138) */
"iii\0"
"glVertex3i\0"
"\0"
- /* _mesa_function_pool[21784]: Vertex3f (offset 136) */
+ /* _mesa_function_pool[21827]: Vertex3f (offset 136) */
"fff\0"
"glVertex3f\0"
"\0"
- /* _mesa_function_pool[21800]: Clear (offset 203) */
+ /* _mesa_function_pool[21843]: Clear (offset 203) */
"i\0"
"glClear\0"
"\0"
- /* _mesa_function_pool[21811]: Vertex3d (offset 134) */
+ /* _mesa_function_pool[21854]: Vertex3d (offset 134) */
"ddd\0"
"glVertex3d\0"
"\0"
- /* _mesa_function_pool[21827]: GetMapParameterivNV (dynamic) */
+ /* _mesa_function_pool[21870]: GetMapParameterivNV (dynamic) */
"iip\0"
"glGetMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[21854]: Uniform4iARB (will be remapped) */
+ /* _mesa_function_pool[21897]: Uniform4iARB (will be remapped) */
"iiiii\0"
"glUniform4i\0"
"glUniform4iARB\0"
"\0"
- /* _mesa_function_pool[21888]: ReadBuffer (offset 254) */
+ /* _mesa_function_pool[21931]: ReadBuffer (offset 254) */
"i\0"
"glReadBuffer\0"
"\0"
- /* _mesa_function_pool[21904]: ConvolutionParameteri (offset 352) */
+ /* _mesa_function_pool[21947]: ConvolutionParameteri (offset 352) */
"iii\0"
"glConvolutionParameteri\0"
"glConvolutionParameteriEXT\0"
"\0"
- /* _mesa_function_pool[21960]: Ortho (offset 296) */
+ /* _mesa_function_pool[22003]: Ortho (offset 296) */
"dddddd\0"
"glOrtho\0"
"\0"
- /* _mesa_function_pool[21976]: Binormal3sEXT (dynamic) */
+ /* _mesa_function_pool[22019]: Binormal3sEXT (dynamic) */
"iii\0"
"glBinormal3sEXT\0"
"\0"
- /* _mesa_function_pool[21997]: ListBase (offset 6) */
+ /* _mesa_function_pool[22040]: ListBase (offset 6) */
"i\0"
"glListBase\0"
"\0"
- /* _mesa_function_pool[22011]: Vertex3s (offset 140) */
+ /* _mesa_function_pool[22054]: Vertex3s (offset 140) */
"iii\0"
"glVertex3s\0"
"\0"
- /* _mesa_function_pool[22027]: ConvolutionParameterf (offset 350) */
+ /* _mesa_function_pool[22070]: ConvolutionParameterf (offset 350) */
"iif\0"
"glConvolutionParameterf\0"
"glConvolutionParameterfEXT\0"
"\0"
- /* _mesa_function_pool[22083]: GetColorTableParameteriv (offset 345) */
+ /* _mesa_function_pool[22126]: GetColorTableParameteriv (offset 345) */
"iip\0"
"glGetColorTableParameteriv\0"
"glGetColorTableParameterivSGI\0"
"glGetColorTableParameterivEXT\0"
"\0"
- /* _mesa_function_pool[22175]: ProgramEnvParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[22218]: ProgramEnvParameter4dvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4dvARB\0"
"glProgramParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[22232]: ShadeModel (offset 177) */
+ /* _mesa_function_pool[22275]: ShadeModel (offset 177) */
"i\0"
"glShadeModel\0"
"\0"
- /* _mesa_function_pool[22248]: VertexAttribs2fvNV (will be remapped) */
+ /* _mesa_function_pool[22291]: VertexAttribs2fvNV (will be remapped) */
"iip\0"
"glVertexAttribs2fvNV\0"
"\0"
- /* _mesa_function_pool[22274]: Rectiv (offset 91) */
+ /* _mesa_function_pool[22317]: Rectiv (offset 91) */
"pp\0"
"glRectiv\0"
"\0"
- /* _mesa_function_pool[22287]: UseProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[22330]: UseProgramObjectARB (will be remapped) */
"i\0"
"glUseProgram\0"
"glUseProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[22325]: GetMapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[22368]: GetMapParameterfvNV (dynamic) */
"iip\0"
"glGetMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[22352]: PassTexCoordATI (will be remapped) */
+ /* _mesa_function_pool[22395]: PassTexCoordATI (will be remapped) */
"iii\0"
"glPassTexCoordATI\0"
"\0"
- /* _mesa_function_pool[22375]: DeleteProgram (will be remapped) */
+ /* _mesa_function_pool[22418]: DeleteProgram (will be remapped) */
"i\0"
"glDeleteProgram\0"
"\0"
- /* _mesa_function_pool[22394]: Tangent3ivEXT (dynamic) */
+ /* _mesa_function_pool[22437]: Tangent3ivEXT (dynamic) */
"p\0"
"glTangent3ivEXT\0"
"\0"
- /* _mesa_function_pool[22413]: Tangent3dEXT (dynamic) */
+ /* _mesa_function_pool[22456]: Tangent3dEXT (dynamic) */
"ddd\0"
"glTangent3dEXT\0"
"\0"
- /* _mesa_function_pool[22433]: SecondaryColor3dvEXT (will be remapped) */
+ /* _mesa_function_pool[22476]: SecondaryColor3dvEXT (will be remapped) */
"p\0"
"glSecondaryColor3dv\0"
"glSecondaryColor3dvEXT\0"
"\0"
- /* _mesa_function_pool[22479]: Vertex2fv (offset 129) */
+ /* _mesa_function_pool[22522]: Vertex2fv (offset 129) */
"p\0"
"glVertex2fv\0"
"\0"
- /* _mesa_function_pool[22494]: MultiDrawArraysEXT (will be remapped) */
+ /* _mesa_function_pool[22537]: MultiDrawArraysEXT (will be remapped) */
"ippi\0"
"glMultiDrawArrays\0"
"glMultiDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[22539]: BindRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[22582]: BindRenderbufferEXT (will be remapped) */
"ii\0"
"glBindRenderbuffer\0"
"glBindRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[22584]: MultiTexCoord4dARB (offset 400) */
+ /* _mesa_function_pool[22627]: MultiTexCoord4dARB (offset 400) */
"idddd\0"
"glMultiTexCoord4d\0"
"glMultiTexCoord4dARB\0"
"\0"
- /* _mesa_function_pool[22630]: Vertex3sv (offset 141) */
+ /* _mesa_function_pool[22673]: Vertex3sv (offset 141) */
"p\0"
"glVertex3sv\0"
"\0"
- /* _mesa_function_pool[22645]: SecondaryColor3usEXT (will be remapped) */
+ /* _mesa_function_pool[22688]: SecondaryColor3usEXT (will be remapped) */
"iii\0"
"glSecondaryColor3us\0"
"glSecondaryColor3usEXT\0"
"\0"
- /* _mesa_function_pool[22693]: ProgramLocalParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[22736]: ProgramLocalParameter4fvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4fvARB\0"
"\0"
- /* _mesa_function_pool[22728]: DeleteProgramsNV (will be remapped) */
+ /* _mesa_function_pool[22771]: DeleteProgramsNV (will be remapped) */
"ip\0"
"glDeleteProgramsARB\0"
"glDeleteProgramsNV\0"
"\0"
- /* _mesa_function_pool[22771]: EvalMesh1 (offset 236) */
+ /* _mesa_function_pool[22814]: EvalMesh1 (offset 236) */
"iii\0"
"glEvalMesh1\0"
"\0"
- /* _mesa_function_pool[22788]: MultiTexCoord1sARB (offset 382) */
+ /* _mesa_function_pool[22831]: MultiTexCoord1sARB (offset 382) */
"ii\0"
"glMultiTexCoord1s\0"
"glMultiTexCoord1sARB\0"
"\0"
- /* _mesa_function_pool[22831]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[22874]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[22878]: GetVertexAttribPointervNV (will be remapped) */
+ /* _mesa_function_pool[22921]: GetVertexAttribPointervNV (will be remapped) */
"iip\0"
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
"glGetVertexAttribPointervNV\0"
"\0"
- /* _mesa_function_pool[22966]: MultiTexCoord1dvARB (offset 377) */
+ /* _mesa_function_pool[23009]: MultiTexCoord1dvARB (offset 377) */
"ip\0"
"glMultiTexCoord1dv\0"
"glMultiTexCoord1dvARB\0"
"\0"
- /* _mesa_function_pool[23011]: Uniform2iARB (will be remapped) */
+ /* _mesa_function_pool[23054]: Uniform2iARB (will be remapped) */
"iii\0"
"glUniform2i\0"
"glUniform2iARB\0"
"\0"
- /* _mesa_function_pool[23043]: Vertex2iv (offset 131) */
+ /* _mesa_function_pool[23086]: Vertex2iv (offset 131) */
"p\0"
"glVertex2iv\0"
"\0"
- /* _mesa_function_pool[23058]: GetProgramStringNV (will be remapped) */
+ /* _mesa_function_pool[23101]: GetProgramStringNV (will be remapped) */
"iip\0"
"glGetProgramStringNV\0"
"\0"
- /* _mesa_function_pool[23084]: ColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[23127]: ColorPointerEXT (will be remapped) */
"iiiip\0"
"glColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[23109]: LineWidth (offset 168) */
+ /* _mesa_function_pool[23152]: LineWidth (offset 168) */
"f\0"
"glLineWidth\0"
"\0"
- /* _mesa_function_pool[23124]: MapBufferARB (will be remapped) */
+ /* _mesa_function_pool[23167]: MapBufferARB (will be remapped) */
"ii\0"
"glMapBuffer\0"
"glMapBufferARB\0"
"\0"
- /* _mesa_function_pool[23155]: MultiDrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[23198]: MultiDrawElementsBaseVertex (will be remapped) */
"ipipip\0"
"glMultiDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[23193]: Binormal3svEXT (dynamic) */
+ /* _mesa_function_pool[23236]: Binormal3svEXT (dynamic) */
"p\0"
"glBinormal3svEXT\0"
"\0"
- /* _mesa_function_pool[23213]: ApplyTextureEXT (dynamic) */
+ /* _mesa_function_pool[23256]: ApplyTextureEXT (dynamic) */
"i\0"
"glApplyTextureEXT\0"
"\0"
- /* _mesa_function_pool[23234]: TexGendv (offset 189) */
+ /* _mesa_function_pool[23277]: TexGendv (offset 189) */
"iip\0"
"glTexGendv\0"
"\0"
- /* _mesa_function_pool[23250]: TextureMaterialEXT (dynamic) */
+ /* _mesa_function_pool[23293]: TextureMaterialEXT (dynamic) */
"ii\0"
"glTextureMaterialEXT\0"
"\0"
- /* _mesa_function_pool[23275]: TextureLightEXT (dynamic) */
+ /* _mesa_function_pool[23318]: TextureLightEXT (dynamic) */
"i\0"
"glTextureLightEXT\0"
"\0"
- /* _mesa_function_pool[23296]: ResetMinmax (offset 370) */
+ /* _mesa_function_pool[23339]: ResetMinmax (offset 370) */
"i\0"
"glResetMinmax\0"
"glResetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[23330]: SpriteParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[23373]: SpriteParameterfSGIX (dynamic) */
"if\0"
"glSpriteParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[23357]: EnableClientState (offset 313) */
+ /* _mesa_function_pool[23400]: EnableClientState (offset 313) */
"i\0"
"glEnableClientState\0"
"\0"
- /* _mesa_function_pool[23380]: VertexAttrib4sNV (will be remapped) */
+ /* _mesa_function_pool[23423]: VertexAttrib4sNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4sNV\0"
"\0"
- /* _mesa_function_pool[23406]: GetConvolutionParameterfv (offset 357) */
+ /* _mesa_function_pool[23449]: GetConvolutionParameterfv (offset 357) */
"iip\0"
"glGetConvolutionParameterfv\0"
"glGetConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[23470]: VertexAttribs4dvNV (will be remapped) */
+ /* _mesa_function_pool[23513]: VertexAttribs4dvNV (will be remapped) */
"iip\0"
"glVertexAttribs4dvNV\0"
"\0"
- /* _mesa_function_pool[23496]: VertexAttrib4dARB (will be remapped) */
+ /* _mesa_function_pool[23539]: MultiModeDrawArraysIBM (will be remapped) */
+ "pppii\0"
+ "glMultiModeDrawArraysIBM\0"
+ "\0"
+ /* _mesa_function_pool[23571]: VertexAttrib4dARB (will be remapped) */
"idddd\0"
"glVertexAttrib4d\0"
"glVertexAttrib4dARB\0"
"\0"
- /* _mesa_function_pool[23540]: GetTexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[23615]: GetTexBumpParameterfvATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[23571]: ProgramNamedParameter4dNV (will be remapped) */
+ /* _mesa_function_pool[23646]: ProgramNamedParameter4dNV (will be remapped) */
"iipdddd\0"
"glProgramNamedParameter4dNV\0"
"\0"
- /* _mesa_function_pool[23608]: GetMaterialfv (offset 269) */
+ /* _mesa_function_pool[23683]: GetMaterialfv (offset 269) */
"iip\0"
"glGetMaterialfv\0"
"\0"
- /* _mesa_function_pool[23629]: VertexWeightfEXT (dynamic) */
+ /* _mesa_function_pool[23704]: VertexWeightfEXT (dynamic) */
"f\0"
"glVertexWeightfEXT\0"
"\0"
- /* _mesa_function_pool[23651]: Binormal3fEXT (dynamic) */
+ /* _mesa_function_pool[23726]: Binormal3fEXT (dynamic) */
"fff\0"
"glBinormal3fEXT\0"
"\0"
- /* _mesa_function_pool[23672]: CallList (offset 2) */
+ /* _mesa_function_pool[23747]: CallList (offset 2) */
"i\0"
"glCallList\0"
"\0"
- /* _mesa_function_pool[23686]: Materialfv (offset 170) */
+ /* _mesa_function_pool[23761]: Materialfv (offset 170) */
"iip\0"
"glMaterialfv\0"
"\0"
- /* _mesa_function_pool[23704]: TexCoord3fv (offset 113) */
+ /* _mesa_function_pool[23779]: TexCoord3fv (offset 113) */
"p\0"
"glTexCoord3fv\0"
"\0"
- /* _mesa_function_pool[23721]: FogCoordfvEXT (will be remapped) */
+ /* _mesa_function_pool[23796]: FogCoordfvEXT (will be remapped) */
"p\0"
"glFogCoordfv\0"
"glFogCoordfvEXT\0"
"\0"
- /* _mesa_function_pool[23753]: MultiTexCoord1ivARB (offset 381) */
+ /* _mesa_function_pool[23828]: MultiTexCoord1ivARB (offset 381) */
"ip\0"
"glMultiTexCoord1iv\0"
"glMultiTexCoord1ivARB\0"
"\0"
- /* _mesa_function_pool[23798]: SecondaryColor3ubEXT (will be remapped) */
+ /* _mesa_function_pool[23873]: SecondaryColor3ubEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ub\0"
"glSecondaryColor3ubEXT\0"
"\0"
- /* _mesa_function_pool[23846]: MultiTexCoord2ivARB (offset 389) */
+ /* _mesa_function_pool[23921]: MultiTexCoord2ivARB (offset 389) */
"ip\0"
"glMultiTexCoord2iv\0"
"glMultiTexCoord2ivARB\0"
"\0"
- /* _mesa_function_pool[23891]: FogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[23966]: FogFuncSGIS (dynamic) */
"ip\0"
"glFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[23909]: CopyTexSubImage2D (offset 326) */
+ /* _mesa_function_pool[23984]: CopyTexSubImage2D (offset 326) */
"iiiiiiii\0"
"glCopyTexSubImage2D\0"
"glCopyTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[23962]: GetObjectParameterivARB (will be remapped) */
+ /* _mesa_function_pool[24037]: GetObjectParameterivARB (will be remapped) */
"iip\0"
"glGetObjectParameterivARB\0"
"\0"
- /* _mesa_function_pool[23993]: Color3iv (offset 16) */
+ /* _mesa_function_pool[24068]: Color3iv (offset 16) */
"p\0"
"glColor3iv\0"
"\0"
- /* _mesa_function_pool[24007]: TexCoord4fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[24082]: TexCoord4fVertex4fSUN (dynamic) */
"ffffffff\0"
"glTexCoord4fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[24041]: DrawElements (offset 311) */
+ /* _mesa_function_pool[24116]: DrawElements (offset 311) */
"iiip\0"
"glDrawElements\0"
"\0"
- /* _mesa_function_pool[24062]: BindVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[24137]: BindVertexArrayAPPLE (will be remapped) */
"i\0"
"glBindVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[24088]: GetProgramLocalParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[24163]: GetProgramLocalParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterdvARB\0"
"\0"
- /* _mesa_function_pool[24125]: GetHistogramParameteriv (offset 363) */
+ /* _mesa_function_pool[24200]: GetHistogramParameteriv (offset 363) */
"iip\0"
"glGetHistogramParameteriv\0"
"glGetHistogramParameterivEXT\0"
"\0"
- /* _mesa_function_pool[24185]: MultiTexCoord1iARB (offset 380) */
+ /* _mesa_function_pool[24260]: MultiTexCoord1iARB (offset 380) */
"ii\0"
"glMultiTexCoord1i\0"
"glMultiTexCoord1iARB\0"
"\0"
- /* _mesa_function_pool[24228]: GetConvolutionFilter (offset 356) */
+ /* _mesa_function_pool[24303]: GetConvolutionFilter (offset 356) */
"iiip\0"
"glGetConvolutionFilter\0"
"glGetConvolutionFilterEXT\0"
"\0"
- /* _mesa_function_pool[24283]: GetProgramivARB (will be remapped) */
+ /* _mesa_function_pool[24358]: GetProgramivARB (will be remapped) */
"iip\0"
"glGetProgramivARB\0"
"\0"
- /* _mesa_function_pool[24306]: BlendFuncSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[24381]: BlendFuncSeparateEXT (will be remapped) */
"iiii\0"
"glBlendFuncSeparate\0"
"glBlendFuncSeparateEXT\0"
"glBlendFuncSeparateINGR\0"
"\0"
- /* _mesa_function_pool[24379]: MapBufferRange (will be remapped) */
+ /* _mesa_function_pool[24454]: MapBufferRange (will be remapped) */
"iiii\0"
"glMapBufferRange\0"
"\0"
- /* _mesa_function_pool[24402]: ProgramParameters4dvNV (will be remapped) */
+ /* _mesa_function_pool[24477]: ProgramParameters4dvNV (will be remapped) */
"iiip\0"
"glProgramParameters4dvNV\0"
"\0"
- /* _mesa_function_pool[24433]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[24508]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[24470]: EvalPoint2 (offset 239) */
+ /* _mesa_function_pool[24545]: EvalPoint2 (offset 239) */
"ii\0"
"glEvalPoint2\0"
"\0"
- /* _mesa_function_pool[24487]: EvalPoint1 (offset 237) */
+ /* _mesa_function_pool[24562]: EvalPoint1 (offset 237) */
"i\0"
"glEvalPoint1\0"
"\0"
- /* _mesa_function_pool[24503]: Binormal3dvEXT (dynamic) */
+ /* _mesa_function_pool[24578]: Binormal3dvEXT (dynamic) */
"p\0"
"glBinormal3dvEXT\0"
"\0"
- /* _mesa_function_pool[24523]: PopMatrix (offset 297) */
+ /* _mesa_function_pool[24598]: PopMatrix (offset 297) */
"\0"
"glPopMatrix\0"
"\0"
- /* _mesa_function_pool[24537]: FinishFenceNV (will be remapped) */
+ /* _mesa_function_pool[24612]: FinishFenceNV (will be remapped) */
"i\0"
"glFinishFenceNV\0"
"\0"
- /* _mesa_function_pool[24556]: GetFogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[24631]: GetFogFuncSGIS (dynamic) */
"p\0"
"glGetFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[24576]: GetUniformLocationARB (will be remapped) */
+ /* _mesa_function_pool[24651]: GetUniformLocationARB (will be remapped) */
"ip\0"
"glGetUniformLocation\0"
"glGetUniformLocationARB\0"
"\0"
- /* _mesa_function_pool[24625]: SecondaryColor3fEXT (will be remapped) */
+ /* _mesa_function_pool[24700]: SecondaryColor3fEXT (will be remapped) */
"fff\0"
"glSecondaryColor3f\0"
"glSecondaryColor3fEXT\0"
"\0"
- /* _mesa_function_pool[24671]: GetTexGeniv (offset 280) */
+ /* _mesa_function_pool[24746]: GetTexGeniv (offset 280) */
"iip\0"
"glGetTexGeniv\0"
"\0"
- /* _mesa_function_pool[24690]: CombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[24765]: CombinerInputNV (will be remapped) */
"iiiiii\0"
"glCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[24716]: VertexAttrib3sARB (will be remapped) */
+ /* _mesa_function_pool[24791]: VertexAttrib3sARB (will be remapped) */
"iiii\0"
"glVertexAttrib3s\0"
"glVertexAttrib3sARB\0"
"\0"
- /* _mesa_function_pool[24759]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[24834]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[24804]: Map2d (offset 222) */
+ /* _mesa_function_pool[24879]: Map2d (offset 222) */
"iddiiddiip\0"
"glMap2d\0"
"\0"
- /* _mesa_function_pool[24824]: Map2f (offset 223) */
+ /* _mesa_function_pool[24899]: Map2f (offset 223) */
"iffiiffiip\0"
"glMap2f\0"
"\0"
- /* _mesa_function_pool[24844]: ProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[24919]: ProgramStringARB (will be remapped) */
"iiip\0"
"glProgramStringARB\0"
"\0"
- /* _mesa_function_pool[24869]: Vertex4s (offset 148) */
+ /* _mesa_function_pool[24944]: Vertex4s (offset 148) */
"iiii\0"
"glVertex4s\0"
"\0"
- /* _mesa_function_pool[24886]: TexCoord4fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[24961]: TexCoord4fVertex4fvSUN (dynamic) */
"pp\0"
"glTexCoord4fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[24915]: VertexAttrib3sNV (will be remapped) */
+ /* _mesa_function_pool[24990]: VertexAttrib3sNV (will be remapped) */
"iiii\0"
"glVertexAttrib3sNV\0"
"\0"
- /* _mesa_function_pool[24940]: VertexAttrib1fNV (will be remapped) */
+ /* _mesa_function_pool[25015]: VertexAttrib1fNV (will be remapped) */
"if\0"
"glVertexAttrib1fNV\0"
"\0"
- /* _mesa_function_pool[24963]: Vertex4f (offset 144) */
+ /* _mesa_function_pool[25038]: Vertex4f (offset 144) */
"ffff\0"
"glVertex4f\0"
"\0"
- /* _mesa_function_pool[24980]: EvalCoord1d (offset 228) */
+ /* _mesa_function_pool[25055]: EvalCoord1d (offset 228) */
"d\0"
"glEvalCoord1d\0"
"\0"
- /* _mesa_function_pool[24997]: Vertex4d (offset 142) */
+ /* _mesa_function_pool[25072]: Vertex4d (offset 142) */
"dddd\0"
"glVertex4d\0"
"\0"
- /* _mesa_function_pool[25014]: RasterPos4dv (offset 79) */
+ /* _mesa_function_pool[25089]: RasterPos4dv (offset 79) */
"p\0"
"glRasterPos4dv\0"
"\0"
- /* _mesa_function_pool[25032]: FragmentLightfSGIX (dynamic) */
+ /* _mesa_function_pool[25107]: FragmentLightfSGIX (dynamic) */
"iif\0"
"glFragmentLightfSGIX\0"
"\0"
- /* _mesa_function_pool[25058]: GetCompressedTexImageARB (will be remapped) */
+ /* _mesa_function_pool[25133]: GetCompressedTexImageARB (will be remapped) */
"iip\0"
"glGetCompressedTexImage\0"
"glGetCompressedTexImageARB\0"
"\0"
- /* _mesa_function_pool[25114]: GetTexGenfv (offset 279) */
+ /* _mesa_function_pool[25189]: GetTexGenfv (offset 279) */
"iip\0"
"glGetTexGenfv\0"
"\0"
- /* _mesa_function_pool[25133]: Vertex4i (offset 146) */
+ /* _mesa_function_pool[25208]: Vertex4i (offset 146) */
"iiii\0"
"glVertex4i\0"
"\0"
- /* _mesa_function_pool[25150]: VertexWeightPointerEXT (dynamic) */
+ /* _mesa_function_pool[25225]: VertexWeightPointerEXT (dynamic) */
"iiip\0"
"glVertexWeightPointerEXT\0"
"\0"
- /* _mesa_function_pool[25181]: GetHistogram (offset 361) */
+ /* _mesa_function_pool[25256]: GetHistogram (offset 361) */
"iiiip\0"
"glGetHistogram\0"
"glGetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[25221]: ActiveStencilFaceEXT (will be remapped) */
+ /* _mesa_function_pool[25296]: ActiveStencilFaceEXT (will be remapped) */
"i\0"
"glActiveStencilFaceEXT\0"
"\0"
- /* _mesa_function_pool[25247]: StencilFuncSeparateATI (will be remapped) */
+ /* _mesa_function_pool[25322]: StencilFuncSeparateATI (will be remapped) */
"iiii\0"
"glStencilFuncSeparateATI\0"
"\0"
- /* _mesa_function_pool[25278]: Materialf (offset 169) */
+ /* _mesa_function_pool[25353]: Materialf (offset 169) */
"iif\0"
"glMaterialf\0"
"\0"
- /* _mesa_function_pool[25295]: GetShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[25370]: GetShaderSourceARB (will be remapped) */
"iipp\0"
"glGetShaderSource\0"
"glGetShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[25340]: IglooInterfaceSGIX (dynamic) */
+ /* _mesa_function_pool[25415]: IglooInterfaceSGIX (dynamic) */
"ip\0"
"glIglooInterfaceSGIX\0"
"\0"
- /* _mesa_function_pool[25365]: Materiali (offset 171) */
+ /* _mesa_function_pool[25440]: Materiali (offset 171) */
"iii\0"
"glMateriali\0"
"\0"
- /* _mesa_function_pool[25382]: VertexAttrib4dNV (will be remapped) */
+ /* _mesa_function_pool[25457]: VertexAttrib4dNV (will be remapped) */
"idddd\0"
"glVertexAttrib4dNV\0"
"\0"
- /* _mesa_function_pool[25408]: MultiModeDrawElementsIBM (will be remapped) */
+ /* _mesa_function_pool[25483]: MultiModeDrawElementsIBM (will be remapped) */
"ppipii\0"
"glMultiModeDrawElementsIBM\0"
"\0"
- /* _mesa_function_pool[25443]: Indexsv (offset 51) */
+ /* _mesa_function_pool[25518]: Indexsv (offset 51) */
"p\0"
"glIndexsv\0"
"\0"
- /* _mesa_function_pool[25456]: MultiTexCoord4svARB (offset 407) */
+ /* _mesa_function_pool[25531]: MultiTexCoord4svARB (offset 407) */
"ip\0"
"glMultiTexCoord4sv\0"
"glMultiTexCoord4svARB\0"
"\0"
- /* _mesa_function_pool[25501]: LightModelfv (offset 164) */
+ /* _mesa_function_pool[25576]: LightModelfv (offset 164) */
"ip\0"
"glLightModelfv\0"
"\0"
- /* _mesa_function_pool[25520]: TexCoord2dv (offset 103) */
+ /* _mesa_function_pool[25595]: TexCoord2dv (offset 103) */
"p\0"
"glTexCoord2dv\0"
"\0"
- /* _mesa_function_pool[25537]: GenQueriesARB (will be remapped) */
+ /* _mesa_function_pool[25612]: GenQueriesARB (will be remapped) */
"ip\0"
"glGenQueries\0"
"glGenQueriesARB\0"
"\0"
- /* _mesa_function_pool[25570]: EvalCoord1dv (offset 229) */
+ /* _mesa_function_pool[25645]: EvalCoord1dv (offset 229) */
"p\0"
"glEvalCoord1dv\0"
"\0"
- /* _mesa_function_pool[25588]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[25663]: ReplacementCodeuiVertex3fSUN (dynamic) */
"ifff\0"
"glReplacementCodeuiVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[25625]: Translated (offset 303) */
+ /* _mesa_function_pool[25700]: Translated (offset 303) */
"ddd\0"
"glTranslated\0"
"\0"
- /* _mesa_function_pool[25643]: Translatef (offset 304) */
+ /* _mesa_function_pool[25718]: Translatef (offset 304) */
"fff\0"
"glTranslatef\0"
"\0"
- /* _mesa_function_pool[25661]: StencilMask (offset 209) */
+ /* _mesa_function_pool[25736]: StencilMask (offset 209) */
"i\0"
"glStencilMask\0"
"\0"
- /* _mesa_function_pool[25678]: Tangent3iEXT (dynamic) */
+ /* _mesa_function_pool[25753]: Tangent3iEXT (dynamic) */
"iii\0"
"glTangent3iEXT\0"
"\0"
- /* _mesa_function_pool[25698]: GetLightiv (offset 265) */
+ /* _mesa_function_pool[25773]: GetLightiv (offset 265) */
"iip\0"
"glGetLightiv\0"
"\0"
- /* _mesa_function_pool[25716]: DrawMeshArraysSUN (dynamic) */
+ /* _mesa_function_pool[25791]: DrawMeshArraysSUN (dynamic) */
"iiii\0"
"glDrawMeshArraysSUN\0"
"\0"
- /* _mesa_function_pool[25742]: IsList (offset 287) */
+ /* _mesa_function_pool[25817]: IsList (offset 287) */
"i\0"
"glIsList\0"
"\0"
- /* _mesa_function_pool[25754]: IsSync (will be remapped) */
+ /* _mesa_function_pool[25829]: IsSync (will be remapped) */
"i\0"
"glIsSync\0"
"\0"
- /* _mesa_function_pool[25766]: RenderMode (offset 196) */
+ /* _mesa_function_pool[25841]: RenderMode (offset 196) */
"i\0"
"glRenderMode\0"
"\0"
- /* _mesa_function_pool[25782]: GetMapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[25857]: GetMapControlPointsNV (dynamic) */
"iiiiiip\0"
"glGetMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[25815]: DrawBuffersARB (will be remapped) */
+ /* _mesa_function_pool[25890]: DrawBuffersARB (will be remapped) */
"ip\0"
"glDrawBuffers\0"
"glDrawBuffersARB\0"
"glDrawBuffersATI\0"
"\0"
- /* _mesa_function_pool[25867]: ProgramLocalParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[25942]: ProgramLocalParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramLocalParameter4fARB\0"
"\0"
- /* _mesa_function_pool[25904]: SpriteParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[25979]: SpriteParameterivSGIX (dynamic) */
"ip\0"
"glSpriteParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[25932]: ProvokingVertexEXT (will be remapped) */
+ /* _mesa_function_pool[26007]: ProvokingVertexEXT (will be remapped) */
"i\0"
"glProvokingVertexEXT\0"
"glProvokingVertex\0"
"\0"
- /* _mesa_function_pool[25974]: MultiTexCoord1fARB (offset 378) */
+ /* _mesa_function_pool[26049]: MultiTexCoord1fARB (offset 378) */
"if\0"
"glMultiTexCoord1f\0"
"glMultiTexCoord1fARB\0"
"\0"
- /* _mesa_function_pool[26017]: LoadName (offset 198) */
+ /* _mesa_function_pool[26092]: LoadName (offset 198) */
"i\0"
"glLoadName\0"
"\0"
- /* _mesa_function_pool[26031]: VertexAttribs4ubvNV (will be remapped) */
+ /* _mesa_function_pool[26106]: VertexAttribs4ubvNV (will be remapped) */
"iip\0"
"glVertexAttribs4ubvNV\0"
"\0"
- /* _mesa_function_pool[26058]: WeightsvARB (dynamic) */
+ /* _mesa_function_pool[26133]: WeightsvARB (dynamic) */
"ip\0"
"glWeightsvARB\0"
"\0"
- /* _mesa_function_pool[26076]: Uniform1fvARB (will be remapped) */
+ /* _mesa_function_pool[26151]: Uniform1fvARB (will be remapped) */
"iip\0"
"glUniform1fv\0"
"glUniform1fvARB\0"
"\0"
- /* _mesa_function_pool[26110]: CopyTexSubImage1D (offset 325) */
+ /* _mesa_function_pool[26185]: CopyTexSubImage1D (offset 325) */
"iiiiii\0"
"glCopyTexSubImage1D\0"
"glCopyTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[26161]: CullFace (offset 152) */
+ /* _mesa_function_pool[26236]: CullFace (offset 152) */
"i\0"
"glCullFace\0"
"\0"
- /* _mesa_function_pool[26175]: BindTexture (offset 307) */
+ /* _mesa_function_pool[26250]: BindTexture (offset 307) */
"ii\0"
"glBindTexture\0"
"glBindTextureEXT\0"
"\0"
- /* _mesa_function_pool[26210]: BeginFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[26285]: BeginFragmentShaderATI (will be remapped) */
"\0"
"glBeginFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[26237]: MultiTexCoord4fARB (offset 402) */
+ /* _mesa_function_pool[26312]: MultiTexCoord4fARB (offset 402) */
"iffff\0"
"glMultiTexCoord4f\0"
"glMultiTexCoord4fARB\0"
"\0"
- /* _mesa_function_pool[26283]: VertexAttribs3svNV (will be remapped) */
+ /* _mesa_function_pool[26358]: VertexAttribs3svNV (will be remapped) */
"iip\0"
"glVertexAttribs3svNV\0"
"\0"
- /* _mesa_function_pool[26309]: StencilFunc (offset 243) */
+ /* _mesa_function_pool[26384]: StencilFunc (offset 243) */
"iii\0"
"glStencilFunc\0"
"\0"
- /* _mesa_function_pool[26328]: CopyPixels (offset 255) */
+ /* _mesa_function_pool[26403]: CopyPixels (offset 255) */
"iiiii\0"
"glCopyPixels\0"
"\0"
- /* _mesa_function_pool[26348]: Rectsv (offset 93) */
+ /* _mesa_function_pool[26423]: Rectsv (offset 93) */
"pp\0"
"glRectsv\0"
"\0"
- /* _mesa_function_pool[26361]: ReplacementCodeuivSUN (dynamic) */
+ /* _mesa_function_pool[26436]: ReplacementCodeuivSUN (dynamic) */
"p\0"
"glReplacementCodeuivSUN\0"
"\0"
- /* _mesa_function_pool[26388]: EnableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[26463]: EnableVertexAttribArrayARB (will be remapped) */
"i\0"
"glEnableVertexAttribArray\0"
"glEnableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[26446]: NormalPointervINTEL (dynamic) */
+ /* _mesa_function_pool[26521]: NormalPointervINTEL (dynamic) */
"ip\0"
"glNormalPointervINTEL\0"
"\0"
- /* _mesa_function_pool[26472]: CopyConvolutionFilter2D (offset 355) */
+ /* _mesa_function_pool[26547]: CopyConvolutionFilter2D (offset 355) */
"iiiiii\0"
"glCopyConvolutionFilter2D\0"
"glCopyConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[26535]: WindowPos3ivMESA (will be remapped) */
+ /* _mesa_function_pool[26610]: WindowPos3ivMESA (will be remapped) */
"p\0"
"glWindowPos3iv\0"
"glWindowPos3ivARB\0"
"glWindowPos3ivMESA\0"
"\0"
- /* _mesa_function_pool[26590]: CopyBufferSubData (will be remapped) */
+ /* _mesa_function_pool[26665]: CopyBufferSubData (will be remapped) */
"iiiii\0"
"glCopyBufferSubData\0"
"\0"
- /* _mesa_function_pool[26617]: NormalPointer (offset 318) */
+ /* _mesa_function_pool[26692]: NormalPointer (offset 318) */
"iip\0"
"glNormalPointer\0"
"\0"
- /* _mesa_function_pool[26638]: TexParameterfv (offset 179) */
+ /* _mesa_function_pool[26713]: TexParameterfv (offset 179) */
"iip\0"
"glTexParameterfv\0"
"\0"
- /* _mesa_function_pool[26660]: IsBufferARB (will be remapped) */
+ /* _mesa_function_pool[26735]: IsBufferARB (will be remapped) */
"i\0"
"glIsBuffer\0"
"glIsBufferARB\0"
"\0"
- /* _mesa_function_pool[26688]: WindowPos4iMESA (will be remapped) */
+ /* _mesa_function_pool[26763]: WindowPos4iMESA (will be remapped) */
"iiii\0"
"glWindowPos4iMESA\0"
"\0"
- /* _mesa_function_pool[26712]: VertexAttrib4uivARB (will be remapped) */
+ /* _mesa_function_pool[26787]: VertexAttrib4uivARB (will be remapped) */
"ip\0"
"glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
"\0"
- /* _mesa_function_pool[26757]: Tangent3bvEXT (dynamic) */
+ /* _mesa_function_pool[26832]: Tangent3bvEXT (dynamic) */
"p\0"
"glTangent3bvEXT\0"
"\0"
- /* _mesa_function_pool[26776]: UniformMatrix3x4fv (will be remapped) */
+ /* _mesa_function_pool[26851]: UniformMatrix3x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x4fv\0"
"\0"
- /* _mesa_function_pool[26803]: ClipPlane (offset 150) */
+ /* _mesa_function_pool[26878]: ClipPlane (offset 150) */
"ip\0"
"glClipPlane\0"
"\0"
- /* _mesa_function_pool[26819]: Recti (offset 90) */
+ /* _mesa_function_pool[26894]: Recti (offset 90) */
"iiii\0"
"glRecti\0"
"\0"
- /* _mesa_function_pool[26833]: DrawRangeElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[26908]: DrawRangeElementsBaseVertex (will be remapped) */
"iiiiipi\0"
"glDrawRangeElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[26872]: TexCoordPointervINTEL (dynamic) */
+ /* _mesa_function_pool[26947]: TexCoordPointervINTEL (dynamic) */
"iip\0"
"glTexCoordPointervINTEL\0"
"\0"
- /* _mesa_function_pool[26901]: DeleteBuffersARB (will be remapped) */
+ /* _mesa_function_pool[26976]: DeleteBuffersARB (will be remapped) */
"ip\0"
"glDeleteBuffers\0"
"glDeleteBuffersARB\0"
"\0"
- /* _mesa_function_pool[26940]: WindowPos4fvMESA (will be remapped) */
+ /* _mesa_function_pool[27015]: WindowPos4fvMESA (will be remapped) */
"p\0"
"glWindowPos4fvMESA\0"
"\0"
- /* _mesa_function_pool[26962]: GetPixelMapuiv (offset 272) */
+ /* _mesa_function_pool[27037]: GetPixelMapuiv (offset 272) */
"ip\0"
"glGetPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[26983]: Rectf (offset 88) */
+ /* _mesa_function_pool[27058]: Rectf (offset 88) */
"ffff\0"
"glRectf\0"
"\0"
- /* _mesa_function_pool[26997]: VertexAttrib1sNV (will be remapped) */
+ /* _mesa_function_pool[27072]: VertexAttrib1sNV (will be remapped) */
"ii\0"
"glVertexAttrib1sNV\0"
"\0"
- /* _mesa_function_pool[27020]: Indexfv (offset 47) */
+ /* _mesa_function_pool[27095]: Indexfv (offset 47) */
"p\0"
"glIndexfv\0"
"\0"
- /* _mesa_function_pool[27033]: SecondaryColor3svEXT (will be remapped) */
+ /* _mesa_function_pool[27108]: SecondaryColor3svEXT (will be remapped) */
"p\0"
"glSecondaryColor3sv\0"
"glSecondaryColor3svEXT\0"
"\0"
- /* _mesa_function_pool[27079]: LoadTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[27154]: LoadTransposeMatrixfARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixf\0"
"glLoadTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[27131]: GetPointerv (offset 329) */
+ /* _mesa_function_pool[27206]: GetPointerv (offset 329) */
"ip\0"
"glGetPointerv\0"
"glGetPointervEXT\0"
"\0"
- /* _mesa_function_pool[27166]: Tangent3bEXT (dynamic) */
+ /* _mesa_function_pool[27241]: Tangent3bEXT (dynamic) */
"iii\0"
"glTangent3bEXT\0"
"\0"
- /* _mesa_function_pool[27186]: CombinerParameterfNV (will be remapped) */
+ /* _mesa_function_pool[27261]: CombinerParameterfNV (will be remapped) */
"if\0"
"glCombinerParameterfNV\0"
"\0"
- /* _mesa_function_pool[27213]: IndexMask (offset 212) */
+ /* _mesa_function_pool[27288]: IndexMask (offset 212) */
"i\0"
"glIndexMask\0"
"\0"
- /* _mesa_function_pool[27228]: BindProgramNV (will be remapped) */
+ /* _mesa_function_pool[27303]: BindProgramNV (will be remapped) */
"ii\0"
"glBindProgramARB\0"
"glBindProgramNV\0"
"\0"
- /* _mesa_function_pool[27265]: VertexAttrib4svARB (will be remapped) */
+ /* _mesa_function_pool[27340]: VertexAttrib4svARB (will be remapped) */
"ip\0"
"glVertexAttrib4sv\0"
"glVertexAttrib4svARB\0"
"\0"
- /* _mesa_function_pool[27308]: GetFloatv (offset 262) */
+ /* _mesa_function_pool[27383]: GetFloatv (offset 262) */
"ip\0"
"glGetFloatv\0"
"\0"
- /* _mesa_function_pool[27324]: CreateDebugObjectMESA (dynamic) */
+ /* _mesa_function_pool[27399]: CreateDebugObjectMESA (dynamic) */
"\0"
"glCreateDebugObjectMESA\0"
"\0"
- /* _mesa_function_pool[27350]: GetShaderiv (will be remapped) */
+ /* _mesa_function_pool[27425]: GetShaderiv (will be remapped) */
"iip\0"
"glGetShaderiv\0"
"\0"
- /* _mesa_function_pool[27369]: ClientWaitSync (will be remapped) */
+ /* _mesa_function_pool[27444]: ClientWaitSync (will be remapped) */
"iii\0"
"glClientWaitSync\0"
"\0"
- /* _mesa_function_pool[27391]: TexCoord4s (offset 124) */
+ /* _mesa_function_pool[27466]: TexCoord4s (offset 124) */
"iiii\0"
"glTexCoord4s\0"
"\0"
- /* _mesa_function_pool[27410]: TexCoord3sv (offset 117) */
+ /* _mesa_function_pool[27485]: TexCoord3sv (offset 117) */
"p\0"
"glTexCoord3sv\0"
"\0"
- /* _mesa_function_pool[27427]: BindFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[27502]: BindFragmentShaderATI (will be remapped) */
"i\0"
"glBindFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[27454]: PopAttrib (offset 218) */
+ /* _mesa_function_pool[27529]: PopAttrib (offset 218) */
"\0"
"glPopAttrib\0"
"\0"
- /* _mesa_function_pool[27468]: Fogfv (offset 154) */
+ /* _mesa_function_pool[27543]: Fogfv (offset 154) */
"ip\0"
"glFogfv\0"
"\0"
- /* _mesa_function_pool[27480]: UnmapBufferARB (will be remapped) */
+ /* _mesa_function_pool[27555]: UnmapBufferARB (will be remapped) */
"i\0"
"glUnmapBuffer\0"
"glUnmapBufferARB\0"
"\0"
- /* _mesa_function_pool[27514]: InitNames (offset 197) */
+ /* _mesa_function_pool[27589]: InitNames (offset 197) */
"\0"
"glInitNames\0"
"\0"
- /* _mesa_function_pool[27528]: Normal3sv (offset 61) */
+ /* _mesa_function_pool[27603]: Normal3sv (offset 61) */
"p\0"
"glNormal3sv\0"
"\0"
- /* _mesa_function_pool[27543]: Minmax (offset 368) */
+ /* _mesa_function_pool[27618]: Minmax (offset 368) */
"iii\0"
"glMinmax\0"
"glMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[27569]: TexCoord4d (offset 118) */
+ /* _mesa_function_pool[27644]: TexCoord4d (offset 118) */
"dddd\0"
"glTexCoord4d\0"
"\0"
- /* _mesa_function_pool[27588]: DeformationMap3dSGIX (dynamic) */
- "iddiiddiiddiip\0"
- "glDeformationMap3dSGIX\0"
- "\0"
- /* _mesa_function_pool[27627]: TexCoord4f (offset 120) */
+ /* _mesa_function_pool[27663]: TexCoord4f (offset 120) */
"ffff\0"
"glTexCoord4f\0"
"\0"
- /* _mesa_function_pool[27646]: FogCoorddvEXT (will be remapped) */
+ /* _mesa_function_pool[27682]: FogCoorddvEXT (will be remapped) */
"p\0"
"glFogCoorddv\0"
"glFogCoorddvEXT\0"
"\0"
- /* _mesa_function_pool[27678]: FinishTextureSUNX (dynamic) */
+ /* _mesa_function_pool[27714]: FinishTextureSUNX (dynamic) */
"\0"
"glFinishTextureSUNX\0"
"\0"
- /* _mesa_function_pool[27700]: GetFragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[27736]: GetFragmentLightfvSGIX (dynamic) */
"iip\0"
"glGetFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[27730]: Binormal3fvEXT (dynamic) */
+ /* _mesa_function_pool[27766]: Binormal3fvEXT (dynamic) */
"p\0"
"glBinormal3fvEXT\0"
"\0"
- /* _mesa_function_pool[27750]: GetBooleanv (offset 258) */
+ /* _mesa_function_pool[27786]: GetBooleanv (offset 258) */
"ip\0"
"glGetBooleanv\0"
"\0"
- /* _mesa_function_pool[27768]: ColorFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[27804]: ColorFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiiii\0"
"glColorFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[27805]: Hint (offset 158) */
+ /* _mesa_function_pool[27841]: Hint (offset 158) */
"ii\0"
"glHint\0"
"\0"
- /* _mesa_function_pool[27816]: Color4dv (offset 28) */
+ /* _mesa_function_pool[27852]: Color4dv (offset 28) */
"p\0"
"glColor4dv\0"
"\0"
- /* _mesa_function_pool[27830]: VertexAttrib2svARB (will be remapped) */
+ /* _mesa_function_pool[27866]: VertexAttrib2svARB (will be remapped) */
"ip\0"
"glVertexAttrib2sv\0"
"glVertexAttrib2svARB\0"
"\0"
- /* _mesa_function_pool[27873]: AreProgramsResidentNV (will be remapped) */
+ /* _mesa_function_pool[27909]: AreProgramsResidentNV (will be remapped) */
"ipp\0"
"glAreProgramsResidentNV\0"
"\0"
- /* _mesa_function_pool[27902]: WindowPos3svMESA (will be remapped) */
+ /* _mesa_function_pool[27938]: WindowPos3svMESA (will be remapped) */
"p\0"
"glWindowPos3sv\0"
"glWindowPos3svARB\0"
"glWindowPos3svMESA\0"
"\0"
- /* _mesa_function_pool[27957]: CopyColorSubTable (offset 347) */
+ /* _mesa_function_pool[27993]: CopyColorSubTable (offset 347) */
"iiiii\0"
"glCopyColorSubTable\0"
"glCopyColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[28007]: WeightdvARB (dynamic) */
+ /* _mesa_function_pool[28043]: WeightdvARB (dynamic) */
"ip\0"
"glWeightdvARB\0"
"\0"
- /* _mesa_function_pool[28025]: DeleteRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[28061]: DeleteRenderbuffersEXT (will be remapped) */
"ip\0"
"glDeleteRenderbuffers\0"
"glDeleteRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[28076]: VertexAttrib4NubvARB (will be remapped) */
+ /* _mesa_function_pool[28112]: VertexAttrib4NubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nubv\0"
"glVertexAttrib4NubvARB\0"
"\0"
- /* _mesa_function_pool[28123]: VertexAttrib3dvNV (will be remapped) */
+ /* _mesa_function_pool[28159]: VertexAttrib3dvNV (will be remapped) */
"ip\0"
"glVertexAttrib3dvNV\0"
"\0"
- /* _mesa_function_pool[28147]: GetObjectParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[28183]: GetObjectParameterfvARB (will be remapped) */
"iip\0"
"glGetObjectParameterfvARB\0"
"\0"
- /* _mesa_function_pool[28178]: Vertex4iv (offset 147) */
+ /* _mesa_function_pool[28214]: Vertex4iv (offset 147) */
"p\0"
"glVertex4iv\0"
"\0"
- /* _mesa_function_pool[28193]: GetProgramEnvParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[28229]: GetProgramEnvParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterdvARB\0"
"\0"
- /* _mesa_function_pool[28228]: TexCoord4dv (offset 119) */
+ /* _mesa_function_pool[28264]: TexCoord4dv (offset 119) */
"p\0"
"glTexCoord4dv\0"
"\0"
- /* _mesa_function_pool[28245]: LockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[28281]: LockArraysEXT (will be remapped) */
"ii\0"
"glLockArraysEXT\0"
"\0"
- /* _mesa_function_pool[28265]: Begin (offset 7) */
+ /* _mesa_function_pool[28301]: Begin (offset 7) */
"i\0"
"glBegin\0"
"\0"
- /* _mesa_function_pool[28276]: LightModeli (offset 165) */
+ /* _mesa_function_pool[28312]: LightModeli (offset 165) */
"ii\0"
"glLightModeli\0"
"\0"
- /* _mesa_function_pool[28294]: Rectfv (offset 89) */
+ /* _mesa_function_pool[28330]: Rectfv (offset 89) */
"pp\0"
"glRectfv\0"
"\0"
- /* _mesa_function_pool[28307]: LightModelf (offset 163) */
+ /* _mesa_function_pool[28343]: LightModelf (offset 163) */
"if\0"
"glLightModelf\0"
"\0"
- /* _mesa_function_pool[28325]: GetTexParameterfv (offset 282) */
+ /* _mesa_function_pool[28361]: GetTexParameterfv (offset 282) */
"iip\0"
"glGetTexParameterfv\0"
"\0"
- /* _mesa_function_pool[28350]: GetLightfv (offset 264) */
+ /* _mesa_function_pool[28386]: GetLightfv (offset 264) */
"iip\0"
"glGetLightfv\0"
"\0"
- /* _mesa_function_pool[28368]: PixelTransformParameterivEXT (dynamic) */
+ /* _mesa_function_pool[28404]: PixelTransformParameterivEXT (dynamic) */
"iip\0"
"glPixelTransformParameterivEXT\0"
"\0"
- /* _mesa_function_pool[28404]: BinormalPointerEXT (dynamic) */
+ /* _mesa_function_pool[28440]: BinormalPointerEXT (dynamic) */
"iip\0"
"glBinormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[28430]: VertexAttrib1dNV (will be remapped) */
+ /* _mesa_function_pool[28466]: VertexAttrib1dNV (will be remapped) */
"id\0"
"glVertexAttrib1dNV\0"
"\0"
- /* _mesa_function_pool[28453]: GetCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[28489]: GetCombinerInputParameterivNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[28492]: Disable (offset 214) */
+ /* _mesa_function_pool[28528]: Disable (offset 214) */
"i\0"
"glDisable\0"
"\0"
- /* _mesa_function_pool[28505]: MultiTexCoord2fvARB (offset 387) */
+ /* _mesa_function_pool[28541]: MultiTexCoord2fvARB (offset 387) */
"ip\0"
"glMultiTexCoord2fv\0"
"glMultiTexCoord2fvARB\0"
"\0"
- /* _mesa_function_pool[28550]: GetRenderbufferParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[28586]: GetRenderbufferParameterivEXT (will be remapped) */
"iip\0"
"glGetRenderbufferParameteriv\0"
"glGetRenderbufferParameterivEXT\0"
"\0"
- /* _mesa_function_pool[28616]: CombinerParameterivNV (will be remapped) */
+ /* _mesa_function_pool[28652]: CombinerParameterivNV (will be remapped) */
"ip\0"
"glCombinerParameterivNV\0"
"\0"
- /* _mesa_function_pool[28644]: GenFragmentShadersATI (will be remapped) */
+ /* _mesa_function_pool[28680]: GenFragmentShadersATI (will be remapped) */
"i\0"
"glGenFragmentShadersATI\0"
"\0"
- /* _mesa_function_pool[28671]: DrawArrays (offset 310) */
+ /* _mesa_function_pool[28707]: DrawArrays (offset 310) */
"iii\0"
"glDrawArrays\0"
"glDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[28705]: WeightuivARB (dynamic) */
+ /* _mesa_function_pool[28741]: WeightuivARB (dynamic) */
"ip\0"
"glWeightuivARB\0"
"\0"
- /* _mesa_function_pool[28724]: VertexAttrib2sARB (will be remapped) */
+ /* _mesa_function_pool[28760]: VertexAttrib2sARB (will be remapped) */
"iii\0"
"glVertexAttrib2s\0"
"glVertexAttrib2sARB\0"
"\0"
- /* _mesa_function_pool[28766]: ColorMask (offset 210) */
+ /* _mesa_function_pool[28802]: ColorMask (offset 210) */
"iiii\0"
"glColorMask\0"
"\0"
- /* _mesa_function_pool[28784]: GenAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[28820]: GenAsyncMarkersSGIX (dynamic) */
"i\0"
"glGenAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[28809]: Tangent3svEXT (dynamic) */
+ /* _mesa_function_pool[28845]: Tangent3svEXT (dynamic) */
"p\0"
"glTangent3svEXT\0"
"\0"
- /* _mesa_function_pool[28828]: GetListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[28864]: GetListParameterivSGIX (dynamic) */
"iip\0"
"glGetListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[28858]: BindBufferARB (will be remapped) */
+ /* _mesa_function_pool[28894]: BindBufferARB (will be remapped) */
"ii\0"
"glBindBuffer\0"
"glBindBufferARB\0"
"\0"
- /* _mesa_function_pool[28891]: GetInfoLogARB (will be remapped) */
+ /* _mesa_function_pool[28927]: GetInfoLogARB (will be remapped) */
"iipp\0"
"glGetInfoLogARB\0"
"\0"
- /* _mesa_function_pool[28913]: RasterPos4iv (offset 83) */
+ /* _mesa_function_pool[28949]: RasterPos4iv (offset 83) */
"p\0"
"glRasterPos4iv\0"
"\0"
- /* _mesa_function_pool[28931]: Enable (offset 215) */
+ /* _mesa_function_pool[28967]: Enable (offset 215) */
"i\0"
"glEnable\0"
"\0"
- /* _mesa_function_pool[28943]: LineStipple (offset 167) */
+ /* _mesa_function_pool[28979]: LineStipple (offset 167) */
"ii\0"
"glLineStipple\0"
"\0"
- /* _mesa_function_pool[28961]: VertexAttribs4svNV (will be remapped) */
+ /* _mesa_function_pool[28997]: VertexAttribs4svNV (will be remapped) */
"iip\0"
"glVertexAttribs4svNV\0"
"\0"
- /* _mesa_function_pool[28987]: EdgeFlagPointerListIBM (dynamic) */
+ /* _mesa_function_pool[29023]: EdgeFlagPointerListIBM (dynamic) */
"ipi\0"
"glEdgeFlagPointerListIBM\0"
"\0"
- /* _mesa_function_pool[29017]: UniformMatrix3x2fv (will be remapped) */
+ /* _mesa_function_pool[29053]: UniformMatrix3x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x2fv\0"
"\0"
- /* _mesa_function_pool[29044]: GetMinmaxParameterfv (offset 365) */
+ /* _mesa_function_pool[29080]: GetMinmaxParameterfv (offset 365) */
"iip\0"
"glGetMinmaxParameterfv\0"
"glGetMinmaxParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[29098]: VertexAttrib1fvARB (will be remapped) */
+ /* _mesa_function_pool[29134]: VertexAttrib1fvARB (will be remapped) */
"ip\0"
"glVertexAttrib1fv\0"
"glVertexAttrib1fvARB\0"
"\0"
- /* _mesa_function_pool[29141]: GenBuffersARB (will be remapped) */
+ /* _mesa_function_pool[29177]: GenBuffersARB (will be remapped) */
"ip\0"
"glGenBuffers\0"
"glGenBuffersARB\0"
"\0"
- /* _mesa_function_pool[29174]: VertexAttribs1svNV (will be remapped) */
+ /* _mesa_function_pool[29210]: VertexAttribs1svNV (will be remapped) */
"iip\0"
"glVertexAttribs1svNV\0"
"\0"
- /* _mesa_function_pool[29200]: Vertex3fv (offset 137) */
+ /* _mesa_function_pool[29236]: Vertex3fv (offset 137) */
"p\0"
"glVertex3fv\0"
"\0"
- /* _mesa_function_pool[29215]: GetTexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[29251]: GetTexBumpParameterivATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[29246]: Binormal3bEXT (dynamic) */
+ /* _mesa_function_pool[29282]: Binormal3bEXT (dynamic) */
"iii\0"
"glBinormal3bEXT\0"
"\0"
- /* _mesa_function_pool[29267]: FragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[29303]: FragmentMaterialivSGIX (dynamic) */
"iip\0"
"glFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[29297]: IsRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[29333]: IsRenderbufferEXT (will be remapped) */
"i\0"
"glIsRenderbuffer\0"
"glIsRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[29337]: GenProgramsNV (will be remapped) */
+ /* _mesa_function_pool[29373]: GenProgramsNV (will be remapped) */
"ip\0"
"glGenProgramsARB\0"
"glGenProgramsNV\0"
"\0"
- /* _mesa_function_pool[29374]: VertexAttrib4dvNV (will be remapped) */
+ /* _mesa_function_pool[29410]: VertexAttrib4dvNV (will be remapped) */
"ip\0"
"glVertexAttrib4dvNV\0"
"\0"
- /* _mesa_function_pool[29398]: EndFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[29434]: EndFragmentShaderATI (will be remapped) */
"\0"
"glEndFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[29423]: Binormal3iEXT (dynamic) */
+ /* _mesa_function_pool[29459]: Binormal3iEXT (dynamic) */
"iii\0"
"glBinormal3iEXT\0"
"\0"
- /* _mesa_function_pool[29444]: WindowPos2fMESA (will be remapped) */
+ /* _mesa_function_pool[29480]: WindowPos2fMESA (will be remapped) */
"ff\0"
"glWindowPos2f\0"
"glWindowPos2fARB\0"
@@ -4334,390 +4335,390 @@ static const struct {
} MESA_remap_table_functions[] = {
{ 1461, AttachShader_remap_index },
{ 8704, CreateProgram_remap_index },
- { 20115, CreateShader_remap_index },
- { 22375, DeleteProgram_remap_index },
- { 16150, DeleteShader_remap_index },
- { 20561, DetachShader_remap_index },
- { 15674, GetAttachedShaders_remap_index },
+ { 20158, CreateShader_remap_index },
+ { 22418, DeleteProgram_remap_index },
+ { 16193, DeleteShader_remap_index },
+ { 20604, DetachShader_remap_index },
+ { 15717, GetAttachedShaders_remap_index },
{ 4244, GetProgramInfoLog_remap_index },
{ 361, GetProgramiv_remap_index },
{ 5547, GetShaderInfoLog_remap_index },
- { 27350, GetShaderiv_remap_index },
- { 11657, IsProgram_remap_index },
- { 10728, IsShader_remap_index },
+ { 27425, GetShaderiv_remap_index },
+ { 11732, IsProgram_remap_index },
+ { 10767, IsShader_remap_index },
{ 8808, StencilFuncSeparate_remap_index },
{ 3487, StencilMaskSeparate_remap_index },
{ 6623, StencilOpSeparate_remap_index },
- { 19492, UniformMatrix2x3fv_remap_index },
+ { 19535, UniformMatrix2x3fv_remap_index },
{ 2615, UniformMatrix2x4fv_remap_index },
- { 29017, UniformMatrix3x2fv_remap_index },
- { 26776, UniformMatrix3x4fv_remap_index },
- { 14222, UniformMatrix4x2fv_remap_index },
+ { 29053, UniformMatrix3x2fv_remap_index },
+ { 26851, UniformMatrix3x4fv_remap_index },
+ { 14265, UniformMatrix4x2fv_remap_index },
{ 2937, UniformMatrix4x3fv_remap_index },
{ 8722, LoadTransposeMatrixdARB_remap_index },
- { 27079, LoadTransposeMatrixfARB_remap_index },
+ { 27154, LoadTransposeMatrixfARB_remap_index },
{ 4817, MultTransposeMatrixdARB_remap_index },
- { 20748, MultTransposeMatrixfARB_remap_index },
+ { 20791, MultTransposeMatrixfARB_remap_index },
{ 172, SampleCoverageARB_remap_index },
{ 4971, CompressedTexImage1DARB_remap_index },
- { 21205, CompressedTexImage2DARB_remap_index },
+ { 21248, CompressedTexImage2DARB_remap_index },
{ 3550, CompressedTexImage3DARB_remap_index },
- { 15966, CompressedTexSubImage1DARB_remap_index },
+ { 16009, CompressedTexSubImage1DARB_remap_index },
{ 1880, CompressedTexSubImage2DARB_remap_index },
- { 17758, CompressedTexSubImage3DARB_remap_index },
- { 25058, GetCompressedTexImageARB_remap_index },
+ { 17801, CompressedTexSubImage3DARB_remap_index },
+ { 25133, GetCompressedTexImageARB_remap_index },
{ 3395, DisableVertexAttribArrayARB_remap_index },
- { 26388, EnableVertexAttribArrayARB_remap_index },
- { 28193, GetProgramEnvParameterdvARB_remap_index },
- { 20628, GetProgramEnvParameterfvARB_remap_index },
- { 24088, GetProgramLocalParameterdvARB_remap_index },
+ { 26463, EnableVertexAttribArrayARB_remap_index },
+ { 28229, GetProgramEnvParameterdvARB_remap_index },
+ { 20671, GetProgramEnvParameterfvARB_remap_index },
+ { 24163, GetProgramLocalParameterdvARB_remap_index },
{ 7065, GetProgramLocalParameterfvARB_remap_index },
- { 16057, GetProgramStringARB_remap_index },
- { 24283, GetProgramivARB_remap_index },
- { 17953, GetVertexAttribdvARB_remap_index },
- { 14111, GetVertexAttribfvARB_remap_index },
+ { 16100, GetProgramStringARB_remap_index },
+ { 24358, GetProgramivARB_remap_index },
+ { 17996, GetVertexAttribdvARB_remap_index },
+ { 14154, GetVertexAttribfvARB_remap_index },
{ 8617, GetVertexAttribivARB_remap_index },
- { 16862, ProgramEnvParameter4dARB_remap_index },
- { 22175, ProgramEnvParameter4dvARB_remap_index },
- { 14719, ProgramEnvParameter4fARB_remap_index },
+ { 16905, ProgramEnvParameter4dARB_remap_index },
+ { 22218, ProgramEnvParameter4dvARB_remap_index },
+ { 14762, ProgramEnvParameter4fARB_remap_index },
{ 7928, ProgramEnvParameter4fvARB_remap_index },
{ 3513, ProgramLocalParameter4dARB_remap_index },
- { 11403, ProgramLocalParameter4dvARB_remap_index },
- { 25867, ProgramLocalParameter4fARB_remap_index },
- { 22693, ProgramLocalParameter4fvARB_remap_index },
- { 24844, ProgramStringARB_remap_index },
- { 17112, VertexAttrib1dARB_remap_index },
- { 13765, VertexAttrib1dvARB_remap_index },
+ { 11442, ProgramLocalParameter4dvARB_remap_index },
+ { 25942, ProgramLocalParameter4fARB_remap_index },
+ { 22736, ProgramLocalParameter4fvARB_remap_index },
+ { 24919, ProgramStringARB_remap_index },
+ { 17155, VertexAttrib1dARB_remap_index },
+ { 13808, VertexAttrib1dvARB_remap_index },
{ 3688, VertexAttrib1fARB_remap_index },
- { 29098, VertexAttrib1fvARB_remap_index },
+ { 29134, VertexAttrib1fvARB_remap_index },
{ 6149, VertexAttrib1sARB_remap_index },
{ 2054, VertexAttrib1svARB_remap_index },
- { 13196, VertexAttrib2dARB_remap_index },
- { 15293, VertexAttrib2dvARB_remap_index },
+ { 13239, VertexAttrib2dARB_remap_index },
+ { 15336, VertexAttrib2dvARB_remap_index },
{ 1480, VertexAttrib2fARB_remap_index },
- { 15406, VertexAttrib2fvARB_remap_index },
- { 28724, VertexAttrib2sARB_remap_index },
- { 27830, VertexAttrib2svARB_remap_index },
+ { 15449, VertexAttrib2fvARB_remap_index },
+ { 28760, VertexAttrib2sARB_remap_index },
+ { 27866, VertexAttrib2svARB_remap_index },
{ 9926, VertexAttrib3dARB_remap_index },
{ 7631, VertexAttrib3dvARB_remap_index },
{ 1567, VertexAttrib3fARB_remap_index },
- { 19729, VertexAttrib3fvARB_remap_index },
- { 24716, VertexAttrib3sARB_remap_index },
- { 17695, VertexAttrib3svARB_remap_index },
+ { 19772, VertexAttrib3fvARB_remap_index },
+ { 24791, VertexAttrib3sARB_remap_index },
+ { 17738, VertexAttrib3svARB_remap_index },
{ 4270, VertexAttrib4NbvARB_remap_index },
- { 15629, VertexAttrib4NivARB_remap_index },
- { 19684, VertexAttrib4NsvARB_remap_index },
- { 20580, VertexAttrib4NubARB_remap_index },
- { 28076, VertexAttrib4NubvARB_remap_index },
- { 16523, VertexAttrib4NuivARB_remap_index },
+ { 15672, VertexAttrib4NivARB_remap_index },
+ { 19727, VertexAttrib4NsvARB_remap_index },
+ { 20623, VertexAttrib4NubARB_remap_index },
+ { 28112, VertexAttrib4NubvARB_remap_index },
+ { 16566, VertexAttrib4NuivARB_remap_index },
{ 2810, VertexAttrib4NusvARB_remap_index },
{ 9549, VertexAttrib4bvARB_remap_index },
- { 23496, VertexAttrib4dARB_remap_index },
- { 18678, VertexAttrib4dvARB_remap_index },
+ { 23571, VertexAttrib4dARB_remap_index },
+ { 18721, VertexAttrib4dvARB_remap_index },
{ 10033, VertexAttrib4fARB_remap_index },
{ 10403, VertexAttrib4fvARB_remap_index },
{ 9001, VertexAttrib4ivARB_remap_index },
- { 15107, VertexAttrib4sARB_remap_index },
- { 27265, VertexAttrib4svARB_remap_index },
- { 14524, VertexAttrib4ubvARB_remap_index },
- { 26712, VertexAttrib4uivARB_remap_index },
- { 17506, VertexAttrib4usvARB_remap_index },
- { 19366, VertexAttribPointerARB_remap_index },
- { 28858, BindBufferARB_remap_index },
+ { 15150, VertexAttrib4sARB_remap_index },
+ { 27340, VertexAttrib4svARB_remap_index },
+ { 14567, VertexAttrib4ubvARB_remap_index },
+ { 26787, VertexAttrib4uivARB_remap_index },
+ { 17549, VertexAttrib4usvARB_remap_index },
+ { 19409, VertexAttribPointerARB_remap_index },
+ { 28894, BindBufferARB_remap_index },
{ 5862, BufferDataARB_remap_index },
{ 1382, BufferSubDataARB_remap_index },
- { 26901, DeleteBuffersARB_remap_index },
- { 29141, GenBuffersARB_remap_index },
- { 15449, GetBufferParameterivARB_remap_index },
- { 14671, GetBufferPointervARB_remap_index },
+ { 26976, DeleteBuffersARB_remap_index },
+ { 29177, GenBuffersARB_remap_index },
+ { 15492, GetBufferParameterivARB_remap_index },
+ { 14714, GetBufferPointervARB_remap_index },
{ 1335, GetBufferSubDataARB_remap_index },
- { 26660, IsBufferARB_remap_index },
- { 23124, MapBufferARB_remap_index },
- { 27480, UnmapBufferARB_remap_index },
+ { 26735, IsBufferARB_remap_index },
+ { 23167, MapBufferARB_remap_index },
+ { 27555, UnmapBufferARB_remap_index },
{ 268, BeginQueryARB_remap_index },
- { 17207, DeleteQueriesARB_remap_index },
+ { 17250, DeleteQueriesARB_remap_index },
{ 10664, EndQueryARB_remap_index },
- { 25537, GenQueriesARB_remap_index },
+ { 25612, GenQueriesARB_remap_index },
{ 1772, GetQueryObjectivARB_remap_index },
- { 15151, GetQueryObjectuivARB_remap_index },
+ { 15194, GetQueryObjectuivARB_remap_index },
{ 1624, GetQueryivARB_remap_index },
- { 17413, IsQueryARB_remap_index },
+ { 17456, IsQueryARB_remap_index },
{ 7241, AttachObjectARB_remap_index },
- { 16112, CompileShaderARB_remap_index },
+ { 16155, CompileShaderARB_remap_index },
{ 2879, CreateProgramObjectARB_remap_index },
{ 5807, CreateShaderObjectARB_remap_index },
- { 12613, DeleteObjectARB_remap_index },
- { 20979, DetachObjectARB_remap_index },
+ { 12656, DeleteObjectARB_remap_index },
+ { 21022, DetachObjectARB_remap_index },
{ 10475, GetActiveUniformARB_remap_index },
{ 8320, GetAttachedObjectsARB_remap_index },
{ 8599, GetHandleARB_remap_index },
- { 28891, GetInfoLogARB_remap_index },
- { 28147, GetObjectParameterfvARB_remap_index },
- { 23962, GetObjectParameterivARB_remap_index },
- { 25295, GetShaderSourceARB_remap_index },
- { 24576, GetUniformLocationARB_remap_index },
- { 20850, GetUniformfvARB_remap_index },
- { 11025, GetUniformivARB_remap_index },
- { 17551, LinkProgramARB_remap_index },
- { 17609, ShaderSourceARB_remap_index },
+ { 28927, GetInfoLogARB_remap_index },
+ { 28183, GetObjectParameterfvARB_remap_index },
+ { 24037, GetObjectParameterivARB_remap_index },
+ { 25370, GetShaderSourceARB_remap_index },
+ { 24651, GetUniformLocationARB_remap_index },
+ { 20893, GetUniformfvARB_remap_index },
+ { 11064, GetUniformivARB_remap_index },
+ { 17594, LinkProgramARB_remap_index },
+ { 17652, ShaderSourceARB_remap_index },
{ 6523, Uniform1fARB_remap_index },
- { 26076, Uniform1fvARB_remap_index },
- { 19335, Uniform1iARB_remap_index },
- { 18367, Uniform1ivARB_remap_index },
+ { 26151, Uniform1fvARB_remap_index },
+ { 19378, Uniform1iARB_remap_index },
+ { 18410, Uniform1ivARB_remap_index },
{ 2003, Uniform2fARB_remap_index },
- { 12449, Uniform2fvARB_remap_index },
- { 23011, Uniform2iARB_remap_index },
+ { 12492, Uniform2fvARB_remap_index },
+ { 23054, Uniform2iARB_remap_index },
{ 2123, Uniform2ivARB_remap_index },
- { 16222, Uniform3fARB_remap_index },
+ { 16265, Uniform3fARB_remap_index },
{ 8350, Uniform3fvARB_remap_index },
{ 5481, Uniform3iARB_remap_index },
- { 14777, Uniform3ivARB_remap_index },
- { 16668, Uniform4fARB_remap_index },
- { 20714, Uniform4fvARB_remap_index },
- { 21854, Uniform4iARB_remap_index },
- { 17919, Uniform4ivARB_remap_index },
+ { 14820, Uniform3ivARB_remap_index },
+ { 16711, Uniform4fARB_remap_index },
+ { 20757, Uniform4fvARB_remap_index },
+ { 21897, Uniform4iARB_remap_index },
+ { 17962, Uniform4ivARB_remap_index },
{ 7293, UniformMatrix2fvARB_remap_index },
{ 17, UniformMatrix3fvARB_remap_index },
{ 2475, UniformMatrix4fvARB_remap_index },
- { 22287, UseProgramObjectARB_remap_index },
- { 12884, ValidateProgramARB_remap_index },
- { 18721, BindAttribLocationARB_remap_index },
+ { 22330, UseProgramObjectARB_remap_index },
+ { 12927, ValidateProgramARB_remap_index },
+ { 18764, BindAttribLocationARB_remap_index },
{ 4315, GetActiveAttribARB_remap_index },
- { 14458, GetAttribLocationARB_remap_index },
- { 25815, DrawBuffersARB_remap_index },
- { 11508, RenderbufferStorageMultisample_remap_index },
- { 16716, FlushMappedBufferRange_remap_index },
- { 24379, MapBufferRange_remap_index },
- { 14333, BindVertexArray_remap_index },
- { 12743, GenVertexArrays_remap_index },
- { 26590, CopyBufferSubData_remap_index },
- { 27369, ClientWaitSync_remap_index },
+ { 14501, GetAttribLocationARB_remap_index },
+ { 25890, DrawBuffersARB_remap_index },
+ { 11547, RenderbufferStorageMultisample_remap_index },
+ { 16759, FlushMappedBufferRange_remap_index },
+ { 24454, MapBufferRange_remap_index },
+ { 14376, BindVertexArray_remap_index },
+ { 12786, GenVertexArrays_remap_index },
+ { 26665, CopyBufferSubData_remap_index },
+ { 27444, ClientWaitSync_remap_index },
{ 2394, DeleteSync_remap_index },
{ 6190, FenceSync_remap_index },
- { 13255, GetInteger64v_remap_index },
- { 19791, GetSynciv_remap_index },
- { 25754, IsSync_remap_index },
+ { 13298, GetInteger64v_remap_index },
+ { 19834, GetSynciv_remap_index },
+ { 25829, IsSync_remap_index },
{ 8268, WaitSync_remap_index },
{ 3363, DrawElementsBaseVertex_remap_index },
- { 26833, DrawRangeElementsBaseVertex_remap_index },
- { 23155, MultiDrawElementsBaseVertex_remap_index },
+ { 26908, DrawRangeElementsBaseVertex_remap_index },
+ { 23198, MultiDrawElementsBaseVertex_remap_index },
{ 4680, PolygonOffsetEXT_remap_index },
- { 20350, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 20393, GetPixelTexGenParameterfvSGIS_remap_index },
{ 3895, GetPixelTexGenParameterivSGIS_remap_index },
- { 20083, PixelTexGenParameterfSGIS_remap_index },
+ { 20126, PixelTexGenParameterfSGIS_remap_index },
{ 580, PixelTexGenParameterfvSGIS_remap_index },
- { 11063, PixelTexGenParameteriSGIS_remap_index },
- { 12020, PixelTexGenParameterivSGIS_remap_index },
- { 14421, SampleMaskSGIS_remap_index },
- { 17353, SamplePatternSGIS_remap_index },
- { 23084, ColorPointerEXT_remap_index },
- { 15336, EdgeFlagPointerEXT_remap_index },
+ { 11102, PixelTexGenParameteriSGIS_remap_index },
+ { 12063, PixelTexGenParameterivSGIS_remap_index },
+ { 14464, SampleMaskSGIS_remap_index },
+ { 17396, SamplePatternSGIS_remap_index },
+ { 23127, ColorPointerEXT_remap_index },
+ { 15379, EdgeFlagPointerEXT_remap_index },
{ 5135, IndexPointerEXT_remap_index },
{ 5215, NormalPointerEXT_remap_index },
- { 13849, TexCoordPointerEXT_remap_index },
+ { 13892, TexCoordPointerEXT_remap_index },
{ 5985, VertexPointerEXT_remap_index },
{ 3165, PointParameterfEXT_remap_index },
{ 6830, PointParameterfvEXT_remap_index },
- { 28245, LockArraysEXT_remap_index },
- { 12948, UnlockArraysEXT_remap_index },
+ { 28281, LockArraysEXT_remap_index },
+ { 12991, UnlockArraysEXT_remap_index },
{ 7837, CullParameterdvEXT_remap_index },
{ 10270, CullParameterfvEXT_remap_index },
{ 1151, SecondaryColor3bEXT_remap_index },
{ 6989, SecondaryColor3bvEXT_remap_index },
{ 9178, SecondaryColor3dEXT_remap_index },
- { 22433, SecondaryColor3dvEXT_remap_index },
- { 24625, SecondaryColor3fEXT_remap_index },
- { 15902, SecondaryColor3fvEXT_remap_index },
+ { 22476, SecondaryColor3dvEXT_remap_index },
+ { 24700, SecondaryColor3fEXT_remap_index },
+ { 15945, SecondaryColor3fvEXT_remap_index },
{ 426, SecondaryColor3iEXT_remap_index },
- { 14159, SecondaryColor3ivEXT_remap_index },
+ { 14202, SecondaryColor3ivEXT_remap_index },
{ 8836, SecondaryColor3sEXT_remap_index },
- { 27033, SecondaryColor3svEXT_remap_index },
- { 23798, SecondaryColor3ubEXT_remap_index },
- { 18612, SecondaryColor3ubvEXT_remap_index },
- { 11258, SecondaryColor3uiEXT_remap_index },
- { 19970, SecondaryColor3uivEXT_remap_index },
- { 22645, SecondaryColor3usEXT_remap_index },
- { 11331, SecondaryColor3usvEXT_remap_index },
+ { 27108, SecondaryColor3svEXT_remap_index },
+ { 23873, SecondaryColor3ubEXT_remap_index },
+ { 18655, SecondaryColor3ubvEXT_remap_index },
+ { 11297, SecondaryColor3uiEXT_remap_index },
+ { 20013, SecondaryColor3uivEXT_remap_index },
+ { 22688, SecondaryColor3usEXT_remap_index },
+ { 11370, SecondaryColor3usvEXT_remap_index },
{ 10346, SecondaryColorPointerEXT_remap_index },
- { 22494, MultiDrawArraysEXT_remap_index },
- { 18302, MultiDrawElementsEXT_remap_index },
- { 18497, FogCoordPointerEXT_remap_index },
+ { 22537, MultiDrawArraysEXT_remap_index },
+ { 18345, MultiDrawElementsEXT_remap_index },
+ { 18540, FogCoordPointerEXT_remap_index },
{ 4044, FogCoorddEXT_remap_index },
- { 27646, FogCoorddvEXT_remap_index },
+ { 27682, FogCoorddvEXT_remap_index },
{ 4105, FogCoordfEXT_remap_index },
- { 23721, FogCoordfvEXT_remap_index },
- { 16620, PixelTexGenSGIX_remap_index },
- { 24306, BlendFuncSeparateEXT_remap_index },
+ { 23796, FogCoordfvEXT_remap_index },
+ { 16663, PixelTexGenSGIX_remap_index },
+ { 24381, BlendFuncSeparateEXT_remap_index },
{ 5897, FlushVertexArrayRangeNV_remap_index },
{ 4629, VertexArrayRangeNV_remap_index },
- { 24690, CombinerInputNV_remap_index },
+ { 24765, CombinerInputNV_remap_index },
{ 1946, CombinerOutputNV_remap_index },
- { 27186, CombinerParameterfNV_remap_index },
+ { 27261, CombinerParameterfNV_remap_index },
{ 4549, CombinerParameterfvNV_remap_index },
- { 19541, CombinerParameteriNV_remap_index },
- { 28616, CombinerParameterivNV_remap_index },
+ { 19584, CombinerParameteriNV_remap_index },
+ { 28652, CombinerParameterivNV_remap_index },
{ 6267, FinalCombinerInputNV_remap_index },
{ 8665, GetCombinerInputParameterfvNV_remap_index },
- { 28453, GetCombinerInputParameterivNV_remap_index },
+ { 28489, GetCombinerInputParameterivNV_remap_index },
{ 6066, GetCombinerOutputParameterfvNV_remap_index },
- { 11949, GetCombinerOutputParameterivNV_remap_index },
+ { 12024, GetCombinerOutputParameterivNV_remap_index },
{ 5642, GetFinalCombinerInputParameterfvNV_remap_index },
- { 21726, GetFinalCombinerInputParameterivNV_remap_index },
- { 11003, ResizeBuffersMESA_remap_index },
+ { 21769, GetFinalCombinerInputParameterivNV_remap_index },
+ { 11042, ResizeBuffersMESA_remap_index },
{ 9753, WindowPos2dMESA_remap_index },
{ 944, WindowPos2dvMESA_remap_index },
- { 29444, WindowPos2fMESA_remap_index },
+ { 29480, WindowPos2fMESA_remap_index },
{ 6934, WindowPos2fvMESA_remap_index },
- { 15849, WindowPos2iMESA_remap_index },
- { 17826, WindowPos2ivMESA_remap_index },
- { 18401, WindowPos2sMESA_remap_index },
+ { 15892, WindowPos2iMESA_remap_index },
+ { 17869, WindowPos2ivMESA_remap_index },
+ { 18444, WindowPos2sMESA_remap_index },
{ 4885, WindowPos2svMESA_remap_index },
{ 6759, WindowPos3dMESA_remap_index },
- { 12228, WindowPos3dvMESA_remap_index },
+ { 12271, WindowPos3dvMESA_remap_index },
{ 472, WindowPos3fMESA_remap_index },
- { 13009, WindowPos3fvMESA_remap_index },
- { 21021, WindowPos3iMESA_remap_index },
- { 26535, WindowPos3ivMESA_remap_index },
- { 16366, WindowPos3sMESA_remap_index },
- { 27902, WindowPos3svMESA_remap_index },
+ { 13052, WindowPos3fvMESA_remap_index },
+ { 21064, WindowPos3iMESA_remap_index },
+ { 26610, WindowPos3ivMESA_remap_index },
+ { 16409, WindowPos3sMESA_remap_index },
+ { 27938, WindowPos3svMESA_remap_index },
{ 9704, WindowPos4dMESA_remap_index },
- { 14862, WindowPos4dvMESA_remap_index },
- { 12187, WindowPos4fMESA_remap_index },
- { 26940, WindowPos4fvMESA_remap_index },
- { 26688, WindowPos4iMESA_remap_index },
- { 10842, WindowPos4ivMESA_remap_index },
- { 16499, WindowPos4sMESA_remap_index },
+ { 14905, WindowPos4dvMESA_remap_index },
+ { 12230, WindowPos4fMESA_remap_index },
+ { 27015, WindowPos4fvMESA_remap_index },
+ { 26763, WindowPos4iMESA_remap_index },
+ { 10881, WindowPos4ivMESA_remap_index },
+ { 16542, WindowPos4sMESA_remap_index },
{ 2857, WindowPos4svMESA_remap_index },
- { 11988, MultiModeDrawArraysIBM_remap_index },
- { 25408, MultiModeDrawElementsIBM_remap_index },
+ { 23539, MultiModeDrawArraysIBM_remap_index },
+ { 25483, MultiModeDrawElementsIBM_remap_index },
{ 10692, DeleteFencesNV_remap_index },
- { 24537, FinishFenceNV_remap_index },
+ { 24612, FinishFenceNV_remap_index },
{ 3287, GenFencesNV_remap_index },
- { 14842, GetFenceivNV_remap_index },
+ { 14885, GetFenceivNV_remap_index },
{ 7226, IsFenceNV_remap_index },
- { 11876, SetFenceNV_remap_index },
+ { 11951, SetFenceNV_remap_index },
{ 3744, TestFenceNV_remap_index },
- { 27873, AreProgramsResidentNV_remap_index },
- { 27228, BindProgramNV_remap_index },
- { 22728, DeleteProgramsNV_remap_index },
- { 18830, ExecuteProgramNV_remap_index },
- { 29337, GenProgramsNV_remap_index },
- { 20429, GetProgramParameterdvNV_remap_index },
+ { 27909, AreProgramsResidentNV_remap_index },
+ { 27303, BindProgramNV_remap_index },
+ { 22771, DeleteProgramsNV_remap_index },
+ { 18873, ExecuteProgramNV_remap_index },
+ { 29373, GenProgramsNV_remap_index },
+ { 20472, GetProgramParameterdvNV_remap_index },
{ 9240, GetProgramParameterfvNV_remap_index },
- { 23058, GetProgramStringNV_remap_index },
- { 21415, GetProgramivNV_remap_index },
- { 20663, GetTrackMatrixivNV_remap_index },
- { 22878, GetVertexAttribPointervNV_remap_index },
- { 21659, GetVertexAttribdvNV_remap_index },
- { 16339, GetVertexAttribfvNV_remap_index },
- { 16030, GetVertexAttribivNV_remap_index },
- { 16746, IsProgramNV_remap_index },
+ { 23101, GetProgramStringNV_remap_index },
+ { 21458, GetProgramivNV_remap_index },
+ { 20706, GetTrackMatrixivNV_remap_index },
+ { 22921, GetVertexAttribPointervNV_remap_index },
+ { 21702, GetVertexAttribdvNV_remap_index },
+ { 16382, GetVertexAttribfvNV_remap_index },
+ { 16073, GetVertexAttribivNV_remap_index },
+ { 16789, IsProgramNV_remap_index },
{ 8246, LoadProgramNV_remap_index },
- { 24402, ProgramParameters4dvNV_remap_index },
- { 21345, ProgramParameters4fvNV_remap_index },
- { 18130, RequestResidentProgramsNV_remap_index },
- { 19519, TrackMatrixNV_remap_index },
- { 28430, VertexAttrib1dNV_remap_index },
- { 11817, VertexAttrib1dvNV_remap_index },
- { 24940, VertexAttrib1fNV_remap_index },
+ { 24477, ProgramParameters4dvNV_remap_index },
+ { 21388, ProgramParameters4fvNV_remap_index },
+ { 18173, RequestResidentProgramsNV_remap_index },
+ { 19562, TrackMatrixNV_remap_index },
+ { 28466, VertexAttrib1dNV_remap_index },
+ { 11892, VertexAttrib1dvNV_remap_index },
+ { 25015, VertexAttrib1fNV_remap_index },
{ 2245, VertexAttrib1fvNV_remap_index },
- { 26997, VertexAttrib1sNV_remap_index },
- { 13082, VertexAttrib1svNV_remap_index },
+ { 27072, VertexAttrib1sNV_remap_index },
+ { 13125, VertexAttrib1svNV_remap_index },
{ 4220, VertexAttrib2dNV_remap_index },
- { 11732, VertexAttrib2dvNV_remap_index },
- { 17585, VertexAttrib2fNV_remap_index },
- { 11379, VertexAttrib2fvNV_remap_index },
+ { 11807, VertexAttrib2dvNV_remap_index },
+ { 17628, VertexAttrib2fNV_remap_index },
+ { 11418, VertexAttrib2fvNV_remap_index },
{ 5045, VertexAttrib2sNV_remap_index },
- { 16420, VertexAttrib2svNV_remap_index },
+ { 16463, VertexAttrib2svNV_remap_index },
{ 9901, VertexAttrib3dNV_remap_index },
- { 28123, VertexAttrib3dvNV_remap_index },
+ { 28159, VertexAttrib3dvNV_remap_index },
{ 9052, VertexAttrib3fNV_remap_index },
- { 21686, VertexAttrib3fvNV_remap_index },
- { 24915, VertexAttrib3sNV_remap_index },
- { 20690, VertexAttrib3svNV_remap_index },
- { 25382, VertexAttrib4dNV_remap_index },
- { 29374, VertexAttrib4dvNV_remap_index },
+ { 21729, VertexAttrib3fvNV_remap_index },
+ { 24990, VertexAttrib3sNV_remap_index },
+ { 20733, VertexAttrib3svNV_remap_index },
+ { 25457, VertexAttrib4dNV_remap_index },
+ { 29410, VertexAttrib4dvNV_remap_index },
{ 3945, VertexAttrib4fNV_remap_index },
{ 8296, VertexAttrib4fvNV_remap_index },
- { 23380, VertexAttrib4sNV_remap_index },
+ { 23423, VertexAttrib4sNV_remap_index },
{ 1293, VertexAttrib4svNV_remap_index },
{ 4378, VertexAttrib4ubNV_remap_index },
{ 734, VertexAttrib4ubvNV_remap_index },
- { 19010, VertexAttribPointerNV_remap_index },
+ { 19053, VertexAttribPointerNV_remap_index },
{ 2097, VertexAttribs1dvNV_remap_index },
- { 16444, VertexAttribs1fvNV_remap_index },
- { 29174, VertexAttribs1svNV_remap_index },
+ { 16487, VertexAttribs1fvNV_remap_index },
+ { 29210, VertexAttribs1svNV_remap_index },
{ 9077, VertexAttribs2dvNV_remap_index },
- { 22248, VertexAttribs2fvNV_remap_index },
- { 15362, VertexAttribs2svNV_remap_index },
+ { 22291, VertexAttribs2fvNV_remap_index },
+ { 15405, VertexAttribs2svNV_remap_index },
{ 4577, VertexAttribs3dvNV_remap_index },
{ 1977, VertexAttribs3fvNV_remap_index },
- { 26283, VertexAttribs3svNV_remap_index },
- { 23470, VertexAttribs4dvNV_remap_index },
+ { 26358, VertexAttribs3svNV_remap_index },
+ { 23513, VertexAttribs4dvNV_remap_index },
{ 4603, VertexAttribs4fvNV_remap_index },
- { 28961, VertexAttribs4svNV_remap_index },
- { 26031, VertexAttribs4ubvNV_remap_index },
- { 23540, GetTexBumpParameterfvATI_remap_index },
- { 29215, GetTexBumpParameterivATI_remap_index },
- { 16084, TexBumpParameterfvATI_remap_index },
- { 18001, TexBumpParameterivATI_remap_index },
- { 13628, AlphaFragmentOp1ATI_remap_index },
+ { 28997, VertexAttribs4svNV_remap_index },
+ { 26106, VertexAttribs4ubvNV_remap_index },
+ { 23615, GetTexBumpParameterfvATI_remap_index },
+ { 29251, GetTexBumpParameterivATI_remap_index },
+ { 16127, TexBumpParameterfvATI_remap_index },
+ { 18044, TexBumpParameterivATI_remap_index },
+ { 13671, AlphaFragmentOp1ATI_remap_index },
{ 9592, AlphaFragmentOp2ATI_remap_index },
- { 21602, AlphaFragmentOp3ATI_remap_index },
- { 26210, BeginFragmentShaderATI_remap_index },
- { 27427, BindFragmentShaderATI_remap_index },
- { 20819, ColorFragmentOp1ATI_remap_index },
+ { 21645, AlphaFragmentOp3ATI_remap_index },
+ { 26285, BeginFragmentShaderATI_remap_index },
+ { 27502, BindFragmentShaderATI_remap_index },
+ { 20862, ColorFragmentOp1ATI_remap_index },
{ 3823, ColorFragmentOp2ATI_remap_index },
- { 27768, ColorFragmentOp3ATI_remap_index },
+ { 27804, ColorFragmentOp3ATI_remap_index },
{ 4722, DeleteFragmentShaderATI_remap_index },
- { 29398, EndFragmentShaderATI_remap_index },
- { 28644, GenFragmentShadersATI_remap_index },
- { 22352, PassTexCoordATI_remap_index },
+ { 29434, EndFragmentShaderATI_remap_index },
+ { 28680, GenFragmentShadersATI_remap_index },
+ { 22395, PassTexCoordATI_remap_index },
{ 5965, SampleMapATI_remap_index },
{ 5738, SetFragmentShaderConstantATI_remap_index },
{ 319, PointParameteriNV_remap_index },
- { 12389, PointParameterivNV_remap_index },
- { 25221, ActiveStencilFaceEXT_remap_index },
- { 24062, BindVertexArrayAPPLE_remap_index },
+ { 12432, PointParameterivNV_remap_index },
+ { 25296, ActiveStencilFaceEXT_remap_index },
+ { 24137, BindVertexArrayAPPLE_remap_index },
{ 2522, DeleteVertexArraysAPPLE_remap_index },
- { 15701, GenVertexArraysAPPLE_remap_index },
- { 20494, IsVertexArrayAPPLE_remap_index },
+ { 15744, GenVertexArraysAPPLE_remap_index },
+ { 20537, IsVertexArrayAPPLE_remap_index },
{ 775, GetProgramNamedParameterdvNV_remap_index },
{ 3128, GetProgramNamedParameterfvNV_remap_index },
- { 23571, ProgramNamedParameter4dNV_remap_index },
- { 12664, ProgramNamedParameter4dvNV_remap_index },
+ { 23646, ProgramNamedParameter4dNV_remap_index },
+ { 12707, ProgramNamedParameter4dvNV_remap_index },
{ 7862, ProgramNamedParameter4fNV_remap_index },
{ 10311, ProgramNamedParameter4fvNV_remap_index },
- { 21324, DepthBoundsEXT_remap_index },
+ { 21367, DepthBoundsEXT_remap_index },
{ 1043, BlendEquationSeparateEXT_remap_index },
- { 12783, BindFramebufferEXT_remap_index },
- { 22539, BindRenderbufferEXT_remap_index },
+ { 12826, BindFramebufferEXT_remap_index },
+ { 22582, BindRenderbufferEXT_remap_index },
{ 8515, CheckFramebufferStatusEXT_remap_index },
- { 19810, DeleteFramebuffersEXT_remap_index },
- { 28025, DeleteRenderbuffersEXT_remap_index },
- { 11756, FramebufferRenderbufferEXT_remap_index },
- { 11893, FramebufferTexture1DEXT_remap_index },
+ { 19853, DeleteFramebuffersEXT_remap_index },
+ { 28061, DeleteRenderbuffersEXT_remap_index },
+ { 11831, FramebufferRenderbufferEXT_remap_index },
+ { 11968, FramebufferTexture1DEXT_remap_index },
{ 10139, FramebufferTexture2DEXT_remap_index },
{ 9806, FramebufferTexture3DEXT_remap_index },
- { 20386, GenFramebuffersEXT_remap_index },
- { 15248, GenRenderbuffersEXT_remap_index },
+ { 20429, GenFramebuffersEXT_remap_index },
+ { 15291, GenRenderbuffersEXT_remap_index },
{ 5684, GenerateMipmapEXT_remap_index },
- { 19041, GetFramebufferAttachmentParameterivEXT_remap_index },
- { 28550, GetRenderbufferParameterivEXT_remap_index },
- { 17881, IsFramebufferEXT_remap_index },
- { 29297, IsRenderbufferEXT_remap_index },
+ { 19084, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 28586, GetRenderbufferParameterivEXT_remap_index },
+ { 17924, IsFramebufferEXT_remap_index },
+ { 29333, IsRenderbufferEXT_remap_index },
{ 7173, RenderbufferStorageEXT_remap_index },
{ 651, BlitFramebufferEXT_remap_index },
- { 12483, BufferParameteriAPPLE_remap_index },
- { 16778, FlushMappedBufferRangeAPPLE_remap_index },
+ { 12526, BufferParameteriAPPLE_remap_index },
+ { 16821, FlushMappedBufferRangeAPPLE_remap_index },
{ 2701, FramebufferTextureLayerEXT_remap_index },
- { 25932, ProvokingVertexEXT_remap_index },
+ { 26007, ProvokingVertexEXT_remap_index },
{ 9461, GetTexParameterPointervAPPLE_remap_index },
{ 4405, TextureRangeAPPLE_remap_index },
- { 25247, StencilFuncSeparateATI_remap_index },
- { 15768, ProgramEnvParameters4fvEXT_remap_index },
- { 14986, ProgramLocalParameters4fvEXT_remap_index },
- { 12317, GetQueryObjecti64vEXT_remap_index },
+ { 25322, StencilFuncSeparateATI_remap_index },
+ { 15811, ProgramEnvParameters4fvEXT_remap_index },
+ { 15029, ProgramLocalParameters4fvEXT_remap_index },
+ { 12360, GetQueryObjecti64vEXT_remap_index },
{ 9103, GetQueryObjectui64vEXT_remap_index },
{ -1, -1 }
};
@@ -4729,8 +4730,8 @@ static const struct gl_function_remap MESA_alt_functions[] = {
/* from GL_EXT_blend_minmax */
{ 9863, _gloffset_BlendEquation },
/* from GL_EXT_color_subtable */
- { 14884, _gloffset_ColorSubTable },
- { 27957, _gloffset_CopyColorSubTable },
+ { 14927, _gloffset_ColorSubTable },
+ { 27993, _gloffset_CopyColorSubTable },
/* from GL_EXT_convolution */
{ 213, _gloffset_ConvolutionFilter1D },
{ 2284, _gloffset_CopyConvolutionFilter1D },
@@ -4738,62 +4739,62 @@ static const struct gl_function_remap MESA_alt_functions[] = {
{ 7522, _gloffset_ConvolutionFilter2D },
{ 7688, _gloffset_ConvolutionParameteriv },
{ 8148, _gloffset_ConvolutionParameterfv },
- { 18029, _gloffset_GetSeparableFilter },
- { 21075, _gloffset_SeparableFilter2D },
- { 21904, _gloffset_ConvolutionParameteri },
- { 22027, _gloffset_ConvolutionParameterf },
- { 23406, _gloffset_GetConvolutionParameterfv },
- { 24228, _gloffset_GetConvolutionFilter },
- { 26472, _gloffset_CopyConvolutionFilter2D },
+ { 18072, _gloffset_GetSeparableFilter },
+ { 21118, _gloffset_SeparableFilter2D },
+ { 21947, _gloffset_ConvolutionParameteri },
+ { 22070, _gloffset_ConvolutionParameterf },
+ { 23449, _gloffset_GetConvolutionParameterfv },
+ { 24303, _gloffset_GetConvolutionFilter },
+ { 26547, _gloffset_CopyConvolutionFilter2D },
/* from GL_EXT_copy_texture */
- { 13142, _gloffset_CopyTexSubImage3D },
- { 14624, _gloffset_CopyTexImage2D },
- { 21512, _gloffset_CopyTexImage1D },
- { 23909, _gloffset_CopyTexSubImage2D },
- { 26110, _gloffset_CopyTexSubImage1D },
+ { 13185, _gloffset_CopyTexSubImage3D },
+ { 14667, _gloffset_CopyTexImage2D },
+ { 21555, _gloffset_CopyTexImage1D },
+ { 23984, _gloffset_CopyTexSubImage2D },
+ { 26185, _gloffset_CopyTexSubImage1D },
/* from GL_EXT_draw_range_elements */
{ 8402, _gloffset_DrawRangeElements },
/* from GL_EXT_histogram */
{ 812, _gloffset_Histogram },
{ 3088, _gloffset_ResetHistogram },
{ 8774, _gloffset_GetMinmax },
- { 13476, _gloffset_GetHistogramParameterfv },
- { 21437, _gloffset_GetMinmaxParameteriv },
- { 23296, _gloffset_ResetMinmax },
- { 24125, _gloffset_GetHistogramParameteriv },
- { 25181, _gloffset_GetHistogram },
- { 27543, _gloffset_Minmax },
- { 29044, _gloffset_GetMinmaxParameterfv },
+ { 13519, _gloffset_GetHistogramParameterfv },
+ { 21480, _gloffset_GetMinmaxParameteriv },
+ { 23339, _gloffset_ResetMinmax },
+ { 24200, _gloffset_GetHistogramParameteriv },
+ { 25256, _gloffset_GetHistogram },
+ { 27618, _gloffset_Minmax },
+ { 29080, _gloffset_GetMinmaxParameterfv },
/* from GL_EXT_paletted_texture */
{ 7384, _gloffset_ColorTable },
- { 13322, _gloffset_GetColorTable },
- { 20133, _gloffset_GetColorTableParameterfv },
- { 22083, _gloffset_GetColorTableParameteriv },
+ { 13365, _gloffset_GetColorTable },
+ { 20176, _gloffset_GetColorTableParameterfv },
+ { 22126, _gloffset_GetColorTableParameteriv },
/* from GL_EXT_subtexture */
{ 6105, _gloffset_TexSubImage1D },
{ 9388, _gloffset_TexSubImage2D },
/* from GL_EXT_texture3D */
{ 1658, _gloffset_TexImage3D },
- { 19902, _gloffset_TexSubImage3D },
+ { 19945, _gloffset_TexSubImage3D },
/* from GL_EXT_texture_object */
{ 2964, _gloffset_PrioritizeTextures },
{ 6554, _gloffset_AreTexturesResident },
- { 11841, _gloffset_GenTextures },
- { 13808, _gloffset_DeleteTextures },
- { 17059, _gloffset_IsTexture },
- { 26175, _gloffset_BindTexture },
+ { 11916, _gloffset_GenTextures },
+ { 13851, _gloffset_DeleteTextures },
+ { 17102, _gloffset_IsTexture },
+ { 26250, _gloffset_BindTexture },
/* from GL_EXT_vertex_array */
- { 21264, _gloffset_ArrayElement },
- { 27131, _gloffset_GetPointerv },
- { 28671, _gloffset_DrawArrays },
+ { 21307, _gloffset_ArrayElement },
+ { 27206, _gloffset_GetPointerv },
+ { 28707, _gloffset_DrawArrays },
/* from GL_SGI_color_table */
{ 6672, _gloffset_ColorTableParameteriv },
{ 7384, _gloffset_ColorTable },
- { 13322, _gloffset_GetColorTable },
- { 13432, _gloffset_CopyColorTable },
- { 16920, _gloffset_ColorTableParameterfv },
- { 20133, _gloffset_GetColorTableParameterfv },
- { 22083, _gloffset_GetColorTableParameteriv },
+ { 13365, _gloffset_GetColorTable },
+ { 13475, _gloffset_CopyColorTable },
+ { 16963, _gloffset_ColorTableParameterfv },
+ { 20176, _gloffset_GetColorTableParameterfv },
+ { 22126, _gloffset_GetColorTableParameteriv },
/* from GL_VERSION_1_3 */
{ 381, _gloffset_MultiTexCoord3sARB },
{ 613, _gloffset_ActiveTextureARB },
@@ -4806,29 +4807,29 @@ static const struct gl_function_remap MESA_alt_functions[] = {
{ 9625, _gloffset_MultiTexCoord4sARB },
{ 10225, _gloffset_MultiTexCoord2dvARB },
{ 10607, _gloffset_MultiTexCoord1svARB },
- { 10864, _gloffset_MultiTexCoord3svARB },
- { 10925, _gloffset_MultiTexCoord4iARB },
- { 11612, _gloffset_MultiTexCoord3iARB },
- { 12346, _gloffset_MultiTexCoord1dARB },
- { 12512, _gloffset_MultiTexCoord3dvARB },
- { 13676, _gloffset_MultiTexCoord3ivARB },
- { 13721, _gloffset_MultiTexCoord2sARB },
- { 14941, _gloffset_MultiTexCoord4ivARB },
- { 16570, _gloffset_ClientActiveTextureARB },
- { 18786, _gloffset_MultiTexCoord2dARB },
- { 19161, _gloffset_MultiTexCoord4dvARB },
- { 19447, _gloffset_MultiTexCoord4fvARB },
- { 20274, _gloffset_MultiTexCoord3fARB },
- { 22584, _gloffset_MultiTexCoord4dARB },
- { 22788, _gloffset_MultiTexCoord1sARB },
- { 22966, _gloffset_MultiTexCoord1dvARB },
- { 23753, _gloffset_MultiTexCoord1ivARB },
- { 23846, _gloffset_MultiTexCoord2ivARB },
- { 24185, _gloffset_MultiTexCoord1iARB },
- { 25456, _gloffset_MultiTexCoord4svARB },
- { 25974, _gloffset_MultiTexCoord1fARB },
- { 26237, _gloffset_MultiTexCoord4fARB },
- { 28505, _gloffset_MultiTexCoord2fvARB },
+ { 10903, _gloffset_MultiTexCoord3svARB },
+ { 10964, _gloffset_MultiTexCoord4iARB },
+ { 11687, _gloffset_MultiTexCoord3iARB },
+ { 12389, _gloffset_MultiTexCoord1dARB },
+ { 12555, _gloffset_MultiTexCoord3dvARB },
+ { 13719, _gloffset_MultiTexCoord3ivARB },
+ { 13764, _gloffset_MultiTexCoord2sARB },
+ { 14984, _gloffset_MultiTexCoord4ivARB },
+ { 16613, _gloffset_ClientActiveTextureARB },
+ { 18829, _gloffset_MultiTexCoord2dARB },
+ { 19204, _gloffset_MultiTexCoord4dvARB },
+ { 19490, _gloffset_MultiTexCoord4fvARB },
+ { 20317, _gloffset_MultiTexCoord3fARB },
+ { 22627, _gloffset_MultiTexCoord4dARB },
+ { 22831, _gloffset_MultiTexCoord1sARB },
+ { 23009, _gloffset_MultiTexCoord1dvARB },
+ { 23828, _gloffset_MultiTexCoord1ivARB },
+ { 23921, _gloffset_MultiTexCoord2ivARB },
+ { 24260, _gloffset_MultiTexCoord1iARB },
+ { 25531, _gloffset_MultiTexCoord4svARB },
+ { 26049, _gloffset_MultiTexCoord1fARB },
+ { 26312, _gloffset_MultiTexCoord4fARB },
+ { 28541, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
@@ -4900,10 +4901,10 @@ static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = {
#if defined(need_GL_ARB_matrix_palette)
static const struct gl_function_remap GL_ARB_matrix_palette_functions[] = {
{ 3339, -1 }, /* MatrixIndexusvARB */
- { 11469, -1 }, /* MatrixIndexuivARB */
- { 12634, -1 }, /* MatrixIndexPointerARB */
- { 17308, -1 }, /* CurrentPaletteMatrixARB */
- { 20018, -1 }, /* MatrixIndexubvARB */
+ { 11508, -1 }, /* MatrixIndexuivARB */
+ { 12677, -1 }, /* MatrixIndexPointerARB */
+ { 17351, -1 }, /* CurrentPaletteMatrixARB */
+ { 20061, -1 }, /* MatrixIndexubvARB */
{ -1, -1 }
};
#endif
@@ -4976,13 +4977,13 @@ static const struct gl_function_remap GL_ARB_vertex_blend_functions[] = {
{ 2226, -1 }, /* WeightubvARB */
{ 5572, -1 }, /* WeightivARB */
{ 9728, -1 }, /* WeightPointerARB */
- { 12103, -1 }, /* WeightfvARB */
- { 15388, -1 }, /* WeightbvARB */
- { 18454, -1 }, /* WeightusvARB */
- { 21001, -1 }, /* VertexBlendARB */
- { 26058, -1 }, /* WeightsvARB */
- { 28007, -1 }, /* WeightdvARB */
- { 28705, -1 }, /* WeightuivARB */
+ { 12146, -1 }, /* WeightfvARB */
+ { 15431, -1 }, /* WeightbvARB */
+ { 18497, -1 }, /* WeightusvARB */
+ { 21044, -1 }, /* VertexBlendARB */
+ { 26133, -1 }, /* WeightsvARB */
+ { 28043, -1 }, /* WeightdvARB */
+ { 28741, -1 }, /* WeightuivARB */
{ -1, -1 }
};
#endif
@@ -5080,8 +5081,8 @@ static const struct gl_function_remap GL_EXT_blend_minmax_functions[] = {
#if defined(need_GL_EXT_color_subtable)
static const struct gl_function_remap GL_EXT_color_subtable_functions[] = {
- { 14884, _gloffset_ColorSubTable },
- { 27957, _gloffset_CopyColorSubTable },
+ { 14927, _gloffset_ColorSubTable },
+ { 27993, _gloffset_CopyColorSubTable },
{ -1, -1 }
};
#endif
@@ -5101,13 +5102,13 @@ static const struct gl_function_remap GL_EXT_convolution_functions[] = {
{ 7522, _gloffset_ConvolutionFilter2D },
{ 7688, _gloffset_ConvolutionParameteriv },
{ 8148, _gloffset_ConvolutionParameterfv },
- { 18029, _gloffset_GetSeparableFilter },
- { 21075, _gloffset_SeparableFilter2D },
- { 21904, _gloffset_ConvolutionParameteri },
- { 22027, _gloffset_ConvolutionParameterf },
- { 23406, _gloffset_GetConvolutionParameterfv },
- { 24228, _gloffset_GetConvolutionFilter },
- { 26472, _gloffset_CopyConvolutionFilter2D },
+ { 18072, _gloffset_GetSeparableFilter },
+ { 21118, _gloffset_SeparableFilter2D },
+ { 21947, _gloffset_ConvolutionParameteri },
+ { 22070, _gloffset_ConvolutionParameterf },
+ { 23449, _gloffset_GetConvolutionParameterfv },
+ { 24303, _gloffset_GetConvolutionFilter },
+ { 26547, _gloffset_CopyConvolutionFilter2D },
{ -1, -1 }
};
#endif
@@ -5115,38 +5116,38 @@ static const struct gl_function_remap GL_EXT_convolution_functions[] = {
#if defined(need_GL_EXT_coordinate_frame)
static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = {
{ 9272, -1 }, /* TangentPointerEXT */
- { 10983, -1 }, /* Binormal3ivEXT */
- { 11565, -1 }, /* Tangent3sEXT */
- { 12699, -1 }, /* Tangent3fvEXT */
- { 16320, -1 }, /* Tangent3dvEXT */
- { 17006, -1 }, /* Binormal3bvEXT */
- { 18082, -1 }, /* Binormal3dEXT */
- { 19950, -1 }, /* Tangent3fEXT */
- { 21976, -1 }, /* Binormal3sEXT */
- { 22394, -1 }, /* Tangent3ivEXT */
- { 22413, -1 }, /* Tangent3dEXT */
- { 23193, -1 }, /* Binormal3svEXT */
- { 23651, -1 }, /* Binormal3fEXT */
- { 24503, -1 }, /* Binormal3dvEXT */
- { 25678, -1 }, /* Tangent3iEXT */
- { 26757, -1 }, /* Tangent3bvEXT */
- { 27166, -1 }, /* Tangent3bEXT */
- { 27730, -1 }, /* Binormal3fvEXT */
- { 28404, -1 }, /* BinormalPointerEXT */
- { 28809, -1 }, /* Tangent3svEXT */
- { 29246, -1 }, /* Binormal3bEXT */
- { 29423, -1 }, /* Binormal3iEXT */
+ { 11022, -1 }, /* Binormal3ivEXT */
+ { 11640, -1 }, /* Tangent3sEXT */
+ { 12742, -1 }, /* Tangent3fvEXT */
+ { 16363, -1 }, /* Tangent3dvEXT */
+ { 17049, -1 }, /* Binormal3bvEXT */
+ { 18125, -1 }, /* Binormal3dEXT */
+ { 19993, -1 }, /* Tangent3fEXT */
+ { 22019, -1 }, /* Binormal3sEXT */
+ { 22437, -1 }, /* Tangent3ivEXT */
+ { 22456, -1 }, /* Tangent3dEXT */
+ { 23236, -1 }, /* Binormal3svEXT */
+ { 23726, -1 }, /* Binormal3fEXT */
+ { 24578, -1 }, /* Binormal3dvEXT */
+ { 25753, -1 }, /* Tangent3iEXT */
+ { 26832, -1 }, /* Tangent3bvEXT */
+ { 27241, -1 }, /* Tangent3bEXT */
+ { 27766, -1 }, /* Binormal3fvEXT */
+ { 28440, -1 }, /* BinormalPointerEXT */
+ { 28845, -1 }, /* Tangent3svEXT */
+ { 29282, -1 }, /* Binormal3bEXT */
+ { 29459, -1 }, /* Binormal3iEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_copy_texture)
static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
- { 13142, _gloffset_CopyTexSubImage3D },
- { 14624, _gloffset_CopyTexImage2D },
- { 21512, _gloffset_CopyTexImage1D },
- { 23909, _gloffset_CopyTexSubImage2D },
- { 26110, _gloffset_CopyTexSubImage1D },
+ { 13185, _gloffset_CopyTexSubImage3D },
+ { 14667, _gloffset_CopyTexImage2D },
+ { 21555, _gloffset_CopyTexImage1D },
+ { 23984, _gloffset_CopyTexSubImage2D },
+ { 26185, _gloffset_CopyTexSubImage1D },
{ -1, -1 }
};
#endif
@@ -5186,6 +5187,13 @@ static const struct gl_function_remap GL_EXT_framebuffer_blit_functions[] = {
};
#endif
+#if defined(need_GL_EXT_framebuffer_multisample)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_framebuffer_multisample_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_EXT_framebuffer_object)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_EXT_framebuffer_object_functions[] = {
@@ -5205,13 +5213,13 @@ static const struct gl_function_remap GL_EXT_histogram_functions[] = {
{ 812, _gloffset_Histogram },
{ 3088, _gloffset_ResetHistogram },
{ 8774, _gloffset_GetMinmax },
- { 13476, _gloffset_GetHistogramParameterfv },
- { 21437, _gloffset_GetMinmaxParameteriv },
- { 23296, _gloffset_ResetMinmax },
- { 24125, _gloffset_GetHistogramParameteriv },
- { 25181, _gloffset_GetHistogram },
- { 27543, _gloffset_Minmax },
- { 29044, _gloffset_GetMinmaxParameterfv },
+ { 13519, _gloffset_GetHistogramParameterfv },
+ { 21480, _gloffset_GetMinmaxParameteriv },
+ { 23339, _gloffset_ResetMinmax },
+ { 24200, _gloffset_GetHistogramParameteriv },
+ { 25256, _gloffset_GetHistogram },
+ { 27618, _gloffset_Minmax },
+ { 29080, _gloffset_GetMinmaxParameterfv },
{ -1, -1 }
};
#endif
@@ -5225,16 +5233,16 @@ static const struct gl_function_remap GL_EXT_index_func_functions[] = {
#if defined(need_GL_EXT_index_material)
static const struct gl_function_remap GL_EXT_index_material_functions[] = {
- { 18541, -1 }, /* IndexMaterialEXT */
+ { 18584, -1 }, /* IndexMaterialEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_light_texture)
static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
- { 23213, -1 }, /* ApplyTextureEXT */
- { 23250, -1 }, /* TextureMaterialEXT */
- { 23275, -1 }, /* TextureLightEXT */
+ { 23256, -1 }, /* ApplyTextureEXT */
+ { 23293, -1 }, /* TextureMaterialEXT */
+ { 23318, -1 }, /* TextureLightEXT */
{ -1, -1 }
};
#endif
@@ -5256,9 +5264,9 @@ 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[] = {
{ 7384, _gloffset_ColorTable },
- { 13322, _gloffset_GetColorTable },
- { 20133, _gloffset_GetColorTableParameterfv },
- { 22083, _gloffset_GetColorTableParameteriv },
+ { 13365, _gloffset_GetColorTable },
+ { 20176, _gloffset_GetColorTableParameterfv },
+ { 22126, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
@@ -5266,9 +5274,9 @@ static const struct gl_function_remap GL_EXT_paletted_texture_functions[] = {
#if defined(need_GL_EXT_pixel_transform)
static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = {
{ 9513, -1 }, /* PixelTransformParameterfvEXT */
- { 19126, -1 }, /* PixelTransformParameterfEXT */
- { 19206, -1 }, /* PixelTransformParameteriEXT */
- { 28368, -1 }, /* PixelTransformParameterivEXT */
+ { 19169, -1 }, /* PixelTransformParameterfEXT */
+ { 19249, -1 }, /* PixelTransformParameteriEXT */
+ { 28404, -1 }, /* PixelTransformParameterivEXT */
{ -1, -1 }
};
#endif
@@ -5319,7 +5327,7 @@ static const struct gl_function_remap GL_EXT_subtexture_functions[] = {
#if defined(need_GL_EXT_texture3D)
static const struct gl_function_remap GL_EXT_texture3D_functions[] = {
{ 1658, _gloffset_TexImage3D },
- { 19902, _gloffset_TexSubImage3D },
+ { 19945, _gloffset_TexSubImage3D },
{ -1, -1 }
};
#endif
@@ -5335,17 +5343,17 @@ static const struct gl_function_remap GL_EXT_texture_array_functions[] = {
static const struct gl_function_remap GL_EXT_texture_object_functions[] = {
{ 2964, _gloffset_PrioritizeTextures },
{ 6554, _gloffset_AreTexturesResident },
- { 11841, _gloffset_GenTextures },
- { 13808, _gloffset_DeleteTextures },
- { 17059, _gloffset_IsTexture },
- { 26175, _gloffset_BindTexture },
+ { 11916, _gloffset_GenTextures },
+ { 13851, _gloffset_DeleteTextures },
+ { 17102, _gloffset_IsTexture },
+ { 26250, _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[] = {
- { 12053, -1 }, /* TextureNormalEXT */
+ { 12096, -1 }, /* TextureNormalEXT */
{ -1, -1 }
};
#endif
@@ -5360,18 +5368,18 @@ static const struct gl_function_remap GL_EXT_timer_query_functions[] = {
#if defined(need_GL_EXT_vertex_array)
/* functions defined in MESA_remap_table_functions are excluded */
static const struct gl_function_remap GL_EXT_vertex_array_functions[] = {
- { 21264, _gloffset_ArrayElement },
- { 27131, _gloffset_GetPointerv },
- { 28671, _gloffset_DrawArrays },
+ { 21307, _gloffset_ArrayElement },
+ { 27206, _gloffset_GetPointerv },
+ { 28707, _gloffset_DrawArrays },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_vertex_weighting)
static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
- { 17089, -1 }, /* VertexWeightfvEXT */
- { 23629, -1 }, /* VertexWeightfEXT */
- { 25150, -1 }, /* VertexWeightPointerEXT */
+ { 17132, -1 }, /* VertexWeightfvEXT */
+ { 23704, -1 }, /* VertexWeightfEXT */
+ { 25225, -1 }, /* VertexWeightPointerEXT */
{ -1, -1 }
};
#endif
@@ -5382,8 +5390,8 @@ static const struct gl_function_remap GL_HP_image_transform_functions[] = {
{ 3305, -1 }, /* ImageTransformParameterfHP */
{ 8966, -1 }, /* ImageTransformParameterfvHP */
{ 10525, -1 }, /* ImageTransformParameteriHP */
- { 10754, -1 }, /* GetImageTransformParameterivHP */
- { 17153, -1 }, /* ImageTransformParameterivHP */
+ { 10793, -1 }, /* GetImageTransformParameterivHP */
+ { 17196, -1 }, /* ImageTransformParameterivHP */
{ -1, -1 }
};
#endif
@@ -5402,9 +5410,9 @@ static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = {
{ 6728, -1 }, /* FogCoordPointerListIBM */
{ 7035, -1 }, /* VertexPointerListIBM */
{ 10446, -1 }, /* ColorPointerListIBM */
- { 11672, -1 }, /* TexCoordPointerListIBM */
- { 12075, -1 }, /* IndexPointerListIBM */
- { 28987, -1 }, /* EdgeFlagPointerListIBM */
+ { 11747, -1 }, /* TexCoordPointerListIBM */
+ { 12118, -1 }, /* IndexPointerListIBM */
+ { 29023, -1 }, /* EdgeFlagPointerListIBM */
{ -1, -1 }
};
#endif
@@ -5418,10 +5426,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[] = {
- { 11095, -1 }, /* VertexPointervINTEL */
- { 13569, -1 }, /* ColorPointervINTEL */
- { 26446, -1 }, /* NormalPointervINTEL */
- { 26872, -1 }, /* TexCoordPointervINTEL */
+ { 11134, -1 }, /* VertexPointervINTEL */
+ { 13612, -1 }, /* ColorPointervINTEL */
+ { 26521, -1 }, /* NormalPointervINTEL */
+ { 26947, -1 }, /* TexCoordPointervINTEL */
{ -1, -1 }
};
#endif
@@ -5438,7 +5446,7 @@ static const struct gl_function_remap GL_MESA_shader_debug_functions[] = {
{ 1522, -1 }, /* GetDebugLogLengthMESA */
{ 3063, -1 }, /* ClearDebugLogMESA */
{ 4018, -1 }, /* GetDebugLogMESA */
- { 27324, -1 }, /* CreateDebugObjectMESA */
+ { 27399, -1 }, /* CreateDebugObjectMESA */
{ -1, -1 }
};
#endif
@@ -5456,11 +5464,11 @@ static const struct gl_function_remap GL_NV_evaluators_functions[] = {
{ 7490, -1 }, /* MapControlPointsNV */
{ 7589, -1 }, /* MapParameterfvNV */
{ 9371, -1 }, /* EvalMapsNV */
- { 15058, -1 }, /* GetMapAttribParameterfvNV */
- { 15224, -1 }, /* MapParameterivNV */
- { 21827, -1 }, /* GetMapParameterivNV */
- { 22325, -1 }, /* GetMapParameterfvNV */
- { 25782, -1 }, /* GetMapControlPointsNV */
+ { 15101, -1 }, /* GetMapAttribParameterfvNV */
+ { 15267, -1 }, /* MapParameterivNV */
+ { 21870, -1 }, /* GetMapParameterivNV */
+ { 22368, -1 }, /* GetMapParameterfvNV */
+ { 25857, -1 }, /* GetMapControlPointsNV */
{ -1, -1 }
};
#endif
@@ -5495,8 +5503,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[] = {
- { 13961, -1 }, /* CombinerStageParameterfvNV */
- { 14276, -1 }, /* GetCombinerStageParameterfvNV */
+ { 14004, -1 }, /* CombinerStageParameterfvNV */
+ { 14319, -1 }, /* GetCombinerStageParameterfvNV */
{ -1, -1 }
};
#endif
@@ -5524,16 +5532,16 @@ static const struct gl_function_remap GL_PGI_misc_hints_functions[] = {
#if defined(need_GL_SGIS_detail_texture)
static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = {
- { 14249, -1 }, /* GetDetailTexFuncSGIS */
- { 14569, -1 }, /* DetailTexFuncSGIS */
+ { 14292, -1 }, /* GetDetailTexFuncSGIS */
+ { 14612, -1 }, /* DetailTexFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_fog_function)
static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
- { 23891, -1 }, /* FogFuncSGIS */
- { 24556, -1 }, /* GetFogFuncSGIS */
+ { 23966, -1 }, /* FogFuncSGIS */
+ { 24631, -1 }, /* GetFogFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5562,7 +5570,7 @@ 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[] = {
{ 5834, -1 }, /* GetSharpenTexFuncSGIS */
- { 19421, -1 }, /* SharpenTexFuncSGIS */
+ { 19464, -1 }, /* SharpenTexFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5570,14 +5578,14 @@ static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
#if defined(need_GL_SGIS_texture4D)
static const struct gl_function_remap GL_SGIS_texture4D_functions[] = {
{ 894, -1 }, /* TexImage4DSGIS */
- { 13877, -1 }, /* TexSubImage4DSGIS */
+ { 13920, -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[] = {
- { 13275, -1 }, /* TextureColorMaskSGIS */
+ { 13318, -1 }, /* TextureColorMaskSGIS */
{ -1, -1 }
};
#endif
@@ -5585,7 +5593,7 @@ static const struct gl_function_remap GL_SGIS_texture_color_mask_functions[] = {
#if defined(need_GL_SGIS_texture_filter4)
static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
{ 6011, -1 }, /* GetTexFilterFuncSGIS */
- { 14395, -1 }, /* TexFilterFuncSGIS */
+ { 14438, -1 }, /* TexFilterFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5595,9 +5603,9 @@ static const struct gl_function_remap GL_SGIX_async_functions[] = {
{ 3014, -1 }, /* AsyncMarkerSGIX */
{ 3997, -1 }, /* FinishAsyncSGIX */
{ 4703, -1 }, /* PollAsyncSGIX */
- { 19568, -1 }, /* DeleteAsyncMarkersSGIX */
- { 19597, -1 }, /* IsAsyncMarkerSGIX */
- { 28784, -1 }, /* GenAsyncMarkersSGIX */
+ { 19611, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 19640, -1 }, /* IsAsyncMarkerSGIX */
+ { 28820, -1 }, /* GenAsyncMarkersSGIX */
{ -1, -1 }
};
#endif
@@ -5620,29 +5628,29 @@ static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = {
{ 8100, -1 }, /* FragmentLightModeliSGIX */
{ 9434, -1 }, /* FragmentLightivSGIX */
{ 9671, -1 }, /* GetFragmentMaterialivSGIX */
- { 16976, -1 }, /* FragmentLightModelfSGIX */
- { 17276, -1 }, /* FragmentColorMaterialSGIX */
- { 17648, -1 }, /* FragmentMaterialiSGIX */
- { 18869, -1 }, /* LightEnviSGIX */
- { 20225, -1 }, /* FragmentLightModelfvSGIX */
- { 20534, -1 }, /* FragmentLightfvSGIX */
- { 25032, -1 }, /* FragmentLightfSGIX */
- { 27700, -1 }, /* GetFragmentLightfvSGIX */
- { 29267, -1 }, /* FragmentMaterialivSGIX */
+ { 17019, -1 }, /* FragmentLightModelfSGIX */
+ { 17319, -1 }, /* FragmentColorMaterialSGIX */
+ { 17691, -1 }, /* FragmentMaterialiSGIX */
+ { 18912, -1 }, /* LightEnviSGIX */
+ { 20268, -1 }, /* FragmentLightModelfvSGIX */
+ { 20577, -1 }, /* FragmentLightfvSGIX */
+ { 25107, -1 }, /* FragmentLightfSGIX */
+ { 27736, -1 }, /* GetFragmentLightfvSGIX */
+ { 29303, -1 }, /* FragmentMaterialivSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_framezoom)
static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
- { 19620, -1 }, /* FrameZoomSGIX */
+ { 19663, -1 }, /* FrameZoomSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_igloo_interface)
static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
- { 25340, -1 }, /* IglooInterfaceSGIX */
+ { 25415, -1 }, /* IglooInterfaceSGIX */
{ -1, -1 }
};
#endif
@@ -5652,9 +5660,9 @@ static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
{ 2573, -1 }, /* ReadInstrumentsSGIX */
{ 5590, -1 }, /* PollInstrumentsSGIX */
{ 9332, -1 }, /* GetInstrumentsSGIX */
- { 11306, -1 }, /* StartInstrumentsSGIX */
- { 13995, -1 }, /* StopInstrumentsSGIX */
- { 15601, -1 }, /* InstrumentsBufferSGIX */
+ { 11345, -1 }, /* StartInstrumentsSGIX */
+ { 14038, -1 }, /* StopInstrumentsSGIX */
+ { 15644, -1 }, /* InstrumentsBufferSGIX */
{ -1, -1 }
};
#endif
@@ -5663,10 +5671,10 @@ static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
static const struct gl_function_remap GL_SGIX_list_priority_functions[] = {
{ 1125, -1 }, /* ListParameterfSGIX */
{ 2763, -1 }, /* GetListParameterfvSGIX */
- { 15516, -1 }, /* ListParameteriSGIX */
- { 16270, -1 }, /* ListParameterfvSGIX */
- { 18275, -1 }, /* ListParameterivSGIX */
- { 28828, -1 }, /* GetListParameterivSGIX */
+ { 15559, -1 }, /* ListParameteriSGIX */
+ { 16313, -1 }, /* ListParameterfvSGIX */
+ { 18318, -1 }, /* ListParameterivSGIX */
+ { 28864, -1 }, /* GetListParameterivSGIX */
{ -1, -1 }
};
#endif
@@ -5681,16 +5689,16 @@ 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 */
- { 14095, -1 }, /* DeformSGIX */
- { 21376, -1 }, /* DeformationMap3fSGIX */
- { 27588, -1 }, /* DeformationMap3dSGIX */
+ { 10713, -1 }, /* DeformationMap3dSGIX */
+ { 14138, -1 }, /* DeformSGIX */
+ { 21419, -1 }, /* DeformationMap3fSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_reference_plane)
static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
- { 12826, -1 }, /* ReferencePlaneSGIX */
+ { 12869, -1 }, /* ReferencePlaneSGIX */
{ -1, -1 }
};
#endif
@@ -5698,16 +5706,16 @@ static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
#if defined(need_GL_SGIX_sprite)
static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
{ 8487, -1 }, /* SpriteParameterfvSGIX */
- { 18103, -1 }, /* SpriteParameteriSGIX */
- { 23330, -1 }, /* SpriteParameterfSGIX */
- { 25904, -1 }, /* SpriteParameterivSGIX */
+ { 18146, -1 }, /* SpriteParameteriSGIX */
+ { 23373, -1 }, /* SpriteParameterfSGIX */
+ { 25979, -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[] = {
- { 18162, -1 }, /* TagSampleBufferSGIX */
+ { 18205, -1 }, /* TagSampleBufferSGIX */
{ -1, -1 }
};
#endif
@@ -5716,18 +5724,18 @@ static const struct gl_function_remap GL_SGIX_tag_sample_buffer_functions[] = {
static const struct gl_function_remap GL_SGI_color_table_functions[] = {
{ 6672, _gloffset_ColorTableParameteriv },
{ 7384, _gloffset_ColorTable },
- { 13322, _gloffset_GetColorTable },
- { 13432, _gloffset_CopyColorTable },
- { 16920, _gloffset_ColorTableParameterfv },
- { 20133, _gloffset_GetColorTableParameterfv },
- { 22083, _gloffset_GetColorTableParameteriv },
+ { 13365, _gloffset_GetColorTable },
+ { 13475, _gloffset_CopyColorTable },
+ { 16963, _gloffset_ColorTableParameterfv },
+ { 20176, _gloffset_GetColorTableParameterfv },
+ { 22126, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_SUNX_constant_data)
static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
- { 27678, -1 }, /* FinishTextureSUNX */
+ { 27714, -1 }, /* FinishTextureSUNX */
{ -1, -1 }
};
#endif
@@ -5739,16 +5747,16 @@ static const struct gl_function_remap GL_SUN_global_alpha_functions[] = {
{ 5615, -1 }, /* GlobalAlphaFactordSUN */
{ 8571, -1 }, /* GlobalAlphaFactoruiSUN */
{ 8923, -1 }, /* GlobalAlphaFactorbSUN */
- { 11585, -1 }, /* GlobalAlphaFactorfSUN */
- { 11704, -1 }, /* GlobalAlphaFactorusSUN */
- { 19859, -1 }, /* GlobalAlphaFactorsSUN */
+ { 11660, -1 }, /* GlobalAlphaFactorfSUN */
+ { 11779, -1 }, /* GlobalAlphaFactorusSUN */
+ { 19902, -1 }, /* GlobalAlphaFactorsSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_mesh_array)
static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
- { 25716, -1 }, /* DrawMeshArraysSUN */
+ { 25791, -1 }, /* DrawMeshArraysSUN */
{ -1, -1 }
};
#endif
@@ -5757,11 +5765,11 @@ static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
static const struct gl_function_remap GL_SUN_triangle_list_functions[] = {
{ 3971, -1 }, /* ReplacementCodeubSUN */
{ 5454, -1 }, /* ReplacementCodeubvSUN */
- { 16641, -1 }, /* ReplacementCodeusvSUN */
- { 16829, -1 }, /* ReplacementCodePointerSUN */
- { 18186, -1 }, /* ReplacementCodeusSUN */
- { 18933, -1 }, /* ReplacementCodeuiSUN */
- { 26361, -1 }, /* ReplacementCodeuivSUN */
+ { 16684, -1 }, /* ReplacementCodeusvSUN */
+ { 16872, -1 }, /* ReplacementCodePointerSUN */
+ { 18229, -1 }, /* ReplacementCodeusSUN */
+ { 18976, -1 }, /* ReplacementCodeuiSUN */
+ { 26436, -1 }, /* ReplacementCodeuivSUN */
{ -1, -1 }
};
#endif
@@ -5786,28 +5794,28 @@ static const struct gl_function_remap GL_SUN_vertex_functions[] = {
{ 8882, -1 }, /* Color3fVertex3fvSUN */
{ 9297, -1 }, /* Color4fNormal3fVertex3fvSUN */
{ 9969, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
- { 11169, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
- { 12557, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
- { 12968, -1 }, /* TexCoord2fColor3fVertex3fSUN */
- { 14020, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
- { 14354, -1 }, /* Color4ubVertex2fvSUN */
- { 14594, -1 }, /* Normal3fVertex3fSUN */
- { 15542, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
- { 15803, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
- { 16470, -1 }, /* TexCoord2fVertex3fvSUN */
- { 17246, -1 }, /* Color4ubVertex2fSUN */
- { 17439, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
- { 19292, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
- { 19639, -1 }, /* Normal3fVertex3fvSUN */
- { 20042, -1 }, /* Color4fNormal3fVertex3fSUN */
- { 20908, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
- { 21128, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
- { 22831, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
- { 24007, -1 }, /* TexCoord4fVertex4fSUN */
- { 24433, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
- { 24759, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
- { 24886, -1 }, /* TexCoord4fVertex4fvSUN */
- { 25588, -1 }, /* ReplacementCodeuiVertex3fSUN */
+ { 11208, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 12600, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 13011, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 14063, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 14397, -1 }, /* Color4ubVertex2fvSUN */
+ { 14637, -1 }, /* Normal3fVertex3fSUN */
+ { 15585, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 15846, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 16513, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 17289, -1 }, /* Color4ubVertex2fSUN */
+ { 17482, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 19335, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 19682, -1 }, /* Normal3fVertex3fvSUN */
+ { 20085, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 20951, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 21171, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 22874, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 24082, -1 }, /* TexCoord4fVertex4fSUN */
+ { 24508, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 24834, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 24961, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 25663, -1 }, /* ReplacementCodeuiVertex3fSUN */
{ -1, -1 }
};
#endif
@@ -5826,29 +5834,29 @@ static const struct gl_function_remap GL_VERSION_1_3_functions[] = {
{ 9625, _gloffset_MultiTexCoord4sARB },
{ 10225, _gloffset_MultiTexCoord2dvARB },
{ 10607, _gloffset_MultiTexCoord1svARB },
- { 10864, _gloffset_MultiTexCoord3svARB },
- { 10925, _gloffset_MultiTexCoord4iARB },
- { 11612, _gloffset_MultiTexCoord3iARB },
- { 12346, _gloffset_MultiTexCoord1dARB },
- { 12512, _gloffset_MultiTexCoord3dvARB },
- { 13676, _gloffset_MultiTexCoord3ivARB },
- { 13721, _gloffset_MultiTexCoord2sARB },
- { 14941, _gloffset_MultiTexCoord4ivARB },
- { 16570, _gloffset_ClientActiveTextureARB },
- { 18786, _gloffset_MultiTexCoord2dARB },
- { 19161, _gloffset_MultiTexCoord4dvARB },
- { 19447, _gloffset_MultiTexCoord4fvARB },
- { 20274, _gloffset_MultiTexCoord3fARB },
- { 22584, _gloffset_MultiTexCoord4dARB },
- { 22788, _gloffset_MultiTexCoord1sARB },
- { 22966, _gloffset_MultiTexCoord1dvARB },
- { 23753, _gloffset_MultiTexCoord1ivARB },
- { 23846, _gloffset_MultiTexCoord2ivARB },
- { 24185, _gloffset_MultiTexCoord1iARB },
- { 25456, _gloffset_MultiTexCoord4svARB },
- { 25974, _gloffset_MultiTexCoord1fARB },
- { 26237, _gloffset_MultiTexCoord4fARB },
- { 28505, _gloffset_MultiTexCoord2fvARB },
+ { 10903, _gloffset_MultiTexCoord3svARB },
+ { 10964, _gloffset_MultiTexCoord4iARB },
+ { 11687, _gloffset_MultiTexCoord3iARB },
+ { 12389, _gloffset_MultiTexCoord1dARB },
+ { 12555, _gloffset_MultiTexCoord3dvARB },
+ { 13719, _gloffset_MultiTexCoord3ivARB },
+ { 13764, _gloffset_MultiTexCoord2sARB },
+ { 14984, _gloffset_MultiTexCoord4ivARB },
+ { 16613, _gloffset_ClientActiveTextureARB },
+ { 18829, _gloffset_MultiTexCoord2dARB },
+ { 19204, _gloffset_MultiTexCoord4dvARB },
+ { 19490, _gloffset_MultiTexCoord4fvARB },
+ { 20317, _gloffset_MultiTexCoord3fARB },
+ { 22627, _gloffset_MultiTexCoord4dARB },
+ { 22831, _gloffset_MultiTexCoord1sARB },
+ { 23009, _gloffset_MultiTexCoord1dvARB },
+ { 23828, _gloffset_MultiTexCoord1ivARB },
+ { 23921, _gloffset_MultiTexCoord2ivARB },
+ { 24260, _gloffset_MultiTexCoord1iARB },
+ { 25531, _gloffset_MultiTexCoord4svARB },
+ { 26049, _gloffset_MultiTexCoord1fARB },
+ { 26312, _gloffset_MultiTexCoord4fARB },
+ { 28541, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
#endif
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 6d86a4275cc..4442fb8cf8e 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -598,7 +598,10 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
void GLAPIENTRY
_mesa_TexEnvf( GLenum target, GLenum pname, GLfloat param )
{
- _mesa_TexEnvfv( target, pname, &param );
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0;
+ _mesa_TexEnvfv( target, pname, p );
}
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index d7e77e759e0..f439d4addb3 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -367,7 +367,7 @@ static GLbitfield get_fp_input_mask( GLcontext *ctx )
else {
/* calculate from vp->outputs */
struct gl_vertex_program *vprog;
- GLbitfield vp_outputs;
+ GLbitfield64 vp_outputs;
/* Choose GLSL vertex shader over ARB vertex program. Need this
* since vertex shader state validation comes after fragment state
diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c
index 314ccb7b65f..b37039429f4 100644
--- a/src/mesa/main/texfetch.c
+++ b/src/mesa/main/texfetch.c
@@ -376,6 +376,13 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
store_texel_xrgb8888
},
{
+ MESA_FORMAT_XRGB8888_REV,
+ fetch_texel_1d_f_xrgb8888_rev,
+ fetch_texel_2d_f_xrgb8888_rev,
+ fetch_texel_3d_f_xrgb8888_rev,
+ store_texel_xrgb8888_rev,
+ },
+ {
MESA_FORMAT_RGB888,
fetch_texel_1d_f_rgb888,
fetch_texel_2d_f_rgb888,
@@ -453,6 +460,20 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
store_texel_al88_rev
},
{
+ MESA_FORMAT_AL1616,
+ fetch_texel_1d_f_al1616,
+ fetch_texel_2d_f_al1616,
+ fetch_texel_3d_f_al1616,
+ store_texel_al1616
+ },
+ {
+ MESA_FORMAT_AL1616_REV,
+ fetch_texel_1d_f_al1616_rev,
+ fetch_texel_2d_f_al1616_rev,
+ fetch_texel_3d_f_al1616_rev,
+ store_texel_al1616_rev
+ },
+ {
MESA_FORMAT_RGB332,
fetch_texel_1d_f_rgb332,
fetch_texel_2d_f_rgb332,
@@ -549,7 +570,7 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
static FetchTexelFuncF
_mesa_get_texel_fetch_func(gl_format format, GLuint dims)
{
- FetchTexelFuncF f;
+ FetchTexelFuncF f = NULL;
GLuint i;
/* XXX replace loop with direct table lookup */
for (i = 0; i < MESA_FORMAT_COUNT; i++) {
diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h
index 27434946ec8..e6772c89f36 100644
--- a/src/mesa/main/texfetch_tmp.h
+++ b/src/mesa/main/texfetch_tmp.h
@@ -559,6 +559,30 @@ static void store_texel_xrgb8888(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_XRGB8888_REV **************************************************/
+
+/* Fetch texel from 1D, 2D or 3D xrgb8888_rev texture, return 4 GLfloats */
+static void FETCH(f_xrgb8888_rev)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ texel[RCOMP] = UBYTE_TO_FLOAT( (s >> 8) & 0xff );
+ texel[GCOMP] = UBYTE_TO_FLOAT( (s >> 16) & 0xff );
+ texel[BCOMP] = UBYTE_TO_FLOAT( (s >> 24) );
+ texel[ACOMP] = 1.0f;
+}
+
+#if DIM == 3
+static void store_texel_xrgb8888_rev(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLubyte *rgba = (const GLubyte *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_8888(rgba[BCOMP], rgba[GCOMP], rgba[RCOMP], 0xff);
+}
+#endif
+
+
/* MESA_FORMAT_RGB888 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb888 texture, return 4 GLchans */
@@ -834,6 +858,54 @@ static void store_texel_al88_rev(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_AL1616 ********************************************************/
+
+/* Fetch texel from 1D, 2D or 3D al1616 texture, return 4 GLchans */
+static void FETCH(f_al1616)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = USHORT_TO_FLOAT( s & 0xffff );
+ texel[ACOMP] = USHORT_TO_FLOAT( s >> 16 );
+}
+
+#if DIM == 3
+static void store_texel_al1616(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLushort *rgba = (const GLushort *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_1616(rgba[ACOMP], rgba[RCOMP]);
+}
+#endif
+
+
+/* MESA_FORMAT_AL1616_REV ****************************************************/
+
+/* Fetch texel from 1D, 2D or 3D al1616_rev texture, return 4 GLchans */
+static void FETCH(f_al1616_rev)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ texel[RCOMP] =
+ texel[GCOMP] =
+ texel[BCOMP] = USHORT_TO_FLOAT( s >> 16 );
+ texel[ACOMP] = USHORT_TO_FLOAT( s & 0xffff );
+}
+
+#if DIM == 3
+static void store_texel_al1616_rev(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLushort *rgba = (const GLushort *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_1616(rgba[RCOMP], rgba[ACOMP]);
+}
+#endif
+
+
/* MESA_FORMAT_RGB332 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb332 texture, return 4 GLchans */
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 39c561e2789..1a374e7bee5 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -115,11 +115,13 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE4_ALPHA4:
case GL_LUMINANCE6_ALPHA2:
+ case GL_LUMINANCE8_ALPHA8:
+ return MESA_FORMAT_AL88;
+
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
- case GL_LUMINANCE8_ALPHA8:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_AL1616;
case GL_INTENSITY:
case GL_INTENSITY4:
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index 733e129fcfe..5abb1ff0ab6 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -211,14 +211,20 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
static void GLAPIENTRY
_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param )
{
- _mesa_TexGenfv(coord, pname, &param);
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0F;
+ _mesa_TexGenfv(coord, pname, p);
}
void GLAPIENTRY
_mesa_TexGeni( GLenum coord, GLenum pname, GLint param )
{
- _mesa_TexGeniv( coord, pname, &param );
+ GLint p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0;
+ _mesa_TexGeniv( coord, pname, p );
}
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index e4a9ac14b1c..bd7cc8d2780 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -521,10 +521,11 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- const GLuint size = _mesa_format_image_size(texImage->TexFormat,
- texImage->Width,
- texImage->Height,
- texImage->Depth);
+ const GLuint row_stride = _mesa_format_row_stride(texImage->TexFormat,
+ texImage->Width);
+ const GLuint row_stride_stored = _mesa_format_row_stride(texImage->TexFormat,
+ texImage->RowStride);
+ GLuint i;
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
/* pack texture image into a PBO */
@@ -540,8 +541,24 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level,
img = ADD_POINTERS(buf, img);
}
- /* just memcpy, no pixelstore or pixel transfer */
- _mesa_memcpy(img, texImage->Data, size);
+ /* no pixelstore or pixel transfer, but respect stride */
+
+ if (row_stride == row_stride_stored) {
+ const GLuint size = _mesa_format_image_size(texImage->TexFormat,
+ texImage->Width,
+ texImage->Height,
+ texImage->Depth);
+ _mesa_memcpy(img, texImage->Data, size);
+ }
+ else {
+ GLuint bw, bh;
+ _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh);
+ for (i = 0; i < (texImage->Height + bh - 1) / bh; i++) {
+ memcpy((GLubyte *)img + i * row_stride,
+ (GLubyte *)texImage->Data + i * row_stride_stored,
+ row_stride);
+ }
+ }
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
@@ -559,7 +576,6 @@ static GLboolean
getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
GLenum format, GLenum type, GLvoid *pixels )
{
- const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
const GLuint maxLevels = _mesa_max_texture_levels(ctx, target);
@@ -613,8 +629,7 @@ getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
return GL_TRUE;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
if (!texObj || _mesa_is_proxy_texture(target)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)");
@@ -703,7 +718,6 @@ void GLAPIENTRY
_mesa_GetTexImage( GLenum target, GLint level, GLenum format,
GLenum type, GLvoid *pixels )
{
- const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
@@ -718,8 +732,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
@@ -749,7 +762,6 @@ static GLboolean
getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
GLvoid *img)
{
- const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
const GLuint maxLevels = _mesa_max_texture_levels(ctx, target);
@@ -773,9 +785,7 @@ getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
return GL_TRUE;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
-
+ texObj = _mesa_get_current_tex_object(ctx, target);
if (!texObj) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)");
return GL_TRUE;
@@ -827,7 +837,6 @@ getcompressedteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
void GLAPIENTRY
_mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
{
- const struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
@@ -842,8 +851,7 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
return;
}
- texUnit = _mesa_get_current_tex_unit(ctx);
- texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 69ef2cca5ee..b946f3c69d7 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -583,6 +583,17 @@ _mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
/**
+ * Return pointer to texture object for given target on current texture unit.
+ */
+struct gl_texture_object *
+_mesa_get_current_tex_object(GLcontext *ctx, GLenum target)
+{
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
+ return _mesa_select_tex_object(ctx, texUnit, target);
+}
+
+
+/**
* Get a texture image pointer from a texture object, given a texture
* target and mipmap level. The target and level parameters should
* have already been error-checked.
@@ -964,18 +975,6 @@ _mesa_clear_texture_image(GLcontext *ctx, struct gl_texture_image *texImage)
/**
- * Return pointer to texture object for given target on current texture unit.
- */
-static struct gl_texture_object *
-get_current_tex_object(GLcontext *ctx, GLenum target)
-{
- struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
- return _mesa_select_tex_object(ctx, texUnit, target);
-}
-
-
-
-/**
* This is the fallback for Driver.TestProxyTexImage(). Test the texture
* level, width, height and depth against the ctx->Const limits for textures.
*
@@ -2036,7 +2035,9 @@ check_gen_mipmap(GLcontext *ctx, GLenum target,
struct gl_texture_object *texObj, GLint level)
{
ASSERT(target != GL_TEXTURE_CUBE_MAP);
- if (texObj->GenerateMipmap && level == texObj->BaseLevel) {
+ if (texObj->GenerateMipmap &&
+ level == texObj->BaseLevel &&
+ level < texObj->MaxLevel) {
ASSERT(ctx->Driver.GenerateMipmap);
ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
@@ -2128,7 +2129,7 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
if (ctx->NewState & _MESA_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
@@ -2249,7 +2250,7 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
if (ctx->NewState & _MESA_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
@@ -2365,7 +2366,7 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
if (ctx->NewState & _MESA_NEW_TRANSFER_STATE)
_mesa_update_state(ctx);
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
@@ -2457,7 +2458,7 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
{
GLsizei postConvWidth = width;
struct gl_texture_object *texObj;
- struct gl_texture_image *texImage = NULL;
+ struct gl_texture_image *texImage;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -2483,7 +2484,7 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
assert(texObj);
_mesa_lock_texture(ctx, texObj);
@@ -2549,7 +2550,7 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
return; /* error was detected */
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2607,7 +2608,7 @@ _mesa_TexSubImage3D( GLenum target, GLint level,
return; /* error was detected */
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2674,7 +2675,7 @@ _mesa_CopyTexImage1D( GLenum target, GLint level,
postConvWidth, 1, border))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2753,7 +2754,7 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
postConvWidth, postConvHeight, border))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2825,7 +2826,7 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
if (copytexsubimage_error_check1(ctx, 1, target, level))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2885,7 +2886,7 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
if (copytexsubimage_error_check1(ctx, 2, target, level))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -2948,7 +2949,7 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
if (copytexsubimage_error_check1(ctx, 3, target, level))
return;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3282,7 +3283,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
return;
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3344,7 +3345,7 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level,
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3392,7 +3393,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
return;
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3456,7 +3457,7 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level,
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3500,7 +3501,7 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
return;
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3564,7 +3565,7 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level,
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
@@ -3606,7 +3607,7 @@ compressed_tex_sub_image(GLuint dims, GLenum target, GLint level,
return;
}
- texObj = get_current_tex_object(ctx, target);
+ texObj = _mesa_get_current_tex_object(ctx, target);
_mesa_lock_texture(ctx, texObj);
{
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 094177da79d..97c90183190 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -86,6 +86,9 @@ extern struct gl_texture_object *
_mesa_select_tex_object(GLcontext *ctx, const struct gl_texture_unit *texUnit,
GLenum target);
+extern struct gl_texture_object *
+_mesa_get_current_tex_object(GLcontext *ctx, GLenum target);
+
extern struct gl_texture_image *
_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_object *texObj,
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index aaccc03a7c6..7e8a2489ac3 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -940,7 +940,8 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
/**
* Convert a GL texture target enum such as GL_TEXTURE_2D or GL_TEXTURE_3D
* into the corresponding Mesa texture target index.
- * Return -1 if target is invalid.
+ * Note that proxy targets are not valid here.
+ * \return TEXTURE_x_INDEX or -1 if target is invalid
*/
static GLint
target_enum_to_index(GLenum target)
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 79298e867a0..310d594cd55 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -79,6 +79,8 @@ validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap)
/**
* Get current texture object for given target.
* Return NULL if any error.
+ * Note that this is different from _mesa_select_tex_object() in that proxy
+ * targets are not accepted.
*/
static struct gl_texture_object *
get_texobj(GLcontext *ctx, GLenum target)
@@ -545,13 +547,20 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
case GL_DEPTH_TEXTURE_MODE_ARB:
{
/* convert float param to int */
- GLint p = (GLint) param;
- need_update = set_tex_parameteri(ctx, texObj, pname, &p);
+ GLint p[4];
+ p[0] = (GLint) param;
+ p[1] = p[2] = p[3] = 0;
+ need_update = set_tex_parameteri(ctx, texObj, pname, p);
}
break;
default:
- /* this will generate an error if pname is illegal */
- need_update = set_tex_parameterf(ctx, texObj, pname, &param);
+ {
+ /* this will generate an error if pname is illegal */
+ GLfloat p[4];
+ p[0] = param;
+ p[1] = p[2] = p[3] = 0.0F;
+ need_update = set_tex_parameterf(ctx, texObj, pname, p);
+ }
}
if (ctx->Driver.TexParameter && need_update) {
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index e48d4720611..792c83141ec 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1410,7 +1410,8 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
ASSERT(dstFormat == MESA_FORMAT_ARGB8888 ||
dstFormat == MESA_FORMAT_ARGB8888_REV ||
- dstFormat == MESA_FORMAT_XRGB8888);
+ dstFormat == MESA_FORMAT_XRGB8888 ||
+ dstFormat == MESA_FORMAT_XRGB8888_REV );
ASSERT(texelBytes == 4);
if (!ctx->_ImageTransferState &&
@@ -1431,7 +1432,8 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
}
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == MESA_FORMAT_ARGB8888_REV &&
+ (dstFormat == MESA_FORMAT_ARGB8888_REV ||
+ dstFormat == MESA_FORMAT_XRGB8888_REV) &&
baseInternalFormat == GL_RGBA &&
srcFormat == GL_BGRA &&
((srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
@@ -1524,7 +1526,8 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
*/
if ((littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
(littleEndian && dstFormat == MESA_FORMAT_XRGB8888) ||
- (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV)) {
+ (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV)) {
dstmap[3] = 3; /* alpha */
dstmap[2] = 0; /* red */
dstmap[1] = 1; /* green */
@@ -1533,6 +1536,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
else {
assert((littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
(!littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
+ (littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV) ||
(!littleEndian && dstFormat == MESA_FORMAT_XRGB8888));
dstmap[3] = 2;
dstmap[2] = 1;
@@ -2146,6 +2150,81 @@ _mesa_texstore_al88(TEXSTORE_PARAMS)
static GLboolean
+_mesa_texstore_al1616(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_AL1616 ||
+ dstFormat == MESA_FORMAT_AL1616_REV);
+ ASSERT(texelBytes == 4);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_AL1616 &&
+ baseInternalFormat == GL_LUMINANCE_ALPHA &&
+ srcFormat == GL_LUMINANCE_ALPHA &&
+ srcType == GL_UNSIGNED_SHORT &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ 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;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ if (dstFormat == MESA_FORMAT_AL1616) {
+ for (col = 0; col < srcWidth; col++) {
+ GLushort l, a;
+
+ UNCLAMPED_FLOAT_TO_USHORT(l, src[0]);
+ UNCLAMPED_FLOAT_TO_USHORT(a, src[1]);
+ dstUI[col] = PACK_COLOR_1616(a, l);
+ src += 2;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ GLushort l, a;
+
+ UNCLAMPED_FLOAT_TO_USHORT(l, src[0]);
+ UNCLAMPED_FLOAT_TO_USHORT(a, src[1]);
+ dstUI[col] = PACK_COLOR_1616_REV(a, l);
+ src += 2;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ _mesa_free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
_mesa_texstore_rgb332(TEXSTORE_PARAMS)
{
const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
@@ -3050,7 +3129,7 @@ _mesa_texstore_sla8(TEXSTORE_PARAMS)
* Table mapping MESA_FORMAT_8 to _mesa_texstore_*()
* XXX this is somewhat temporary.
*/
-const static struct {
+static const struct {
gl_format Name;
StoreTexImageFunc Store;
}
@@ -3062,6 +3141,7 @@ texstore_funcs[MESA_FORMAT_COUNT] =
{ MESA_FORMAT_ARGB8888, _mesa_texstore_argb8888 },
{ MESA_FORMAT_ARGB8888_REV, _mesa_texstore_argb8888 },
{ MESA_FORMAT_XRGB8888, _mesa_texstore_argb8888 },
+ { MESA_FORMAT_XRGB8888_REV, _mesa_texstore_argb8888 },
{ MESA_FORMAT_RGB888, _mesa_texstore_rgb888 },
{ MESA_FORMAT_BGR888, _mesa_texstore_bgr888 },
{ MESA_FORMAT_RGB565, _mesa_texstore_rgb565 },
@@ -3073,6 +3153,8 @@ texstore_funcs[MESA_FORMAT_COUNT] =
{ MESA_FORMAT_ARGB1555_REV, _mesa_texstore_argb1555 },
{ MESA_FORMAT_AL88, _mesa_texstore_al88 },
{ MESA_FORMAT_AL88_REV, _mesa_texstore_al88 },
+ { MESA_FORMAT_AL1616, _mesa_texstore_al1616 },
+ { MESA_FORMAT_AL1616_REV, _mesa_texstore_al1616 },
{ MESA_FORMAT_RGB332, _mesa_texstore_rgb332 },
{ MESA_FORMAT_A8, _mesa_texstore_a8 },
{ MESA_FORMAT_L8, _mesa_texstore_a8 },
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 6cd2a2f4f64..c2193074cdf 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -51,9 +51,8 @@
* \param stride stride between elements, in elements
* \param normalized are integer types converted to floats in [-1, 1]?
* \param ptr the address (or offset inside VBO) of the array data
- * \return GL_TRUE if no error, GL_FALSE if error
*/
-static GLboolean
+static void
update_array(GLcontext *ctx, struct gl_client_array *array,
GLbitfield dirtyBit, GLsizei elementSize,
GLint size, GLenum type, GLenum format,
@@ -68,7 +67,7 @@ update_array(GLcontext *ctx, struct gl_client_array *array,
*/
_mesa_error(ctx, GL_INVALID_OPERATION,
"glVertex/Normal/EtcPointer(non-VBO array)");
- return GL_FALSE;
+ return;
}
array->Size = size;
@@ -85,8 +84,6 @@ update_array(GLcontext *ctx, struct gl_client_array *array,
ctx->NewState |= _NEW_ARRAY;
ctx->Array.NewState |= dirtyBit;
-
- return GL_TRUE;
}
@@ -140,12 +137,8 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->Vertex, _NEW_ARRAY_VERTEX,
- elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.VertexPointer)
- ctx->Driver.VertexPointer( ctx, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->Vertex, _NEW_ARRAY_VERTEX,
+ elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr);
}
@@ -192,12 +185,8 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->Normal, _NEW_ARRAY_NORMAL,
- elementSize, 3, type, GL_RGBA, stride, GL_TRUE, ptr))
- return;
-
- if (ctx->Driver.NormalPointer)
- ctx->Driver.NormalPointer( ctx, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->Normal, _NEW_ARRAY_NORMAL,
+ elementSize, 3, type, GL_RGBA, stride, GL_TRUE, ptr);
}
@@ -272,12 +261,8 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->Color, _NEW_ARRAY_COLOR0,
- elementSize, size, type, format, stride, GL_TRUE, ptr))
- return;
-
- if (ctx->Driver.ColorPointer)
- ctx->Driver.ColorPointer( ctx, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->Color, _NEW_ARRAY_COLOR0,
+ elementSize, size, type, format, stride, GL_TRUE, ptr);
}
@@ -305,12 +290,8 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->FogCoord, _NEW_ARRAY_FOGCOORD,
- elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.FogCoordPointer)
- ctx->Driver.FogCoordPointer( ctx, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->FogCoord, _NEW_ARRAY_FOGCOORD,
+ elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr);
}
@@ -347,12 +328,8 @@ _mesa_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->Index, _NEW_ARRAY_INDEX,
- elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.IndexPointer)
- ctx->Driver.IndexPointer( ctx, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->Index, _NEW_ARRAY_INDEX,
+ elementSize, 1, type, GL_RGBA, stride, GL_FALSE, ptr);
}
@@ -423,13 +400,8 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->SecondaryColor,
- _NEW_ARRAY_COLOR1, elementSize, size, type,
- format, stride, GL_TRUE, ptr))
- return;
-
- if (ctx->Driver.SecondaryColorPointer)
- ctx->Driver.SecondaryColorPointer( ctx, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->SecondaryColor, _NEW_ARRAY_COLOR1,
+ elementSize, size, type, format, stride, GL_TRUE, ptr);
}
@@ -485,13 +457,9 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->TexCoord[unit],
- _NEW_ARRAY_TEXCOORD(unit),
- elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.TexCoordPointer)
- ctx->Driver.TexCoordPointer( ctx, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->TexCoord[unit],
+ _NEW_ARRAY_TEXCOORD(unit),
+ elementSize, size, type, GL_RGBA, stride, GL_FALSE, ptr);
}
@@ -506,13 +474,9 @@ _mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *ptr)
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->EdgeFlag, _NEW_ARRAY_EDGEFLAG,
- sizeof(GLboolean), 1, GL_UNSIGNED_BYTE, GL_RGBA,
- stride, GL_FALSE, ptr))
- return;
-
- if (ctx->Driver.EdgeFlagPointer)
- ctx->Driver.EdgeFlagPointer( ctx, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->EdgeFlag, _NEW_ARRAY_EDGEFLAG,
+ sizeof(GLboolean), 1, GL_UNSIGNED_BYTE, GL_RGBA,
+ stride, GL_FALSE, ptr);
}
@@ -620,13 +584,9 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type,
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
- _NEW_ARRAY_ATTRIB(index),
- elementSize, size, type, format, stride, normalized, ptr))
- return;
-
- if (ctx->Driver.VertexAttribPointer)
- ctx->Driver.VertexAttribPointer( ctx, index, size, type, stride, ptr );
+ update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
+ _NEW_ARRAY_ATTRIB(index),
+ elementSize, size, type, format, stride, normalized, ptr);
}
#endif
@@ -720,13 +680,9 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
return;
}
- if (!update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
- _NEW_ARRAY_ATTRIB(index),
- elementSize, size, type, format, stride, normalized, ptr))
- return;
-
- if (ctx->Driver.VertexAttribPointer)
- ctx->Driver.VertexAttribPointer(ctx, index, size, type, stride, ptr);
+ update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index],
+ _NEW_ARRAY_ATTRIB(index),
+ elementSize, size, type, format, stride, normalized, ptr);
}
#endif
@@ -989,9 +945,6 @@ _mesa_LockArraysEXT(GLint first, GLsizei count)
ctx->NewState |= _NEW_ARRAY;
ctx->Array.NewState |= _NEW_ARRAY_ALL;
-
- if (ctx->Driver.LockArraysEXT)
- ctx->Driver.LockArraysEXT( ctx, first, count );
}
@@ -1013,9 +966,6 @@ _mesa_UnlockArraysEXT( void )
ctx->Array.LockCount = 0;
ctx->NewState |= _NEW_ARRAY;
ctx->Array.NewState |= _NEW_ARRAY_ALL;
-
- if (ctx->Driver.UnlockArraysEXT)
- ctx->Driver.UnlockArraysEXT( ctx );
}
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 0cae1860a33..dc55cb7ccc9 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.7
+ * Version: 7.8
*
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
* Copyright (C) 2009 VMware, Inc. All Rights Reserved.
@@ -30,9 +30,9 @@
/* Mesa version */
#define MESA_MAJOR 7
-#define MESA_MINOR 7
+#define MESA_MINOR 8
#define MESA_PATCH 0
-#define MESA_VERSION_STRING "7.7-devel"
+#define MESA_VERSION_STRING "7.8-devel"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 05ee4f563eb..dd732b6666b 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -87,6 +87,9 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target,
return;
}
+ if (program->Base.String != NULL)
+ _mesa_free(program->Base.String);
+
/* Copy the relevant contents of the arb_program struct into the
* fragment_program struct.
*/
@@ -178,6 +181,9 @@ _mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target,
return;
}
+ if (program->Base.String != NULL)
+ _mesa_free(program->Base.String);
+
/* Copy the relevant contents of the arb_program struct into the
* vertex_program struct.
*/
diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c
index 4d8cff07001..eb537cd1b99 100644
--- a/src/mesa/shader/arbprogram.c
+++ b/src/mesa/shader/arbprogram.c
@@ -37,6 +37,8 @@
#include "main/mtypes.h"
#include "arbprogram.h"
#include "arbprogparse.h"
+#include "nvfragparse.h"
+#include "nvvertparse.h"
#include "program.h"
@@ -428,36 +430,66 @@ void GLAPIENTRY
_mesa_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
const GLvoid *string)
{
+ struct gl_program *base;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+ if (!ctx->Extensions.ARB_vertex_program
+ && !ctx->Extensions.ARB_fragment_program) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glProgramStringARB()");
+ return;
+ }
+
if (format != GL_PROGRAM_FORMAT_ASCII_ARB) {
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(format)");
return;
}
+ /* The first couple cases are complicated. The same enum value is used for
+ * ARB and NV vertex programs. If the target is a vertex program, parse it
+ * using the ARB grammar if the string starts with "!!ARB" or if
+ * NV_vertex_program is not supported.
+ */
if (target == GL_VERTEX_PROGRAM_ARB
- && ctx->Extensions.ARB_vertex_program) {
+ && ctx->Extensions.ARB_vertex_program
+ && ((strncmp(string, "!!ARB", 5) == 0)
+ || !ctx->Extensions.NV_vertex_program)) {
struct gl_vertex_program *prog = ctx->VertexProgram.Current;
_mesa_parse_arb_vertex_program(ctx, target, string, len, prog);
-
- if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify)
- ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
+
+ base = & prog->Base;
+ }
+ else if ((target == GL_VERTEX_PROGRAM_ARB
+ || target == GL_VERTEX_STATE_PROGRAM_NV)
+ && ctx->Extensions.NV_vertex_program) {
+ struct gl_vertex_program *prog = ctx->VertexProgram.Current;
+ _mesa_parse_nv_vertex_program(ctx, target, string, len, prog);
+
+ base = & prog->Base;
}
else if (target == GL_FRAGMENT_PROGRAM_ARB
&& ctx->Extensions.ARB_fragment_program) {
struct gl_fragment_program *prog = ctx->FragmentProgram.Current;
_mesa_parse_arb_fragment_program(ctx, target, string, len, prog);
- if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify)
- ctx->Driver.ProgramStringNotify( ctx, target, &prog->Base );
+ base = & prog->Base;
+ }
+ else if (target == GL_FRAGMENT_PROGRAM_NV
+ && ctx->Extensions.NV_fragment_program) {
+ struct gl_fragment_program *prog = ctx->FragmentProgram.Current;
+ _mesa_parse_nv_fragment_program(ctx, target, string, len, prog);
+
+ base = & prog->Base;
}
else {
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramStringARB(target)");
return;
}
+
+ if (ctx->Program.ErrorPos == -1 && ctx->Driver.ProgramStringNotify)
+ ctx->Driver.ProgramStringNotify( ctx, target, base );
}
diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c
index 5e605274aaa..68543ae2e12 100644
--- a/src/mesa/shader/lex.yy.c
+++ b/src/mesa/shader/lex.yy.c
@@ -53,7 +53,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -84,6 +83,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -157,7 +158,15 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -1057,8 +1066,7 @@ static yyconst flex_int16_t yy_chk[1368] =
if (condition) { \
return token; \
} else { \
- yylval->string = return_string(yyextra, yytext); \
- return IDENTIFIER; \
+ return handle_ident(yyextra, yytext, yylval); \
} \
} while (0)
@@ -1082,53 +1090,13 @@ static yyconst flex_int16_t yy_chk[1368] =
yylval->temp_inst.Opcode = OPCODE_ ## opcode; \
return token; \
} else { \
- yylval->string = return_string(yyextra, yytext); \
- return IDENTIFIER; \
+ return handle_ident(yyextra, yytext, yylval); \
} \
} while (0)
#define SWIZZLE_INVAL MAKE_SWIZZLE4(SWIZZLE_NIL, SWIZZLE_NIL, \
SWIZZLE_NIL, SWIZZLE_NIL)
-/**
- * Send a string to the parser using asm_parser_state::string_dumpster
- *
- * Sends a string to the parser using asm_parser_state::string_dumpster as a
- * temporary storage buffer. Data previously stored in
- * asm_parser_state::string_dumpster will be lost. If
- * asm_parser_state::string_dumpster is not large enough to hold the new
- * string, the buffer size will be increased. The buffer size is \b never
- * decreased.
- *
- * \param state Assembler parser state tracking
- * \param str String to be passed to the parser
- *
- * \return
- * A pointer to asm_parser_state::string_dumpster on success or \c NULL on
- * failure. Currently the only failure case is \c ENOMEM.
- */
-static char *
-return_string(struct asm_parser_state *state, const char *str)
-{
- const size_t len = strlen(str);
-
- if (len >= state->dumpster_size) {
- char *const dumpster = _mesa_realloc(state->string_dumpster,
- state->dumpster_size,
- len + 1);
- if (dumpster == NULL) {
- return NULL;
- }
-
- state->string_dumpster = dumpster;
- state->dumpster_size = len + 1;
- }
-
- memcpy(state->string_dumpster, str, len + 1);
- return state->string_dumpster;
-}
-
-
static unsigned
mask_from_char(char c)
{
@@ -1193,7 +1161,7 @@ handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval)
} while(0);
#define YY_EXTRA_TYPE struct asm_parser_state *
-#line 1197 "lex.yy.c"
+#line 1165 "lex.yy.c"
#define INITIAL 0
@@ -1330,7 +1298,12 @@ static int input (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1338,7 +1311,7 @@ static int input (yyscan_t yyscanner );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1349,7 +1322,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1434,10 +1407,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 198 "program_lexer.l"
+#line 157 "program_lexer.l"
-#line 1441 "lex.yy.c"
+#line 1414 "lex.yy.c"
yylval = yylval_param;
@@ -1526,17 +1499,17 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 200 "program_lexer.l"
+#line 159 "program_lexer.l"
{ return ARBvp_10; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 201 "program_lexer.l"
+#line 160 "program_lexer.l"
{ return ARBfp_10; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 202 "program_lexer.l"
+#line 161 "program_lexer.l"
{
yylval->integer = at_address;
return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS);
@@ -1544,692 +1517,692 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 206 "program_lexer.l"
+#line 165 "program_lexer.l"
{ return ALIAS; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 207 "program_lexer.l"
+#line 166 "program_lexer.l"
{ return ATTRIB; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 208 "program_lexer.l"
+#line 167 "program_lexer.l"
{ return END; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 209 "program_lexer.l"
+#line 168 "program_lexer.l"
{ return OPTION; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 210 "program_lexer.l"
+#line 169 "program_lexer.l"
{ return OUTPUT; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 211 "program_lexer.l"
+#line 170 "program_lexer.l"
{ return PARAM; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 212 "program_lexer.l"
+#line 171 "program_lexer.l"
{ yylval->integer = at_temp; return TEMP; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 214 "program_lexer.l"
+#line 173 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, ABS, 3); }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 215 "program_lexer.l"
+#line 174 "program_lexer.l"
{ return_opcode( 1, BIN_OP, ADD, 3); }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 216 "program_lexer.l"
+#line 175 "program_lexer.l"
{ return_opcode(require_ARB_vp, ARL, ARL, 3); }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 218 "program_lexer.l"
+#line 177 "program_lexer.l"
{ return_opcode(require_ARB_fp, TRI_OP, CMP, 3); }
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 219 "program_lexer.l"
+#line 178 "program_lexer.l"
{ return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 221 "program_lexer.l"
+#line 180 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 222 "program_lexer.l"
+#line 181 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 223 "program_lexer.l"
+#line 182 "program_lexer.l"
{ return_opcode( 1, BIN_OP, DP3, 3); }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 224 "program_lexer.l"
+#line 183 "program_lexer.l"
{ return_opcode( 1, BIN_OP, DP4, 3); }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 225 "program_lexer.l"
+#line 184 "program_lexer.l"
{ return_opcode( 1, BIN_OP, DPH, 3); }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 226 "program_lexer.l"
+#line 185 "program_lexer.l"
{ return_opcode( 1, BIN_OP, DST, 3); }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 228 "program_lexer.l"
+#line 187 "program_lexer.l"
{ return_opcode( 1, SCALAR_OP, EX2, 3); }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 229 "program_lexer.l"
+#line 188 "program_lexer.l"
{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 231 "program_lexer.l"
+#line 190 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, FLR, 3); }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 232 "program_lexer.l"
+#line 191 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, FRC, 3); }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 234 "program_lexer.l"
+#line 193 "program_lexer.l"
{ return_opcode(require_ARB_fp, KIL, KIL, 3); }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 236 "program_lexer.l"
+#line 195 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, LIT, 3); }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 237 "program_lexer.l"
+#line 196 "program_lexer.l"
{ return_opcode( 1, SCALAR_OP, LG2, 3); }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 238 "program_lexer.l"
+#line 197 "program_lexer.l"
{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 239 "program_lexer.l"
+#line 198 "program_lexer.l"
{ return_opcode(require_ARB_fp, TRI_OP, LRP, 3); }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 241 "program_lexer.l"
+#line 200 "program_lexer.l"
{ return_opcode( 1, TRI_OP, MAD, 3); }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 242 "program_lexer.l"
+#line 201 "program_lexer.l"
{ return_opcode( 1, BIN_OP, MAX, 3); }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 243 "program_lexer.l"
+#line 202 "program_lexer.l"
{ return_opcode( 1, BIN_OP, MIN, 3); }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 244 "program_lexer.l"
+#line 203 "program_lexer.l"
{ return_opcode( 1, VECTOR_OP, MOV, 3); }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 245 "program_lexer.l"
+#line 204 "program_lexer.l"
{ return_opcode( 1, BIN_OP, MUL, 3); }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 247 "program_lexer.l"
+#line 206 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 248 "program_lexer.l"
+#line 207 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 249 "program_lexer.l"
+#line 208 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 250 "program_lexer.l"
+#line 209 "program_lexer.l"
{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 251 "program_lexer.l"
+#line 210 "program_lexer.l"
{ return_opcode( 1, BINSC_OP, POW, 3); }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 253 "program_lexer.l"
+#line 212 "program_lexer.l"
{ return_opcode( 1, SCALAR_OP, RCP, 3); }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 254 "program_lexer.l"
+#line 213 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, RFL, 3); }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 255 "program_lexer.l"
+#line 214 "program_lexer.l"
{ return_opcode( 1, SCALAR_OP, RSQ, 3); }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 257 "program_lexer.l"
+#line 216 "program_lexer.l"
{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 258 "program_lexer.l"
+#line 217 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SEQ, 3); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 259 "program_lexer.l"
+#line 218 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SFL, 3); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 260 "program_lexer.l"
+#line 219 "program_lexer.l"
{ return_opcode( 1, BIN_OP, SGE, 3); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 261 "program_lexer.l"
+#line 220 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SGT, 3); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 262 "program_lexer.l"
+#line 221 "program_lexer.l"
{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 263 "program_lexer.l"
+#line 222 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SLE, 3); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 264 "program_lexer.l"
+#line 223 "program_lexer.l"
{ return_opcode( 1, BIN_OP, SLT, 3); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 265 "program_lexer.l"
+#line 224 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, SNE, 3); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 266 "program_lexer.l"
+#line 225 "program_lexer.l"
{ return_opcode(require_NV_fp, BIN_OP, STR, 3); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 267 "program_lexer.l"
+#line 226 "program_lexer.l"
{ return_opcode( 1, BIN_OP, SUB, 3); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 268 "program_lexer.l"
+#line 227 "program_lexer.l"
{ return_opcode( 1, SWZ, SWZ, 3); }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 270 "program_lexer.l"
+#line 229 "program_lexer.l"
{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 271 "program_lexer.l"
+#line 230 "program_lexer.l"
{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 272 "program_lexer.l"
+#line 231 "program_lexer.l"
{ return_opcode(require_NV_fp, TXD_OP, TXD, 3); }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 273 "program_lexer.l"
+#line 232 "program_lexer.l"
{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 275 "program_lexer.l"
+#line 234 "program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 276 "program_lexer.l"
+#line 235 "program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 277 "program_lexer.l"
+#line 236 "program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP4B, 4); }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 278 "program_lexer.l"
+#line 237 "program_lexer.l"
{ return_opcode(require_NV_fp, SCALAR_OP, UP4UB, 5); }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 280 "program_lexer.l"
+#line 239 "program_lexer.l"
{ return_opcode(require_NV_fp, TRI_OP, X2D, 3); }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 281 "program_lexer.l"
+#line 240 "program_lexer.l"
{ return_opcode( 1, BIN_OP, XPD, 3); }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 283 "program_lexer.l"
+#line 242 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 284 "program_lexer.l"
+#line 243 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 285 "program_lexer.l"
+#line 244 "program_lexer.l"
{ return PROGRAM; }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 286 "program_lexer.l"
+#line 245 "program_lexer.l"
{ return STATE; }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 287 "program_lexer.l"
+#line 246 "program_lexer.l"
{ return RESULT; }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 289 "program_lexer.l"
+#line 248 "program_lexer.l"
{ return AMBIENT; }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 290 "program_lexer.l"
+#line 249 "program_lexer.l"
{ return ATTENUATION; }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 291 "program_lexer.l"
+#line 250 "program_lexer.l"
{ return BACK; }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 292 "program_lexer.l"
+#line 251 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, CLIP); }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 293 "program_lexer.l"
+#line 252 "program_lexer.l"
{ return COLOR; }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 294 "program_lexer.l"
+#line 253 "program_lexer.l"
{ return_token_or_DOT(require_ARB_fp, DEPTH); }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 295 "program_lexer.l"
+#line 254 "program_lexer.l"
{ return DIFFUSE; }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 296 "program_lexer.l"
+#line 255 "program_lexer.l"
{ return DIRECTION; }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 297 "program_lexer.l"
+#line 256 "program_lexer.l"
{ return EMISSION; }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 298 "program_lexer.l"
+#line 257 "program_lexer.l"
{ return ENV; }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 299 "program_lexer.l"
+#line 258 "program_lexer.l"
{ return EYE; }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 300 "program_lexer.l"
+#line 259 "program_lexer.l"
{ return FOGCOORD; }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 301 "program_lexer.l"
+#line 260 "program_lexer.l"
{ return FOG; }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 302 "program_lexer.l"
+#line 261 "program_lexer.l"
{ return FRONT; }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 303 "program_lexer.l"
+#line 262 "program_lexer.l"
{ return HALF; }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 304 "program_lexer.l"
+#line 263 "program_lexer.l"
{ return INVERSE; }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 305 "program_lexer.l"
+#line 264 "program_lexer.l"
{ return INVTRANS; }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 306 "program_lexer.l"
+#line 265 "program_lexer.l"
{ return LIGHT; }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 307 "program_lexer.l"
+#line 266 "program_lexer.l"
{ return LIGHTMODEL; }
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 308 "program_lexer.l"
+#line 267 "program_lexer.l"
{ return LIGHTPROD; }
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 309 "program_lexer.l"
+#line 268 "program_lexer.l"
{ return LOCAL; }
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 310 "program_lexer.l"
+#line 269 "program_lexer.l"
{ return MATERIAL; }
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 311 "program_lexer.l"
+#line 270 "program_lexer.l"
{ return MAT_PROGRAM; }
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 312 "program_lexer.l"
+#line 271 "program_lexer.l"
{ return MATRIX; }
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 313 "program_lexer.l"
+#line 272 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); }
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 314 "program_lexer.l"
+#line 273 "program_lexer.l"
{ return MODELVIEW; }
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 315 "program_lexer.l"
+#line 274 "program_lexer.l"
{ return MVP; }
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 316 "program_lexer.l"
+#line 275 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, NORMAL); }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 317 "program_lexer.l"
+#line 276 "program_lexer.l"
{ return OBJECT; }
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 318 "program_lexer.l"
+#line 277 "program_lexer.l"
{ return PALETTE; }
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 319 "program_lexer.l"
+#line 278 "program_lexer.l"
{ return PARAMS; }
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 320 "program_lexer.l"
+#line 279 "program_lexer.l"
{ return PLANE; }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 321 "program_lexer.l"
+#line 280 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, POINT_TOK); }
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 322 "program_lexer.l"
+#line 281 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, POINTSIZE); }
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 323 "program_lexer.l"
+#line 282 "program_lexer.l"
{ return POSITION; }
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 324 "program_lexer.l"
+#line 283 "program_lexer.l"
{ return PRIMARY; }
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 325 "program_lexer.l"
+#line 284 "program_lexer.l"
{ return PROJECTION; }
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 326 "program_lexer.l"
+#line 285 "program_lexer.l"
{ return_token_or_DOT(require_ARB_fp, RANGE); }
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 327 "program_lexer.l"
+#line 286 "program_lexer.l"
{ return ROW; }
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 328 "program_lexer.l"
+#line 287 "program_lexer.l"
{ return SCENECOLOR; }
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 329 "program_lexer.l"
+#line 288 "program_lexer.l"
{ return SECONDARY; }
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 330 "program_lexer.l"
+#line 289 "program_lexer.l"
{ return SHININESS; }
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 331 "program_lexer.l"
+#line 290 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, SIZE_TOK); }
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 332 "program_lexer.l"
+#line 291 "program_lexer.l"
{ return SPECULAR; }
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 333 "program_lexer.l"
+#line 292 "program_lexer.l"
{ return SPOT; }
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 334 "program_lexer.l"
+#line 293 "program_lexer.l"
{ return TEXCOORD; }
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 335 "program_lexer.l"
+#line 294 "program_lexer.l"
{ return_token_or_DOT(require_ARB_fp, TEXENV); }
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 336 "program_lexer.l"
+#line 295 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN); }
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 337 "program_lexer.l"
+#line 296 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); }
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 338 "program_lexer.l"
+#line 297 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); }
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 339 "program_lexer.l"
+#line 298 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); }
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 340 "program_lexer.l"
+#line 299 "program_lexer.l"
{ return TEXTURE; }
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 341 "program_lexer.l"
+#line 300 "program_lexer.l"
{ return TRANSPOSE; }
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 342 "program_lexer.l"
+#line 301 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); }
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 343 "program_lexer.l"
+#line 302 "program_lexer.l"
{ return_token_or_DOT(require_ARB_vp, WEIGHT); }
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 345 "program_lexer.l"
+#line 304 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); }
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 346 "program_lexer.l"
+#line 305 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); }
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 347 "program_lexer.l"
+#line 306 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); }
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 348 "program_lexer.l"
+#line 307 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); }
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 349 "program_lexer.l"
+#line 308 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); }
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 350 "program_lexer.l"
+#line 309 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); }
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 351 "program_lexer.l"
+#line 310 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); }
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 352 "program_lexer.l"
+#line 311 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); }
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 353 "program_lexer.l"
+#line 312 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 354 "program_lexer.l"
+#line 313 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 355 "program_lexer.l"
+#line 314 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 356 "program_lexer.l"
+#line 315 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 357 "program_lexer.l"
+#line 316 "program_lexer.l"
{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); }
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 359 "program_lexer.l"
+#line 318 "program_lexer.l"
{ return handle_ident(yyextra, yytext, yylval); }
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 361 "program_lexer.l"
+#line 320 "program_lexer.l"
{ return DOT_DOT; }
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 363 "program_lexer.l"
+#line 322 "program_lexer.l"
{
yylval->integer = strtol(yytext, NULL, 10);
return INTEGER;
@@ -2237,7 +2210,7 @@ YY_RULE_SETUP
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 367 "program_lexer.l"
+#line 326 "program_lexer.l"
{
yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
@@ -2249,7 +2222,7 @@ case 143:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 371 "program_lexer.l"
+#line 330 "program_lexer.l"
{
yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
@@ -2257,7 +2230,7 @@ YY_RULE_SETUP
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 375 "program_lexer.l"
+#line 334 "program_lexer.l"
{
yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
@@ -2265,7 +2238,7 @@ YY_RULE_SETUP
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 379 "program_lexer.l"
+#line 338 "program_lexer.l"
{
yylval->real = _mesa_strtod(yytext, NULL);
return REAL;
@@ -2273,7 +2246,7 @@ YY_RULE_SETUP
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 384 "program_lexer.l"
+#line 343 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
yylval->swiz_mask.mask = WRITEMASK_XYZW;
@@ -2282,7 +2255,7 @@ YY_RULE_SETUP
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 390 "program_lexer.l"
+#line 349 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XY
@@ -2292,7 +2265,7 @@ YY_RULE_SETUP
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 396 "program_lexer.l"
+#line 355 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XZW;
@@ -2301,7 +2274,7 @@ YY_RULE_SETUP
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 401 "program_lexer.l"
+#line 360 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_YZW;
@@ -2310,7 +2283,7 @@ YY_RULE_SETUP
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 407 "program_lexer.l"
+#line 366 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_X
@@ -2320,7 +2293,7 @@ YY_RULE_SETUP
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 413 "program_lexer.l"
+#line 372 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_Y
@@ -2330,7 +2303,7 @@ YY_RULE_SETUP
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 419 "program_lexer.l"
+#line 378 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_ZW;
@@ -2339,7 +2312,7 @@ YY_RULE_SETUP
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 425 "program_lexer.l"
+#line 384 "program_lexer.l"
{
const unsigned s = swiz_from_char(yytext[1]);
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
@@ -2349,7 +2322,7 @@ YY_RULE_SETUP
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 432 "program_lexer.l"
+#line 391 "program_lexer.l"
{
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
swiz_from_char(yytext[2]),
@@ -2361,7 +2334,7 @@ YY_RULE_SETUP
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 441 "program_lexer.l"
+#line 400 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_NOOP;
yylval->swiz_mask.mask = WRITEMASK_XYZW;
@@ -2370,7 +2343,7 @@ YY_RULE_SETUP
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 447 "program_lexer.l"
+#line 406 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XY
@@ -2380,7 +2353,7 @@ YY_RULE_SETUP
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 453 "program_lexer.l"
+#line 412 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_XZW;
@@ -2389,7 +2362,7 @@ YY_RULE_SETUP
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 458 "program_lexer.l"
+#line 417 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_YZW;
@@ -2398,7 +2371,7 @@ YY_RULE_SETUP
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 464 "program_lexer.l"
+#line 423 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_X
@@ -2408,7 +2381,7 @@ YY_RULE_SETUP
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 470 "program_lexer.l"
+#line 429 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_Y
@@ -2418,7 +2391,7 @@ YY_RULE_SETUP
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 476 "program_lexer.l"
+#line 435 "program_lexer.l"
{
yylval->swiz_mask.swizzle = SWIZZLE_INVAL;
yylval->swiz_mask.mask = WRITEMASK_ZW;
@@ -2427,7 +2400,7 @@ YY_RULE_SETUP
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 482 "program_lexer.l"
+#line 441 "program_lexer.l"
{
const unsigned s = swiz_from_char(yytext[1]);
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s);
@@ -2437,7 +2410,7 @@ YY_RULE_SETUP
YY_BREAK
case 163:
YY_RULE_SETUP
-#line 490 "program_lexer.l"
+#line 449 "program_lexer.l"
{
if (require_ARB_vp) {
return TEXGEN_R;
@@ -2451,7 +2424,7 @@ YY_RULE_SETUP
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 501 "program_lexer.l"
+#line 460 "program_lexer.l"
{
yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]),
swiz_from_char(yytext[2]),
@@ -2463,13 +2436,13 @@ YY_RULE_SETUP
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 510 "program_lexer.l"
+#line 469 "program_lexer.l"
{ return DOT; }
YY_BREAK
case 166:
/* rule 166 can match eol */
YY_RULE_SETUP
-#line 512 "program_lexer.l"
+#line 471 "program_lexer.l"
{
yylloc->first_line++;
yylloc->first_column = 1;
@@ -2480,7 +2453,7 @@ YY_RULE_SETUP
YY_BREAK
case 167:
YY_RULE_SETUP
-#line 519 "program_lexer.l"
+#line 478 "program_lexer.l"
/* eat whitespace */ ;
YY_BREAK
case 168:
@@ -2488,20 +2461,20 @@ case 168:
yyg->yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 520 "program_lexer.l"
+#line 479 "program_lexer.l"
/* eat comments */ ;
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 521 "program_lexer.l"
+#line 480 "program_lexer.l"
{ return yytext[0]; }
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 522 "program_lexer.l"
+#line 481 "program_lexer.l"
ECHO;
YY_BREAK
-#line 2505 "lex.yy.c"
+#line 2478 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -3269,8 +3242,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
@@ -3676,7 +3649,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 522 "program_lexer.l"
+#line 481 "program_lexer.l"
diff --git a/src/mesa/shader/nvprogram.c b/src/mesa/shader/nvprogram.c
index 471a7358a2f..fd6cbb0f409 100644
--- a/src/mesa/shader/nvprogram.c
+++ b/src/mesa/shader/nvprogram.c
@@ -47,6 +47,7 @@
#include "prog_instruction.h"
#include "nvfragparse.h"
#include "nvvertparse.h"
+#include "arbprogparse.h"
#include "nvprogram.h"
@@ -595,6 +596,12 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
+ if (!ctx->Extensions.NV_vertex_program
+ && !ctx->Extensions.NV_fragment_program) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glLoadProgramNV()");
+ return;
+ }
+
if (id == 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glLoadProgramNV(id)");
return;
@@ -627,7 +634,13 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
}
_mesa_HashInsert(ctx->Shared->Programs, id, vprog);
}
- _mesa_parse_nv_vertex_program(ctx, target, program, len, vprog);
+
+ if (ctx->Extensions.ARB_vertex_program
+ && (strncmp((char *) program, "!!ARB", 5) == 0)) {
+ _mesa_parse_arb_vertex_program(ctx, target, program, len, vprog);
+ } else {
+ _mesa_parse_nv_vertex_program(ctx, target, program, len, vprog);
+ }
}
else if (target == GL_FRAGMENT_PROGRAM_NV
&& ctx->Extensions.NV_fragment_program) {
@@ -643,6 +656,20 @@ _mesa_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
}
_mesa_parse_nv_fragment_program(ctx, target, program, len, fprog);
}
+ else if (target == GL_FRAGMENT_PROGRAM_ARB
+ && ctx->Extensions.ARB_fragment_program) {
+ struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
+ if (!fprog || prog == &_mesa_DummyProgram) {
+ fprog = (struct gl_fragment_program *)
+ ctx->Driver.NewProgram(ctx, target, id);
+ if (!fprog) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV");
+ return;
+ }
+ _mesa_HashInsert(ctx->Shared->Programs, id, fprog);
+ }
+ _mesa_parse_arb_fragment_program(ctx, target, program, len, fprog);
+ }
else {
_mesa_error(ctx, GL_INVALID_ENUM, "glLoadProgramNV(target)");
}
diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h
index 1c687bc16cf..224350caac6 100644
--- a/src/mesa/shader/prog_instruction.h
+++ b/src/mesa/shader/prog_instruction.h
@@ -312,7 +312,6 @@ struct prog_dst_register
*/
GLuint CondSrc:1;
/*@}*/
- GLuint pad:28;
};
diff --git a/src/mesa/shader/prog_optimize.c b/src/mesa/shader/prog_optimize.c
index 9d937488e37..4fe351251e8 100644
--- a/src/mesa/shader/prog_optimize.c
+++ b/src/mesa/shader/prog_optimize.c
@@ -38,6 +38,39 @@
static GLboolean dbg = GL_FALSE;
+/* Returns the mask of channels read from the given srcreg in this instruction.
+ */
+static GLuint
+get_src_arg_mask(const struct prog_instruction *inst, int arg)
+{
+ int writemask = inst->DstReg.WriteMask;
+
+ if (inst->CondUpdate)
+ writemask = WRITEMASK_XYZW;
+
+ switch (inst->Opcode) {
+ case OPCODE_MOV:
+ case OPCODE_ABS:
+ case OPCODE_ADD:
+ case OPCODE_MUL:
+ case OPCODE_SUB:
+ return writemask;
+ case OPCODE_RCP:
+ case OPCODE_SIN:
+ case OPCODE_COS:
+ case OPCODE_RSQ:
+ case OPCODE_POW:
+ case OPCODE_EX2:
+ return WRITEMASK_X;
+ case OPCODE_DP2:
+ return WRITEMASK_XY;
+ case OPCODE_DP3:
+ case OPCODE_XPD:
+ return WRITEMASK_XYZ;
+ default:
+ return WRITEMASK_XYZW;
+ }
+}
/**
* In 'prog' remove instruction[i] if removeFlags[i] == TRUE.
@@ -74,6 +107,12 @@ remove_instructions(struct gl_program *prog, const GLboolean *removeFlags)
}
}
}
+ /* Finish removing if the first instruction was to be removed. */
+ if (removeCount > 0) {
+ GLint removeStart = removeEnd - removeCount + 1;
+ _mesa_delete_instructions(prog, removeStart, removeCount);
+ removeStart = removeCount = 0; /* reset removal info */
+ }
return totalRemoved;
}
@@ -187,11 +226,10 @@ _mesa_consolidate_registers(struct gl_program *prog)
static void
_mesa_remove_dead_code(struct gl_program *prog)
{
- GLboolean tempWritten[MAX_PROGRAM_TEMPS], tempRead[MAX_PROGRAM_TEMPS];
+ GLboolean tempRead[MAX_PROGRAM_TEMPS][4];
GLboolean *removeInst; /* per-instruction removal flag */
- GLuint i, rem;
+ GLuint i, rem = 0, comp;
- memset(tempWritten, 0, sizeof(tempWritten));
memset(tempRead, 0, sizeof(tempRead));
if (dbg) {
@@ -212,16 +250,37 @@ _mesa_remove_dead_code(struct gl_program *prog)
for (j = 0; j < numSrc; j++) {
if (inst->SrcReg[j].File == PROGRAM_TEMPORARY) {
const GLuint index = inst->SrcReg[j].Index;
+ GLuint read_mask;
ASSERT(index < MAX_PROGRAM_TEMPS);
+ read_mask = get_src_arg_mask(inst, j);
if (inst->SrcReg[j].RelAddr) {
if (dbg)
_mesa_printf("abort remove dead code (indirect temp)\n");
- _mesa_free(removeInst);
- return;
+ goto done;
}
- tempRead[index] = GL_TRUE;
+ for (comp = 0; comp < 4; comp++) {
+ GLuint swz = (inst->SrcReg[j].Swizzle >> (3 * comp)) & 0x7;
+
+ if ((read_mask & (1 << comp)) == 0)
+ continue;
+
+ switch (swz) {
+ case SWIZZLE_X:
+ tempRead[index][0] = GL_TRUE;
+ break;
+ case SWIZZLE_Y:
+ tempRead[index][1] = GL_TRUE;
+ break;
+ case SWIZZLE_Z:
+ tempRead[index][2] = GL_TRUE;
+ break;
+ case SWIZZLE_W:
+ tempRead[index][3] = GL_TRUE;
+ break;
+ }
+ }
}
}
@@ -233,50 +292,63 @@ _mesa_remove_dead_code(struct gl_program *prog)
if (inst->DstReg.RelAddr) {
if (dbg)
_mesa_printf("abort remove dead code (indirect temp)\n");
- _mesa_free(removeInst);
- return;
+ goto done;
}
- tempWritten[index] = GL_TRUE;
if (inst->CondUpdate) {
/* If we're writing to this register and setting condition
* codes we cannot remove the instruction. Prevent removal
* by setting the 'read' flag.
*/
- tempRead[index] = GL_TRUE;
+ tempRead[index][0] = GL_TRUE;
+ tempRead[index][1] = GL_TRUE;
+ tempRead[index][2] = GL_TRUE;
+ tempRead[index][3] = GL_TRUE;
}
}
}
- if (dbg) {
- for (i = 0; i < MAX_PROGRAM_TEMPS; i++) {
- if (tempWritten[i] && !tempRead[i])
- _mesa_printf("Remove writes to tmp %u\n", i);
- }
- }
-
/* find instructions that write to dead registers, flag for removal */
for (i = 0; i < prog->NumInstructions; i++) {
- const struct prog_instruction *inst = prog->Instructions + i;
- if (inst->DstReg.File == PROGRAM_TEMPORARY) {
- GLint index = inst->DstReg.Index;
- removeInst[i] = (tempWritten[index] && !tempRead[index]);
- if (dbg && removeInst[i]) {
- _mesa_printf("Remove inst %u: ", i);
- _mesa_print_instruction(inst);
- }
+ struct prog_instruction *inst = prog->Instructions + i;
+ const GLuint numDst = _mesa_num_inst_dst_regs(inst->Opcode);
+
+ if (numDst != 0 && inst->DstReg.File == PROGRAM_TEMPORARY) {
+ GLint chan, index = inst->DstReg.Index;
+
+ for (chan = 0; chan < 4; chan++) {
+ if (!tempRead[index][chan] &&
+ inst->DstReg.WriteMask & (1 << chan)) {
+ if (dbg) {
+ _mesa_printf("Remove writemask on %u.%c\n", i,
+ chan == 3 ? 'w' : 'x' + chan);
+ }
+ inst->DstReg.WriteMask &= ~(1 << chan);
+ rem++;
+ }
+ }
+
+ if (inst->DstReg.WriteMask == 0) {
+ /* If we cleared all writes, the instruction can be removed. */
+ if (dbg)
+ _mesa_printf("Remove instruction %u: \n", i);
+ removeInst[i] = GL_TRUE;
+ }
}
}
/* now remove the instructions which aren't needed */
rem = remove_instructions(prog, removeInst);
- _mesa_free(removeInst);
-
if (dbg) {
- _mesa_printf("Optimize: End dead code removal. %u instructions removed\n", rem);
+ _mesa_printf("Optimize: End dead code removal.\n");
+ _mesa_printf(" %u channel writes removed\n", rem);
+ _mesa_printf(" %u instructions removed\n", rem);
/*_mesa_print_program(prog);*/
}
+
+done:
+ _mesa_free(removeInst);
}
@@ -325,6 +397,132 @@ find_next_temp_use(const struct gl_program *prog, GLuint start, GLuint index)
return END;
}
+static GLboolean _mesa_is_flow_control_opcode(enum prog_opcode opcode)
+{
+ switch (opcode) {
+ case OPCODE_BGNLOOP:
+ case OPCODE_BGNSUB:
+ case OPCODE_BRA:
+ case OPCODE_CAL:
+ case OPCODE_CONT:
+ case OPCODE_IF:
+ case OPCODE_ELSE:
+ case OPCODE_END:
+ case OPCODE_ENDIF:
+ case OPCODE_ENDLOOP:
+ case OPCODE_ENDSUB:
+ case OPCODE_RET:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+/**
+ * Try to remove use of extraneous MOV instructions, to free them up for dead
+ * code removal.
+ */
+static void
+_mesa_remove_extra_move_use(struct gl_program *prog)
+{
+ GLuint i, j;
+
+ if (dbg) {
+ _mesa_printf("Optimize: Begin remove extra move use\n");
+ _mesa_print_program(prog);
+ }
+
+ /*
+ * Look for sequences such as this:
+ * MOV tmpX, arg0;
+ * ...
+ * FOO tmpY, tmpX, arg1;
+ * and convert into:
+ * MOV tmpX, arg0;
+ * ...
+ * FOO tmpY, arg0, arg1;
+ */
+
+ for (i = 0; i + 1 < prog->NumInstructions; i++) {
+ const struct prog_instruction *mov = prog->Instructions + i;
+
+ if (mov->Opcode != OPCODE_MOV ||
+ mov->DstReg.File != PROGRAM_TEMPORARY ||
+ mov->DstReg.RelAddr ||
+ mov->DstReg.CondMask != COND_TR ||
+ mov->SaturateMode != SATURATE_OFF ||
+ mov->SrcReg[0].RelAddr)
+ continue;
+
+ /* Walk through remaining instructions until the or src reg gets
+ * rewritten or we get into some flow-control, eliminating the use of
+ * this MOV.
+ */
+ for (j = i + 1; j < prog->NumInstructions; j++) {
+ struct prog_instruction *inst2 = prog->Instructions + j;
+ int arg;
+
+ if (_mesa_is_flow_control_opcode(inst2->Opcode))
+ break;
+
+ /* First rewrite this instruction's args if appropriate. */
+ for (arg = 0; arg < _mesa_num_inst_src_regs(inst2->Opcode); arg++) {
+ int comp;
+ int read_mask = get_src_arg_mask(inst2, arg);
+
+ if (inst2->SrcReg[arg].File != mov->DstReg.File ||
+ inst2->SrcReg[arg].Index != mov->DstReg.Index ||
+ inst2->SrcReg[arg].RelAddr ||
+ inst2->SrcReg[arg].Abs)
+ continue;
+
+ /* Check that all the sources for this arg of inst2 come from inst1
+ * or constants.
+ */
+ for (comp = 0; comp < 4; comp++) {
+ int src_swz = GET_SWZ(inst2->SrcReg[arg].Swizzle, comp);
+
+ /* If the MOV didn't write that channel, can't use it. */
+ if ((read_mask & (1 << comp)) &&
+ src_swz <= SWIZZLE_W &&
+ (mov->DstReg.WriteMask & (1 << src_swz)) == 0)
+ break;
+ }
+ if (comp != 4)
+ continue;
+
+ /* Adjust the swizzles of inst2 to point at MOV's source */
+ for (comp = 0; comp < 4; comp++) {
+ int inst2_swz = GET_SWZ(inst2->SrcReg[arg].Swizzle, comp);
+
+ if (inst2_swz <= SWIZZLE_W) {
+ GLuint s = GET_SWZ(mov->SrcReg[0].Swizzle, inst2_swz);
+ inst2->SrcReg[arg].Swizzle &= ~(7 << (3 * comp));
+ inst2->SrcReg[arg].Swizzle |= s << (3 * comp);
+ inst2->SrcReg[arg].Negate ^= (((mov->SrcReg[0].Negate >>
+ inst2_swz) & 0x1) << comp);
+ }
+ }
+ inst2->SrcReg[arg].File = mov->SrcReg[0].File;
+ inst2->SrcReg[arg].Index = mov->SrcReg[0].Index;
+ }
+
+ /* If this instruction overwrote part of the move, our time is up. */
+ if ((inst2->DstReg.File == mov->DstReg.File &&
+ (inst2->DstReg.RelAddr ||
+ inst2->DstReg.Index == mov->DstReg.Index)) ||
+ (inst2->DstReg.File == mov->SrcReg[0].File &&
+ (inst2->DstReg.RelAddr ||
+ inst2->DstReg.Index == mov->SrcReg[0].Index)))
+ break;
+ }
+ }
+
+ if (dbg) {
+ _mesa_printf("Optimize: End remove extra move use.\n");
+ /*_mesa_print_program(prog);*/
+ }
+}
/**
* Try to remove extraneous MOV instructions from the given program.
@@ -823,6 +1021,8 @@ _mesa_reallocate_registers(struct gl_program *prog)
void
_mesa_optimize_program(GLcontext *ctx, struct gl_program *program)
{
+ _mesa_remove_extra_move_use(program);
+
if (1)
_mesa_remove_dead_code(program);
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index ba4d39452f4..52c102cbaa3 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -826,11 +826,11 @@ _mesa_print_program(const struct gl_program *prog)
* XXX move to imports.[ch] if useful elsewhere.
*/
static const char *
-binary(GLbitfield val)
+binary(GLbitfield64 val)
{
- static char buf[50];
+ static char buf[80];
GLint i, len = 0;
- for (i = 31; i >= 0; --i) {
+ for (i = 63; i >= 0; --i) {
if (val & (1 << i))
buf[len++] = '1';
else if (len > 0 || i == 0)
diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l
index b50fb3c7dc2..e2acb3c0c96 100644
--- a/src/mesa/shader/program_lexer.l
+++ b/src/mesa/shader/program_lexer.l
@@ -46,8 +46,7 @@
if (condition) { \
return token; \
} else { \
- yylval->string = return_string(yyextra, yytext); \
- return IDENTIFIER; \
+ return handle_ident(yyextra, yytext, yylval); \
} \
} while (0)
@@ -71,53 +70,13 @@
yylval->temp_inst.Opcode = OPCODE_ ## opcode; \
return token; \
} else { \
- yylval->string = return_string(yyextra, yytext); \
- return IDENTIFIER; \
+ return handle_ident(yyextra, yytext, yylval); \
} \
} while (0)
#define SWIZZLE_INVAL MAKE_SWIZZLE4(SWIZZLE_NIL, SWIZZLE_NIL, \
SWIZZLE_NIL, SWIZZLE_NIL)
-/**
- * Send a string to the parser using asm_parser_state::string_dumpster
- *
- * Sends a string to the parser using asm_parser_state::string_dumpster as a
- * temporary storage buffer. Data previously stored in
- * asm_parser_state::string_dumpster will be lost. If
- * asm_parser_state::string_dumpster is not large enough to hold the new
- * string, the buffer size will be increased. The buffer size is \b never
- * decreased.
- *
- * \param state Assembler parser state tracking
- * \param str String to be passed to the parser
- *
- * \return
- * A pointer to asm_parser_state::string_dumpster on success or \c NULL on
- * failure. Currently the only failure case is \c ENOMEM.
- */
-static char *
-return_string(struct asm_parser_state *state, const char *str)
-{
- const size_t len = strlen(str);
-
- if (len >= state->dumpster_size) {
- char *const dumpster = _mesa_realloc(state->string_dumpster,
- state->dumpster_size,
- len + 1);
- if (dumpster == NULL) {
- return NULL;
- }
-
- state->string_dumpster = dumpster;
- state->dumpster_size = len + 1;
- }
-
- memcpy(state->string_dumpster, str, len + 1);
- return state->string_dumpster;
-}
-
-
static unsigned
mask_from_char(char c)
{
diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c
index 7f45e0987d7..d4f84294884 100644
--- a/src/mesa/shader/program_parse.tab.c
+++ b/src/mesa/shader/program_parse.tab.c
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,7 +28,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -47,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -55,235 +54,20 @@
/* Pure parsers. */
#define YYPURE 1
-/* Using locations. */
-#define YYLSP_NEEDED 1
+/* Push parsers. */
+#define YYPUSH 0
+/* Pull parsers. */
+#define YYPULL 1
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- ARBvp_10 = 258,
- ARBfp_10 = 259,
- ADDRESS = 260,
- ALIAS = 261,
- ATTRIB = 262,
- OPTION = 263,
- OUTPUT = 264,
- PARAM = 265,
- TEMP = 266,
- END = 267,
- BIN_OP = 268,
- BINSC_OP = 269,
- SAMPLE_OP = 270,
- SCALAR_OP = 271,
- TRI_OP = 272,
- VECTOR_OP = 273,
- ARL = 274,
- KIL = 275,
- SWZ = 276,
- TXD_OP = 277,
- INTEGER = 278,
- REAL = 279,
- AMBIENT = 280,
- ATTENUATION = 281,
- BACK = 282,
- CLIP = 283,
- COLOR = 284,
- DEPTH = 285,
- DIFFUSE = 286,
- DIRECTION = 287,
- EMISSION = 288,
- ENV = 289,
- EYE = 290,
- FOG = 291,
- FOGCOORD = 292,
- FRAGMENT = 293,
- FRONT = 294,
- HALF = 295,
- INVERSE = 296,
- INVTRANS = 297,
- LIGHT = 298,
- LIGHTMODEL = 299,
- LIGHTPROD = 300,
- LOCAL = 301,
- MATERIAL = 302,
- MAT_PROGRAM = 303,
- MATRIX = 304,
- MATRIXINDEX = 305,
- MODELVIEW = 306,
- MVP = 307,
- NORMAL = 308,
- OBJECT = 309,
- PALETTE = 310,
- PARAMS = 311,
- PLANE = 312,
- POINT_TOK = 313,
- POINTSIZE = 314,
- POSITION = 315,
- PRIMARY = 316,
- PROGRAM = 317,
- PROJECTION = 318,
- RANGE = 319,
- RESULT = 320,
- ROW = 321,
- SCENECOLOR = 322,
- SECONDARY = 323,
- SHININESS = 324,
- SIZE_TOK = 325,
- SPECULAR = 326,
- SPOT = 327,
- STATE = 328,
- TEXCOORD = 329,
- TEXENV = 330,
- TEXGEN = 331,
- TEXGEN_Q = 332,
- TEXGEN_R = 333,
- TEXGEN_S = 334,
- TEXGEN_T = 335,
- TEXTURE = 336,
- TRANSPOSE = 337,
- TEXTURE_UNIT = 338,
- TEX_1D = 339,
- TEX_2D = 340,
- TEX_3D = 341,
- TEX_CUBE = 342,
- TEX_RECT = 343,
- TEX_SHADOW1D = 344,
- TEX_SHADOW2D = 345,
- TEX_SHADOWRECT = 346,
- TEX_ARRAY1D = 347,
- TEX_ARRAY2D = 348,
- TEX_ARRAYSHADOW1D = 349,
- TEX_ARRAYSHADOW2D = 350,
- VERTEX = 351,
- VTXATTRIB = 352,
- WEIGHT = 353,
- IDENTIFIER = 354,
- USED_IDENTIFIER = 355,
- MASK4 = 356,
- MASK3 = 357,
- MASK2 = 358,
- MASK1 = 359,
- SWIZZLE = 360,
- DOT_DOT = 361,
- DOT = 362
- };
-#endif
-/* Tokens. */
-#define ARBvp_10 258
-#define ARBfp_10 259
-#define ADDRESS 260
-#define ALIAS 261
-#define ATTRIB 262
-#define OPTION 263
-#define OUTPUT 264
-#define PARAM 265
-#define TEMP 266
-#define END 267
-#define BIN_OP 268
-#define BINSC_OP 269
-#define SAMPLE_OP 270
-#define SCALAR_OP 271
-#define TRI_OP 272
-#define VECTOR_OP 273
-#define ARL 274
-#define KIL 275
-#define SWZ 276
-#define TXD_OP 277
-#define INTEGER 278
-#define REAL 279
-#define AMBIENT 280
-#define ATTENUATION 281
-#define BACK 282
-#define CLIP 283
-#define COLOR 284
-#define DEPTH 285
-#define DIFFUSE 286
-#define DIRECTION 287
-#define EMISSION 288
-#define ENV 289
-#define EYE 290
-#define FOG 291
-#define FOGCOORD 292
-#define FRAGMENT 293
-#define FRONT 294
-#define HALF 295
-#define INVERSE 296
-#define INVTRANS 297
-#define LIGHT 298
-#define LIGHTMODEL 299
-#define LIGHTPROD 300
-#define LOCAL 301
-#define MATERIAL 302
-#define MAT_PROGRAM 303
-#define MATRIX 304
-#define MATRIXINDEX 305
-#define MODELVIEW 306
-#define MVP 307
-#define NORMAL 308
-#define OBJECT 309
-#define PALETTE 310
-#define PARAMS 311
-#define PLANE 312
-#define POINT_TOK 313
-#define POINTSIZE 314
-#define POSITION 315
-#define PRIMARY 316
-#define PROGRAM 317
-#define PROJECTION 318
-#define RANGE 319
-#define RESULT 320
-#define ROW 321
-#define SCENECOLOR 322
-#define SECONDARY 323
-#define SHININESS 324
-#define SIZE_TOK 325
-#define SPECULAR 326
-#define SPOT 327
-#define STATE 328
-#define TEXCOORD 329
-#define TEXENV 330
-#define TEXGEN 331
-#define TEXGEN_Q 332
-#define TEXGEN_R 333
-#define TEXGEN_S 334
-#define TEXGEN_T 335
-#define TEXTURE 336
-#define TRANSPOSE 337
-#define TEXTURE_UNIT 338
-#define TEX_1D 339
-#define TEX_2D 340
-#define TEX_3D 341
-#define TEX_CUBE 342
-#define TEX_RECT 343
-#define TEX_SHADOW1D 344
-#define TEX_SHADOW2D 345
-#define TEX_SHADOWRECT 346
-#define TEX_ARRAY1D 347
-#define TEX_ARRAY2D 348
-#define TEX_ARRAYSHADOW1D 349
-#define TEX_ARRAYSHADOW2D 350
-#define VERTEX 351
-#define VTXATTRIB 352
-#define WEIGHT 353
-#define IDENTIFIER 354
-#define USED_IDENTIFIER 355
-#define MASK4 356
-#define MASK3 357
-#define MASK2 358
-#define MASK1 359
-#define SWIZZLE 360
-#define DOT_DOT 361
-#define DOT 362
-
+/* Using locations. */
+#define YYLSP_NEEDED 1
/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
#line 1 "program_parse.y"
/*
@@ -400,6 +184,9 @@ static struct asm_instruction *asm_instruction_copy_ctor(
#define YYLEX_PARAM state->scanner
+/* Line 189 of yacc.c */
+#line 189 "program_parse.tab.c"
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -418,10 +205,130 @@ static struct asm_instruction *asm_instruction_copy_ctor(
# define YYTOKEN_TABLE 0
#endif
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ ARBvp_10 = 258,
+ ARBfp_10 = 259,
+ ADDRESS = 260,
+ ALIAS = 261,
+ ATTRIB = 262,
+ OPTION = 263,
+ OUTPUT = 264,
+ PARAM = 265,
+ TEMP = 266,
+ END = 267,
+ BIN_OP = 268,
+ BINSC_OP = 269,
+ SAMPLE_OP = 270,
+ SCALAR_OP = 271,
+ TRI_OP = 272,
+ VECTOR_OP = 273,
+ ARL = 274,
+ KIL = 275,
+ SWZ = 276,
+ TXD_OP = 277,
+ INTEGER = 278,
+ REAL = 279,
+ AMBIENT = 280,
+ ATTENUATION = 281,
+ BACK = 282,
+ CLIP = 283,
+ COLOR = 284,
+ DEPTH = 285,
+ DIFFUSE = 286,
+ DIRECTION = 287,
+ EMISSION = 288,
+ ENV = 289,
+ EYE = 290,
+ FOG = 291,
+ FOGCOORD = 292,
+ FRAGMENT = 293,
+ FRONT = 294,
+ HALF = 295,
+ INVERSE = 296,
+ INVTRANS = 297,
+ LIGHT = 298,
+ LIGHTMODEL = 299,
+ LIGHTPROD = 300,
+ LOCAL = 301,
+ MATERIAL = 302,
+ MAT_PROGRAM = 303,
+ MATRIX = 304,
+ MATRIXINDEX = 305,
+ MODELVIEW = 306,
+ MVP = 307,
+ NORMAL = 308,
+ OBJECT = 309,
+ PALETTE = 310,
+ PARAMS = 311,
+ PLANE = 312,
+ POINT_TOK = 313,
+ POINTSIZE = 314,
+ POSITION = 315,
+ PRIMARY = 316,
+ PROGRAM = 317,
+ PROJECTION = 318,
+ RANGE = 319,
+ RESULT = 320,
+ ROW = 321,
+ SCENECOLOR = 322,
+ SECONDARY = 323,
+ SHININESS = 324,
+ SIZE_TOK = 325,
+ SPECULAR = 326,
+ SPOT = 327,
+ STATE = 328,
+ TEXCOORD = 329,
+ TEXENV = 330,
+ TEXGEN = 331,
+ TEXGEN_Q = 332,
+ TEXGEN_R = 333,
+ TEXGEN_S = 334,
+ TEXGEN_T = 335,
+ TEXTURE = 336,
+ TRANSPOSE = 337,
+ TEXTURE_UNIT = 338,
+ TEX_1D = 339,
+ TEX_2D = 340,
+ TEX_3D = 341,
+ TEX_CUBE = 342,
+ TEX_RECT = 343,
+ TEX_SHADOW1D = 344,
+ TEX_SHADOW2D = 345,
+ TEX_SHADOWRECT = 346,
+ TEX_ARRAY1D = 347,
+ TEX_ARRAY2D = 348,
+ TEX_ARRAYSHADOW1D = 349,
+ TEX_ARRAYSHADOW2D = 350,
+ VERTEX = 351,
+ VTXATTRIB = 352,
+ WEIGHT = 353,
+ IDENTIFIER = 354,
+ USED_IDENTIFIER = 355,
+ MASK4 = 356,
+ MASK3 = 357,
+ MASK2 = 358,
+ MASK1 = 359,
+ SWIZZLE = 360,
+ DOT_DOT = 361,
+ DOT = 362
+ };
+#endif
+
+
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 122 "program_parse.y"
{
+
+/* Line 214 of yacc.c */
+#line 122 "program_parse.y"
+
struct asm_instruction *inst;
struct asm_symbol *sym;
struct asm_symbol temp_sym;
@@ -445,13 +352,15 @@ typedef union YYSTYPE
unsigned xyzw_valid:1;
unsigned negate:1;
} ext_swizzle;
-}
-/* Line 187 of yacc.c. */
-#line 451 "program_parse.tab.c"
- YYSTYPE;
+
+
+
+/* Line 214 of yacc.c */
+#line 360 "program_parse.tab.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
@@ -469,14 +378,16 @@ typedef struct YYLTYPE
/* Copy the second part of user declarations. */
+
+/* Line 264 of yacc.c */
#line 267 "program_parse.y"
extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param,
void *yyscanner);
-/* Line 216 of yacc.c. */
-#line 480 "program_parse.tab.c"
+/* Line 264 of yacc.c */
+#line 391 "program_parse.tab.c"
#ifdef short
# undef short
@@ -551,14 +462,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -640,9 +551,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- YYLTYPE yyls;
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+ YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
@@ -677,12 +588,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -877,35 +788,35 @@ static const yytype_int16 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 274, 274, 277, 285, 297, 298, 301, 323, 324,
- 327, 342, 345, 350, 357, 358, 359, 360, 361, 362,
- 363, 366, 367, 368, 371, 377, 383, 389, 396, 402,
- 409, 453, 458, 468, 512, 518, 519, 520, 521, 522,
- 523, 524, 525, 526, 527, 528, 529, 532, 544, 552,
- 569, 576, 593, 604, 624, 649, 656, 689, 696, 711,
- 761, 800, 809, 830, 839, 843, 870, 887, 887, 889,
- 896, 908, 909, 910, 913, 927, 941, 959, 970, 982,
- 984, 985, 986, 987, 990, 990, 990, 990, 991, 994,
- 998, 1003, 1010, 1017, 1024, 1047, 1070, 1071, 1072, 1073,
- 1074, 1075, 1078, 1096, 1100, 1106, 1110, 1114, 1118, 1127,
- 1136, 1140, 1145, 1151, 1162, 1162, 1163, 1165, 1169, 1173,
- 1177, 1183, 1183, 1185, 1201, 1224, 1227, 1238, 1244, 1250,
- 1251, 1258, 1264, 1270, 1278, 1284, 1290, 1298, 1304, 1310,
- 1318, 1319, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329,
- 1330, 1331, 1332, 1335, 1344, 1348, 1352, 1358, 1367, 1371,
- 1375, 1384, 1388, 1394, 1400, 1407, 1412, 1420, 1430, 1432,
- 1440, 1446, 1450, 1454, 1460, 1471, 1480, 1484, 1489, 1493,
- 1497, 1501, 1507, 1514, 1518, 1524, 1532, 1543, 1550, 1554,
- 1560, 1570, 1581, 1585, 1603, 1612, 1615, 1621, 1625, 1629,
- 1635, 1646, 1651, 1656, 1661, 1666, 1671, 1679, 1682, 1687,
- 1700, 1708, 1719, 1727, 1727, 1729, 1729, 1731, 1741, 1746,
- 1753, 1763, 1772, 1777, 1784, 1794, 1804, 1816, 1816, 1817,
- 1817, 1819, 1829, 1837, 1847, 1855, 1863, 1872, 1883, 1887,
- 1893, 1894, 1895, 1898, 1898, 1901, 1936, 1940, 1940, 1943,
- 1949, 1957, 1970, 1979, 1988, 1992, 2001, 2010, 2021, 2028,
- 2033, 2042, 2054, 2057, 2066, 2077, 2078, 2079, 2082, 2083,
- 2084, 2087, 2088, 2091, 2092, 2095, 2096, 2099, 2110, 2121,
- 2132, 2153, 2154
+ 0, 274, 274, 277, 285, 297, 298, 301, 325, 326,
+ 329, 344, 347, 352, 359, 360, 361, 362, 363, 364,
+ 365, 368, 369, 370, 373, 379, 385, 391, 398, 404,
+ 411, 455, 460, 470, 514, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 534, 546, 554,
+ 571, 578, 595, 606, 626, 651, 658, 691, 698, 713,
+ 768, 809, 818, 839, 848, 852, 881, 900, 900, 902,
+ 909, 921, 922, 923, 926, 940, 954, 974, 985, 997,
+ 999, 1000, 1001, 1002, 1005, 1005, 1005, 1005, 1006, 1009,
+ 1013, 1018, 1025, 1032, 1039, 1062, 1085, 1086, 1087, 1088,
+ 1089, 1090, 1093, 1112, 1116, 1122, 1126, 1130, 1134, 1143,
+ 1152, 1156, 1161, 1167, 1178, 1178, 1179, 1181, 1185, 1189,
+ 1193, 1199, 1199, 1201, 1218, 1243, 1246, 1257, 1263, 1269,
+ 1270, 1277, 1283, 1289, 1297, 1303, 1309, 1317, 1323, 1329,
+ 1337, 1338, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348,
+ 1349, 1350, 1351, 1354, 1363, 1367, 1371, 1377, 1386, 1390,
+ 1394, 1403, 1407, 1413, 1419, 1426, 1431, 1439, 1449, 1451,
+ 1459, 1465, 1469, 1473, 1479, 1490, 1499, 1503, 1508, 1512,
+ 1516, 1520, 1526, 1533, 1537, 1543, 1551, 1562, 1569, 1573,
+ 1579, 1589, 1600, 1604, 1622, 1631, 1634, 1640, 1644, 1648,
+ 1654, 1665, 1670, 1675, 1680, 1685, 1690, 1698, 1701, 1706,
+ 1719, 1727, 1738, 1746, 1746, 1748, 1748, 1750, 1760, 1765,
+ 1772, 1782, 1791, 1796, 1803, 1813, 1823, 1835, 1835, 1836,
+ 1836, 1838, 1848, 1856, 1866, 1874, 1882, 1891, 1902, 1906,
+ 1912, 1913, 1914, 1917, 1917, 1920, 1955, 1959, 1959, 1962,
+ 1969, 1978, 1992, 2001, 2010, 2014, 2023, 2032, 2043, 2050,
+ 2055, 2064, 2076, 2079, 2088, 2099, 2100, 2101, 2104, 2105,
+ 2106, 2109, 2110, 2113, 2114, 2117, 2118, 2121, 2132, 2143,
+ 2154, 2180, 2181
};
#endif
@@ -1553,17 +1464,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, state)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -1599,11 +1513,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule, state)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, &(yylsp[(yyi + 1) - (yynrhs)]) , state);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -1887,10 +1801,8 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp, state)
break;
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1909,10 +1821,9 @@ int yyparse ();
-
-/*----------.
-| yyparse. |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1936,88 +1847,97 @@ yyparse (state)
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
-/* Location data for the look-ahead symbol. */
+/* Location data for the lookahead symbol. */
YYLTYPE yylloc;
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+ /* Number of syntax errors so far. */
+ int yynerrs;
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ `yyls': related to locations.
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss = yyssa;
- yytype_int16 *yyssp;
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[2];
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
- YYSIZE_T yystacksize = YYINITDEPTH;
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[2];
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
YYLTYPE yyloc;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
+
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
yylsp = yyls;
+
#if YYLTYPE_IS_TRIVIAL
/* Initialize the default location before parsing starts. */
yylloc.first_line = yylloc.last_line = 1;
- yylloc.first_column = yylloc.last_column = 0;
+ yylloc.first_column = yylloc.last_column = 1;
#endif
goto yysetstate;
@@ -2056,6 +1976,7 @@ YYLTYPE yylloc;
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
+
yyls = yyls1;
yyss = yyss1;
yyvs = yyvs1;
@@ -2077,9 +1998,9 @@ YYLTYPE yylloc;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
- YYSTACK_RELOCATE (yyls);
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -2100,6 +2021,9 @@ YYLTYPE yylloc;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -2108,16 +2032,16 @@ YYLTYPE yylloc;
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -2149,20 +2073,16 @@ yybackup:
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -2203,6 +2123,8 @@ yyreduce:
switch (yyn)
{
case 3:
+
+/* Line 1455 of yacc.c */
#line 278 "program_parse.y"
{
if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) {
@@ -2214,6 +2136,8 @@ yyreduce:
break;
case 4:
+
+/* Line 1455 of yacc.c */
#line 286 "program_parse.y"
{
if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) {
@@ -2227,6 +2151,8 @@ yyreduce:
break;
case 7:
+
+/* Line 1455 of yacc.c */
#line 302 "program_parse.y"
{
int valid = 0;
@@ -2238,6 +2164,8 @@ yyreduce:
}
+ free((yyvsp[(2) - (3)].string));
+
if (!valid) {
const char *const err_str = (state->mode == ARB_vertex)
? "invalid ARB vertex program option"
@@ -2250,7 +2178,9 @@ yyreduce:
break;
case 10:
-#line 328 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 330 "program_parse.y"
{
if ((yyvsp[(1) - (2)].inst) != NULL) {
if (state->inst_tail == NULL) {
@@ -2268,7 +2198,9 @@ yyreduce:
break;
case 12:
-#line 346 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 348 "program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumAluInstructions++;
@@ -2276,7 +2208,9 @@ yyreduce:
break;
case 13:
-#line 351 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 353 "program_parse.y"
{
(yyval.inst) = (yyvsp[(1) - (1)].inst);
state->prog->NumTexInstructions++;
@@ -2284,49 +2218,63 @@ yyreduce:
break;
case 24:
-#line 372 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 374 "program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
break;
case 25:
-#line 378 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 380 "program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
break;
case 26:
-#line 384 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 386 "program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL);
;}
break;
case 27:
-#line 390 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 392 "program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL);
;}
break;
case 28:
-#line 397 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 399 "program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL);
;}
break;
case 29:
-#line 404 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 406 "program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg));
;}
break;
case 30:
-#line 410 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 412 "program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL);
if ((yyval.inst) != NULL) {
@@ -2371,7 +2319,9 @@ yyreduce:
break;
case 31:
-#line 454 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 456 "program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL);
state->fragment.UsesKill = 1;
@@ -2379,7 +2329,9 @@ yyreduce:
break;
case 32:
-#line 459 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 461 "program_parse.y"
{
(yyval.inst) = asm_instruction_ctor(OPCODE_KIL_NV, NULL, NULL, NULL, NULL);
(yyval.inst)->Base.DstReg.CondMask = (yyvsp[(2) - (2)].dst_reg).CondMask;
@@ -2390,7 +2342,9 @@ yyreduce:
break;
case 33:
-#line 469 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 471 "program_parse.y"
{
(yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (12)].temp_inst), & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg));
if ((yyval.inst) != NULL) {
@@ -2435,74 +2389,102 @@ yyreduce:
break;
case 34:
-#line 513 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 515 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
break;
case 35:
-#line 518 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 520 "program_parse.y"
{ (yyval.integer) = TEXTURE_1D_INDEX; ;}
break;
case 36:
-#line 519 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 521 "program_parse.y"
{ (yyval.integer) = TEXTURE_2D_INDEX; ;}
break;
case 37:
-#line 520 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 522 "program_parse.y"
{ (yyval.integer) = TEXTURE_3D_INDEX; ;}
break;
case 38:
-#line 521 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 523 "program_parse.y"
{ (yyval.integer) = TEXTURE_CUBE_INDEX; ;}
break;
case 39:
-#line 522 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 524 "program_parse.y"
{ (yyval.integer) = TEXTURE_RECT_INDEX; ;}
break;
case 40:
-#line 523 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 525 "program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_INDEX; ;}
break;
case 41:
-#line 524 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 526 "program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_INDEX; ;}
break;
case 42:
-#line 525 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 527 "program_parse.y"
{ (yyval.integer) = -TEXTURE_RECT_INDEX; ;}
break;
case 43:
-#line 526 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 528 "program_parse.y"
{ (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; ;}
break;
case 44:
-#line 527 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 529 "program_parse.y"
{ (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; ;}
break;
case 45:
-#line 528 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 530 "program_parse.y"
{ (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; ;}
break;
case 46:
-#line 529 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 531 "program_parse.y"
{ (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; ;}
break;
case 47:
-#line 533 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 535 "program_parse.y"
{
/* FIXME: Is this correct? Should the extenedSwizzle be applied
* FIXME: to the existing swizzle?
@@ -2515,7 +2497,9 @@ yyreduce:
break;
case 48:
-#line 545 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 547 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(2) - (2)].src_reg);
@@ -2526,7 +2510,9 @@ yyreduce:
break;
case 49:
-#line 553 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 555 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(3) - (4)].src_reg);
@@ -2544,7 +2530,9 @@ yyreduce:
break;
case 50:
-#line 570 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 572 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(1) - (2)].src_reg);
@@ -2554,7 +2542,9 @@ yyreduce:
break;
case 51:
-#line 577 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 579 "program_parse.y"
{
struct asm_symbol temp_sym;
@@ -2572,7 +2562,9 @@ yyreduce:
break;
case 52:
-#line 594 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 596 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(2) - (3)].src_reg);
@@ -2586,7 +2578,9 @@ yyreduce:
break;
case 53:
-#line 605 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 607 "program_parse.y"
{
(yyval.src_reg) = (yyvsp[(3) - (5)].src_reg);
@@ -2606,7 +2600,9 @@ yyreduce:
break;
case 54:
-#line 625 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 627 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (3)].dst_reg);
(yyval.dst_reg).WriteMask = (yyvsp[(2) - (3)].swiz_mask).mask;
@@ -2626,13 +2622,15 @@ yyreduce:
YYERROR;
}
- state->prog->OutputsWritten |= (1U << (yyval.dst_reg).Index);
+ state->prog->OutputsWritten |= BITFIELD64_BIT((yyval.dst_reg).Index);
}
;}
break;
case 55:
-#line 650 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 652 "program_parse.y"
{
set_dst_reg(& (yyval.dst_reg), PROGRAM_ADDRESS, 0);
(yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask;
@@ -2640,7 +2638,9 @@ yyreduce:
break;
case 56:
-#line 657 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 659 "program_parse.y"
{
const unsigned xyzw_valid =
((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0)
@@ -2674,7 +2674,9 @@ yyreduce:
break;
case 57:
-#line 690 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 692 "program_parse.y"
{
(yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle);
(yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0;
@@ -2682,7 +2684,9 @@ yyreduce:
break;
case 58:
-#line 697 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 699 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector");
@@ -2700,14 +2704,21 @@ yyreduce:
break;
case 59:
-#line 712 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 714 "program_parse.y"
{
+ char s;
+
if (strlen((yyvsp[(1) - (1)].string)) > 1) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector");
YYERROR;
}
- switch ((yyvsp[(1) - (1)].string)[0]) {
+ s = (yyvsp[(1) - (1)].string)[0];
+ free((yyvsp[(1) - (1)].string));
+
+ switch (s) {
case 'x':
(yyval.ext_swizzle).swz = SWIZZLE_X;
(yyval.ext_swizzle).xyzw_valid = 1;
@@ -2751,11 +2762,15 @@ yyreduce:
break;
case 60:
-#line 762 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 769 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
+ free((yyvsp[(1) - (1)].string));
+
if (s == NULL) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable");
YYERROR;
@@ -2793,7 +2808,9 @@ yyreduce:
break;
case 61:
-#line 801 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 810 "program_parse.y"
{
set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, (yyvsp[(1) - (1)].attrib));
state->prog->InputsRead |= (1U << (yyval.src_reg).Base.Index);
@@ -2805,7 +2822,9 @@ yyreduce:
break;
case 62:
-#line 810 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 819 "program_parse.y"
{
if (! (yyvsp[(3) - (4)].src_reg).Base.RelAddr
&& ((unsigned) (yyvsp[(3) - (4)].src_reg).Base.Index >= (yyvsp[(1) - (4)].sym)->param_binding_length)) {
@@ -2829,7 +2848,9 @@ yyreduce:
break;
case 63:
-#line 831 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 840 "program_parse.y"
{
gl_register_file file = ((yyvsp[(1) - (1)].temp_sym).name != NULL)
? (yyvsp[(1) - (1)].temp_sym).param_binding_type
@@ -2839,18 +2860,24 @@ yyreduce:
break;
case 64:
-#line 840 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 849 "program_parse.y"
{
set_dst_reg(& (yyval.dst_reg), PROGRAM_OUTPUT, (yyvsp[(1) - (1)].result));
;}
break;
case 65:
-#line 844 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 853 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
+ free((yyvsp[(1) - (1)].string));
+
if (s == NULL) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable");
YYERROR;
@@ -2874,11 +2901,15 @@ yyreduce:
break;
case 66:
-#line 871 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 882 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
+ free((yyvsp[(1) - (1)].string));
+
if (s == NULL) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable");
YYERROR;
@@ -2892,7 +2923,9 @@ yyreduce:
break;
case 69:
-#line 890 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 903 "program_parse.y"
{
init_src_reg(& (yyval.src_reg));
(yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer);
@@ -2900,7 +2933,9 @@ yyreduce:
break;
case 70:
-#line 897 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 910 "program_parse.y"
{
/* FINISHME: Add support for multiple address registers.
*/
@@ -2913,22 +2948,30 @@ yyreduce:
break;
case 71:
-#line 908 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 921 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 72:
-#line 909 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 922 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
case 73:
-#line 910 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 923 "program_parse.y"
{ (yyval.integer) = -(yyvsp[(2) - (2)].integer); ;}
break;
case 74:
-#line 914 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 927 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 63)) {
char s[100];
@@ -2943,7 +2986,9 @@ yyreduce:
break;
case 75:
-#line 928 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 941 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > 64)) {
char s[100];
@@ -2958,11 +3003,15 @@ yyreduce:
break;
case 76:
-#line 942 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 955 "program_parse.y"
{
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string));
+ free((yyvsp[(1) - (1)].string));
+
if (s == NULL) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid array member");
YYERROR;
@@ -2977,7 +3026,9 @@ yyreduce:
break;
case 77:
-#line 960 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 975 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector");
@@ -2989,7 +3040,9 @@ yyreduce:
break;
case 78:
-#line 971 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 986 "program_parse.y"
{
if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) {
yyerror(& (yylsp[(1) - (1)]), state,
@@ -3002,31 +3055,41 @@ yyreduce:
break;
case 83:
-#line 987 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1002 "program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 88:
-#line 991 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1006 "program_parse.y"
{ (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; ;}
break;
case 89:
-#line 995 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1010 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg);
;}
break;
case 90:
-#line 999 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1014 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg);
;}
break;
case 91:
-#line 1003 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1018 "program_parse.y"
{
(yyval.dst_reg).CondMask = COND_TR;
(yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP;
@@ -3035,7 +3098,9 @@ yyreduce:
break;
case 92:
-#line 1011 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1026 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
(yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle;
@@ -3043,7 +3108,9 @@ yyreduce:
break;
case 93:
-#line 1018 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1033 "program_parse.y"
{
(yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg);
(yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle;
@@ -3051,7 +3118,9 @@ yyreduce:
break;
case 94:
-#line 1025 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1040 "program_parse.y"
{
const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string));
if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) {
@@ -3075,7 +3144,9 @@ yyreduce:
break;
case 95:
-#line 1048 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1063 "program_parse.y"
{
const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string));
if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) {
@@ -3099,12 +3170,15 @@ yyreduce:
break;
case 102:
-#line 1079 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1094 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)]));
if (s == NULL) {
+ free((yyvsp[(2) - (4)].string));
YYERROR;
} else {
s->attrib_binding = (yyvsp[(4) - (4)].attrib);
@@ -3118,42 +3192,54 @@ yyreduce:
break;
case 103:
-#line 1097 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1113 "program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
break;
case 104:
-#line 1101 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1117 "program_parse.y"
{
(yyval.attrib) = (yyvsp[(2) - (2)].attrib);
;}
break;
case 105:
-#line 1107 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1123 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_POS;
;}
break;
case 106:
-#line 1111 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1127 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_WEIGHT;
;}
break;
case 107:
-#line 1115 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1131 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_NORMAL;
;}
break;
case 108:
-#line 1119 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1135 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_secondary_color) {
yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported");
@@ -3165,7 +3251,9 @@ yyreduce:
break;
case 109:
-#line 1128 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1144 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_fog_coord) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported");
@@ -3177,14 +3265,18 @@ yyreduce:
break;
case 110:
-#line 1137 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1153 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
break;
case 111:
-#line 1141 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1157 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
@@ -3192,14 +3284,18 @@ yyreduce:
break;
case 112:
-#line 1146 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1162 "program_parse.y"
{
(yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer);
;}
break;
case 113:
-#line 1152 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1168 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference");
@@ -3211,40 +3307,51 @@ yyreduce:
break;
case 117:
-#line 1166 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1182 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_WPOS;
;}
break;
case 118:
-#line 1170 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1186 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer);
;}
break;
case 119:
-#line 1174 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1190 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_FOGC;
;}
break;
case 120:
-#line 1178 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1194 "program_parse.y"
{
(yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer);
;}
break;
case 123:
-#line 1186 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1202 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)]));
if (s == NULL) {
+ free((yyvsp[(2) - (3)].string));
YYERROR;
} else {
s->param_binding_type = (yyvsp[(3) - (3)].temp_sym).param_binding_type;
@@ -3256,9 +3363,12 @@ yyreduce:
break;
case 124:
-#line 1202 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1219 "program_parse.y"
{
if (((yyvsp[(4) - (6)].integer) != 0) && ((unsigned) (yyvsp[(4) - (6)].integer) != (yyvsp[(6) - (6)].temp_sym).param_binding_length)) {
+ free((yyvsp[(2) - (6)].string));
yyerror(& (yylsp[(4) - (6)]), state,
"parameter array size and number of bindings must match");
YYERROR;
@@ -3267,6 +3377,7 @@ yyreduce:
declare_variable(state, (yyvsp[(2) - (6)].string), (yyvsp[(6) - (6)].temp_sym).type, & (yylsp[(2) - (6)]));
if (s == NULL) {
+ free((yyvsp[(2) - (6)].string));
YYERROR;
} else {
s->param_binding_type = (yyvsp[(6) - (6)].temp_sym).param_binding_type;
@@ -3279,14 +3390,18 @@ yyreduce:
break;
case 125:
-#line 1224 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1243 "program_parse.y"
{
(yyval.integer) = 0;
;}
break;
case 126:
-#line 1228 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1247 "program_parse.y"
{
if (((yyvsp[(1) - (1)].integer) < 1) || ((unsigned) (yyvsp[(1) - (1)].integer) > state->limits->MaxParameters)) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid parameter array size");
@@ -3298,21 +3413,27 @@ yyreduce:
break;
case 127:
-#line 1239 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1258 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym);
;}
break;
case 128:
-#line 1245 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1264 "program_parse.y"
{
(yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym);
;}
break;
case 130:
-#line 1252 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1271 "program_parse.y"
{
(yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length;
(yyval.temp_sym) = (yyvsp[(1) - (3)].temp_sym);
@@ -3320,7 +3441,9 @@ yyreduce:
break;
case 131:
-#line 1259 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1278 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3329,7 +3452,9 @@ yyreduce:
break;
case 132:
-#line 1265 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1284 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3338,7 +3463,9 @@ yyreduce:
break;
case 133:
-#line 1271 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1290 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3347,7 +3474,9 @@ yyreduce:
break;
case 134:
-#line 1279 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1298 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3356,7 +3485,9 @@ yyreduce:
break;
case 135:
-#line 1285 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1304 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3365,7 +3496,9 @@ yyreduce:
break;
case 136:
-#line 1291 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1310 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3374,7 +3507,9 @@ yyreduce:
break;
case 137:
-#line 1299 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1318 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3383,7 +3518,9 @@ yyreduce:
break;
case 138:
-#line 1305 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1324 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3392,7 +3529,9 @@ yyreduce:
break;
case 139:
-#line 1311 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1330 "program_parse.y"
{
memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym)));
(yyval.temp_sym).param_binding_begin = ~0;
@@ -3401,72 +3540,100 @@ yyreduce:
break;
case 140:
-#line 1318 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1337 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); ;}
break;
case 141:
-#line 1319 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1338 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 142:
-#line 1322 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1341 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 143:
-#line 1323 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1342 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 144:
-#line 1324 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1343 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 145:
-#line 1325 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1344 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 146:
-#line 1326 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1345 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 147:
-#line 1327 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1346 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 148:
-#line 1328 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1347 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 149:
-#line 1329 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1348 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 150:
-#line 1330 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1349 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 151:
-#line 1331 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1350 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 152:
-#line 1332 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1351 "program_parse.y"
{ memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); ;}
break;
case 153:
-#line 1336 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1355 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_MATERIAL;
@@ -3476,28 +3643,36 @@ yyreduce:
break;
case 154:
-#line 1345 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1364 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
case 155:
-#line 1349 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1368 "program_parse.y"
{
(yyval.integer) = STATE_EMISSION;
;}
break;
case 156:
-#line 1353 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1372 "program_parse.y"
{
(yyval.integer) = STATE_SHININESS;
;}
break;
case 157:
-#line 1359 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1378 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHT;
@@ -3507,21 +3682,27 @@ yyreduce:
break;
case 158:
-#line 1368 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1387 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
case 159:
-#line 1372 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1391 "program_parse.y"
{
(yyval.integer) = STATE_POSITION;
;}
break;
case 160:
-#line 1376 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1395 "program_parse.y"
{
if (!state->ctx->Extensions.EXT_point_parameters) {
yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported");
@@ -3533,28 +3714,36 @@ yyreduce:
break;
case 161:
-#line 1385 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1404 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (2)].integer);
;}
break;
case 162:
-#line 1389 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1408 "program_parse.y"
{
(yyval.integer) = STATE_HALF_VECTOR;
;}
break;
case 163:
-#line 1395 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1414 "program_parse.y"
{
(yyval.integer) = STATE_SPOT_DIRECTION;
;}
break;
case 164:
-#line 1401 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1420 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (2)].state)[1];
@@ -3562,7 +3751,9 @@ yyreduce:
break;
case 165:
-#line 1408 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1427 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT;
@@ -3570,7 +3761,9 @@ yyreduce:
break;
case 166:
-#line 1413 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1432 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR;
@@ -3579,7 +3772,9 @@ yyreduce:
break;
case 167:
-#line 1421 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1440 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_LIGHTPROD;
@@ -3590,7 +3785,9 @@ yyreduce:
break;
case 169:
-#line 1433 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1452 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(3) - (3)].integer);
@@ -3599,35 +3796,45 @@ yyreduce:
break;
case 170:
-#line 1441 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1460 "program_parse.y"
{
(yyval.integer) = STATE_TEXENV_COLOR;
;}
break;
case 171:
-#line 1447 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1466 "program_parse.y"
{
(yyval.integer) = STATE_AMBIENT;
;}
break;
case 172:
-#line 1451 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1470 "program_parse.y"
{
(yyval.integer) = STATE_DIFFUSE;
;}
break;
case 173:
-#line 1455 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1474 "program_parse.y"
{
(yyval.integer) = STATE_SPECULAR;
;}
break;
case 174:
-#line 1461 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1480 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector");
@@ -3639,7 +3846,9 @@ yyreduce:
break;
case 175:
-#line 1472 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1491 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_TEXGEN;
@@ -3649,49 +3858,63 @@ yyreduce:
break;
case 176:
-#line 1481 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1500 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S;
;}
break;
case 177:
-#line 1485 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1504 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_OBJECT_S;
;}
break;
case 178:
-#line 1490 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1509 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S;
;}
break;
case 179:
-#line 1494 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1513 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S;
;}
break;
case 180:
-#line 1498 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1517 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S;
;}
break;
case 181:
-#line 1502 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1521 "program_parse.y"
{
(yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S;
;}
break;
case 182:
-#line 1508 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1527 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
@@ -3699,21 +3922,27 @@ yyreduce:
break;
case 183:
-#line 1515 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1534 "program_parse.y"
{
(yyval.integer) = STATE_FOG_COLOR;
;}
break;
case 184:
-#line 1519 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1538 "program_parse.y"
{
(yyval.integer) = STATE_FOG_PARAMS;
;}
break;
case 185:
-#line 1525 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1544 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_CLIPPLANE;
@@ -3722,7 +3951,9 @@ yyreduce:
break;
case 186:
-#line 1533 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1552 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector");
@@ -3734,7 +3965,9 @@ yyreduce:
break;
case 187:
-#line 1544 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1563 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = (yyvsp[(2) - (2)].integer);
@@ -3742,21 +3975,27 @@ yyreduce:
break;
case 188:
-#line 1551 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1570 "program_parse.y"
{
(yyval.integer) = STATE_POINT_SIZE;
;}
break;
case 189:
-#line 1555 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1574 "program_parse.y"
{
(yyval.integer) = STATE_POINT_ATTENUATION;
;}
break;
case 190:
-#line 1561 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1580 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (5)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (5)].state)[1];
@@ -3767,7 +4006,9 @@ yyreduce:
break;
case 191:
-#line 1571 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1590 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (2)].state)[0];
(yyval.state)[1] = (yyvsp[(1) - (2)].state)[1];
@@ -3778,7 +4019,9 @@ yyreduce:
break;
case 192:
-#line 1581 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1600 "program_parse.y"
{
(yyval.state)[2] = 0;
(yyval.state)[3] = 3;
@@ -3786,7 +4029,9 @@ yyreduce:
break;
case 193:
-#line 1586 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1605 "program_parse.y"
{
/* It seems logical that the matrix row range specifier would have
* to specify a range or more than one row (i.e., $5 > $3).
@@ -3805,7 +4050,9 @@ yyreduce:
break;
case 194:
-#line 1604 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1623 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(2) - (3)].state)[0];
(yyval.state)[1] = (yyvsp[(2) - (3)].state)[1];
@@ -3814,42 +4061,54 @@ yyreduce:
break;
case 195:
-#line 1612 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1631 "program_parse.y"
{
(yyval.integer) = 0;
;}
break;
case 196:
-#line 1616 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1635 "program_parse.y"
{
(yyval.integer) = (yyvsp[(1) - (1)].integer);
;}
break;
case 197:
-#line 1622 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1641 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVERSE;
;}
break;
case 198:
-#line 1626 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1645 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_TRANSPOSE;
;}
break;
case 199:
-#line 1630 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1649 "program_parse.y"
{
(yyval.integer) = STATE_MATRIX_INVTRANS;
;}
break;
case 200:
-#line 1636 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1655 "program_parse.y"
{
if ((yyvsp[(1) - (1)].integer) > 3) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference");
@@ -3861,7 +4120,9 @@ yyreduce:
break;
case 201:
-#line 1647 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1666 "program_parse.y"
{
(yyval.state)[0] = STATE_MODELVIEW_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
@@ -3869,7 +4130,9 @@ yyreduce:
break;
case 202:
-#line 1652 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1671 "program_parse.y"
{
(yyval.state)[0] = STATE_PROJECTION_MATRIX;
(yyval.state)[1] = 0;
@@ -3877,7 +4140,9 @@ yyreduce:
break;
case 203:
-#line 1657 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1676 "program_parse.y"
{
(yyval.state)[0] = STATE_MVP_MATRIX;
(yyval.state)[1] = 0;
@@ -3885,7 +4150,9 @@ yyreduce:
break;
case 204:
-#line 1662 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1681 "program_parse.y"
{
(yyval.state)[0] = STATE_TEXTURE_MATRIX;
(yyval.state)[1] = (yyvsp[(2) - (2)].integer);
@@ -3893,7 +4160,9 @@ yyreduce:
break;
case 205:
-#line 1667 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1686 "program_parse.y"
{
yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported");
YYERROR;
@@ -3901,7 +4170,9 @@ yyreduce:
break;
case 206:
-#line 1672 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1691 "program_parse.y"
{
(yyval.state)[0] = STATE_PROGRAM_MATRIX;
(yyval.state)[1] = (yyvsp[(3) - (4)].integer);
@@ -3909,21 +4180,27 @@ yyreduce:
break;
case 207:
-#line 1679 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1698 "program_parse.y"
{
(yyval.integer) = 0;
;}
break;
case 208:
-#line 1683 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1702 "program_parse.y"
{
(yyval.integer) = (yyvsp[(2) - (3)].integer);
;}
break;
case 209:
-#line 1688 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1707 "program_parse.y"
{
/* Since GL_ARB_vertex_blend isn't supported, only modelview matrix
* zero is valid.
@@ -3938,7 +4215,9 @@ yyreduce:
break;
case 210:
-#line 1701 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1720 "program_parse.y"
{
/* Since GL_ARB_matrix_palette isn't supported, just let any value
* through here. The error will be generated later.
@@ -3948,7 +4227,9 @@ yyreduce:
break;
case 211:
-#line 1709 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1728 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector");
@@ -3960,7 +4241,9 @@ yyreduce:
break;
case 212:
-#line 1720 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1739 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = STATE_DEPTH_RANGE;
@@ -3968,7 +4251,9 @@ yyreduce:
break;
case 217:
-#line 1732 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1751 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -3979,7 +4264,9 @@ yyreduce:
break;
case 218:
-#line 1742 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1761 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
@@ -3987,7 +4274,9 @@ yyreduce:
break;
case 219:
-#line 1747 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1766 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
@@ -3995,7 +4284,9 @@ yyreduce:
break;
case 220:
-#line 1754 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1773 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -4006,7 +4297,9 @@ yyreduce:
break;
case 221:
-#line 1764 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1783 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -4017,7 +4310,9 @@ yyreduce:
break;
case 222:
-#line 1773 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1792 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (1)].integer);
(yyval.state)[1] = (yyvsp[(1) - (1)].integer);
@@ -4025,7 +4320,9 @@ yyreduce:
break;
case 223:
-#line 1778 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1797 "program_parse.y"
{
(yyval.state)[0] = (yyvsp[(1) - (3)].integer);
(yyval.state)[1] = (yyvsp[(3) - (3)].integer);
@@ -4033,7 +4330,9 @@ yyreduce:
break;
case 224:
-#line 1785 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1804 "program_parse.y"
{
memset((yyval.state), 0, sizeof((yyval.state)));
(yyval.state)[0] = state->state_param_enum;
@@ -4044,7 +4343,9 @@ yyreduce:
break;
case 225:
-#line 1795 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1814 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference");
@@ -4055,7 +4356,9 @@ yyreduce:
break;
case 226:
-#line 1805 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1824 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference");
@@ -4066,7 +4369,9 @@ yyreduce:
break;
case 231:
-#line 1820 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1839 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
@@ -4077,7 +4382,9 @@ yyreduce:
break;
case 232:
-#line 1830 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1849 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (yyvsp[(1) - (1)].real);
@@ -4088,7 +4395,9 @@ yyreduce:
break;
case 233:
-#line 1838 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1857 "program_parse.y"
{
(yyval.vector).count = 1;
(yyval.vector).data[0] = (float) (yyvsp[(1) - (1)].integer);
@@ -4099,7 +4408,9 @@ yyreduce:
break;
case 234:
-#line 1848 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1867 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (3)].real);
@@ -4110,7 +4421,9 @@ yyreduce:
break;
case 235:
-#line 1856 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1875 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (5)].real);
@@ -4121,7 +4434,9 @@ yyreduce:
break;
case 236:
-#line 1865 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1884 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (7)].real);
@@ -4132,7 +4447,9 @@ yyreduce:
break;
case 237:
-#line 1874 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1893 "program_parse.y"
{
(yyval.vector).count = 4;
(yyval.vector).data[0] = (yyvsp[(2) - (9)].real);
@@ -4143,41 +4460,55 @@ yyreduce:
break;
case 238:
-#line 1884 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1903 "program_parse.y"
{
(yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real);
;}
break;
case 239:
-#line 1888 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1907 "program_parse.y"
{
(yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer));
;}
break;
case 240:
-#line 1893 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1912 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 241:
-#line 1894 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1913 "program_parse.y"
{ (yyval.negate) = TRUE; ;}
break;
case 242:
-#line 1895 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1914 "program_parse.y"
{ (yyval.negate) = FALSE; ;}
break;
case 243:
-#line 1898 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1917 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (2)].integer); ;}
break;
case 245:
-#line 1902 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1921 "program_parse.y"
{
/* NV_fragment_program_option defines the size qualifiers in a
* fairly broken way. "SHORT" or "LONG" can optionally be used
@@ -4214,41 +4545,54 @@ yyreduce:
break;
case 246:
-#line 1936 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1955 "program_parse.y"
{
;}
break;
case 247:
-#line 1940 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1959 "program_parse.y"
{ (yyval.integer) = (yyvsp[(1) - (1)].integer); ;}
break;
case 249:
-#line 1944 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1963 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) {
+ free((yyvsp[(3) - (3)].string));
YYERROR;
}
;}
break;
case 250:
-#line 1950 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1970 "program_parse.y"
{
if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) {
+ free((yyvsp[(1) - (1)].string));
YYERROR;
}
;}
break;
case 251:
-#line 1958 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1979 "program_parse.y"
{
struct asm_symbol *const s =
declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)]));
if (s == NULL) {
+ free((yyvsp[(3) - (5)].string));
YYERROR;
} else {
s->output_binding = (yyvsp[(5) - (5)].result);
@@ -4257,7 +4601,9 @@ yyreduce:
break;
case 252:
-#line 1971 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 1993 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_HPOS;
@@ -4269,7 +4615,9 @@ yyreduce:
break;
case 253:
-#line 1980 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2002 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_FOGC;
@@ -4281,14 +4629,18 @@ yyreduce:
break;
case 254:
-#line 1989 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2011 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (2)].result);
;}
break;
case 255:
-#line 1993 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2015 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_PSIZ;
@@ -4300,7 +4652,9 @@ yyreduce:
break;
case 256:
-#line 2002 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2024 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer);
@@ -4312,7 +4666,9 @@ yyreduce:
break;
case 257:
-#line 2011 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2033 "program_parse.y"
{
if (state->mode == ARB_fragment) {
(yyval.result) = FRAG_RESULT_DEPTH;
@@ -4324,14 +4680,18 @@ yyreduce:
break;
case 258:
-#line 2022 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2044 "program_parse.y"
{
(yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer);
;}
break;
case 259:
-#line 2028 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2050 "program_parse.y"
{
(yyval.integer) = (state->mode == ARB_vertex)
? VERT_RESULT_COL0
@@ -4340,7 +4700,9 @@ yyreduce:
break;
case 260:
-#line 2034 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2056 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_COL0;
@@ -4352,7 +4714,9 @@ yyreduce:
break;
case 261:
-#line 2043 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2065 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = VERT_RESULT_BFC0;
@@ -4364,14 +4728,18 @@ yyreduce:
break;
case 262:
-#line 2054 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2076 "program_parse.y"
{
(yyval.integer) = 0;
;}
break;
case 263:
-#line 2058 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2080 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 0;
@@ -4383,7 +4751,9 @@ yyreduce:
break;
case 264:
-#line 2067 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2089 "program_parse.y"
{
if (state->mode == ARB_vertex) {
(yyval.integer) = 1;
@@ -4395,67 +4765,93 @@ yyreduce:
break;
case 265:
-#line 2077 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2099 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 266:
-#line 2078 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2100 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 267:
-#line 2079 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2101 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 268:
-#line 2082 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2104 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 269:
-#line 2083 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2105 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 270:
-#line 2084 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2106 "program_parse.y"
{ (yyval.integer) = 1; ;}
break;
case 271:
-#line 2087 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2109 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 272:
-#line 2088 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2110 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 273:
-#line 2091 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2113 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 274:
-#line 2092 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2114 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 275:
-#line 2095 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2117 "program_parse.y"
{ (yyval.integer) = 0; ;}
break;
case 276:
-#line 2096 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2118 "program_parse.y"
{ (yyval.integer) = (yyvsp[(2) - (3)].integer); ;}
break;
case 277:
-#line 2100 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2122 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector");
@@ -4467,7 +4863,9 @@ yyreduce:
break;
case 278:
-#line 2111 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2133 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector");
@@ -4479,7 +4877,9 @@ yyreduce:
break;
case 279:
-#line 2122 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2144 "program_parse.y"
{
if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector");
@@ -4491,30 +4891,38 @@ yyreduce:
break;
case 280:
-#line 2133 "program_parse.y"
+
+/* Line 1455 of yacc.c */
+#line 2155 "program_parse.y"
{
struct asm_symbol *exist = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string));
struct asm_symbol *target = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(4) - (4)].string));
+ free((yyvsp[(4) - (4)].string));
if (exist != NULL) {
- yyerror(& (yylsp[(2) - (4)]), state, "redeclared identifier");
+ char m[1000];
+ _mesa_snprintf(m, sizeof(m), "redeclared identifier: %s", (yyvsp[(2) - (4)].string));
+ free((yyvsp[(2) - (4)].string));
+ yyerror(& (yylsp[(2) - (4)]), state, m);
YYERROR;
} else if (target == NULL) {
+ free((yyvsp[(2) - (4)].string));
yyerror(& (yylsp[(4) - (4)]), state,
"undefined variable binding in ALIAS statement");
YYERROR;
} else {
- _mesa_symbol_table_add_symbol(state->st, 0, strdup((yyvsp[(2) - (4)].string)), target);
+ _mesa_symbol_table_add_symbol(state->st, 0, (yyvsp[(2) - (4)].string), target);
}
;}
break;
-/* Line 1267 of yacc.c. */
-#line 4518 "program_parse.tab.c"
+
+/* Line 1455 of yacc.c */
+#line 4926 "program_parse.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -4590,7 +4998,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -4607,7 +5015,7 @@ yyerrlab:
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -4665,14 +5073,11 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
yyerror_range[1] = yylloc;
/* Using YYLLOC is tempting, but would change the location of
- the look-ahead. YYLOC is available though. */
+ the lookahead. YYLOC is available though. */
YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
*++yylsp = yyloc;
@@ -4697,7 +5102,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -4708,7 +5113,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
+ if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc, state);
/* Do not reclaim the symbols of the rule which action triggered
@@ -4734,7 +5139,9 @@ yyreturn:
}
-#line 2157 "program_parse.y"
+
+/* Line 1675 of yacc.c */
+#line 2184 "program_parse.y"
void
@@ -4917,14 +5324,10 @@ declare_variable(struct asm_parser_state *state, char *name, enum asm_type t,
if (exist != NULL) {
yyerror(locp, state, "redeclared identifier");
} else {
- const size_t name_len = strlen(name);
-
- s = calloc(1, sizeof(struct asm_symbol) + name_len + 1);
- s->name = (char *)(s + 1);
+ s = calloc(1, sizeof(struct asm_symbol));
+ s->name = name;
s->type = t;
- memcpy((char *) s->name, name, name_len + 1);
-
switch (t) {
case at_temp:
if (state->prog->NumTemporaries >= state->limits->MaxTemps) {
@@ -5172,11 +5575,6 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str,
_mesa_memcpy (strz, str, len);
strz[len] = '\0';
- if (state->prog->String != NULL) {
- _mesa_free(state->prog->String);
- state->prog->String = NULL;
- }
-
state->prog->String = strz;
state->st = _mesa_symbol_table_ctor();
@@ -5266,6 +5664,7 @@ error:
for (sym = state->sym; sym != NULL; sym = temp) {
temp = sym->next;
+ _mesa_free((void *) sym->name);
_mesa_free(sym);
}
state->sym = NULL;
@@ -5273,11 +5672,6 @@ error:
_mesa_symbol_table_dtor(state->st);
state->st = NULL;
- if (state->string_dumpster != NULL) {
- _mesa_free(state->string_dumpster);
- state->dumpster_size = 0;
- }
-
return result;
}
diff --git a/src/mesa/shader/program_parse.tab.h b/src/mesa/shader/program_parse.tab.h
index 25048065c1e..406100c859c 100644
--- a/src/mesa/shader/program_parse.tab.h
+++ b/src/mesa/shader/program_parse.tab.h
@@ -1,24 +1,23 @@
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton interface for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -29,10 +28,11 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -146,120 +146,16 @@
DOT = 362
};
#endif
-/* Tokens. */
-#define ARBvp_10 258
-#define ARBfp_10 259
-#define ADDRESS 260
-#define ALIAS 261
-#define ATTRIB 262
-#define OPTION 263
-#define OUTPUT 264
-#define PARAM 265
-#define TEMP 266
-#define END 267
-#define BIN_OP 268
-#define BINSC_OP 269
-#define SAMPLE_OP 270
-#define SCALAR_OP 271
-#define TRI_OP 272
-#define VECTOR_OP 273
-#define ARL 274
-#define KIL 275
-#define SWZ 276
-#define TXD_OP 277
-#define INTEGER 278
-#define REAL 279
-#define AMBIENT 280
-#define ATTENUATION 281
-#define BACK 282
-#define CLIP 283
-#define COLOR 284
-#define DEPTH 285
-#define DIFFUSE 286
-#define DIRECTION 287
-#define EMISSION 288
-#define ENV 289
-#define EYE 290
-#define FOG 291
-#define FOGCOORD 292
-#define FRAGMENT 293
-#define FRONT 294
-#define HALF 295
-#define INVERSE 296
-#define INVTRANS 297
-#define LIGHT 298
-#define LIGHTMODEL 299
-#define LIGHTPROD 300
-#define LOCAL 301
-#define MATERIAL 302
-#define MAT_PROGRAM 303
-#define MATRIX 304
-#define MATRIXINDEX 305
-#define MODELVIEW 306
-#define MVP 307
-#define NORMAL 308
-#define OBJECT 309
-#define PALETTE 310
-#define PARAMS 311
-#define PLANE 312
-#define POINT_TOK 313
-#define POINTSIZE 314
-#define POSITION 315
-#define PRIMARY 316
-#define PROGRAM 317
-#define PROJECTION 318
-#define RANGE 319
-#define RESULT 320
-#define ROW 321
-#define SCENECOLOR 322
-#define SECONDARY 323
-#define SHININESS 324
-#define SIZE_TOK 325
-#define SPECULAR 326
-#define SPOT 327
-#define STATE 328
-#define TEXCOORD 329
-#define TEXENV 330
-#define TEXGEN 331
-#define TEXGEN_Q 332
-#define TEXGEN_R 333
-#define TEXGEN_S 334
-#define TEXGEN_T 335
-#define TEXTURE 336
-#define TRANSPOSE 337
-#define TEXTURE_UNIT 338
-#define TEX_1D 339
-#define TEX_2D 340
-#define TEX_3D 341
-#define TEX_CUBE 342
-#define TEX_RECT 343
-#define TEX_SHADOW1D 344
-#define TEX_SHADOW2D 345
-#define TEX_SHADOWRECT 346
-#define TEX_ARRAY1D 347
-#define TEX_ARRAY2D 348
-#define TEX_ARRAYSHADOW1D 349
-#define TEX_ARRAYSHADOW2D 350
-#define VERTEX 351
-#define VTXATTRIB 352
-#define WEIGHT 353
-#define IDENTIFIER 354
-#define USED_IDENTIFIER 355
-#define MASK4 356
-#define MASK3 357
-#define MASK2 358
-#define MASK1 359
-#define SWIZZLE 360
-#define DOT_DOT 361
-#define DOT 362
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 122 "program_parse.y"
{
+
+/* Line 1676 of yacc.c */
+#line 122 "program_parse.y"
+
struct asm_instruction *inst;
struct asm_symbol *sym;
struct asm_symbol temp_sym;
@@ -283,13 +179,15 @@ typedef union YYSTYPE
unsigned xyzw_valid:1;
unsigned negate:1;
} ext_swizzle;
-}
-/* Line 1489 of yacc.c. */
-#line 289 "program_parse.tab.h"
- YYSTYPE;
+
+
+
+/* Line 1676 of yacc.c */
+#line 187 "program_parse.tab.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
@@ -308,3 +206,4 @@ typedef struct YYLTYPE
#endif
+
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 32b058400c9..8ca6f9805b8 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -309,6 +309,8 @@ option: OPTION string ';'
}
+ free($2);
+
if (!valid) {
const char *const err_str = (state->mode == ARB_vertex)
? "invalid ARB vertex program option"
@@ -641,7 +643,7 @@ maskedDstReg: dstReg optionalMask optionalCcMask
YYERROR;
}
- state->prog->OutputsWritten |= (1U << $$.Index);
+ state->prog->OutputsWritten |= BITFIELD64_BIT($$.Index);
}
}
;
@@ -710,12 +712,17 @@ extSwizSel: INTEGER
}
| string
{
+ char s;
+
if (strlen($1) > 1) {
yyerror(& @1, state, "invalid extended swizzle selector");
YYERROR;
}
- switch ($1[0]) {
+ s = $1[0];
+ free($1);
+
+ switch (s) {
case 'x':
$$.swz = SWIZZLE_X;
$$.xyzw_valid = 1;
@@ -763,6 +770,8 @@ srcReg: USED_IDENTIFIER /* temporaryReg | progParamSingle */
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, $1);
+ free($1);
+
if (s == NULL) {
yyerror(& @1, state, "invalid operand variable");
YYERROR;
@@ -845,6 +854,8 @@ dstReg: resultBinding
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, $1);
+ free($1);
+
if (s == NULL) {
yyerror(& @1, state, "invalid operand variable");
YYERROR;
@@ -872,6 +883,8 @@ progParamArray: USED_IDENTIFIER
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, $1);
+ free($1);
+
if (s == NULL) {
yyerror(& @1, state, "invalid operand variable");
YYERROR;
@@ -943,6 +956,8 @@ addrReg: USED_IDENTIFIER
struct asm_symbol *const s = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, $1);
+ free($1);
+
if (s == NULL) {
yyerror(& @1, state, "invalid array member");
YYERROR;
@@ -1081,6 +1096,7 @@ ATTRIB_statement: ATTRIB IDENTIFIER '=' attribBinding
declare_variable(state, $2, at_attrib, & @2);
if (s == NULL) {
+ free($2);
YYERROR;
} else {
s->attrib_binding = $4;
@@ -1188,6 +1204,7 @@ PARAM_singleStmt: PARAM IDENTIFIER paramSingleInit
declare_variable(state, $2, at_param, & @2);
if (s == NULL) {
+ free($2);
YYERROR;
} else {
s->param_binding_type = $3.param_binding_type;
@@ -1201,6 +1218,7 @@ PARAM_singleStmt: PARAM IDENTIFIER paramSingleInit
PARAM_multipleStmt: PARAM IDENTIFIER '[' optArraySize ']' paramMultipleInit
{
if (($4 != 0) && ((unsigned) $4 != $6.param_binding_length)) {
+ free($2);
yyerror(& @4, state,
"parameter array size and number of bindings must match");
YYERROR;
@@ -1209,6 +1227,7 @@ PARAM_multipleStmt: PARAM IDENTIFIER '[' optArraySize ']' paramMultipleInit
declare_variable(state, $2, $6.type, & @2);
if (s == NULL) {
+ free($2);
YYERROR;
} else {
s->param_binding_type = $6.param_binding_type;
@@ -1943,12 +1962,14 @@ ADDRESS_statement: ADDRESS { $<integer>$ = $1; } varNameList
varNameList: varNameList ',' IDENTIFIER
{
if (!declare_variable(state, $3, $<integer>0, & @3)) {
+ free($3);
YYERROR;
}
}
| IDENTIFIER
{
if (!declare_variable(state, $1, $<integer>0, & @1)) {
+ free($1);
YYERROR;
}
}
@@ -1960,6 +1981,7 @@ OUTPUT_statement: optVarSize OUTPUT IDENTIFIER '=' resultBinding
declare_variable(state, $3, at_output, & @3);
if (s == NULL) {
+ free($3);
YYERROR;
} else {
s->output_binding = $5;
@@ -2136,16 +2158,21 @@ ALIAS_statement: ALIAS IDENTIFIER '=' USED_IDENTIFIER
struct asm_symbol *target = (struct asm_symbol *)
_mesa_symbol_table_find_symbol(state->st, 0, $4);
+ free($4);
if (exist != NULL) {
- yyerror(& @2, state, "redeclared identifier");
+ char m[1000];
+ _mesa_snprintf(m, sizeof(m), "redeclared identifier: %s", $2);
+ free($2);
+ yyerror(& @2, state, m);
YYERROR;
} else if (target == NULL) {
+ free($2);
yyerror(& @4, state,
"undefined variable binding in ALIAS statement");
YYERROR;
} else {
- _mesa_symbol_table_add_symbol(state->st, 0, strdup($2), target);
+ _mesa_symbol_table_add_symbol(state->st, 0, $2, target);
}
}
;
@@ -2336,14 +2363,10 @@ declare_variable(struct asm_parser_state *state, char *name, enum asm_type t,
if (exist != NULL) {
yyerror(locp, state, "redeclared identifier");
} else {
- const size_t name_len = strlen(name);
-
- s = calloc(1, sizeof(struct asm_symbol) + name_len + 1);
- s->name = (char *)(s + 1);
+ s = calloc(1, sizeof(struct asm_symbol));
+ s->name = name;
s->type = t;
- memcpy((char *) s->name, name, name_len + 1);
-
switch (t) {
case at_temp:
if (state->prog->NumTemporaries >= state->limits->MaxTemps) {
@@ -2591,11 +2614,6 @@ _mesa_parse_arb_program(GLcontext *ctx, GLenum target, const GLubyte *str,
_mesa_memcpy (strz, str, len);
strz[len] = '\0';
- if (state->prog->String != NULL) {
- _mesa_free(state->prog->String);
- state->prog->String = NULL;
- }
-
state->prog->String = strz;
state->st = _mesa_symbol_table_ctor();
@@ -2685,6 +2703,7 @@ error:
for (sym = state->sym; sym != NULL; sym = temp) {
temp = sym->next;
+ _mesa_free((void *) sym->name);
_mesa_free(sym);
}
state->sym = NULL;
@@ -2692,10 +2711,5 @@ error:
_mesa_symbol_table_dtor(state->st);
state->st = NULL;
- if (state->string_dumpster != NULL) {
- _mesa_free(state->string_dumpster);
- state->dumpster_size = 0;
- }
-
return result;
}
diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h
index 25b413918aa..c170948f73a 100644
--- a/src/mesa/shader/program_parser.h
+++ b/src/mesa/shader/program_parser.h
@@ -35,16 +35,9 @@ enum asm_type {
at_attrib,
at_param,
at_temp,
- at_output,
+ at_output
};
-/**
- * \note
- * Objects of this type are allocated as the object plus the name of the
- * symbol. That is, malloc(sizeof(struct asm_symbol) + strlen(name) + 1).
- * Alternately, asm_symbol::name could be moved to the bottom of the structure
- * and declared as 'char name[0];'.
- */
struct asm_symbol {
struct asm_symbol *next; /**< List linkage for freeing. */
const char *name;
@@ -165,15 +158,6 @@ struct asm_parser_state {
/**
- * Buffer to hold strings transfered from the lexer to the parser
- */
- /*@{*/
- char *string_dumpster; /**< String data transfered. */
- size_t dumpster_size; /**< Total size, in bytes, of the buffer. */
- /*@}*/
-
-
- /**
* Selected limits copied from gl_constants
*
* These are limits from the GL context, but various bits in the program
diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c
index 3b8529592dd..a0daac1b806 100644
--- a/src/mesa/shader/programopt.c
+++ b/src/mesa/shader/programopt.c
@@ -109,7 +109,7 @@ _mesa_insert_mvp_dp4_code(GLcontext *ctx, struct gl_vertex_program *vprog)
vprog->Base.Instructions = newInst;
vprog->Base.NumInstructions = newLen;
vprog->Base.InputsRead |= VERT_BIT_POS;
- vprog->Base.OutputsWritten |= (1 << VERT_RESULT_HPOS);
+ vprog->Base.OutputsWritten |= BITFIELD64_BIT(VERT_RESULT_HPOS);
}
@@ -211,7 +211,7 @@ _mesa_insert_mvp_mad_code(GLcontext *ctx, struct gl_vertex_program *vprog)
vprog->Base.Instructions = newInst;
vprog->Base.NumInstructions = newLen;
vprog->Base.InputsRead |= VERT_BIT_POS;
- vprog->Base.OutputsWritten |= (1 << VERT_RESULT_HPOS);
+ vprog->Base.OutputsWritten |= BITFIELD64_BIT(VERT_RESULT_HPOS);
}
@@ -613,7 +613,7 @@ _mesa_nop_fragment_program(GLcontext *ctx, struct gl_fragment_program *prog)
prog->Base.Instructions = inst;
prog->Base.NumInstructions = 2;
prog->Base.InputsRead = 1 << inputAttr;
- prog->Base.OutputsWritten = 1 << FRAG_RESULT_COLOR;
+ prog->Base.OutputsWritten = BITFIELD64_BIT(FRAG_RESULT_COLOR);
}
@@ -657,7 +657,7 @@ _mesa_nop_vertex_program(GLcontext *ctx, struct gl_vertex_program *prog)
prog->Base.Instructions = inst;
prog->Base.NumInstructions = 2;
prog->Base.InputsRead = 1 << inputAttr;
- prog->Base.OutputsWritten = 1 << VERT_RESULT_COL0;
+ prog->Base.OutputsWritten = BITFIELD64_BIT(VERT_RESULT_COL0);
/*
* Now insert code to do standard modelview/projection transformation.
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 344dfdc6804..ee5a50ca82e 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -925,7 +925,7 @@ gen_return_with_expression(slang_assemble_ctx *A, slang_operation *oper)
slang_operation_copy(rhs, &oper->children[0]);
}
- ///blockOper->locals->outer_scope = oper->locals->outer_scope;
+ /*blockOper->locals->outer_scope = oper->locals->outer_scope;*/
/*slang_print_tree(blockOper, 0);*/
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 3af301eacdf..99eb254cee0 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -81,8 +81,8 @@ new_subroutine(slang_emit_info *emitInfo, GLuint *id)
emitInfo->Subroutines = (struct gl_program **)
_mesa_realloc(emitInfo->Subroutines,
- n * sizeof(struct gl_program),
- (n + 1) * sizeof(struct gl_program));
+ n * sizeof(struct gl_program *),
+ (n + 1) * sizeof(struct gl_program *));
emitInfo->Subroutines[n] = ctx->Driver.NewProgram(ctx, emitInfo->prog->Target, 0);
emitInfo->Subroutines[n]->Parameters = emitInfo->prog->Parameters;
emitInfo->NumSubroutines++;
@@ -195,6 +195,9 @@ alloc_node_storage(slang_emit_info *emitInfo, slang_ir_node *n,
if (!n->Store) {
assert(defaultSize > 0);
n->Store = _slang_new_ir_storage(PROGRAM_TEMPORARY, -1, defaultSize);
+ if (!n->Store) {
+ return GL_FALSE;
+ }
}
/* now allocate actual register(s). I.e. set n->Store->Index >= 0 */
@@ -431,6 +434,9 @@ new_instruction(slang_emit_info *emitInfo, gl_inst_opcode opcode)
_mesa_realloc_instructions(prog->Instructions,
prog->NumInstructions,
emitInfo->MaxInstructions);
+ if (!prog->Instructions) {
+ return NULL;
+ }
}
inst = prog->Instructions + prog->NumInstructions;
@@ -451,12 +457,14 @@ emit_arl_load(slang_emit_info *emitInfo,
gl_register_file file, GLint index, GLuint swizzle)
{
struct prog_instruction *inst = new_instruction(emitInfo, OPCODE_ARL);
- inst->SrcReg[0].File = file;
- inst->SrcReg[0].Index = index;
- inst->SrcReg[0].Swizzle = fix_swizzle(swizzle);
- inst->DstReg.File = PROGRAM_ADDRESS;
- inst->DstReg.Index = 0;
- inst->DstReg.WriteMask = WRITEMASK_X;
+ if (inst) {
+ inst->SrcReg[0].File = file;
+ inst->SrcReg[0].Index = index;
+ inst->SrcReg[0].Swizzle = fix_swizzle(swizzle);
+ inst->DstReg.File = PROGRAM_ADDRESS;
+ inst->DstReg.Index = 0;
+ inst->DstReg.WriteMask = WRITEMASK_X;
+ }
return inst;
}
@@ -543,6 +551,9 @@ emit_instruction(slang_emit_info *emitInfo,
&srcRelAddr,
NULL,
NULL);
+ if (!inst) {
+ return NULL;
+ }
src[i] = &newSrc[i];
}
@@ -765,7 +776,9 @@ static struct prog_instruction *
emit_comment(slang_emit_info *emitInfo, const char *comment)
{
struct prog_instruction *inst = new_instruction(emitInfo, OPCODE_NOP);
- inst_comment(inst, comment);
+ if (inst) {
+ inst_comment(inst, comment);
+ }
return inst;
}
@@ -792,7 +805,9 @@ emit_arith(slang_emit_info *emitInfo, slang_ir_node *n)
emit(emitInfo, n->Children[0]->Children[0]); /* A */
emit(emitInfo, n->Children[0]->Children[1]); /* B */
emit(emitInfo, n->Children[1]); /* C */
- alloc_node_storage(emitInfo, n, -1); /* dest */
+ if (!alloc_node_storage(emitInfo, n, -1)) { /* dest */
+ return NULL;
+ }
inst = emit_instruction(emitInfo,
OPCODE_MAD,
@@ -813,7 +828,9 @@ emit_arith(slang_emit_info *emitInfo, slang_ir_node *n)
emit(emitInfo, n->Children[0]); /* A */
emit(emitInfo, n->Children[1]->Children[0]); /* B */
emit(emitInfo, n->Children[1]->Children[1]); /* C */
- alloc_node_storage(emitInfo, n, -1); /* dest */
+ if (!alloc_node_storage(emitInfo, n, -1)) { /* dest */
+ return NULL;
+ }
inst = emit_instruction(emitInfo,
OPCODE_MAD,
@@ -839,7 +856,9 @@ emit_arith(slang_emit_info *emitInfo, slang_ir_node *n)
}
/* result storage */
- alloc_node_storage(emitInfo, n, -1);
+ if (!alloc_node_storage(emitInfo, n, -1)) {
+ return NULL;
+ }
inst = emit_instruction(emitInfo,
info->InstOpcode,
@@ -932,6 +951,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
n->Children[0]->Store,
n->Children[1]->Store,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, "Compare values");
/* Compute val = DOT(temp, temp) (reduction) */
@@ -941,6 +963,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
&tempStore,
&tempStore,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst->SrcReg[0].Swizzle = inst->SrcReg[1].Swizzle = swizzle; /*override*/
inst_comment(inst, "Reduce vec to bool");
@@ -956,6 +981,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
n->Store,
&zero,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, "Invert true/false");
}
}
@@ -985,6 +1013,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
&srcStore0,
&srcStore1,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, "Begin struct/array comparison");
}
else {
@@ -994,12 +1025,18 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
&srcStore0,
&srcStore1,
NULL);
+ if (!inst) {
+ return NULL;
+ }
/* ADD accTemp, accTemp, sneTemp; # like logical-OR */
inst = emit_instruction(emitInfo, OPCODE_ADD,
&accTemp, /* dest */
&accTemp,
&sneTemp,
NULL);
+ if (!inst) {
+ return NULL;
+ }
}
}
@@ -1009,6 +1046,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
&accTemp,
&accTemp,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, "End struct/array comparison");
if (n->Opcode == IR_EQUAL) {
@@ -1020,6 +1060,9 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
n->Store,
&zero,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, "Invert true/false");
}
@@ -1093,7 +1136,9 @@ emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n)
* the intermediate result. Use a temp register instead.
*/
_mesa_bzero(&tmpNode, sizeof(tmpNode));
- alloc_node_storage(emitInfo, &tmpNode, n->Store->Size);
+ if (!alloc_node_storage(emitInfo, &tmpNode, n->Store->Size)) {
+ return NULL;
+ }
/* tmp = max(ch[0], ch[1]) */
inst = emit_instruction(emitInfo, OPCODE_MAX,
@@ -1101,6 +1146,9 @@ emit_clamp(slang_emit_info *emitInfo, slang_ir_node *n)
n->Children[0]->Store,
n->Children[1]->Store,
NULL);
+ if (!inst) {
+ return NULL;
+ }
/* n->dest = min(tmp, ch[2]) */
inst = emit_instruction(emitInfo, OPCODE_MIN,
@@ -1135,7 +1183,9 @@ emit_negation(slang_emit_info *emitInfo, slang_ir_node *n)
n->Children[0]->Store,
NULL,
NULL);
- inst->SrcReg[0].Negate = NEGATE_XYZW;
+ if (inst) {
+ inst->SrcReg[0].Negate = NEGATE_XYZW;
+ }
return inst;
}
@@ -1191,6 +1241,9 @@ emit_fcall(slang_emit_info *emitInfo, slang_ir_node *n)
* really just a NOP to attach the label to.
*/
inst = new_instruction(emitInfo, OPCODE_BGNSUB);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, n->Label->Name);
}
@@ -1202,10 +1255,16 @@ emit_fcall(slang_emit_info *emitInfo, slang_ir_node *n)
inst = prev_instruction(emitInfo);
if (inst && inst->Opcode != OPCODE_RET) {
inst = new_instruction(emitInfo, OPCODE_RET);
+ if (!inst) {
+ return NULL;
+ }
}
if (emitInfo->EmitBeginEndSub) {
inst = new_instruction(emitInfo, OPCODE_ENDSUB);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, n->Label->Name);
}
@@ -1215,6 +1274,9 @@ emit_fcall(slang_emit_info *emitInfo, slang_ir_node *n)
/* emit the function call */
inst = new_instruction(emitInfo, OPCODE_CAL);
+ if (!inst) {
+ return NULL;
+ }
/* The branch target is just the subroutine number (changed later) */
inst->BranchTarget = subroutineId;
inst_comment(inst, n->Label->Name);
@@ -1235,7 +1297,9 @@ emit_return(slang_emit_info *emitInfo, slang_ir_node *n)
assert(n->Opcode == IR_RETURN);
assert(n->Label);
inst = new_instruction(emitInfo, OPCODE_RET);
- inst->DstReg.CondMask = COND_TR; /* always return */
+ if (inst) {
+ inst->DstReg.CondMask = COND_TR; /* always return */
+ }
return inst;
}
@@ -1249,6 +1313,9 @@ emit_kill(slang_emit_info *emitInfo)
* Note that ARB-KILL depends on sign of vector operand.
*/
inst = new_instruction(emitInfo, OPCODE_KIL_NV);
+ if (!inst) {
+ return NULL;
+ }
inst->DstReg.CondMask = COND_TR; /* always kill */
assert(emitInfo->prog->Target == GL_FRAGMENT_PROGRAM_ARB);
@@ -1321,6 +1388,9 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n)
n->Children[1]->Store,
NULL,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst->TexShadow = shadow;
@@ -1423,6 +1493,9 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n)
&srcStore,
NULL,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, "IR_COPY block");
srcStore.Index++;
dstStore.Index++;
@@ -1438,6 +1511,9 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n)
n->Children[1]->Store,
NULL,
NULL);
+ if (!inst) {
+ return NULL;
+ }
dstAnnot = storage_annotation(n->Children[0], emitInfo->prog);
srcAnnot = storage_annotation(n->Children[1], emitInfo->prog);
inst->Comment = instruction_annotation(inst->Opcode, dstAnnot,
@@ -1499,6 +1575,9 @@ emit_cond(slang_emit_info *emitInfo, slang_ir_node *n)
n->Children[0]->Store,
NULL,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst->CondUpdate = GL_TRUE;
inst_comment(inst, "COND expr");
_slang_free_temp(emitInfo->vt, n->Store);
@@ -1561,6 +1640,9 @@ emit_not(slang_emit_info *emitInfo, slang_ir_node *n)
n->Children[0]->Store,
&zero,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, "NOT");
free_node_storage(emitInfo->vt, n->Children[0]);
@@ -1600,8 +1682,10 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n)
if (emitInfo->EmitHighLevelInstructions) {
if (emitInfo->EmitCondCodes) {
/* IF condcode THEN ... */
- struct prog_instruction *ifInst;
- ifInst = new_instruction(emitInfo, OPCODE_IF);
+ struct prog_instruction *ifInst = new_instruction(emitInfo, OPCODE_IF);
+ if (!ifInst) {
+ return NULL;
+ }
ifInst->DstReg.CondMask = COND_NE; /* if cond is non-zero */
/* only test the cond code (1 of 4) that was updated by the
* previous instruction.
@@ -1609,17 +1693,25 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n)
ifInst->DstReg.CondSwizzle = writemask_to_swizzle(condWritemask);
}
else {
+ struct prog_instruction *inst;
+
/* IF src[0] THEN ... */
- emit_instruction(emitInfo, OPCODE_IF,
- NULL, /* dst */
- n->Children[0]->Store, /* op0 */
- NULL,
- NULL);
+ inst = emit_instruction(emitInfo, OPCODE_IF,
+ NULL, /* dst */
+ n->Children[0]->Store, /* op0 */
+ NULL,
+ NULL);
+ if (!inst) {
+ return NULL;
+ }
}
}
else {
/* conditional jump to else, or endif */
struct prog_instruction *ifInst = new_instruction(emitInfo, OPCODE_BRA);
+ if (!ifInst) {
+ return NULL;
+ }
ifInst->DstReg.CondMask = COND_EQ; /* BRA if cond is zero */
inst_comment(ifInst, "if zero");
ifInst->DstReg.CondSwizzle = writemask_to_swizzle(condWritemask);
@@ -1632,12 +1724,17 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n)
/* have else body */
elseInstLoc = prog->NumInstructions;
if (emitInfo->EmitHighLevelInstructions) {
- (void) new_instruction(emitInfo, OPCODE_ELSE);
+ struct prog_instruction *inst = new_instruction(emitInfo, OPCODE_ELSE);
+ if (!inst) {
+ return NULL;
+ }
}
else {
/* jump to endif instruction */
- struct prog_instruction *inst;
- inst = new_instruction(emitInfo, OPCODE_BRA);
+ struct prog_instruction *inst = new_instruction(emitInfo, OPCODE_BRA);
+ if (!inst) {
+ return NULL;
+ }
inst_comment(inst, "else");
inst->DstReg.CondMask = COND_TR; /* always branch */
}
@@ -1650,7 +1747,10 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n)
}
if (emitInfo->EmitHighLevelInstructions) {
- (void) new_instruction(emitInfo, OPCODE_ENDIF);
+ struct prog_instruction *inst = new_instruction(emitInfo, OPCODE_ENDIF);
+ if (!inst) {
+ return NULL;
+ }
}
if (n->Children[2]) {
@@ -1671,7 +1771,10 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n)
/* emit OPCODE_BGNLOOP */
beginInstLoc = prog->NumInstructions;
if (emitInfo->EmitHighLevelInstructions) {
- (void) new_instruction(emitInfo, OPCODE_BGNLOOP);
+ struct prog_instruction *inst = new_instruction(emitInfo, OPCODE_BGNLOOP);
+ if (!inst) {
+ return NULL;
+ }
}
/* body */
@@ -1689,10 +1792,16 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n)
if (emitInfo->EmitHighLevelInstructions) {
/* emit OPCODE_ENDLOOP */
endInst = new_instruction(emitInfo, OPCODE_ENDLOOP);
+ if (!endInst) {
+ return NULL;
+ }
}
else {
/* emit unconditional BRA-nch */
endInst = new_instruction(emitInfo, OPCODE_BRA);
+ if (!endInst) {
+ return NULL;
+ }
endInst->DstReg.CondMask = COND_TR; /* always true */
}
/* ENDLOOP's BranchTarget points to the BGNLOOP inst */
@@ -1762,7 +1871,9 @@ emit_cont_break(slang_emit_info *emitInfo, slang_ir_node *n)
}
n->InstLocation = emitInfo->prog->NumInstructions;
inst = new_instruction(emitInfo, opcode);
- inst->DstReg.CondMask = COND_TR; /* always true */
+ if (inst) {
+ inst->DstReg.CondMask = COND_TR; /* always true */
+ }
return inst;
}
@@ -1798,8 +1909,10 @@ emit_cont_break_if_true(slang_emit_info *emitInfo, slang_ir_node *n)
*/
const GLuint condWritemask = inst->DstReg.WriteMask;
inst = new_instruction(emitInfo, opcode);
- inst->DstReg.CondMask = COND_NE;
- inst->DstReg.CondSwizzle = writemask_to_swizzle(condWritemask);
+ if (inst) {
+ inst->DstReg.CondMask = COND_NE;
+ inst->DstReg.CondSwizzle = writemask_to_swizzle(condWritemask);
+ }
return inst;
}
else {
@@ -1814,10 +1927,19 @@ emit_cont_break_if_true(slang_emit_info *emitInfo, slang_ir_node *n)
n->Children[0]->Store,
NULL,
NULL);
+ if (!inst) {
+ return NULL;
+ }
n->InstLocation = emitInfo->prog->NumInstructions;
inst = new_instruction(emitInfo, opcode);
+ if (!inst) {
+ return NULL;
+ }
inst = new_instruction(emitInfo, OPCODE_ENDIF);
+ if (!inst) {
+ return NULL;
+ }
emitInfo->prog->Instructions[ifInstLoc].BranchTarget
= emitInfo->prog->NumInstructions;
@@ -1828,8 +1950,10 @@ emit_cont_break_if_true(slang_emit_info *emitInfo, slang_ir_node *n)
const GLuint condWritemask = inst->DstReg.WriteMask;
assert(emitInfo->EmitCondCodes);
inst = new_instruction(emitInfo, OPCODE_BRA);
- inst->DstReg.CondMask = COND_NE;
- inst->DstReg.CondSwizzle = writemask_to_swizzle(condWritemask);
+ if (inst) {
+ inst->DstReg.CondMask = COND_NE;
+ inst->DstReg.CondSwizzle = writemask_to_swizzle(condWritemask);
+ }
return inst;
}
}
@@ -1976,6 +2100,9 @@ emit_array_element(slang_emit_info *emitInfo, slang_ir_node *n)
indexStore, /* the index */
&elemSizeStore,
NULL);
+ if (!inst) {
+ return NULL;
+ }
indexStore = indexTemp;
}
@@ -2002,6 +2129,9 @@ emit_array_element(slang_emit_info *emitInfo, slang_ir_node *n)
indexStore, /* the index */
&indirectArray, /* indirect array base */
NULL);
+ if (!inst) {
+ return NULL;
+ }
indexStore = indexTemp;
}
@@ -2201,7 +2331,9 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n)
if (n->Comment) {
inst = new_instruction(emitInfo, OPCODE_NOP);
- inst->Comment = _mesa_strdup(n->Comment);
+ if (inst) {
+ inst->Comment = _mesa_strdup(n->Comment);
+ }
inst = NULL;
}
@@ -2503,6 +2635,9 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt,
if (withEnd) {
struct prog_instruction *inst;
inst = new_instruction(&emitInfo, OPCODE_END);
+ if (!inst) {
+ return GL_FALSE;
+ }
}
_slang_resolve_subroutines(&emitInfo);
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index 144c1265251..ed27821a951 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -515,7 +515,7 @@ _slang_update_inputs_outputs(struct gl_program *prog)
}
if (inst->DstReg.File == PROGRAM_OUTPUT) {
- prog->OutputsWritten |= 1 << inst->DstReg.Index;
+ prog->OutputsWritten |= BITFIELD64_BIT(inst->DstReg.Index);
if (inst->DstReg.RelAddr) {
/* If the output attribute is indexed with relative addressing
* we know that it must be a varying or texcoord such as
@@ -528,14 +528,17 @@ _slang_update_inputs_outputs(struct gl_program *prog)
if (prog->Target == GL_VERTEX_PROGRAM_ARB) {
if (inst->DstReg.Index == VERT_RESULT_TEX0) {
/* mark all texcoord outputs as written */
- const GLbitfield mask =
- ((1 << MAX_TEXTURE_COORD_UNITS) - 1) << VERT_RESULT_TEX0;
+ const GLbitfield64 mask =
+ BITFIELD64_RANGE(VERT_RESULT_TEX0,
+ (VERT_RESULT_TEX0
+ + MAX_TEXTURE_COORD_UNITS - 1));
prog->OutputsWritten |= mask;
}
else if (inst->DstReg.Index == VERT_RESULT_VAR0) {
/* mark all generic varying outputs as written */
- const GLbitfield mask =
- ((1 << MAX_VARYING) - 1) << VERT_RESULT_VAR0;
+ const GLbitfield64 mask =
+ BITFIELD64_RANGE(VERT_RESULT_VAR0,
+ (VERT_RESULT_VAR0 + MAX_VARYING - 1));
prog->OutputsWritten |= mask;
}
}
@@ -587,11 +590,16 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType)
{
struct gl_shader *newShader;
const struct gl_shader *firstShader = NULL;
- GLuint shaderLengths[100];
+ GLuint *shaderLengths;
GLchar *source;
GLuint totalLen = 0, len = 0;
GLuint i;
+ shaderLengths = (GLuint *)_mesa_malloc(shProg->NumShaders * sizeof(GLuint));
+ if (!shaderLengths) {
+ return NULL;
+ }
+
/* compute total size of new shader source code */
for (i = 0; i < shProg->NumShaders; i++) {
const struct gl_shader *shader = shProg->Shaders[i];
@@ -603,12 +611,16 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType)
}
}
- if (totalLen == 0)
+ if (totalLen == 0) {
+ _mesa_free(shaderLengths);
return NULL;
+ }
source = (GLchar *) _mesa_malloc(totalLen + 1);
- if (!source)
+ if (!source) {
+ _mesa_free(shaderLengths);
return NULL;
+ }
/* concatenate shaders */
for (i = 0; i < shProg->NumShaders; i++) {
@@ -623,9 +635,16 @@ concat_shaders(struct gl_shader_program *shProg, GLenum shaderType)
_mesa_printf("---NEW CONCATENATED SHADER---:\n%s\n------------\n", source);
*/
+ _mesa_free(shaderLengths);
+
remove_extra_version_directives(source);
newShader = CALLOC_STRUCT(gl_shader);
+ if (!newShader) {
+ _mesa_free(source);
+ return NULL;
+ }
+
newShader->Type = shaderType;
newShader->Source = source;
newShader->Pragmas = firstShader->Pragmas;
@@ -807,7 +826,8 @@ _slang_link(GLcontext *ctx,
if (shProg->VertexProgram) {
_slang_update_inputs_outputs(&shProg->VertexProgram->Base);
_slang_count_temporaries(&shProg->VertexProgram->Base);
- if (!(shProg->VertexProgram->Base.OutputsWritten & (1 << VERT_RESULT_HPOS))) {
+ if (!(shProg->VertexProgram->Base.OutputsWritten
+ & BITFIELD64_BIT(VERT_RESULT_HPOS))) {
/* the vertex program did not compute a vertex position */
link_error(shProg,
"gl_Position was not written by vertex shader\n");
@@ -825,7 +845,7 @@ _slang_link(GLcontext *ctx,
if (shProg->FragmentProgram) {
const GLbitfield varyingRead
= shProg->FragmentProgram->Base.InputsRead >> FRAG_ATTRIB_VAR0;
- const GLbitfield varyingWritten = shProg->VertexProgram ?
+ const GLbitfield64 varyingWritten = shProg->VertexProgram ?
shProg->VertexProgram->Base.OutputsWritten >> VERT_RESULT_VAR0 : 0x0;
if ((varyingRead & varyingWritten) != varyingRead) {
link_error(shProg,
@@ -836,9 +856,10 @@ _slang_link(GLcontext *ctx,
/* check that gl_FragColor and gl_FragData are not both written to */
if (shProg->FragmentProgram) {
- GLbitfield outputsWritten = shProg->FragmentProgram->Base.OutputsWritten;
- if ((outputsWritten & ((1 << FRAG_RESULT_COLOR))) &&
- (outputsWritten >= (1 << FRAG_RESULT_DATA0))) {
+ const GLbitfield64 outputsWritten =
+ shProg->FragmentProgram->Base.OutputsWritten;
+ if ((outputsWritten & BITFIELD64_BIT(FRAG_RESULT_COLOR)) &&
+ (outputsWritten >= BITFIELD64_BIT(FRAG_RESULT_DATA0))) {
link_error(shProg, "Fragment program cannot write both gl_FragColor"
" and gl_FragData[].\n");
return;
diff --git a/src/mesa/shader/slang/slang_vartable.c b/src/mesa/shader/slang/slang_vartable.c
index a4ebacc0936..e07e3a226a5 100644
--- a/src/mesa/shader/slang/slang_vartable.c
+++ b/src/mesa/shader/slang/slang_vartable.c
@@ -311,10 +311,10 @@ _slang_free_temp(slang_var_table *vt, slang_ir_storage *store)
{
struct table *t = vt->Top;
GLuint i;
- GLuint r = store->Index;
+ GLint r = store->Index;
assert(store->Size > 0);
assert(r >= 0);
- assert(r + store->Size <= vt->MaxRegisters * 4);
+ assert((GLuint)r + store->Size <= vt->MaxRegisters * 4);
if (dbg) printf("Free temp sz %d at %d.%s (level %d) store %p\n",
store->Size, r,
_mesa_swizzle_string(store->Swizzle, 0, 0),
diff --git a/src/mesa/sparc/glapi_sparc.S b/src/mesa/sparc/glapi_sparc.S
index aaa17e6a3b9..731ff2b823f 100644
--- a/src/mesa/sparc/glapi_sparc.S
+++ b/src/mesa/sparc/glapi_sparc.S
@@ -1272,6 +1272,7 @@ gl_dispatch_functions_start:
GL_STUB_ALIAS(glGetAttribLocation, glGetAttribLocationARB)
GL_STUB_ALIAS(glDrawBuffers, glDrawBuffersARB)
GL_STUB_ALIAS(glDrawBuffersATI, glDrawBuffersARB)
+ GL_STUB_ALIAS(glRenderbufferStorageMultisampleEXT, glRenderbufferStorageMultisample)
GL_STUB_ALIAS(glPointParameterf, glPointParameterfEXT)
GL_STUB_ALIAS(glPointParameterfARB, glPointParameterfEXT)
GL_STUB_ALIAS(glPointParameterfSGIS, glPointParameterfEXT)
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index ca15ce1b474..73df44d1988 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -46,7 +46,8 @@ static const struct st_tracked_state *atoms[] =
&st_update_clip,
&st_finalize_textures,
- &st_update_shader,
+ &st_update_fp,
+ &st_update_vp,
&st_update_rasterizer,
&st_update_polygon_stipple,
@@ -137,7 +138,7 @@ void st_validate_state( struct st_context *st )
if (state->st == 0)
return;
-// _mesa_printf("%s %x/%x\n", __FUNCTION__, state->mesa, state->st);
+ /*_mesa_printf("%s %x/%x\n", __FUNCTION__, state->mesa, state->st);*/
if (1) {
/* Debug version which enforces various sanity checks on the
@@ -152,7 +153,7 @@ void st_validate_state( struct st_context *st )
const struct st_tracked_state *atom = atoms[i];
struct st_state_flags generated;
-// _mesa_printf("atom %s %x/%x\n", atom->name, atom->dirty.mesa, atom->dirty.st);
+ /*_mesa_printf("atom %s %x/%x\n", atom->name, atom->dirty.mesa, atom->dirty.st);*/
if (!(atom->dirty.mesa || atom->dirty.st) ||
!atom->update) {
@@ -162,7 +163,7 @@ void st_validate_state( struct st_context *st )
if (check_state(state, &atom->dirty)) {
atoms[i]->update( st );
-// _mesa_printf("after: %x\n", atom->dirty.mesa);
+ /*_mesa_printf("after: %x\n", atom->dirty.mesa);*/
}
accumulate_state(&examined, &atom->dirty);
@@ -175,7 +176,7 @@ void st_validate_state( struct st_context *st )
assert(!check_state(&examined, &generated));
prev = *state;
}
-// _mesa_printf("\n");
+ /*_mesa_printf("\n");*/
}
else {
diff --git a/src/mesa/state_tracker/st_atom.h b/src/mesa/state_tracker/st_atom.h
index c7cffd85c8a..f34b49203b2 100644
--- a/src/mesa/state_tracker/st_atom.h
+++ b/src/mesa/state_tracker/st_atom.h
@@ -47,7 +47,8 @@ void st_validate_state( struct st_context *st );
extern const struct st_tracked_state st_update_framebuffer;
extern const struct st_tracked_state st_update_clip;
extern const struct st_tracked_state st_update_depth_stencil_alpha;
-extern const struct st_tracked_state st_update_shader;
+extern const struct st_tracked_state st_update_fp;
+extern const struct st_tracked_state st_update_vp;
extern const struct st_tracked_state st_update_rasterizer;
extern const struct st_tracked_state st_update_polygon_stipple;
extern const struct st_tracked_state st_update_viewport;
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index e18c0f6e0a1..8ca4335e330 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -40,6 +40,7 @@
#include "pipe/p_inlines.h"
#include "cso_cache/cso_context.h"
#include "util/u_rect.h"
+#include "util/u_math.h"
@@ -64,8 +65,8 @@ update_renderbuffer_surface(struct st_context *st,
GLuint level;
/* find matching mipmap level size */
for (level = 0; level <= texture->last_level; level++) {
- if (texture->width[level] == rtt_width &&
- texture->height[level] == rtt_height) {
+ if (u_minify(texture->width0, level) == rtt_width &&
+ u_minify(texture->height0, level) == rtt_height) {
pipe_surface_reference(&strb->surface, NULL);
diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index babfcc87b4a..4b35f59cc2f 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -145,7 +145,7 @@ load_color_map_texture(GLcontext *ctx, struct pipe_texture *pt)
const GLuint gSize = ctx->PixelMaps.GtoG.Size;
const GLuint bSize = ctx->PixelMaps.BtoB.Size;
const GLuint aSize = ctx->PixelMaps.AtoA.Size;
- const uint texSize = pt->width[0];
+ const uint texSize = pt->width0;
uint *dest;
uint i, j;
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 6611956ae83..d6e3a3e5610 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -229,14 +229,23 @@ update_samplers(struct st_context *st)
/*printf("%s su=%u non-null\n", __FUNCTION__, su);*/
cso_single_sampler(st->cso_context, su, sampler);
+ if (su < st->ctx->Const.MaxVertexTextureImageUnits) {
+ cso_single_vertex_sampler(st->cso_context, su, sampler);
+ }
}
else {
/*printf("%s su=%u null\n", __FUNCTION__, su);*/
cso_single_sampler(st->cso_context, su, NULL);
+ if (su < st->ctx->Const.MaxVertexTextureImageUnits) {
+ cso_single_vertex_sampler(st->cso_context, su, NULL);
+ }
}
}
cso_single_sampler_done(st->cso_context);
+ if (st->ctx->Const.MaxVertexTextureImageUnits > 0) {
+ cso_single_vertex_sampler_done(st->cso_context);
+ }
}
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index ee649be885e..09baff875bc 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -56,82 +56,18 @@
#include "st_mesa_to_tgsi.h"
-/**
- * This represents a vertex program, especially translated to match
- * the inputs of a particular fragment shader.
- */
-struct translated_vertex_program
-{
- struct st_vertex_program *master;
-
- /** The fragment shader "signature" this vertex shader is meant for: */
- GLbitfield frag_inputs;
- /** Compared against master vertex program's serialNo: */
- GLuint serialNo;
- /** Maps VERT_RESULT_x to slot */
- GLuint output_to_slot[VERT_RESULT_MAX];
- ubyte output_to_semantic_name[VERT_RESULT_MAX];
- ubyte output_to_semantic_index[VERT_RESULT_MAX];
-
- /** Pointer to the translated vertex program */
- struct st_vertex_program *vp;
-
- struct translated_vertex_program *next; /**< next in linked list */
-};
-
-
-/**
- * Given a vertex program output attribute, return the corresponding
- * fragment program input attribute.
- * \return -1 for vertex outputs that have no corresponding fragment input
+/*
+ * Translate fragment program if needed.
*/
-static GLint
-vp_out_to_fp_in(GLuint vertResult)
-{
- if (vertResult >= VERT_RESULT_TEX0 &&
- vertResult < VERT_RESULT_TEX0 + MAX_TEXTURE_COORD_UNITS)
- return FRAG_ATTRIB_TEX0 + (vertResult - VERT_RESULT_TEX0);
-
- if (vertResult >= VERT_RESULT_VAR0 &&
- vertResult < VERT_RESULT_VAR0 + MAX_VARYING)
- return FRAG_ATTRIB_VAR0 + (vertResult - VERT_RESULT_VAR0);
-
- switch (vertResult) {
- case VERT_RESULT_HPOS:
- return FRAG_ATTRIB_WPOS;
- case VERT_RESULT_COL0:
- return FRAG_ATTRIB_COL0;
- case VERT_RESULT_COL1:
- return FRAG_ATTRIB_COL1;
- case VERT_RESULT_FOGC:
- return FRAG_ATTRIB_FOGC;
- default:
- /* Back-face colors, edge flags, etc */
- return -1;
- }
-}
-
-
-/**
- * Find a translated vertex program that corresponds to stvp and
- * has outputs matched to stfp's inputs.
- * This performs vertex and fragment translation (to TGSI) when needed.
- */
-static struct translated_vertex_program *
-find_translated_vp(struct st_context *st,
- struct st_vertex_program *stvp,
- struct st_fragment_program *stfp)
+static void
+translate_fp(struct st_context *st,
+ struct st_fragment_program *stfp)
{
- static const GLuint UNUSED = ~0;
- struct translated_vertex_program *xvp;
const GLbitfield fragInputsRead = stfp->Base.Base.InputsRead;
- /*
- * Translate fragment program if needed.
- */
if (!stfp->state.tokens) {
GLuint inAttr, numIn = 0;
@@ -141,7 +77,7 @@ find_translated_vp(struct st_context *st,
numIn++;
}
else {
- stfp->input_to_slot[inAttr] = UNUSED;
+ stfp->input_to_slot[inAttr] = -1;
}
}
@@ -151,170 +87,63 @@ find_translated_vp(struct st_context *st,
st_translate_fragment_program(st, stfp, stfp->input_to_slot);
}
+}
- /* See if we've got a translated vertex program whose outputs match
- * the fragment program's inputs.
- * XXX This could be a hash lookup, using InputsRead as the key.
- */
- for (xvp = stfp->vertex_programs; xvp; xvp = xvp->next) {
- if (xvp->master == stvp && xvp->frag_inputs == fragInputsRead) {
- break;
- }
- }
- /* No? Allocate translated vp object now */
- if (!xvp) {
- xvp = ST_CALLOC_STRUCT(translated_vertex_program);
- xvp->frag_inputs = fragInputsRead;
- xvp->master = stvp;
+/**
+ * Find a translated vertex program that corresponds to stvp and
+ * has outputs matched to stfp's inputs.
+ * This performs vertex and fragment translation (to TGSI) when needed.
+ */
+static struct st_vp_varient *
+find_translated_vp(struct st_context *st,
+ struct st_vertex_program *stvp )
+{
+ struct st_vp_varient *vpv;
+ struct st_vp_varient_key key;
- xvp->next = stfp->vertex_programs;
- stfp->vertex_programs = xvp;
- }
+ /* Nothing in our key yet. This will change:
+ */
+ memset(&key, 0, sizeof key);
+ key.dummy = 0;
- /* See if we need to translate vertex program to TGSI form */
- if (xvp->serialNo != stvp->serialNo) {
- GLuint outAttr;
- const GLbitfield outputsWritten = stvp->Base.Base.OutputsWritten;
- GLuint numVpOuts = 0;
- GLboolean emitPntSize = GL_FALSE, emitBFC0 = GL_FALSE, emitBFC1 = GL_FALSE;
- GLbitfield usedGenerics = 0x0;
- GLbitfield usedOutputSlots = 0x0;
-
- /* Compute mapping of vertex program outputs to slots, which depends
- * on the fragment program's input->slot mapping.
+ /* Do we need to throw away old translations after a change in the
+ * GL program string?
+ */
+ if (stvp->serialNo != stvp->lastSerialNo) {
+ /* These may have changed if the program string changed.
*/
- for (outAttr = 0; outAttr < VERT_RESULT_MAX; outAttr++) {
- /* set defaults: */
- xvp->output_to_slot[outAttr] = UNUSED;
- xvp->output_to_semantic_name[outAttr] = TGSI_SEMANTIC_COUNT;
- xvp->output_to_semantic_index[outAttr] = 99;
-
- if (outAttr == VERT_RESULT_HPOS) {
- /* always put xformed position into slot zero */
- GLuint slot = 0;
- xvp->output_to_slot[VERT_RESULT_HPOS] = slot;
- xvp->output_to_semantic_name[outAttr] = TGSI_SEMANTIC_POSITION;
- xvp->output_to_semantic_index[outAttr] = 0;
- numVpOuts++;
- usedOutputSlots |= (1 << slot);
- }
- else if (outputsWritten & (1 << outAttr)) {
- /* see if the frag prog wants this vert output */
- GLint fpInAttrib = vp_out_to_fp_in(outAttr);
- if (fpInAttrib >= 0) {
- GLuint fpInSlot = stfp->input_to_slot[fpInAttrib];
- if (fpInSlot != ~0) {
- /* match this vp output to the fp input */
- GLuint vpOutSlot = stfp->input_map[fpInSlot];
- xvp->output_to_slot[outAttr] = vpOutSlot;
- xvp->output_to_semantic_name[outAttr] = stfp->input_semantic_name[fpInSlot];
- xvp->output_to_semantic_index[outAttr] = stfp->input_semantic_index[fpInSlot];
- numVpOuts++;
- usedOutputSlots |= (1 << vpOutSlot);
- }
- else {
-#if 0 /*debug*/
- printf("VP output %d not used by FP\n", outAttr);
-#endif
- }
- }
- else if (outAttr == VERT_RESULT_PSIZ)
- emitPntSize = GL_TRUE;
- else if (outAttr == VERT_RESULT_BFC0)
- emitBFC0 = GL_TRUE;
- else if (outAttr == VERT_RESULT_BFC1)
- emitBFC1 = GL_TRUE;
- }
-#if 0 /*debug*/
- printf("assign vp output_to_slot[%d] = %d\n", outAttr,
- xvp->output_to_slot[outAttr]);
-#endif
- }
-
- /* must do these last */
- if (emitPntSize) {
- GLuint slot = numVpOuts++;
- xvp->output_to_slot[VERT_RESULT_PSIZ] = slot;
- xvp->output_to_semantic_name[VERT_RESULT_PSIZ] = TGSI_SEMANTIC_PSIZE;
- xvp->output_to_semantic_index[VERT_RESULT_PSIZ] = 0;
- usedOutputSlots |= (1 << slot);
- }
- if (emitBFC0) {
- GLuint slot = numVpOuts++;
- xvp->output_to_slot[VERT_RESULT_BFC0] = slot;
- xvp->output_to_semantic_name[VERT_RESULT_BFC0] = TGSI_SEMANTIC_COLOR;
- xvp->output_to_semantic_index[VERT_RESULT_BFC0] = 0;
- usedOutputSlots |= (1 << slot);
- }
- if (emitBFC1) {
- GLuint slot = numVpOuts++;
- xvp->output_to_slot[VERT_RESULT_BFC1] = slot;
- xvp->output_to_semantic_name[VERT_RESULT_BFC1] = TGSI_SEMANTIC_COLOR;
- xvp->output_to_semantic_index[VERT_RESULT_BFC1] = 1;
- usedOutputSlots |= (1 << slot);
- }
-
- /* build usedGenerics mask */
- usedGenerics = 0x0;
- for (outAttr = 0; outAttr < VERT_RESULT_MAX; outAttr++) {
- if (xvp->output_to_semantic_name[outAttr] == TGSI_SEMANTIC_GENERIC) {
- usedGenerics |= (1 << xvp->output_to_semantic_index[outAttr]);
- }
- }
+ st_prepare_vertex_program( st, stvp );
- /* For each vertex program output that doesn't match up to a fragment
- * program input, map the vertex program output to a free slot and
- * free generic attribute.
+ /* We are now up-to-date:
*/
- for (outAttr = 0; outAttr < VERT_RESULT_MAX; outAttr++) {
- if (outputsWritten & (1 << outAttr)) {
- if (xvp->output_to_slot[outAttr] == UNUSED) {
- GLint freeGeneric = _mesa_ffs(~usedGenerics) - 1;
- GLint freeSlot = _mesa_ffs(~usedOutputSlots) - 1;
- usedGenerics |= (1 << freeGeneric);
- usedOutputSlots |= (1 << freeSlot);
- xvp->output_to_slot[outAttr] = freeSlot;
- xvp->output_to_semantic_name[outAttr] = TGSI_SEMANTIC_GENERIC;
- xvp->output_to_semantic_index[outAttr] = freeGeneric;
- }
- }
-
-#if 0 /*debug*/
- printf("vp output_to_slot[%d] = %d\n", outAttr,
- xvp->output_to_slot[outAttr]);
-#endif
+ stvp->lastSerialNo = stvp->serialNo;
+ }
+
+ /* See if we've got a translated vertex program whose outputs match
+ * the fragment program's inputs.
+ */
+ for (vpv = stvp->varients; vpv; vpv = vpv->next) {
+ if (memcmp(&vpv->key, &key, sizeof key) == 0) {
+ break;
}
+ }
- assert(stvp->Base.Base.NumInstructions > 1);
-
- st_translate_vertex_program(st, stvp, xvp->output_to_slot,
- xvp->output_to_semantic_name,
- xvp->output_to_semantic_index);
-
- xvp->vp = stvp;
-
- /* translated VP is up to date now */
- xvp->serialNo = stvp->serialNo;
+ /* No? Perform new translation here. */
+ if (!vpv) {
+ vpv = st_translate_vertex_program(st, stvp, &key);
+ if (!vpv)
+ return NULL;
+
+ vpv->next = stvp->varients;
+ stvp->varients = vpv;
}
- return xvp;
+ return vpv;
}
-void
-st_free_translated_vertex_programs(struct st_context *st,
- struct translated_vertex_program *xvp)
-{
- struct translated_vertex_program *next;
-
- while (xvp) {
- next = xvp->next;
- _mesa_free(xvp);
- xvp = next;
- }
-}
static void *
@@ -328,32 +157,19 @@ get_passthrough_fs(struct st_context *st)
return st->passthrough_fs;
}
-
static void
-update_linkage( struct st_context *st )
+update_fp( struct st_context *st )
{
- struct st_vertex_program *stvp;
struct st_fragment_program *stfp;
- struct translated_vertex_program *xvp;
-
- /* find active shader and params -- Should be covered by
- * ST_NEW_VERTEX_PROGRAM
- */
- assert(st->ctx->VertexProgram._Current);
- stvp = st_vertex_program(st->ctx->VertexProgram._Current);
- assert(stvp->Base.Base.Target == GL_VERTEX_PROGRAM_ARB);
assert(st->ctx->FragmentProgram._Current);
stfp = st_fragment_program(st->ctx->FragmentProgram._Current);
assert(stfp->Base.Base.Target == GL_FRAGMENT_PROGRAM_ARB);
- xvp = find_translated_vp(st, stvp, stfp);
+ translate_fp(st, stfp);
- st_reference_vertprog(st, &st->vp, stvp);
st_reference_fragprog(st, &st->fp, stfp);
- cso_set_vertex_shader_handle(st->cso_context, stvp->driver_shader);
-
if (st->missing_textures) {
/* use a pass-through frag shader that uses no textures */
void *fs = get_passthrough_fs(st);
@@ -362,16 +178,48 @@ update_linkage( struct st_context *st )
else {
cso_set_fragment_shader_handle(st->cso_context, stfp->driver_shader);
}
+}
+
+const struct st_tracked_state st_update_fp = {
+ "st_update_fp", /* name */
+ { /* dirty */
+ 0, /* mesa */
+ ST_NEW_FRAGMENT_PROGRAM /* st */
+ },
+ update_fp /* update */
+};
+
+
+
+
+static void
+update_vp( struct st_context *st )
+{
+ struct st_vertex_program *stvp;
+
+ /* find active shader and params -- Should be covered by
+ * ST_NEW_VERTEX_PROGRAM
+ */
+ assert(st->ctx->VertexProgram._Current);
+ stvp = st_vertex_program(st->ctx->VertexProgram._Current);
+ assert(stvp->Base.Base.Target == GL_VERTEX_PROGRAM_ARB);
+
+ st->vp_varient = find_translated_vp(st, stvp);
+
+ st_reference_vertprog(st, &st->vp, stvp);
+
+ cso_set_vertex_shader_handle(st->cso_context,
+ st->vp_varient->driver_shader);
- st->vertex_result_to_slot = xvp->output_to_slot;
+ st->vertex_result_to_slot = stvp->result_to_output;
}
-const struct st_tracked_state st_update_shader = {
- "st_update_shader", /* name */
+const struct st_tracked_state st_update_vp = {
+ "st_update_vp", /* name */
{ /* dirty */
0, /* mesa */
- ST_NEW_VERTEX_PROGRAM | ST_NEW_FRAGMENT_PROGRAM /* st */
+ ST_NEW_VERTEX_PROGRAM /* st */
},
- update_linkage /* update */
+ update_vp /* update */
};
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
index 4d4f97da7ed..0b68447d212 100644
--- a/src/mesa/state_tracker/st_atom_texture.c
+++ b/src/mesa/state_tracker/st_atom_texture.c
@@ -32,6 +32,8 @@
*/
+#include "main/macros.h"
+
#include "st_context.h"
#include "st_atom.h"
#include "st_texture.h"
@@ -99,6 +101,12 @@ update_textures(struct st_context *st)
cso_set_sampler_textures(st->cso_context,
st->state.num_textures,
st->state.sampler_texture);
+ if (st->ctx->Const.MaxVertexTextureImageUnits > 0) {
+ cso_set_vertex_sampler_textures(st->cso_context,
+ MIN2(st->state.num_textures,
+ st->ctx->Const.MaxVertexTextureImageUnits),
+ st->state.sampler_texture);
+ }
}
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index a22fa68299b..1bdeaccda3e 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -169,11 +169,6 @@ make_bitmap_fragment_program(GLcontext *ctx, GLuint samplerIndex)
stfp = (struct st_fragment_program *) p;
stfp->Base.UsesKill = GL_TRUE;
- /* No need to send this incomplete program down to hardware:
- *
- * st_translate_fragment_program(ctx->st, stfp, NULL);
- */
-
return stfp;
}
@@ -526,7 +521,7 @@ reset_cache(struct st_context *st)
struct pipe_screen *screen = pipe->screen;
struct bitmap_cache *cache = st->bitmap.cache;
- //memset(cache->buffer, 0xff, sizeof(cache->buffer));
+ /*memset(cache->buffer, 0xff, sizeof(cache->buffer));*/
cache->empty = GL_TRUE;
cache->xmin = 1000000;
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index 8e09d0b9324..63196afba9c 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -239,6 +239,9 @@ st_bufferobj_map_range(GLcontext *ctx, GLenum target,
if (access & GL_MAP_FLUSH_EXPLICIT_BIT)
flags |= PIPE_BUFFER_USAGE_FLUSH_EXPLICIT;
+ if (access & GL_MAP_UNSYNCHRONIZED_BIT)
+ flags |= PIPE_BUFFER_USAGE_UNSYNCHRONIZED;
+
/* ... other flags ...
*/
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 0a6bfcd3d1d..1baff190409 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -60,6 +60,7 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_inlines.h"
+#include "tgsi/tgsi_ureg.h"
#include "util/u_tile.h"
#include "util/u_draw_quad.h"
#include "util/u_math.h"
@@ -236,78 +237,41 @@ make_fragment_shader_z(struct st_context *st)
* Create a simple vertex shader that just passes through the
* vertex position and texcoord (and optionally, color).
*/
-static struct st_vertex_program *
-st_make_passthrough_vertex_shader(struct st_context *st, GLboolean passColor)
+static void *
+st_make_passthrough_vertex_shader(struct st_context *st,
+ GLboolean passColor)
{
- GLcontext *ctx = st->ctx;
- struct st_vertex_program *stvp;
- struct gl_program *p;
- GLuint ic = 0;
-
- if (st->drawpix.vert_shaders[passColor])
- return st->drawpix.vert_shaders[passColor];
-
- /*
- * Create shader now
- */
- p = ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0);
- if (!p)
- return NULL;
-
- if (passColor)
- p->NumInstructions = 4;
- else
- p->NumInstructions = 3;
-
- p->Instructions = _mesa_alloc_instructions(p->NumInstructions);
- if (!p->Instructions) {
- ctx->Driver.DeleteProgram(ctx, p);
- return NULL;
- }
- _mesa_init_instructions(p->Instructions, p->NumInstructions);
- /* MOV result.pos, vertex.pos; */
- p->Instructions[0].Opcode = OPCODE_MOV;
- p->Instructions[0].DstReg.File = PROGRAM_OUTPUT;
- p->Instructions[0].DstReg.Index = VERT_RESULT_HPOS;
- p->Instructions[0].SrcReg[0].File = PROGRAM_INPUT;
- p->Instructions[0].SrcReg[0].Index = VERT_ATTRIB_POS;
- /* MOV result.texcoord0, vertex.texcoord0; */
- p->Instructions[1].Opcode = OPCODE_MOV;
- p->Instructions[1].DstReg.File = PROGRAM_OUTPUT;
- p->Instructions[1].DstReg.Index = VERT_RESULT_TEX0;
- p->Instructions[1].SrcReg[0].File = PROGRAM_INPUT;
- p->Instructions[1].SrcReg[0].Index = VERT_ATTRIB_TEX0;
- ic = 2;
- if (passColor) {
- /* MOV result.color0, vertex.color0; */
- p->Instructions[ic].Opcode = OPCODE_MOV;
- p->Instructions[ic].DstReg.File = PROGRAM_OUTPUT;
- p->Instructions[ic].DstReg.Index = VERT_RESULT_COL0;
- p->Instructions[ic].SrcReg[0].File = PROGRAM_INPUT;
- p->Instructions[ic].SrcReg[0].Index = VERT_ATTRIB_COLOR0;
- ic++;
- }
-
- /* END; */
- p->Instructions[ic].Opcode = OPCODE_END;
- ic++;
-
- assert(ic == p->NumInstructions);
+ if (!st->drawpix.vert_shaders[passColor]) {
+ struct ureg_program *ureg =
+ ureg_create( TGSI_PROCESSOR_VERTEX );
+
+ if (ureg == NULL)
+ return NULL;
+
+ /* MOV result.pos, vertex.pos; */
+ ureg_MOV(ureg,
+ ureg_DECL_output( ureg, TGSI_SEMANTIC_POSITION, 0 ),
+ ureg_DECL_vs_input( ureg, 0 ));
+
+ /* MOV result.texcoord0, vertex.texcoord0; */
+ ureg_MOV(ureg,
+ ureg_DECL_output( ureg, TGSI_SEMANTIC_GENERIC, 0 ),
+ ureg_DECL_vs_input( ureg, 1 ));
+
+ if (passColor) {
+ /* MOV result.color0, vertex.color0; */
+ ureg_MOV(ureg,
+ ureg_DECL_output( ureg, TGSI_SEMANTIC_COLOR, 0 ),
+ ureg_DECL_vs_input( ureg, 2 ));
+ }
- p->InputsRead = VERT_BIT_POS | VERT_BIT_TEX0;
- p->OutputsWritten = ((1 << VERT_RESULT_TEX0) |
- (1 << VERT_RESULT_HPOS));
- if (passColor) {
- p->InputsRead |= VERT_BIT_COLOR0;
- p->OutputsWritten |= (1 << VERT_RESULT_COL0);
+ ureg_END( ureg );
+
+ st->drawpix.vert_shaders[passColor] =
+ ureg_create_shader_and_destroy( ureg, st->pipe );
}
- stvp = (struct st_vertex_program *) p;
- st_translate_vertex_program(st, stvp, NULL, NULL, NULL);
-
- st->drawpix.vert_shaders[passColor] = stvp;
-
- return stvp;
+ return st->drawpix.vert_shaders[passColor];
}
@@ -539,8 +503,8 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
GLsizei width, GLsizei height,
GLfloat zoomX, GLfloat zoomY,
struct pipe_texture *pt,
- struct st_vertex_program *stvp,
- struct st_fragment_program *stfp,
+ void *driver_vp,
+ void *driver_fp,
const GLfloat *color,
GLboolean invertTex)
{
@@ -575,10 +539,10 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
}
/* fragment shader state: TEX lookup program */
- cso_set_fragment_shader_handle(cso, stfp->driver_shader);
+ cso_set_fragment_shader_handle(cso, driver_fp);
/* vertex shader state: position + texcoord pass-through */
- cso_set_vertex_shader_handle(cso, stvp->driver_shader);
+ cso_set_vertex_shader_handle(cso, driver_vp);
/* texture sampling state: */
@@ -621,10 +585,10 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
struct pipe_texture *textures[2];
textures[0] = pt;
textures[1] = st->pixel_xfer.pixelmap_texture;
- pipe->set_sampler_textures(pipe, 2, textures);
+ pipe->set_fragment_sampler_textures(pipe, 2, textures);
}
else {
- pipe->set_sampler_textures(pipe, 1, &pt);
+ pipe->set_fragment_sampler_textures(pipe, 1, &pt);
}
/* Compute window coords (y=0=bottom) with pixel zoom.
@@ -637,8 +601,8 @@ draw_textured_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z,
y1 = y + height * ctx->Pixel.ZoomY;
draw_quad(ctx, x0, y0, z, x1, y1, color, invertTex,
- (GLfloat) width / pt->width[0],
- (GLfloat) height / pt->height[0]);
+ (GLfloat) width / pt->width0,
+ (GLfloat) height / pt->height0);
/* restore state */
cso_restore_rasterizer(cso);
@@ -665,6 +629,15 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
const GLboolean zoom = ctx->Pixel.ZoomX != 1.0 || ctx->Pixel.ZoomY != 1.0;
GLint skipPixels;
ubyte *stmap;
+ struct gl_pixelstore_attrib clippedUnpack = *unpack;
+
+ if (!zoom) {
+ if (!_mesa_clip_drawpixels(ctx, &x, &y, &width, &height,
+ &clippedUnpack)) {
+ /* totally clipped */
+ return;
+ }
+ }
strb = st_renderbuffer(ctx->DrawBuffer->
Attachment[BUFFER_STENCIL].Renderbuffer);
@@ -685,7 +658,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
stmap = screen->transfer_map(screen, pt);
- pixels = _mesa_map_pbo_source(ctx, unpack, pixels);
+ pixels = _mesa_map_pbo_source(ctx, &clippedUnpack, pixels);
assert(pixels);
/* if width > MAX_WIDTH, have to process image in chunks */
@@ -698,17 +671,18 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
GLubyte sValues[MAX_WIDTH];
GLuint zValues[MAX_WIDTH];
GLenum destType = GL_UNSIGNED_BYTE;
- const GLvoid *source = _mesa_image_address2d(unpack, pixels,
+ const GLvoid *source = _mesa_image_address2d(&clippedUnpack, pixels,
width, height,
format, type,
row, skipPixels);
_mesa_unpack_stencil_span(ctx, spanWidth, destType, sValues,
- type, source, unpack,
+ type, source, &clippedUnpack,
ctx->_ImageTransferState);
if (format == GL_DEPTH_STENCIL) {
_mesa_unpack_depth_span(ctx, spanWidth, GL_UNSIGNED_INT, zValues,
- (1 << 24) - 1, type, source, unpack);
+ (1 << 24) - 1, type, source,
+ &clippedUnpack);
}
if (zoom) {
@@ -727,7 +701,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
}
/* now pack the stencil (and Z) values in the dest format */
- switch (pt->format) {
+ switch (pt->texture->format) {
case PIPE_FORMAT_S8_UNORM:
{
ubyte *dest = stmap + spanY * pt->stride + spanX;
@@ -779,7 +753,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
skipPixels += spanWidth;
}
- _mesa_unmap_pbo_source(ctx, unpack);
+ _mesa_unmap_pbo_source(ctx, &clippedUnpack);
/* unmap the stencil buffer */
screen->transfer_unmap(screen, pt);
@@ -796,7 +770,7 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack, const GLvoid *pixels)
{
struct st_fragment_program *stfp;
- struct st_vertex_program *stvp;
+ void *driver_vp;
struct st_context *st = st_context(ctx);
struct pipe_surface *ps;
const GLfloat *color;
@@ -816,13 +790,13 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
if (format == GL_DEPTH_COMPONENT) {
ps = st->state.framebuffer.zsbuf;
stfp = make_fragment_shader_z(st);
- stvp = st_make_passthrough_vertex_shader(st, GL_TRUE);
+ driver_vp = st_make_passthrough_vertex_shader(st, GL_TRUE);
color = ctx->Current.RasterColor;
}
else {
ps = st->state.framebuffer.cbufs[0];
stfp = combined_drawpix_fragment_program(ctx);
- stvp = st_make_passthrough_vertex_shader(st, GL_FALSE);
+ driver_vp = st_make_passthrough_vertex_shader(st, GL_FALSE);
color = NULL;
}
@@ -833,7 +807,10 @@ st_DrawPixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
if (pt) {
draw_textured_quad(ctx, x, y, ctx->Current.RasterPos[2],
width, height, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY,
- pt, stvp, stfp, color, GL_FALSE);
+ pt,
+ driver_vp,
+ stfp->driver_shader,
+ color, GL_FALSE);
pipe_texture_reference(&pt, NULL);
}
}
@@ -879,8 +856,8 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
usage, dstx, dsty,
width, height);
- assert(ptDraw->block.width == 1);
- assert(ptDraw->block.height == 1);
+ assert(pf_get_blockwidth(ptDraw->texture->format) == 1);
+ assert(pf_get_blockheight(ptDraw->texture->format) == 1);
/* map the stencil buffer */
drawMap = screen->transfer_map(screen, ptDraw);
@@ -901,7 +878,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
dst = drawMap + y * ptDraw->stride;
src = buffer + i * width;
- switch (ptDraw->format) {
+ switch (ptDraw->texture->format) {
case PIPE_FORMAT_S8Z24_UNORM:
{
uint *dst4 = (uint *) dst;
@@ -950,7 +927,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
struct pipe_context *pipe = st->pipe;
struct pipe_screen *screen = pipe->screen;
struct st_renderbuffer *rbRead;
- struct st_vertex_program *stvp;
+ void *driver_vp;
struct st_fragment_program *stfp;
struct pipe_texture *pt;
GLfloat *color;
@@ -999,14 +976,14 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
rbRead = st_get_color_read_renderbuffer(ctx);
color = NULL;
stfp = combined_drawpix_fragment_program(ctx);
- stvp = st_make_passthrough_vertex_shader(st, GL_FALSE);
+ driver_vp = st_make_passthrough_vertex_shader(st, GL_FALSE);
}
else {
assert(type == GL_DEPTH);
rbRead = st_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
stfp = make_fragment_shader_z(st);
- stvp = st_make_passthrough_vertex_shader(st, GL_TRUE);
+ driver_vp = st_make_passthrough_vertex_shader(st, GL_TRUE);
}
srcFormat = rbRead->texture->format;
@@ -1138,7 +1115,10 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
/* draw textured quad */
draw_textured_quad(ctx, dstx, dsty, ctx->Current.RasterPos[2],
width, height, ctx->Pixel.ZoomX, ctx->Pixel.ZoomY,
- pt, stvp, stfp, color, GL_TRUE);
+ pt,
+ driver_vp,
+ stfp->driver_shader,
+ color, GL_TRUE);
pipe_texture_reference(&pt, NULL);
}
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 65ce12ccd4f..ead8e228887 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -98,16 +98,14 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
strb->defined = GL_FALSE; /* undefined contents now */
if(strb->software) {
- struct pipe_format_block block;
size_t size;
_mesa_free(strb->data);
assert(strb->format != PIPE_FORMAT_NONE);
- pf_get_block(strb->format, &block);
- strb->stride = pf_get_stride(&block, width);
- size = pf_get_2d_size(&block, strb->stride, height);
+ strb->stride = pf_get_stride(strb->format, width);
+ size = pf_get_2d_size(strb->format, strb->stride, height);
strb->data = _mesa_malloc(size);
@@ -127,10 +125,9 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
memset(&template, 0, sizeof(template));
template.target = PIPE_TEXTURE_2D;
template.format = format;
- pf_get_block(format, &template.block);
- template.width[0] = width;
- template.height[0] = height;
- template.depth[0] = 1;
+ template.width0 = width;
+ template.height0 = height;
+ template.depth0 = 1;
template.last_level = 0;
template.nr_samples = rb->NumSamples;
if (pf_is_depth_stencil(format)) {
@@ -376,7 +373,7 @@ st_render_texture(GLcontext *ctx,
rb->_BaseFormat = texImage->_BaseFormat;
/*printf("***** render to texture level %d: %d x %d\n", att->TextureLevel, rb->Width, rb->Height);*/
- /*printf("***** pipe texture %d x %d\n", pt->width[0], pt->height[0]);*/
+ /*printf("***** pipe texture %d x %d\n", pt->width0, pt->height0);*/
pipe_texture_reference( &strb->texture, pt );
diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c
index b2d5c39a3a0..8c276f8128e 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -138,24 +138,7 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
case GL_VERTEX_PROGRAM_ARB:
{
struct st_vertex_program *stvp = (struct st_vertex_program *) prog;
-
- if (stvp->driver_shader) {
- cso_delete_vertex_shader(st->cso_context, stvp->driver_shader);
- stvp->driver_shader = NULL;
- }
-
- if (stvp->draw_shader) {
-#if FEATURE_feedback || FEATURE_drawpix
- /* this would only have been allocated for the RasterPos path */
- draw_delete_vertex_shader(st->draw, stvp->draw_shader);
- stvp->draw_shader = NULL;
-#endif
- }
-
- if (stvp->state.tokens) {
- st_free_tokens(stvp->state.tokens);
- stvp->state.tokens = NULL;
- }
+ st_vp_release_varients( st, stvp );
}
break;
case GL_FRAGMENT_PROGRAM_ARB:
@@ -177,8 +160,6 @@ st_delete_program(GLcontext *ctx, struct gl_program *prog)
_mesa_reference_program(ctx, &prg, NULL);
stfp->bitmap_program = NULL;
}
-
- st_free_translated_vertex_programs(st, stfp->vertex_programs);
}
break;
default:
@@ -219,8 +200,6 @@ static void st_program_string_notify( GLcontext *ctx,
stfp->state.tokens = NULL;
}
- stfp->param_state = stfp->Base.Base.Parameters->StateFlags;
-
if (st->fp == stfp)
st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM;
}
@@ -229,25 +208,7 @@ static void st_program_string_notify( GLcontext *ctx,
stvp->serialNo++;
- if (stvp->driver_shader) {
- cso_delete_vertex_shader(st->cso_context, stvp->driver_shader);
- stvp->driver_shader = NULL;
- }
-
- if (stvp->draw_shader) {
-#if FEATURE_feedback || FEATURE_drawpix
- /* this would only have been allocated for the RasterPos path */
- draw_delete_vertex_shader(st->draw, stvp->draw_shader);
- stvp->draw_shader = NULL;
-#endif
- }
-
- if (stvp->state.tokens) {
- st_free_tokens(stvp->state.tokens);
- stvp->state.tokens = NULL;
- }
-
- stvp->param_state = stvp->Base.Base.Parameters->StateFlags;
+ st_vp_release_varients( st, stvp );
if (st->vp == stvp)
st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 772bb3bb69e..6fa7bb64f2e 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -103,7 +103,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
}
/* get stencil (and Z) values */
- switch (pt->format) {
+ switch (pt->texture->format) {
case PIPE_FORMAT_S8_UNORM:
{
const ubyte *src = stmap + srcY * pt->stride;
@@ -243,7 +243,7 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb,
GLint row, col, dy, dstStride;
if (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP) {
- y = strb->texture->height[0] - y - height;
+ y = strb->texture->height0 - y - height;
}
trans = st_cond_flush_get_tex_transfer(st_context(ctx), strb->texture,
@@ -431,8 +431,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
const GLint dstStride = _mesa_image_row_stride(&clippedPacking, width,
format, type);
- if (trans->format == PIPE_FORMAT_S8Z24_UNORM ||
- trans->format == PIPE_FORMAT_X8Z24_UNORM) {
+ if (trans->texture->format == PIPE_FORMAT_S8Z24_UNORM ||
+ trans->texture->format == PIPE_FORMAT_X8Z24_UNORM) {
if (format == GL_DEPTH_COMPONENT) {
for (i = 0; i < height; i++) {
GLuint ztemp[MAX_WIDTH];
@@ -463,8 +463,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
}
}
}
- else if (trans->format == PIPE_FORMAT_Z24S8_UNORM ||
- trans->format == PIPE_FORMAT_Z24X8_UNORM) {
+ else if (trans->texture->format == PIPE_FORMAT_Z24S8_UNORM ||
+ trans->texture->format == PIPE_FORMAT_Z24X8_UNORM) {
if (format == GL_DEPTH_COMPONENT) {
for (i = 0; i < height; i++) {
GLuint ztemp[MAX_WIDTH];
@@ -490,7 +490,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
}
}
}
- else if (trans->format == PIPE_FORMAT_Z16_UNORM) {
+ else if (trans->texture->format == PIPE_FORMAT_Z16_UNORM) {
for (i = 0; i < height; i++) {
GLushort ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
@@ -505,7 +505,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
dst += dstStride;
}
}
- else if (trans->format == PIPE_FORMAT_Z32_UNORM) {
+ else if (trans->texture->format == PIPE_FORMAT_Z32_UNORM) {
for (i = 0; i < height; i++) {
GLuint ztemp[MAX_WIDTH];
GLfloat zfloat[MAX_WIDTH];
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 878a40fae96..6d136f5abf3 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -93,51 +93,6 @@ gl_target_to_pipe(GLenum target)
}
-/**
- * Return nominal bytes per texel for a compressed format, 0 for non-compressed
- * format.
- */
-static GLuint
-compressed_num_bytes(gl_format format)
-{
- switch (format) {
-#if FEATURE_texture_fxt1
- case MESA_FORMAT_RGB_FXT1:
- case MESA_FORMAT_RGBA_FXT1:
-#endif
-#if FEATURE_texture_s3tc
- case MESA_FORMAT_RGB_DXT1:
- case MESA_FORMAT_RGBA_DXT1:
- return 2;
- case MESA_FORMAT_RGBA_DXT3:
- case MESA_FORMAT_RGBA_DXT5:
- return 4;
-#endif
- default:
- return 0;
- }
-}
-
-
-static GLboolean
-is_compressed_mesa_format(gl_format format)
-{
- switch (format) {
- case MESA_FORMAT_RGB_DXT1:
- case MESA_FORMAT_RGBA_DXT1:
- case MESA_FORMAT_RGBA_DXT3:
- case MESA_FORMAT_RGBA_DXT5:
- case MESA_FORMAT_SRGB_DXT1:
- case MESA_FORMAT_SRGBA_DXT1:
- case MESA_FORMAT_SRGBA_DXT3:
- case MESA_FORMAT_SRGBA_DXT5:
- return GL_TRUE;
- default:
- return GL_FALSE;
- }
-}
-
-
/** called via ctx->Driver.NewTextureImage() */
static struct gl_texture_image *
st_NewTextureImage(GLcontext * ctx)
@@ -450,10 +405,9 @@ compress_with_blit(GLcontext * ctx,
memset(&templ, 0, sizeof(templ));
templ.target = PIPE_TEXTURE_2D;
templ.format = st_mesa_format_to_pipe_format(mesa_format);
- pf_get_block(templ.format, &templ.block);
- templ.width[0] = width;
- templ.height[0] = height;
- templ.depth[0] = 1;
+ templ.width0 = width;
+ templ.height0 = height;
+ templ.depth0 = 1;
templ.last_level = 0;
templ.tex_usage = PIPE_TEXTURE_USAGE_SAMPLER;
src_tex = screen->texture_create(screen, &templ);
@@ -663,7 +617,7 @@ st_TexImage(GLcontext * ctx,
*/
if (!compressed_src &&
!ctx->Mesa_DXTn &&
- is_compressed_mesa_format(texImage->TexFormat) &&
+ _mesa_is_format_compressed(texImage->TexFormat) &&
screen->is_format_supported(screen,
stImage->pt->format,
stImage->pt->target,
@@ -878,7 +832,7 @@ decompress_with_blit(GLcontext * ctx, GLenum target, GLint level,
/* copy/pack data into user buffer */
if (st_equal_formats(stImage->pt->format, format, type)) {
/* memcpy */
- const uint bytesPerRow = width * pf_get_size(stImage->pt->format);
+ const uint bytesPerRow = width * pf_get_blocksize(stImage->pt->format);
ubyte *map = screen->transfer_map(screen, tex_xfer);
GLuint row;
for (row = 0; row < height; row++) {
@@ -960,7 +914,7 @@ st_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
PIPE_TRANSFER_READ, 0, 0,
stImage->base.Width,
stImage->base.Height);
- texImage->RowStride = stImage->transfer->stride / stImage->pt->block.size;
+ texImage->RowStride = stImage->transfer->stride / pf_get_blocksize(stImage->pt->format);
}
else {
/* Otherwise, the image should actually be stored in
@@ -1066,7 +1020,7 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
/* See if we can do texture compression with a blit/render.
*/
if (!ctx->Mesa_DXTn &&
- is_compressed_mesa_format(texImage->TexFormat) &&
+ _mesa_is_format_compressed(texImage->TexFormat) &&
screen->is_format_supported(screen,
stImage->pt->format,
stImage->pt->target,
@@ -1208,10 +1162,10 @@ st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_image *texImage)
{
struct st_texture_image *stImage = st_texture_image(texImage);
- struct pipe_format_block block;
int srcBlockStride;
int dstBlockStride;
int y;
+ enum pipe_format pformat= stImage->pt->format;
if (stImage->pt) {
unsigned face = _mesa_tex_target_to_face(target);
@@ -1223,8 +1177,7 @@ st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
xoffset, yoffset,
width, height);
- block = stImage->pt->block;
- srcBlockStride = pf_get_stride(&block, width);
+ srcBlockStride = pf_get_stride(pformat, width);
dstBlockStride = stImage->transfer->stride;
} else {
assert(stImage->pt);
@@ -1238,16 +1191,16 @@ st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
return;
}
- assert(xoffset % block.width == 0);
- assert(yoffset % block.height == 0);
- assert(width % block.width == 0);
- assert(height % block.height == 0);
+ assert(xoffset % pf_get_blockwidth(pformat) == 0);
+ assert(yoffset % pf_get_blockheight(pformat) == 0);
+ assert(width % pf_get_blockwidth(pformat) == 0);
+ assert(height % pf_get_blockheight(pformat) == 0);
- for (y = 0; y < height; y += block.height) {
+ for (y = 0; y < height; y += pf_get_blockheight(pformat)) {
/* don't need to adjust for xoffset and yoffset as st_texture_image_map does that */
- const char *src = (const char*)data + srcBlockStride * pf_get_nblocksy(&block, y);
- char *dst = (char*)texImage->Data + dstBlockStride * pf_get_nblocksy(&block, y);
- memcpy(dst, src, pf_get_stride(&block, width));
+ const char *src = (const char*)data + srcBlockStride * pf_get_nblocksy(pformat, y);
+ char *dst = (char*)texImage->Data + dstBlockStride * pf_get_nblocksy(pformat, y);
+ memcpy(dst, src, pf_get_stride(pformat, width));
}
if (stImage->pt) {
@@ -1309,7 +1262,8 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
srcX, srcY,
width, height);
- if (baseFormat == GL_DEPTH_COMPONENT &&
+ if ((baseFormat == GL_DEPTH_COMPONENT ||
+ baseFormat == GL_DEPTH_STENCIL) &&
pf_is_depth_and_stencil(stImage->pt->format))
transfer_usage = PIPE_TRANSFER_READ_WRITE;
else
@@ -1322,7 +1276,7 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
destX, destY, width, height);
if (baseFormat == GL_DEPTH_COMPONENT ||
- baseFormat == GL_DEPTH24_STENCIL8) {
+ baseFormat == GL_DEPTH_STENCIL) {
const GLboolean scaleOrBias = (ctx->Pixel.DepthScale != 1.0F ||
ctx->Pixel.DepthBias != 0.0F);
GLint row, yStep;
@@ -1455,7 +1409,7 @@ st_copy_texsubimage(GLcontext *ctx,
struct gl_texture_image *texImage =
_mesa_select_tex_image(ctx, texObj, target, level);
struct st_texture_image *stImage = st_texture_image(texImage);
- const GLenum texBaseFormat = texImage->InternalFormat;
+ const GLenum texBaseFormat = texImage->_BaseFormat;
struct gl_framebuffer *fb = ctx->ReadBuffer;
struct st_renderbuffer *strb;
struct pipe_context *pipe = ctx->st->pipe;
@@ -1476,12 +1430,9 @@ st_copy_texsubimage(GLcontext *ctx,
/* determine if copying depth or color data */
if (texBaseFormat == GL_DEPTH_COMPONENT ||
- texBaseFormat == GL_DEPTH24_STENCIL8) {
+ texBaseFormat == GL_DEPTH_STENCIL) {
strb = st_renderbuffer(fb->_DepthBuffer);
}
- else if (texBaseFormat == GL_DEPTH_STENCIL_EXT) {
- strb = st_renderbuffer(fb->_StencilBuffer);
- }
else {
/* texBaseFormat == GL_RGB, GL_RGBA, GL_ALPHA, etc */
strb = st_renderbuffer(fb->_ColorReadBuffer);
@@ -1567,6 +1518,8 @@ st_copy_texsubimage(GLcontext *ctx,
use_fallback = GL_FALSE;
}
else if (format_writemask &&
+ texBaseFormat != GL_DEPTH_COMPONENT &&
+ texBaseFormat != GL_DEPTH_STENCIL &&
screen->is_format_supported(screen, src_format,
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER,
@@ -1724,8 +1677,6 @@ copy_image_data_to_texture(struct st_context *st,
pipe_texture_reference(&stImage->pt, NULL);
}
else if (stImage->base.Data) {
- assert(stImage->base.Data != NULL);
-
/* More straightforward upload.
*/
@@ -1739,10 +1690,10 @@ copy_image_data_to_texture(struct st_context *st,
dstLevel,
stImage->base.Data,
stImage->base.RowStride *
- stObj->pt->block.size,
+ pf_get_blocksize(stObj->pt->format),
stImage->base.RowStride *
stImage->base.Height *
- stObj->pt->block.size);
+ pf_get_blocksize(stObj->pt->format));
_mesa_align_free(stImage->base.Data);
stImage->base.Data = NULL;
}
@@ -1764,7 +1715,7 @@ st_finalize_texture(GLcontext *ctx,
{
struct st_texture_object *stObj = st_texture_object(tObj);
const GLuint nr_faces = (stObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
- GLuint cpp, face;
+ GLuint blockSize, face;
struct st_texture_image *firstImage;
*needFlush = GL_FALSE;
@@ -1796,13 +1747,8 @@ st_finalize_texture(GLcontext *ctx,
pipe_texture_reference(&stObj->pt, firstImage->pt);
}
- /* FIXME: determine format block instead of cpp */
- if (_mesa_is_format_compressed(firstImage->base.TexFormat)) {
- cpp = compressed_num_bytes(firstImage->base.TexFormat);
- }
- else {
- cpp = _mesa_get_format_bytes(firstImage->base.TexFormat);
- }
+ /* bytes per pixel block (blocks are usually 1x1) */
+ blockSize = _mesa_get_format_bytes(firstImage->base.TexFormat);
/* If we already have a gallium texture, check that it matches the texture
* object's format, target, size, num_levels, etc.
@@ -1813,11 +1759,9 @@ st_finalize_texture(GLcontext *ctx,
if (stObj->pt->target != gl_target_to_pipe(stObj->base.Target) ||
stObj->pt->format != fmt ||
stObj->pt->last_level < stObj->lastLevel ||
- stObj->pt->width[0] != firstImage->base.Width2 ||
- stObj->pt->height[0] != firstImage->base.Height2 ||
- stObj->pt->depth[0] != firstImage->base.Depth2 ||
- /* Nominal bytes per pixel: */
- stObj->pt->block.size / stObj->pt->block.width != cpp)
+ stObj->pt->width0 != firstImage->base.Width2 ||
+ stObj->pt->height0 != firstImage->base.Height2 ||
+ stObj->pt->depth0 != firstImage->base.Depth2)
{
pipe_texture_reference(&stObj->pt, NULL);
ctx->st->dirty.st |= ST_NEW_FRAMEBUFFER;
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 18adb35e872..b7607286583 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -127,6 +127,8 @@ struct st_context
struct st_vertex_program *vp; /**< Currently bound vertex program */
struct st_fragment_program *fp; /**< Currently bound fragment program */
+ struct st_vp_varient *vp_varient;
+
struct gl_texture_object *default_texture;
struct {
diff --git a/src/mesa/state_tracker/st_debug.c b/src/mesa/state_tracker/st_debug.c
index 3009cde9d51..6e699ca5522 100644
--- a/src/mesa/state_tracker/st_debug.c
+++ b/src/mesa/state_tracker/st_debug.c
@@ -86,7 +86,8 @@ st_print_current(void)
}
#endif
- tgsi_dump( st->vp->state.tokens, 0 );
+ if (st->vp->varients)
+ tgsi_dump( st->vp->varients[0].state.tokens, 0 );
if (st->vp->Base.Base.Parameters)
_mesa_print_parameter_list(st->vp->Base.Base.Parameters);
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index c76bff91819..e13ae57a0ec 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -25,10 +25,20 @@
*
**************************************************************************/
- /*
- * Authors:
- * Keith Whitwell <[email protected]>
- */
+/*
+ * This file implements the st_draw_vbo() function which is called from
+ * Mesa's VBO module. All point/line/triangle rendering is done through
+ * this function whether the user called glBegin/End, glDrawArrays,
+ * glDrawElements, glEvalMesh, or glCalList, etc.
+ *
+ * We basically convert the VBO's vertex attribute/array information into
+ * Gallium vertex state, bind the vertex buffer objects and call
+ * pipe->draw_elements(), pipe->draw_range_elements() or pipe->draw_arrays().
+ *
+ * Authors:
+ * Keith Whitwell <[email protected]>
+ */
+
#include "main/imports.h"
#include "main/image.h"
@@ -563,7 +573,7 @@ st_draw_vbo(GLcontext *ctx,
/* must get these after state validation! */
vp = ctx->st->vp;
- vs = &ctx->st->vp->state;
+ vs = &ctx->st->vp_varient->state;
#if 0
if (MESA_VERBOSE & VERBOSE_GLSL) {
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index b2d682ef640..d793f820bc3 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
@@ -120,10 +120,10 @@ st_feedback_draw_vbo(GLcontext *ctx,
/* must get these after state validation! */
vp = ctx->st->vp;
- vs = &st->vp->state;
+ vs = &st->vp_varient->state;
- if (!st->vp->draw_shader) {
- st->vp->draw_shader = draw_create_vertex_shader(draw, vs);
+ if (!st->vp_varient->draw_shader) {
+ st->vp_varient->draw_shader = draw_create_vertex_shader(draw, vs);
}
/*
@@ -136,7 +136,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
draw_set_viewport_state(draw, &st->state.viewport);
draw_set_clip_state(draw, &st->state.clip);
draw_set_rasterizer_state(draw, &st->state.rasterizer);
- draw_bind_vertex_shader(draw, st->vp->draw_shader);
+ draw_bind_vertex_shader(draw, st->vp_varient->draw_shader);
set_feedback_vertex_format(ctx);
/* loop over TGSI shader inputs to determine vertex buffer
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 3f835d38dd5..ef3cbc53ee0 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -92,6 +92,10 @@ void st_init_limits(struct st_context *st)
= _min(screen->get_param(screen, PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS),
MAX_VERTEX_TEXTURE_IMAGE_UNITS);
+ c->MaxCombinedTextureImageUnits
+ = _min(screen->get_param(screen, PIPE_CAP_MAX_COMBINED_SAMPLERS),
+ MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+
c->MaxTextureCoordUnits
= _min(c->MaxTextureImageUnits, MAX_TEXTURE_COORD_UNITS);
@@ -284,6 +288,7 @@ void st_init_extensions(struct st_context *st)
PIPE_TEXTURE_2D,
PIPE_TEXTURE_USAGE_SAMPLER, 0)) {
ctx->Extensions.EXT_texture_compression_s3tc = GL_TRUE;
+ ctx->Extensions.S3_s3tc = GL_TRUE;
}
/* ycbcr support */
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 02f80057c29..93125afe9e1 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -389,6 +389,33 @@ default_rgba_format(struct pipe_screen *screen,
}
/**
+ * Find an RGB format supported by the context/winsys.
+ */
+static enum pipe_format
+default_rgb_format(struct pipe_screen *screen,
+ enum pipe_texture_target target,
+ unsigned tex_usage,
+ unsigned geom_flags)
+{
+ static const enum pipe_format colorFormats[] = {
+ PIPE_FORMAT_X8R8G8B8_UNORM,
+ PIPE_FORMAT_B8G8R8X8_UNORM,
+ PIPE_FORMAT_R8G8B8X8_UNORM,
+ PIPE_FORMAT_A8R8G8B8_UNORM,
+ PIPE_FORMAT_B8G8R8A8_UNORM,
+ PIPE_FORMAT_R8G8B8A8_UNORM,
+ PIPE_FORMAT_R5G6B5_UNORM
+ };
+ uint i;
+ for (i = 0; i < Elements(colorFormats); i++) {
+ if (screen->is_format_supported( screen, colorFormats[i], target, tex_usage, geom_flags )) {
+ return colorFormats[i];
+ }
+ }
+ return PIPE_FORMAT_NONE;
+}
+
+/**
* Find an sRGBA format supported by the context/winsys.
*/
static enum pipe_format
@@ -472,13 +499,14 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case 4:
case GL_RGBA:
case GL_COMPRESSED_RGBA:
- case 3:
- case GL_RGB:
- case GL_COMPRESSED_RGB:
case GL_RGBA8:
case GL_RGB10_A2:
case GL_RGBA12:
return default_rgba_format( screen, target, tex_usage, geom_flags );
+ case 3:
+ case GL_RGB:
+ case GL_COMPRESSED_RGB:
+ return default_rgb_format( screen, target, tex_usage, geom_flags );
case GL_RGBA16:
if (tex_usage & PIPE_TEXTURE_USAGE_RENDER_TARGET)
return default_deep_rgba_format( screen, target, tex_usage, geom_flags );
@@ -500,7 +528,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat,
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
- return default_rgba_format( screen, target, tex_usage, geom_flags );
+ return default_rgb_format( screen, target, tex_usage, geom_flags );
case GL_RGB5:
case GL_RGB4:
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index 16ca2771b0f..77005518302 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -38,6 +38,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_inlines.h"
#include "util/u_gen_mipmap.h"
+#include "util/u_math.h"
#include "cso_cache/cso_cache.h"
#include "cso_cache/cso_context.h"
@@ -133,29 +134,33 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
srcTrans = st_cond_flush_get_tex_transfer(st_context(ctx), pt, face,
srcLevel, zslice,
PIPE_TRANSFER_READ, 0, 0,
- pt->width[srcLevel],
- pt->height[srcLevel]);
+ u_minify(pt->width0, srcLevel),
+ u_minify(pt->height0, srcLevel));
dstTrans = st_cond_flush_get_tex_transfer(st_context(ctx), pt, face,
dstLevel, zslice,
PIPE_TRANSFER_WRITE, 0, 0,
- pt->width[dstLevel],
- pt->height[dstLevel]);
+ u_minify(pt->width0, dstLevel),
+ u_minify(pt->height0, dstLevel));
srcData = (ubyte *) screen->transfer_map(screen, srcTrans);
dstData = (ubyte *) screen->transfer_map(screen, dstTrans);
- srcStride = srcTrans->stride / srcTrans->block.size;
- dstStride = dstTrans->stride / dstTrans->block.size;
+ srcStride = srcTrans->stride / pf_get_blocksize(srcTrans->texture->format);
+ dstStride = dstTrans->stride / pf_get_blocksize(dstTrans->texture->format);
_mesa_generate_mipmap_level(target, datatype, comps,
- 0 /*border*/,
- pt->width[srcLevel], pt->height[srcLevel], pt->depth[srcLevel],
- srcData,
- srcStride, /* stride in texels */
- pt->width[dstLevel], pt->height[dstLevel], pt->depth[dstLevel],
- dstData,
- dstStride); /* stride in texels */
+ 0 /*border*/,
+ u_minify(pt->width0, srcLevel),
+ u_minify(pt->height0, srcLevel),
+ u_minify(pt->depth0, srcLevel),
+ srcData,
+ srcStride, /* stride in texels */
+ u_minify(pt->width0, dstLevel),
+ u_minify(pt->height0, dstLevel),
+ u_minify(pt->depth0, dstLevel),
+ dstData,
+ dstStride); /* stride in texels */
screen->transfer_unmap(screen, srcTrans);
screen->transfer_unmap(screen, dstTrans);
@@ -232,9 +237,9 @@ st_generate_mipmap(GLcontext *ctx, GLenum target,
oldTex->target,
oldTex->format,
lastLevel,
- oldTex->width[0],
- oldTex->height[0],
- oldTex->depth[0],
+ oldTex->width0,
+ oldTex->height0,
+ oldTex->depth0,
oldTex->tex_usage);
/* The texture isn't in a "complete" state yet so set the expected
@@ -269,9 +274,9 @@ st_generate_mipmap(GLcontext *ctx, GLenum target,
= _mesa_get_tex_image(ctx, texObj, target, srcLevel);
struct gl_texture_image *dstImage;
struct st_texture_image *stImage;
- uint dstWidth = pt->width[dstLevel];
- uint dstHeight = pt->height[dstLevel];
- uint dstDepth = pt->depth[dstLevel];
+ uint dstWidth = u_minify(pt->width0, dstLevel);
+ uint dstHeight = u_minify(pt->height0, dstLevel);
+ uint dstDepth = u_minify(pt->depth0, dstLevel);
uint border = srcImage->Border;
dstImage = _mesa_get_tex_image(ctx, texObj, target, dstLevel);
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 3d6c2158191..5e76f4db4eb 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -278,7 +278,7 @@ static struct ureg_src swizzle_4v( struct ureg_src src,
/**
- * Translate SWZ instructions into a single MAD. EG:
+ * Translate a SWZ instruction into a MOV, MUL or MAD instruction. EG:
*
* SWZ dst, src.x-y10
*
@@ -676,6 +676,31 @@ emit_inverted_wpos( struct st_translate *t,
/**
+ * OpenGL's fragment gl_FrontFace input is 1 for front-facing, 0 for back.
+ * TGSI uses +1 for front, -1 for back.
+ * This function converts the TGSI value to the GL value. Simply clamping/
+ * saturating the value to [0,1] does the job.
+ */
+static void
+emit_face_var( struct st_translate *t,
+ const struct gl_program *program )
+{
+ struct ureg_program *ureg = t->ureg;
+ struct ureg_dst face_temp = ureg_DECL_temporary( ureg );
+ struct ureg_src face_input = t->inputs[t->inputMapping[FRAG_ATTRIB_FACE]];
+
+ /* MOV_SAT face_temp, input[face]
+ */
+ face_temp = ureg_saturate( face_temp );
+ ureg_MOV( ureg, face_temp, face_input );
+
+ /* Use face_temp as face input from here on:
+ */
+ t->inputs[t->inputMapping[FRAG_ATTRIB_FACE]] = ureg_src(face_temp);
+}
+
+
+/**
* Translate Mesa program to TGSI format.
* \param program the program to translate
* \param numInputs number of input registers used
@@ -704,12 +729,10 @@ st_translate_mesa_program(
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
const GLuint interpMode[],
- const GLbitfield inputFlags[],
GLuint numOutputs,
const GLuint outputMapping[],
const ubyte outputSemanticName[],
- const ubyte outputSemanticIndex[],
- const GLbitfield outputFlags[] )
+ const ubyte outputSemanticIndex[] )
{
struct st_translate translate, *t;
struct ureg_program *ureg;
@@ -748,6 +771,10 @@ st_translate_mesa_program(
emit_inverted_wpos( t, program );
}
+ if (program->InputsRead & FRAG_BIT_FACE) {
+ emit_face_var( t, program );
+ }
+
/*
* Declare output attributes.
*/
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h
index c0d1ff59e1f..dc0362fe790 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.h
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h
@@ -49,12 +49,10 @@ st_translate_mesa_program(
const ubyte inputSemanticName[],
const ubyte inputSemanticIndex[],
const GLuint interpMode[],
- const GLbitfield inputFlags[],
GLuint numOutputs,
const GLuint outputMapping[],
const ubyte outputSemanticName[],
- const ubyte outputSemanticIndex[],
- const GLbitfield outputFlags[] );
+ const ubyte outputSemanticIndex[] );
void
st_free_tokens(const struct tgsi_token *tokens);
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index a9be80ce8f3..d66f45d13ea 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -49,6 +49,36 @@
#include "st_mesa_to_tgsi.h"
#include "cso_cache/cso_context.h"
+ /* Clean out any old compilations:
+ */
+void
+st_vp_release_varients( struct st_context *st,
+ struct st_vertex_program *stvp )
+{
+ struct st_vp_varient *vpv;
+
+ for (vpv = stvp->varients; vpv; ) {
+ struct st_vp_varient *next = vpv->next;
+
+ if (vpv->driver_shader)
+ cso_delete_vertex_shader(st->cso_context, vpv->driver_shader);
+
+ if (vpv->draw_shader)
+ draw_delete_vertex_shader( st->draw, vpv->draw_shader );
+
+ if (vpv->state.tokens)
+ st_free_tokens(vpv->state.tokens);
+
+ FREE( vpv );
+
+ vpv = next;
+ }
+
+ stvp->varients = NULL;
+}
+
+
+
/**
* Translate a Mesa vertex shader into a TGSI shader.
@@ -58,31 +88,13 @@
* \return pointer to cached pipe_shader object.
*/
void
-st_translate_vertex_program(struct st_context *st,
- struct st_vertex_program *stvp,
- const GLuint outputMapping[],
- const ubyte *outputSemanticName,
- const ubyte *outputSemanticIndex)
+st_prepare_vertex_program(struct st_context *st,
+ struct st_vertex_program *stvp)
{
- struct pipe_context *pipe = st->pipe;
- GLuint defaultOutputMapping[VERT_RESULT_MAX];
- GLuint attr, i;
- GLuint num_generic = 0;
-
- ubyte vs_input_semantic_name[PIPE_MAX_SHADER_INPUTS];
- ubyte vs_input_semantic_index[PIPE_MAX_SHADER_INPUTS];
- uint vs_num_inputs = 0;
-
- ubyte vs_output_semantic_name[PIPE_MAX_SHADER_OUTPUTS];
- ubyte vs_output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
- uint vs_num_outputs = 0;
-
- GLbitfield input_flags[MAX_PROGRAM_INPUTS];
- GLbitfield output_flags[MAX_PROGRAM_OUTPUTS];
+ GLuint attr;
-// memset(&vs, 0, sizeof(vs));
- memset(input_flags, 0, sizeof(input_flags));
- memset(output_flags, 0, sizeof(output_flags));
+ stvp->num_inputs = 0;
+ stvp->num_outputs = 0;
if (stvp->Base.IsPositionInvariant)
_mesa_insert_mvp_code(st->ctx, &stvp->Base);
@@ -93,162 +105,56 @@ st_translate_vertex_program(struct st_context *st,
*/
for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) {
if (stvp->Base.Base.InputsRead & (1 << attr)) {
- const GLuint slot = vs_num_inputs;
-
- vs_num_inputs++;
-
- stvp->input_to_index[attr] = slot;
- stvp->index_to_input[slot] = attr;
-
- switch (attr) {
- case VERT_ATTRIB_POS:
- vs_input_semantic_name[slot] = TGSI_SEMANTIC_POSITION;
- vs_input_semantic_index[slot] = 0;
- break;
- case VERT_ATTRIB_WEIGHT:
- /* fall-through */
- case VERT_ATTRIB_NORMAL:
- /* just label as a generic */
- vs_input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- vs_input_semantic_index[slot] = 0;
- break;
- case VERT_ATTRIB_COLOR0:
- vs_input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
- vs_input_semantic_index[slot] = 0;
- break;
- case VERT_ATTRIB_COLOR1:
- vs_input_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
- vs_input_semantic_index[slot] = 1;
- break;
- case VERT_ATTRIB_FOG:
- vs_input_semantic_name[slot] = TGSI_SEMANTIC_FOG;
- vs_input_semantic_index[slot] = 0;
- break;
- case VERT_ATTRIB_POINT_SIZE:
- vs_input_semantic_name[slot] = TGSI_SEMANTIC_PSIZE;
- vs_input_semantic_index[slot] = 0;
- break;
- case VERT_ATTRIB_TEX0:
- case VERT_ATTRIB_TEX1:
- case VERT_ATTRIB_TEX2:
- case VERT_ATTRIB_TEX3:
- case VERT_ATTRIB_TEX4:
- case VERT_ATTRIB_TEX5:
- case VERT_ATTRIB_TEX6:
- case VERT_ATTRIB_TEX7:
- assert(slot < Elements(vs_input_semantic_name));
- vs_input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- vs_input_semantic_index[slot] = num_generic++;
- break;
- case VERT_ATTRIB_GENERIC0:
- case VERT_ATTRIB_GENERIC1:
- case VERT_ATTRIB_GENERIC2:
- case VERT_ATTRIB_GENERIC3:
- case VERT_ATTRIB_GENERIC4:
- case VERT_ATTRIB_GENERIC5:
- case VERT_ATTRIB_GENERIC6:
- case VERT_ATTRIB_GENERIC7:
- case VERT_ATTRIB_GENERIC8:
- case VERT_ATTRIB_GENERIC9:
- case VERT_ATTRIB_GENERIC10:
- case VERT_ATTRIB_GENERIC11:
- case VERT_ATTRIB_GENERIC12:
- case VERT_ATTRIB_GENERIC13:
- case VERT_ATTRIB_GENERIC14:
- case VERT_ATTRIB_GENERIC15:
- assert(attr < VERT_ATTRIB_MAX);
- assert(slot < Elements(vs_input_semantic_name));
- vs_input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- vs_input_semantic_index[slot] = num_generic++;
- break;
- default:
- assert(0);
- }
-
- input_flags[slot] = stvp->Base.Base.InputFlags[attr];
+ stvp->input_to_index[attr] = stvp->num_inputs;
+ stvp->index_to_input[stvp->num_inputs] = attr;
+ stvp->num_inputs++;
}
}
-#if 0
- if (outputMapping && outputSemanticName) {
- printf("VERT_RESULT written out_slot semantic_name semantic_index\n");
- for (attr = 0; attr < VERT_RESULT_MAX; attr++) {
- printf(" %-2d %c %3d %2d %2d\n",
- attr,
- ((stvp->Base.Base.OutputsWritten & (1 << attr)) ? 'Y' : ' '),
- outputMapping[attr],
- outputSemanticName[attr],
- outputSemanticIndex[attr]);
- }
- }
-#endif
-
- /* initialize output semantics to defaults */
- for (i = 0; i < PIPE_MAX_SHADER_OUTPUTS; i++) {
- assert(i < Elements(vs_output_semantic_name));
- vs_output_semantic_name[i] = TGSI_SEMANTIC_GENERIC;
- vs_output_semantic_index[i] = 0;
- output_flags[i] = 0x0;
- }
-
- num_generic = 0;
- /*
- * Determine number of outputs, the (default) output register
- * mapping and the semantic information for each output.
+ /* Compute mapping of vertex program outputs to slots.
*/
for (attr = 0; attr < VERT_RESULT_MAX; attr++) {
- if (stvp->Base.Base.OutputsWritten & (1 << attr)) {
- GLuint slot;
-
- /* XXX
- * Pass in the fragment program's input's semantic info.
- * Use the generic semantic indexes from there, instead of
- * guessing below.
- */
-
- if (outputMapping) {
- slot = outputMapping[attr];
- assert(slot != ~0);
- }
- else {
- slot = vs_num_outputs;
- vs_num_outputs++;
- defaultOutputMapping[attr] = slot;
- }
+ if ((stvp->Base.Base.OutputsWritten & (1 << attr)) == 0) {
+ stvp->result_to_output[attr] = ~0;
+ }
+ else {
+ unsigned slot = stvp->num_outputs++;
+
+ stvp->result_to_output[attr] = slot;
switch (attr) {
case VERT_RESULT_HPOS:
- assert(slot == 0);
- vs_output_semantic_name[slot] = TGSI_SEMANTIC_POSITION;
- vs_output_semantic_index[slot] = 0;
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_POSITION;
+ stvp->output_semantic_index[slot] = 0;
break;
case VERT_RESULT_COL0:
- vs_output_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
- vs_output_semantic_index[slot] = 0;
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
+ stvp->output_semantic_index[slot] = 0;
break;
case VERT_RESULT_COL1:
- vs_output_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
- vs_output_semantic_index[slot] = 1;
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
+ stvp->output_semantic_index[slot] = 1;
break;
case VERT_RESULT_BFC0:
- vs_output_semantic_name[slot] = TGSI_SEMANTIC_BCOLOR;
- vs_output_semantic_index[slot] = 0;
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_BCOLOR;
+ stvp->output_semantic_index[slot] = 0;
break;
case VERT_RESULT_BFC1:
- vs_output_semantic_name[slot] = TGSI_SEMANTIC_BCOLOR;
- vs_output_semantic_index[slot] = 1;
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_BCOLOR;
+ stvp->output_semantic_index[slot] = 1;
break;
case VERT_RESULT_FOGC:
- vs_output_semantic_name[slot] = TGSI_SEMANTIC_FOG;
- vs_output_semantic_index[slot] = 0;
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_FOG;
+ stvp->output_semantic_index[slot] = 0;
break;
case VERT_RESULT_PSIZ:
- vs_output_semantic_name[slot] = TGSI_SEMANTIC_PSIZE;
- vs_output_semantic_index[slot] = 0;
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_PSIZE;
+ stvp->output_semantic_index[slot] = 0;
break;
case VERT_RESULT_EDGE:
assert(0);
break;
+
case VERT_RESULT_TEX0:
case VERT_RESULT_TEX1:
case VERT_RESULT_TEX2:
@@ -257,92 +163,50 @@ st_translate_vertex_program(struct st_context *st,
case VERT_RESULT_TEX5:
case VERT_RESULT_TEX6:
case VERT_RESULT_TEX7:
- /* fall-through */
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
+ stvp->output_semantic_index[slot] = attr - VERT_RESULT_TEX0;
+ break;
+
case VERT_RESULT_VAR0:
- /* fall-through */
default:
- assert(slot < Elements(vs_output_semantic_name));
- if (outputSemanticName) {
- /* use provided semantic into */
- assert(outputSemanticName[attr] != TGSI_SEMANTIC_COUNT);
- vs_output_semantic_name[slot] = outputSemanticName[attr];
- vs_output_semantic_index[slot] = outputSemanticIndex[attr];
- }
- else {
- /* use default semantic info */
- vs_output_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- vs_output_semantic_index[slot] = num_generic++;
- }
+ assert(attr < VERT_RESULT_MAX);
+ stvp->output_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
+ stvp->output_semantic_index[slot] = (FRAG_ATTRIB_VAR0 -
+ FRAG_ATTRIB_TEX0 +
+ attr -
+ VERT_RESULT_VAR0);
+ break;
}
-
- assert(slot < Elements(output_flags));
- output_flags[slot] = stvp->Base.Base.OutputFlags[attr];
}
}
+}
- if (outputMapping) {
- /* find max output slot referenced to compute vs_num_outputs */
- GLuint maxSlot = 0;
- for (attr = 0; attr < VERT_RESULT_MAX; attr++) {
- if (outputMapping[attr] != ~0 && outputMapping[attr] > maxSlot)
- maxSlot = outputMapping[attr];
- }
- vs_num_outputs = maxSlot + 1;
- }
- else {
- outputMapping = defaultOutputMapping;
- }
-
-#if 0 /* debug */
- {
- GLuint i;
- printf("outputMapping? %d\n", outputMapping ? 1 : 0);
- if (outputMapping) {
- printf("attr -> slot\n");
- for (i = 0; i < 16; i++) {
- printf(" %2d %3d\n", i, outputMapping[i]);
- }
- }
- printf("slot sem_name sem_index\n");
- for (i = 0; i < vs_num_outputs; i++) {
- printf(" %2d %d %d\n",
- i,
- vs_output_semantic_name[i],
- vs_output_semantic_index[i]);
- }
- }
-#endif
- /* free old shader state, if any */
- if (stvp->state.tokens) {
- st_free_tokens(stvp->state.tokens);
- stvp->state.tokens = NULL;
- }
- if (stvp->driver_shader) {
- cso_delete_vertex_shader(st->cso_context, stvp->driver_shader);
- stvp->driver_shader = NULL;
- }
+struct st_vp_varient *
+st_translate_vertex_program(struct st_context *st,
+ struct st_vertex_program *stvp,
+ const struct st_vp_varient_key *key)
+{
+ struct st_vp_varient *vpv = CALLOC_STRUCT(st_vp_varient);
+ struct pipe_context *pipe = st->pipe;
- stvp->state.tokens =
+ vpv->state.tokens =
st_translate_mesa_program(st->ctx,
TGSI_PROCESSOR_VERTEX,
&stvp->Base.Base,
/* inputs */
- vs_num_inputs,
+ stvp->num_inputs,
stvp->input_to_index,
- vs_input_semantic_name,
- vs_input_semantic_index,
+ NULL, /* input semantic name */
+ NULL, /* input semantic index */
NULL,
- input_flags,
/* outputs */
- vs_num_outputs,
- outputMapping,
- vs_output_semantic_name,
- vs_output_semantic_index,
- output_flags );
+ stvp->num_outputs,
+ stvp->result_to_output,
+ stvp->output_semantic_name,
+ stvp->output_semantic_index );
- stvp->num_inputs = vs_num_inputs;
- stvp->driver_shader = pipe->create_vs_state(pipe, &stvp->state);
+ vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->state);
if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) {
_mesa_print_program(&stvp->Base.Base);
@@ -350,9 +214,11 @@ st_translate_vertex_program(struct st_context *st,
}
if (ST_DEBUG & DEBUG_TGSI) {
- tgsi_dump( stvp->state.tokens, 0 );
+ tgsi_dump( vpv->state.tokens, 0 );
debug_printf("\n");
}
+
+ return vpv;
}
@@ -375,7 +241,6 @@ st_translate_fragment_program(struct st_context *st,
GLuint attr;
const GLbitfield inputsRead = stfp->Base.Base.InputsRead;
GLuint vslot = 0;
- GLuint num_generic = 0;
uint fs_num_inputs = 0;
@@ -383,13 +248,6 @@ st_translate_fragment_program(struct st_context *st,
ubyte fs_output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
uint fs_num_outputs = 0;
- GLbitfield input_flags[MAX_PROGRAM_INPUTS];
- GLbitfield output_flags[MAX_PROGRAM_OUTPUTS];
-
-// memset(&fs, 0, sizeof(fs));
- memset(input_flags, 0, sizeof(input_flags));
- memset(output_flags, 0, sizeof(output_flags));
-
/* which vertex output goes to the first fragment input: */
if (inputsRead & FRAG_BIT_WPOS)
vslot = 0;
@@ -432,14 +290,25 @@ st_translate_fragment_program(struct st_context *st,
break;
case FRAG_ATTRIB_FACE:
stfp->input_semantic_name[slot] = TGSI_SEMANTIC_FACE;
- stfp->input_semantic_index[slot] = num_generic++;
+ stfp->input_semantic_index[slot] = 0;
interpMode[slot] = TGSI_INTERPOLATE_CONSTANT;
break;
- case FRAG_ATTRIB_PNTC:
- stfp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- stfp->input_semantic_index[slot] = num_generic++;
- interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
- break;
+
+ /* In most cases, there is nothing special about these
+ * inputs, so adopt a convention to use the generic
+ * semantic name and the mesa FRAG_ATTRIB_ number as the
+ * index.
+ *
+ * All that is required is that the vertex shader labels
+ * its own outputs similarly, and that the vertex shader
+ * generates at least every output required by the
+ * fragment shader plus fixed-function hardware (such as
+ * BFC).
+ *
+ * There is no requirement that semantic indexes start at
+ * zero or be restricted to a particular range -- nobody
+ * should be building tables based on semantic index.
+ */
case FRAG_ATTRIB_TEX0:
case FRAG_ATTRIB_TEX1:
case FRAG_ATTRIB_TEX2:
@@ -448,19 +317,18 @@ st_translate_fragment_program(struct st_context *st,
case FRAG_ATTRIB_TEX5:
case FRAG_ATTRIB_TEX6:
case FRAG_ATTRIB_TEX7:
- stfp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- stfp->input_semantic_index[slot] = num_generic++;
- interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
- break;
+ case FRAG_ATTRIB_PNTC:
case FRAG_ATTRIB_VAR0:
- /* fall-through */
default:
+ /* Actually, let's try and zero-base this just for
+ * readability of the generated TGSI.
+ */
+ assert(attr >= FRAG_ATTRIB_TEX0);
+ stfp->input_semantic_index[slot] = (attr - FRAG_ATTRIB_TEX0);
stfp->input_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- stfp->input_semantic_index[slot] = num_generic++;
interpMode[slot] = TGSI_INTERPOLATE_PERSPECTIVE;
+ break;
}
-
- input_flags[slot] = stfp->Base.Base.InputFlags[attr];
}
}
@@ -469,7 +337,7 @@ st_translate_fragment_program(struct st_context *st,
*/
{
uint numColors = 0;
- GLbitfield outputsWritten = stfp->Base.Base.OutputsWritten;
+ GLbitfield64 outputsWritten = stfp->Base.Base.OutputsWritten;
/* if z is written, emit that first */
if (outputsWritten & (1 << FRAG_RESULT_DEPTH)) {
@@ -498,8 +366,6 @@ st_translate_fragment_program(struct st_context *st,
break;
}
- output_flags[fs_num_outputs] = stfp->Base.Base.OutputFlags[attr];
-
fs_num_outputs++;
}
}
@@ -518,13 +384,11 @@ st_translate_fragment_program(struct st_context *st,
stfp->input_semantic_name,
stfp->input_semantic_index,
interpMode,
- input_flags,
/* outputs */
fs_num_outputs,
outputMapping,
fs_output_semantic_name,
- fs_output_semantic_index,
- output_flags );
+ fs_output_semantic_index );
stfp->driver_shader = pipe->create_fs_state(pipe, &stfp->state);
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index e2e5eddef22..88aadbd7510 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -64,41 +64,70 @@ struct st_fragment_program
struct pipe_shader_state state;
void *driver_shader;
- GLuint param_state;
-
- /** List of vertex programs which have been translated such that their
- * outputs match this fragment program's inputs.
- */
- struct translated_vertex_program *vertex_programs;
-
/** Program prefixed with glBitmap prologue */
struct st_fragment_program *bitmap_program;
uint bitmap_sampler;
};
+
+struct st_vp_varient_key
+{
+ char dummy; /* currently unused */
+};
+
+
+/**
+ * This represents a vertex program, especially translated to match
+ * the inputs of a particular fragment shader.
+ */
+struct st_vp_varient
+{
+ /* Parameters which generated this translated version of a vertex
+ * shader:
+ */
+ struct st_vp_varient_key key;
+
+ /** TGSI tokens -- why?
+ */
+ struct pipe_shader_state state;
+
+ /** Driver's compiled shader */
+ void *driver_shader;
+
+ /** For using our private draw module (glRasterPos) */
+ struct draw_vertex_shader *draw_shader;
+
+ /** Next in linked list */
+ struct st_vp_varient *next;
+};
+
+
+
+
/**
* Derived from Mesa gl_fragment_program:
*/
struct st_vertex_program
{
struct gl_vertex_program Base; /**< The Mesa vertex program */
- GLuint serialNo;
+ GLuint serialNo, lastSerialNo;
/** maps a Mesa VERT_ATTRIB_x to a packed TGSI input index */
GLuint input_to_index[VERT_ATTRIB_MAX];
/** maps a TGSI input index back to a Mesa VERT_ATTRIB_x */
GLuint index_to_input[PIPE_MAX_SHADER_INPUTS];
-
GLuint num_inputs;
- struct pipe_shader_state state;
- void *driver_shader;
+ /** Maps VERT_RESULT_x to slot */
+ GLuint result_to_output[VERT_RESULT_MAX];
+ ubyte output_semantic_name[VERT_RESULT_MAX];
+ ubyte output_semantic_index[VERT_RESULT_MAX];
+ GLuint num_outputs;
- /** For using our private draw module (glRasterPos) */
- struct draw_vertex_shader *draw_shader;
-
- GLuint param_state;
+ /** List of translated varients of this vertex program.
+ */
+ struct st_vp_varient *varients;
};
@@ -143,13 +172,21 @@ st_translate_fragment_program(struct st_context *st,
const GLuint inputMapping[]);
+/* Called after program string change, discard all previous
+ * compilation results.
+ */
extern void
+st_prepare_vertex_program(struct st_context *st,
+ struct st_vertex_program *stvp);
+
+extern struct st_vp_varient *
st_translate_vertex_program(struct st_context *st,
- struct st_vertex_program *vp,
- const GLuint vert_output_to_slot[],
- const ubyte *fs_input_semantic_name,
- const ubyte *fs_input_semantic_index);
+ struct st_vertex_program *stvp,
+ const struct st_vp_varient_key *key);
+void
+st_vp_release_varients( struct st_context *st,
+ struct st_vertex_program *stvp );
extern void
st_print_shaders(GLcontext *ctx);
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index 3945822f663..3035d78b611 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -44,6 +44,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_inlines.h"
#include "util/u_rect.h"
+#include "util/u_math.h"
#define DBG if(0) printf
@@ -100,10 +101,9 @@ st_texture_create(struct st_context *st,
pt.target = target;
pt.format = format;
pt.last_level = last_level;
- pt.width[0] = width0;
- pt.height[0] = height0;
- pt.depth[0] = depth0;
- pf_get_block(format, &pt.block);
+ pt.width0 = width0;
+ pt.height0 = height0;
+ pt.depth0 = depth0;
pt.tex_usage = usage;
newtex = screen->texture_create(screen, &pt);
@@ -135,9 +135,9 @@ st_texture_match_image(const struct pipe_texture *pt,
/* Test if this image's size matches what's expected in the
* established texture.
*/
- if (image->Width != pt->width[level] ||
- image->Height != pt->height[level] ||
- image->Depth != pt->depth[level])
+ if (image->Width != u_minify(pt->width0, level) ||
+ image->Height != u_minify(pt->height0, level) ||
+ image->Depth != u_minify(pt->depth0, level))
return GL_FALSE;
return GL_TRUE;
@@ -241,8 +241,9 @@ st_surface_data(struct pipe_context *pipe,
struct pipe_screen *screen = pipe->screen;
void *map = screen->transfer_map(screen, dst);
+ assert(dst->texture);
util_copy_rect(map,
- &dst->block,
+ dst->texture->format,
dst->stride,
dstx, dsty,
width, height,
@@ -265,7 +266,7 @@ st_texture_image_data(struct st_context *st,
{
struct pipe_context *pipe = st->pipe;
struct pipe_screen *screen = pipe->screen;
- GLuint depth = dst->depth[level];
+ GLuint depth = u_minify(dst->depth0, level);
GLuint i;
const GLubyte *srcUB = src;
struct pipe_transfer *dst_transfer;
@@ -275,15 +276,16 @@ st_texture_image_data(struct st_context *st,
for (i = 0; i < depth; i++) {
dst_transfer = st_no_flush_get_tex_transfer(st, dst, face, level, i,
PIPE_TRANSFER_WRITE, 0, 0,
- dst->width[level],
- dst->height[level]);
+ u_minify(dst->width0, level),
+ u_minify(dst->height0, level));
st_surface_data(pipe, dst_transfer,
0, 0, /* dstx, dsty */
srcUB,
src_row_stride,
0, 0, /* source x, y */
- dst->width[level], dst->height[level]); /* width, height */
+ u_minify(dst->width0, level),
+ u_minify(dst->height0, level)); /* width, height */
screen->tex_transfer_destroy(dst_transfer);
@@ -301,9 +303,9 @@ st_texture_image_copy(struct pipe_context *pipe,
GLuint face)
{
struct pipe_screen *screen = pipe->screen;
- GLuint width = dst->width[dstLevel];
- GLuint height = dst->height[dstLevel];
- GLuint depth = dst->depth[dstLevel];
+ GLuint width = u_minify(dst->width0, dstLevel);
+ GLuint height = u_minify(dst->height0, dstLevel);
+ GLuint depth = u_minify(dst->depth0, dstLevel);
struct pipe_surface *src_surface;
struct pipe_surface *dst_surface;
GLuint i;
@@ -313,13 +315,13 @@ st_texture_image_copy(struct pipe_context *pipe,
/* find src texture level of needed size */
for (srcLevel = 0; srcLevel <= src->last_level; srcLevel++) {
- if (src->width[srcLevel] == width &&
- src->height[srcLevel] == height) {
+ if (u_minify(src->width0, srcLevel) == width &&
+ u_minify(src->height0, srcLevel) == height) {
break;
}
}
- assert(src->width[srcLevel] == width);
- assert(src->height[srcLevel] == height);
+ assert(u_minify(src->width0, srcLevel) == width);
+ assert(u_minify(src->height0, srcLevel) == height);
#if 0
{
@@ -588,5 +590,5 @@ st_teximage_flush_before_map(struct st_context *st,
if (referenced && ((referenced & PIPE_REFERENCED_FOR_WRITE) ||
(usage & PIPE_TRANSFER_WRITE)))
- st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL);
+ st->pipe->flush(st->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
}
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c
index 77a77f0bcbb..a22d34415d5 100644
--- a/src/mesa/swrast/s_fragprog.c
+++ b/src/mesa/swrast/s_fragprog.c
@@ -190,7 +190,7 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end)
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const struct gl_fragment_program *program = ctx->FragmentProgram._Current;
- const GLbitfield outputsWritten = program->Base.OutputsWritten;
+ const GLbitfield64 outputsWritten = program->Base.OutputsWritten;
struct gl_program_machine *machine = &swrast->FragProgMachine;
GLuint i;
@@ -201,7 +201,7 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end)
if (_mesa_execute_program(ctx, &program->Base, machine)) {
/* Store result color */
- if (outputsWritten & (1 << FRAG_RESULT_COLOR)) {
+ if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_COLOR)) {
COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0][i],
machine->Outputs[FRAG_RESULT_COLOR]);
}
@@ -212,7 +212,7 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end)
*/
GLuint buf;
for (buf = 0; buf < ctx->DrawBuffer->_NumColorDrawBuffers; buf++) {
- if (outputsWritten & (1 << (FRAG_RESULT_DATA0 + buf))) {
+ if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_DATA0 + buf)) {
COPY_4V(span->array->attribs[FRAG_ATTRIB_COL0 + buf][i],
machine->Outputs[FRAG_RESULT_DATA0 + buf]);
}
@@ -220,7 +220,7 @@ run_program(GLcontext *ctx, SWspan *span, GLuint start, GLuint end)
}
/* Store result depth/z */
- if (outputsWritten & (1 << FRAG_RESULT_DEPTH)) {
+ if (outputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
const GLfloat depth = machine->Outputs[FRAG_RESULT_DEPTH][2];
if (depth <= 0.0)
span->array->z[i] = 0;
@@ -256,12 +256,12 @@ _swrast_exec_fragment_program( GLcontext *ctx, SWspan *span )
run_program(ctx, span, 0, span->end);
- if (program->Base.OutputsWritten & (1 << FRAG_RESULT_COLOR)) {
+ if (program->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_COLOR)) {
span->interpMask &= ~SPAN_RGBA;
span->arrayMask |= SPAN_RGBA;
}
- if (program->Base.OutputsWritten & (1 << FRAG_RESULT_DEPTH)) {
+ if (program->Base.OutputsWritten & BITFIELD64_BIT(FRAG_RESULT_DEPTH)) {
span->interpMask &= ~SPAN_Z;
span->arrayMask |= SPAN_Z;
}
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index a1aeb2e01fb..44a11cd6dd2 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -29,6 +29,7 @@
#include "main/convolve.h"
#include "main/context.h"
#include "main/feedback.h"
+#include "main/formats.h"
#include "main/image.h"
#include "main/macros.h"
#include "main/imports.h"
@@ -107,7 +108,7 @@ read_depth_pixels( GLcontext *ctx,
&& !biasOrScale && !packing->SwapBytes) {
/* Special case: directly read 16-bit unsigned depth values. */
GLint j;
- ASSERT(rb->InternalFormat == GL_DEPTH_COMPONENT16);
+ ASSERT(rb->Format == MESA_FORMAT_Z16);
ASSERT(rb->DataType == GL_UNSIGNED_SHORT);
for (j = 0; j < height; j++, y++) {
void *dest =_mesa_image_address2d(packing, pixels, width, height,
@@ -119,8 +120,12 @@ read_depth_pixels( GLcontext *ctx,
&& !biasOrScale && !packing->SwapBytes) {
/* Special case: directly read 24-bit unsigned depth values. */
GLint j;
- ASSERT(rb->InternalFormat == GL_DEPTH_COMPONENT24);
- ASSERT(rb->DataType == GL_UNSIGNED_INT);
+ ASSERT(rb->Format == MESA_FORMAT_X8_Z24 ||
+ rb->Format == MESA_FORMAT_S8_Z24 ||
+ rb->Format == MESA_FORMAT_Z24_X8 ||
+ rb->Format == MESA_FORMAT_Z24_S8);
+ ASSERT(rb->DataType == GL_UNSIGNED_INT ||
+ rb->DataType == GL_UNSIGNED_INT_24_8);
for (j = 0; j < height; j++, y++) {
GLuint *dest = (GLuint *)
_mesa_image_address2d(packing, pixels, width, height,
@@ -128,9 +133,18 @@ read_depth_pixels( GLcontext *ctx,
GLint k;
rb->GetRow(ctx, rb, width, x, y, dest);
/* convert range from 24-bit to 32-bit */
- for (k = 0; k < width; k++) {
- /* Note: put MSByte of 24-bit value into LSByte */
- dest[k] = (dest[k] << 8) | ((dest[k] >> 16) & 0xff);
+ if (rb->Format == MESA_FORMAT_X8_Z24 ||
+ rb->Format == MESA_FORMAT_S8_Z24) {
+ for (k = 0; k < width; k++) {
+ /* Note: put MSByte of 24-bit value into LSByte */
+ dest[k] = (dest[k] << 8) | ((dest[k] >> 16) & 0xff);
+ }
+ }
+ else {
+ for (k = 0; k < width; k++) {
+ /* Note: fill in LSByte by replication */
+ dest[k] = dest[k] | ((dest[k] >> 8) & 0xff);
+ }
}
}
}
@@ -138,7 +152,7 @@ read_depth_pixels( GLcontext *ctx,
&& !biasOrScale && !packing->SwapBytes) {
/* Special case: directly read 32-bit unsigned depth values. */
GLint j;
- ASSERT(rb->InternalFormat == GL_DEPTH_COMPONENT32);
+ ASSERT(rb->Format == MESA_FORMAT_Z32);
ASSERT(rb->DataType == GL_UNSIGNED_INT);
for (j = 0; j < height; j++, y++) {
void *dest = _mesa_image_address2d(packing, pixels, width, height,
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index 724b5e94fa5..17f38639563 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -67,8 +67,8 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (facing == 1) {
if (IND & SS_TWOSIDE_BIT) {
if (IND & SS_RGBA_BIT) {
- if (VB->ColorPtr[1]) {
- GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->data;
+ if (VB->BackfaceColorPtr) {
+ GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data;
if (swsetup->intColors) {
COPY_CHAN4(saved_color[0], v[0]->color);
@@ -81,7 +81,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
COPY_4V(saved_col0[2], v[2]->attrib[FRAG_ATTRIB_COL0]);
}
- if (VB->ColorPtr[1]->stride) {
+ if (VB->BackfaceColorPtr->stride) {
if (swsetup->intColors) {
SS_COLOR(v[0]->color, vbcolor[e0]);
SS_COLOR(v[1]->color, vbcolor[e1]);
@@ -108,14 +108,14 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
}
}
- if (VB->SecondaryColorPtr[1]) {
- GLfloat (*vbspec)[4] = VB->SecondaryColorPtr[1]->data;
+ if (VB->BackfaceSecondaryColorPtr) {
+ GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
COPY_4V(saved_spec[0], v[0]->attrib[FRAG_ATTRIB_COL1]);
COPY_4V(saved_spec[1], v[1]->attrib[FRAG_ATTRIB_COL1]);
COPY_4V(saved_spec[2], v[2]->attrib[FRAG_ATTRIB_COL1]);
- if (VB->SecondaryColorPtr[1]->stride) {
+ if (VB->BackfaceSecondaryColorPtr->stride) {
SS_SPEC(v[0]->attrib[FRAG_ATTRIB_COL1], vbspec[e0]);
SS_SPEC(v[1]->attrib[FRAG_ATTRIB_COL1], vbspec[e1]);
SS_SPEC(v[2]->attrib[FRAG_ATTRIB_COL1], vbspec[e2]);
@@ -127,7 +127,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
}
}
} else {
- GLfloat *vbindex = (GLfloat *)VB->IndexPtr[1]->data;
+ GLfloat *vbindex = (GLfloat *)VB->BackfaceIndexPtr->data;
saved_index[0] = v[0]->attrib[FRAG_ATTRIB_CI][0];
saved_index[1] = v[1]->attrib[FRAG_ATTRIB_CI][0];
saved_index[2] = v[2]->attrib[FRAG_ATTRIB_CI][0];
@@ -200,7 +200,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (IND & SS_TWOSIDE_BIT) {
if (facing == 1) {
if (IND & SS_RGBA_BIT) {
- if (VB->ColorPtr[1]) {
+ if (VB->BackfaceColorPtr) {
if (swsetup->intColors) {
COPY_CHAN4(v[0]->color, saved_color[0]);
COPY_CHAN4(v[1]->color, saved_color[1]);
@@ -213,7 +213,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
}
}
- if (VB->SecondaryColorPtr[1]) {
+ if (VB->BackfaceSecondaryColorPtr) {
COPY_4V(v[0]->attrib[FRAG_ATTRIB_COL1], saved_spec[0]);
COPY_4V(v[1]->attrib[FRAG_ATTRIB_COL1], saved_spec[1]);
COPY_4V(v[2]->attrib[FRAG_ATTRIB_COL1], saved_spec[2]);
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index f2771cde095..db21b4589de 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -171,7 +171,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
if (vp) {
GLuint i;
for (i = 0; i < MAX_VARYING; i++) {
- if (vp->Base.OutputsWritten & (1 << (VERT_RESULT_VAR0 + i))) {
+ if (vp->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_VAR0 + i)) {
RENDERINPUTS_SET(tnl->render_inputs_bitset,
_TNL_ATTRIB_GENERIC(i));
}
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index 6137c2d2fe5..ebaae6335b9 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -198,26 +198,23 @@ struct vertex_buffer
*/
GLuint Count; /**< Number of vertices currently in buffer */
- /* Pointers to current data.
- * XXX some of these fields alias AttribPtr below and should be removed
- * such as NormalPtr, TexCoordPtr, FogCoordPtr, etc.
+ /* Pointers to current data. Most of the data is in AttribPtr -- all of
+ * it that is one of VERT_ATTRIB_X. For things only produced by TNL,
+ * such as backface color or eye-space coordinates, they are stored
+ * here.
*/
GLuint *Elts;
- GLvector4f *ObjPtr; /* _TNL_BIT_POS */
GLvector4f *EyePtr; /* _TNL_BIT_POS */
GLvector4f *ClipPtr; /* _TNL_BIT_POS */
GLvector4f *NdcPtr; /* _TNL_BIT_POS */
GLubyte ClipOrMask; /* _TNL_BIT_POS */
GLubyte ClipAndMask; /* _TNL_BIT_POS */
GLubyte *ClipMask; /* _TNL_BIT_POS */
- GLvector4f *NormalPtr; /* _TNL_BIT_NORMAL */
GLfloat *NormalLengthPtr; /* _TNL_BIT_NORMAL */
GLboolean *EdgeFlag; /* _TNL_BIT_EDGEFLAG */
- GLvector4f *TexCoordPtr[MAX_TEXTURE_COORD_UNITS]; /* VERT_TEX_0..n */
- GLvector4f *IndexPtr[2]; /* _TNL_BIT_INDEX */
- GLvector4f *ColorPtr[2]; /* _TNL_BIT_COLOR0 */
- GLvector4f *SecondaryColorPtr[2]; /* _TNL_BIT_COLOR1 */
- GLvector4f *FogCoordPtr; /* _TNL_BIT_FOG */
+ GLvector4f *BackfaceIndexPtr;
+ GLvector4f *BackfaceColorPtr;
+ GLvector4f *BackfaceSecondaryColorPtr;
const struct _mesa_prim *Primitive;
GLuint PrimitiveCount;
@@ -402,11 +399,6 @@ struct tnl_device_driver
/* Alert tnl-aware drivers of changes to material.
*/
- void (*NotifyInputChanges)(GLcontext *ctx, GLuint bitmask);
- /* Alert tnl-aware drivers of changes to size and stride of input
- * arrays.
- */
-
/***
*** Rendering -- These functions called only from t_vb_render.c
***/
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 04fa1063003..1c7c733883c 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -251,22 +251,10 @@ static void bind_inputs( GLcontext *ctx,
*/
VB->Count = count;
-
- /* Legacy pointers -- remove one day.
- */
- VB->ObjPtr = VB->AttribPtr[_TNL_ATTRIB_POS];
- VB->NormalPtr = VB->AttribPtr[_TNL_ATTRIB_NORMAL];
- VB->ColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR0];
- VB->ColorPtr[1] = NULL;
- VB->IndexPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX];
- VB->IndexPtr[1] = NULL;
- VB->SecondaryColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR1];
- VB->SecondaryColorPtr[1] = NULL;
- VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG];
-
- for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- VB->TexCoordPtr[i] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i];
- }
+ /* These should perhaps be part of _TNL_ATTRIB_* */
+ VB->BackfaceColorPtr = NULL;
+ VB->BackfaceIndexPtr = NULL;
+ VB->BackfaceSecondaryColorPtr = NULL;
/* Clipping and drawing code still requires this to be a packed
* array of ubytes which can be written into. TODO: Fix and
diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c
index 357ef1e24b5..01b30babb48 100644
--- a/src/mesa/tnl/t_pipeline.c
+++ b/src/mesa/tnl/t_pipeline.c
@@ -86,10 +86,6 @@ static GLuint check_input_changes( GLcontext *ctx )
}
}
- if (tnl->pipeline.input_changes &&
- tnl->Driver.NotifyInputChanges)
- tnl->Driver.NotifyInputChanges( ctx, tnl->pipeline.input_changes );
-
return tnl->pipeline.input_changes;
}
diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c
index f3a7bd49f40..4a0e6ad4f99 100644
--- a/src/mesa/tnl/t_vb_fog.c
+++ b/src/mesa/tnl/t_vb_fog.c
@@ -156,7 +156,7 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
GLuint i;
GLfloat *coord;
/* Fog is computed from vertex or fragment Z values */
- /* source = VB->ObjPtr or VB->EyePtr coords */
+ /* source = VB->AttribPtr[_TNL_ATTRIB_POS] or VB->EyePtr coords */
/* dest = VB->AttribPtr[_TNL_ATTRIB_FOG] = fog stage private storage */
VB->AttribPtr[_TNL_ATTRIB_FOG] = &store->fogcoord;
@@ -176,11 +176,12 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
/* Full eye coords weren't required, just calculate the
* eye Z values.
*/
- _mesa_dotprod_tab[VB->ObjPtr->size]( (GLfloat *) input->data,
- 4 * sizeof(GLfloat),
- VB->ObjPtr, plane );
+ _mesa_dotprod_tab[VB->AttribPtr[_TNL_ATTRIB_POS]->size]
+ ( (GLfloat *) input->data,
+ 4 * sizeof(GLfloat),
+ VB->AttribPtr[_TNL_ATTRIB_POS], plane );
- input->count = VB->ObjPtr->count;
+ input->count = VB->AttribPtr[_TNL_ATTRIB_POS]->count;
/* make sure coords are really positive
NOTE should avoid going through array twice */
@@ -213,7 +214,7 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
/* input->count may be one if glFogCoord was only called once
* before glBegin. But we need to compute fog for all vertices.
*/
- input->count = VB->ObjPtr->count;
+ input->count = VB->AttribPtr[_TNL_ATTRIB_POS]->count;
VB->AttribPtr[_TNL_ATTRIB_FOG] = &store->fogcoord; /* dest data */
}
@@ -227,7 +228,6 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
VB->AttribPtr[_TNL_ATTRIB_FOG] = input;
}
- VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG];
return GL_TRUE;
}
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index f47f99397c9..8a0fe63fd8b 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -127,7 +127,7 @@ prepare_materials(GLcontext *ctx,
const GLuint bitmask = ctx->Light.ColorMaterialBitmask;
for (i = 0 ; i < MAT_ATTRIB_MAX ; i++)
if (bitmask & (1<<i))
- VB->AttribPtr[_TNL_ATTRIB_MAT_FRONT_AMBIENT + i] = VB->ColorPtr[0];
+ VB->AttribPtr[_TNL_ATTRIB_MAT_FRONT_AMBIENT + i] = VB->AttribPtr[_TNL_ATTRIB_COLOR0];
}
/* Now, for each material attribute that's tracking vertex color, save
@@ -200,7 +200,7 @@ static GLboolean run_lighting( GLcontext *ctx,
struct light_stage_data *store = LIGHT_STAGE_DATA(stage);
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
- GLvector4f *input = ctx->_NeedEyeCoords ? VB->EyePtr : VB->ObjPtr;
+ GLvector4f *input = ctx->_NeedEyeCoords ? VB->EyePtr : VB->AttribPtr[_TNL_ATTRIB_POS];
GLuint idx;
if (!ctx->Light.Enabled || ctx->VertexProgram._Current)
@@ -208,13 +208,13 @@ static GLboolean run_lighting( GLcontext *ctx,
/* Make sure we can talk about position x,y and z:
*/
- if (input->size <= 2 && input == VB->ObjPtr) {
+ if (input->size <= 2 && input == VB->AttribPtr[_TNL_ATTRIB_POS]) {
_math_trans_4f( store->Input.data,
- VB->ObjPtr->data,
- VB->ObjPtr->stride,
+ VB->AttribPtr[_TNL_ATTRIB_POS]->data,
+ VB->AttribPtr[_TNL_ATTRIB_POS]->stride,
GL_FLOAT,
- VB->ObjPtr->size,
+ VB->AttribPtr[_TNL_ATTRIB_POS]->size,
0,
VB->Count );
@@ -246,10 +246,6 @@ static GLboolean run_lighting( GLcontext *ctx,
*/
store->light_func_tab[idx]( ctx, VB, stage, input );
- VB->AttribPtr[_TNL_ATTRIB_COLOR0] = VB->ColorPtr[0];
- VB->AttribPtr[_TNL_ATTRIB_COLOR1] = VB->SecondaryColorPtr[0];
- VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX] = VB->IndexPtr[0];
-
return GL_TRUE;
}
diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h
index 124ca3c74fe..4ebef2356f5 100644
--- a/src/mesa/tnl/t_vb_lighttmp.h
+++ b/src/mesa/tnl/t_vb_lighttmp.h
@@ -72,13 +72,13 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
fprintf(stderr, "%s\n", __FUNCTION__ );
#endif
- VB->ColorPtr[0] = &store->LitColor[0];
- VB->SecondaryColorPtr[0] = &store->LitSecondary[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR1] = &store->LitSecondary[0];
sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
#if IDX & LIGHT_TWOSIDE
- VB->ColorPtr[1] = &store->LitColor[1];
- VB->SecondaryColorPtr[1] = &store->LitSecondary[1];
+ VB->BackfaceColorPtr = &store->LitColor[1];
+ VB->BackfaceSecondaryColorPtr = &store->LitSecondary[1];
sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
#endif
@@ -259,11 +259,11 @@ static void TAG(light_rgba)( GLcontext *ctx,
fprintf(stderr, "%s\n", __FUNCTION__ );
#endif
- VB->ColorPtr[0] = &store->LitColor[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
#if IDX & LIGHT_TWOSIDE
- VB->ColorPtr[1] = &store->LitColor[1];
+ VB->BackfaceColorPtr = &store->LitColor[1];
sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
#endif
@@ -449,9 +449,9 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
(void) input; /* doesn't refer to Eye or Obj */
- VB->ColorPtr[0] = &store->LitColor[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
#if IDX & LIGHT_TWOSIDE
- VB->ColorPtr[1] = &store->LitColor[1];
+ VB->BackfaceColorPtr = &store->LitColor[1];
#endif
if (nr > 1) {
@@ -559,9 +559,9 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3];
sumA[1] = ctx->Light.Material.Attrib[MAT_ATTRIB_BACK_DIFFUSE][3];
- VB->ColorPtr[0] = &store->LitColor[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR0] = &store->LitColor[0];
#if IDX & LIGHT_TWOSIDE
- VB->ColorPtr[1] = &store->LitColor[1];
+ VB->BackfaceColorPtr = &store->LitColor[1];
#endif
if (nr > 1) {
@@ -665,14 +665,14 @@ static void TAG(light_ci)( GLcontext *ctx,
fprintf(stderr, "%s\n", __FUNCTION__ );
#endif
- VB->IndexPtr[0] = &store->LitIndex[0];
+ VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX] = &store->LitIndex[0];
#if IDX & LIGHT_TWOSIDE
- VB->IndexPtr[1] = &store->LitIndex[1];
+ VB->BackfaceIndexPtr = &store->LitIndex[1];
#endif
- indexResult[0] = (GLfloat *)VB->IndexPtr[0]->data;
+ indexResult[0] = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_COLOR_INDEX]->data;
#if IDX & LIGHT_TWOSIDE
- indexResult[1] = (GLfloat *)VB->IndexPtr[1]->data;
+ indexResult[1] = (GLfloat *)VB->BackfaceIndexPtr->data;
#endif
/* loop over vertices */
diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c
index a4821cc1ccc..693d3dc118d 100644
--- a/src/mesa/tnl/t_vb_normals.c
+++ b/src/mesa/tnl/t_vb_normals.c
@@ -79,7 +79,6 @@ run_normal_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
}
VB->AttribPtr[_TNL_ATTRIB_NORMAL] = &store->normal;
- VB->NormalPtr = &store->normal;
VB->NormalLengthPtr = NULL; /* no longer valid */
return GL_TRUE;
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index c10a27614ff..c289cdfbaac 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -329,7 +329,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
/* make list of outputs to save some time below */
numOutputs = 0;
for (i = 0; i < VERT_RESULT_MAX; i++) {
- if (program->Base.OutputsWritten & (1 << i)) {
+ if (program->Base.OutputsWritten & BITFIELD64_BIT(i)) {
outputs[numOutputs++] = i;
}
}
@@ -407,14 +407,14 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
/* Fixup fog and point size results if needed */
if (program->IsNVProgram) {
if (ctx->Fog.Enabled &&
- (program->Base.OutputsWritten & (1 << VERT_RESULT_FOGC)) == 0) {
+ (program->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_FOGC)) == 0) {
for (i = 0; i < VB->Count; i++) {
store->results[VERT_RESULT_FOGC].data[i][0] = 1.0;
}
}
if (ctx->VertexProgram.PointSizeEnabled &&
- (program->Base.OutputsWritten & (1 << VERT_RESULT_PSIZ)) == 0) {
+ (program->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_PSIZ)) == 0) {
for (i = 0; i < VB->Count; i++) {
store->results[VERT_RESULT_PSIZ].data[i][0] = ctx->Point.Size;
}
@@ -454,25 +454,20 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
VB->ClipPtr->count = VB->Count;
}
- VB->ColorPtr[0] = &store->results[VERT_RESULT_COL0];
- VB->ColorPtr[1] = &store->results[VERT_RESULT_BFC0];
- VB->SecondaryColorPtr[0] = &store->results[VERT_RESULT_COL1];
- VB->SecondaryColorPtr[1] = &store->results[VERT_RESULT_BFC1];
- VB->FogCoordPtr = &store->results[VERT_RESULT_FOGC];
-
VB->AttribPtr[VERT_ATTRIB_COLOR0] = &store->results[VERT_RESULT_COL0];
VB->AttribPtr[VERT_ATTRIB_COLOR1] = &store->results[VERT_RESULT_COL1];
VB->AttribPtr[VERT_ATTRIB_FOG] = &store->results[VERT_RESULT_FOGC];
VB->AttribPtr[_TNL_ATTRIB_POINTSIZE] = &store->results[VERT_RESULT_PSIZ];
+ VB->BackfaceColorPtr = &store->results[VERT_RESULT_BFC0];
+ VB->BackfaceSecondaryColorPtr = &store->results[VERT_RESULT_BFC1];
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
- VB->TexCoordPtr[i] =
VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]
= &store->results[VERT_RESULT_TEX0 + i];
}
for (i = 0; i < ctx->Const.MaxVarying; i++) {
- if (program->Base.OutputsWritten & (1 << (VERT_RESULT_VAR0 + i))) {
+ if (program->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_VAR0 + i)) {
/* Note: varying results get put into the generic attributes */
VB->AttribPtr[VERT_ATTRIB_GENERIC0+i]
= &store->results[VERT_RESULT_VAR0 + i];
diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c
index 7c1819b223c..9ef13bc96d8 100644
--- a/src/mesa/tnl/t_vb_texgen.c
+++ b/src/mesa/tnl/t_vb_texgen.c
@@ -341,7 +341,7 @@ static void texgen( GLcontext *ctx,
GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit];
GLvector4f *out = &store->texcoord[unit];
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
- const GLvector4f *obj = VB->ObjPtr;
+ const GLvector4f *obj = VB->AttribPtr[_TNL_ATTRIB_POS];
const GLvector4f *eye = VB->EyePtr;
const GLvector4f *normal = VB->AttribPtr[_TNL_ATTRIB_NORMAL];
const GLfloat *m = store->tmp_m;
@@ -498,7 +498,6 @@ static GLboolean run_texgen_stage( GLcontext *ctx,
store->TexgenFunc[i]( ctx, store, i );
- VB->TexCoordPtr[i] =
VB->AttribPtr[VERT_ATTRIB_TEX0 + i] = &store->texcoord[i];
}
}
diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c
index 0abe8cc35dd..83688290e59 100644
--- a/src/mesa/tnl/t_vb_texmat.c
+++ b/src/mesa/tnl/t_vb_texmat.c
@@ -73,7 +73,6 @@ static GLboolean run_texmat_stage( GLcontext *ctx,
ctx->TextureMatrixStack[i].Top,
VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]);
- VB->TexCoordPtr[i] =
VB->AttribPtr[VERT_ATTRIB_TEX0+i] = &store->texcoord[i];
}
}
diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c
index 4734754ea40..bc7e0951ec8 100644
--- a/src/mesa/tnl/t_vb_vertex.c
+++ b/src/mesa/tnl/t_vb_vertex.c
@@ -152,16 +152,16 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
* Use combined ModelProject to avoid some depth artifacts
*/
if (ctx->ModelviewMatrixStack.Top->type == MATRIX_IDENTITY)
- VB->EyePtr = VB->ObjPtr;
+ VB->EyePtr = VB->AttribPtr[_TNL_ATTRIB_POS];
else
VB->EyePtr = TransformRaw( &store->eye,
ctx->ModelviewMatrixStack.Top,
- VB->ObjPtr);
+ VB->AttribPtr[_TNL_ATTRIB_POS]);
}
VB->ClipPtr = TransformRaw( &store->clip,
&ctx->_ModelProjectMatrix,
- VB->ObjPtr );
+ VB->AttribPtr[_TNL_ATTRIB_POS] );
/* Drivers expect this to be clean to element 4...
*/
diff --git a/src/mesa/tnl/t_vertex_generic.c b/src/mesa/tnl/t_vertex_generic.c
index 9812f8c8081..fa34d11d7bd 100644
--- a/src/mesa/tnl/t_vertex_generic.c
+++ b/src/mesa/tnl/t_vertex_generic.c
@@ -1092,33 +1092,33 @@ void _tnl_generic_interp_extras( GLcontext *ctx,
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- /* If stride is zero, ColorPtr[1] is constant across the VB, so
+ /* If stride is zero, BackfaceColorPtr is constant across the VB, so
* there is no point interpolating between two values as they will
* be identical. In all other cases, this value is generated by
* t_vb_lighttmp.h and has a stride of 4 dwords.
*/
- if (VB->ColorPtr[1] && VB->ColorPtr[1]->stride) {
- assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat));
+ if (VB->BackfaceColorPtr && VB->BackfaceColorPtr->stride) {
+ assert(VB->BackfaceColorPtr->stride == 4 * sizeof(GLfloat));
INTERP_4F( t,
- VB->ColorPtr[1]->data[dst],
- VB->ColorPtr[1]->data[out],
- VB->ColorPtr[1]->data[in] );
+ VB->BackfaceColorPtr->data[dst],
+ VB->BackfaceColorPtr->data[out],
+ VB->BackfaceColorPtr->data[in] );
}
- if (VB->SecondaryColorPtr[1]) {
- assert(VB->SecondaryColorPtr[1]->stride == 4 * sizeof(GLfloat));
+ if (VB->BackfaceSecondaryColorPtr) {
+ assert(VB->BackfaceSecondaryColorPtr->stride == 4 * sizeof(GLfloat));
INTERP_3F( t,
- VB->SecondaryColorPtr[1]->data[dst],
- VB->SecondaryColorPtr[1]->data[out],
- VB->SecondaryColorPtr[1]->data[in] );
+ VB->BackfaceSecondaryColorPtr->data[dst],
+ VB->BackfaceSecondaryColorPtr->data[out],
+ VB->BackfaceSecondaryColorPtr->data[in] );
}
- if (VB->IndexPtr[1]) {
- VB->IndexPtr[1]->data[dst][0] = LINTERP( t,
- VB->IndexPtr[1]->data[out][0],
- VB->IndexPtr[1]->data[in][0] );
+ if (VB->BackfaceIndexPtr) {
+ VB->BackfaceIndexPtr->data[dst][0] = LINTERP( t,
+ VB->BackfaceIndexPtr->data[out][0],
+ VB->BackfaceIndexPtr->data[in][0] );
}
if (VB->EdgeFlag) {
@@ -1135,18 +1135,18 @@ void _tnl_generic_copy_pv_extras( GLcontext *ctx,
/* See above comment:
*/
- if (VB->ColorPtr[1] && VB->ColorPtr[1]->stride) {
- COPY_4FV( VB->ColorPtr[1]->data[dst],
- VB->ColorPtr[1]->data[src] );
+ if (VB->BackfaceColorPtr && VB->BackfaceColorPtr->stride) {
+ COPY_4FV( VB->BackfaceColorPtr->data[dst],
+ VB->BackfaceColorPtr->data[src] );
}
- if (VB->SecondaryColorPtr[1]) {
- COPY_4FV( VB->SecondaryColorPtr[1]->data[dst],
- VB->SecondaryColorPtr[1]->data[src] );
+ if (VB->BackfaceSecondaryColorPtr) {
+ COPY_4FV( VB->BackfaceSecondaryColorPtr->data[dst],
+ VB->BackfaceSecondaryColorPtr->data[src] );
}
- if (VB->IndexPtr[1]) {
- VB->IndexPtr[1]->data[dst][0] = VB->IndexPtr[1]->data[src][0];
+ if (VB->BackfaceIndexPtr) {
+ VB->BackfaceIndexPtr->data[dst][0] = VB->BackfaceIndexPtr->data[src][0];
}
_tnl_generic_copy_pv(ctx, dst, src);
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index e4b535fb680..e5885782c7a 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -443,7 +443,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
} else if (HAVE_TRI_STRIPS &&
ctx->Light.ShadeModel == GL_FLAT &&
- TNL_CONTEXT(ctx)->vb.ColorPtr[0]->stride) {
+ TNL_CONTEXT(ctx)->vb.AttribPtr[_TNL_ATTRIB_COLOR0]->stride) {
if (HAVE_ELTS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
@@ -1221,7 +1221,7 @@ static GLboolean TAG(validate_render)( GLcontext *ctx,
ok = GL_TRUE;
} else if (HAVE_TRI_STRIPS &&
ctx->Light.ShadeModel == GL_FLAT &&
- VB->ColorPtr[0]->stride != 0) {
+ VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride != 0) {
if (HAVE_ELTS) {
ok = (GLint) count < GET_SUBSEQUENT_VB_MAX_ELTS();
}
diff --git a/src/mesa/tnl_dd/t_dd_tritmp.h b/src/mesa/tnl_dd/t_dd_tritmp.h
index 1ae70f4059f..8574fe618b5 100644
--- a/src/mesa/tnl_dd/t_dd_tritmp.h
+++ b/src/mesa/tnl_dd/t_dd_tritmp.h
@@ -195,7 +195,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
}
}
else {
- GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->data;
+ GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data;
(void) vbcolor;
if (!DO_FLAT) {
@@ -204,8 +204,8 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
}
VERT_SAVE_RGBA( 2 );
- if (VB->ColorPtr[1]->stride) {
- ASSERT(VB->ColorPtr[1]->stride == 4*sizeof(GLfloat));
+ if (VB->BackfaceColorPtr->stride) {
+ ASSERT(VB->BackfaceColorPtr->stride == 4*sizeof(GLfloat));
if (!DO_FLAT) {
VERT_SET_RGBA( v[0], vbcolor[e0] );
@@ -221,9 +221,9 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
VERT_SET_RGBA( v[2], vbcolor[0] );
}
- if (HAVE_SPEC && VB->SecondaryColorPtr[1]) {
- GLfloat (*vbspec)[4] = VB->SecondaryColorPtr[1]->data;
- ASSERT(VB->SecondaryColorPtr[1]->stride == 4*sizeof(GLfloat));
+ if (HAVE_SPEC && VB->BackfaceSecondaryColorPtr) {
+ GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
+ ASSERT(VB->BackfaceSecondaryColorPtr->stride == 4*sizeof(GLfloat));
if (!DO_FLAT) {
VERT_SAVE_SPEC( 0 );
@@ -237,7 +237,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
}
}
else {
- GLfloat (*vbindex) = (GLfloat *)VB->IndexPtr[1]->data;
+ GLfloat (*vbindex) = (GLfloat *)VB->BackfaceIndexPtr->data;
if (!DO_FLAT) {
VERT_SAVE_IND( 0 );
VERT_SAVE_IND( 1 );
@@ -279,7 +279,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
VERT_SAVE_RGBA( 1 );
VERT_COPY_RGBA( v[0], v[2] );
VERT_COPY_RGBA( v[1], v[2] );
- if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
+ if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
VERT_SAVE_SPEC( 0 );
VERT_SAVE_SPEC( 1 );
VERT_COPY_SPEC( v[0], v[2] );
@@ -374,7 +374,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (HAVE_RGBA) {
VERT_RESTORE_RGBA( 0 );
VERT_RESTORE_RGBA( 1 );
- if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
+ if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
VERT_RESTORE_SPEC( 0 );
VERT_RESTORE_SPEC( 1 );
}
@@ -436,7 +436,7 @@ static void TAG(quadr)( GLcontext *ctx,
if (DO_TWOSIDE && facing == 1)
{
if (HAVE_RGBA) {
- GLfloat (*vbcolor)[4] = VB->ColorPtr[1]->data;
+ GLfloat (*vbcolor)[4] = VB->BackfaceColorPtr->data;
(void)vbcolor;
if (HAVE_BACK_COLORS) {
@@ -471,7 +471,7 @@ static void TAG(quadr)( GLcontext *ctx,
}
VERT_SAVE_RGBA( 3 );
- if (VB->ColorPtr[1]->stride) {
+ if (VB->BackfaceColorPtr->stride) {
if (!DO_FLAT) {
VERT_SET_RGBA( v[0], vbcolor[e0] );
VERT_SET_RGBA( v[1], vbcolor[e1] );
@@ -488,9 +488,9 @@ static void TAG(quadr)( GLcontext *ctx,
VERT_SET_RGBA( v[3], vbcolor[0] );
}
- if (HAVE_SPEC && VB->SecondaryColorPtr[1]) {
- GLfloat (*vbspec)[4] = VB->SecondaryColorPtr[1]->data;
- ASSERT(VB->SecondaryColorPtr[1]->stride==4*sizeof(GLfloat));
+ if (HAVE_SPEC && VB->BackfaceSecondaryColorPtr) {
+ GLfloat (*vbspec)[4] = VB->BackfaceSecondaryColorPtr->data;
+ ASSERT(VB->BackfaceSecondaryColorPtr->stride==4*sizeof(GLfloat));
if (!DO_FLAT) {
VERT_SAVE_SPEC( 0 );
@@ -506,7 +506,7 @@ static void TAG(quadr)( GLcontext *ctx,
}
}
else {
- GLfloat *vbindex = (GLfloat *)VB->IndexPtr[1]->data;
+ GLfloat *vbindex = (GLfloat *)VB->BackfaceIndexPtr->data;
if (!DO_FLAT) {
VERT_SAVE_IND( 0 );
VERT_SAVE_IND( 1 );
@@ -553,7 +553,7 @@ static void TAG(quadr)( GLcontext *ctx,
VERT_COPY_RGBA( v[0], v[3] );
VERT_COPY_RGBA( v[1], v[3] );
VERT_COPY_RGBA( v[2], v[3] );
- if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
+ if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
VERT_SAVE_SPEC( 0 );
VERT_SAVE_SPEC( 1 );
VERT_SAVE_SPEC( 2 );
@@ -659,7 +659,7 @@ static void TAG(quadr)( GLcontext *ctx,
VERT_RESTORE_RGBA( 0 );
VERT_RESTORE_RGBA( 1 );
VERT_RESTORE_RGBA( 2 );
- if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
+ if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
VERT_RESTORE_SPEC( 0 );
VERT_RESTORE_SPEC( 1 );
VERT_RESTORE_SPEC( 2 );
@@ -708,7 +708,7 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
if (HAVE_RGBA) {
VERT_SAVE_RGBA( 0 );
VERT_COPY_RGBA( v[0], v[1] );
- if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
+ if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
VERT_SAVE_SPEC( 0 );
VERT_COPY_SPEC( v[0], v[1] );
}
@@ -725,7 +725,7 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
if (HAVE_RGBA) {
VERT_RESTORE_RGBA( 0 );
- if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
+ if (HAVE_SPEC && VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
VERT_RESTORE_SPEC( 0 );
}
}
diff --git a/src/mesa/tnl_dd/t_dd_vb.c b/src/mesa/tnl_dd/t_dd_vb.c
index b3937c29a00..a8a0a69768d 100644
--- a/src/mesa/tnl_dd/t_dd_vb.c
+++ b/src/mesa/tnl_dd/t_dd_vb.c
@@ -297,19 +297,19 @@ INTERP_QUALIFIER void TAG(interp_extras)( GLcontext *ctx,
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- if (VB->ColorPtr[1]) {
- assert(VB->ColorPtr[1]->stride == 4 * sizeof(GLfloat));
+ if (VB->BackfaceColorPtr) {
+ assert(VB->BackfaceColorPtr->stride == 4 * sizeof(GLfloat));
INTERP_4F( t,
- GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], out),
- GET_COLOR(VB->ColorPtr[1], in) );
+ GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, out),
+ GET_COLOR(VB->BackfaceColorPtr, in) );
- if (VB->SecondaryColorPtr[1]) {
+ if (VB->BackfaceSecondaryColorPtr) {
INTERP_3F( t,
- GET_COLOR(VB->SecondaryColorPtr[1], dst),
- GET_COLOR(VB->SecondaryColorPtr[1], out),
- GET_COLOR(VB->SecondaryColorPtr[1], in) );
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, dst),
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, out),
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, in) );
}
}
@@ -326,13 +326,13 @@ INTERP_QUALIFIER void TAG(copy_pv_extras)( GLcontext *ctx,
LOCALVARS
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- if (VB->ColorPtr[1]) {
- COPY_4FV( GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], src) );
+ if (VB->BackfaceColorPtr) {
+ COPY_4FV( GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, src) );
- if (VB->SecondaryColorPtr[1]) {
- COPY_4FV( GET_COLOR(VB->SecondaryColorPtr[1], dst),
- GET_COLOR(VB->SecondaryColorPtr[1], src) );
+ if (VB->BackfaceSecondaryColorPtr) {
+ COPY_4FV( GET_COLOR(VB->BackfaceSecondaryColorPtr, dst),
+ GET_COLOR(VB->BackfaceSecondaryColorPtr, src) );
}
}
diff --git a/src/mesa/tnl_dd/t_dd_vbtmp.h b/src/mesa/tnl_dd/t_dd_vbtmp.h
index 92dd8931c33..85101b9ceb8 100644
--- a/src/mesa/tnl_dd/t_dd_vbtmp.h
+++ b/src/mesa/tnl_dd/t_dd_vbtmp.h
@@ -153,46 +153,46 @@ static void TAG(emit)( GLcontext *ctx,
if (DO_TEX3) {
const GLuint t3 = GET_TEXSOURCE(3);
- tc3 = VB->TexCoordPtr[t3]->data;
- tc3_stride = VB->TexCoordPtr[t3]->stride;
+ tc3 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t3]->data;
+ tc3_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t3]->stride;
if (DO_PTEX)
- tc3_size = VB->TexCoordPtr[t3]->size;
+ tc3_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t3]->size;
}
if (DO_TEX2) {
const GLuint t2 = GET_TEXSOURCE(2);
- tc2 = VB->TexCoordPtr[t2]->data;
- tc2_stride = VB->TexCoordPtr[t2]->stride;
+ tc2 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->data;
+ tc2_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->stride;
if (DO_PTEX)
- tc2_size = VB->TexCoordPtr[t2]->size;
+ tc2_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t2]->size;
}
if (DO_TEX1) {
const GLuint t1 = GET_TEXSOURCE(1);
- tc1 = VB->TexCoordPtr[t1]->data;
- tc1_stride = VB->TexCoordPtr[t1]->stride;
+ tc1 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->data;
+ tc1_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->stride;
if (DO_PTEX)
- tc1_size = VB->TexCoordPtr[t1]->size;
+ tc1_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t1]->size;
}
if (DO_TEX0) {
const GLuint t0 = GET_TEXSOURCE(0);
- tc0_stride = VB->TexCoordPtr[t0]->stride;
- tc0 = VB->TexCoordPtr[t0]->data;
+ tc0_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->stride;
+ tc0 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->data;
if (DO_PTEX)
- tc0_size = VB->TexCoordPtr[t0]->size;
+ tc0_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + t0]->size;
}
if (DO_RGBA) {
- col_stride = VB->ColorPtr[0]->stride;
- col = VB->ColorPtr[0]->data;
- col_size = VB->ColorPtr[0]->size;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_size = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->size;
}
if (DO_SPEC) {
- if (VB->SecondaryColorPtr[0]) {
- spec_stride = VB->SecondaryColorPtr[0]->stride;
- spec = VB->SecondaryColorPtr[0]->data;
+ if (VB->AttribPtr[_TNL_ATTRIB_COLOR1]) {
+ spec_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->stride;
+ spec = VB->AttribPtr[_TNL_ATTRIB_COLOR1]->data;
} else {
spec = (GLfloat (*)[4])ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
spec_stride = 0;
@@ -200,9 +200,9 @@ static void TAG(emit)( GLcontext *ctx,
}
if (DO_FOG) {
- if (VB->FogCoordPtr) {
- fog = VB->FogCoordPtr->data;
- fog_stride = VB->FogCoordPtr->stride;
+ if (VB->AttribPtr[_TNL_ATTRIB_FOG]) {
+ fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
+ fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
}
else {
static GLfloat tmp[4] = {0, 0, 0, 0};
@@ -356,9 +356,9 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
ASSERT(stride == 4);
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
- col_size = VB->ColorPtr[0]->size;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
+ col_size = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->size;
/* fprintf(stderr, "%s(small) importable %x\n", */
/* __FUNCTION__, VB->importable_data); */
@@ -410,22 +410,22 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
/* Force 'missing' texcoords to something valid.
*/
- if (DO_TEX3 && VB->TexCoordPtr[2] == 0)
- VB->TexCoordPtr[2] = VB->TexCoordPtr[3];
+ if (DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 3];
- if (DO_TEX2 && VB->TexCoordPtr[1] == 0)
- VB->TexCoordPtr[1] = VB->TexCoordPtr[2];
+ if (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2];
- if (DO_TEX1 && VB->TexCoordPtr[0] == 0)
- VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
+ if (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 0] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + 0] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1];
if (DO_PTEX)
return GL_TRUE;
- if ((DO_TEX3 && VB->TexCoordPtr[GET_TEXSOURCE(3)]->size == 4) ||
- (DO_TEX2 && VB->TexCoordPtr[GET_TEXSOURCE(2)]->size == 4) ||
- (DO_TEX1 && VB->TexCoordPtr[GET_TEXSOURCE(1)]->size == 4) ||
- (DO_TEX0 && VB->TexCoordPtr[GET_TEXSOURCE(0)]->size == 4))
+ if ((DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(3)]->size == 4) ||
+ (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(2)]->size == 4) ||
+ (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(1)]->size == 4) ||
+ (DO_TEX0 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(0)]->size == 4))
return GL_FALSE;
return GL_TRUE;
@@ -438,14 +438,14 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
/* Force 'missing' texcoords to something valid.
*/
- if (DO_TEX3 && VB->TexCoordPtr[2] == 0)
- VB->TexCoordPtr[2] = VB->TexCoordPtr[3];
+ if (DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 3];
- if (DO_TEX2 && VB->TexCoordPtr[1] == 0)
- VB->TexCoordPtr[1] = VB->TexCoordPtr[2];
+ if (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 2];
- if (DO_TEX1 && VB->TexCoordPtr[0] == 0)
- VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
+ if (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + 0] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0 + 0] = VB->AttribPtr[_TNL_ATTRIB_TEX0 + 1];
if (DO_PTEX)
return GL_TRUE;
@@ -453,14 +453,14 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
/* No hardware support for projective texture. Can fake it for
* TEX0 only.
*/
- if ((DO_TEX3 && VB->TexCoordPtr[GET_TEXSOURCE(3)]->size == 4) ||
- (DO_TEX2 && VB->TexCoordPtr[GET_TEXSOURCE(2)]->size == 4) ||
- (DO_TEX1 && VB->TexCoordPtr[GET_TEXSOURCE(1)]->size == 4)) {
+ if ((DO_TEX3 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(3)]->size == 4) ||
+ (DO_TEX2 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(2)]->size == 4) ||
+ (DO_TEX1 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(1)]->size == 4)) {
PTEX_FALLBACK();
return GL_FALSE;
}
- if (DO_TEX0 && VB->TexCoordPtr[GET_TEXSOURCE(0)]->size == 4) {
+ if (DO_TEX0 && VB->AttribPtr[_TNL_ATTRIB_TEX0 + GET_TEXSOURCE(0)]->size == 4) {
if (DO_TEX1 || DO_TEX2 || DO_TEX3) {
PTEX_FALLBACK();
}
diff --git a/src/mesa/vbo/vbo_exec.h b/src/mesa/vbo/vbo_exec.h
index 516be0995b2..98c1f363d98 100644
--- a/src/mesa/vbo/vbo_exec.h
+++ b/src/mesa/vbo/vbo_exec.h
@@ -103,7 +103,7 @@ struct vbo_exec_context
GLubyte active_sz[VBO_ATTRIB_MAX];
GLfloat *attrptr[VBO_ATTRIB_MAX];
- struct gl_client_array arrays[VBO_ATTRIB_MAX];
+ struct gl_client_array arrays[VERT_ATTRIB_MAX];
/* According to program mode, the values above plus current
* values are squashed down to the 32 attributes passed to the
@@ -138,6 +138,10 @@ struct vbo_exec_context
*/
const struct gl_client_array *inputs[VERT_ATTRIB_MAX];
} array;
+
+#ifdef DEBUG
+ GLint flush_call_depth;
+#endif
};
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index f88df5aac79..f0a7eeadd0f 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -790,8 +790,14 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec )
_mesa_install_exec_vtxfmt( exec->ctx, &exec->vtxfmt );
for (i = 0 ; i < VBO_ATTRIB_MAX ; i++) {
+ ASSERT(i < Elements(exec->vtx.attrsz));
exec->vtx.attrsz[i] = 0;
+ ASSERT(i < Elements(exec->vtx.active_sz));
exec->vtx.active_sz[i] = 0;
+ }
+ for (i = 0 ; i < VERT_ATTRIB_MAX; i++) {
+ ASSERT(i < Elements(exec->vtx.inputs));
+ ASSERT(i < Elements(exec->vtx.arrays));
exec->vtx.inputs[i] = &exec->vtx.arrays[i];
}
@@ -861,15 +867,27 @@ void vbo_exec_FlushVertices_internal( GLcontext *ctx, GLboolean unmap )
}
-
+/**
+ * \param flags bitmask of FLUSH_STORED_VERTICES, FLUSH_UPDATE_CURRENT
+ */
void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags )
{
struct vbo_exec_context *exec = &vbo_context(ctx)->exec;
+#ifdef DEBUG
+ /* debug check: make sure we don't get called recursively */
+ exec->flush_call_depth++;
+ assert(exec->flush_call_depth == 1);
+#endif
+
if (0) _mesa_printf("%s\n", __FUNCTION__);
if (exec->ctx->Driver.CurrentExecPrimitive != PRIM_OUTSIDE_BEGIN_END) {
if (0) _mesa_printf("%s - inside begin/end\n", __FUNCTION__);
+#ifdef DEBUG
+ exec->flush_call_depth--;
+ assert(exec->flush_call_depth == 0);
+#endif
return;
}
@@ -883,6 +901,11 @@ void vbo_exec_FlushVertices( GLcontext *ctx, GLuint flags )
}
exec->ctx->Driver.NeedFlush &= ~flags;
+
+#ifdef DEBUG
+ exec->flush_call_depth--;
+ assert(exec->flush_call_depth == 0);
+#endif
}
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index fd70b57b72e..6de8f059b79 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -146,7 +146,7 @@ check_array_data(GLcontext *ctx, struct gl_client_array *array,
array->Ptr, array->BufferObj->Name);
f[k] = 1.0; /* XXX replace the bad value! */
}
- //assert(!IS_INF_OR_NAN(f[k]));
+ /*assert(!IS_INF_OR_NAN(f[k]));*/
}
}
break;
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index ee148df4a12..4f43856016c 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -175,6 +175,7 @@ vbo_exec_bind_arrays( GLcontext *ctx )
exec->vtx.inputs[attr] = &vbo->legacy_currval[attr];
}
for (attr = 0; attr < MAT_ATTRIB_MAX; attr++) {
+ ASSERT(attr + 16 < Elements(exec->vtx.inputs));
exec->vtx.inputs[attr + 16] = &vbo->mat_currval[attr];
}
map = vbo->map_vp_none;
@@ -187,6 +188,7 @@ vbo_exec_bind_arrays( GLcontext *ctx )
*/
for (attr = 0; attr < 16; attr++) {
exec->vtx.inputs[attr] = &vbo->legacy_currval[attr];
+ ASSERT(attr + 16 < Elements(exec->vtx.inputs));
exec->vtx.inputs[attr + 16] = &vbo->generic_currval[attr];
}
map = vbo->map_vp_arb;
@@ -215,6 +217,8 @@ vbo_exec_bind_arrays( GLcontext *ctx )
if (exec->vtx.attrsz[src]) {
/* override the default array set above */
+ ASSERT(attr < Elements(exec->vtx.inputs));
+ ASSERT(attr < Elements(exec->vtx.arrays)); /* arrays[] */
exec->vtx.inputs[attr] = &arrays[attr];
if (_mesa_is_bufferobj(exec->vtx.bufferobj)) {
diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S
index 72d0532906a..134cff7ca46 100644
--- a/src/mesa/x86-64/glapi_x86-64.S
+++ b/src/mesa/x86-64/glapi_x86-64.S
@@ -30302,6 +30302,7 @@ GL_PREFIX(_dispatch_stub_794):
.globl GL_PREFIX(GetAttribLocation) ; .set GL_PREFIX(GetAttribLocation), GL_PREFIX(GetAttribLocationARB)
.globl GL_PREFIX(DrawBuffers) ; .set GL_PREFIX(DrawBuffers), GL_PREFIX(DrawBuffersARB)
.globl GL_PREFIX(DrawBuffersATI) ; .set GL_PREFIX(DrawBuffersATI), GL_PREFIX(DrawBuffersARB)
+ .globl GL_PREFIX(RenderbufferStorageMultisampleEXT) ; .set GL_PREFIX(RenderbufferStorageMultisampleEXT), GL_PREFIX(RenderbufferStorageMultisample)
.globl GL_PREFIX(PointParameterf) ; .set GL_PREFIX(PointParameterf), GL_PREFIX(PointParameterfEXT)
.globl GL_PREFIX(PointParameterfARB) ; .set GL_PREFIX(PointParameterfARB), GL_PREFIX(PointParameterfEXT)
.globl GL_PREFIX(PointParameterfv) ; .set GL_PREFIX(PointParameterfv), GL_PREFIX(PointParameterfvEXT)
diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c
index d56b701aa8c..0d7e0f1f98b 100644
--- a/src/mesa/x86/gen_matypes.c
+++ b/src/mesa/x86/gen_matypes.c
@@ -120,22 +120,22 @@ int main( int argc, char **argv )
OFFSET( "VB_COUNT ", struct vertex_buffer, Count );
printf( "\n" );
OFFSET( "VB_ELTS ", struct vertex_buffer, Elts );
- OFFSET( "VB_OBJ_PTR ", struct vertex_buffer, ObjPtr );
+ OFFSET( "VB_OBJ_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_POS] );
OFFSET( "VB_EYE_PTR ", struct vertex_buffer, EyePtr );
OFFSET( "VB_CLIP_PTR ", struct vertex_buffer, ClipPtr );
OFFSET( "VB_PROJ_CLIP_PTR ", struct vertex_buffer, NdcPtr );
OFFSET( "VB_CLIP_OR_MASK ", struct vertex_buffer, ClipOrMask );
OFFSET( "VB_CLIP_MASK ", struct vertex_buffer, ClipMask );
- OFFSET( "VB_NORMAL_PTR ", struct vertex_buffer, NormalPtr );
+ OFFSET( "VB_NORMAL_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_NORMAL] );
OFFSET( "VB_EDGE_FLAG ", struct vertex_buffer, EdgeFlag );
- OFFSET( "VB_TEX0_COORD_PTR ", struct vertex_buffer, TexCoordPtr[0] );
- OFFSET( "VB_TEX1_COORD_PTR ", struct vertex_buffer, TexCoordPtr[1] );
- OFFSET( "VB_TEX2_COORD_PTR ", struct vertex_buffer, TexCoordPtr[2] );
- OFFSET( "VB_TEX3_COORD_PTR ", struct vertex_buffer, TexCoordPtr[3] );
- OFFSET( "VB_INDEX_PTR ", struct vertex_buffer, IndexPtr );
- OFFSET( "VB_COLOR_PTR ", struct vertex_buffer, ColorPtr );
- OFFSET( "VB_SECONDARY_COLOR_PTR ", struct vertex_buffer, SecondaryColorPtr );
- OFFSET( "VB_FOG_COORD_PTR ", struct vertex_buffer, FogCoordPtr );
+ OFFSET( "VB_TEX0_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_TEX0] );
+ OFFSET( "VB_TEX1_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_TEX1] );
+ OFFSET( "VB_TEX2_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_TEX2] );
+ OFFSET( "VB_TEX3_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_TEX3] );
+ OFFSET( "VB_INDEX_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_COLOR_INDEX] );
+ OFFSET( "VB_COLOR_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_COLOR0] );
+ OFFSET( "VB_SECONDARY_COLOR_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_COLOR1] );
+ OFFSET( "VB_FOG_COORD_PTR ", struct vertex_buffer, AttribPtr[_TNL_ATTRIB_FOG] );
OFFSET( "VB_PRIMITIVE ", struct vertex_buffer, Primitive );
printf( "\n" );
diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S
index 12c77f434ec..0da924c37f2 100644
--- a/src/mesa/x86/glapi_x86.S
+++ b/src/mesa/x86/glapi_x86.S
@@ -1226,6 +1226,7 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(GetAttribLocation, _gloffset_GetAttribLocationARB, GetAttribLocation@8, GetAttribLocationARB, GetAttribLocationARB@8)
GL_STUB_ALIAS(DrawBuffers, _gloffset_DrawBuffersARB, DrawBuffers@8, DrawBuffersARB, DrawBuffersARB@8)
GL_STUB_ALIAS(DrawBuffersATI, _gloffset_DrawBuffersARB, DrawBuffersATI@8, DrawBuffersARB, DrawBuffersARB@8)
+ GL_STUB_ALIAS(RenderbufferStorageMultisampleEXT, _gloffset_RenderbufferStorageMultisample, RenderbufferStorageMultisampleEXT@20, RenderbufferStorageMultisample, RenderbufferStorageMultisample@20)
GL_STUB_ALIAS(PointParameterf, _gloffset_PointParameterfEXT, PointParameterf@8, PointParameterfEXT, PointParameterfEXT@8)
GL_STUB_ALIAS(PointParameterfARB, _gloffset_PointParameterfEXT, PointParameterfARB@8, PointParameterfEXT, PointParameterfEXT@8)
GL_STUB_ALIAS(PointParameterfSGIS, _gloffset_PointParameterfEXT, PointParameterfSGIS@8, PointParameterfEXT, PointParameterfEXT@8)