summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/Makefile24
-rw-r--r--src/mesa/Makefile.mgw1
-rw-r--r--src/mesa/SConscript10
-rw-r--r--src/mesa/drivers/common/driverfuncs.c23
-rw-r--r--src/mesa/drivers/common/meta.c60
-rw-r--r--src/mesa/drivers/directfb/idirectfbgl_mesa.c8
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c35
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h8
-rw-r--r--src/mesa/drivers/dri/common/drirenderbuffer.c4
-rw-r--r--src/mesa/drivers/dri/common/drirenderbuffer.h8
-rw-r--r--src/mesa/drivers/dri/common/utils.c1
-rw-r--r--src/mesa/drivers/dri/common/vblank.c20
-rw-r--r--src/mesa/drivers/dri/common/vblank.h16
-rw-r--r--src/mesa/drivers/dri/fb/Makefile3
-rw-r--r--src/mesa/drivers/dri/fb/fb_dri.c43
-rw-r--r--src/mesa/drivers/dri/fb/fb_egl.c881
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_bitmap.c2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_clear.c4
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_context.h4
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_depth.c8
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_span.c2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_state.c6
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_stencil.c8
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_tris.c2
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_vbtmp.h8
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_xmesa.c39
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_xmesa.h2
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_context.c4
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_context.h12
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_lock.c4
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_macros.h6
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_render.c10
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_screen.c4
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_screen.h2
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_span.c8
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_state.c12
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_tex.c4
-rw-r--r--src/mesa/drivers/dri/gamma/gamma_xmesa.c35
-rw-r--r--src/mesa/drivers/dri/i810/i810context.c24
-rw-r--r--src/mesa/drivers/dri/i810/i810context.h4
-rw-r--r--src/mesa/drivers/dri/i810/i810ioctl.c8
-rw-r--r--src/mesa/drivers/dri/i810/i810ioctl.h4
-rw-r--r--src/mesa/drivers/dri/i810/i810screen.c17
-rw-r--r--src/mesa/drivers/dri/i810/i810screen.h16
-rw-r--r--src/mesa/drivers/dri/i810/i810span.c4
-rw-r--r--src/mesa/drivers/dri/i810/i810state.c2
-rw-r--r--src/mesa/drivers/dri/i810/i810tex.c4
-rw-r--r--src/mesa/drivers/dri/i915/Makefile4
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.c2
-rw-r--r--src/mesa/drivers/dri/i915/i830_context.h2
-rw-r--r--src/mesa/drivers/dri/i915/i830_state.c4
-rw-r--r--src/mesa/drivers/dri/i915/i830_texstate.c20
-rw-r--r--src/mesa/drivers/dri/i915/i830_vtbl.c67
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c5
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.h2
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c4
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c4
-rw-r--r--src/mesa/drivers/dri/i915/i915_texstate.c25
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c69
l---------src/mesa/drivers/dri/i915/intel_swapbuffers.c1
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c89
-rw-r--r--src/mesa/drivers/dri/i965/Makefile4
-rw-r--r--src/mesa/drivers/dri/i965/brw_cc.c3
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.c26
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_line.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_state.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_tri.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_util.c15
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c38
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h21
-rw-r--r--src/mesa/drivers/dri/i965/brw_curbe.c27
-rw-r--r--src/mesa/drivers/dri/i965/brw_defines.h8
-rw-r--r--src/mesa/drivers/dri/i965/brw_disasm.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c17
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c33
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c29
-rw-r--r--src/mesa/drivers/dri/i965/brw_fallback.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c17
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs_emit.c20
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs_state.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_misc_state.c35
-rw-r--r--src/mesa/drivers/dri/i965/brw_queryobj.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c13
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_emit.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_state.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h32
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_batch.c4
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_cache.c244
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c9
-rw-r--r--src/mesa/drivers/dri/i965/brw_tex_layout.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_urb.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c31
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.h3
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_emit.c198
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_state.c22
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_surface_state.c7
-rw-r--r--src/mesa/drivers/dri/i965/brw_vtbl.c10
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.c13
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm.h2
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_emit.c14
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_fp.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_glsl.c11
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c13
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_state.c26
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c19
l---------src/mesa/drivers/dri/i965/intel_swapbuffers.c1
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.c60
-rw-r--r--src/mesa/drivers/dri/intel/intel_batchbuffer.h57
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c156
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.h2
-rw-r--r--src/mesa/drivers/dri/intel/intel_buffers.c60
-rw-r--r--src/mesa/drivers/dri/intel/intel_clear.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c404
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h104
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c20
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.h3
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.c34
-rw-r--r--src/mesa/drivers/dri/intel/intel_fbo.h25
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c18
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel.c8
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_bitmap.c9
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_copy.c31
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_draw.c2
-rw-r--r--src/mesa/drivers/dri/intel/intel_pixel_read.c11
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c126
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c541
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.h15
-rw-r--r--src/mesa/drivers/dri/intel/intel_span.c16
-rw-r--r--src/mesa/drivers/dri/intel/intel_state.c20
-rw-r--r--src/mesa/drivers/dri/intel/intel_swapbuffers.c247
-rw-r--r--src/mesa/drivers/dri/intel/intel_swapbuffers.h52
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c7
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_format.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c14
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c4
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_context.c14
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_context.h18
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_ioctl.c4
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_ioctl.h2
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_lock.c4
-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_screen.c24
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_screen.h2
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_span.c8
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_state.c12
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_tex.c5
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_vbtmp.h86
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c39
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.h2
-rw-r--r--src/mesa/drivers/dri/mga/mgacontext.h6
-rw-r--r--src/mesa/drivers/dri/mga/mgaioctl.c6
-rw-r--r--src/mesa/drivers/dri/mga/mgaioctl.h2
-rw-r--r--src/mesa/drivers/dri/mga/mgapixel.c28
-rw-r--r--src/mesa/drivers/dri/mga/mgaspan.c8
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.c16
-rw-r--r--src/mesa/drivers/dri/mga/mgatex.c4
-rw-r--r--src/mesa/drivers/dri/r128/r128_context.c14
-rw-r--r--src/mesa/drivers/dri/r128/r128_context.h18
-rw-r--r--src/mesa/drivers/dri/r128/r128_ioctl.c6
-rw-r--r--src/mesa/drivers/dri/r128/r128_ioctl.h4
-rw-r--r--src/mesa/drivers/dri/r128/r128_lock.c4
-rw-r--r--src/mesa/drivers/dri/r128/r128_screen.c25
-rw-r--r--src/mesa/drivers/dri/r128/r128_screen.h2
-rw-r--r--src/mesa/drivers/dri/r128/r128_span.c8
-rw-r--r--src/mesa/drivers/dri/r128/r128_state.c10
-rw-r--r--src/mesa/drivers/dri/r128/r128_tex.c4
-rw-r--r--src/mesa/drivers/dri/r128/r128_tris.c4
-rw-r--r--src/mesa/drivers/dri/r200/Makefile11
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.c407
-rw-r--r--src/mesa/drivers/dri/r200/r200_blit.h54
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c11
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.h14
-rw-r--r--src/mesa/drivers/dri/r200/r200_ioctl.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos_arrays.c2
-rw-r--r--src/mesa/drivers/dri/r200/r200_pixel.c20
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c12
-rw-r--r--src/mesa/drivers/dri/r200/r200_swtcl.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.c11
-rw-r--r--src/mesa/drivers/dri/r200/r200_tex.h2
-rw-r--r--src/mesa/drivers/dri/r200/r200_texstate.c15
l---------src/mesa/drivers/dri/r200/radeon_tex_copy.c1
l---------src/mesa/drivers/dri/r200/server/radeon_egl.c1
-rw-r--r--src/mesa/drivers/dri/r300/Makefile10
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_code.h4
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler.c13
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_compiler.h5
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c2
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program.h14
-rw-r--r--src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h10
-rw-r--r--src/mesa/drivers/dri/r300/r300_blit.c648
-rw-r--r--src/mesa/drivers/dri/r300/r300_blit.h54
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c339
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.h26
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c22
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h9
-rw-r--r--src/mesa/drivers/dri/r300/r300_draw.c29
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.c5
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog_common.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c780
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.h44
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h3
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c15
-rw-r--r--src/mesa/drivers/dri/r300/r300_swtcl.c20
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c11
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.h4
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c208
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c2
l---------src/mesa/drivers/dri/r300/radeon_tex_copy.c1
l---------src/mesa/drivers/dri/r300/server/radeon_egl.c1
-rw-r--r--src/mesa/drivers/dri/r600/Makefile11
-rw-r--r--src/mesa/drivers/dri/r600/r600_blit.c1660
-rw-r--r--src/mesa/drivers/dri/r600/r600_blit.h21
-rw-r--r--src/mesa/drivers/dri/r600/r600_blit_shaders.h28
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.c25
-rw-r--r--src/mesa/drivers/dri/r600/r600_context.h6
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.c11
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.h2
-rw-r--r--src/mesa/drivers/dri/r600/r600_texstate.c81
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.c2347
-rw-r--r--src/mesa/drivers/dri/r600/r700_assembler.h200
-rw-r--r--src/mesa/drivers/dri/r600/r700_chip.c164
-rw-r--r--src/mesa/drivers/dri/r600/r700_clear.c8
-rw-r--r--src/mesa/drivers/dri/r600/r700_fragprog.c350
-rw-r--r--src/mesa/drivers/dri/r600/r700_fragprog.h8
-rw-r--r--src/mesa/drivers/dri/r600/r700_render.c23
-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_shaderinst.h7
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c16
-rw-r--r--src/mesa/drivers/dri/r600/r700_vertprog.c72
l---------src/mesa/drivers/dri/r600/radeon_tex_copy.c1
l---------src/mesa/drivers/dri/r600/server/radeon_egl.c1
-rw-r--r--src/mesa/drivers/dri/radeon/Makefile6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_blit.c403
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_blit.h54
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c58
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.h10
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c71
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.h46
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c9
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.h3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_dma.c26
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_fbo.c14
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_ioctl.c9
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_lock.c6
-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.c53
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c33
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.h4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_span.c40
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c12
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c11
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.h2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex_copy.c155
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texstate.c15
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.c28
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_texture.h11
-rw-r--r--src/mesa/drivers/dri/radeon/server/radeon_egl.c1088
-rw-r--r--src/mesa/drivers/dri/radeon/server/radeon_reg.h25
-rw-r--r--src/mesa/drivers/dri/savage/savage_init.h2
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c53
-rw-r--r--src/mesa/drivers/dri/savage/savagecontext.h6
-rw-r--r--src/mesa/drivers/dri/savage/savageioctl.c18
-rw-r--r--src/mesa/drivers/dri/savage/savageioctl.h2
-rw-r--r--src/mesa/drivers/dri/savage/savagerender.c8
-rw-r--r--src/mesa/drivers/dri/savage/savagespan.c4
-rw-r--r--src/mesa/drivers/dri/savage/savagetex.c4
-rw-r--r--src/mesa/drivers/dri/savage/savagetris.c18
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.c14
-rw-r--r--src/mesa/drivers/dri/sis/sis_context.h18
-rw-r--r--src/mesa/drivers/dri/sis/sis_lock.c4
-rw-r--r--src/mesa/drivers/dri/sis/sis_screen.c25
-rw-r--r--src/mesa/drivers/dri/sis/sis_screen.h2
-rw-r--r--src/mesa/drivers/dri/sis/sis_span.c4
-rw-r--r--src/mesa/drivers/dri/sis/sis_texstate.c8
-rw-r--r--src/mesa/drivers/dri/sis/sis_tris.c4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_context.c16
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_context.h20
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_lock.c8
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_pixels.c12
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_render.c8
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_screen.c25
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_screen.h2
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_span.c4
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_state.c2
-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_context.c30
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.h8
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.c14
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.h4
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.c23
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.h16
-rw-r--r--src/mesa/drivers/dri/unichrome/via_span.c4
-rw-r--r--src/mesa/drivers/dri/unichrome/via_state.c30
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.c4
-rw-r--r--src/mesa/drivers/glide/fxddtex.c5
-rw-r--r--src/mesa/drivers/glide/fxvb.c34
-rw-r--r--src/mesa/drivers/glide/fxvbtmp.h35
-rw-r--r--src/mesa/drivers/osmesa/Makefile6
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c8
-rw-r--r--src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c10
-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_driver_dx8.c10
-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_driver_dx9.c10
-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/glxapi.c34
-rw-r--r--src/mesa/drivers/x11/xm_dd.c2
-rw-r--r--src/mesa/es/.gitignore5
-rw-r--r--src/mesa/es/Makefile141
-rw-r--r--src/mesa/es/glapi/Makefile90
-rw-r--r--src/mesa/es/glapi/base1_API.xml744
-rw-r--r--src/mesa/es/glapi/base2_API.xml533
-rw-r--r--src/mesa/es/glapi/es1_API.xml1100
-rw-r--r--src/mesa/es/glapi/es1_COMPAT.xml135
-rw-r--r--src/mesa/es/glapi/es1_EXT.xml699
-rw-r--r--src/mesa/es/glapi/es2_API.xml294
-rw-r--r--src/mesa/es/glapi/es2_COMPAT.xml368
-rw-r--r--src/mesa/es/glapi/es2_EXT.xml162
-rw-r--r--src/mesa/es/glapi/es_COMPAT.xml2646
-rw-r--r--src/mesa/es/glapi/es_EXT.xml122
-rw-r--r--src/mesa/es/glapi/gl_compare.py354
-rw-r--r--src/mesa/es/glapi/gl_parse_header.py450
-rw-r--r--src/mesa/es/main/APIspec.dtd52
-rw-r--r--src/mesa/es/main/APIspec.py617
-rw-r--r--src/mesa/es/main/APIspec.xml4297
-rw-r--r--src/mesa/es/main/APIspecutil.py265
-rw-r--r--src/mesa/es/main/drawtex.c148
-rw-r--r--src/mesa/es/main/drawtex.h77
-rw-r--r--src/mesa/es/main/es_cpaltex.c231
-rw-r--r--src/mesa/es/main/es_enable.c91
-rw-r--r--src/mesa/es/main/es_fbo.c37
-rw-r--r--src/mesa/es/main/es_generator.py685
-rw-r--r--src/mesa/es/main/es_query_matrix.c199
-rw-r--r--src/mesa/es/main/es_texgen.c73
-rw-r--r--src/mesa/es/main/get_gen.py810
-rw-r--r--src/mesa/es/main/mfeatures_es1.h116
-rw-r--r--src/mesa/es/main/mfeatures_es2.h116
-rw-r--r--src/mesa/es/main/specials_es1.c213
-rw-r--r--src/mesa/es/main/specials_es2.c174
-rw-r--r--src/mesa/es/main/stubs.c138
-rw-r--r--src/mesa/es/sources.mak166
-rw-r--r--src/mesa/es/state_tracker/st_cb_drawtex.c297
-rw-r--r--src/mesa/es/state_tracker/st_cb_drawtex.h18
-rw-r--r--src/mesa/glapi/EXT_draw_buffers2.xml49
-rw-r--r--src/mesa/glapi/Makefile6
-rw-r--r--src/mesa/glapi/NV_conditional_render.xml26
-rw-r--r--src/mesa/glapi/dispatch.h6
-rw-r--r--src/mesa/glapi/gl_API.xml8
-rw-r--r--src/mesa/glapi/gl_XML.py9
-rw-r--r--src/mesa/glapi/gl_apitemp.py125
-rw-r--r--src/mesa/glapi/gl_enums.py8
-rw-r--r--src/mesa/glapi/gl_offsets.py30
-rw-r--r--src/mesa/glapi/gl_procs.py37
-rw-r--r--src/mesa/glapi/gl_table.py49
-rw-r--r--src/mesa/glapi/gl_x86-64_asm.py2
-rw-r--r--src/mesa/glapi/gl_x86_asm.py2
-rw-r--r--src/mesa/glapi/glapi.c86
-rw-r--r--src/mesa/glapi/glapi.h8
-rw-r--r--src/mesa/glapi/glapi_getproc.c10
-rw-r--r--src/mesa/glapi/glapi_nop.c91
-rw-r--r--src/mesa/glapi/glapidispatch.h74
-rw-r--r--src/mesa/glapi/glapioffsets.h34
-rw-r--r--src/mesa/glapi/glapitable.h24
-rw-r--r--src/mesa/glapi/glapitemp.h481
-rw-r--r--src/mesa/glapi/glprocs.h664
-rw-r--r--src/mesa/glapi/glthread.c12
-rw-r--r--src/mesa/glapi/remap_helper.py24
-rw-r--r--src/mesa/main/api_exec.c13
-rw-r--r--src/mesa/main/attrib.c48
-rw-r--r--src/mesa/main/blend.c61
-rw-r--r--src/mesa/main/blend.h4
-rw-r--r--src/mesa/main/bufferobj.c42
-rw-r--r--src/mesa/main/bufferobj.h3
-rw-r--r--src/mesa/main/clear.c344
-rw-r--r--src/mesa/main/clear.h13
-rw-r--r--src/mesa/main/compiler.h18
-rw-r--r--src/mesa/main/condrender.c147
-rw-r--r--src/mesa/main/condrender.h45
-rw-r--r--src/mesa/main/config.h3
-rw-r--r--src/mesa/main/context.c14
-rw-r--r--src/mesa/main/dd.h37
-rw-r--r--src/mesa/main/dispatch.c4
-rw-r--r--src/mesa/main/dlist.c226
-rw-r--r--src/mesa/main/enable.c91
-rw-r--r--src/mesa/main/enable.h12
-rw-r--r--src/mesa/main/enums.c4463
-rw-r--r--src/mesa/main/extensions.c84
-rw-r--r--src/mesa/main/extensions.h7
-rw-r--r--src/mesa/main/fbobject.c3
-rw-r--r--src/mesa/main/ffvertex_prog.c3
-rw-r--r--src/mesa/main/get.c191
-rw-r--r--src/mesa/main/get.h12
-rw-r--r--src/mesa/main/get_gen.py101
-rw-r--r--src/mesa/main/getstring.c114
-rw-r--r--src/mesa/main/glheader.h7
-rw-r--r--src/mesa/main/image.c4
-rw-r--r--src/mesa/main/imports.c31
-rw-r--r--src/mesa/main/imports.h4
-rw-r--r--src/mesa/main/macros.h17
-rw-r--r--src/mesa/main/mtypes.h30
-rw-r--r--src/mesa/main/queryobj.c23
-rw-r--r--src/mesa/main/queryobj.h10
-rw-r--r--src/mesa/main/remap.c2
-rw-r--r--src/mesa/main/remap_helper.h3126
-rw-r--r--src/mesa/main/texenvprogram.c6
-rw-r--r--src/mesa/main/texgen.c4
-rw-r--r--src/mesa/main/texgen.h6
-rw-r--r--src/mesa/main/texgetimage.c65
-rw-r--r--src/mesa/main/texobj.c11
-rw-r--r--src/mesa/main/texparam.c187
-rw-r--r--src/mesa/main/texparam.h12
-rw-r--r--src/mesa/main/texrender.c3
-rw-r--r--src/mesa/main/varray.c21
-rw-r--r--src/mesa/main/version.c130
-rw-r--r--src/mesa/main/version.h17
-rw-r--r--src/mesa/math/m_debug_norm.c2
-rw-r--r--src/mesa/shader/arbprogparse.c2
-rw-r--r--src/mesa/shader/arbprogram.c35
-rw-r--r--src/mesa/shader/atifragshader.c8
-rw-r--r--src/mesa/shader/descrip.mms4
-rw-r--r--src/mesa/shader/grammar/grammar.c3178
-rw-r--r--src/mesa/shader/grammar/grammar.h103
-rw-r--r--src/mesa/shader/grammar/grammar.syn567
-rw-r--r--src/mesa/shader/grammar/grammar_crt.c64
-rw-r--r--src/mesa/shader/grammar/grammar_crt.h20
-rw-r--r--src/mesa/shader/grammar/grammar_mesa.c87
-rw-r--r--src/mesa/shader/grammar/grammar_mesa.h43
-rw-r--r--src/mesa/shader/grammar/grammar_syn.h202
-rw-r--r--src/mesa/shader/lex.yy.c10
-rw-r--r--src/mesa/shader/prog_execute.c50
-rw-r--r--src/mesa/shader/prog_instruction.h1
-rw-r--r--src/mesa/shader/prog_optimize.c1
-rw-r--r--src/mesa/shader/program_lexer.l10
-rw-r--r--src/mesa/shader/program_parse.tab.c16
-rw-r--r--src/mesa/shader/program_parse.y16
-rw-r--r--src/mesa/shader/program_parse_extra.c12
-rw-r--r--src/mesa/shader/program_parser.h2
-rw-r--r--src/mesa/shader/slang/descrip.mms5
-rw-r--r--src/mesa/shader/slang/library/.gitignore1
-rw-r--r--src/mesa/shader/slang/library/Makefile64
-rw-r--r--src/mesa/shader/slang/library/SConscript52
-rw-r--r--src/mesa/shader/slang/library/gc_to_bin.c85
-rw-r--r--src/mesa/shader/slang/library/slang_120_core_gc.h764
-rw-r--r--src/mesa/shader/slang/library/slang_builtin_120_common_gc.h108
-rw-r--r--src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h5
-rw-r--r--src/mesa/shader/slang/library/slang_common_builtin_gc.h880
-rw-r--r--src/mesa/shader/slang/library/slang_core_gc.h869
-rw-r--r--src/mesa/shader/slang/library/slang_fragment_builtin_gc.h110
-rw-r--r--src/mesa/shader/slang/library/slang_pp_directives.syn405
-rw-r--r--src/mesa/shader/slang/library/slang_pp_directives_syn.h250
-rw-r--r--src/mesa/shader/slang/library/slang_pp_expression.syn265
-rw-r--r--src/mesa/shader/slang/library/slang_pp_expression_syn.h179
-rw-r--r--src/mesa/shader/slang/library/slang_pp_version.syn122
-rw-r--r--src/mesa/shader/slang/library/slang_pp_version_syn.h69
-rw-r--r--src/mesa/shader/slang/library/slang_shader.syn1716
-rw-r--r--src/mesa/shader/slang/library/slang_shader_syn.h866
-rw-r--r--src/mesa/shader/slang/library/slang_version.syn118
-rw-r--r--src/mesa/shader/slang/library/slang_vertex_builtin_gc.h109
-rw-r--r--src/mesa/shader/slang/library/syn_to_c.c72
-rw-r--r--src/mesa/shader/slang/slang_compile.c367
-rw-r--r--src/mesa/shader/slang/slang_emit.c103
-rw-r--r--src/mesa/shader/slang/slang_link.c22
-rw-r--r--src/mesa/shader/slang/slang_preprocess.c1406
-rw-r--r--src/mesa/shader/slang/slang_preprocess.h41
-rw-r--r--src/mesa/sources.mak13
-rw-r--r--src/mesa/sparc/glapi_sparc.S36
-rw-r--r--src/mesa/state_tracker/st_atom.c3
-rw-r--r--src/mesa/state_tracker/st_atom.h3
-rw-r--r--src/mesa/state_tracker/st_atom_blend.c8
-rw-r--r--src/mesa/state_tracker/st_atom_constbuf.c12
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c5
-rw-r--r--src/mesa/state_tracker/st_atom_pixeltransfer.c6
-rw-r--r--src/mesa/state_tracker/st_atom_sampler.c15
-rw-r--r--src/mesa/state_tracker/st_atom_shader.c352
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c8
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c2
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c5
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c21
-rw-r--r--src/mesa/state_tracker/st_cb_condrender.c95
-rw-r--r--src/mesa/state_tracker/st_cb_condrender.h (renamed from src/mesa/state_tracker/st_api.c)16
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c159
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c18
-rw-r--r--src/mesa/state_tracker/st_cb_program.c43
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.c17
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.h21
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c16
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c73
-rw-r--r--src/mesa/state_tracker/st_context.c15
-rw-r--r--src/mesa/state_tracker/st_context.h8
-rw-r--r--src/mesa/state_tracker/st_debug.c3
-rw-r--r--src/mesa/state_tracker/st_draw.c138
-rw-r--r--src/mesa/state_tracker/st_draw_feedback.c18
-rw-r--r--src/mesa/state_tracker/st_extensions.c13
-rw-r--r--src/mesa/state_tracker/st_format.c114
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c44
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c102
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.h7
-rw-r--r--src/mesa/state_tracker/st_program.c423
-rw-r--r--src/mesa/state_tracker/st_program.h78
-rw-r--r--src/mesa/state_tracker/st_public.h22
-rw-r--r--src/mesa/state_tracker/st_texture.c43
-rw-r--r--src/mesa/swrast/s_accum.c10
-rw-r--r--src/mesa/swrast/s_bitmap.c4
-rw-r--r--src/mesa/swrast/s_blit.c4
-rw-r--r--src/mesa/swrast/s_clear.c54
-rw-r--r--src/mesa/swrast/s_context.c28
-rw-r--r--src/mesa/swrast/s_copypix.c4
-rw-r--r--src/mesa/swrast/s_drawpix.c4
-rw-r--r--src/mesa/swrast/s_masking.c20
-rw-r--r--src/mesa/swrast/s_masking.h2
-rw-r--r--src/mesa/swrast/s_span.c10
-rw-r--r--src/mesa/swrast/s_texfilter.c38
-rw-r--r--src/mesa/swrast/s_triangle.c8
-rw-r--r--src/mesa/swrast/swrast.h6
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h18
-rw-r--r--src/mesa/tnl/t_context.h22
-rw-r--r--src/mesa/tnl/t_draw.c43
-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.c9
-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.c48
-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/vf/vf_generic.c2
-rw-r--r--src/mesa/x86-64/glapi_x86-64.S430
-rw-r--r--src/mesa/x86/gen_matypes.c20
-rw-r--r--src/mesa/x86/glapi_x86.S38
547 files changed, 34815 insertions, 26233 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 96b4ff8eaca..f845d93fbd3 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -18,11 +18,10 @@ include sources.mak
-
-# Default: build dependencies, then asm_subdirs, then convenience
-# libs (.a) and finally the device drivers:
-default: depend asm_subdirs libmesa.a libmesagallium.a libglapi.a \
- driver_subdirs
+# Default: build dependencies, then asm_subdirs, GLSL built-in lib,
+# then convenience libs (.a) and finally the device drivers:
+default: depend asm_subdirs glsl_builtin libmesa.a libmesagallium.a \
+ libglapi.a driver_subdirs
@@ -30,12 +29,12 @@ default: depend asm_subdirs libmesa.a libmesagallium.a libglapi.a \
# Helper libraries used by many drivers:
# Make archive of core mesa object files
-libmesa.a: $(MESA_OBJECTS)
- @ $(MKLIB) -o mesa -static $(MESA_OBJECTS)
+libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS)
+ @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS)
# Make archive of subset of core mesa object files for gallium
-libmesagallium.a: $(MESA_GALLIUM_OBJECTS)
- @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS)
+libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS)
+ @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS)
# Make archive of gl* API dispatcher functions only
libglapi.a: $(GLAPI_OBJECTS)
@@ -60,6 +59,12 @@ asm_subdirs:
######################################################################
+# GLSL built-in library
+glsl_builtin:
+ (cd shader/slang/library && $(MAKE)) || exit 1 ;
+
+
+######################################################################
# Dependency generation
depend: $(ALL_SOURCES)
@@ -152,6 +157,7 @@ clean:
-rm -f depend depend.bak libmesa.a libglapi.a
-rm -f drivers/*/*.o
-rm -f *.pc
+ -rm -f shader/slang/library/*_gc.h
-@cd drivers/dri && $(MAKE) clean
-@cd drivers/x11 && $(MAKE) clean
-@cd drivers/osmesa && $(MAKE) clean
diff --git a/src/mesa/Makefile.mgw b/src/mesa/Makefile.mgw
index 097c390a83e..e894c6277d1 100644
--- a/src/mesa/Makefile.mgw
+++ b/src/mesa/Makefile.mgw
@@ -218,7 +218,6 @@ clean:
-$(call UNLINK,vbo/*.o)
-$(call UNLINK,shader/*.o)
-$(call UNLINK,shader/slang/*.o)
- -$(call UNLINK,shader/grammar/*.o)
-$(call UNLINK,sparc/*.o)
-$(call UNLINK,ppc/*.o)
-$(call UNLINK,swrast/*.o)
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index ca4a9afce5c..ea5bad2825a 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -38,6 +38,7 @@ if env['platform'] != 'winddk':
'main/clear.c',
'main/clip.c',
'main/colortab.c',
+ 'main/condrender.c',
'main/context.c',
'main/convolve.c',
'main/cpuinfo.c',
@@ -103,6 +104,7 @@ if env['platform'] != 'winddk':
'main/texstate.c',
'main/texstore.c',
'main/varray.c',
+ 'main/version.c',
'main/viewport.c',
'main/vtxfmt.c',
]
@@ -161,6 +163,7 @@ if env['platform'] != 'winddk':
'state_tracker/st_cb_blit.c',
'state_tracker/st_cb_bufferobjects.c',
'state_tracker/st_cb_clear.c',
+ 'state_tracker/st_cb_condrender.c',
'state_tracker/st_cb_flush.c',
'state_tracker/st_cb_drawpixels.c',
'state_tracker/st_cb_fbo.c',
@@ -189,7 +192,6 @@ if env['platform'] != 'winddk':
'shader/arbprogparse.c',
'shader/arbprogram.c',
'shader/atifragshader.c',
- 'shader/grammar/grammar_mesa.c',
'shader/hash_table.c',
'shader/lex.yy.c',
'shader/nvfragparse.c',
@@ -227,7 +229,6 @@ if env['platform'] != 'winddk':
'shader/slang/slang_link.c',
'shader/slang/slang_log.c',
'shader/slang/slang_mem.c',
- 'shader/slang/slang_preprocess.c',
'shader/slang/slang_print.c',
'shader/slang/slang_simplify.c',
'shader/slang/slang_storage.c',
@@ -250,6 +251,7 @@ if env['platform'] != 'winddk':
'main/dispatch.c',
'glapi/glapi.c',
'glapi/glapi_getproc.c',
+ 'glapi/glapi_nop.c',
'glapi/glthread.c',
]
@@ -338,7 +340,9 @@ if env['platform'] != 'winddk':
# Add the dir containing the generated header (somewhere inside the
# build dir) to the include path
env.Append(CPPPATH = [matypes[0].dir])
-
+
+ SConscript('shader/slang/library/SConscript')
+
#
# Libraries
#
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 4ca0e7bcc37..5c5e17820d6 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -124,7 +124,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->UnmapTexture = NULL;
driver->TextureMemCpy = _mesa_memcpy;
driver->IsTextureResident = NULL;
- driver->ActiveTexture = NULL;
driver->UpdateTexturePalette = NULL;
/* imaging */
@@ -265,11 +264,23 @@ _mesa_init_driver_state(GLcontext *ctx)
ctx->Color.BlendDstRGB,
ctx->Color.BlendSrcA, ctx->Color.BlendDstA);
- ctx->Driver.ColorMask(ctx,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP]);
+ if (ctx->Driver.ColorMaskIndexed) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ ctx->Driver.ColorMaskIndexed(ctx, i,
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP]);
+ }
+ }
+ else {
+ ctx->Driver.ColorMask(ctx,
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP]);
+ }
ctx->Driver.CullFace(ctx, ctx->Polygon.CullFaceMode);
ctx->Driver.DepthFunc(ctx, ctx->Depth.Func);
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 28abcc46736..e500359bb78 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -107,11 +107,11 @@ struct save_state
GLboolean AlphaEnabled;
/** META_BLEND */
- GLboolean BlendEnabled;
+ GLbitfield BlendEnabled;
GLboolean ColorLogicOpEnabled;
/** META_COLOR_MASK */
- GLubyte ColorMask[4];
+ GLubyte ColorMask[MAX_DRAW_BUFFERS][4];
/** META_DEPTH_TEST */
struct gl_depthbuffer_attrib Depth;
@@ -335,19 +335,29 @@ _mesa_meta_begin(GLcontext *ctx, GLbitfield state)
if (state & META_BLEND) {
save->BlendEnabled = ctx->Color.BlendEnabled;
- if (ctx->Color.BlendEnabled)
- _mesa_set_enable(ctx, GL_BLEND, GL_FALSE);
+ if (ctx->Color.BlendEnabled) {
+ if (ctx->Extensions.EXT_draw_buffers2) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ _mesa_set_enablei(ctx, GL_BLEND, i, GL_FALSE);
+ }
+ }
+ else {
+ _mesa_set_enable(ctx, GL_BLEND, GL_FALSE);
+ }
+ }
save->ColorLogicOpEnabled = ctx->Color.ColorLogicOpEnabled;
if (ctx->Color.ColorLogicOpEnabled)
_mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, GL_FALSE);
}
if (state & META_COLOR_MASK) {
- COPY_4V(save->ColorMask, ctx->Color.ColorMask);
- if (!ctx->Color.ColorMask[0] ||
- !ctx->Color.ColorMask[1] ||
- !ctx->Color.ColorMask[2] ||
- !ctx->Color.ColorMask[3])
+ memcpy(save->ColorMask, ctx->Color.ColorMask,
+ sizeof(ctx->Color.ColorMask));
+ if (!ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3])
_mesa_ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
}
@@ -566,16 +576,38 @@ _mesa_meta_end(GLcontext *ctx)
}
if (state & META_BLEND) {
- if (ctx->Color.BlendEnabled != save->BlendEnabled)
- _mesa_set_enable(ctx, GL_BLEND, save->BlendEnabled);
+ if (ctx->Color.BlendEnabled != save->BlendEnabled) {
+ if (ctx->Extensions.EXT_draw_buffers2) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ _mesa_set_enablei(ctx, GL_BLEND, i, (save->BlendEnabled >> i) & 1);
+ }
+ }
+ else {
+ _mesa_set_enable(ctx, GL_BLEND, (save->BlendEnabled & 1));
+ }
+ }
if (ctx->Color.ColorLogicOpEnabled != save->ColorLogicOpEnabled)
_mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, save->ColorLogicOpEnabled);
}
if (state & META_COLOR_MASK) {
- if (!TEST_EQ_4V(ctx->Color.ColorMask, save->ColorMask))
- _mesa_ColorMask(save->ColorMask[0], save->ColorMask[1],
- save->ColorMask[2], save->ColorMask[3]);
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ if (!TEST_EQ_4V(ctx->Color.ColorMask[i], save->ColorMask[i])) {
+ if (i == 0) {
+ _mesa_ColorMask(save->ColorMask[i][0], save->ColorMask[i][1],
+ save->ColorMask[i][2], save->ColorMask[i][3]);
+ }
+ else {
+ _mesa_ColorMaskIndexed(i,
+ save->ColorMask[i][0],
+ save->ColorMask[i][1],
+ save->ColorMask[i][2],
+ save->ColorMask[i][3]);
+ }
+ }
+ }
}
if (state & META_DEPTH_TEST) {
diff --git a/src/mesa/drivers/directfb/idirectfbgl_mesa.c b/src/mesa/drivers/directfb/idirectfbgl_mesa.c
index 93593403c13..62a3269d171 100644
--- a/src/mesa/drivers/directfb/idirectfbgl_mesa.c
+++ b/src/mesa/drivers/directfb/idirectfbgl_mesa.c
@@ -407,10 +407,10 @@ dfbClear( GLcontext *ctx, GLbitfield mask )
#define BUFFER_BIT_MASK (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT | \
BUFFER_BIT_BACK_LEFT | BUFFER_BIT_BACK_RIGHT )
if (mask & BUFFER_BIT_MASK &&
- ctx->Color.ColorMask[0] &&
- ctx->Color.ColorMask[1] &&
- ctx->Color.ColorMask[2] &&
- ctx->Color.ColorMask[3])
+ ctx->Color.ColorMask[0][0] &&
+ ctx->Color.ColorMask[0][1] &&
+ ctx->Color.ColorMask[0][2] &&
+ ctx->Color.ColorMask[0][3])
{
DFBRegion clip;
GLubyte a, r, g, b;
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 547f18a009e..3649c296662 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -97,7 +97,7 @@ driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 )
*
* \internal
* This function calls __DriverAPIRec::UnbindContext, and then decrements
- * __DRIdrawablePrivateRec::refcount which must be non-zero for a successful
+ * __DRIdrawableRec::refcount which must be non-zero for a successful
* return.
*
* While casting the opaque private pointers associated with the parameters
@@ -167,7 +167,7 @@ static int driBindContext(__DRIcontext *pcp,
__DRIdrawable *pdp,
__DRIdrawable *prp)
{
- __DRIscreenPrivate *psp = NULL;
+ __DRIscreen *psp = NULL;
/* Bind the drawable to the context */
@@ -220,7 +220,7 @@ static int driBindContext(__DRIcontext *pcp,
*
* \param pdp pointer to the private drawable information to update.
*
- * This function basically updates the __DRIdrawablePrivate struct's
+ * This function basically updates the __DRIdrawable struct's
* cliprect information by calling \c __DRIinterfaceMethods::getDrawableInfo.
* This is usually called by the DRI_VALIDATE_DRAWABLE_INFO macro which
* compares the __DRIdrwablePrivate pStamp and lastStamp values. If
@@ -228,10 +228,10 @@ static int driBindContext(__DRIcontext *pcp,
* info.
*/
void
-__driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
+__driUtilUpdateDrawableInfo(__DRIdrawable *pdp)
{
- __DRIscreenPrivate *psp = pdp->driScreenPriv;
- __DRIcontextPrivate *pcp = pdp->driContextPriv;
+ __DRIscreen *psp = pdp->driScreenPriv;
+ __DRIcontext *pcp = pdp->driContextPriv;
if (!pcp
|| ((pdp != pcp->driDrawablePriv) && (pdp != pcp->driReadablePriv))) {
@@ -309,7 +309,7 @@ static void driReportDamage(__DRIdrawable *pdp,
* \param drawablePrivate opaque pointer to the per-drawable private info.
*
* \internal
- * This function calls __DRIdrawablePrivate::swapBuffers.
+ * This function calls __DRIdrawable::swapBuffers.
*
* Is called directly from glXSwapBuffers().
*/
@@ -454,6 +454,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config,
pdp->driScreenPriv = psp;
pdp->driContextPriv = &psp->dummyContextPriv;
+ pdp->validBuffers = GL_FALSE;
if (!(*psp->DriverAPI.CreateBuffer)(psp, pdp, &config->modes,
renderType == GLX_PIXMAP_BIT)) {
@@ -497,7 +498,7 @@ static void dri_get_drawable(__DRIdrawable *pdp)
static void dri_put_drawable(__DRIdrawable *pdp)
{
- __DRIscreenPrivate *psp;
+ __DRIscreen *psp;
if (pdp) {
pdp->refcount--;
@@ -560,7 +561,7 @@ driDestroyContext(__DRIcontext *pcp)
* success, or \c NULL on failure.
*
* \internal
- * This function allocates and fills a __DRIcontextPrivateRec structure. It
+ * This function allocates and fills a __DRIcontextRec structure. It
* performs some device independent initialization and passes all the
* relevent information to __DriverAPIRec::CreateContext to create the
* context.
@@ -841,7 +842,7 @@ const __DRIlegacyExtension driLegacyExtension = {
driCreateNewContext,
};
-/** Legacy DRI interface */
+/** DRI2 interface */
const __DRIdri2Extension driDRI2Extension = {
{ __DRI_DRI2, __DRI_DRI2_VERSION },
dri2CreateNewScreen,
@@ -849,14 +850,6 @@ const __DRIdri2Extension driDRI2Extension = {
dri2CreateNewContext,
};
-/* This is the table of extensions that the loader will dlsym() for. */
-PUBLIC const __DRIextension *__driDriverExtensions[] = {
- &driCoreExtension.base,
- &driLegacyExtension.base,
- &driDRI2Extension.base,
- NULL
-};
-
static int
driFrameTracking(__DRIdrawable *drawable, GLboolean enable)
{
@@ -871,7 +864,7 @@ driQueryFrameTracking(__DRIdrawable *dpriv,
__DRIswapInfo sInfo;
int status;
int64_t ust;
- __DRIscreenPrivate *psp = dpriv->driScreenPriv;
+ __DRIscreen *psp = dpriv->driScreenPriv;
status = dpriv->driScreenPriv->DriverAPI.GetSwapInfo( dpriv, & sInfo );
if ( status == 0 ) {
@@ -921,14 +914,14 @@ const __DRIframeTrackingExtension driFrameTrackingExtension = {
* be possible to cache the sync rate?
*/
float
-driCalculateSwapUsage( __DRIdrawablePrivate *dPriv, int64_t last_swap_ust,
+driCalculateSwapUsage( __DRIdrawable *dPriv, int64_t last_swap_ust,
int64_t current_ust )
{
int32_t n;
int32_t d;
int interval;
float usage = 1.0;
- __DRIscreenPrivate *psp = dPriv->driScreenPriv;
+ __DRIscreen *psp = dPriv->driScreenPriv;
if ( (*psp->systemTime->getMSCRate)(dPriv, &n, &d, dPriv->loaderPrivate) ) {
interval = (dPriv->swap_interval != 0) ? dPriv->swap_interval : 1;
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index c95a5c8299a..95df702f1ae 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -59,16 +59,12 @@
typedef struct __DRIswapInfoRec __DRIswapInfo;
-/* Typedefs to avoid rewriting the world. */
-typedef struct __DRIscreenRec __DRIscreenPrivate;
-typedef struct __DRIdrawableRec __DRIdrawablePrivate;
-typedef struct __DRIcontextRec __DRIcontextPrivate;
-
/**
* Extensions.
*/
extern const __DRIlegacyExtension driLegacyExtension;
extern const __DRIcoreExtension driCoreExtension;
+extern const __DRIdri2Extension driDRI2Extension;
extern const __DRIextension driReadDrawableExtension;
extern const __DRIcopySubBufferExtension driCopySubBufferExtension;
extern const __DRIswapControlExtension driSwapControlExtension;
@@ -380,6 +376,8 @@ struct __DRIdrawableRec {
* GLX_MESA_swap_control.
*/
unsigned int swap_interval;
+
+ GLboolean validBuffers;
};
/**
diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.c b/src/mesa/drivers/dri/common/drirenderbuffer.c
index 4e7e92c82bc..3126ea84760 100644
--- a/src/mesa/drivers/dri/common/drirenderbuffer.c
+++ b/src/mesa/drivers/dri/common/drirenderbuffer.c
@@ -56,7 +56,7 @@ driDeleteRenderbuffer(struct gl_renderbuffer *rb)
driRenderbuffer *
driNewRenderbuffer(gl_format format, GLvoid *addr,
GLint cpp, GLint offset, GLint pitch,
- __DRIdrawablePrivate *dPriv)
+ __DRIdrawable *dPriv)
{
driRenderbuffer *drb;
@@ -196,7 +196,7 @@ driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped)
* gl_framebuffer object.
*/
void
-driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv)
+driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawable *dPriv)
{
struct gl_framebuffer *fb = (struct gl_framebuffer *) dPriv->driverPrivate;
if (fb && (dPriv->w != fb->Width || dPriv->h != fb->Height)) {
diff --git a/src/mesa/drivers/dri/common/drirenderbuffer.h b/src/mesa/drivers/dri/common/drirenderbuffer.h
index 3a5cbcdaac1..677511334d3 100644
--- a/src/mesa/drivers/dri/common/drirenderbuffer.h
+++ b/src/mesa/drivers/dri/common/drirenderbuffer.h
@@ -43,10 +43,10 @@ typedef struct {
GLint flippedPitch;
GLvoid *flippedData; /* mmap'd address of buffer memory, if used */
- /* Pointer to corresponding __DRIdrawablePrivate. This is used to compute
+ /* Pointer to corresponding __DRIdrawable. This is used to compute
* the window's position within the framebuffer.
*/
- __DRIdrawablePrivate *dPriv;
+ __DRIdrawable *dPriv;
/* XXX this is for radeon/r200 only. We should really create a new
* r200Renderbuffer class, derived from this class... not a huge deal.
@@ -66,14 +66,14 @@ typedef struct {
extern driRenderbuffer *
driNewRenderbuffer(gl_format format, GLvoid *addr,
GLint cpp, GLint offset, GLint pitch,
- __DRIdrawablePrivate *dPriv);
+ __DRIdrawable *dPriv);
extern void
driFlipRenderbuffers(struct gl_framebuffer *fb, GLboolean flipped);
extern void
-driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawablePrivate *dPriv);
+driUpdateFramebufferSize(GLcontext *ctx, const __DRIdrawable *dPriv);
#endif /* DRIRENDERBUFFER_H */
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index b272eb74eaf..81d026a697c 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -34,7 +34,6 @@
#include "main/mtypes.h"
#include "main/cpuinfo.h"
#include "main/extensions.h"
-#include "glapi/dispatch.h"
#include "utils.h"
diff --git a/src/mesa/drivers/dri/common/vblank.c b/src/mesa/drivers/dri/common/vblank.c
index 12aeaa108f7..49b22a2dc72 100644
--- a/src/mesa/drivers/dri/common/vblank.c
+++ b/src/mesa/drivers/dri/common/vblank.c
@@ -34,12 +34,12 @@
#include "vblank.h"
#include "xmlpool.h"
-static unsigned int msc_to_vblank(__DRIdrawablePrivate * dPriv, int64_t msc)
+static unsigned int msc_to_vblank(__DRIdrawable * dPriv, int64_t msc)
{
return (unsigned int)(msc - dPriv->msc_base + dPriv->vblank_base);
}
-static int64_t vblank_to_msc(__DRIdrawablePrivate * dPriv, unsigned int vblank)
+static int64_t vblank_to_msc(__DRIdrawable * dPriv, unsigned int vblank)
{
return (int64_t)(vblank - dPriv->vblank_base + dPriv->msc_base);
}
@@ -64,8 +64,8 @@ static int64_t vblank_to_msc(__DRIdrawablePrivate * dPriv, unsigned int vblank)
* \return Zero is returned on success. A negative errno value
* is returned on failure.
*/
-int driDrawableGetMSC32( __DRIscreenPrivate * priv,
- __DRIdrawablePrivate * dPriv,
+int driDrawableGetMSC32( __DRIscreen * priv,
+ __DRIdrawable * dPriv,
int64_t * count)
{
drmVBlank vbl;
@@ -122,7 +122,7 @@ int driDrawableGetMSC32( __DRIscreenPrivate * priv,
* \return Zero on success or \c GLX_BAD_CONTEXT on failure.
*/
-int driWaitForMSC32( __DRIdrawablePrivate *priv,
+int driWaitForMSC32( __DRIdrawable *priv,
int64_t target_msc, int64_t divisor, int64_t remainder,
int64_t * msc )
{
@@ -278,7 +278,7 @@ static int do_wait( drmVBlank * vbl, GLuint * vbl_seq, int fd )
*/
static unsigned
-driGetDefaultVBlankInterval( const __DRIdrawablePrivate *priv )
+driGetDefaultVBlankInterval( const __DRIdrawable *priv )
{
if ( (priv->vblFlags & (VBLANK_FLAG_THROTTLE | VBLANK_FLAG_SYNC)) != 0 ) {
return 1;
@@ -295,7 +295,7 @@ driGetDefaultVBlankInterval( const __DRIdrawablePrivate *priv )
* direct rendering context.
*/
-void driDrawableInitVBlank( __DRIdrawablePrivate *priv )
+void driDrawableInitVBlank( __DRIdrawable *priv )
{
if ( priv->swap_interval == (unsigned)-1 &&
!( priv->vblFlags & VBLANK_FLAG_NO_IRQ ) ) {
@@ -320,7 +320,7 @@ void driDrawableInitVBlank( __DRIdrawablePrivate *priv )
*/
unsigned
-driGetVBlankInterval( const __DRIdrawablePrivate *priv )
+driGetVBlankInterval( const __DRIdrawable *priv )
{
if ( (priv->vblFlags & VBLANK_FLAG_INTERVAL) != 0 ) {
/* this must have been initialized when the drawable was first bound
@@ -340,7 +340,7 @@ driGetVBlankInterval( const __DRIdrawablePrivate *priv )
*/
void
-driGetCurrentVBlank( __DRIdrawablePrivate *priv )
+driGetCurrentVBlank( __DRIdrawable *priv )
{
drmVBlank vbl;
@@ -366,7 +366,7 @@ driGetCurrentVBlank( __DRIdrawablePrivate *priv )
*/
int
-driWaitForVBlank( __DRIdrawablePrivate *priv, GLboolean * missed_deadline )
+driWaitForVBlank( __DRIdrawable *priv, GLboolean * missed_deadline )
{
drmVBlank vbl;
unsigned original_seq;
diff --git a/src/mesa/drivers/dri/common/vblank.h b/src/mesa/drivers/dri/common/vblank.h
index 8b2c761a116..29d1ad8003b 100644
--- a/src/mesa/drivers/dri/common/vblank.h
+++ b/src/mesa/drivers/dri/common/vblank.h
@@ -44,17 +44,17 @@
#define VBLANK_FLAG_SECONDARY (1U << 8) /* Wait for secondary vblank.
*/
-extern int driGetMSC32( __DRIscreenPrivate * priv, int64_t * count );
-extern int driDrawableGetMSC32( __DRIscreenPrivate * priv,
- __DRIdrawablePrivate * drawablePrivate,
+extern int driGetMSC32( __DRIscreen * priv, int64_t * count );
+extern int driDrawableGetMSC32( __DRIscreen * priv,
+ __DRIdrawable * drawablePrivate,
int64_t * count);
-extern int driWaitForMSC32( __DRIdrawablePrivate *priv,
+extern int driWaitForMSC32( __DRIdrawable *priv,
int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * msc );
extern GLuint driGetDefaultVBlankFlags( const driOptionCache *optionCache );
-extern void driDrawableInitVBlank ( __DRIdrawablePrivate *priv );
-extern unsigned driGetVBlankInterval( const __DRIdrawablePrivate *priv );
-extern void driGetCurrentVBlank( __DRIdrawablePrivate *priv );
-extern int driWaitForVBlank( __DRIdrawablePrivate *priv,
+extern void driDrawableInitVBlank ( __DRIdrawable *priv );
+extern unsigned driGetVBlankInterval( const __DRIdrawable *priv );
+extern void driGetCurrentVBlank( __DRIdrawable *priv );
+extern int driWaitForVBlank( __DRIdrawable *priv,
GLboolean * missed_deadline );
#undef usleep
diff --git a/src/mesa/drivers/dri/fb/Makefile b/src/mesa/drivers/dri/fb/Makefile
index cf9b3a85563..848e2041e27 100644
--- a/src/mesa/drivers/dri/fb/Makefile
+++ b/src/mesa/drivers/dri/fb/Makefile
@@ -5,9 +5,6 @@ include $(TOP)/configs/current
LIBNAME = fb_dri.so
-ifeq ($(USING_EGL), 1)
-EGL_SOURCES = server/radeon_egl.c
-endif
DRIVER_SOURCES = \
fb_dri.c \
diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c
index fd869b2fe7d..f37241dd69a 100644
--- a/src/mesa/drivers/dri/fb/fb_dri.c
+++ b/src/mesa/drivers/dri/fb/fb_dri.c
@@ -64,9 +64,9 @@ typedef struct {
GLcontext *glCtx; /* Mesa context */
struct {
- __DRIcontextPrivate *context;
- __DRIscreenPrivate *screen;
- __DRIdrawablePrivate *drawable; /* drawable bound to this ctx */
+ __DRIcontext *context;
+ __DRIscreen *screen;
+ __DRIdrawable *drawable; /* drawable bound to this ctx */
} dri;
} fbContext, *fbContextPtr;
@@ -313,14 +313,14 @@ fbSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
/* Initialize the driver specific screen private data.
*/
static GLboolean
-fbInitDriver( __DRIscreenPrivate *sPriv )
+fbInitDriver( __DRIscreen *sPriv )
{
sPriv->private = NULL;
return GL_TRUE;
}
static void
-fbDestroyScreen( __DRIscreenPrivate *sPriv )
+fbDestroyScreen( __DRIscreen *sPriv )
{
}
@@ -329,7 +329,7 @@ fbDestroyScreen( __DRIscreenPrivate *sPriv )
*/
static GLboolean
fbCreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
fbContextPtr fbmesa;
@@ -384,7 +384,7 @@ fbCreateContext( const __GLcontextModes *glVisual,
static void
-fbDestroyContext( __DRIcontextPrivate *driContextPriv )
+fbDestroyContext( __DRIcontext *driContextPriv )
{
GET_CURRENT_CONTEXT(ctx);
fbContextPtr fbmesa = (fbContextPtr) driContextPriv->driverPrivate;
@@ -415,8 +415,8 @@ fbDestroyContext( __DRIcontextPrivate *driContextPriv )
* data.
*/
static GLboolean
-fbCreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+fbCreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -478,7 +478,7 @@ fbCreateBuffer( __DRIscreenPrivate *driScrnPriv,
static void
-fbDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+fbDestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
@@ -488,7 +488,7 @@ fbDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
/* If the backbuffer is on a videocard, this is extraordinarily slow!
*/
static void
-fbSwapBuffers( __DRIdrawablePrivate *dPriv )
+fbSwapBuffers( __DRIdrawable *dPriv )
{
struct gl_framebuffer *mesa_framebuffer = (struct gl_framebuffer *)dPriv->driverPrivate;
struct gl_renderbuffer * front_renderbuffer = mesa_framebuffer->Attachment[BUFFER_FRONT_LEFT].Renderbuffer;
@@ -532,9 +532,9 @@ fbSwapBuffers( __DRIdrawablePrivate *dPriv )
* buffer `b'.
*/
static GLboolean
-fbMakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv )
+fbMakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv )
{
if ( driContextPriv ) {
fbContextPtr newFbCtx =
@@ -556,7 +556,7 @@ fbMakeCurrent( __DRIcontextPrivate *driContextPriv,
/* Force the context `c' to be unbound from its buffer.
*/
static GLboolean
-fbUnbindContext( __DRIcontextPrivate *driContextPriv )
+fbUnbindContext( __DRIcontext *driContextPriv )
{
return GL_TRUE;
}
@@ -657,7 +657,7 @@ struct DRIDriverRec __driDriver = {
};
static __GLcontextModes *
-fbFillInModes( __DRIscreenPrivate *psp,
+fbFillInModes( __DRIscreen *psp,
unsigned pixel_bits, unsigned depth_bits,
unsigned stencil_bits, GLboolean have_back_buffer )
{
@@ -745,7 +745,7 @@ fbFillInModes( __DRIscreenPrivate *psp,
* with the \c __GLcontextModes that the driver can support for windows or
* pbuffers.
*
- * \return A pointer to a \c __DRIscreenPrivate on success, or \c NULL on
+ * \return A pointer to a \c __DRIscreen on success, or \c NULL on
* failure.
*/
PUBLIC
@@ -759,7 +759,7 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc
int internal_api_version,
__GLcontextModes ** driver_modes )
{
- __DRIscreenPrivate *psp;
+ __DRIscreen *psp;
static const __DRIversion ddx_expected = { 4, 0, 0 };
static const __DRIversion dri_expected = { 4, 0, 0 };
static const __DRIversion drm_expected = { 1, 5, 0 };
@@ -785,3 +785,10 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc
return (void *) psp;
}
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/fb/fb_egl.c b/src/mesa/drivers/dri/fb/fb_egl.c
deleted file mode 100644
index eb7adf8224b..00000000000
--- a/src/mesa/drivers/dri/fb/fb_egl.c
+++ /dev/null
@@ -1,881 +0,0 @@
-/*
- * Test egl driver for fb_dri.so
- */
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <linux/fb.h>
-
-#include "utils.h"
-#include "buffers.h"
-#include "main/extensions.h"
-#include "main/framebuffer.h"
-#include "main/renderbuffer.h"
-#include "vbo/vbo.h"
-#include "swrast/swrast.h"
-#include "swrast_setup/swrast_setup.h"
-#include "tnl/tnl.h"
-#include "tnl/tcontext.h"
-#include "tnl/t_pipeline.h"
-#include "drivers/common/driverfuncs.h"
-#include "drirenderbuffer.h"
-
-#include "eglconfig.h"
-#include "eglmain/context.h"
-#include "egldisplay.h"
-#include "egldriver.h"
-#include "eglglobals.h"
-#include "eglmode.h"
-#include "eglscreen.h"
-#include "eglsurface.h"
-
-extern void
-fbSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis);
-
-/**
- * fb driver-specific driver class derived from _EGLDriver
- */
-typedef struct fb_driver
-{
- _EGLDriver Base; /* base class/object */
- GLuint fbStuff;
-} fbDriver;
-
-/**
- * fb display-specific driver class derived from _EGLDisplay
- */
-typedef struct fb_display
-{
- _EGLDisplay Base; /* base class/object */
- void *pFB;
-} fbDisplay;
-
-/**
- * fb driver-specific screen class derived from _EGLScreen
- */
-typedef struct fb_screen
-{
- _EGLScreen Base;
- char fb[NAME_MAX];
-} fbScreen;
-
-
-/**
- * fb driver-specific surface class derived from _EGLSurface
- */
-typedef struct fb_surface
-{
- _EGLSurface Base; /* base class/object */
- struct gl_framebuffer *mesa_framebuffer;
-} fbSurface;
-
-
-/**
- * fb driver-specific context class derived from _EGLContext
- */
-typedef struct fb_context
-{
- _EGLContext Base; /* base class/object */
- GLcontext *glCtx;
- struct {
- __DRIcontextPrivate *context;
- __DRIscreenPrivate *screen;
- __DRIdrawablePrivate *drawable; /* drawable bound to this ctx */
- } dri;
-} fbContext, *fbContextPtr;
-
-#define FB_CONTEXT(ctx) ((fbContextPtr)(ctx->DriverCtx))
-
-
-static EGLBoolean
-fbFillInConfigs(_EGLDisplay *disp, unsigned pixel_bits, unsigned depth_bits,
- unsigned stencil_bits, GLboolean have_back_buffer) {
- _EGLConfig *configs;
- _EGLConfig *c;
- unsigned int i, num_configs;
- unsigned int depth_buffer_factor;
- unsigned int back_buffer_factor;
- GLenum fb_format;
- GLenum fb_type;
-
- /* Right now GLX_SWAP_COPY_OML isn't supported, but it would be easy
- * enough to add support. Basically, if a context is created with an
- * fbconfig where the swap method is GLX_SWAP_COPY_OML, pageflipping
- * will never be used.
- */
- static const GLenum back_buffer_modes[] = {
- GLX_NONE, GLX_SWAP_UNDEFINED_OML /*, GLX_SWAP_COPY_OML */
- };
-
- uint8_t depth_bits_array[2];
- uint8_t stencil_bits_array[2];
-
- depth_bits_array[0] = 0;
- depth_bits_array[1] = depth_bits;
-
- /* Just like with the accumulation buffer, always provide some modes
- * with a stencil buffer. It will be a sw fallback, but some apps won't
- * care about that.
- */
- stencil_bits_array[0] = 0;
- stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
-
- depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
- back_buffer_factor = (have_back_buffer) ? 2 : 1;
-
- num_configs = depth_buffer_factor * back_buffer_factor * 2;
-
- if (pixel_bits == 16) {
- fb_format = GL_RGB;
- fb_type = GL_UNSIGNED_SHORT_5_6_5;
- } else {
- fb_format = GL_RGBA;
- fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
- }
-
- configs = calloc(sizeof(*configs), num_configs);
- c = configs;
- if (!_eglFillInConfigs(c, fb_format, fb_type,
- depth_bits_array, stencil_bits_array, depth_buffer_factor,
- back_buffer_modes, back_buffer_factor,
- GLX_TRUE_COLOR)) {
- fprintf(stderr, "[%s:%u] Error creating FBConfig!\n",
- __func__, __LINE__);
- return EGL_FALSE;
- }
-
- /* Mark the visual as slow if there are "fake" stencil bits.
- */
- for (i = 0, c = configs; i < num_configs; i++, c++) {
- int stencil = GET_CONFIG_ATTRIB(c, EGL_STENCIL_SIZE);
- if ((stencil != 0) && (stencil != stencil_bits)) {
- SET_CONFIG_ATTRIB(c, EGL_CONFIG_CAVEAT, EGL_SLOW_CONFIG);
- }
- }
-
- for (i = 0, c = configs; i < num_configs; i++, c++)
- _eglAddConfig(disp, c);
-
- free(configs);
-
- return EGL_TRUE;
-}
-
-static EGLBoolean
-fbSetupFramebuffer(fbDisplay *disp, char *fbdev)
-{
- int fd;
- char dev[20];
- struct fb_var_screeninfo varInfo;
- struct fb_fix_screeninfo fixedInfo;
-
- snprintf(dev, sizeof(dev), "/dev/%s", fbdev);
-
- /* open the framebuffer device */
- fd = open(dev, O_RDWR);
- if (fd < 0) {
- fprintf(stderr, "Error opening %s: %s\n", fbdev, strerror(errno));
- return EGL_FALSE;
- }
-
- /* get the original variable screen info */
- if (ioctl(fd, FBIOGET_VSCREENINFO, &varInfo)) {
- fprintf(stderr, "error: ioctl(FBIOGET_VSCREENINFO) failed: %s\n",
- strerror(errno));
- return EGL_FALSE;
- }
-
- /* Turn off hw accels (otherwise mmap of mmio region will be
- * refused)
- */
- if (varInfo.accel_flags) {
- varInfo.accel_flags = 0;
- if (ioctl(fd, FBIOPUT_VSCREENINFO, &varInfo)) {
- fprintf(stderr, "error: ioctl(FBIOPUT_VSCREENINFO) failed: %s\n",
- strerror(errno));
- return EGL_FALSE;
- }
- }
-
- /* Get the fixed screen info */
- if (ioctl(fd, FBIOGET_FSCREENINFO, &fixedInfo)) {
- fprintf(stderr, "error: ioctl(FBIOGET_FSCREENINFO) failed: %s\n",
- strerror(errno));
- return EGL_FALSE;
- }
-
- if (fixedInfo.visual == FB_VISUAL_DIRECTCOLOR) {
- struct fb_cmap cmap;
- unsigned short red[256], green[256], blue[256];
- int rcols = 1 << varInfo.red.length;
- int gcols = 1 << varInfo.green.length;
- int bcols = 1 << varInfo.blue.length;
- int i;
-
- cmap.start = 0;
- cmap.len = gcols;
- cmap.red = red;
- cmap.green = green;
- cmap.blue = blue;
- cmap.transp = NULL;
-
- for (i = 0; i < rcols ; i++)
- red[i] = (65536/(rcols-1)) * i;
-
- for (i = 0; i < gcols ; i++)
- green[i] = (65536/(gcols-1)) * i;
-
- for (i = 0; i < bcols ; i++)
- blue[i] = (65536/(bcols-1)) * i;
-
- if (ioctl(fd, FBIOPUTCMAP, (void *) &cmap) < 0) {
- fprintf(stderr, "ioctl(FBIOPUTCMAP) failed [%d]\n", i);
- exit(1);
- }
- }
-
- /* mmap the framebuffer into our address space */
- if (!disp->pFB)
- disp->pFB = (caddr_t)mmap(0, /* start */
- fixedInfo.smem_len, /* bytes */
- PROT_READ | PROT_WRITE, /* prot */
- MAP_SHARED, /* flags */
- fd, /* fd */
- 0); /* offset */
- if (disp->pFB == (caddr_t)-1) {
- fprintf(stderr, "error: unable to mmap framebuffer: %s\n",
- strerror(errno));
- return EGL_FALSE;
- }
-
- return EGL_TRUE;
-}
-
-const char *sysfs = "/sys/class/graphics";
-
-static EGLBoolean
-fbInitialize(_EGLDriver *drv, EGLDisplay dpy, EGLint *major, EGLint *minor)
-{
- _EGLDisplay *disp = _eglLookupDisplay(dpy);
- fbDisplay *display;
- fbScreen *s;
- _EGLScreen *scrn;
- char c;
- unsigned int x, y, r;
- DIR *dir;
- FILE *file;
- struct dirent *dirent;
- char path[NAME_MAX];
-
- /* Switch display structure to one with our private fields */
- display = calloc(1, sizeof(*display));
- display->Base = *disp;
- _eglHashInsert(_eglGlobal.Displays, disp->Handle, display);
- free(disp);
-
- *major = 1;
- *minor = 0;
-
- dir = opendir(sysfs);
- if (!dir) {
- printf("EGL - %s framebuffer device not found.", sysfs);
- return EGL_FALSE;
- }
-
- while ((dirent = readdir(dir))) { /* assignment! */
-
- if (dirent->d_name[0] != 'f')
- continue;
- if (dirent->d_name[1] != 'b')
- continue;
-
- if (fbSetupFramebuffer(display, dirent->d_name) == EGL_FALSE)
- continue;
-
- /* Create a screen */
- s = (fbScreen *) calloc(1, sizeof(fbScreen));
- if (!s)
- return EGL_FALSE;
-
- strncpy(s->fb, dirent->d_name, NAME_MAX);
- scrn = &s->Base;
- _eglInitScreen(scrn);
- _eglAddScreen(&display->Base, scrn);
-
- snprintf(path, sizeof(path), "%s/%s/modes", sysfs, s->fb);
- file = fopen(path, "r");
- while (fgets(path, sizeof(path), file)) {
- sscanf(path, "%c:%ux%u-%u", &c, &x, &y, &r);
- _eglAddMode(scrn, x, y, r * 1000, path);
- }
- fclose(file);
-
- fbFillInConfigs(&display->Base, 32, 24, 8, 1);
-
- }
- closedir(dir);
-
- drv->Initialized = EGL_TRUE;
- return EGL_TRUE;
-}
-
-
-static fbDisplay *
-Lookup_fbDisplay(EGLDisplay dpy)
-{
- _EGLDisplay *d = _eglLookupDisplay(dpy);
- return (fbDisplay *) d;
-}
-
-
-static fbScreen *
-Lookup_fbScreen(EGLDisplay dpy, EGLScreenMESA screen)
-{
- _EGLScreen *s = _eglLookupScreen(dpy, screen);
- return (fbScreen *) s;
-}
-
-
-static fbContext *
-Lookup_fbContext(EGLContext ctx)
-{
- _EGLContext *c = _eglLookupContext(ctx);
- return (fbContext *) c;
-}
-
-
-static fbSurface *
-Lookup_fbSurface(EGLSurface surf)
-{
- _EGLSurface *s = _eglLookupSurface(surf);
- return (fbSurface *) s;
-}
-
-
-static EGLBoolean
-fbTerminate(_EGLDriver *drv, EGLDisplay dpy)
-{
- fbDisplay *display = Lookup_fbDisplay(dpy);
- _eglCleanupDisplay(&display->Base);
- free(display);
- free(drv);
- return EGL_TRUE;
-}
-
-
-static const GLubyte *
-get_string(GLcontext *ctx, GLenum pname)
-{
- (void) ctx;
- switch (pname) {
- case GL_RENDERER:
- return (const GLubyte *) "Mesa dumb framebuffer";
- default:
- return NULL;
- }
-}
-
-
-static void
-update_state( GLcontext *ctx, GLuint new_state )
-{
- /* not much to do here - pass it on */
- _swrast_InvalidateState( ctx, new_state );
- _swsetup_InvalidateState( ctx, new_state );
- _vbo_InvalidateState( ctx, new_state );
- _tnl_InvalidateState( ctx, new_state );
-}
-
-
-/**
- * Called by ctx->Driver.GetBufferSize from in core Mesa to query the
- * current framebuffer size.
- */
-static void
-get_buffer_size( GLframebuffer *buffer, GLuint *width, GLuint *height )
-{
- *width = buffer->Width;
- *height = buffer->Height;
-}
-
-
-static void
-updateFramebufferSize(GLcontext *ctx)
-{
- fbContextPtr fbmesa = FB_CONTEXT(ctx);
- struct gl_framebuffer *fb = ctx->WinSysDrawBuffer;
- if (fbmesa->dri.drawable->w != fb->Width ||
- fbmesa->dri.drawable->h != fb->Height) {
- driUpdateFramebufferSize(ctx, fbmesa->dri.drawable);
- }
-}
-
-static void
-viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
-{
- /* XXX this should be called after we acquire the DRI lock, not here */
- updateFramebufferSize(ctx);
-}
-
-
-static void
-init_core_functions( struct dd_function_table *functions )
-{
- functions->GetString = get_string;
- functions->UpdateState = update_state;
- functions->GetBufferSize = get_buffer_size;
- functions->Viewport = viewport;
-
- functions->Clear = _swrast_Clear; /* could accelerate with blits */
-}
-
-
-static EGLContext
-fbCreateContext(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint *attrib_list)
-{
- GLcontext *ctx;
- _EGLConfig *conf;
- fbContext *c;
- _EGLDisplay *disp = _eglLookupDisplay(dpy);
- struct dd_function_table functions;
- GLvisual vis;
- int i;
-
- conf = _eglLookupConfig(drv, dpy, config);
- if (!conf) {
- _eglError(EGL_BAD_CONFIG, "eglCreateContext");
- return EGL_NO_CONTEXT;
- }
-
- for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) {
- switch (attrib_list[i]) {
- /* no attribs defined for now */
- default:
- _eglError(EGL_BAD_ATTRIBUTE, "eglCreateContext");
- return EGL_NO_CONTEXT;
- }
- }
-
- c = (fbContext *) calloc(1, sizeof(fbContext));
- if (!c)
- return EGL_NO_CONTEXT;
-
- _eglInitContext(&c->Base);
- c->Base.Display = disp;
- c->Base.Config = conf;
- c->Base.DrawSurface = EGL_NO_SURFACE;
- c->Base.ReadSurface = EGL_NO_SURFACE;
-
- /* link to display */
- _eglLinkContext(&c->Base, disp);
- assert(c->Base.Handle);
-
- /* Init default driver functions then plug in our FBdev-specific functions
- */
- _mesa_init_driver_functions(&functions);
- init_core_functions(&functions);
-
- _eglConfigToContextModesRec(conf, &vis);
-
- ctx = c->glCtx = _mesa_create_context(&vis, NULL, &functions, (void *)c);
- if (!c->glCtx) {
- _mesa_free(c);
- return GL_FALSE;
- }
-
- /* Create module contexts */
- _swrast_CreateContext( ctx );
- _vbo_CreateContext( ctx );
- _tnl_CreateContext( ctx );
- _swsetup_CreateContext( ctx );
- _swsetup_Wakeup( ctx );
-
-
- /* use default TCL pipeline */
- {
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- tnl->Driver.RunPipeline = _tnl_run_pipeline;
- }
-
- _mesa_enable_sw_extensions(ctx);
-
- return c->Base.Handle;
-}
-
-
-static EGLSurface
-fbCreateWindowSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint *attrib_list)
-{
- int i;
- for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) {
- switch (attrib_list[i]) {
- /* no attribs at this time */
- default:
- _eglError(EGL_BAD_ATTRIBUTE, "eglCreateWindowSurface");
- return EGL_NO_SURFACE;
- }
- }
- printf("eglCreateWindowSurface()\n");
- /* XXX unfinished */
-
- return EGL_NO_SURFACE;
-}
-
-
-static EGLSurface
-fbCreatePixmapSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint *attrib_list)
-{
- _EGLConfig *conf;
- EGLint i;
-
- conf = _eglLookupConfig(drv, dpy, config);
- if (!conf) {
- _eglError(EGL_BAD_CONFIG, "eglCreatePixmapSurface");
- return EGL_NO_SURFACE;
- }
-
- for (i = 0; attrib_list && attrib_list[i] != EGL_NONE; i++) {
- switch (attrib_list[i]) {
- /* no attribs at this time */
- default:
- _eglError(EGL_BAD_ATTRIBUTE, "eglCreatePixmapSurface");
- return EGL_NO_SURFACE;
- }
- }
-
- if (conf->Attrib[EGL_SURFACE_TYPE - FIRST_ATTRIB] == 0) {
- _eglError(EGL_BAD_MATCH, "eglCreatePixmapSurface");
- return EGL_NO_SURFACE;
- }
-
- printf("eglCreatePixmapSurface()\n");
- return EGL_NO_SURFACE;
-}
-
-
-static EGLSurface
-fbCreatePbufferSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
-{
- fbSurface *surf;
-
- surf = (fbSurface *) calloc(1, sizeof(fbSurface));
- if (!surf) {
- return EGL_NO_SURFACE;
- }
-
- if (_eglInitPbufferSurface(&surf->Base, drv, dpy, config, attrib_list) == EGL_NO_SURFACE) {
- free(surf);
- return EGL_NO_SURFACE;
- }
-
- /* create software-based pbuffer */
- {
- GLcontext *ctx = NULL; /* this _should_ be OK */
- GLvisual vis;
- _EGLConfig *conf = _eglLookupConfig(drv, dpy, config);
- assert(conf); /* bad config should be caught earlier */
- _eglConfigToContextModesRec(conf, &vis);
-
- surf->mesa_framebuffer = _mesa_create_framebuffer(&vis);
- _mesa_add_soft_renderbuffers(surf->mesa_framebuffer,
- GL_TRUE, /* color bufs */
- vis.haveDepthBuffer,
- vis.haveStencilBuffer,
- vis.haveAccumBuffer,
- GL_FALSE, /* alpha */
- GL_FALSE /* aux */ );
-
- /* set pbuffer/framebuffer size */
- _mesa_resize_framebuffer(ctx, surf->mesa_framebuffer,
- surf->Base.Width, surf->Base.Height);
- }
-
- return surf->Base.Handle;
-}
-
-
-static EGLBoolean
-fbDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
-{
- fbSurface *fs = Lookup_fbSurface(surface);
- _eglUnlinkSurface(&fs->Base);
- if (!_eglIsSurfaceBound(&fs->Base))
- free(fs);
- return EGL_TRUE;
-}
-
-
-static EGLBoolean
-fbDestroyContext(_EGLDriver *drv, EGLDisplay dpy, EGLContext context)
-{
- fbContext *fc = Lookup_fbContext(context);
- _eglUnlinkContext(&fc->Base);
- if (!_eglIsContextBound(&fc->Base))
- free(fc);
- return EGL_TRUE;
-}
-
-
-static EGLBoolean
-fbMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext context)
-{
- fbSurface *readSurf = Lookup_fbSurface(read);
- fbSurface *drawSurf = Lookup_fbSurface(draw);
- fbContext *ctx = Lookup_fbContext(context);
- EGLBoolean b;
-
- b = _eglMakeCurrent(drv, dpy, draw, read, context);
- if (!b)
- return EGL_FALSE;
-
- if (ctx) {
- _mesa_make_current( ctx->glCtx,
- drawSurf->mesa_framebuffer,
- readSurf->mesa_framebuffer);
- } else
- _mesa_make_current( NULL, NULL, NULL );
-
- return EGL_TRUE;
-}
-
-
-/**
- * Create a drawing surface which can be directly displayed on a screen.
- */
-static EGLSurface
-fbCreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig cfg,
- const EGLint *attrib_list)
-{
- _EGLConfig *config = _eglLookupConfig(drv, dpy, cfg);
- fbDisplay *display = Lookup_fbDisplay(dpy);
- fbSurface *surface;
- EGLSurface surf;
- GLvisual vis;
- GLcontext *ctx = NULL; /* this should be OK */
- int origin, bytesPerPixel;
- int width, height, stride;
-
- surface = (fbSurface *) malloc(sizeof(*surface));
- if (!surface) {
- return EGL_NO_SURFACE;
- }
-
- /* init base class, error check, etc. */
- surf = _eglInitScreenSurface(&surface->Base, drv, dpy, cfg, attrib_list);
- if (surf == EGL_NO_SURFACE) {
- free(surface);
- return EGL_NO_SURFACE;
- }
-
- /* convert EGLConfig to GLvisual */
- _eglConfigToContextModesRec(config, &vis);
-
- /* create Mesa framebuffer */
- surface->mesa_framebuffer = _mesa_create_framebuffer(&vis);
- if (!surface->mesa_framebuffer) {
- free(surface);
- _eglUnlinkSurface(&surface->Base);
- return EGL_NO_SURFACE;
- }
-
- width = surface->Base.Width;
- height = surface->Base.Height;
- bytesPerPixel = vis.rgbBits / 8;
- stride = width * bytesPerPixel;
- origin = 0;
-
- /* front color renderbuffer */
- {
- driRenderbuffer *drb = driNewRenderbuffer(MESA_FORMAT_ARGB8888, display->pFB,
- bytesPerPixel,
- origin, stride, NULL);
- fbSetSpanFunctions(drb, &vis);
- _mesa_add_renderbuffer(surface->mesa_framebuffer,
- BUFFER_FRONT_LEFT, &drb->Base);
- }
-
- /* back color renderbuffer */
- if (vis.doubleBufferMode) {
- GLubyte *backBuf = _mesa_malloc(stride * height);
- driRenderbuffer *drb = driNewRenderbuffer(MESA_FORMAT_ARGB8888, backBuf,
- bytesPerPixel,
- origin, stride, NULL);
- fbSetSpanFunctions(drb, &vis);
- _mesa_add_renderbuffer(surface->mesa_framebuffer,
- BUFFER_BACK_LEFT, &drb->Base);
- }
-
- /* other renderbuffers- software based */
- _mesa_add_soft_renderbuffers(surface->mesa_framebuffer,
- GL_FALSE, /* color */
- vis.haveDepthBuffer,
- vis.haveStencilBuffer,
- vis.haveAccumBuffer,
- GL_FALSE, /* alpha */
- GL_FALSE /* aux */);
-
- _mesa_resize_framebuffer(ctx, surface->mesa_framebuffer, width, height);
-
- return surf;
-}
-
-
-/**
- * Show the given surface on the named screen.
- * If surface is EGL_NO_SURFACE, disable the screen's output.
- */
-static EGLBoolean
-fbShowSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen,
- EGLSurface surface, EGLModeMESA m)
-{
- fbDisplay *display = Lookup_fbDisplay(dpy);
- fbScreen *scrn = Lookup_fbScreen(dpy, screen);
- fbSurface *surf = Lookup_fbSurface(surface);
- FILE *file;
- char buffer[NAME_MAX];
- _EGLMode *mode = _eglLookupMode(dpy, m);
- int bits;
-
- if (!_eglShowSurfaceMESA(drv, dpy, screen, surface, m))
- return EGL_FALSE;
-
- snprintf(buffer, sizeof(buffer), "%s/%s/blank", sysfs, scrn->fb);
-
- file = fopen(buffer, "r+");
- if (!file) {
-err:
- printf("chown all fb sysfs attrib to allow write - %s\n", buffer);
- return EGL_FALSE;
- }
- snprintf(buffer, sizeof(buffer), "%d", (m == EGL_NO_MODE_MESA ? VESA_POWERDOWN : VESA_VSYNC_SUSPEND));
- fputs(buffer, file);
- fclose(file);
-
- if (m == EGL_NO_MODE_MESA)
- return EGL_TRUE;
-
- snprintf(buffer, sizeof(buffer), "%s/%s/mode", sysfs, scrn->fb);
-
- file = fopen(buffer, "r+");
- if (!file)
- goto err;
- fputs(mode->Name, file);
- fclose(file);
-
- snprintf(buffer, sizeof(buffer), "%s/%s/bits_per_pixel", sysfs, scrn->fb);
-
- file = fopen(buffer, "r+");
- if (!file)
- goto err;
- bits = GET_CONFIG_ATTRIB(surf->Base.Config, EGL_BUFFER_SIZE);
- snprintf(buffer, sizeof(buffer), "%d", bits);
- fputs(buffer, file);
- fclose(file);
-
- fbSetupFramebuffer(display, scrn->fb);
-
- snprintf(buffer, sizeof(buffer), "%s/%s/blank", sysfs, scrn->fb);
-
- file = fopen(buffer, "r+");
- if (!file)
- goto err;
-
- snprintf(buffer, sizeof(buffer), "%d", VESA_NO_BLANKING);
- fputs(buffer, file);
- fclose(file);
-
- return EGL_TRUE;
-}
-
-
-/* If the backbuffer is on a videocard, this is extraordinarily slow!
- */
-static EGLBoolean
-fbSwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw)
-{
- fbContext *context = (fbContext *)_eglGetCurrentContext();
- fbSurface *fs = Lookup_fbSurface(draw);
- struct gl_renderbuffer * front_renderbuffer = fs->mesa_framebuffer->Attachment[BUFFER_FRONT_LEFT].Renderbuffer;
- void *frontBuffer = front_renderbuffer->Data;
- int currentPitch = ((driRenderbuffer *)front_renderbuffer)->pitch;
- void *backBuffer = fs->mesa_framebuffer->Attachment[BUFFER_BACK_LEFT].Renderbuffer->Data;
-
- if (!_eglSwapBuffers(drv, dpy, draw))
- return EGL_FALSE;
-
- if (context) {
- GLcontext *ctx = context->glCtx;
-
- if (ctx->Visual.doubleBufferMode) {
- int i;
- int offset = 0;
- char *tmp = _mesa_malloc(currentPitch);
-
- _mesa_notifySwapBuffers( ctx ); /* flush pending rendering comands */
-
- ASSERT(frontBuffer);
- ASSERT(backBuffer);
-
- for (i = 0; i < fs->Base.Height; i++) {
- _mesa_memcpy(tmp, (char *) backBuffer + offset,
- currentPitch);
- _mesa_memcpy((char *) frontBuffer + offset, tmp,
- currentPitch);
- offset += currentPitch;
- }
-
- _mesa_free(tmp);
- }
- }
- else {
- /* XXX this shouldn't be an error but we can't handle it for now */
- _mesa_problem(NULL, "fbSwapBuffers: drawable has no context!\n");
- return EGL_FALSE;
- }
- return EGL_TRUE;
-}
-
-
-/**
- * The bootstrap function. Return a new fbDriver object and
- * plug in API functions.
- */
-_EGLDriver *
-_eglMain(_EGLDisplay *dpy)
-{
- fbDriver *fb;
-
- fb = (fbDriver *) calloc(1, sizeof(fbDriver));
- if (!fb) {
- return NULL;
- }
-
- /* First fill in the dispatch table with defaults */
- _eglInitDriverFallbacks(&fb->Base);
-
- /* then plug in our fb-specific functions */
- fb->Base.Initialize = fbInitialize;
- fb->Base.Terminate = fbTerminate;
- fb->Base.CreateContext = fbCreateContext;
- fb->Base.MakeCurrent = fbMakeCurrent;
- fb->Base.CreateWindowSurface = fbCreateWindowSurface;
- fb->Base.CreatePixmapSurface = fbCreatePixmapSurface;
- fb->Base.CreatePbufferSurface = fbCreatePbufferSurface;
- fb->Base.DestroySurface = fbDestroySurface;
- fb->Base.DestroyContext = fbDestroyContext;
- fb->Base.CreateScreenSurfaceMESA = fbCreateScreenSurfaceMESA;
- fb->Base.ShowSurfaceMESA = fbShowSurfaceMESA;
- fb->Base.SwapBuffers = fbSwapBuffers;
-
- /* enable supported extensions */
- fb->Base.MESA_screen_surface = EGL_TRUE;
- fb->Base.MESA_copy_context = EGL_TRUE;
-
- return &fb->Base;
-}
diff --git a/src/mesa/drivers/dri/ffb/ffb_bitmap.c b/src/mesa/drivers/dri/ffb/ffb_bitmap.c
index 1240f1c9c79..b71a552c9dc 100644
--- a/src/mesa/drivers/dri/ffb/ffb_bitmap.c
+++ b/src/mesa/drivers/dri/ffb/ffb_bitmap.c
@@ -45,7 +45,7 @@ ffb_bitmap(GLcontext *ctx, GLint px, GLint py,
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
ffb_fbcPtr ffb = fmesa->regs;
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
unsigned int ppc, pixel;
GLint row, col, row_stride;
const GLubyte *src;
diff --git a/src/mesa/drivers/dri/ffb/ffb_clear.c b/src/mesa/drivers/dri/ffb/ffb_clear.c
index 6239a4e01ae..aa3fa0a86c5 100644
--- a/src/mesa/drivers/dri/ffb/ffb_clear.c
+++ b/src/mesa/drivers/dri/ffb/ffb_clear.c
@@ -120,7 +120,7 @@ CreatorComputePageFillFixups(struct ff_fixups *fixups,
}
static void
-ffb_do_clear(GLcontext *ctx, __DRIdrawablePrivate *dPriv)
+ffb_do_clear(GLcontext *ctx, __DRIdrawable *dPriv)
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
FFBDRIPtr gDRIPriv = (FFBDRIPtr) fmesa->driScreen->pDevPriv;
@@ -249,7 +249,7 @@ ffb_do_clear(GLcontext *ctx, __DRIdrawablePrivate *dPriv)
void ffbDDClear(GLcontext *ctx, GLbitfield mask)
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
unsigned int stcmask = BUFFER_BIT_STENCIL;
#ifdef CLEAR_TRACE
diff --git a/src/mesa/drivers/dri/ffb/ffb_context.h b/src/mesa/drivers/dri/ffb/ffb_context.h
index 77f87d41c30..4d1d53ff59f 100644
--- a/src/mesa/drivers/dri/ffb/ffb_context.h
+++ b/src/mesa/drivers/dri/ffb/ffb_context.h
@@ -273,8 +273,8 @@ do { if ((STATE_MASK) & ~((FMESA)->state_dirty)) { \
unsigned int setupnewinputs;
unsigned int new_gl_state;
- __DRIdrawablePrivate *driDrawable;
- __DRIscreenPrivate *driScreen;
+ __DRIdrawable *driDrawable;
+ __DRIscreen *driScreen;
ffbScreenPrivate *ffbScreen;
ffb_dri_state_t *ffb_sarea;
} ffbContextRec, *ffbContextPtr;
diff --git a/src/mesa/drivers/dri/ffb/ffb_depth.c b/src/mesa/drivers/dri/ffb/ffb_depth.c
index e82c2416eb5..d19385b776b 100644
--- a/src/mesa/drivers/dri/ffb/ffb_depth.c
+++ b/src/mesa/drivers/dri/ffb/ffb_depth.c
@@ -48,7 +48,7 @@ static void FFBWriteDepthSpan( GLcontext *ctx,
#endif
if (ctx->Depth.Mask) {
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
GLuint *zptr;
GLuint i;
@@ -109,7 +109,7 @@ static void FFBWriteDepthPixels( GLcontext *ctx,
#endif
if (ctx->Depth.Mask) {
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
char *zbase;
GLuint i;
@@ -152,7 +152,7 @@ static void FFBReadDepthSpan( GLcontext *ctx,
{
GLuint *depth = (GLuint *) values;
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
GLuint *zptr;
GLuint i;
@@ -193,7 +193,7 @@ static void FFBReadDepthPixels( GLcontext *ctx,
{
GLuint *depth = (GLuint *) values;
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
char *zbase;
GLuint i;
diff --git a/src/mesa/drivers/dri/ffb/ffb_span.c b/src/mesa/drivers/dri/ffb/ffb_span.c
index c4cb386f48a..61901cccadd 100644
--- a/src/mesa/drivers/dri/ffb/ffb_span.c
+++ b/src/mesa/drivers/dri/ffb/ffb_span.c
@@ -43,7 +43,7 @@
UNLOCK_HARDWARE(fmesa); \
#define LOCAL_VARS \
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable; \
+ __DRIdrawable *dPriv = fmesa->driDrawable; \
GLuint height = dPriv->h; \
GLuint p; \
char *buf; \
diff --git a/src/mesa/drivers/dri/ffb/ffb_state.c b/src/mesa/drivers/dri/ffb/ffb_state.c
index 81341cb36f7..c09d2fef838 100644
--- a/src/mesa/drivers/dri/ffb/ffb_state.c
+++ b/src/mesa/drivers/dri/ffb/ffb_state.c
@@ -379,7 +379,7 @@ ffbDDStencilOpSeparate(GLcontext *ctx, GLenum face, GLenum fail,
static void ffbCalcViewportRegs(GLcontext *ctx)
{
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
GLuint xmin, xmax, ymin, ymax, zmin, zmax;
unsigned int vcmin, vcmax;
@@ -425,7 +425,7 @@ void ffbCalcViewport(GLcontext *ctx)
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
const GLfloat *v = ctx->Viewport._WindowMap.m;
GLfloat *m = fmesa->hw_viewport;
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
m[MAT_SX] = v[MAT_SX];
m[MAT_TX] = v[MAT_TX] + dPriv->x + SUBPIXEL_X;
@@ -757,7 +757,7 @@ static void ffbDDLineStipple(GLcontext *ctx, GLint factor, GLushort pattern)
void ffbXformAreaPattern(ffbContextPtr fmesa, const GLubyte *mask)
{
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
int i, lines, xoff;
lines = 0;
diff --git a/src/mesa/drivers/dri/ffb/ffb_stencil.c b/src/mesa/drivers/dri/ffb/ffb_stencil.c
index 2be5a40a899..10cdfbc616e 100644
--- a/src/mesa/drivers/dri/ffb/ffb_stencil.c
+++ b/src/mesa/drivers/dri/ffb/ffb_stencil.c
@@ -46,7 +46,7 @@ static void FFBWriteStencilSpan( GLcontext *ctx,
#endif
if (ctx->Depth.Mask) {
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
GLuint *zptr;
GLuint i;
@@ -91,7 +91,7 @@ static void FFBWriteStencilPixels( GLcontext *ctx,
#endif
if (ctx->Depth.Mask) {
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
char *zbase;
GLuint i;
@@ -134,7 +134,7 @@ static void FFBReadStencilSpan( GLcontext *ctx,
{
GLubyte *stencil = (GLubyte *) values;
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
GLuint *zptr;
GLuint i;
@@ -174,7 +174,7 @@ static void FFBReadStencilPixels( GLcontext *ctx,
{
GLubyte *stencil = (GLubyte *) values;
ffbContextPtr fmesa = FFB_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
char *zbase;
GLuint i;
diff --git a/src/mesa/drivers/dri/ffb/ffb_tris.c b/src/mesa/drivers/dri/ffb/ffb_tris.c
index e7dd960ba16..8bf5ae498fd 100644
--- a/src/mesa/drivers/dri/ffb/ffb_tris.c
+++ b/src/mesa/drivers/dri/ffb/ffb_tris.c
@@ -351,7 +351,7 @@ static struct {
#define LOCAL_VARS(n) \
ffbContextPtr fmesa = FFB_CONTEXT(ctx); \
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable; \
+ __DRIdrawable *dPriv = fmesa->driDrawable; \
ffb_color color[n] = { { 0 } }; \
(void) color; (void) dPriv;
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/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
index 28f8e53f101..6a846514795 100644
--- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c
+++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c
@@ -60,7 +60,7 @@
#include "drirenderbuffer.h"
static GLboolean
-ffbInitDriver(__DRIscreenPrivate *sPriv)
+ffbInitDriver(__DRIscreen *sPriv)
{
ffbScreenPrivate *ffbScreen;
FFBDRIPtr gDRIPriv = (FFBDRIPtr) sPriv->pDevPriv;
@@ -152,7 +152,7 @@ ffbInitDriver(__DRIscreenPrivate *sPriv)
static void
-ffbDestroyScreen(__DRIscreenPrivate *sPriv)
+ffbDestroyScreen(__DRIscreen *sPriv)
{
ffbScreenPrivate *ffbScreen = sPriv->private;
FFBDRIPtr gDRIPriv = (FFBDRIPtr) sPriv->pDevPriv;
@@ -181,12 +181,12 @@ static const struct tnl_pipeline_stage *ffb_pipeline[] = {
/* Create and initialize the Mesa and driver specific context data */
static GLboolean
ffbCreateContext(const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
ffbContextPtr fmesa;
GLcontext *ctx, *shareCtx;
- __DRIscreenPrivate *sPriv;
+ __DRIscreen *sPriv;
ffbScreenPrivate *ffbScreen;
char *debug;
struct dd_function_table functions;
@@ -304,7 +304,7 @@ ffbCreateContext(const __GLcontextModes *mesaVis,
}
static void
-ffbDestroyContext(__DRIcontextPrivate *driContextPriv)
+ffbDestroyContext(__DRIcontext *driContextPriv)
{
ffbContextPtr fmesa = (ffbContextPtr) driContextPriv->driverPrivate;
@@ -326,8 +326,8 @@ ffbDestroyContext(__DRIcontextPrivate *driContextPriv)
/* Create and initialize the Mesa and driver specific pixmap buffer data */
static GLboolean
-ffbCreateBuffer(__DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+ffbCreateBuffer(__DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -390,7 +390,7 @@ ffbCreateBuffer(__DRIscreenPrivate *driScrnPriv,
static void
-ffbDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+ffbDestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
@@ -399,7 +399,7 @@ ffbDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
#define USE_FAST_SWAP
static void
-ffbSwapBuffers( __DRIdrawablePrivate *dPriv )
+ffbSwapBuffers( __DRIdrawable *dPriv )
{
ffbContextPtr fmesa = (ffbContextPtr) dPriv->driContextPriv->driverPrivate;
unsigned int fbc, wid, wid_reg_val, dac_db_bit;
@@ -530,9 +530,9 @@ static void ffb_init_wid(ffbContextPtr fmesa, unsigned int wid)
/* Force the context `c' to be the current context and associate with it
buffer `b' */
static GLboolean
-ffbMakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv)
+ffbMakeCurrent(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv)
{
if (driContextPriv) {
ffbContextPtr fmesa = (ffbContextPtr) driContextPriv->driverPrivate;
@@ -579,15 +579,15 @@ ffbMakeCurrent(__DRIcontextPrivate *driContextPriv,
/* Force the context `c' to be unbound from its buffer */
static GLboolean
-ffbUnbindContext(__DRIcontextPrivate *driContextPriv)
+ffbUnbindContext(__DRIcontext *driContextPriv)
{
return GL_TRUE;
}
void ffbXMesaUpdateState(ffbContextPtr fmesa)
{
- __DRIdrawablePrivate *dPriv = fmesa->driDrawable;
- __DRIscreenPrivate *sPriv = fmesa->driScreen;
+ __DRIdrawable *dPriv = fmesa->driDrawable;
+ __DRIscreen *sPriv = fmesa->driScreen;
int stamp = dPriv->lastStamp;
DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv);
@@ -605,7 +605,7 @@ void ffbXMesaUpdateState(ffbContextPtr fmesa)
}
static const __DRIconfig **
-ffbFillInModes( __DRIscreenPrivate *psp,
+ffbFillInModes( __DRIscreen *psp,
unsigned pixel_bits, unsigned depth_bits,
unsigned stencil_bits, GLboolean have_back_buffer )
{
@@ -720,3 +720,10 @@ const struct __DriverAPIRec driDriverAPI = {
.WaitForSBC = NULL,
.SwapBuffersMSC = NULL
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.h b/src/mesa/drivers/dri/ffb/ffb_xmesa.h
index 255da4c5f84..2b1740d2219 100644
--- a/src/mesa/drivers/dri/ffb/ffb_xmesa.h
+++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.h
@@ -11,7 +11,7 @@
#include "ffb_fifo.h"
typedef struct {
- __DRIscreenPrivate *sPriv;
+ __DRIscreen *sPriv;
ffb_fbcPtr regs;
ffb_dacPtr dac;
volatile char *sfb8r;
diff --git a/src/mesa/drivers/dri/gamma/gamma_context.c b/src/mesa/drivers/dri/gamma/gamma_context.c
index b0ac299daae..bab5b69a8e4 100644
--- a/src/mesa/drivers/dri/gamma/gamma_context.c
+++ b/src/mesa/drivers/dri/gamma/gamma_context.c
@@ -68,11 +68,11 @@ static const struct tnl_pipeline_stage *gamma_pipeline[] = {
};
GLboolean gammaCreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
GLcontext *ctx, *shareCtx;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
gammaContextPtr gmesa;
gammaScreenPtr gammascrn;
GLINTSAREADRIPtr saPriv=(GLINTSAREADRIPtr)(((char*)sPriv->pSAREA)+
diff --git a/src/mesa/drivers/dri/gamma/gamma_context.h b/src/mesa/drivers/dri/gamma/gamma_context.h
index a32ccb6007b..c386aa3007a 100644
--- a/src/mesa/drivers/dri/gamma/gamma_context.h
+++ b/src/mesa/drivers/dri/gamma/gamma_context.h
@@ -58,10 +58,10 @@ typedef union {
#define MAX_TEXTURE_STACK 2
extern void gammaDDUpdateHWState(GLcontext *ctx);
-extern gammaScreenPtr gammaCreateScreen(__DRIscreenPrivate *sPriv);
-extern void gammaDestroyScreen(__DRIscreenPrivate *sPriv);
+extern gammaScreenPtr gammaCreateScreen(__DRIscreen *sPriv);
+extern void gammaDestroyScreen(__DRIscreen *sPriv);
extern GLboolean gammaCreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate);
#define GAMMA_UPLOAD_ALL 0xffffffff
@@ -230,9 +230,9 @@ typedef void (*gamma_point_func)( gammaContextPtr,
struct gamma_context {
GLcontext *glCtx; /* Mesa context */
- __DRIcontextPrivate *driContext;
- __DRIscreenPrivate *driScreen;
- __DRIdrawablePrivate *driDrawable;
+ __DRIcontext *driContext;
+ __DRIscreen *driScreen;
+ __DRIdrawable *driDrawable;
GLuint new_gl_state;
GLuint new_state;
diff --git a/src/mesa/drivers/dri/gamma/gamma_lock.c b/src/mesa/drivers/dri/gamma/gamma_lock.c
index 8f2d01688c9..cd4acef24da 100644
--- a/src/mesa/drivers/dri/gamma/gamma_lock.c
+++ b/src/mesa/drivers/dri/gamma/gamma_lock.c
@@ -19,8 +19,8 @@ int prevLockLine = 0;
*/
void gammaGetLock( gammaContextPtr gmesa, GLuint flags )
{
- __DRIdrawablePrivate *dPriv = gmesa->driDrawable;
- __DRIscreenPrivate *sPriv = gmesa->driScreen;
+ __DRIdrawable *dPriv = gmesa->driDrawable;
+ __DRIscreen *sPriv = gmesa->driScreen;
drmGetLock( gmesa->driFd, gmesa->hHWContext, flags );
diff --git a/src/mesa/drivers/dri/gamma/gamma_macros.h b/src/mesa/drivers/dri/gamma/gamma_macros.h
index c15483b770c..d962dcdb566 100644
--- a/src/mesa/drivers/dri/gamma/gamma_macros.h
+++ b/src/mesa/drivers/dri/gamma/gamma_macros.h
@@ -245,8 +245,8 @@ do { \
#ifdef DO_VALIDATE
#define VALIDATE_DRAWABLE_INFO_NO_LOCK(gcp) \
do { \
- /*__DRIscreenPrivate *psp = gcp->driScreen;*/ \
- __DRIdrawablePrivate *pdp = gcp->driDrawable; \
+ /*__DRIscreen *psp = gcp->driScreen;*/ \
+ __DRIdrawable *pdp = gcp->driDrawable; \
\
if (*(pdp->pStamp) != pdp->lastStamp) { \
int old_index = pdp->index; \
@@ -301,7 +301,7 @@ do { \
#define VALIDATE_DRAWABLE_INFO(gcp) \
do { \
- __DRIscreenPrivate *psp = gcp->driScreen; \
+ __DRIscreen *psp = gcp->driScreen; \
if (gcp->driDrawable) { \
DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \
VALIDATE_DRAWABLE_INFO_NO_LOCK(gcp); \
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/gamma/gamma_screen.c b/src/mesa/drivers/dri/gamma/gamma_screen.c
index f899ebec96d..f72a4a56969 100644
--- a/src/mesa/drivers/dri/gamma/gamma_screen.c
+++ b/src/mesa/drivers/dri/gamma/gamma_screen.c
@@ -29,7 +29,7 @@
#include "main/imports.h"
-gammaScreenPtr gammaCreateScreen( __DRIscreenPrivate *sPriv )
+gammaScreenPtr gammaCreateScreen( __DRIscreen *sPriv )
{
gammaScreenPtr gammaScreen;
GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)sPriv->pDevPriv;
@@ -129,7 +129,7 @@ gammaScreenPtr gammaCreateScreen( __DRIscreenPrivate *sPriv )
/* Destroy the device specific screen private data struct.
*/
-void gammaDestroyScreen( __DRIscreenPrivate *sPriv )
+void gammaDestroyScreen( __DRIscreen *sPriv )
{
gammaScreenPtr gammaScreen = (gammaScreenPtr)sPriv->private;
diff --git a/src/mesa/drivers/dri/gamma/gamma_screen.h b/src/mesa/drivers/dri/gamma/gamma_screen.h
index 7f0ed6f80eb..c716ea89c29 100644
--- a/src/mesa/drivers/dri/gamma/gamma_screen.h
+++ b/src/mesa/drivers/dri/gamma/gamma_screen.h
@@ -11,7 +11,7 @@ typedef struct {
drmBufMapPtr bufs; /* Map of DMA buffers */
- __DRIscreenPrivate *driScreen; /* Back pointer to DRI screen */
+ __DRIscreen *driScreen; /* Back pointer to DRI screen */
int cpp;
int frontPitch;
diff --git a/src/mesa/drivers/dri/gamma/gamma_span.c b/src/mesa/drivers/dri/gamma/gamma_span.c
index cdaaac3f3ac..3f0b81800c5 100644
--- a/src/mesa/drivers/dri/gamma/gamma_span.c
+++ b/src/mesa/drivers/dri/gamma/gamma_span.c
@@ -10,8 +10,8 @@
#define LOCAL_VARS \
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx); \
gammaScreenPtr gammascrn = gmesa->gammaScreen; \
- __DRIscreenPrivate *sPriv = gmesa->driScreen; \
- __DRIdrawablePrivate *dPriv = gmesa->driDrawable; \
+ __DRIscreen *sPriv = gmesa->driScreen; \
+ __DRIdrawable *dPriv = gmesa->driDrawable; \
GLuint pitch = sPriv->fbWidth * gammascrn->cpp; \
GLuint height = dPriv->h; \
char *buf = (char *)(sPriv->pFB + \
@@ -24,8 +24,8 @@
/* FIXME! Depth/Stencil read/writes don't work ! */
#define LOCAL_DEPTH_VARS \
gammaScreenPtr gammascrn = gmesa->gammaScreen; \
- __DRIdrawablePrivate *dPriv = gmesa->driDrawable; \
- __DRIscreenPrivate *sPriv = gmesa->driScreen; \
+ __DRIdrawable *dPriv = gmesa->driDrawable; \
+ __DRIscreen *sPriv = gmesa->driScreen; \
GLuint pitch = gammascrn->depthPitch; \
GLuint height = dPriv->h; \
char *buf = (char *)(sPriv->pFB + \
diff --git a/src/mesa/drivers/dri/gamma/gamma_state.c b/src/mesa/drivers/dri/gamma/gamma_state.c
index 59272f9bc91..47df37466d7 100644
--- a/src/mesa/drivers/dri/gamma/gamma_state.c
+++ b/src/mesa/drivers/dri/gamma/gamma_state.c
@@ -813,10 +813,10 @@ static void gammaUpdateMasks( GLcontext *ctx )
GLuint mask = gammaPackColor( gmesa->gammaScreen->cpp,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP] );
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP] );
if (gmesa->gammaScreen->cpp == 2) mask |= mask << 16;
@@ -1070,7 +1070,7 @@ static void gammaDDReadBuffer( GLcontext *ctx, GLenum mode )
void gammaUpdateWindow( GLcontext *ctx )
{
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = gmesa->driDrawable;
+ __DRIdrawable *dPriv = gmesa->driDrawable;
GLfloat xoffset = (GLfloat)dPriv->x;
GLfloat yoffset = gmesa->driScreen->fbHeight - (GLfloat)dPriv->y - dPriv->h;
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -1109,7 +1109,7 @@ static void gammaDDDepthRange( GLcontext *ctx, GLclampd nearval,
void gammaUpdateViewportOffset( GLcontext *ctx )
{
gammaContextPtr gmesa = GAMMA_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = gmesa->driDrawable;
+ __DRIdrawable *dPriv = gmesa->driDrawable;
GLfloat xoffset = (GLfloat)dPriv->x;
GLfloat yoffset = gmesa->driScreen->fbHeight - (GLfloat)dPriv->y - dPriv->h;
const GLfloat *v = ctx->Viewport._WindowMap.m;
diff --git a/src/mesa/drivers/dri/gamma/gamma_tex.c b/src/mesa/drivers/dri/gamma/gamma_tex.c
index 0dad250e4d8..694e5eba5bb 100644
--- a/src/mesa/drivers/dri/gamma/gamma_tex.c
+++ b/src/mesa/drivers/dri/gamma/gamma_tex.c
@@ -145,7 +145,7 @@ static void gammaTexParameter( GLcontext *ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- gammaSetTexBorderColor( gmesa, t, tObj->BorderColor );
+ gammaSetTexBorderColor( gmesa, t, tObj->BorderColor.f );
break;
case GL_TEXTURE_BASE_LEVEL:
@@ -349,7 +349,7 @@ static void gammaBindTexture( GLcontext *ctx, GLenum target,
gammaSetTexWrapping( t, tObj->WrapS, tObj->WrapT );
gammaSetTexFilter( gmesa, t, tObj->MinFilter, tObj->MagFilter, bias );
- gammaSetTexBorderColor( gmesa, t, tObj->BorderColor );
+ gammaSetTexBorderColor( gmesa, t, tObj->BorderColor.f );
}
}
diff --git a/src/mesa/drivers/dri/gamma/gamma_xmesa.c b/src/mesa/drivers/dri/gamma/gamma_xmesa.c
index 7b5b53589c6..e49ab5bae35 100644
--- a/src/mesa/drivers/dri/gamma/gamma_xmesa.c
+++ b/src/mesa/drivers/dri/gamma/gamma_xmesa.c
@@ -36,7 +36,7 @@
#include "vbo/vbo.h"
static GLboolean
-gammaInitDriver(__DRIscreenPrivate *sPriv)
+gammaInitDriver(__DRIscreen *sPriv)
{
sPriv->private = (void *) gammaCreateScreen( sPriv );
@@ -49,7 +49,7 @@ gammaInitDriver(__DRIscreenPrivate *sPriv)
}
static void
-gammaDestroyContext(__DRIcontextPrivate *driContextPriv)
+gammaDestroyContext(__DRIcontext *driContextPriv)
{
gammaContextPtr gmesa = (gammaContextPtr)driContextPriv->driverPrivate;
@@ -72,8 +72,8 @@ gammaDestroyContext(__DRIcontextPrivate *driContextPriv)
static GLboolean
-gammaCreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+gammaCreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -94,17 +94,17 @@ gammaCreateBuffer( __DRIscreenPrivate *driScrnPriv,
static void
-gammaDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+gammaDestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static void
-gammaSwapBuffers( __DRIdrawablePrivate *dPriv )
+gammaSwapBuffers( __DRIdrawable *dPriv )
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
gammaContextPtr gmesa;
- __DRIscreenPrivate *driScrnPriv;
+ __DRIscreen *driScrnPriv;
GLcontext *ctx;
gmesa = (gammaContextPtr) dPriv->driContextPriv->driverPrivate;
@@ -127,7 +127,7 @@ gammaSwapBuffers( __DRIdrawablePrivate *dPriv )
int i;
int nRect = dPriv->numClipRects;
drm_clip_rect_t *pRect = dPriv->pClipRects;
- __DRIscreenPrivate *driScrnPriv = gmesa->driScreen;
+ __DRIscreen *driScrnPriv = gmesa->driScreen;
GLINTDRIPtr gDRIPriv = (GLINTDRIPtr)driScrnPriv->pDevPriv;
CHECK_DMA_BUFFER(gmesa, 2);
@@ -193,9 +193,9 @@ gammaSwapBuffers( __DRIdrawablePrivate *dPriv )
}
static GLboolean
-gammaMakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv)
+gammaMakeCurrent(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv)
{
if (driContextPriv) {
GET_CURRENT_CONTEXT(ctx);
@@ -232,7 +232,7 @@ newGammaCtx->new_state |= GAMMA_NEW_WINDOW; /* FIXME */
static GLboolean
-gammaUnbindContext( __DRIcontextPrivate *driContextPriv )
+gammaUnbindContext( __DRIcontext *driContextPriv )
{
return GL_TRUE;
}
@@ -254,12 +254,19 @@ const struct __DriverAPIRec driDriverAPI = {
/*
* This is the bootstrap function for the driver.
* The __driCreateScreen name is the symbol that libGL.so fetches.
- * Return: pointer to a __DRIscreenPrivate.
+ * Return: pointer to a __DRIscreen.
*/
void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
int numConfigs, __GLXvisualConfig *config)
{
- __DRIscreenPrivate *psp;
+ __DRIscreen *psp;
psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &gammaAPI);
return (void *) psp;
}
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/i810/i810context.c b/src/mesa/drivers/dri/i810/i810context.c
index 350c2e3e3bf..34e34606b4b 100644
--- a/src/mesa/drivers/dri/i810/i810context.c
+++ b/src/mesa/drivers/dri/i810/i810context.c
@@ -167,12 +167,12 @@ static const struct dri_debug_control debug_control[] =
GLboolean
i810CreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
GLcontext *ctx, *shareCtx;
i810ContextPtr imesa;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private;
I810SAREAPtr saPriv = (I810SAREAPtr)
(((GLubyte *)sPriv->pSAREA) + i810Screen->sarea_priv_offset);
@@ -334,7 +334,7 @@ i810CreateContext( const __GLcontextModes *mesaVis,
}
void
-i810DestroyContext(__DRIcontextPrivate *driContextPriv)
+i810DestroyContext(__DRIcontext *driContextPriv)
{
i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate;
@@ -375,7 +375,7 @@ i810DestroyContext(__DRIcontextPrivate *driContextPriv)
void i810XMesaSetFrontClipRects( i810ContextPtr imesa )
{
- __DRIdrawablePrivate *dPriv = imesa->driDrawable;
+ __DRIdrawable *dPriv = imesa->driDrawable;
imesa->numClipRects = dPriv->numClipRects;
imesa->pClipRects = dPriv->pClipRects;
@@ -389,7 +389,7 @@ void i810XMesaSetFrontClipRects( i810ContextPtr imesa )
void i810XMesaSetBackClipRects( i810ContextPtr imesa )
{
- __DRIdrawablePrivate *dPriv = imesa->driDrawable;
+ __DRIdrawable *dPriv = imesa->driDrawable;
if (imesa->sarea->pf_enabled == 0 && dPriv->numBackClipRects == 0)
{
@@ -427,7 +427,7 @@ static void i810XMesaWindowMoved( i810ContextPtr imesa )
GLboolean
-i810UnbindContext(__DRIcontextPrivate *driContextPriv)
+i810UnbindContext(__DRIcontext *driContextPriv)
{
i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate;
if (imesa) {
@@ -441,9 +441,9 @@ i810UnbindContext(__DRIcontextPrivate *driContextPriv)
GLboolean
-i810MakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv)
+i810MakeCurrent(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv)
{
if (driContextPriv) {
i810ContextPtr imesa = (i810ContextPtr) driContextPriv->driverPrivate;
@@ -501,8 +501,8 @@ i810UpdatePageFlipping( i810ContextPtr imesa )
void i810GetLock( i810ContextPtr imesa, GLuint flags )
{
- __DRIdrawablePrivate *dPriv = imesa->driDrawable;
- __DRIscreenPrivate *sPriv = imesa->driScreen;
+ __DRIdrawable *dPriv = imesa->driDrawable;
+ __DRIscreen *sPriv = imesa->driScreen;
I810SAREAPtr sarea = imesa->sarea;
int me = imesa->hHWContext;
unsigned i;
@@ -548,7 +548,7 @@ void i810GetLock( i810ContextPtr imesa, GLuint flags )
void
-i810SwapBuffers( __DRIdrawablePrivate *dPriv )
+i810SwapBuffers( __DRIdrawable *dPriv )
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
i810ContextPtr imesa;
diff --git a/src/mesa/drivers/dri/i810/i810context.h b/src/mesa/drivers/dri/i810/i810context.h
index 4b8c71d7c6c..19529db0200 100644
--- a/src/mesa/drivers/dri/i810/i810context.h
+++ b/src/mesa/drivers/dri/i810/i810context.h
@@ -170,8 +170,8 @@ struct i810_context_t {
drm_hw_lock_t *driHwLock;
int driFd;
- __DRIdrawablePrivate *driDrawable;
- __DRIscreenPrivate *driScreen;
+ __DRIdrawable *driDrawable;
+ __DRIscreen *driScreen;
i810ScreenPrivate *i810Screen;
I810SAREAPtr sarea;
};
diff --git a/src/mesa/drivers/dri/i810/i810ioctl.c b/src/mesa/drivers/dri/i810/i810ioctl.c
index 3df9c2ac478..c631543d933 100644
--- a/src/mesa/drivers/dri/i810/i810ioctl.c
+++ b/src/mesa/drivers/dri/i810/i810ioctl.c
@@ -50,8 +50,8 @@ static drmBufPtr i810_get_buffer_ioctl( i810ContextPtr imesa )
static void i810Clear( GLcontext *ctx, GLbitfield mask )
{
i810ContextPtr imesa = I810_CONTEXT( ctx );
- __DRIdrawablePrivate *dPriv = imesa->driDrawable;
- const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask);
+ __DRIdrawable *dPriv = imesa->driDrawable;
+ const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask[0]);
drmI810Clear clear;
unsigned int i;
@@ -149,7 +149,7 @@ static void i810Clear( GLcontext *ctx, GLbitfield mask )
/*
* Copy the back buffer to the front buffer.
*/
-void i810CopyBuffer( const __DRIdrawablePrivate *dPriv )
+void i810CopyBuffer( const __DRIdrawable *dPriv )
{
i810ContextPtr imesa;
drm_clip_rect_t *pbox;
@@ -197,7 +197,7 @@ void i810CopyBuffer( const __DRIdrawablePrivate *dPriv )
/*
* XXX implement when full-screen extension is done.
*/
-void i810PageFlip( const __DRIdrawablePrivate *dPriv )
+void i810PageFlip( const __DRIdrawable *dPriv )
{
i810ContextPtr imesa;
int tmp, ret;
diff --git a/src/mesa/drivers/dri/i810/i810ioctl.h b/src/mesa/drivers/dri/i810/i810ioctl.h
index dfd6e210889..926e38ce51c 100644
--- a/src/mesa/drivers/dri/i810/i810ioctl.h
+++ b/src/mesa/drivers/dri/i810/i810ioctl.h
@@ -14,8 +14,8 @@ void i810WaitAge( i810ContextPtr imesa, int age );
void i810DmaFinish( i810ContextPtr imesa );
void i810RegetLockQuiescent( i810ContextPtr imesa );
void i810InitIoctlFuncs( struct dd_function_table *functions );
-void i810CopyBuffer( const __DRIdrawablePrivate *dpriv );
-void i810PageFlip( const __DRIdrawablePrivate *dpriv );
+void i810CopyBuffer( const __DRIdrawable *dpriv );
+void i810PageFlip( const __DRIdrawable *dpriv );
int i810_check_copy(int fd);
#define I810_STATECHANGE(imesa, flag) \
diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c
index b65395831a9..476c8013580 100644
--- a/src/mesa/drivers/dri/i810/i810screen.c
+++ b/src/mesa/drivers/dri/i810/i810screen.c
@@ -50,7 +50,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "GL/internal/dri_interface.h"
static const __DRIconfig **
-i810FillInModes( __DRIscreenPrivate *psp,
+i810FillInModes( __DRIscreen *psp,
unsigned pixel_bits, unsigned depth_bits,
unsigned stencil_bits, GLboolean have_back_buffer )
{
@@ -251,7 +251,7 @@ i810InitScreen(__DRIscreen *sPriv)
}
static void
-i810DestroyScreen(__DRIscreenPrivate *sPriv)
+i810DestroyScreen(__DRIscreen *sPriv)
{
i810ScreenPrivate *i810Screen = (i810ScreenPrivate *)sPriv->private;
@@ -270,8 +270,8 @@ i810DestroyScreen(__DRIscreenPrivate *sPriv)
* Create a buffer which corresponds to the window.
*/
static GLboolean
-i810CreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+i810CreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -331,7 +331,7 @@ i810CreateBuffer( __DRIscreenPrivate *driScrnPriv,
static void
-i810DestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+i810DestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
@@ -352,3 +352,10 @@ const struct __DriverAPIRec driDriverAPI = {
.WaitForSBC = NULL,
.SwapBuffersMSC = NULL
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/i810/i810screen.h b/src/mesa/drivers/dri/i810/i810screen.h
index b29937665af..734e2fb002d 100644
--- a/src/mesa/drivers/dri/i810/i810screen.h
+++ b/src/mesa/drivers/dri/i810/i810screen.h
@@ -71,7 +71,7 @@ typedef struct {
int textureSize;
int logTextureGranularity;
- __DRIscreenPrivate *driScrnPriv;
+ __DRIscreen *driScrnPriv;
drmBufMapPtr bufs;
unsigned int sarea_priv_offset;
} i810ScreenPrivate;
@@ -79,21 +79,21 @@ typedef struct {
extern GLboolean
i810CreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate );
extern void
-i810DestroyContext(__DRIcontextPrivate *driContextPriv);
+i810DestroyContext(__DRIcontext *driContextPriv);
extern GLboolean
-i810UnbindContext(__DRIcontextPrivate *driContextPriv);
+i810UnbindContext(__DRIcontext *driContextPriv);
extern GLboolean
-i810MakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv);
+i810MakeCurrent(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv);
extern void
-i810SwapBuffers(__DRIdrawablePrivate *driDrawPriv);
+i810SwapBuffers(__DRIdrawable *driDrawPriv);
#endif
diff --git a/src/mesa/drivers/dri/i810/i810span.c b/src/mesa/drivers/dri/i810/i810span.c
index 510723f4456..6576f6745ea 100644
--- a/src/mesa/drivers/dri/i810/i810span.c
+++ b/src/mesa/drivers/dri/i810/i810span.c
@@ -15,7 +15,7 @@
#define LOCAL_VARS \
i810ContextPtr imesa = I810_CONTEXT(ctx); \
- __DRIdrawablePrivate *dPriv = imesa->driDrawable; \
+ __DRIdrawable *dPriv = imesa->driDrawable; \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
GLuint pitch = drb->pitch; \
GLuint height = dPriv->h; \
@@ -27,7 +27,7 @@
#define LOCAL_DEPTH_VARS \
i810ContextPtr imesa = I810_CONTEXT(ctx); \
- __DRIdrawablePrivate *dPriv = imesa->driDrawable; \
+ __DRIdrawable *dPriv = imesa->driDrawable; \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
GLuint pitch = drb->pitch; \
GLuint height = dPriv->h; \
diff --git a/src/mesa/drivers/dri/i810/i810state.c b/src/mesa/drivers/dri/i810/i810state.c
index a4b1477b61a..0c68e120b02 100644
--- a/src/mesa/drivers/dri/i810/i810state.c
+++ b/src/mesa/drivers/dri/i810/i810state.c
@@ -639,7 +639,7 @@ static void i810Enable(GLcontext *ctx, GLenum cap, GLboolean state)
void i810EmitDrawingRectangle( i810ContextPtr imesa )
{
- __DRIdrawablePrivate *dPriv = imesa->driDrawable;
+ __DRIdrawable *dPriv = imesa->driDrawable;
i810ScreenPrivate *i810Screen = imesa->i810Screen;
int x0 = imesa->drawX;
int y0 = imesa->drawY;
diff --git a/src/mesa/drivers/dri/i810/i810tex.c b/src/mesa/drivers/dri/i810/i810tex.c
index 5c530325c9d..2ccb9562e90 100644
--- a/src/mesa/drivers/dri/i810/i810tex.c
+++ b/src/mesa/drivers/dri/i810/i810tex.c
@@ -208,7 +208,7 @@ i810AllocTexObj( GLcontext *ctx, struct gl_texture_object *texObj )
i810SetTexWrapping( t, texObj->WrapS, texObj->WrapT );
/*i830SetTexMaxAnisotropy( t, texObj->MaxAnisotropy );*/
i810SetTexFilter( imesa, t, texObj->MinFilter, texObj->MagFilter, bias );
- i810SetTexBorderColor( t, texObj->BorderColor );
+ i810SetTexBorderColor( t, texObj->BorderColor.f );
}
return t;
@@ -249,7 +249,7 @@ static void i810TexParameter( GLcontext *ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- i810SetTexBorderColor( t, tObj->BorderColor );
+ i810SetTexBorderColor( t, tObj->BorderColor.f );
break;
case GL_TEXTURE_BASE_LEVEL:
diff --git a/src/mesa/drivers/dri/i915/Makefile b/src/mesa/drivers/dri/i915/Makefile
index 37f15aa7671..cf32476f408 100644
--- a/src/mesa/drivers/dri/i915/Makefile
+++ b/src/mesa/drivers/dri/i915/Makefile
@@ -34,7 +34,6 @@ DRIVER_SOURCES = \
intel_pixel_read.c \
intel_buffers.c \
intel_blit.c \
- intel_swapbuffers.c \
i915_tex_layout.c \
i915_texstate.c \
i915_context.c \
@@ -64,7 +63,8 @@ DRIVER_DEFINES = -I../intel -I../intel/server -DI915 \
$(shell pkg-config libdrm --atleast-version=2.3.1 \
&& echo "-DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP")
-DRI_LIB_DEPS += -ldrm_intel
+INCLUDES += $(INTEL_CFLAGS)
+DRI_LIB_DEPS += $(INTEL_LIBS)
include ../Makefile.template
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 7be18cb65a0..947330b2f16 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -50,7 +50,7 @@ extern const struct tnl_pipeline_stage *intel_pipeline[];
GLboolean
i830CreateContext(const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
struct dd_function_table functions;
diff --git a/src/mesa/drivers/dri/i915/i830_context.h b/src/mesa/drivers/dri/i915/i830_context.h
index f73cbbf88bb..592ae539761 100644
--- a/src/mesa/drivers/dri/i915/i830_context.h
+++ b/src/mesa/drivers/dri/i915/i830_context.h
@@ -178,7 +178,7 @@ i830_state_draw_region(struct intel_context *intel,
*/
extern GLboolean
i830CreateContext(const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate);
/* i830_tex.c, i830_texstate.c
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index 645ebe30577..acda7e70de0 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -620,7 +620,7 @@ i830LineWidth(GLcontext * ctx, GLfloat widthf)
DBG("%s\n", __FUNCTION__);
width = (int) (widthf * 2);
- CLAMP_SELF(width, 1, 15);
+ width = CLAMP(width, 1, 15);
state5 = i830->state.Ctx[I830_CTXREG_STATE5] & ~FIXED_LINE_WIDTH_MASK;
state5 |= (ENABLE_FIXED_LINE_WIDTH | FIXED_LINE_WIDTH(width));
@@ -639,7 +639,7 @@ i830PointSize(GLcontext * ctx, GLfloat size)
DBG("%s\n", __FUNCTION__);
- CLAMP_SELF(point_size, 1, 256);
+ point_size = CLAMP(point_size, 1, 256);
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
i830->state.Ctx[I830_CTXREG_STATE5] &= ~FIXED_POINT_WIDTH_MASK;
i830->state.Ctx[I830_CTXREG_STATE5] |= (ENABLE_FIXED_POINT_WIDTH |
diff --git a/src/mesa/drivers/dri/i915/i830_texstate.c b/src/mesa/drivers/dri/i915/i830_texstate.c
index ce409b3a60c..7525f9f2e05 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"
@@ -303,16 +304,15 @@ i830_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
}
/* convert border color from float to ubyte */
- CLAMPED_FLOAT_TO_UBYTE(border[0], tObj->BorderColor[0]);
- CLAMPED_FLOAT_TO_UBYTE(border[1], tObj->BorderColor[1]);
- 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]);
-
+ CLAMPED_FLOAT_TO_UBYTE(border[0], tObj->BorderColor.f[0]);
+ CLAMPED_FLOAT_TO_UBYTE(border[1], tObj->BorderColor.f[1]);
+ CLAMPED_FLOAT_TO_UBYTE(border[2], tObj->BorderColor.f[2]);
+ CLAMPED_FLOAT_TO_UBYTE(border[3], tObj->BorderColor.f[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 e8c8d5a0486..3767712d191 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -25,8 +25,6 @@
*
**************************************************************************/
-#include "glapi/glapi.h"
-
#include "i830_context.h"
#include "i830_reg.h"
#include "intel_batchbuffer.h"
@@ -126,7 +124,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);
@@ -298,7 +296,7 @@ i830_emit_invarient_state(struct intel_context *intel)
{
BATCH_LOCALS;
- BEGIN_BATCH(29, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(29);
OUT_BATCH(_3DSTATE_DFLT_DIFFUSE_CMD);
OUT_BATCH(0);
@@ -366,7 +364,7 @@ i830_emit_invarient_state(struct intel_context *intel)
#define emit( intel, state, size ) \
- intel_batchbuffer_data(intel->batch, state, size, IGNORE_CLIPRECTS )
+ intel_batchbuffer_data(intel->batch, state, size )
static GLuint
get_dirty(struct i830_hw_state *state)
@@ -429,13 +427,9 @@ i830_emit_state(struct intel_context *intel)
* It might be better to talk about explicit places where
* scheduling is allowed, rather than assume that it is whenever a
* batchbuffer fills up.
- *
- * Set the space as LOOP_CLIPRECTS now, since that's what our primitives
- * will be emitted under.
*/
intel_batchbuffer_require_space(intel->batch,
- get_state_size(state) + INTEL_PRIM_EMIT_SIZE,
- LOOP_CLIPRECTS);
+ get_state_size(state) + INTEL_PRIM_EMIT_SIZE);
count = 0;
again:
aper_count = 0;
@@ -491,17 +485,14 @@ i830_emit_state(struct intel_context *intel)
}
if (dirty & I830_UPLOAD_BUFFERS) {
- GLuint count = 9;
+ GLuint count = 15;
DBG("I830_UPLOAD_BUFFERS:\n");
if (state->depth_region)
count += 3;
- if (intel->constant_cliprect)
- count += 6;
-
- BEGIN_BATCH(count, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(count);
OUT_BATCH(state->Buffer[I830_DESTREG_CBUFADDR0]);
OUT_BATCH(state->Buffer[I830_DESTREG_CBUFADDR1]);
OUT_RELOC(state->draw_region->buffer,
@@ -523,15 +514,13 @@ i830_emit_state(struct intel_context *intel)
OUT_BATCH(state->Buffer[I830_DESTREG_SR1]);
OUT_BATCH(state->Buffer[I830_DESTREG_SR2]);
- if (intel->constant_cliprect) {
- assert(state->Buffer[I830_DESTREG_DRAWRECT0] != MI_NOOP);
- OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT0]);
- OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT1]);
- OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT2]);
- OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT3]);
- OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT4]);
- OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT5]);
- }
+ assert(state->Buffer[I830_DESTREG_DRAWRECT0] != MI_NOOP);
+ OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT0]);
+ OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT1]);
+ OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT2]);
+ OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT3]);
+ OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT4]);
+ OUT_BATCH(state->Buffer[I830_DESTREG_DRAWRECT5]);
ADVANCE_BATCH();
}
@@ -544,7 +533,7 @@ i830_emit_state(struct intel_context *intel)
if ((dirty & I830_UPLOAD_TEX(i))) {
DBG("I830_UPLOAD_TEX(%d):\n", i);
- BEGIN_BATCH(I830_TEX_SETUP_SIZE + 1, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(I830_TEX_SETUP_SIZE + 1);
OUT_BATCH(state->Tex[i][I830_TEXREG_TM0LI]);
if (state->tex_buffer[i]) {
@@ -673,23 +662,14 @@ i830_state_draw_region(struct intel_context *intel,
}
state->Buffer[I830_DESTREG_DV1] = value;
- if (intel->constant_cliprect) {
- state->Buffer[I830_DESTREG_DRAWRECT0] = _3DSTATE_DRAWRECT_INFO;
- state->Buffer[I830_DESTREG_DRAWRECT1] = 0;
- state->Buffer[I830_DESTREG_DRAWRECT2] = 0; /* xmin, ymin */
- state->Buffer[I830_DESTREG_DRAWRECT3] =
- (ctx->DrawBuffer->Width & 0xffff) |
- (ctx->DrawBuffer->Height << 16);
- state->Buffer[I830_DESTREG_DRAWRECT4] = 0; /* xoff, yoff */
- state->Buffer[I830_DESTREG_DRAWRECT5] = 0;
- } else {
- state->Buffer[I830_DESTREG_DRAWRECT0] = MI_NOOP;
- state->Buffer[I830_DESTREG_DRAWRECT1] = MI_NOOP;
- state->Buffer[I830_DESTREG_DRAWRECT2] = MI_NOOP;
- state->Buffer[I830_DESTREG_DRAWRECT3] = MI_NOOP;
- state->Buffer[I830_DESTREG_DRAWRECT4] = MI_NOOP;
- state->Buffer[I830_DESTREG_DRAWRECT5] = MI_NOOP;
- }
+ state->Buffer[I830_DESTREG_DRAWRECT0] = _3DSTATE_DRAWRECT_INFO;
+ state->Buffer[I830_DESTREG_DRAWRECT1] = 0;
+ state->Buffer[I830_DESTREG_DRAWRECT2] = 0; /* xmin, ymin */
+ state->Buffer[I830_DESTREG_DRAWRECT3] =
+ (ctx->DrawBuffer->Width & 0xffff) |
+ (ctx->DrawBuffer->Height << 16);
+ state->Buffer[I830_DESTREG_DRAWRECT4] = 0; /* xoff, yoff */
+ state->Buffer[I830_DESTREG_DRAWRECT5] = 0;
I830_STATECHANGE(i830, I830_UPLOAD_BUFFERS);
@@ -714,9 +694,6 @@ 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 void
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 47670164875..8477e2f9a42 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -95,7 +95,7 @@ extern const struct tnl_pipeline_stage *intel_pipeline[];
GLboolean
i915CreateContext(const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
struct dd_function_table functions;
@@ -138,6 +138,9 @@ i915CreateContext(const __GLcontextModes * mesaVis,
ctx->Const.MaxTextureImageUnits = I915_TEX_UNITS;
ctx->Const.MaxTextureCoordUnits = I915_TEX_UNITS;
ctx->Const.MaxVarying = I915_TEX_UNITS;
+ ctx->Const.MaxCombinedTextureImageUnits =
+ ctx->Const.MaxVertexTextureImageUnits +
+ ctx->Const.MaxTextureImageUnits;
/* Advertise the full hardware capabilities. The new memory
* manager should cope much better with overload situations:
diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h
index 25418d5f7aa..f55b5511398 100644
--- a/src/mesa/drivers/dri/i915/i915_context.h
+++ b/src/mesa/drivers/dri/i915/i915_context.h
@@ -318,7 +318,7 @@ do { \
* i915_context.c
*/
extern GLboolean i915CreateContext(const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate);
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index d9c61446f52..a273bd28ea1 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -663,7 +663,7 @@ upload_program(struct i915_fragment_program *p)
A0_MOV,
get_result_vector(p, inst),
get_result_flags(inst), 0,
- swizzle(src0, ZERO, ZERO, ZERO, ZERO), 0, 0);
+ swizzle(tmp, ZERO, ZERO, ZERO, ZERO), 0, 0);
case OPCODE_POW:
src0 = src_vector(p, &inst->SrcReg[0], program);
@@ -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 cc98d125dbc..9d7a9e1dfea 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -571,7 +571,7 @@ i915LineWidth(GLcontext * ctx, GLfloat widthf)
DBG("%s\n", __FUNCTION__);
width = (int) (widthf * 2);
- CLAMP_SELF(width, 1, 0xf);
+ width = CLAMP(width, 1, 0xf);
lis4 |= width << S4_LINE_WIDTH_SHIFT;
if (lis4 != i915->state.Ctx[I915_CTXREG_LIS4]) {
@@ -589,7 +589,7 @@ i915PointSize(GLcontext * ctx, GLfloat size)
DBG("%s\n", __FUNCTION__);
- CLAMP_SELF(point_size, 1, 255);
+ point_size = CLAMP(point_size, 1, 255);
lis4 |= point_size << S4_POINT_WIDTH_SHIFT;
if (lis4 != i915->state.Ctx[I915_CTXREG_LIS4]) {
diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index 825f1dbbe3e..3ee4c8653a9 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"
@@ -347,25 +348,25 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3)
}
/* convert border color from float to ubyte */
- CLAMPED_FLOAT_TO_UBYTE(border[0], tObj->BorderColor[0]);
- CLAMPED_FLOAT_TO_UBYTE(border[1], tObj->BorderColor[1]);
- CLAMPED_FLOAT_TO_UBYTE(border[2], tObj->BorderColor[2]);
- CLAMPED_FLOAT_TO_UBYTE(border[3], tObj->BorderColor[3]);
+ CLAMPED_FLOAT_TO_UBYTE(border[0], tObj->BorderColor.f[0]);
+ CLAMPED_FLOAT_TO_UBYTE(border[1], tObj->BorderColor.f[1]);
+ CLAMPED_FLOAT_TO_UBYTE(border[2], tObj->BorderColor.f[2]);
+ CLAMPED_FLOAT_TO_UBYTE(border[3], tObj->BorderColor.f[3]);
if (firstImage->_BaseFormat == GL_DEPTH_COMPONENT) {
/* GL specs that border color for depth textures is taken from the
* 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 668e02ef705..933a565f028 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -45,8 +45,6 @@
#include "i915_reg.h"
#include "i915_context.h"
-#include "glapi/glapi.h"
-
static void
i915_render_prevalidate(struct intel_context *intel)
{
@@ -173,7 +171,7 @@ i915_emit_invarient_state(struct intel_context *intel)
{
BATCH_LOCALS;
- BEGIN_BATCH(17, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(17);
OUT_BATCH(_3DSTATE_AA_CMD |
AA_LINE_ECAAR_WIDTH_ENABLE |
@@ -219,7 +217,7 @@ i915_emit_invarient_state(struct intel_context *intel)
#define emit(intel, state, size ) \
- intel_batchbuffer_data(intel->batch, state, size, IGNORE_CLIPRECTS )
+ intel_batchbuffer_data(intel->batch, state, size)
static GLuint
get_dirty(struct i915_hw_state *state)
@@ -300,13 +298,9 @@ i915_emit_state(struct intel_context *intel)
* It might be better to talk about explicit places where
* scheduling is allowed, rather than assume that it is whenever a
* batchbuffer fills up.
- *
- * Set the space as LOOP_CLIPRECTS now, since that's what our primitives
- * will be emitted under.
*/
intel_batchbuffer_require_space(intel->batch,
- get_state_size(state) + INTEL_PRIM_EMIT_SIZE,
- LOOP_CLIPRECTS);
+ get_state_size(state) + INTEL_PRIM_EMIT_SIZE);
count = 0;
again:
aper_count = 0;
@@ -372,7 +366,7 @@ i915_emit_state(struct intel_context *intel)
}
if (dirty & I915_UPLOAD_BUFFERS) {
- GLuint count = 9;
+ GLuint count = 15;
if (INTEL_DEBUG & DEBUG_STATE)
fprintf(stderr, "I915_UPLOAD_BUFFERS:\n");
@@ -380,10 +374,7 @@ i915_emit_state(struct intel_context *intel)
if (state->depth_region)
count += 3;
- if (intel->constant_cliprect)
- count += 6;
-
- BEGIN_BATCH(count, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(count);
OUT_BATCH(state->Buffer[I915_DESTREG_CBUFADDR0]);
OUT_BATCH(state->Buffer[I915_DESTREG_CBUFADDR1]);
OUT_RELOC(state->draw_region->buffer,
@@ -405,15 +396,13 @@ i915_emit_state(struct intel_context *intel)
OUT_BATCH(state->Buffer[I915_DESTREG_SR1]);
OUT_BATCH(state->Buffer[I915_DESTREG_SR2]);
- if (intel->constant_cliprect) {
- assert(state->Buffer[I915_DESTREG_DRAWRECT0] != MI_NOOP);
- OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT0]);
- OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT1]);
- OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT2]);
- OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT3]);
- OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT4]);
- OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT5]);
- }
+ assert(state->Buffer[I915_DESTREG_DRAWRECT0] != MI_NOOP);
+ OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT0]);
+ OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT1]);
+ OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT2]);
+ OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT3]);
+ OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT4]);
+ OUT_BATCH(state->Buffer[I915_DESTREG_DRAWRECT5]);
ADVANCE_BATCH();
}
@@ -440,7 +429,7 @@ i915_emit_state(struct intel_context *intel)
if (dirty & I915_UPLOAD_TEX(i))
nr++;
- BEGIN_BATCH(2 + nr * 3, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(2 + nr * 3);
OUT_BATCH(_3DSTATE_MAP_STATE | (3 * nr));
OUT_BATCH((dirty & I915_UPLOAD_TEX_ALL) >> I915_UPLOAD_TEX_0_SHIFT);
for (i = 0; i < I915_TEX_UNITS; i++)
@@ -464,7 +453,7 @@ i915_emit_state(struct intel_context *intel)
}
ADVANCE_BATCH();
- BEGIN_BATCH(2 + nr * 3, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(2 + nr * 3);
OUT_BATCH(_3DSTATE_SAMPLER_STATE | (3 * nr));
OUT_BATCH((dirty & I915_UPLOAD_TEX_ALL) >> I915_UPLOAD_TEX_0_SHIFT);
for (i = 0; i < I915_TEX_UNITS; i++)
@@ -610,7 +599,7 @@ i915_state_draw_region(struct intel_context *intel,
* the value of this bit, the pipeline needs to be MI_FLUSHed. And it
* can only be set when a depth buffer is already defined.
*/
- if (IS_945(intel->intelScreen->deviceID) && intel->use_early_z &&
+ if (intel->is_945 && intel->use_early_z &&
depth_region->tiling != I915_TILING_NONE)
value |= CLASSIC_EARLY_DEPTH;
@@ -622,23 +611,14 @@ i915_state_draw_region(struct intel_context *intel,
}
state->Buffer[I915_DESTREG_DV1] = value;
- if (intel->constant_cliprect) {
- state->Buffer[I915_DESTREG_DRAWRECT0] = _3DSTATE_DRAWRECT_INFO;
- state->Buffer[I915_DESTREG_DRAWRECT1] = 0;
- state->Buffer[I915_DESTREG_DRAWRECT2] = 0; /* xmin, ymin */
- state->Buffer[I915_DESTREG_DRAWRECT3] =
- (ctx->DrawBuffer->Width & 0xffff) |
- (ctx->DrawBuffer->Height << 16);
- state->Buffer[I915_DESTREG_DRAWRECT4] = 0; /* xoff, yoff */
- state->Buffer[I915_DESTREG_DRAWRECT5] = 0;
- } else {
- state->Buffer[I915_DESTREG_DRAWRECT0] = MI_NOOP;
- state->Buffer[I915_DESTREG_DRAWRECT1] = MI_NOOP;
- state->Buffer[I915_DESTREG_DRAWRECT2] = MI_NOOP;
- state->Buffer[I915_DESTREG_DRAWRECT3] = MI_NOOP;
- state->Buffer[I915_DESTREG_DRAWRECT4] = MI_NOOP;
- state->Buffer[I915_DESTREG_DRAWRECT5] = MI_NOOP;
- }
+ state->Buffer[I915_DESTREG_DRAWRECT0] = _3DSTATE_DRAWRECT_INFO;
+ state->Buffer[I915_DESTREG_DRAWRECT1] = 0;
+ state->Buffer[I915_DESTREG_DRAWRECT2] = 0; /* xmin, ymin */
+ state->Buffer[I915_DESTREG_DRAWRECT3] =
+ (ctx->DrawBuffer->Width & 0xffff) |
+ (ctx->DrawBuffer->Height << 16);
+ state->Buffer[I915_DESTREG_DRAWRECT4] = 0; /* xoff, yoff */
+ state->Buffer[I915_DESTREG_DRAWRECT5] = 0;
I915_STATECHANGE(i915, I915_UPLOAD_BUFFERS);
}
@@ -666,9 +646,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 void
diff --git a/src/mesa/drivers/dri/i915/intel_swapbuffers.c b/src/mesa/drivers/dri/i915/intel_swapbuffers.c
deleted file mode 120000
index 148d5215aa6..00000000000
--- a/src/mesa/drivers/dri/i915/intel_swapbuffers.c
+++ /dev/null
@@ -1 +0,0 @@
-../intel/intel_swapbuffers.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 65db947aee9..763c1a0ae7e 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -88,7 +88,6 @@ intel_flush_inline_primitive(struct intel_context *intel)
static void intel_start_inline(struct intel_context *intel, uint32_t prim)
{
- uint32_t batch_flags = LOOP_CLIPRECTS;
BATCH_LOCALS;
intel->vtbl.emit_state(intel);
@@ -100,7 +99,7 @@ static void intel_start_inline(struct intel_context *intel, uint32_t prim)
/* Emit a slot which will be filled with the inline primitive
* command later.
*/
- BEGIN_BATCH(2, batch_flags);
+ BEGIN_BATCH(2);
OUT_BATCH(0);
assert((intel->batch->dirty_state & (1<<1)) == 0);
@@ -220,7 +219,7 @@ void intel_flush_prim(struct intel_context *intel)
intel->prim.count = 0;
offset = intel->prim.start_offset;
intel->prim.start_offset = intel->prim.current_offset;
- if (!IS_9XX(intel->intelScreen->deviceID))
+ if (!intel->gen >= 3)
intel->prim.start_offset = ALIGN(intel->prim.start_offset, 128);
intel->prim.flush = NULL;
@@ -250,8 +249,8 @@ void intel_flush_prim(struct intel_context *intel)
intel->vertex_size * 4);
#endif
- if (IS_9XX(intel->intelScreen->deviceID)) {
- BEGIN_BATCH(5, LOOP_CLIPRECTS);
+ if (intel->gen >= 3) {
+ BEGIN_BATCH(5);
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
I1_LOAD_S(0) | I1_LOAD_S(1) | 1);
assert((offset & !S0_VB_OFFSET_MASK) == 0);
@@ -269,7 +268,7 @@ void intel_flush_prim(struct intel_context *intel)
} else {
struct i830_context *i830 = i830_context(&intel->ctx);
- BEGIN_BATCH(5, LOOP_CLIPRECTS);
+ BEGIN_BATCH(5);
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
I1_LOAD_S(0) | I1_LOAD_S(2) | 1);
/* S0 */
@@ -1249,81 +1248,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 +1256,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 +1272,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/Makefile b/src/mesa/drivers/dri/i965/Makefile
index 7a55333e896..7758a792fde 100644
--- a/src/mesa/drivers/dri/i965/Makefile
+++ b/src/mesa/drivers/dri/i965/Makefile
@@ -24,7 +24,6 @@ DRIVER_SOURCES = \
intel_pixel_draw.c \
intel_pixel_read.c \
intel_state.c \
- intel_swapbuffers.c \
intel_syncobj.c \
intel_tex.c \
intel_tex_copy.c \
@@ -96,7 +95,8 @@ ASM_SOURCES =
DRIVER_DEFINES = -I../intel -I../intel/server
-DRI_LIB_DEPS += -ldrm_intel
+INCLUDES += $(INTEL_CFLAGS)
+DRI_LIB_DEPS += $(INTEL_LIBS)
include ../Makefile.template
diff --git a/src/mesa/drivers/dri/i965/brw_cc.c b/src/mesa/drivers/dri/i965/brw_cc.c
index 9a38631dfed..fa2d394b222 100644
--- a/src/mesa/drivers/dri/i965/brw_cc.c
+++ b/src/mesa/drivers/dri/i965/brw_cc.c
@@ -293,8 +293,7 @@ cc_unit_create_from_key(struct brw_context *brw, struct brw_cc_unit_key *key)
bo = brw_upload_cache(&brw->cache, BRW_CC_UNIT,
key, sizeof(*key),
&brw->cc.vp_bo, 1,
- &cc, sizeof(cc),
- NULL, NULL);
+ &cc, sizeof(cc));
/* Emit CC viewport relocation */
dri_bo_emit_reloc(bo,
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index dbd10a52974..d3275c7a89d 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -50,6 +50,7 @@
static void compile_clip_prog( struct brw_context *brw,
struct brw_clip_prog_key *key )
{
+ struct intel_context *intel = &brw->intel;
struct brw_clip_compile c;
const GLuint *program;
GLuint program_size;
@@ -65,14 +66,13 @@ static void compile_clip_prog( struct brw_context *brw,
c.func.single_program_flow = 1;
c.key = *key;
- c.need_ff_sync = BRW_IS_IGDNG(brw);
/* Need to locate the two positions present in vertex + header.
* These are currently hardcoded:
*/
c.header_position_offset = ATTR_SIZE;
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
delta = 3 * REG_SIZE;
else
delta = REG_SIZE;
@@ -85,7 +85,7 @@ static void compile_clip_prog( struct brw_context *brw,
c.nr_attrs = brw_count_bits(c.key.attrs);
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
c.nr_regs = (c.nr_attrs + 1) / 2 + 3; /* are vertices packed, or reg-aligned? */
else
c.nr_regs = (c.nr_attrs + 1) / 2 + 1; /* are vertices packed, or reg-aligned? */
@@ -130,20 +130,22 @@ static void compile_clip_prog( struct brw_context *brw,
/* Upload
*/
dri_bo_unreference(brw->clip.prog_bo);
- brw->clip.prog_bo = brw_upload_cache( &brw->cache,
- BRW_CLIP_PROG,
- &c.key, sizeof(c.key),
- NULL, 0,
- program, program_size,
- &c.prog_data,
- &brw->clip.prog_data );
+ brw->clip.prog_bo = brw_upload_cache_with_auxdata(&brw->cache,
+ BRW_CLIP_PROG,
+ &c.key, sizeof(c.key),
+ NULL, 0,
+ program, program_size,
+ &c.prog_data,
+ sizeof(c.prog_data),
+ &brw->clip.prog_data);
}
/* Calculate interpolants for triangle and line rasterization.
*/
static void upload_clip_prog(struct brw_context *brw)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct intel_context *intel = &brw->intel;
+ GLcontext *ctx = &intel->ctx;
struct brw_clip_prog_key key;
memset(&key, 0, sizeof(key));
@@ -160,7 +162,7 @@ static void upload_clip_prog(struct brw_context *brw)
/* _NEW_TRANSFORM */
key.nr_userclip = brw_count_bits(ctx->Transform.ClipPlanesEnabled);
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
key.clip_mode = BRW_CLIPMODE_KERNEL_CLIP;
else
key.clip_mode = BRW_CLIPMODE_NORMAL;
diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h
index 1c6825510a2..d71bac7f617 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.h
+++ b/src/mesa/drivers/dri/i965/brw_clip.h
@@ -118,7 +118,6 @@ struct brw_clip_compile {
GLuint header_position_offset;
GLuint offset[VERT_ATTRIB_MAX];
- GLboolean need_ff_sync;
};
#define ATTR_SIZE (4*4)
diff --git a/src/mesa/drivers/dri/i965/brw_clip_line.c b/src/mesa/drivers/dri/i965/brw_clip_line.c
index 67861ac6705..ceb62a31162 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_line.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_line.c
@@ -45,6 +45,7 @@
static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
{
+ struct intel_context *intel = &c->func.brw->intel;
GLuint i = 0,j;
/* Register usage is static, precompute here:
@@ -84,7 +85,7 @@ static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
i++;
}
- if (c->need_ff_sync) {
+ if (intel->needs_ff_sync) {
c->reg.ff_sync = retype(brw_vec1_grf(i, 0), BRW_REGISTER_TYPE_UD);
i++;
}
@@ -125,6 +126,7 @@ static void brw_clip_line_alloc_regs( struct brw_clip_compile *c )
static void clip_and_emit_line( struct brw_clip_compile *c )
{
struct brw_compile *p = &c->func;
+ struct brw_context *brw = p->brw;
struct brw_indirect vtx0 = brw_indirect(0, 0);
struct brw_indirect vtx1 = brw_indirect(1, 0);
struct brw_indirect newvtx0 = brw_indirect(2, 0);
@@ -151,7 +153,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_clip_init_clipmask(c);
/* -ve rhw workaround */
- if (BRW_IS_965(p->brw)) {
+ if (brw->has_negative_rhw_bug) {
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
brw_imm_ud(1<<20));
@@ -188,7 +190,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
* Both can be negative on GM965/G965 due to RHW workaround
* if so, this object should be rejected.
*/
- if (BRW_IS_965(p->brw)) {
+ if (brw->has_negative_rhw_bug) {
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_LE, c->reg.dp0, brw_imm_f(0.0));
is_neg2 = brw_IF(p, BRW_EXECUTE_1);
{
@@ -213,7 +215,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
/* If both are positive, do nothing */
/* Only on GM965/G965 */
- if (BRW_IS_965(p->brw)) {
+ if (brw->has_negative_rhw_bug) {
brw_CMP(p, vec1(brw_null_reg()), BRW_CONDITIONAL_L, c->reg.dp0, brw_imm_f(0.0));
is_neg2 = brw_IF(p, BRW_EXECUTE_1);
}
@@ -228,7 +230,7 @@ static void clip_and_emit_line( struct brw_clip_compile *c )
brw_set_predicate_control(p, BRW_PREDICATE_NONE);
}
- if (BRW_IS_965(p->brw)) {
+ if (brw->has_negative_rhw_bug) {
brw_ENDIF(p, is_neg2);
}
}
diff --git a/src/mesa/drivers/dri/i965/brw_clip_state.c b/src/mesa/drivers/dri/i965/brw_clip_state.c
index 79ae5c7bef3..424c9a1f198 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_state.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_state.c
@@ -73,6 +73,7 @@ static dri_bo *
clip_unit_create_from_key(struct brw_context *brw,
struct brw_clip_unit_key *key)
{
+ struct intel_context *intel = &brw->intel;
struct brw_clip_unit_state clip;
dri_bo *bo;
@@ -104,7 +105,7 @@ clip_unit_create_from_key(struct brw_context *brw,
/* Although up to 16 concurrent Clip threads are allowed on IGDNG,
* only 2 threads can output VUEs at a time.
*/
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
clip.thread4.max_threads = 16 - 1;
else
clip.thread4.max_threads = 2 - 1;
@@ -129,7 +130,7 @@ clip_unit_create_from_key(struct brw_context *brw,
clip.clip5.api_mode = BRW_CLIP_API_OGL;
clip.clip5.clip_mode = key->clip_mode;
- if (BRW_IS_G4X(brw))
+ if (intel->is_g4x)
clip.clip5.negative_w_clip_test = 1;
clip.clip6.clipper_viewport_state_ptr = 0;
@@ -141,8 +142,7 @@ clip_unit_create_from_key(struct brw_context *brw,
bo = brw_upload_cache(&brw->cache, BRW_CLIP_UNIT,
key, sizeof(*key),
&brw->clip.prog_bo, 1,
- &clip, sizeof(clip),
- NULL, NULL);
+ &clip, sizeof(clip));
/* Emit clip program relocation */
assert(brw->clip.prog_bo);
diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri/i965/brw_clip_tri.c
index 8d5ca41896a..815211acc21 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_tri.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_tri.c
@@ -50,6 +50,7 @@ static void release_tmps( struct brw_clip_compile *c )
void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
GLuint nr_verts )
{
+ struct intel_context *intel = &c->func.brw->intel;
GLuint i = 0,j;
/* Register usage is static, precompute here:
@@ -77,7 +78,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
for (j = 0; j < 3; j++) {
GLuint delta = c->nr_attrs*16 + 32;
- if (BRW_IS_IGDNG(c->func.brw))
+ if (intel->is_ironlake)
delta = c->nr_attrs * 16 + 32 * 3;
brw_MOV(&c->func, byte_offset(c->reg.vertex[j], delta), brw_imm_f(0));
@@ -118,7 +119,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
i++;
}
- if (c->need_ff_sync) {
+ if (intel->needs_ff_sync) {
c->reg.ff_sync = retype(brw_vec1_grf(i, 0), BRW_REGISTER_TYPE_UD);
i++;
}
@@ -570,6 +571,7 @@ void brw_emit_tri_clip( struct brw_clip_compile *c )
{
struct brw_instruction *neg_rhw;
struct brw_compile *p = &c->func;
+ struct brw_context *brw = p->brw;
brw_clip_tri_alloc_regs(c, 3 + c->key.nr_userclip + 6);
brw_clip_tri_init_vertices(c);
brw_clip_init_clipmask(c);
@@ -577,7 +579,7 @@ void brw_emit_tri_clip( struct brw_clip_compile *c )
/* if -ve rhw workaround bit is set,
do cliptest */
- if (BRW_IS_965(p->brw)) {
+ if (brw->has_negative_rhw_bug) {
brw_set_conditionalmod(p, BRW_CONDITIONAL_NZ);
brw_AND(p, brw_null_reg(), get_element_ud(c->reg.R0, 2),
brw_imm_ud(1<<20));
diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c
index b7f8c25b34b..14bc889b0f8 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_util.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_util.c
@@ -134,6 +134,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
GLboolean force_edgeflag)
{
struct brw_compile *p = &c->func;
+ struct intel_context *intel = &p->brw->intel;
struct brw_reg tmp = get_tmp(c);
GLuint i;
@@ -141,7 +142,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
*/
/*
* After CLIP stage, only first 256 bits of the VUE are read
- * back on IGDNG, so needn't change it
+ * back on Ironlake, so needn't change it
*/
brw_copy_indirect_to_indirect(p, dest_ptr, v0_ptr, 1);
@@ -150,7 +151,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
for (i = 0; i < c->nr_attrs; i++) {
GLuint delta = i*16 + 32;
- if (BRW_IS_IGDNG(p->brw))
+ if (intel->is_ironlake)
delta = i * 16 + 32 * 3;
if (delta == c->offset[VERT_RESULT_EDGE]) {
@@ -184,7 +185,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
if (i & 1) {
GLuint delta = i*16 + 32;
- if (BRW_IS_IGDNG(p->brw))
+ if (intel->is_ironlake)
delta = i * 16 + 32 * 3;
brw_MOV(p, deref_4f(dest_ptr, delta), brw_imm_f(0));
@@ -358,7 +359,9 @@ void brw_clip_init_clipmask( struct brw_clip_compile *c )
void brw_clip_ff_sync(struct brw_clip_compile *c)
{
- if (c->need_ff_sync) {
+ struct intel_context *intel = &c->func.brw->intel;
+
+ if (intel->needs_ff_sync) {
struct brw_compile *p = &c->func;
struct brw_instruction *need_ff_sync;
@@ -387,7 +390,9 @@ void brw_clip_ff_sync(struct brw_clip_compile *c)
void brw_clip_init_ff_sync(struct brw_clip_compile *c)
{
- if (c->need_ff_sync) {
+ struct intel_context *intel = &c->func.brw->intel;
+
+ if (intel->needs_ff_sync) {
struct brw_compile *p = &c->func;
brw_MOV(p, c->reg.ff_sync, brw_imm_ud(0));
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 6b5c3becc27..65f51be3410 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -37,6 +37,7 @@
#include "shader/shader_api.h"
#include "brw_context.h"
+#include "brw_defines.h"
#include "brw_draw.h"
#include "brw_state.h"
#include "intel_span.h"
@@ -68,7 +69,7 @@ static void brwInitDriverFunctions( struct dd_function_table *functions )
}
GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
struct dd_function_table functions;
@@ -102,6 +103,9 @@ 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 =
+ ctx->Const.MaxVertexTextureImageUnits +
+ ctx->Const.MaxTextureImageUnits;
/* Mesa limits textures to 4kx4k; it would be nice to fix that someday
*/
@@ -146,6 +150,38 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
MIN2(ctx->Const.FragmentProgram.MaxNativeParameters,
ctx->Const.FragmentProgram.MaxEnvParams);
+ if (intel->is_ironlake || intel->is_g4x) {
+ brw->CMD_VF_STATISTICS = CMD_VF_STATISTICS_GM45;
+ brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_GM45;
+ brw->has_surface_tile_offset = GL_TRUE;
+ brw->has_compr4 = GL_TRUE;
+ brw->has_aa_line_parameters = GL_TRUE;
+ } else {
+ brw->CMD_VF_STATISTICS = CMD_VF_STATISTICS_965;
+ brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_965;
+ }
+
+ /* WM maximum threads is number of EUs times number of threads per EU. */
+ if (intel->is_ironlake) {
+ brw->urb.size = 1024;
+ brw->vs_max_threads = 72;
+ brw->wm_max_threads = 12 * 6;
+ } else if (intel->is_g4x) {
+ brw->urb.size = 384;
+ brw->vs_max_threads = 32;
+ brw->wm_max_threads = 10 * 5;
+ } else {
+ brw->urb.size = 256;
+ brw->vs_max_threads = 16;
+ brw->wm_max_threads = 8 * 4;
+ brw->has_negative_rhw_bug = GL_TRUE;
+ }
+
+ if (INTEL_DEBUG & DEBUG_SINGLE_THREAD) {
+ brw->vs_max_threads = 1;
+ brw->wm_max_threads = 1;
+ }
+
brw_init_state( brw );
brw->state.dirty.mesa = ~0;
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index fded47aa2ff..79818b92b75 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -131,7 +131,6 @@ struct brw_context;
#define BRW_NEW_WM_INPUT_DIMENSIONS 0x100
#define BRW_NEW_PSP 0x800
#define BRW_NEW_WM_SURFACES 0x1000
-#define BRW_NEW_FENCE 0x2000
#define BRW_NEW_INDICES 0x4000
#define BRW_NEW_VERTICES 0x8000
/**
@@ -172,8 +171,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;
@@ -332,7 +331,6 @@ struct brw_cache {
struct brw_cache_item **items;
GLuint size, n_items;
- GLuint aux_size[BRW_MAX_CACHE];
char *name[BRW_MAX_CACHE];
/* Record of the last BOs chosen for each cache_id. Used to set
@@ -438,8 +436,11 @@ struct brw_context
GLuint primitive;
GLboolean emit_state_always;
- GLboolean no_batch_wrap;
-
+ GLboolean has_surface_tile_offset;
+ GLboolean has_compr4;
+ GLboolean has_negative_rhw_bug;
+ GLboolean has_aa_line_parameters;
+;
struct {
struct brw_state_flags dirty;
@@ -515,6 +516,12 @@ struct brw_context
*/
GLuint next_free_page;
+ /* hw-dependent 3DSTATE_VF_STATISTICS opcode */
+ uint32_t CMD_VF_STATISTICS;
+ /* hw-dependent 3DSTATE_PIPELINE_SELECT opcode */
+ uint32_t CMD_PIPELINE_SELECT;
+ int vs_max_threads;
+ int wm_max_threads;
/* BRW_NEW_URB_ALLOCATIONS:
*/
@@ -542,6 +549,7 @@ struct brw_context
GLuint clip_start;
GLuint sf_start;
GLuint cs_start;
+ GLuint size; /* Hardware URB size, in KB. */
} urb;
@@ -573,6 +581,7 @@ struct brw_context
struct {
struct brw_vs_prog_data *prog_data;
+ int8_t *constant_map; /* variable array following prog_data */
dri_bo *prog_bo;
dri_bo *state_bo;
@@ -669,7 +678,7 @@ void brwInitVtbl( struct brw_context *brw );
* brw_context.c
*/
GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate);
/*======================================================================
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index aadcfbe2dac..22e3e732f40 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -256,13 +256,24 @@ static void prepare_constant_buffer(struct brw_context *brw)
*/
_mesa_load_state_parameters(ctx, vp->program.Base.Parameters);
- /* XXX just use a memcpy here */
- for (i = 0; i < nr; i++) {
- const GLfloat *value = vp->program.Base.Parameters->ParameterValues[i];
- buf[offset + i * 4 + 0] = value[0];
- buf[offset + i * 4 + 1] = value[1];
- buf[offset + i * 4 + 2] = value[2];
- buf[offset + i * 4 + 3] = value[3];
+ if (vp->use_const_buffer) {
+ /* Load the subset of push constants that will get used when
+ * we also have a pull constant buffer.
+ */
+ for (i = 0; i < vp->program.Base.Parameters->NumParameters; i++) {
+ if (brw->vs.constant_map[i] != -1) {
+ assert(brw->vs.constant_map[i] <= nr);
+ memcpy(buf + offset + brw->vs.constant_map[i] * 4,
+ vp->program.Base.Parameters->ParameterValues[i],
+ 4 * sizeof(float));
+ }
+ }
+ } else {
+ for (i = 0; i < nr; i++) {
+ memcpy(buf + offset + i * 4,
+ vp->program.Base.Parameters->ParameterValues[i],
+ 4 * sizeof(float));
+ }
}
}
@@ -340,7 +351,7 @@ static void emit_constant_buffer(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
GLuint sz = brw->curbe.total_size;
- BEGIN_BATCH(2, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(2);
if (sz == 0) {
OUT_BATCH((CMD_CONST_BUFFER << 16) | (2 - 2));
OUT_BATCH(0);
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index c19510bbd42..ea0d7e05d41 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -832,12 +832,4 @@
#include "intel_chipset.h"
-#define BRW_IS_G4X(brw) (IS_G4X((brw)->intel.intelScreen->deviceID))
-#define BRW_IS_IGDNG(brw) (IS_IGDNG((brw)->intel.intelScreen->deviceID))
-#define BRW_IS_965(brw) (!(BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw)))
-#define CMD_PIPELINE_SELECT(brw) ((BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw)) ? CMD_PIPELINE_SELECT_GM45 : CMD_PIPELINE_SELECT_965)
-#define CMD_VF_STATISTICS(brw) ((BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw)) ? CMD_VF_STATISTICS_GM45 : CMD_VF_STATISTICS_965)
-#define URB_SIZES(brw) (BRW_IS_IGDNG(brw) ? 1024 : \
- (BRW_IS_G4X(brw) ? 384 : 256)) /* 512 bit units */
-
#endif
diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
index 130bd0f3e5b..a8f6b993ac3 100644
--- a/src/mesa/drivers/dri/i965/brw_disasm.c
+++ b/src/mesa/drivers/dri/i965/brw_disasm.c
@@ -239,7 +239,7 @@ char *imm_encoding[8] = {
[2] = "UW",
[3] = "W",
[5] = "VF",
- [5] = "V",
+ [6] = "V",
[7] = "F"
};
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index e17680a5252..d510d767f97 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -143,7 +143,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
@@ -155,13 +155,13 @@ static void brw_emit_prim(struct brw_context *brw,
}
if (prim_packet.verts_per_instance) {
intel_batchbuffer_data( brw->intel.batch, &prim_packet,
- sizeof(prim_packet), LOOP_CLIPRECTS);
+ sizeof(prim_packet));
}
if (intel->always_flush_cache) {
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,
@@ -337,13 +337,6 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
* so can't access it earlier.
*/
- LOCK_HARDWARE(intel);
-
- if (!intel->constant_cliprect && intel->driDrawable->numClipRects == 0) {
- UNLOCK_HARDWARE(intel);
- return GL_TRUE;
- }
-
for (i = 0; i < nr_prims; i++) {
uint32_t hw_prim;
@@ -354,8 +347,7 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
* an upper bound of how much we might emit in a single
* brw_try_draw_prims().
*/
- intel_batchbuffer_require_space(intel->batch, intel->batch->size / 4,
- LOOP_CLIPRECTS);
+ intel_batchbuffer_require_space(intel->batch, intel->batch->size / 4);
hw_prim = brw_set_prim(brw, prim[i].mode);
@@ -402,7 +394,6 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
if (intel->always_flush_batch)
intel_batchbuffer_flush(intel->batch);
out:
- UNLOCK_HARDWARE(intel);
brw_state_cache_check_size(brw);
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 16b2529fad0..c46b9ba89ce 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -55,6 +55,14 @@ static GLuint float_types[5] = {
BRW_SURFACEFORMAT_R32G32B32A32_FLOAT
};
+static GLuint half_float_types[5] = {
+ 0,
+ BRW_SURFACEFORMAT_R16_FLOAT,
+ BRW_SURFACEFORMAT_R16G16_FLOAT,
+ 0, /* can't seem to render this one */
+ BRW_SURFACEFORMAT_R16G16B16A16_FLOAT
+};
+
static GLuint uint_types_norm[5] = {
0,
BRW_SURFACEFORMAT_R32_UNORM,
@@ -168,6 +176,7 @@ static GLuint get_surface_type( GLenum type, GLuint size,
switch (type) {
case GL_DOUBLE: return double_types[size];
case GL_FLOAT: return float_types[size];
+ case GL_HALF_FLOAT: return half_float_types[size];
case GL_INT: return int_types_norm[size];
case GL_SHORT: return short_types_norm[size];
case GL_BYTE: return byte_types_norm[size];
@@ -190,6 +199,7 @@ static GLuint get_surface_type( GLenum type, GLuint size,
switch (type) {
case GL_DOUBLE: return double_types[size];
case GL_FLOAT: return float_types[size];
+ case GL_HALF_FLOAT: return half_float_types[size];
case GL_INT: return int_types_scale[size];
case GL_SHORT: return short_types_scale[size];
case GL_BYTE: return byte_types_scale[size];
@@ -207,6 +217,7 @@ static GLuint get_size( GLenum type )
switch (type) {
case GL_DOUBLE: return sizeof(GLdouble);
case GL_FLOAT: return sizeof(GLfloat);
+ case GL_HALF_FLOAT: return sizeof(GLhalfARB);
case GL_INT: return sizeof(GLint);
case GL_SHORT: return sizeof(GLshort);
case GL_BYTE: return sizeof(GLbyte);
@@ -239,16 +250,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,
@@ -500,7 +501,7 @@ static void brw_emit_vertices(struct brw_context *brw)
* a VE loads from them.
*/
if (brw->vb.nr_enabled == 0) {
- BEGIN_BATCH(3, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(3);
OUT_BATCH((CMD_VERTEX_ELEMENT << 16) | 1);
OUT_BATCH((0 << BRW_VE0_INDEX_SHIFT) |
BRW_VE0_VALID |
@@ -520,7 +521,7 @@ static void brw_emit_vertices(struct brw_context *brw)
* are interleaved or from the same VBO. TBD if this makes a
* performance difference.
*/
- BEGIN_BATCH(1 + brw->vb.nr_enabled * 4, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(1 + brw->vb.nr_enabled * 4);
OUT_BATCH((CMD_VERTEX_BUFFER << 16) |
((1 + brw->vb.nr_enabled * 4) - 2));
@@ -533,7 +534,7 @@ static void brw_emit_vertices(struct brw_context *brw)
OUT_RELOC(input->bo,
I915_GEM_DOMAIN_VERTEX, 0,
input->offset);
- if (BRW_IS_IGDNG(brw)) {
+ if (intel->is_ironlake) {
OUT_RELOC(input->bo,
I915_GEM_DOMAIN_VERTEX, 0,
input->bo->size - 1);
@@ -543,7 +544,7 @@ static void brw_emit_vertices(struct brw_context *brw)
}
ADVANCE_BATCH();
- BEGIN_BATCH(1 + brw->vb.nr_enabled * 2, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(1 + brw->vb.nr_enabled * 2);
OUT_BATCH((CMD_VERTEX_ELEMENT << 16) | ((1 + brw->vb.nr_enabled * 2) - 2));
for (i = 0; i < brw->vb.nr_enabled; i++) {
struct brw_vertex_element *input = brw->vb.enabled[i];
@@ -569,7 +570,7 @@ static void brw_emit_vertices(struct brw_context *brw)
(format << BRW_VE0_FORMAT_SHIFT) |
(0 << BRW_VE0_SRC_OFFSET_SHIFT));
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
OUT_BATCH((comp0 << BRW_VE1_COMPONENT_0_SHIFT) |
(comp1 << BRW_VE1_COMPONENT_1_SHIFT) |
(comp2 << BRW_VE1_COMPONENT_2_SHIFT) |
@@ -710,7 +711,7 @@ static void brw_emit_index_buffer(struct brw_context *brw)
ib.header.bits.index_format = get_index_type(index_buffer->type);
ib.header.bits.cut_index_enable = 0;
- BEGIN_BATCH(4, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(4);
OUT_BATCH( ib.header.dword );
OUT_RELOC(brw->ib.bo,
I915_GEM_DOMAIN_VERTEX, 0,
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index c8fb0a288f2..8d6ac008396 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -252,9 +252,10 @@ static void brw_set_math_message( struct brw_context *brw,
GLboolean saturate,
GLuint dataType )
{
+ struct intel_context *intel = &brw->intel;
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
+ if (intel->is_ironlake) {
insn->bits3.math_igdng.function = function;
insn->bits3.math_igdng.int_type = integer_type;
insn->bits3.math_igdng.precision = low_precision;
@@ -319,9 +320,10 @@ static void brw_set_urb_message( struct brw_context *brw,
GLuint offset,
GLuint swizzle_control )
{
+ struct intel_context *intel = &brw->intel;
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
+ if (intel->is_ironlake) {
insn->bits3.urb_igdng.opcode = 0; /* ? */
insn->bits3.urb_igdng.offset = offset;
insn->bits3.urb_igdng.swizzle_control = swizzle_control;
@@ -358,9 +360,10 @@ static void brw_set_dp_write_message( struct brw_context *brw,
GLuint response_length,
GLuint end_of_thread )
{
+ struct intel_context *intel = &brw->intel;
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
+ if (intel->is_ironlake) {
insn->bits3.dp_write_igdng.binding_table_index = binding_table_index;
insn->bits3.dp_write_igdng.msg_control = msg_control;
insn->bits3.dp_write_igdng.pixel_scoreboard_clear = pixel_scoreboard_clear;
@@ -395,9 +398,10 @@ static void brw_set_dp_read_message( struct brw_context *brw,
GLuint response_length,
GLuint end_of_thread )
{
+ struct intel_context *intel = &brw->intel;
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
+ if (intel->is_ironlake) {
insn->bits3.dp_read_igdng.binding_table_index = binding_table_index;
insn->bits3.dp_read_igdng.msg_control = msg_control;
insn->bits3.dp_read_igdng.msg_type = msg_type;
@@ -433,10 +437,11 @@ static void brw_set_sampler_message(struct brw_context *brw,
GLuint header_present,
GLuint simd_mode)
{
+ struct intel_context *intel = &brw->intel;
assert(eot == 0);
brw_set_src1(insn, brw_imm_d(0));
- if (BRW_IS_IGDNG(brw)) {
+ if (intel->is_ironlake) {
insn->bits3.sampler_igdng.binding_table_index = binding_table_index;
insn->bits3.sampler_igdng.sampler = sampler;
insn->bits3.sampler_igdng.msg_type = msg_type;
@@ -447,7 +452,7 @@ static void brw_set_sampler_message(struct brw_context *brw,
insn->bits3.sampler_igdng.end_of_thread = eot;
insn->bits2.send_igdng.sfid = BRW_MESSAGE_TARGET_SAMPLER;
insn->bits2.send_igdng.end_of_thread = eot;
- } else if (BRW_IS_G4X(brw)) {
+ } else if (intel->is_g4x) {
insn->bits3.sampler_g4x.binding_table_index = binding_table_index;
insn->bits3.sampler_g4x.sampler = sampler;
insn->bits3.sampler_g4x.msg_type = msg_type;
@@ -648,10 +653,11 @@ struct brw_instruction *brw_IF(struct brw_compile *p, GLuint execute_size)
struct brw_instruction *brw_ELSE(struct brw_compile *p,
struct brw_instruction *if_insn)
{
+ struct intel_context *intel = &p->brw->intel;
struct brw_instruction *insn;
GLuint br = 1;
- if (BRW_IS_IGDNG(p->brw))
+ if (intel->is_ironlake)
br = 2;
if (p->single_program_flow) {
@@ -690,9 +696,10 @@ struct brw_instruction *brw_ELSE(struct brw_compile *p,
void brw_ENDIF(struct brw_compile *p,
struct brw_instruction *patch_insn)
{
+ struct intel_context *intel = &p->brw->intel;
GLuint br = 1;
- if (BRW_IS_IGDNG(p->brw))
+ if (intel->is_ironlake)
br = 2;
if (p->single_program_flow) {
@@ -803,10 +810,11 @@ struct brw_instruction *brw_DO(struct brw_compile *p, GLuint execute_size)
struct brw_instruction *brw_WHILE(struct brw_compile *p,
struct brw_instruction *do_insn)
{
+ struct intel_context *intel = &p->brw->intel;
struct brw_instruction *insn;
GLuint br = 1;
- if (BRW_IS_IGDNG(p->brw))
+ if (intel->is_ironlake)
br = 2;
if (p->single_program_flow)
@@ -846,10 +854,11 @@ struct brw_instruction *brw_WHILE(struct brw_compile *p,
void brw_land_fwd_jump(struct brw_compile *p,
struct brw_instruction *jmp_insn)
{
+ struct intel_context *intel = &p->brw->intel;
struct brw_instruction *landing = &p->store[p->nr_insn];
GLuint jmpi = 1;
- if (BRW_IS_IGDNG(p->brw))
+ if (intel->is_ironlake)
jmpi = 2;
assert(jmp_insn->header.opcode == BRW_OPCODE_JMPI);
diff --git a/src/mesa/drivers/dri/i965/brw_fallback.c b/src/mesa/drivers/dri/i965/brw_fallback.c
index 1914febf269..79691c3a0f9 100644
--- a/src/mesa/drivers/dri/i965/brw_fallback.c
+++ b/src/mesa/drivers/dri/i965/brw_fallback.c
@@ -40,13 +40,10 @@
#include "intel_fbo.h"
#include "intel_regions.h"
-#include "glapi/glapi.h"
-
#define FILE_DEBUG_FLAG DEBUG_FALLBACKS
static GLboolean do_check_fallback(struct brw_context *brw)
{
- struct intel_context *intel = &brw->intel;
GLcontext *ctx = &brw->intel.ctx;
GLuint i;
@@ -85,8 +82,7 @@ static GLboolean do_check_fallback(struct brw_context *brw)
}
/* _NEW_BUFFERS */
- if (IS_965(intel->intelScreen->deviceID) &&
- !IS_G4X(intel->intelScreen->deviceID)) {
+ if (!brw->has_surface_tile_offset) {
for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[i];
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 610b6c35e2a..7261b316c10 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -47,6 +47,7 @@
static void compile_gs_prog( struct brw_context *brw,
struct brw_gs_prog_key *key )
{
+ struct intel_context *intel = &brw->intel;
struct brw_gs_compile c;
const GLuint *program;
GLuint program_size;
@@ -54,13 +55,12 @@ static void compile_gs_prog( struct brw_context *brw,
memset(&c, 0, sizeof(c));
c.key = *key;
- c.need_ff_sync = BRW_IS_IGDNG(brw);
/* Need to locate the two positions present in vertex + header.
* These are currently hardcoded:
*/
c.nr_attrs = brw_count_bits(c.key.attrs);
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
c.nr_regs = (c.nr_attrs + 1) / 2 + 3; /* are vertices packed, or reg-aligned? */
else
c.nr_regs = (c.nr_attrs + 1) / 2 + 1; /* are vertices packed, or reg-aligned? */
@@ -125,12 +125,13 @@ static void compile_gs_prog( struct brw_context *brw,
/* Upload
*/
dri_bo_unreference(brw->gs.prog_bo);
- brw->gs.prog_bo = brw_upload_cache( &brw->cache, BRW_GS_PROG,
- &c.key, sizeof(c.key),
- NULL, 0,
- program, program_size,
- &c.prog_data,
- &brw->gs.prog_data );
+ brw->gs.prog_bo = brw_upload_cache_with_auxdata(&brw->cache, BRW_GS_PROG,
+ &c.key, sizeof(c.key),
+ NULL, 0,
+ program, program_size,
+ &c.prog_data,
+ sizeof(c.prog_data),
+ &brw->gs.prog_data);
}
static const GLenum gs_prim[GL_POLYGON+1] = {
diff --git a/src/mesa/drivers/dri/i965/brw_gs.h b/src/mesa/drivers/dri/i965/brw_gs.h
index 010c1c23521..813b8d447ae 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.h
+++ b/src/mesa/drivers/dri/i965/brw_gs.h
@@ -63,7 +63,6 @@ struct brw_gs_compile {
GLuint nr_attrs;
GLuint nr_regs;
GLuint nr_bytes;
- GLboolean need_ff_sync;
};
#define ATTR_SIZE (4*4)
diff --git a/src/mesa/drivers/dri/i965/brw_gs_emit.c b/src/mesa/drivers/dri/i965/brw_gs_emit.c
index e9b71ed0c36..dd7b057d620 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_emit.c
@@ -121,12 +121,14 @@ static void brw_gs_ff_sync(struct brw_gs_compile *c, int num_prim)
void brw_gs_quads( struct brw_gs_compile *c, struct brw_gs_prog_key *key )
{
+ struct intel_context *intel = &c->func.brw->intel;
+
brw_gs_alloc_regs(c, 4);
/* Use polygons for correct edgeflag behaviour. Note that vertex 3
* is the PV for quads, but vertex 0 for polygons:
*/
- if (c->need_ff_sync)
+ if (intel->needs_ff_sync)
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));
@@ -144,9 +146,11 @@ 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 )
{
+ struct intel_context *intel = &c->func.brw->intel;
+
brw_gs_alloc_regs(c, 4);
- if (c->need_ff_sync)
+ if (intel->needs_ff_sync)
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));
@@ -164,9 +168,11 @@ 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 )
{
+ struct intel_context *intel = &c->func.brw->intel;
+
brw_gs_alloc_regs(c, 3);
- if (c->need_ff_sync)
+ if (intel->needs_ff_sync)
brw_gs_ff_sync(c, 1);
brw_gs_emit_vue(c, c->reg.vertex[0], 0, ((_3DPRIM_TRILIST << 2) | R02_PRIM_START));
brw_gs_emit_vue(c, c->reg.vertex[1], 0, (_3DPRIM_TRILIST << 2));
@@ -175,9 +181,11 @@ void brw_gs_tris( struct brw_gs_compile *c )
void brw_gs_lines( struct brw_gs_compile *c )
{
+ struct intel_context *intel = &c->func.brw->intel;
+
brw_gs_alloc_regs(c, 2);
- if (c->need_ff_sync)
+ if (intel->needs_ff_sync)
brw_gs_ff_sync(c, 1);
brw_gs_emit_vue(c, c->reg.vertex[0], 0, ((_3DPRIM_LINESTRIP << 2) | R02_PRIM_START));
brw_gs_emit_vue(c, c->reg.vertex[1], 1, ((_3DPRIM_LINESTRIP << 2) | R02_PRIM_END));
@@ -185,9 +193,11 @@ void brw_gs_lines( struct brw_gs_compile *c )
void brw_gs_points( struct brw_gs_compile *c )
{
+ struct intel_context *intel = &c->func.brw->intel;
+
brw_gs_alloc_regs(c, 1);
- if (c->need_ff_sync)
+ if (intel->needs_ff_sync)
brw_gs_ff_sync(c, 1);
brw_gs_emit_vue(c, c->reg.vertex[0], 1, ((_3DPRIM_POINTLIST << 2) | R02_PRIM_START | R02_PRIM_END));
}
diff --git a/src/mesa/drivers/dri/i965/brw_gs_state.c b/src/mesa/drivers/dri/i965/brw_gs_state.c
index d291f5b595f..d8ad5cecf3f 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_state.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_state.c
@@ -71,6 +71,7 @@ gs_unit_populate_key(struct brw_context *brw, struct brw_gs_unit_key *key)
static dri_bo *
gs_unit_create_from_key(struct brw_context *brw, struct brw_gs_unit_key *key)
{
+ struct intel_context *intel = &brw->intel;
struct brw_gs_unit_state gs;
dri_bo *bo;
@@ -97,7 +98,7 @@ gs_unit_create_from_key(struct brw_context *brw, struct brw_gs_unit_key *key)
else
gs.thread4.max_threads = 0;
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
gs.thread4.rendering_enable = 1;
if (INTEL_DEBUG & DEBUG_STATS)
@@ -106,8 +107,7 @@ gs_unit_create_from_key(struct brw_context *brw, struct brw_gs_unit_key *key)
bo = brw_upload_cache(&brw->cache, BRW_GS_UNIT,
key, sizeof(*key),
&brw->gs.prog_bo, 1,
- &gs, sizeof(gs),
- NULL, NULL);
+ &gs, sizeof(gs));
if (key->prog_active) {
/* Emit GS program relocation */
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 4b0d5983360..7b70f787b7b 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -78,10 +78,7 @@ static void upload_drawing_rect(struct brw_context *brw)
struct intel_context *intel = &brw->intel;
GLcontext *ctx = &intel->ctx;
- if (!intel->constant_cliprect)
- return;
-
- BEGIN_BATCH(4, NO_LOOP_CLIPRECTS);
+ BEGIN_BATCH(4);
OUT_BATCH(_3DSTATE_DRAWRECT_INFO_I965);
OUT_BATCH(0); /* xmin, ymin */
OUT_BATCH(((ctx->DrawBuffer->Width - 1) & 0xffff) |
@@ -116,7 +113,7 @@ static void upload_binding_table_pointers(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
- BEGIN_BATCH(6, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(6);
OUT_BATCH(CMD_BINDING_TABLE_PTRS << 16 | (6 - 2));
if (brw->vs.bind_bo != NULL)
OUT_RELOC(brw->vs.bind_bo, I915_GEM_DOMAIN_SAMPLER, 0, 0); /* vs */
@@ -150,7 +147,7 @@ static void upload_pipelined_state_pointers(struct brw_context *brw )
{
struct intel_context *intel = &brw->intel;
- BEGIN_BATCH(7, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(7);
OUT_BATCH(CMD_PIPELINED_STATE_POINTERS << 16 | (7 - 2));
OUT_RELOC(brw->vs.state_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
if (brw->gs.prog_active)
@@ -212,10 +209,10 @@ static void emit_depthbuffer(struct brw_context *brw)
{
struct intel_context *intel = &brw->intel;
struct intel_region *region = brw->state.depth_region;
- unsigned int len = (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw)) ? 6 : 5;
+ unsigned int len = (intel->is_g4x || intel->is_ironlake) ? 6 : 5;
if (region == NULL) {
- BEGIN_BATCH(len, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(len);
OUT_BATCH(CMD_DEPTH_BUFFER << 16 | (len - 2));
OUT_BATCH((BRW_DEPTHFORMAT_D32_FLOAT << 18) |
(BRW_SURFACE_NULL << 29));
@@ -223,7 +220,7 @@ static void emit_depthbuffer(struct brw_context *brw)
OUT_BATCH(0);
OUT_BATCH(0);
- if (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))
+ if (intel->is_g4x || intel->is_ironlake)
OUT_BATCH(0);
ADVANCE_BATCH();
@@ -247,7 +244,7 @@ static void emit_depthbuffer(struct brw_context *brw)
assert(region->tiling != I915_TILING_X);
- BEGIN_BATCH(len, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(len);
OUT_BATCH(CMD_DEPTH_BUFFER << 16 | (len - 2));
OUT_BATCH(((region->pitch * region->cpp) - 1) |
(format << 18) |
@@ -262,7 +259,7 @@ static void emit_depthbuffer(struct brw_context *brw)
((region->height - 1) << 19));
OUT_BATCH(0);
- if (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))
+ if (intel->is_g4x || intel->is_ironlake)
OUT_BATCH(0);
ADVANCE_BATCH();
@@ -330,7 +327,7 @@ const struct brw_tracked_state brw_polygon_stipple = {
static void upload_polygon_stipple_offset(struct brw_context *brw)
{
- __DRIdrawablePrivate *dPriv = brw->intel.driDrawable;
+ __DRIdrawable *dPriv = brw->intel.driDrawable;
struct brw_polygon_stipple_offset bpso;
memset(&bpso, 0, sizeof(bpso));
@@ -374,8 +371,8 @@ const struct brw_tracked_state brw_polygon_stipple_offset = {
static void upload_aa_line_parameters(struct brw_context *brw)
{
struct brw_aa_line_parameters balp;
-
- if (BRW_IS_965(brw))
+
+ if (!brw->has_aa_line_parameters)
return;
/* use legacy aa line coverage computation */
@@ -444,7 +441,7 @@ static void upload_invarient_state( struct brw_context *brw )
struct brw_pipeline_select ps;
memset(&ps, 0, sizeof(ps));
- ps.header.opcode = CMD_PIPELINE_SELECT(brw);
+ ps.header.opcode = brw->CMD_PIPELINE_SELECT;
ps.header.pipeline_select = 0;
BRW_BATCH_STRUCT(brw, &ps);
}
@@ -480,7 +477,7 @@ static void upload_invarient_state( struct brw_context *brw )
struct brw_vf_statistics vfs;
memset(&vfs, 0, sizeof(vfs));
- vfs.opcode = CMD_VF_STATISTICS(brw);
+ vfs.opcode = brw->CMD_VF_STATISTICS;
if (INTEL_DEBUG & DEBUG_STATS)
vfs.statistics_enable = 1;
@@ -512,8 +509,8 @@ static void upload_state_base_address( struct brw_context *brw )
/* Output the structure (brw_state_base_address) directly to the
* batchbuffer, so we can emit relocations inline.
*/
- if (BRW_IS_IGDNG(brw)) {
- BEGIN_BATCH(8, IGNORE_CLIPRECTS);
+ if (intel->is_ironlake) {
+ BEGIN_BATCH(8);
OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (8 - 2));
OUT_BATCH(1); /* General state base address */
OUT_BATCH(1); /* Surface state base address */
@@ -524,7 +521,7 @@ static void upload_state_base_address( struct brw_context *brw )
OUT_BATCH(1); /* Instruction access upper bound */
ADVANCE_BATCH();
} else {
- BEGIN_BATCH(6, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(6);
OUT_BATCH(CMD_STATE_BASE_ADDRESS << 16 | (6 - 2));
OUT_BATCH(1); /* General state base address */
OUT_BATCH(1); /* Surface state base address */
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index a195bc32b07..5399a742449 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -188,7 +188,7 @@ brw_emit_query_begin(struct brw_context *brw)
if (brw->query.active || is_empty_list(&brw->query.active_head))
return;
- BEGIN_BATCH(4, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(4);
OUT_BATCH(_3DSTATE_PIPE_CONTROL |
PIPE_CONTROL_DEPTH_STALL |
PIPE_CONTROL_WRITE_DEPTH_COUNT);
@@ -227,7 +227,7 @@ brw_emit_query_end(struct brw_context *brw)
if (!brw->query.active)
return;
- BEGIN_BATCH(4, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(4);
OUT_BATCH(_3DSTATE_PIPE_CONTROL |
PIPE_CONTROL_DEPTH_STALL |
PIPE_CONTROL_WRITE_DEPTH_COUNT);
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 968890f7fb1..8e6839b8120 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -117,12 +117,13 @@ static void compile_sf_prog( struct brw_context *brw,
/* Upload
*/
dri_bo_unreference(brw->sf.prog_bo);
- brw->sf.prog_bo = brw_upload_cache( &brw->cache, BRW_SF_PROG,
- &c.key, sizeof(c.key),
- NULL, 0,
- program, program_size,
- &c.prog_data,
- &brw->sf.prog_data );
+ brw->sf.prog_bo = brw_upload_cache_with_auxdata(&brw->cache, BRW_SF_PROG,
+ &c.key, sizeof(c.key),
+ NULL, 0,
+ program, program_size,
+ &c.prog_data,
+ sizeof(c.prog_data),
+ &brw->sf.prog_data);
}
/* Calculate interpolants for triangle and line rasterization.
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c
index 3eae41ee742..bb08055e3bb 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c
@@ -149,6 +149,7 @@ static void copy_colors( struct brw_sf_compile *c,
static void do_flatshade_triangle( struct brw_sf_compile *c )
{
struct brw_compile *p = &c->func;
+ struct intel_context *intel = &p->brw->intel;
struct brw_reg ip = brw_ip_reg();
GLuint nr = brw_count_bits(c->key.attrs & VERT_RESULT_COLOR_BITS);
GLuint jmpi = 1;
@@ -161,7 +162,7 @@ static void do_flatshade_triangle( struct brw_sf_compile *c )
if (c->key.primitive == SF_UNFILLED_TRIS)
return;
- if (BRW_IS_IGDNG(p->brw))
+ if (intel->is_ironlake)
jmpi = 2;
brw_push_insn_state(p);
@@ -187,6 +188,7 @@ static void do_flatshade_triangle( struct brw_sf_compile *c )
static void do_flatshade_line( struct brw_sf_compile *c )
{
struct brw_compile *p = &c->func;
+ struct intel_context *intel = &p->brw->intel;
struct brw_reg ip = brw_ip_reg();
GLuint nr = brw_count_bits(c->key.attrs & VERT_RESULT_COLOR_BITS);
GLuint jmpi = 1;
@@ -199,7 +201,7 @@ static void do_flatshade_line( struct brw_sf_compile *c )
if (c->key.primitive == SF_UNFILLED_TRIS)
return;
- if (BRW_IS_IGDNG(p->brw))
+ if (intel->is_ironlake)
jmpi = 2;
brw_push_insn_state(p);
diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c
index b76ed98c4ba..8ebbd09e436 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
@@ -164,6 +164,7 @@ static dri_bo *
sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
dri_bo **reloc_bufs)
{
+ struct intel_context *intel = &brw->intel;
struct brw_sf_unit_state sf;
dri_bo *bo;
int chipset_max_threads;
@@ -176,7 +177,7 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
sf.thread3.dispatch_grf_start_reg = 3;
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
sf.thread3.urb_entry_read_offset = 3;
else
sf.thread3.urb_entry_read_offset = 1;
@@ -186,10 +187,10 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
sf.thread4.nr_urb_entries = key->nr_urb_entries;
sf.thread4.urb_entry_allocation_size = key->sfsize - 1;
- /* Each SF thread produces 1 PUE, and there can be up to 24(Pre-IGDNG) or
- * 48(IGDNG) threads
+ /* Each SF thread produces 1 PUE, and there can be up to 24 (Pre-Ironlake) or
+ * 48 (Ironlake) threads.
*/
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
chipset_max_threads = 48;
else
chipset_max_threads = 24;
@@ -307,8 +308,7 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
bo = brw_upload_cache(&brw->cache, BRW_SF_UNIT,
key, sizeof(*key),
reloc_bufs, 2,
- &sf, sizeof(sf),
- NULL, NULL);
+ &sf, sizeof(sf));
/* STATE_PREFETCH command description describes this state as being
* something loaded through the GPE (L2 ISC), so it's INSTRUCTION domain.
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 14d5319796a..536fe8b249b 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -124,16 +124,26 @@ dri_bo *brw_cache_data(struct brw_cache *cache,
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,
- GLuint key_sz,
- dri_bo **reloc_bufs,
- GLuint nr_reloc_bufs,
- const void *data,
- GLuint data_sz,
- const void *aux,
- void *aux_return );
+drm_intel_bo *brw_upload_cache(struct brw_cache *cache,
+ enum brw_cache_id cache_id,
+ const void *key,
+ GLuint key_sz,
+ dri_bo **reloc_bufs,
+ GLuint nr_reloc_bufs,
+ const void *data,
+ GLuint data_sz);
+
+drm_intel_bo *brw_upload_cache_with_auxdata(struct brw_cache *cache,
+ enum brw_cache_id cache_id,
+ const void *key,
+ GLuint key_sz,
+ dri_bo **reloc_bufs,
+ GLuint nr_reloc_bufs,
+ const void *data,
+ GLuint data_sz,
+ const void *aux,
+ GLuint aux_sz,
+ void *aux_return);
dri_bo *brw_search_cache( struct brw_cache *cache,
enum brw_cache_id cache_id,
@@ -151,7 +161,7 @@ void brw_state_cache_bo_delete(struct brw_cache *cache, dri_bo *bo);
/***********************************************************************
* brw_state_batch.c
*/
-#define BRW_BATCH_STRUCT(brw, s) intel_batchbuffer_data( brw->intel.batch, (s), sizeof(*(s)), IGNORE_CLIPRECTS)
+#define BRW_BATCH_STRUCT(brw, s) intel_batchbuffer_data( brw->intel.batch, (s), sizeof(*(s)))
#define BRW_CACHED_BATCH_STRUCT(brw, s) brw_cached_batch_struct( brw, (s), sizeof(*(s)) )
GLboolean brw_cached_batch_struct( struct brw_context *brw,
diff --git a/src/mesa/drivers/dri/i965/brw_state_batch.c b/src/mesa/drivers/dri/i965/brw_state_batch.c
index 7821898cf9b..ed8120d617f 100644
--- a/src/mesa/drivers/dri/i965/brw_state_batch.c
+++ b/src/mesa/drivers/dri/i965/brw_state_batch.c
@@ -48,7 +48,7 @@ GLboolean brw_cached_batch_struct( struct brw_context *brw,
struct header *newheader = (struct header *)data;
if (brw->emit_state_always) {
- intel_batchbuffer_data(brw->intel.batch, data, sz, IGNORE_CLIPRECTS);
+ intel_batchbuffer_data(brw->intel.batch, data, sz);
return GL_TRUE;
}
@@ -75,7 +75,7 @@ GLboolean brw_cached_batch_struct( struct brw_context *brw,
emit:
memcpy(item->header, newheader, sz);
- intel_batchbuffer_data(brw->intel.batch, data, sz, IGNORE_CLIPRECTS);
+ intel_batchbuffer_data(brw->intel.batch, data, sz);
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index e4c9ba7d870..5fc47b0420a 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -71,25 +71,23 @@
static GLuint
-hash_key(const void *key, GLuint key_size,
- dri_bo **reloc_bufs, GLuint nr_reloc_bufs)
+hash_key(struct brw_cache_item *item)
{
- GLuint *ikey = (GLuint *)key;
- GLuint hash = 0, i;
+ GLuint *ikey = (GLuint *)item->key;
+ GLuint hash = item->cache_id, i;
- assert(key_size % 4 == 0);
+ assert(item->key_size % 4 == 0);
/* I'm sure this can be improved on:
*/
- for (i = 0; i < key_size/4; i++) {
+ for (i = 0; i < item->key_size/4; i++) {
hash ^= ikey[i];
hash = (hash << 5) | (hash >> 27);
}
/* Include the BO pointers as key data as well */
- ikey = (GLuint *)reloc_bufs;
- key_size = nr_reloc_bufs * sizeof(dri_bo *);
- for (i = 0; i < key_size/4; i++) {
+ ikey = (GLuint *)item->reloc_bufs;
+ for (i = 0; i < item->nr_reloc_bufs * sizeof(drm_intel_bo *) / 4; i++) {
hash ^= ikey[i];
hash = (hash << 5) | (hash >> 27);
}
@@ -114,11 +112,22 @@ update_cache_last(struct brw_cache *cache, enum brw_cache_id cache_id,
cache->brw->state.dirty.cache |= 1 << cache_id;
}
+static int
+brw_cache_item_equals(const struct brw_cache_item *a,
+ const struct brw_cache_item *b)
+{
+ return a->cache_id == b->cache_id &&
+ a->hash == b->hash &&
+ a->key_size == b->key_size &&
+ (memcmp(a->key, b->key, a->key_size) == 0) &&
+ a->nr_reloc_bufs == b->nr_reloc_bufs &&
+ (memcmp(a->reloc_bufs, b->reloc_bufs,
+ a->nr_reloc_bufs * sizeof(dri_bo *)) == 0);
+}
static struct brw_cache_item *
-search_cache(struct brw_cache *cache, enum brw_cache_id cache_id,
- GLuint hash, const void *key, GLuint key_size,
- dri_bo **reloc_bufs, GLuint nr_reloc_bufs)
+search_cache(struct brw_cache *cache, GLuint hash,
+ struct brw_cache_item *lookup)
{
struct brw_cache_item *c;
@@ -133,13 +142,7 @@ search_cache(struct brw_cache *cache, enum brw_cache_id cache_id,
#endif
for (c = cache->items[hash % cache->size]; c; c = c->next) {
- if (c->cache_id == cache_id &&
- c->hash == hash &&
- c->key_size == key_size &&
- memcmp(c->key, key, key_size) == 0 &&
- c->nr_reloc_bufs == nr_reloc_bufs &&
- memcmp(c->reloc_bufs, reloc_bufs,
- nr_reloc_bufs * sizeof(dri_bo *)) == 0)
+ if (brw_cache_item_equals(lookup, c))
return c;
}
@@ -182,10 +185,18 @@ brw_search_cache(struct brw_cache *cache,
void *aux_return)
{
struct brw_cache_item *item;
- GLuint hash = hash_key(key, key_size, reloc_bufs, nr_reloc_bufs);
+ struct brw_cache_item lookup;
+ GLuint hash;
- item = search_cache(cache, cache_id, hash, key, key_size,
- reloc_bufs, nr_reloc_bufs);
+ lookup.cache_id = cache_id;
+ lookup.key = key;
+ lookup.key_size = key_size;
+ lookup.reloc_bufs = reloc_bufs;
+ lookup.nr_reloc_bufs = nr_reloc_bufs;
+ hash = hash_key(&lookup);
+ lookup.hash = hash;
+
+ item = search_cache(cache, hash, &lookup);
if (item == NULL)
return NULL;
@@ -200,26 +211,34 @@ brw_search_cache(struct brw_cache *cache,
}
-dri_bo *
-brw_upload_cache( struct brw_cache *cache,
- enum brw_cache_id cache_id,
- const void *key,
- GLuint key_size,
- dri_bo **reloc_bufs,
- GLuint nr_reloc_bufs,
- const void *data,
- GLuint data_size,
- const void *aux,
- void *aux_return )
+drm_intel_bo *
+brw_upload_cache_with_auxdata(struct brw_cache *cache,
+ enum brw_cache_id cache_id,
+ const void *key,
+ GLuint key_size,
+ dri_bo **reloc_bufs,
+ GLuint nr_reloc_bufs,
+ const void *data,
+ GLuint data_size,
+ const void *aux,
+ GLuint aux_size,
+ void *aux_return)
{
struct brw_cache_item *item = CALLOC_STRUCT(brw_cache_item);
- GLuint hash = hash_key(key, key_size, reloc_bufs, nr_reloc_bufs);
+ GLuint hash;
GLuint relocs_size = nr_reloc_bufs * sizeof(dri_bo *);
- GLuint aux_size = cache->aux_size[cache_id];
void *tmp;
dri_bo *bo;
int i;
+ item->cache_id = cache_id;
+ item->key = key;
+ item->key_size = key_size;
+ item->reloc_bufs = reloc_bufs;
+ item->nr_reloc_bufs = nr_reloc_bufs;
+ hash = hash_key(item);
+ item->hash = hash;
+
/* Create the buffer object to contain the data */
bo = dri_bo_alloc(cache->brw->intel.bufmgr,
cache->name[cache_id], data_size, 1 << 6);
@@ -229,19 +248,15 @@ brw_upload_cache( struct brw_cache *cache,
tmp = _mesa_malloc(key_size + aux_size + relocs_size);
memcpy(tmp, key, key_size);
- memcpy(tmp + key_size, aux, cache->aux_size[cache_id]);
+ memcpy(tmp + key_size, aux, aux_size);
memcpy(tmp + key_size + aux_size, reloc_bufs, relocs_size);
for (i = 0; i < nr_reloc_bufs; i++) {
if (reloc_bufs[i] != NULL)
dri_bo_reference(reloc_bufs[i]);
}
- item->cache_id = cache_id;
item->key = tmp;
- item->hash = hash;
- item->key_size = key_size;
item->reloc_bufs = tmp + key_size + aux_size;
- item->nr_reloc_bufs = nr_reloc_bufs;
item->bo = bo;
dri_bo_reference(bo);
@@ -255,7 +270,6 @@ brw_upload_cache( struct brw_cache *cache,
cache->n_items++;
if (aux_return) {
- assert(cache->aux_size[cache_id]);
*(void **)aux_return = (void *)((char *)item->key + item->key_size);
}
@@ -272,6 +286,23 @@ brw_upload_cache( struct brw_cache *cache,
return bo;
}
+drm_intel_bo *
+brw_upload_cache(struct brw_cache *cache,
+ enum brw_cache_id cache_id,
+ const void *key,
+ GLuint key_size,
+ dri_bo **reloc_bufs,
+ GLuint nr_reloc_bufs,
+ const void *data,
+ GLuint data_size)
+{
+ return brw_upload_cache_with_auxdata(cache, cache_id,
+ key, key_size,
+ reloc_bufs, nr_reloc_bufs,
+ data, data_size,
+ NULL, 0,
+ NULL);
+}
/**
* Wrapper around brw_cache_data_sz using the cache_id's canonical key size.
@@ -292,11 +323,18 @@ brw_cache_data(struct brw_cache *cache,
GLuint nr_reloc_bufs)
{
dri_bo *bo;
- struct brw_cache_item *item;
- GLuint hash = hash_key(data, data_size, reloc_bufs, nr_reloc_bufs);
-
- item = search_cache(cache, cache_id, hash, data, data_size,
- reloc_bufs, nr_reloc_bufs);
+ struct brw_cache_item *item, lookup;
+ GLuint hash;
+
+ lookup.cache_id = cache_id;
+ lookup.key = data;
+ lookup.key_size = data_size;
+ lookup.reloc_bufs = reloc_bufs;
+ lookup.nr_reloc_bufs = nr_reloc_bufs;
+ hash = hash_key(&lookup);
+ lookup.hash = hash;
+
+ item = search_cache(cache, hash, &lookup);
if (item) {
update_cache_last(cache, cache_id, item->bo);
dri_bo_reference(item->bo);
@@ -306,8 +344,7 @@ brw_cache_data(struct brw_cache *cache,
bo = brw_upload_cache(cache, cache_id,
data, data_size,
reloc_bufs, nr_reloc_bufs,
- data, data_size,
- NULL, NULL);
+ data, data_size);
return bo;
}
@@ -321,11 +358,9 @@ enum pool_type {
static void
brw_init_cache_id(struct brw_cache *cache,
const char *name,
- enum brw_cache_id id,
- GLuint aux_size)
+ enum brw_cache_id id)
{
cache->name[id] = strdup(name);
- cache->aux_size[id] = aux_size;
}
@@ -341,80 +376,28 @@ brw_init_non_surface_cache(struct brw_context *brw)
cache->items = (struct brw_cache_item **)
_mesa_calloc(cache->size * sizeof(struct brw_cache_item));
- brw_init_cache_id(cache,
- "CC_VP",
- BRW_CC_VP,
- 0);
-
- brw_init_cache_id(cache,
- "CC_UNIT",
- BRW_CC_UNIT,
- 0);
-
- brw_init_cache_id(cache,
- "WM_PROG",
- BRW_WM_PROG,
- sizeof(struct brw_wm_prog_data));
-
- brw_init_cache_id(cache,
- "SAMPLER_DEFAULT_COLOR",
- BRW_SAMPLER_DEFAULT_COLOR,
- 0);
-
- brw_init_cache_id(cache,
- "SAMPLER",
- BRW_SAMPLER,
- 0);
-
- brw_init_cache_id(cache,
- "WM_UNIT",
- BRW_WM_UNIT,
- 0);
-
- brw_init_cache_id(cache,
- "SF_PROG",
- BRW_SF_PROG,
- sizeof(struct brw_sf_prog_data));
-
- brw_init_cache_id(cache,
- "SF_VP",
- BRW_SF_VP,
- 0);
-
- brw_init_cache_id(cache,
- "SF_UNIT",
- BRW_SF_UNIT,
- 0);
-
- brw_init_cache_id(cache,
- "VS_UNIT",
- BRW_VS_UNIT,
- 0);
-
- brw_init_cache_id(cache,
- "VS_PROG",
- BRW_VS_PROG,
- sizeof(struct brw_vs_prog_data));
-
- brw_init_cache_id(cache,
- "CLIP_UNIT",
- BRW_CLIP_UNIT,
- 0);
-
- brw_init_cache_id(cache,
- "CLIP_PROG",
- BRW_CLIP_PROG,
- sizeof(struct brw_clip_prog_data));
-
- brw_init_cache_id(cache,
- "GS_UNIT",
- BRW_GS_UNIT,
- 0);
-
- brw_init_cache_id(cache,
- "GS_PROG",
- BRW_GS_PROG,
- sizeof(struct brw_gs_prog_data));
+ brw_init_cache_id(cache, "CC_VP", BRW_CC_VP);
+ brw_init_cache_id(cache, "CC_UNIT", BRW_CC_UNIT);
+ brw_init_cache_id(cache, "WM_PROG", BRW_WM_PROG);
+ brw_init_cache_id(cache, "SAMPLER_DEFAULT_COLOR", BRW_SAMPLER_DEFAULT_COLOR);
+ brw_init_cache_id(cache, "SAMPLER", BRW_SAMPLER);
+ brw_init_cache_id(cache, "WM_UNIT", BRW_WM_UNIT);
+ brw_init_cache_id(cache, "SF_PROG", BRW_SF_PROG);
+ brw_init_cache_id(cache, "SF_VP", BRW_SF_VP);
+
+ brw_init_cache_id(cache, "SF_UNIT", BRW_SF_UNIT);
+
+ brw_init_cache_id(cache, "VS_UNIT", BRW_VS_UNIT);
+
+ brw_init_cache_id(cache, "VS_PROG", BRW_VS_PROG);
+
+ brw_init_cache_id(cache, "CLIP_UNIT", BRW_CLIP_UNIT);
+
+ brw_init_cache_id(cache, "CLIP_PROG", BRW_CLIP_PROG);
+
+ brw_init_cache_id(cache, "GS_UNIT", BRW_GS_UNIT);
+
+ brw_init_cache_id(cache, "GS_PROG", BRW_GS_PROG);
}
@@ -430,15 +413,8 @@ brw_init_surface_cache(struct brw_context *brw)
cache->items = (struct brw_cache_item **)
_mesa_calloc(cache->size * sizeof(struct brw_cache_item));
- brw_init_cache_id(cache,
- "SS_SURFACE",
- BRW_SS_SURFACE,
- 0);
-
- brw_init_cache_id(cache,
- "SS_SURF_BIND",
- BRW_SS_SURF_BIND,
- 0);
+ brw_init_cache_id(cache, "SS_SURFACE", BRW_SS_SURFACE);
+ brw_init_cache_id(cache, "SS_SURF_BIND", BRW_SS_SURF_BIND);
}
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index af8dfb4c15c..0ecbef1ef92 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -36,13 +36,7 @@
#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
- * has a .dirty value which changes according to the parameters of the
- * current fragment and vertex programs, and so cannot be a static
- * value.
- */
-const struct brw_tracked_state *atoms[] =
+static const struct brw_tracked_state *atoms[] =
{
&brw_check_fallback,
@@ -208,7 +202,6 @@ static struct dirty_bit_map brw_bits[] = {
DEFINE_BIT(BRW_NEW_CONTEXT),
DEFINE_BIT(BRW_NEW_WM_INPUT_DIMENSIONS),
DEFINE_BIT(BRW_NEW_PSP),
- DEFINE_BIT(BRW_NEW_FENCE),
DEFINE_BIT(BRW_NEW_INDICES),
DEFINE_BIT(BRW_NEW_INDEX_BUFFER),
DEFINE_BIT(BRW_NEW_VERTICES),
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c
index e59e52ed861..64a9535282b 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -49,7 +49,7 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
switch (mt->target) {
case GL_TEXTURE_CUBE_MAP:
- if (IS_IGDNG(intel->intelScreen->deviceID)) {
+ if (intel->is_ironlake) {
GLuint align_h = 2, align_w = 4;
GLuint level;
GLuint x = 0;
diff --git a/src/mesa/drivers/dri/i965/brw_urb.c b/src/mesa/drivers/dri/i965/brw_urb.c
index 8c6f4355a6e..f2cdb203b85 100644
--- a/src/mesa/drivers/dri/i965/brw_urb.c
+++ b/src/mesa/drivers/dri/i965/brw_urb.c
@@ -105,7 +105,8 @@ static GLboolean check_urb_layout( struct brw_context *brw )
brw->urb.sf_start = brw->urb.clip_start + brw->urb.nr_clip_entries * brw->urb.vsize;
brw->urb.cs_start = brw->urb.sf_start + brw->urb.nr_sf_entries * brw->urb.sfsize;
- return brw->urb.cs_start + brw->urb.nr_cs_entries * brw->urb.csize <= URB_SIZES(brw);
+ return brw->urb.cs_start + brw->urb.nr_cs_entries *
+ brw->urb.csize <= brw->urb.size;
}
/* Most minimal update, forces re-emit of URB fence packet after GS
@@ -113,6 +114,7 @@ static GLboolean check_urb_layout( struct brw_context *brw )
*/
static void recalculate_urb_fence( struct brw_context *brw )
{
+ struct intel_context *intel = &brw->intel;
GLuint csize = brw->curbe.total_size;
GLuint vsize = brw->vs.prog_data->urb_entry_size;
GLuint sfsize = brw->sf.prog_data->urb_entry_size;
@@ -146,7 +148,7 @@ static void recalculate_urb_fence( struct brw_context *brw )
brw->urb.constrained = 0;
- if (BRW_IS_IGDNG(brw)) {
+ if (intel->is_ironlake) {
brw->urb.nr_vs_entries = 128;
brw->urb.nr_sf_entries = 48;
if (check_urb_layout(brw)) {
@@ -156,7 +158,7 @@ static void recalculate_urb_fence( struct brw_context *brw )
brw->urb.nr_vs_entries = limits[VS].preferred_nr_entries;
brw->urb.nr_sf_entries = limits[SF].preferred_nr_entries;
}
- } else if (BRW_IS_G4X(brw)) {
+ } else if (intel->is_g4x) {
brw->urb.nr_vs_entries = 64;
if (check_urb_layout(brw)) {
goto done;
@@ -200,7 +202,7 @@ done:
brw->urb.clip_start,
brw->urb.sf_start,
brw->urb.cs_start,
- URB_SIZES(brw));
+ brw->urb.size);
brw->state.dirty.brw |= BRW_NEW_URB_FENCE;
}
@@ -244,7 +246,7 @@ void brw_upload_urb_fence(struct brw_context *brw)
uf.bits0.gs_fence = brw->urb.clip_start;
uf.bits0.clp_fence = brw->urb.sf_start;
uf.bits1.sf_fence = brw->urb.cs_start;
- uf.bits1.cs_fence = URB_SIZES(brw);
+ uf.bits1.cs_fence = brw->urb.size;
BRW_BATCH_STRUCT(brw, &uf);
}
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index fd055e225e0..44b085e214b 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -35,6 +35,7 @@
#include "brw_util.h"
#include "brw_state.h"
#include "shader/prog_print.h"
+#include "shader/prog_parameter.h"
@@ -42,9 +43,11 @@ static void do_vs_prog( struct brw_context *brw,
struct brw_vertex_program *vp,
struct brw_vs_prog_key *key )
{
+ GLcontext *ctx = &brw->intel.ctx;
GLuint program_size;
const GLuint *program;
struct brw_vs_compile c;
+ int aux_size;
memset(&c, 0, sizeof(c));
memcpy(&c.key, key, sizeof(*key));
@@ -73,13 +76,27 @@ static void do_vs_prog( struct brw_context *brw,
*/
program = brw_get_program(&c.func, &program_size);
+ /* We upload from &c.prog_data including the constant_map assuming
+ * they're packed together. It would be nice to have a
+ * compile-time assert macro here.
+ */
+ assert(c.constant_map == (int8_t *)&c.prog_data +
+ sizeof(c.prog_data));
+ assert(ctx->Const.VertexProgram.MaxNativeParameters ==
+ ARRAY_SIZE(c.constant_map));
+
+ aux_size = sizeof(c.prog_data);
+ if (c.vp->use_const_buffer)
+ aux_size += c.vp->program.Base.Parameters->NumParameters;
+
dri_bo_unreference(brw->vs.prog_bo);
- brw->vs.prog_bo = brw_upload_cache( &brw->cache, BRW_VS_PROG,
- &c.key, sizeof(c.key),
- NULL, 0,
- program, program_size,
- &c.prog_data,
- &brw->vs.prog_data );
+ brw->vs.prog_bo = brw_upload_cache_with_auxdata(&brw->cache, BRW_VS_PROG,
+ &c.key, sizeof(c.key),
+ NULL, 0,
+ program, program_size,
+ &c.prog_data,
+ aux_size,
+ &brw->vs.prog_data);
}
@@ -109,6 +126,8 @@ static void brw_upload_vs_prog(struct brw_context *brw)
&brw->vs.prog_data);
if (brw->vs.prog_bo == NULL)
do_vs_prog(brw, vp, &key);
+ brw->vs.constant_map = ((int8_t *)brw->vs.prog_data +
+ sizeof(*brw->vs.prog_data));
}
diff --git a/src/mesa/drivers/dri/i965/brw_vs.h b/src/mesa/drivers/dri/i965/brw_vs.h
index 4a591365c98..95e0501b1eb 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.h
+++ b/src/mesa/drivers/dri/i965/brw_vs.h
@@ -51,6 +51,7 @@ struct brw_vs_compile {
struct brw_compile func;
struct brw_vs_prog_key key;
struct brw_vs_prog_data prog_data;
+ int8_t constant_map[1024];
struct brw_vertex_program *vp;
@@ -81,6 +82,8 @@ struct brw_vs_compile {
GLint index;
struct brw_reg reg;
} current_const[3];
+
+ GLboolean needs_stack;
};
void brw_vs_emit( struct brw_vs_compile *c );
diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c
index 27aac8b54a9..52cc04fee87 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c
@@ -67,6 +67,7 @@ static void release_tmps( struct brw_vs_compile *c )
*/
static void brw_vs_alloc_regs( struct brw_vs_compile *c )
{
+ struct intel_context *intel = &c->func.brw->intel;
GLuint i, reg = 0, mrf;
int attributes_in_vue;
@@ -103,9 +104,47 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
/* Vertex program parameters from curbe:
*/
if (c->vp->use_const_buffer) {
- /* get constants from a real constant buffer */
- c->prog_data.curb_read_length = 0;
- c->prog_data.nr_params = 4; /* XXX 0 causes a bug elsewhere... */
+ int max_constant = BRW_MAX_GRF - 20 - c->vp->program.Base.NumTemporaries;
+ int constant = 0;
+
+ /* We've got more constants than we can load with the push
+ * mechanism. This is often correlated with reladdr loads where
+ * we should probably be using a pull mechanism anyway to avoid
+ * excessive reading. However, the pull mechanism is slow in
+ * general. So, we try to allocate as many non-reladdr-loaded
+ * constants through the push buffer as we can before giving up.
+ */
+ memset(c->constant_map, -1, c->vp->program.Base.Parameters->NumParameters);
+ for (i = 0;
+ i < c->vp->program.Base.NumInstructions && constant < max_constant;
+ i++) {
+ struct prog_instruction *inst = &c->vp->program.Base.Instructions[i];
+ int arg;
+
+ for (arg = 0; arg < 3 && constant < max_constant; arg++) {
+ if ((inst->SrcReg[arg].File != PROGRAM_STATE_VAR &&
+ inst->SrcReg[arg].File != PROGRAM_CONSTANT &&
+ inst->SrcReg[arg].File != PROGRAM_UNIFORM &&
+ inst->SrcReg[arg].File != PROGRAM_ENV_PARAM &&
+ inst->SrcReg[arg].File != PROGRAM_LOCAL_PARAM) ||
+ inst->SrcReg[arg].RelAddr)
+ continue;
+
+ if (c->constant_map[inst->SrcReg[arg].Index] == -1) {
+ c->constant_map[inst->SrcReg[arg].Index] = constant++;
+ }
+ }
+ }
+
+ for (i = 0; i < constant; i++) {
+ c->regs[PROGRAM_STATE_VAR][i] = stride( brw_vec4_grf(reg+i/2,
+ (i%2) * 4),
+ 0, 4, 1);
+ }
+ reg += (constant + 1) / 2;
+ c->prog_data.curb_read_length = reg - 1;
+ /* XXX 0 causes a bug elsewhere... */
+ c->prog_data.nr_params = MAX2(constant * 4, 4);
}
else {
/* use a section of the GRF for constants */
@@ -141,7 +180,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
c->first_output = reg;
c->first_overflow_output = 0;
- if (BRW_IS_IGDNG(c->func.brw))
+ if (intel->is_ironlake)
mrf = 8;
else
mrf = 4;
@@ -213,8 +252,10 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
}
}
- c->stack = brw_uw16_reg(BRW_GENERAL_REGISTER_FILE, reg, 0);
- reg += 2;
+ if (c->needs_stack) {
+ c->stack = brw_uw16_reg(BRW_GENERAL_REGISTER_FILE, reg, 0);
+ reg += 2;
+ }
/* Some opcodes need an internal temporary:
*/
@@ -238,7 +279,7 @@ static void brw_vs_alloc_regs( struct brw_vs_compile *c )
*/
attributes_in_vue = MAX2(c->nr_outputs, c->nr_inputs);
- if (BRW_IS_IGDNG(c->func.brw))
+ if (intel->is_ironlake)
c->prog_data.urb_entry_size = (attributes_in_vue + 6 + 3) / 4;
else
c->prog_data.urb_entry_size = (attributes_in_vue + 2 + 3) / 4;
@@ -761,15 +802,14 @@ get_constant(struct brw_vs_compile *c,
{
const struct prog_src_register *src = &inst->SrcReg[argIndex];
struct brw_compile *p = &c->func;
- struct brw_reg const_reg;
- struct brw_reg const2_reg;
- const GLboolean relAddr = src->RelAddr;
+ struct brw_reg const_reg = c->current_const[argIndex].reg;
assert(argIndex < 3);
- if (c->current_const[argIndex].index != src->Index || relAddr) {
+ if (c->current_const[argIndex].index != src->Index) {
struct brw_reg addrReg = c->regs[PROGRAM_ADDRESS][0];
+ /* Keep track of the last constant loaded in this slot, for reuse. */
c->current_const[argIndex].index = src->Index;
#if 0
@@ -778,48 +818,74 @@ get_constant(struct brw_vs_compile *c,
#endif
/* need to fetch the constant now */
brw_dp_READ_4_vs(p,
- c->current_const[argIndex].reg,/* writeback dest */
+ const_reg, /* writeback dest */
0, /* oword */
- relAddr, /* relative indexing? */
+ 0, /* relative indexing? */
addrReg, /* address register */
16 * src->Index, /* byte offset */
SURF_INDEX_VERT_CONST_BUFFER /* binding table index */
);
-
- if (relAddr) {
- /* second read */
- const2_reg = get_tmp(c);
-
- /* use upper half of address reg for second read */
- addrReg = stride(addrReg, 0, 4, 0);
- addrReg.subnr = 16;
-
- brw_dp_READ_4_vs(p,
- const2_reg, /* writeback dest */
- 1, /* oword */
- relAddr, /* relative indexing? */
- addrReg, /* address register */
- 16 * src->Index, /* byte offset */
- SURF_INDEX_VERT_CONST_BUFFER
- );
- }
}
- const_reg = c->current_const[argIndex].reg;
+ /* replicate lower four floats into upper half (to get XYZWXYZW) */
+ const_reg = stride(const_reg, 0, 4, 0);
+ const_reg.subnr = 0;
- if (relAddr) {
- /* merge the two Owords into the constant register */
- /* const_reg[7..4] = const2_reg[7..4] */
- brw_MOV(p,
- suboffset(stride(const_reg, 0, 4, 1), 4),
- suboffset(stride(const2_reg, 0, 4, 1), 4));
- release_tmp(c, const2_reg);
- }
- else {
- /* replicate lower four floats into upper half (to get XYZWXYZW) */
- const_reg = stride(const_reg, 0, 4, 0);
- const_reg.subnr = 0;
- }
+ return const_reg;
+}
+
+static struct brw_reg
+get_reladdr_constant(struct brw_vs_compile *c,
+ const struct prog_instruction *inst,
+ GLuint argIndex)
+{
+ const struct prog_src_register *src = &inst->SrcReg[argIndex];
+ struct brw_compile *p = &c->func;
+ struct brw_reg const_reg = c->current_const[argIndex].reg;
+ struct brw_reg const2_reg;
+ struct brw_reg addrReg = c->regs[PROGRAM_ADDRESS][0];
+
+ assert(argIndex < 3);
+
+ /* Can't reuse a reladdr constant load. */
+ c->current_const[argIndex].index = -1;
+
+ #if 0
+ printf(" fetch const[a0.x+%d] for arg %d into reg %d\n",
+ src->Index, argIndex, c->current_const[argIndex].reg.nr);
+#endif
+
+ /* fetch the first vec4 */
+ brw_dp_READ_4_vs(p,
+ const_reg, /* writeback dest */
+ 0, /* oword */
+ 1, /* relative indexing? */
+ addrReg, /* address register */
+ 16 * src->Index, /* byte offset */
+ SURF_INDEX_VERT_CONST_BUFFER /* binding table index */
+ );
+ /* second vec4 */
+ const2_reg = get_tmp(c);
+
+ /* use upper half of address reg for second read */
+ addrReg = stride(addrReg, 0, 4, 0);
+ addrReg.subnr = 16;
+
+ brw_dp_READ_4_vs(p,
+ const2_reg, /* writeback dest */
+ 1, /* oword */
+ 1, /* relative indexing? */
+ addrReg, /* address register */
+ 16 * src->Index, /* byte offset */
+ SURF_INDEX_VERT_CONST_BUFFER
+ );
+
+ /* merge the two Owords into the constant register */
+ /* const_reg[7..4] = const2_reg[7..4] */
+ brw_MOV(p,
+ suboffset(stride(const_reg, 0, 4, 1), 4),
+ suboffset(stride(const2_reg, 0, 4, 1), 4));
+ release_tmp(c, const2_reg);
return const_reg;
}
@@ -927,7 +993,13 @@ get_src_reg( struct brw_vs_compile *c,
case PROGRAM_ENV_PARAM:
case PROGRAM_LOCAL_PARAM:
if (c->vp->use_const_buffer) {
- return get_constant(c, inst, argIndex);
+ if (!relAddr && c->constant_map[index] != -1) {
+ assert(c->regs[PROGRAM_STATE_VAR][c->constant_map[index]].nr != 0);
+ return c->regs[PROGRAM_STATE_VAR][c->constant_map[index]];
+ } else if (relAddr)
+ return get_reladdr_constant(c, inst, argIndex);
+ else
+ return get_constant(c, inst, argIndex);
}
else if (relAddr) {
return deref(c, c->regs[PROGRAM_STATE_VAR][0], index);
@@ -1113,6 +1185,8 @@ static void emit_swz( struct brw_vs_compile *c,
static void emit_vertex_write( struct brw_vs_compile *c)
{
struct brw_compile *p = &c->func;
+ struct brw_context *brw = p->brw;
+ struct intel_context *intel = &brw->intel;
struct brw_reg m0 = brw_message_reg(0);
struct brw_reg pos = c->regs[PROGRAM_OUTPUT][VERT_RESULT_HPOS];
struct brw_reg ndc;
@@ -1136,7 +1210,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
* workaround.
*/
if ((c->prog_data.outputs_written & BITFIELD64_BIT(VERT_RESULT_PSIZ)) ||
- c->key.nr_userclip || BRW_IS_965(p->brw))
+ c->key.nr_userclip || brw->has_negative_rhw_bug)
{
struct brw_reg header1 = retype(get_tmp(c), BRW_REGISTER_TYPE_UD);
GLuint i;
@@ -1167,7 +1241,7 @@ static void emit_vertex_write( struct brw_vs_compile *c)
* Later, clipping will detect ucp[6] and ensure the primitive is
* clipped against all fixed planes.
*/
- if (BRW_IS_965(p->brw)) {
+ if (brw->has_negative_rhw_bug) {
brw_CMP(p,
vec8(brw_null_reg()),
BRW_CONDITIONAL_L,
@@ -1195,8 +1269,8 @@ static void emit_vertex_write( struct brw_vs_compile *c)
brw_set_access_mode(p, BRW_ALIGN_1);
brw_MOV(p, offset(m0, 2), ndc);
- if (BRW_IS_IGDNG(p->brw)) {
- /* There are 20 DWs (D0-D19) in VUE vertex header on IGDNG */
+ if (intel->is_ironlake) {
+ /* There are 20 DWs (D0-D19) in VUE vertex header on Ironlake */
brw_MOV(p, offset(m0, 3), pos); /* a portion of vertex header */
/* m4, m5 contain the distances from vertex to the user clip planeXXX.
* Seems it is useless for us.
@@ -1359,6 +1433,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
#define MAX_LOOP_DEPTH 32
struct brw_compile *p = &c->func;
struct brw_context *brw = p->brw;
+ struct intel_context *intel = &brw->intel;
const GLuint nr_insns = c->vp->program.Base.NumInstructions;
GLuint insn, if_depth = 0, loop_depth = 0;
GLuint end_offset = 0;
@@ -1376,12 +1451,14 @@ void brw_vs_emit(struct brw_vs_compile *c )
brw_set_compression_control(p, BRW_COMPRESSION_NONE);
brw_set_access_mode(p, BRW_ALIGN_16);
-
- /* Message registers can't be read, so copy the output into GRF register
- if they are used in source registers */
+
for (insn = 0; insn < nr_insns; insn++) {
GLuint i;
struct prog_instruction *inst = &c->vp->program.Base.Instructions[insn];
+
+ /* Message registers can't be read, so copy the output into GRF
+ * register if they are used in source registers
+ */
for (i = 0; i < 3; i++) {
struct prog_src_register *src = &inst->SrcReg[i];
GLuint index = src->Index;
@@ -1389,12 +1466,23 @@ void brw_vs_emit(struct brw_vs_compile *c )
if (file == PROGRAM_OUTPUT && index != VERT_RESULT_HPOS)
c->output_regs[index].used_in_src = GL_TRUE;
}
+
+ switch (inst->Opcode) {
+ case OPCODE_CAL:
+ case OPCODE_RET:
+ c->needs_stack = GL_TRUE;
+ break;
+ default:
+ break;
+ }
}
/* Static register allocation
*/
brw_vs_alloc_regs(c);
- brw_MOV(p, get_addr_reg(stack_index), brw_address(c->stack));
+
+ if (c->needs_stack)
+ brw_MOV(p, get_addr_reg(stack_index), brw_address(c->stack));
for (insn = 0; insn < nr_insns; insn++) {
@@ -1592,7 +1680,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
loop_depth--;
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
br = 2;
inst0 = inst1 = brw_WHILE(p, loop_inst[loop_depth]);
diff --git a/src/mesa/drivers/dri/i965/brw_vs_state.c b/src/mesa/drivers/dri/i965/brw_vs_state.c
index 7285466645b..fd9f2fee423 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_state.c
@@ -82,9 +82,9 @@ vs_unit_populate_key(struct brw_context *brw, struct brw_vs_unit_key *key)
static dri_bo *
vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
{
+ struct intel_context *intel = &brw->intel;
struct brw_vs_unit_state vs;
dri_bo *bo;
- int chipset_max_threads;
memset(&vs, 0, sizeof(vs));
@@ -98,7 +98,7 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
*/
vs.thread1.single_program_flow = 0;
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
vs.thread1.binding_table_entry_count = 0; /* hardware requirement */
else
vs.thread1.binding_table_entry_count = key->nr_surfaces;
@@ -109,7 +109,7 @@ 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)) {
+ if (intel->is_ironlake) {
switch (key->nr_urb_entries) {
case 8:
case 12:
@@ -135,7 +135,7 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
case 32:
break;
case 64:
- assert(BRW_IS_G4X(brw));
+ assert(intel->is_g4x);
break;
default:
assert(0);
@@ -145,17 +145,8 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
vs.thread4.urb_entry_allocation_size = key->urb_size - 1;
- if (BRW_IS_IGDNG(brw))
- chipset_max_threads = 72;
- else if (BRW_IS_G4X(brw))
- chipset_max_threads = 32;
- else
- chipset_max_threads = 16;
vs.thread4.max_threads = CLAMP(key->nr_urb_entries / 2,
- 1, chipset_max_threads) - 1;
-
- if (INTEL_DEBUG & DEBUG_SINGLE_THREAD)
- vs.thread4.max_threads = 0;
+ 1, brw->vs_max_threads) - 1;
/* No samplers for ARB_vp programs:
*/
@@ -173,8 +164,7 @@ vs_unit_create_from_key(struct brw_context *brw, struct brw_vs_unit_key *key)
bo = brw_upload_cache(&brw->cache, BRW_VS_UNIT,
key, sizeof(*key),
&brw->vs.prog_bo, 1,
- &vs, sizeof(vs),
- NULL, NULL);
+ &vs, sizeof(vs));
/* Emit VS program relocation */
dri_bo_emit_reloc(bo,
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 22ff3410aeb..ead623fc0ea 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
@@ -155,7 +155,7 @@ brw_vs_get_binding_table(struct brw_context *brw)
if (bind_bo == NULL) {
GLuint data_size = BRW_VS_MAX_SURF * sizeof(GLuint);
- uint32_t *data = malloc(data_size);
+ uint32_t data[BRW_VS_MAX_SURF];
int i;
for (i = 0; i < BRW_VS_MAX_SURF; i++)
@@ -167,8 +167,7 @@ brw_vs_get_binding_table(struct brw_context *brw)
bind_bo = brw_upload_cache( &brw->surface_cache, BRW_SS_SURF_BIND,
NULL, 0,
brw->vs.surf_bo, BRW_VS_MAX_SURF,
- data, data_size,
- NULL, NULL);
+ data, data_size);
/* Emit binding table relocations to surface state */
for (i = 0; i < BRW_VS_MAX_SURF; i++) {
@@ -181,8 +180,6 @@ brw_vs_get_binding_table(struct brw_context *brw)
I915_GEM_DOMAIN_INSTRUCTION, 0);
}
}
-
- free(data);
}
return bind_bo;
diff --git a/src/mesa/drivers/dri/i965/brw_vtbl.c b/src/mesa/drivers/dri/i965/brw_vtbl.c
index daf19645536..e08f32c4e27 100644
--- a/src/mesa/drivers/dri/i965/brw_vtbl.c
+++ b/src/mesa/drivers/dri/i965/brw_vtbl.c
@@ -149,9 +149,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.
@@ -174,12 +171,6 @@ static void brw_new_batch( struct intel_context *intel )
}
}
-
-static void brw_note_fence( struct intel_context *intel, GLuint fence )
-{
- brw_context(&intel->ctx)->state.dirty.brw |= BRW_NEW_FENCE;
-}
-
static void brw_invalidate_state( struct intel_context *intel, GLuint new_state )
{
/* nothing */
@@ -195,7 +186,6 @@ void brwInitVtbl( struct brw_context *brw )
brw->intel.vtbl.update_texture_state = 0;
brw->intel.vtbl.invalidate_state = brw_invalidate_state;
- brw->intel.vtbl.note_fence = brw_note_fence;
brw->intel.vtbl.new_batch = brw_new_batch;
brw->intel.vtbl.finish_batch = brw_finish_batch;
brw->intel.vtbl.destroy = brw_destroy_context;
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 802236e8e34..8afd1f4aef3 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -198,12 +198,13 @@ static void do_wm_prog( struct brw_context *brw,
program = brw_get_program(&c->func, &program_size);
dri_bo_unreference(brw->wm.prog_bo);
- brw->wm.prog_bo = brw_upload_cache( &brw->cache, BRW_WM_PROG,
- &c->key, sizeof(c->key),
- NULL, 0,
- program, program_size,
- &c->prog_data,
- &brw->wm.prog_data );
+ brw->wm.prog_bo = brw_upload_cache_with_auxdata(&brw->cache, BRW_WM_PROG,
+ &c->key, sizeof(c->key),
+ NULL, 0,
+ program, program_size,
+ &c->prog_data,
+ sizeof(c->prog_data),
+ &brw->wm.prog_data);
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index 9dcb6e14bbe..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;
GLbitfield64 vp_outputs_written;
+ GLuint program_string_id:32;
};
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c
index c6d10f5570f..f316e0cda49 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c
@@ -830,6 +830,7 @@ void emit_tex(struct brw_wm_compile *c,
GLboolean shadow)
{
struct brw_compile *p = &c->func;
+ struct intel_context *intel = &p->brw->intel;
struct brw_reg dst_retyped;
GLuint cur_mrf = 2, response_length;
GLuint i, nr_texcoords;
@@ -873,7 +874,7 @@ void emit_tex(struct brw_wm_compile *c,
}
/* Pre-Ironlake, the 8-wide sampler always took u,v,r. */
- if (!BRW_IS_IGDNG(p->brw) && c->dispatch_width == 8)
+ if (!intel->is_ironlake && c->dispatch_width == 8)
nr_texcoords = 3;
/* For shadow comparisons, we have to supply u,v,r. */
@@ -891,7 +892,7 @@ void emit_tex(struct brw_wm_compile *c,
/* Fill in the shadow comparison reference value. */
if (shadow) {
- if (BRW_IS_IGDNG(p->brw)) {
+ if (intel->is_ironlake) {
/* 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;
@@ -904,7 +905,7 @@ void emit_tex(struct brw_wm_compile *c,
cur_mrf += mrf_per_channel;
}
- if (BRW_IS_IGDNG(p->brw)) {
+ if (intel->is_ironlake) {
if (shadow)
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_COMPARE_IGDNG;
else
@@ -944,6 +945,7 @@ void emit_txb(struct brw_wm_compile *c,
GLuint sampler)
{
struct brw_compile *p = &c->func;
+ struct intel_context *intel = &p->brw->intel;
GLuint msgLength;
GLuint msg_type;
GLuint mrf_per_channel;
@@ -955,8 +957,8 @@ void emit_txb(struct brw_wm_compile *c,
* undefined, and trust the execution mask to keep the undefined pixels
* from mattering.
*/
- if (c->dispatch_width == 16 || !BRW_IS_IGDNG(p->brw)) {
- if (BRW_IS_IGDNG(p->brw))
+ if (c->dispatch_width == 16 || !intel->is_ironlake) {
+ if (intel->is_ironlake)
msg_type = BRW_SAMPLER_MESSAGE_SAMPLE_BIAS_IGDNG;
else
msg_type = BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS;
@@ -1174,7 +1176,7 @@ void emit_fb_write(struct brw_wm_compile *c,
brw_push_insn_state(p);
for (channel = 0; channel < 4; channel++) {
- if (c->dispatch_width == 16 && (BRW_IS_G4X(brw) || BRW_IS_IGDNG(brw))) {
+ if (c->dispatch_width == 16 && brw->has_compr4) {
/* 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.
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index 7d031795883..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;
}
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 7e5533e258e..fde83eea620 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -1826,6 +1826,7 @@ get_argument_regs(struct brw_wm_compile *c,
static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
{
+ struct intel_context *intel = &brw->intel;
#define MAX_IF_DEPTH 32
#define MAX_LOOP_DEPTH 32
struct brw_instruction *if_inst[MAX_IF_DEPTH], *loop_inst[MAX_LOOP_DEPTH];
@@ -1876,10 +1877,6 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
else
brw_set_conditionalmod(p, BRW_CONDITIONAL_NONE);
- dst_flags = inst->DstReg.WriteMask;
- if (inst->SaturateMode == SATURATE_ZERO_ONE)
- dst_flags |= SATURATE;
-
switch (inst->Opcode) {
case WM_PIXELXY:
emit_pixel_xy(c, dst, dst_flags);
@@ -2043,6 +2040,7 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
if_inst[if_depth++] = brw_IF(p, BRW_EXECUTE_8);
break;
case OPCODE_ELSE:
+ assert(if_depth > 0);
if_inst[if_depth-1] = brw_ELSE(p, if_inst[if_depth-1]);
break;
case OPCODE_ENDIF:
@@ -2096,9 +2094,10 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
struct brw_instruction *inst0, *inst1;
GLuint br = 1;
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
br = 2;
-
+
+ assert(loop_depth > 0);
loop_depth--;
inst0 = inst1 = brw_WHILE(p, loop_inst[loop_depth]);
/* patch all the BREAK/CONT instructions from last BGNLOOP */
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 aa2e5195881..87387b1e2d5 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -262,10 +262,10 @@ brw_wm_sampler_populate_key(struct brw_context *brw,
dri_bo_unreference(brw->wm.sdc_bo[unit]);
if (firstImage->_BaseFormat == GL_DEPTH_COMPONENT) {
float bordercolor[4] = {
- texObj->BorderColor[0],
- texObj->BorderColor[0],
- texObj->BorderColor[0],
- texObj->BorderColor[0]
+ texObj->BorderColor.f[0],
+ texObj->BorderColor.f[0],
+ texObj->BorderColor.f[0],
+ texObj->BorderColor.f[0]
};
/* GL specs that border color for depth textures is taken from the
* R channel, while the hardware uses A. Spam R into all the
@@ -274,7 +274,7 @@ brw_wm_sampler_populate_key(struct brw_context *brw,
brw->wm.sdc_bo[unit] = upload_default_color(brw, bordercolor);
} else {
brw->wm.sdc_bo[unit] = upload_default_color(brw,
- texObj->BorderColor);
+ texObj->BorderColor.f);
}
key->sampler_count = unit + 1;
}
@@ -326,8 +326,7 @@ static void upload_wm_samplers( struct brw_context *brw )
brw->wm.sampler_bo = brw_upload_cache(&brw->cache, BRW_SAMPLER,
&key, sizeof(key),
brw->wm.sdc_bo, key.sampler_count,
- &sampler, sizeof(sampler),
- NULL, NULL);
+ &sampler, sizeof(sampler));
/* Emit SDC relocations */
for (i = 0; i < BRW_MAX_TEX_UNIT; i++) {
diff --git a/src/mesa/drivers/dri/i965/brw_wm_state.c b/src/mesa/drivers/dri/i965/brw_wm_state.c
index f89ed9bce70..a7f80db554a 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_state.c
@@ -49,8 +49,6 @@ struct brw_wm_unit_key {
unsigned int curbe_offset;
unsigned int urb_size;
- unsigned int max_threads;
-
unsigned int nr_surfaces, sampler_count;
GLboolean uses_depth, computes_depth, uses_kill, is_glsl;
GLboolean polygon_stipple, stats_wm, line_stipple, offset_enable;
@@ -67,18 +65,6 @@ wm_unit_populate_key(struct brw_context *brw, struct brw_wm_unit_key *key)
memset(key, 0, sizeof(*key));
- if (INTEL_DEBUG & DEBUG_SINGLE_THREAD)
- key->max_threads = 1;
- else {
- /* WM maximum threads is number of EUs times number of threads per EU. */
- if (BRW_IS_IGDNG(brw))
- key->max_threads = 12 * 6;
- else if (BRW_IS_G4X(brw))
- key->max_threads = 10 * 5;
- else
- key->max_threads = 8 * 4;
- }
-
/* CACHE_NEW_WM_PROG */
key->total_grf = brw->wm.prog_data->total_grf;
key->urb_entry_read_length = brw->wm.prog_data->urb_read_length;
@@ -140,6 +126,7 @@ static dri_bo *
wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
dri_bo **reloc_bufs)
{
+ struct intel_context *intel = &brw->intel;
struct brw_wm_unit_state wm;
dri_bo *bo;
@@ -150,7 +137,7 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
wm.thread1.depth_coef_urb_read_offset = 1;
wm.thread1.floating_point_mode = BRW_FLOATING_POINT_NON_IEEE_754;
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
wm.thread1.binding_table_entry_count = 0; /* hardware requirement */
else
wm.thread1.binding_table_entry_count = key->nr_surfaces;
@@ -170,7 +157,7 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
wm.thread3.const_urb_entry_read_length = key->curb_entry_read_length;
wm.thread3.const_urb_entry_read_offset = key->curbe_offset * 2;
- if (BRW_IS_IGDNG(brw))
+ if (intel->is_ironlake)
wm.wm4.sampler_count = 0; /* hardware requirement */
else
wm.wm4.sampler_count = (key->sampler_count + 1) / 4;
@@ -191,7 +178,7 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
else
wm.wm5.enable_16_pix = 1;
- wm.wm5.max_threads = key->max_threads - 1;
+ wm.wm5.max_threads = brw->wm_max_threads - 1;
wm.wm5.thread_dispatch_enable = 1; /* AKA: color_write */
wm.wm5.legacy_line_rast = 0;
wm.wm5.legacy_global_depth_bias = 0;
@@ -223,8 +210,7 @@ wm_unit_create_from_key(struct brw_context *brw, struct brw_wm_unit_key *key,
bo = brw_upload_cache(&brw->cache, BRW_WM_UNIT,
key, sizeof(*key),
reloc_bufs, 3,
- &wm, sizeof(wm),
- NULL, NULL);
+ &wm, sizeof(wm));
/* Emit WM program relocation */
dri_bo_emit_reloc(bo,
@@ -268,7 +254,7 @@ static void upload_wm_unit( struct brw_context *brw )
*/
assert(key.total_scratch <= 12 * 1024);
if (key.total_scratch) {
- GLuint total = key.total_scratch * key.max_threads;
+ GLuint total = key.total_scratch * brw->wm_max_threads;
if (brw->wm.scratch_bo && total > brw->wm.scratch_bo->size) {
dri_bo_unreference(brw->wm.scratch_bo);
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 afb36b7bd7d..357c8c90de3 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -256,8 +256,7 @@ brw_create_texture_surface( struct brw_context *brw,
bo = brw_upload_cache(&brw->surface_cache, BRW_SS_SURFACE,
key, sizeof(*key),
&key->bo, key->bo ? 1 : 0,
- &surf, sizeof(surf),
- NULL, NULL);
+ &surf, sizeof(surf));
if (key->bo) {
/* Emit relocation to surface contents */
@@ -351,8 +350,7 @@ brw_create_constant_surface( struct brw_context *brw,
bo = brw_upload_cache(&brw->surface_cache, BRW_SS_SURFACE,
key, sizeof(*key),
&key->bo, key->bo ? 1 : 0,
- &surf, sizeof(surf),
- NULL, NULL);
+ &surf, sizeof(surf));
if (key->bo) {
/* Emit relocation to surface contents. Section 5.1.1 of the gen4
@@ -511,7 +509,8 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
struct gl_renderbuffer *rb,
unsigned int unit)
{
- GLcontext *ctx = &brw->intel.ctx;
+ struct intel_context *intel = &brw->intel;;
+ GLcontext *ctx = &intel->ctx;
dri_bo *region_bo = NULL;
struct intel_renderbuffer *irb = intel_renderbuffer(rb);
struct intel_region *region = irb ? irb->region : NULL;
@@ -578,7 +577,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
key.draw_y = 0;
}
/* _NEW_COLOR */
- memcpy(key.color_mask, ctx->Color.ColorMask,
+ memcpy(key.color_mask, ctx->Color.ColorMask[0],
sizeof(key.color_mask));
/* As mentioned above, disable writes to the alpha component when the
@@ -622,7 +621,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
tile_base = ((key.draw_y / 32) * (32 * pitch));
tile_base += (key.draw_x - tile_x) / (128 / key.cpp) * 4096;
}
- assert(BRW_IS_G4X(brw) || (tile_x == 0 && tile_y == 0));
+ assert(intel->is_g4x || (tile_x == 0 && tile_y == 0));
assert(tile_x % 4 == 0);
assert(tile_y % 2 == 0);
/* Note that the low bits of these fields are missing, so
@@ -652,8 +651,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw,
BRW_SS_SURFACE,
&key, sizeof(key),
&region_bo, 1,
- &surf, sizeof(surf),
- NULL, NULL);
+ &surf, sizeof(surf));
if (region_bo != NULL) {
/* We might sample from it, and we might render to it, so flag
* them both. We might be able to figure out from other state
@@ -700,8 +698,7 @@ brw_wm_get_binding_table(struct brw_context *brw)
bind_bo = brw_upload_cache( &brw->surface_cache, BRW_SS_SURF_BIND,
NULL, 0,
brw->wm.surf_bo, brw->wm.nr_surfaces,
- data, data_size,
- NULL, NULL);
+ data, data_size);
/* Emit binding table relocations to surface state */
for (i = 0; i < BRW_WM_MAX_SURF; i++) {
diff --git a/src/mesa/drivers/dri/i965/intel_swapbuffers.c b/src/mesa/drivers/dri/i965/intel_swapbuffers.c
deleted file mode 120000
index 148d5215aa6..00000000000
--- a/src/mesa/drivers/dri/i965/intel_swapbuffers.c
+++ /dev/null
@@ -1 +0,0 @@
-../intel/intel_swapbuffers.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
index ca6e2fa5b11..f18fb91a888 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",
@@ -94,7 +94,6 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch)
batch->size = intel->maxBatchSize;
batch->ptr = batch->map;
batch->dirty_state = ~0;
- batch->cliprect_mode = IGNORE_CLIPRECTS;
}
struct intel_batchbuffer *
@@ -129,13 +128,10 @@ intel_batchbuffer_free(struct intel_batchbuffer *batch)
/* TODO: Push this whole function into bufmgr.
*/
static void
-do_flush_locked(struct intel_batchbuffer *batch,
- GLuint used, GLboolean allow_unlock)
+do_flush_locked(struct intel_batchbuffer *batch, GLuint used)
{
struct intel_context *intel = batch->intel;
int ret = 0;
- unsigned int num_cliprects = 0;
- struct drm_clip_rect *cliprects = NULL;
int x_off = 0, y_off = 0;
if (batch->buffer)
@@ -146,31 +142,7 @@ do_flush_locked(struct intel_batchbuffer *batch,
batch->map = NULL;
batch->ptr = NULL;
-
- if (batch->cliprect_mode == LOOP_CLIPRECTS) {
- intel_get_cliprects(intel, &cliprects, &num_cliprects, &x_off, &y_off);
- }
- /* Dispatch the batchbuffer, if it has some effect (nonzero cliprects).
- * Can't short-circuit like this once we have hardware contexts, but we
- * should always be in DRI2 mode by then anyway.
- */
- if ((batch->cliprect_mode != LOOP_CLIPRECTS ||
- num_cliprects != 0) && !intel->no_hw) {
- dri_bo_exec(batch->buf, used, cliprects, num_cliprects,
- (x_off & 0xffff) | (y_off << 16));
- }
-
- if (batch->cliprect_mode == LOOP_CLIPRECTS && num_cliprects == 0) {
- if (allow_unlock) {
- /* If we are not doing any actual user-visible rendering,
- * do a sched_yield to keep the app from pegging the cpu while
- * achieving nothing.
- */
- UNLOCK_HARDWARE(intel);
- sched_yield();
- LOCK_HARDWARE(intel);
- }
- }
+ dri_bo_exec(batch->buf, used, NULL, 0, (x_off & 0xffff) | (y_off << 16));
if (INTEL_DEBUG & DEBUG_BATCH) {
dri_bo_map(batch->buf, GL_FALSE);
@@ -183,7 +155,6 @@ do_flush_locked(struct intel_batchbuffer *batch,
}
if (ret != 0) {
- UNLOCK_HARDWARE(intel);
exit(1);
}
intel->vtbl.new_batch(intel);
@@ -196,15 +167,14 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
struct intel_context *intel = batch->intel;
GLuint used = batch->ptr - batch->map;
- if (intel->first_post_swapbuffers_batch == NULL) {
+ if (!intel->using_dri2_swapbuffers &&
+ intel->first_post_swapbuffers_batch == NULL) {
intel->first_post_swapbuffers_batch = intel->batch->buf;
drm_intel_bo_reference(intel->first_post_swapbuffers_batch);
}
- if (used == 0) {
- batch->cliprect_mode = IGNORE_CLIPRECTS;
+ if (used == 0)
return;
- }
if (INTEL_DEBUG & DEBUG_BATCH)
fprintf(stderr, "%s:%d: Batchbuffer flush with %db used\n", file, line,
@@ -212,7 +182,7 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
batch->reserved_space = 0;
/* Emit a flush if the bufmgr doesn't do it for us. */
- if (intel->always_flush_cache || !intel->ttm) {
+ if (intel->always_flush_cache) {
intel_batchbuffer_emit_mi_flush(batch);
used = batch->ptr - batch->map;
}
@@ -244,14 +214,15 @@ _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.
*/
- LOCK_HARDWARE(intel);
- do_flush_locked(batch, used, GL_FALSE);
- UNLOCK_HARDWARE(intel);
+ do_flush_locked(batch, used);
if (INTEL_DEBUG & DEBUG_SYNC) {
fprintf(stderr, "waiting for idle\n");
@@ -293,11 +264,10 @@ intel_batchbuffer_emit_reloc(struct intel_batchbuffer *batch,
void
intel_batchbuffer_data(struct intel_batchbuffer *batch,
- const void *data, GLuint bytes,
- enum cliprect_mode cliprect_mode)
+ const void *data, GLuint bytes)
{
assert((bytes & 3) == 0);
- intel_batchbuffer_require_space(batch, bytes, cliprect_mode);
+ intel_batchbuffer_require_space(batch, bytes);
__memcpy(batch->ptr, data, bytes);
batch->ptr += bytes;
}
@@ -314,7 +284,7 @@ intel_batchbuffer_emit_mi_flush(struct intel_batchbuffer *batch)
struct intel_context *intel = batch->intel;
if (intel->gen >= 4) {
- BEGIN_BATCH(4, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(4);
OUT_BATCH(_3DSTATE_PIPE_CONTROL |
PIPE_CONTROL_INSTRUCTION_FLUSH |
PIPE_CONTROL_WRITE_FLUSH |
@@ -324,7 +294,7 @@ intel_batchbuffer_emit_mi_flush(struct intel_batchbuffer *batch)
OUT_BATCH(0); /* write data */
ADVANCE_BATCH();
} else {
- BEGIN_BATCH(1, IGNORE_CLIPRECTS);
+ BEGIN_BATCH(1);
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 d4a94454dd5..b052b724d84 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.h
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.h
@@ -10,35 +10,6 @@
#define BATCH_SZ 16384
#define BATCH_RESERVED 16
-enum cliprect_mode {
- /**
- * Batchbuffer contents may be looped over per cliprect, but do not
- * require it.
- */
- IGNORE_CLIPRECTS,
- /**
- * Batchbuffer contents require looping over per cliprect at batch submit
- * time.
- *
- * This will be upgraded to NO_LOOP_CLIPRECTS when there's a single
- * constant cliprect, as in DRI2 or FBO rendering.
- */
- LOOP_CLIPRECTS,
- /**
- * Batchbuffer contents contain drawing that should not be executed multiple
- * times.
- */
- NO_LOOP_CLIPRECTS,
- /**
- * Batchbuffer contents contain drawing that already handles cliprects, such
- * as 2D drawing to front/back/depth that doesn't respect DRAWING_RECTANGLE.
- *
- * Equivalent behavior to NO_LOOP_CLIPRECTS, but may not persist in batch
- * outside of LOCK/UNLOCK. This is upgraded to just NO_LOOP_CLIPRECTS when
- * there's a constant cliprect, as in DRI2 or FBO rendering.
- */
- REFERENCES_CLIPRECTS
-};
struct intel_batchbuffer
{
@@ -51,8 +22,6 @@ struct intel_batchbuffer
GLubyte *map;
GLubyte *ptr;
- enum cliprect_mode cliprect_mode;
-
GLuint size;
/** Tracking of BEGIN_BATCH()/OUT_BATCH()/ADVANCE_BATCH() debugging */
@@ -85,8 +54,7 @@ void intel_batchbuffer_reset(struct intel_batchbuffer *batch);
* intel_buffer_dword() calls.
*/
void intel_batchbuffer_data(struct intel_batchbuffer *batch,
- const void *data, GLuint bytes,
- enum cliprect_mode cliprect_mode);
+ const void *data, GLuint bytes);
void intel_batchbuffer_release_space(struct intel_batchbuffer *batch,
GLuint bytes);
@@ -121,36 +89,19 @@ intel_batchbuffer_emit_dword(struct intel_batchbuffer *batch, GLuint dword)
static INLINE void
intel_batchbuffer_require_space(struct intel_batchbuffer *batch,
- GLuint sz,
- enum cliprect_mode cliprect_mode)
+ GLuint sz)
{
assert(sz < batch->size - 8);
if (intel_batchbuffer_space(batch) < sz)
intel_batchbuffer_flush(batch);
-
- if ((cliprect_mode == LOOP_CLIPRECTS ||
- cliprect_mode == REFERENCES_CLIPRECTS) &&
- batch->intel->constant_cliprect)
- cliprect_mode = NO_LOOP_CLIPRECTS;
-
- if (cliprect_mode != IGNORE_CLIPRECTS) {
- if (batch->cliprect_mode == IGNORE_CLIPRECTS) {
- batch->cliprect_mode = cliprect_mode;
- } else {
- if (batch->cliprect_mode != cliprect_mode) {
- intel_batchbuffer_flush(batch);
- batch->cliprect_mode = cliprect_mode;
- }
- }
- }
}
/* Here are the crusty old macros, to be removed:
*/
#define BATCH_LOCALS
-#define BEGIN_BATCH(n, cliprect_mode) do { \
- intel_batchbuffer_require_space(intel->batch, (n)*4, cliprect_mode); \
+#define BEGIN_BATCH(n) do { \
+ intel_batchbuffer_require_space(intel->batch, (n)*4); \
assert(intel->batch->emit.start_ptr == NULL); \
intel->batch->emit.total = (n) * 4; \
intel->batch->emit.start_ptr = intel->batch->ptr; \
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 5b94d059668..72b6e1acb97 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -41,137 +41,6 @@
#define FILE_DEBUG_FLAG DEBUG_BLIT
-/**
- * Copy the back color buffer to the front color buffer.
- * Used for SwapBuffers().
- */
-void
-intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
- const drm_clip_rect_t * rect)
-{
-
- struct intel_context *intel;
- const intelScreenPrivate *intelScreen;
-
- DBG("%s\n", __FUNCTION__);
-
- assert(dPriv);
-
- intel = intelScreenContext(dPriv->driScreenPriv->private);
- if (!intel)
- return;
-
- intelScreen = intel->intelScreen;
-
- /* The LOCK_HARDWARE is required for the cliprects. Buffer offsets
- * should work regardless.
- */
- LOCK_HARDWARE(intel);
-
- if (dPriv && dPriv->numClipRects) {
- struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
- struct intel_region *src, *dst;
- int nbox = dPriv->numClipRects;
- drm_clip_rect_t *pbox = dPriv->pClipRects;
- int cpp;
- int src_pitch, dst_pitch;
- unsigned short src_x, src_y;
- int BR13, CMD;
- int i;
- dri_bo *aper_array[3];
-
- src = intel_get_rb_region(&intel_fb->Base, BUFFER_BACK_LEFT);
- dst = intel_get_rb_region(&intel_fb->Base, BUFFER_FRONT_LEFT);
-
- src_pitch = src->pitch * src->cpp;
- dst_pitch = dst->pitch * dst->cpp;
-
- cpp = src->cpp;
-
- ASSERT(intel_fb);
- ASSERT(intel_fb->Base.Name == 0); /* Not a user-created FBO */
- ASSERT(src);
- ASSERT(dst);
- ASSERT(src->cpp == dst->cpp);
-
- if (cpp == 2) {
- BR13 = (0xCC << 16) | BR13_565;
- CMD = XY_SRC_COPY_BLT_CMD;
- }
- else {
- BR13 = (0xCC << 16) | BR13_8888;
- CMD = XY_SRC_COPY_BLT_CMD | XY_BLT_WRITE_ALPHA | XY_BLT_WRITE_RGB;
- }
-
- assert(src->tiling != I915_TILING_Y);
- assert(dst->tiling != I915_TILING_Y);
-#ifndef I915
- if (src->tiling != I915_TILING_NONE) {
- CMD |= XY_SRC_TILED;
- src_pitch /= 4;
- }
- if (dst->tiling != I915_TILING_NONE) {
- CMD |= XY_DST_TILED;
- dst_pitch /= 4;
- }
-#endif
- /* do space/cliprects check before going any further */
- intel_batchbuffer_require_space(intel->batch, 8 * 4,
- REFERENCES_CLIPRECTS);
- again:
- aper_array[0] = intel->batch->buf;
- aper_array[1] = dst->buffer;
- aper_array[2] = src->buffer;
-
- if (dri_bufmgr_check_aperture_space(aper_array, 3) != 0) {
- intel_batchbuffer_flush(intel->batch);
- goto again;
- }
-
- for (i = 0; i < nbox; i++, pbox++) {
- drm_clip_rect_t box = *pbox;
-
- if (rect) {
- if (!intel_intersect_cliprects(&box, &box, rect))
- continue;
- }
-
- if (box.x1 >= box.x2 ||
- box.y1 >= box.y2)
- continue;
-
- assert(box.x1 < box.x2);
- assert(box.y1 < box.y2);
- src_x = box.x1 - dPriv->x + dPriv->backX;
- src_y = box.y1 - dPriv->y + dPriv->backY;
-
- BEGIN_BATCH(8, REFERENCES_CLIPRECTS);
- OUT_BATCH(CMD);
- OUT_BATCH(BR13 | dst_pitch);
- OUT_BATCH((box.y1 << 16) | box.x1);
- OUT_BATCH((box.y2 << 16) | box.x2);
-
- OUT_RELOC(dst->buffer,
- I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
- 0);
- OUT_BATCH((src_y << 16) | src_x);
- OUT_BATCH(src_pitch);
- OUT_RELOC(src->buffer,
- I915_GEM_DOMAIN_RENDER, 0,
- 0);
- ADVANCE_BATCH();
- }
-
- /* Flush the rendering and the batch so that the results all land on the
- * screen in a timely fashion.
- */
- intel_batchbuffer_emit_mi_flush(intel->batch);
- intel_batchbuffer_flush(intel->batch);
- }
-
- UNLOCK_HARDWARE(intel);
-}
-
static GLuint translate_raster_op(GLenum logicop)
{
switch(logicop) {
@@ -247,7 +116,6 @@ intelEmitCopyBlit(struct intel_context *intel,
} while (pass < 2);
if (pass >= 2) {
- LOCK_HARDWARE(intel);
dri_bo_map(dst_buffer, GL_TRUE);
dri_bo_map(src_buffer, GL_FALSE);
_mesa_copy_rect((GLubyte *)dst_buffer->virtual + dst_offset,
@@ -261,12 +129,11 @@ intelEmitCopyBlit(struct intel_context *intel,
dri_bo_unmap(src_buffer);
dri_bo_unmap(dst_buffer);
- UNLOCK_HARDWARE(intel);
return GL_TRUE;
}
- intel_batchbuffer_require_space(intel->batch, 8 * 4, NO_LOOP_CLIPRECTS);
+ intel_batchbuffer_require_space(intel->batch, 8 * 4);
DBG("%s src:buf(%p)/%d+%d %d,%d dst:buf(%p)/%d+%d %d,%d sz:%dx%d\n",
__FUNCTION__,
src_buffer, src_pitch, src_offset, src_x, src_y,
@@ -311,7 +178,7 @@ intelEmitCopyBlit(struct intel_context *intel,
assert(dst_x < dst_x2);
assert(dst_y < dst_y2);
- BEGIN_BATCH(8, NO_LOOP_CLIPRECTS);
+ BEGIN_BATCH(8);
OUT_BATCH(CMD);
OUT_BATCH(BR13 | (uint16_t)dst_pitch);
OUT_BATCH((dst_y << 16) | dst_x);
@@ -369,8 +236,6 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
skipBuffers = BUFFER_BIT_STENCIL;
}
- LOCK_HARDWARE(intel);
-
intel_get_cliprects(intel, &cliprects, &num_cliprects, &x_off, &y_off);
if (num_cliprects) {
GLint cx, cy, cw, ch;
@@ -498,10 +363,11 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
switch (irb->Base.Format) {
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],
@@ -526,7 +392,7 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
assert(x1 < x2);
assert(y1 < y2);
- BEGIN_BATCH(6, REFERENCES_CLIPRECTS);
+ BEGIN_BATCH(6);
OUT_BATCH(CMD);
OUT_BATCH(BR13);
OUT_BATCH((y1 << 16) | x1);
@@ -541,8 +407,6 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
}
}
}
-
- UNLOCK_HARDWARE(intel);
}
GLboolean
@@ -584,8 +448,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
intel_batchbuffer_require_space( intel->batch,
(8 * 4) +
(3 * 4) +
- dwords * 4,
- REFERENCES_CLIPRECTS );
+ dwords * 4 );
opcode = XY_SETUP_BLT_CMD;
if (cpp == 4)
@@ -607,7 +470,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
if (dst_tiling != I915_TILING_NONE)
blit_cmd |= XY_DST_TILED;
- BEGIN_BATCH(8 + 3, REFERENCES_CLIPRECTS);
+ BEGIN_BATCH(8 + 3);
OUT_BATCH(opcode);
OUT_BATCH(br13);
OUT_BATCH((0 << 16) | 0); /* clip x1, y1 */
@@ -626,8 +489,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
intel_batchbuffer_data( intel->batch,
src_bits,
- dwords * 4,
- REFERENCES_CLIPRECTS );
+ dwords * 4 );
intel_batchbuffer_emit_mi_flush(intel->batch);
diff --git a/src/mesa/drivers/dri/intel/intel_blit.h b/src/mesa/drivers/dri/intel/intel_blit.h
index 240cb7cd1b6..eb66fe0481d 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.h
+++ b/src/mesa/drivers/dri/intel/intel_blit.h
@@ -30,7 +30,7 @@
#include "intel_context.h"
-extern void intelCopyBuffer(const __DRIdrawablePrivate * dpriv,
+extern void intelCopyBuffer(const __DRIdrawable * dpriv,
const drm_clip_rect_t * rect);
extern void intelClearWithBlit(GLcontext * ctx, GLbitfield mask);
diff --git a/src/mesa/drivers/dri/intel/intel_buffers.c b/src/mesa/drivers/dri/intel/intel_buffers.c
index 78ea6ebb6d8..de752573495 100644
--- a/src/mesa/drivers/dri/intel/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel/intel_buffers.c
@@ -100,33 +100,15 @@ intel_get_cliprects(struct intel_context *intel,
unsigned int *num_cliprects,
int *x_off, int *y_off)
{
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
-
- if (intel->constant_cliprect) {
- /* FBO or DRI2 rendering, which can just use the fb's size. */
- intel->fboRect.x1 = 0;
- intel->fboRect.y1 = 0;
- intel->fboRect.x2 = intel->ctx.DrawBuffer->Width;
- intel->fboRect.y2 = intel->ctx.DrawBuffer->Height;
-
- *cliprects = &intel->fboRect;
- *num_cliprects = 1;
- *x_off = 0;
- *y_off = 0;
- } else if (intel->front_cliprects || dPriv->numBackClipRects == 0) {
- /* use the front clip rects */
- *cliprects = dPriv->pClipRects;
- *num_cliprects = dPriv->numClipRects;
- *x_off = dPriv->x;
- *y_off = dPriv->y;
- }
- else {
- /* use the back clip rects */
- *num_cliprects = dPriv->numBackClipRects;
- *cliprects = dPriv->pBackClipRects;
- *x_off = dPriv->backX;
- *y_off = dPriv->backY;
- }
+ intel->fboRect.x1 = 0;
+ intel->fboRect.y1 = 0;
+ intel->fboRect.x2 = intel->ctx.DrawBuffer->Width;
+ intel->fboRect.y2 = intel->ctx.DrawBuffer->Height;
+
+ *cliprects = &intel->fboRect;
+ *num_cliprects = 1;
+ *x_off = 0;
+ *y_off = 0;
}
@@ -200,7 +182,6 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
|| (fb->_NumColorDrawBuffers == 0)) {
/* writing to 0 */
colorRegions[0] = NULL;
- intel->constant_cliprect = GL_TRUE;
}
else if (fb->_NumColorDrawBuffers > 1) {
int i;
@@ -210,34 +191,23 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
irb = intel_renderbuffer(fb->_ColorDrawBuffers[i]);
colorRegions[i] = irb ? irb->region : NULL;
}
- intel->constant_cliprect = GL_TRUE;
}
else {
/* Get the intel_renderbuffer for the single colorbuffer we're drawing
- * into, and set up cliprects if it's a DRI1 window front buffer.
+ * into.
*/
if (fb->Name == 0) {
- intel->constant_cliprect = intel->driScreen->dri2.enabled;
/* drawing to window system buffer */
- if (fb->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {
- if (!intel->constant_cliprect && !intel->front_cliprects)
- intel_batchbuffer_flush(intel->batch);
- intel->front_cliprects = GL_TRUE;
+ if (fb->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT)
colorRegions[0] = intel_get_rb_region(fb, BUFFER_FRONT_LEFT);
- }
- else {
- if (!intel->constant_cliprect && intel->front_cliprects)
- intel_batchbuffer_flush(intel->batch);
- intel->front_cliprects = GL_FALSE;
+ else
colorRegions[0] = intel_get_rb_region(fb, BUFFER_BACK_LEFT);
- }
}
else {
/* drawing to user-created FBO */
struct intel_renderbuffer *irb;
irb = intel_renderbuffer(fb->_ColorDrawBuffers[0]);
colorRegions[0] = (irb && irb->region) ? irb->region : NULL;
- intel->constant_cliprect = GL_TRUE;
}
}
@@ -289,6 +259,12 @@ intel_draw_buffer(GLcontext * ctx, struct gl_framebuffer *fb)
FALLBACK(intel, INTEL_FALLBACK_STENCIL_BUFFER, GL_FALSE);
}
+ /* If we have a (packed) stencil buffer attached but no depth buffer,
+ * we still need to set up the shared depth/stencil state so we can use it.
+ */
+ if (depthRegion == NULL && irbStencil && irbStencil->region)
+ depthRegion = irbStencil->region;
+
/*
* Update depth and stencil test state
*/
diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c
index 583976ff89d..ca78681538c 100644
--- a/src/mesa/drivers/dri/intel/intel_clear.c
+++ b/src/mesa/drivers/dri/intel/intel_clear.c
@@ -65,7 +65,7 @@ static void
intelClear(GLcontext *ctx, GLbitfield mask)
{
struct intel_context *intel = intel_context(ctx);
- const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask);
+ const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask[0]);
GLbitfield tri_mask = 0;
GLbitfield blit_mask = 0;
GLbitfield swrast_mask = 0;
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 6275df322a8..3896bfa091e 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -54,10 +54,8 @@
#include "intel_decode.h"
#include "intel_bufmgr.h"
#include "intel_screen.h"
-#include "intel_swapbuffers.h"
#include "drirenderbuffer.h"
-#include "vblank.h"
#include "utils.h"
#include "xmlpool.h" /* for symbolic values of enum-type options */
@@ -67,12 +65,10 @@ int INTEL_DEBUG = (0);
#endif
-#define DRIVER_DATE "20091221 2009Q4"
+#define DRIVER_DATE "20091221 DEVELOPMENT"
#define DRIVER_DATE_GEM "GEM " DRIVER_DATE
-static void intel_flush(GLcontext *ctx, GLboolean needs_mi_flush);
-
static const GLubyte *
intelGetString(GLcontext * ctx, GLenum name)
{
@@ -175,9 +171,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:
@@ -194,10 +188,11 @@ intel_bits_per_pixel(const struct intel_renderbuffer *rb)
void
intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
{
- struct intel_framebuffer *intel_fb = drawable->driverPrivate;
+ struct gl_framebuffer *fb = drawable->driverPrivate;
struct intel_renderbuffer *rb;
struct intel_region *region, *depth_region;
struct intel_context *intel = context->driverPrivate;
+ struct intel_renderbuffer *front_rb, *back_rb, *depth_rb, *stencil_rb;
__DRIbuffer *buffers = NULL;
__DRIscreen *screen;
int i, count;
@@ -213,26 +208,25 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
if (screen->dri2.loader
&& (screen->dri2.loader->base.version > 2)
&& (screen->dri2.loader->getBuffersWithFormat != NULL)) {
- struct intel_renderbuffer *depth_rb;
- struct intel_renderbuffer *stencil_rb;
+
+ front_rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
+ back_rb = intel_get_renderbuffer(fb, BUFFER_BACK_LEFT);
+ depth_rb = intel_get_renderbuffer(fb, BUFFER_DEPTH);
+ stencil_rb = intel_get_renderbuffer(fb, BUFFER_STENCIL);
i = 0;
if ((intel->is_front_buffer_rendering ||
intel->is_front_buffer_reading ||
- !intel_fb->color_rb[1])
- && intel_fb->color_rb[0]) {
+ !back_rb) && front_rb) {
attachments[i++] = __DRI_BUFFER_FRONT_LEFT;
- attachments[i++] = intel_bits_per_pixel(intel_fb->color_rb[0]);
+ attachments[i++] = intel_bits_per_pixel(front_rb);
}
- if (intel_fb->color_rb[1]) {
+ if (back_rb) {
attachments[i++] = __DRI_BUFFER_BACK_LEFT;
- attachments[i++] = intel_bits_per_pixel(intel_fb->color_rb[1]);
+ attachments[i++] = intel_bits_per_pixel(back_rb);
}
- depth_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
- stencil_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
-
if ((depth_rb != NULL) && (stencil_rb != NULL)) {
attachments[i++] = __DRI_BUFFER_DEPTH_STENCIL;
attachments[i++] = intel_bits_per_pixel(depth_rb);
@@ -253,13 +247,13 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
drawable->loaderPrivate);
} else if (screen->dri2.loader) {
i = 0;
- if (intel_fb->color_rb[0])
+ if (intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT))
attachments[i++] = __DRI_BUFFER_FRONT_LEFT;
- if (intel_fb->color_rb[1])
+ if (intel_get_renderbuffer(fb, BUFFER_BACK_LEFT))
attachments[i++] = __DRI_BUFFER_BACK_LEFT;
- if (intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH))
+ if (intel_get_renderbuffer(fb, BUFFER_DEPTH))
attachments[i++] = __DRI_BUFFER_DEPTH;
- if (intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL))
+ if (intel_get_renderbuffer(fb, BUFFER_STENCIL))
attachments[i++] = __DRI_BUFFER_STENCIL;
buffers = (*screen->dri2.loader->getBuffers)(drawable,
@@ -292,32 +286,32 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
for (i = 0; i < count; i++) {
switch (buffers[i].attachment) {
case __DRI_BUFFER_FRONT_LEFT:
- rb = intel_fb->color_rb[0];
+ rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
region_name = "dri2 front buffer";
break;
case __DRI_BUFFER_FAKE_FRONT_LEFT:
- rb = intel_fb->color_rb[0];
+ rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
region_name = "dri2 fake front buffer";
break;
case __DRI_BUFFER_BACK_LEFT:
- rb = intel_fb->color_rb[1];
+ rb = intel_get_renderbuffer(fb, BUFFER_BACK_LEFT);
region_name = "dri2 back buffer";
break;
case __DRI_BUFFER_DEPTH:
- rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
+ rb = intel_get_renderbuffer(fb, BUFFER_DEPTH);
region_name = "dri2 depth buffer";
break;
case __DRI_BUFFER_DEPTH_STENCIL:
- rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
+ rb = intel_get_renderbuffer(fb, BUFFER_DEPTH);
region_name = "dri2 depth / stencil buffer";
break;
case __DRI_BUFFER_STENCIL:
- rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
+ rb = intel_get_renderbuffer(fb, BUFFER_STENCIL);
region_name = "dri2 stencil buffer";
break;
@@ -364,7 +358,7 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
intel_region_release(&region);
if (buffers[i].attachment == __DRI_BUFFER_DEPTH_STENCIL) {
- rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
+ rb = intel_get_renderbuffer(fb, BUFFER_STENCIL);
if (rb != NULL) {
struct intel_region *stencil_region = NULL;
@@ -381,6 +375,7 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
}
}
+ drawable->validBuffers = GL_TRUE;
driUpdateFramebufferSize(&intel->ctx, drawable);
}
@@ -392,9 +387,6 @@ intel_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
void (*old_viewport)(GLcontext *ctx, GLint x, GLint y,
GLsizei w, GLsizei h);
- if (!driContext->driScreenPriv->dri2.enabled)
- return;
-
if (!intel->meta.internal_viewport_call && ctx->DrawBuffer->Name == 0) {
/* If we're rendering to the fake front buffer, make sure all the pending
* drawing has landed on the real front buffer. Otherwise when we
@@ -413,7 +405,6 @@ intel_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
old_viewport = ctx->Driver.Viewport;
ctx->Driver.Viewport = NULL;
intel->driDrawable = driContext->driDrawablePriv;
- intelWindowMoved(intel);
intel_draw_buffer(ctx, intel->ctx.DrawBuffer);
ctx->Driver.Viewport = old_viewport;
}
@@ -468,7 +459,7 @@ intelInvalidateState(GLcontext * ctx, GLuint new_state)
intel->vtbl.invalidate_state( intel, new_state );
}
-static void
+void
intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
{
struct intel_context *intel = intel_context(ctx);
@@ -479,13 +470,6 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
if (intel->gen < 4)
INTEL_FIREVERTICES(intel);
- /* Emit a flush so that any frontbuffer rendering that might have occurred
- * lands onscreen in a timely manner, even if the X Server doesn't trigger
- * a flush for us.
- */
- if (!intel->driScreen->dri2.enabled && needs_mi_flush)
- intel_batchbuffer_emit_mi_flush(intel->batch);
-
if (intel->batch->map != intel->batch->ptr)
intel_batchbuffer_flush(intel->batch);
@@ -537,7 +521,8 @@ intel_glFlush(GLcontext *ctx)
* and getting our hands on that doesn't seem worth it, so we just us the
* first batch we emitted after the last swap.
*/
- if (intel->first_post_swapbuffers_batch != NULL) {
+ if (!intel->using_dri2_swapbuffers &&
+ intel->first_post_swapbuffers_batch != NULL) {
drm_intel_bo_wait_rendering(intel->first_post_swapbuffers_batch);
drm_intel_bo_unreference(intel->first_post_swapbuffers_batch);
intel->first_post_swapbuffers_batch = NULL;
@@ -591,15 +576,15 @@ intelInitDriverFunctions(struct dd_function_table *functions)
GLboolean
intelInitContext(struct intel_context *intel,
const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate,
struct dd_function_table *functions)
{
GLcontext *ctx = &intel->ctx;
GLcontext *shareCtx = (GLcontext *) sharedContextPrivate;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *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)) {
@@ -610,20 +595,28 @@ intelInitContext(struct intel_context *intel,
driContextPriv->driverPrivate = intel;
intel->intelScreen = intelScreen;
intel->driScreen = sPriv;
- intel->sarea = intelScreen->sarea;
intel->driContext = driContextPriv;
+ intel->driFd = sPriv->fd;
- if (IS_965(intel->intelScreen->deviceID))
+ if (IS_965(intel->intelScreen->deviceID)) {
intel->gen = 4;
- else if (IS_9XX(intel->intelScreen->deviceID))
+ } else if (IS_9XX(intel->intelScreen->deviceID)) {
intel->gen = 3;
- else
+ if (IS_945(intel->intelScreen->deviceID)) {
+ intel->is_945 = GL_TRUE;
+ }
+ } else {
intel->gen = 2;
+ }
- /* Dri stuff */
- intel->hHWContext = driContextPriv->hHWContext;
- intel->driFd = sPriv->fd;
- intel->driHwLock = sPriv->lock;
+ if (IS_IGDNG(intel->intelScreen->deviceID)) {
+ intel->is_ironlake = GL_TRUE;
+ intel->needs_ff_sync = GL_TRUE;
+ intel->has_luminance_srgb = GL_TRUE;
+ } else if (IS_G4X(intel->intelScreen->deviceID)) {
+ intel->has_luminance_srgb = GL_TRUE;
+ intel->is_g4x = GL_TRUE;
+ }
driParseConfigFiles(&intel->optionCache, &intelScreen->optionCache,
intel->driScreen->myNum,
@@ -634,18 +627,14 @@ intelInitContext(struct intel_context *intel,
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
@@ -731,14 +720,6 @@ intelInitContext(struct intel_context *intel,
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 (intel->gen >= 4 && !intel->intelScreen->irq_active) {
_mesa_printf("IRQs not active. Exiting\n");
exit(1);
@@ -750,9 +731,6 @@ intelInitContext(struct intel_context *intel,
if (INTEL_DEBUG & DEBUG_BUFMGR)
dri_bufmgr_set_debug(intel->bufmgr, GL_TRUE);
- if (!sPriv->dri2.enabled)
- intel_recreate_static_regions(intel);
-
intel->batch = intel_batchbuffer_alloc(intel);
intel_fbo_init(intel);
@@ -801,7 +779,7 @@ intelInitContext(struct intel_context *intel,
}
void
-intelDestroyContext(__DRIcontextPrivate * driContextPriv)
+intelDestroyContext(__DRIcontext * driContextPriv)
{
struct intel_context *intel =
(struct intel_context *) driContextPriv->driverPrivate;
@@ -848,57 +826,6 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
*/
}
- /* XXX In intelMakeCurrent() below, the context's static regions are
- * referenced inside the frame buffer; it's listed as a hack,
- * with a comment of "XXX FBO temporary fix-ups!", but
- * as long as it's there, we should release the regions here.
- * The do/while loop around the block is used to allow the
- * "continue" statements inside the block to exit the block,
- * to avoid many layers of "if" constructs.
- */
- do {
- __DRIdrawablePrivate * driDrawPriv = intel->driDrawable;
- struct intel_framebuffer *intel_fb;
- struct intel_renderbuffer *irbDepth, *irbStencil;
- if (!driDrawPriv) {
- /* We're already detached from the drawable; exit this block. */
- continue;
- }
- intel_fb = (struct intel_framebuffer *) driDrawPriv->driverPrivate;
- if (!intel_fb) {
- /* The frame buffer is already gone; exit this block. */
- continue;
- }
- irbDepth = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
- irbStencil = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
-
- /* If the regions of the frame buffer still match the regions
- * of the context, release them. If they've changed somehow,
- * leave them alone.
- */
- if (intel_fb->color_rb[0] && intel_fb->color_rb[0]->region == intel->front_region) {
- intel_renderbuffer_set_region(intel_fb->color_rb[0], NULL);
- }
- if (intel_fb->color_rb[1] && intel_fb->color_rb[1]->region == intel->back_region) {
- intel_renderbuffer_set_region(intel_fb->color_rb[1], NULL);
- }
-
- if (irbDepth && irbDepth->region == intel->depth_region) {
- intel_renderbuffer_set_region(irbDepth, NULL);
- }
- /* Usually, the stencil buffer is the same as the depth buffer;
- * but they're handled separately in MakeCurrent, so we'll
- * handle them separately here.
- */
- if (irbStencil && irbStencil->region == intel->depth_region) {
- intel_renderbuffer_set_region(irbStencil, NULL);
- }
- } while (0);
-
- intel_region_release(&intel->front_region);
- intel_region_release(&intel->back_region);
- intel_region_release(&intel->depth_region);
-
driDestroyOptionCache(&intel->optionCache);
/* free the Mesa context */
@@ -910,7 +837,7 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
}
GLboolean
-intelUnbindContext(__DRIcontextPrivate * driContextPriv)
+intelUnbindContext(__DRIcontext * driContextPriv)
{
struct intel_context *intel =
(struct intel_context *) driContextPriv->driverPrivate;
@@ -924,11 +851,10 @@ intelUnbindContext(__DRIcontextPrivate * driContextPriv)
}
GLboolean
-intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
- __DRIdrawablePrivate * driDrawPriv,
- __DRIdrawablePrivate * driReadPriv)
+intelMakeCurrent(__DRIcontext * driContextPriv,
+ __DRIdrawable * driDrawPriv,
+ __DRIdrawable * driReadPriv)
{
- __DRIscreenPrivate *psp = driDrawPriv->driScreenPriv;
struct intel_context *intel;
GET_CURRENT_CONTEXT(curCtx);
@@ -946,41 +872,12 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
}
if (driContextPriv) {
- struct intel_framebuffer *intel_fb =
- (struct intel_framebuffer *) driDrawPriv->driverPrivate;
- GLframebuffer *readFb = (GLframebuffer *) driReadPriv->driverPrivate;
+ struct gl_framebuffer *fb = driDrawPriv->driverPrivate;
+ struct gl_framebuffer *readFb = driReadPriv->driverPrivate;
- if (driContextPriv->driScreenPriv->dri2.enabled) {
- intel_update_renderbuffers(driContextPriv, driDrawPriv);
- if (driDrawPriv != driReadPriv)
- intel_update_renderbuffers(driContextPriv, driReadPriv);
- } else {
- /* XXX FBO temporary fix-ups! These are released in
- * intelDextroyContext(), above. Changes here should be
- * reflected there.
- */
- /* if the renderbuffers don't have regions, init them from the context */
- struct intel_renderbuffer *irbDepth
- = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
- struct intel_renderbuffer *irbStencil
- = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
-
- if (intel_fb->color_rb[0]) {
- intel_renderbuffer_set_region(intel_fb->color_rb[0],
- intel->front_region);
- }
- if (intel_fb->color_rb[1]) {
- intel_renderbuffer_set_region(intel_fb->color_rb[1],
- intel->back_region);
- }
-
- if (irbDepth) {
- intel_renderbuffer_set_region(irbDepth, intel->depth_region);
- }
- if (irbStencil) {
- intel_renderbuffer_set_region(irbStencil, intel->depth_region);
- }
- }
+ intel_update_renderbuffers(driContextPriv, driDrawPriv);
+ if (driDrawPriv != driReadPriv)
+ intel_update_renderbuffers(driContextPriv, driReadPriv);
/* set GLframebuffer size to match window, if needed */
driUpdateFramebufferSize(&intel->ctx, driDrawPriv);
@@ -989,37 +886,10 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
driUpdateFramebufferSize(&intel->ctx, driReadPriv);
}
- _mesa_make_current(&intel->ctx, &intel_fb->Base, readFb);
-
+ _mesa_make_current(&intel->ctx, fb, readFb);
intel->driReadDrawable = driReadPriv;
-
- if (intel->driDrawable != driDrawPriv) {
- if (driDrawPriv->swap_interval == (unsigned)-1) {
- int i;
-
- driDrawPriv->vblFlags = (intel->intelScreen->irq_active != 0)
- ? driGetDefaultVBlankFlags(&intel->optionCache)
- : VBLANK_FLAG_NO_IRQ;
-
- /* Prevent error printf if one crtc is disabled, this will
- * be properly calculated in intelWindowMoved() next.
- */
- driDrawPriv->vblFlags = intelFixupVblank(intel, driDrawPriv);
-
- (*psp->systemTime->getUST) (&intel_fb->swap_ust);
- driDrawableInitVBlank(driDrawPriv);
- intel_fb->vbl_waited = driDrawPriv->vblSeq;
-
- for (i = 0; i < 2; i++) {
- if (intel_fb->color_rb[i])
- intel_fb->color_rb[i]->vbl_pending = driDrawPriv->vblSeq;
- }
- }
- intel->driDrawable = driDrawPriv;
- intelWindowMoved(intel);
- }
-
- intel_draw_buffer(&intel->ctx, &intel_fb->Base);
+ intel->driDrawable = driDrawPriv;
+ intel_draw_buffer(&intel->ctx, fb);
}
else {
_mesa_make_current(NULL, NULL, NULL);
@@ -1027,143 +897,3 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
return GL_TRUE;
}
-
-static void
-intelContendedLock(struct intel_context *intel, GLuint flags)
-{
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
- __DRIscreenPrivate *sPriv = intel->driScreen;
- volatile drm_i915_sarea_t *sarea = intel->sarea;
- int me = intel->hHWContext;
-
- drmGetLock(intel->driFd, intel->hHWContext, flags);
-
- if (INTEL_DEBUG & DEBUG_LOCK)
- _mesa_printf("%s - got contended lock\n", __progname);
-
- /* If the window moved, may need to set a new cliprect now.
- *
- * NOTE: This releases and regains the hw lock, so all state
- * checking must be done *after* this call:
- */
- if (dPriv)
- DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv);
-
- if (sarea && sarea->ctxOwner != me) {
- if (INTEL_DEBUG & DEBUG_BUFMGR) {
- fprintf(stderr, "Lost Context: sarea->ctxOwner %x me %x\n",
- sarea->ctxOwner, me);
- }
- 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) {
- intelWindowMoved(intel);
- intel->lastStamp = dPriv->lastStamp;
- }
-}
-
-
-_glthread_DECLARE_STATIC_MUTEX(lockMutex);
-
-/* Lock the hardware and validate our state.
- */
-void LOCK_HARDWARE( struct intel_context *intel )
-{
- __DRIdrawable *dPriv = intel->driDrawable;
- __DRIscreen *sPriv = intel->driScreen;
- char __ret = 0;
- struct intel_framebuffer *intel_fb = NULL;
- struct intel_renderbuffer *intel_rb = NULL;
-
- intel->locked++;
- if (intel->locked >= 2)
- return;
-
- if (!sPriv->dri2.enabled)
- _glthread_LOCK_MUTEX(lockMutex);
-
- if (intel->driDrawable) {
- intel_fb = intel->driDrawable->driverPrivate;
-
- if (intel_fb)
- intel_rb =
- intel_get_renderbuffer(&intel_fb->Base,
- intel_fb->Base._ColorDrawBufferIndexes[0]);
- }
-
- if (intel_rb && dPriv->vblFlags &&
- !(dPriv->vblFlags & VBLANK_FLAG_NO_IRQ) &&
- (intel_fb->vbl_waited - intel_rb->vbl_pending) > (1<<23)) {
- drmVBlank vbl;
-
- vbl.request.type = DRM_VBLANK_ABSOLUTE;
-
- if ( dPriv->vblFlags & VBLANK_FLAG_SECONDARY ) {
- vbl.request.type |= DRM_VBLANK_SECONDARY;
- }
-
- vbl.request.sequence = intel_rb->vbl_pending;
- drmWaitVBlank(intel->driFd, &vbl);
- intel_fb->vbl_waited = vbl.reply.sequence;
- }
-
- if (!sPriv->dri2.enabled) {
- DRM_CAS(intel->driHwLock, intel->hHWContext,
- (DRM_LOCK_HELD|intel->hHWContext), __ret);
-
- if (__ret)
- intelContendedLock( intel, 0 );
- }
-
-
- if (INTEL_DEBUG & DEBUG_LOCK)
- _mesa_printf("%s - locked\n", __progname);
-}
-
-
-/* Unlock the hardware using the global current context
- */
-void UNLOCK_HARDWARE( struct intel_context *intel )
-{
- __DRIscreen *sPriv = intel->driScreen;
-
- intel->locked--;
- if (intel->locked > 0)
- return;
-
- assert(intel->locked == 0);
-
- if (!sPriv->dri2.enabled) {
- DRM_UNLOCK(intel->driFd, intel->driHwLock, intel->hHWContext);
- _glthread_UNLOCK_MUTEX(lockMutex);
- }
-
- if (INTEL_DEBUG & DEBUG_LOCK)
- _mesa_printf("%s - unlocked\n", __progname);
-
- /**
- * Nothing should be left in batch outside of LOCK/UNLOCK which references
- * cliprects.
- */
- if (intel->batch->cliprect_mode == REFERENCES_CLIPRECTS)
- intel_batchbuffer_flush(intel->batch);
-}
-
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 1afec09a34f..57c3391130c 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -107,7 +107,6 @@ struct intel_context
void (*finish_batch) (struct intel_context * intel);
void (*new_batch) (struct intel_context * intel);
void (*emit_invarient_state) (struct intel_context * intel);
- void (*note_fence) (struct intel_context *intel, GLuint fence);
void (*update_texture_state) (struct intel_context * intel);
void (*render_start) (struct intel_context * intel);
@@ -135,14 +134,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,
@@ -184,20 +175,18 @@ struct intel_context
* Generation number of the hardware: 2 is 8xx, 3 is 9xx pre-965, 4 is 965.
*/
int gen;
+ GLboolean needs_ff_sync;
+ GLboolean is_ironlake;
+ GLboolean is_g4x;
+ GLboolean is_945;
+ GLboolean has_luminance_srgb;
- 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;
+ int urb_size;
struct intel_batchbuffer *batch;
drm_intel_bo *first_post_swapbuffers_batch;
GLboolean no_batch_wrap;
+ GLboolean using_dri2_swapbuffers;
struct
{
@@ -217,10 +206,6 @@ struct intel_context
char *prevLockFile;
int prevLockLine;
- GLuint ClearColor565;
- GLuint ClearColor8888;
-
-
/* Offsets of fields within the current vertex:
*/
GLuint coloroffset;
@@ -237,6 +222,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;
@@ -262,19 +248,6 @@ struct intel_context
intel_tri_func draw_tri;
/**
- * Set to true if a single constant cliprect should be used in the
- * batchbuffer. Otherwise, cliprects must be calculated at batchbuffer
- * flush time while the lock is held.
- */
- GLboolean constant_cliprect;
-
- /**
- * In !constant_cliprect mode, set to true if the front cliprects should be
- * used instead of back.
- */
- GLboolean front_cliprects;
-
- /**
* Set if rendering has occured to the drawable's front buffer.
*
* This is used in the DRI2 case to detect that glFlush should also copy
@@ -302,48 +275,23 @@ 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;
- drm_context_t hHWContext;
- drmLock *driHwLock;
int driFd;
- __DRIcontextPrivate *driContext;
- __DRIdrawablePrivate *driDrawable;
- __DRIdrawablePrivate *driReadDrawable;
- __DRIscreenPrivate *driScreen;
+ __DRIcontext *driContext;
+ __DRIdrawable *driDrawable;
+ __DRIdrawable *driReadDrawable;
+ __DRIscreen *driScreen;
intelScreenPrivate *intelScreen;
- volatile drm_i915_sarea_t *sarea;
-
- GLuint lastStamp;
-
- GLboolean no_hw;
/**
* Configuration cache
*/
driOptionCache optionCache;
-
- int64_t swap_ust;
- int64_t swap_missed_ust;
-
- GLuint swap_count;
- GLuint swap_missed_count;
};
-/* These are functions now:
- */
-void LOCK_HARDWARE( struct intel_context *intel );
-void UNLOCK_HARDWARE( struct intel_context *intel );
-
extern char *__progname;
@@ -374,29 +322,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 ???
@@ -481,14 +406,13 @@ extern int INTEL_DEBUG;
extern GLboolean intelInitContext(struct intel_context *intel,
const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate,
struct dd_function_table *functions);
-extern void intelGetLock(struct intel_context *intel, GLuint flags);
-
extern void intelFinish(GLcontext * ctx);
extern void intelFlush(GLcontext * ctx);
+extern void intel_flush(GLcontext * ctx, GLboolean needs_mi_flush);
extern void intelInitDriverFunctions(struct dd_function_table *functions);
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index 48cdae509e3..6fdd22b9e95 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 },
@@ -151,6 +154,7 @@ static const struct dri_extension brw_extensions[] = {
{ "GL_ARB_fragment_program_shadow", NULL },
{ "GL_ARB_fragment_shader", NULL },
{ "GL_ARB_framebuffer_object", GL_ARB_framebuffer_object_functions},
+ { "GL_ARB_half_float_vertex", NULL },
{ "GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions },
{ "GL_ARB_point_sprite", NULL },
{ "GL_ARB_seamless_cube_map", NULL },
@@ -175,14 +179,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 }
@@ -201,14 +197,10 @@ intelInitExtensions(GLcontext *ctx)
*/
driInitExtensions(ctx, card_extensions, GL_FALSE);
- if (intel->ttm)
- driInitExtensions(ctx, ttm_extensions, GL_FALSE);
-
- if (IS_965(intel->intelScreen->deviceID))
+ if (intel->gen >= 4)
driInitExtensions(ctx, brw_extensions, GL_FALSE);
- if (IS_915(intel->intelScreen->deviceID)
- || IS_945(intel->intelScreen->deviceID)) {
+ if (intel->gen == 3) {
driInitExtensions(ctx, i915_extensions, GL_FALSE);
if (driQueryOptionb(&intel->optionCache, "fragment_shader"))
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.h b/src/mesa/drivers/dri/intel/intel_extensions.h
index 1d1c97a4a9b..e78e07356e7 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.h
+++ b/src/mesa/drivers/dri/intel/intel_extensions.h
@@ -32,5 +32,8 @@
extern void
intelInitExtensions(GLcontext *ctx);
+extern void
+intelFlushDrawable(__DRIdrawable *drawable);
+
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 608f75b8240..d58ffd95fa6 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -222,7 +222,6 @@ static void
intel_resize_buffers(GLcontext *ctx, struct gl_framebuffer *fb,
GLuint width, GLuint height)
{
- struct intel_framebuffer *intel_fb = (struct intel_framebuffer*)fb;
int i;
_mesa_resize_framebuffer(ctx, fb, width, height);
@@ -233,9 +232,10 @@ intel_resize_buffers(GLcontext *ctx, struct gl_framebuffer *fb,
return;
}
+
/* Make sure all window system renderbuffers are up to date */
- for (i = 0; i < 2; i++) {
- struct gl_renderbuffer *rb = &intel_fb->color_rb[i]->Base;
+ for (i = BUFFER_FRONT_LEFT; i <= BUFFER_BACK_RIGHT; i++) {
+ struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer;
/* only resize if size is changing */
if (rb && (rb->Width != width || rb->Height != height)) {
@@ -398,8 +398,6 @@ static GLboolean
intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb,
struct gl_texture_image *texImage)
{
- gl_format texFormat;
-
if (texImage->TexFormat == MESA_FORMAT_ARGB8888) {
irb->Base.DataType = GL_UNSIGNED_BYTE;
DBG("Render to RGBA8 texture OK\n");
@@ -429,14 +427,13 @@ intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb,
DBG("Render to DEPTH_STENCIL texture OK\n");
}
else {
- DBG("Render to texture BAD FORMAT %d\n", texImage->TexFormat);
+ DBG("Render to texture BAD FORMAT %s\n",
+ _mesa_get_format_name(texImage->TexFormat));
return GL_FALSE;
}
irb->Base.Format = texImage->TexFormat;
- texFormat = texImage->TexFormat;
-
irb->Base.InternalFormat = texImage->InternalFormat;
irb->Base._BaseFormat = _mesa_base_fbo_format(ctx, irb->Base.InternalFormat);
irb->Base.Width = texImage->Width;
@@ -594,11 +591,21 @@ intel_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
intel_get_renderbuffer(fb, BUFFER_STENCIL);
int i;
- if (stencilRb && stencilRb != depthRb) {
- /* we only support combined depth/stencil buffers, not separate
- * stencil buffers.
- */
- fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
+ if (depthRb && stencilRb && stencilRb != depthRb) {
+ if (ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Type == GL_TEXTURE &&
+ ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Type == GL_TEXTURE &&
+ (ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Texture->Name ==
+ ctx->DrawBuffer->Attachment[BUFFER_STENCIL].Texture->Name)) {
+ /* OK */
+ } else {
+ /* we only support combined depth/stencil buffers, not separate
+ * stencil buffers.
+ */
+ DBG("Only supports combined depth/stencil (found %s, %s)\n",
+ depthRb ? _mesa_get_format_name(depthRb->Base.Format): "NULL",
+ stencilRb ? _mesa_get_format_name(stencilRb->Base.Format): "NULL");
+ fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
+ }
}
for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
@@ -609,6 +616,7 @@ intel_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
continue;
if (irb == NULL) {
+ DBG("software rendering renderbuffer\n");
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
continue;
}
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h
index fa43077d6a7..586dbbbb25a 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.h
+++ b/src/mesa/drivers/dri/intel/intel_fbo.h
@@ -34,27 +34,6 @@
struct intel_context;
/**
- * Intel framebuffer, derived from gl_framebuffer.
- */
-struct intel_framebuffer
-{
- struct gl_framebuffer Base;
-
- struct intel_renderbuffer *color_rb[2];
-
- /* VBI
- */
- GLuint vbl_waited;
-
- int64_t swap_ust;
- int64_t swap_missed_ust;
-
- GLuint swap_count;
- GLuint swap_missed_count;
-};
-
-
-/**
* Intel renderbuffer, derived from gl_renderbuffer.
*/
struct intel_renderbuffer
@@ -62,8 +41,6 @@ struct intel_renderbuffer
struct gl_renderbuffer Base;
struct intel_region *region;
- GLuint vbl_pending; /**< vblank sequence number of pending flip */
-
uint8_t *span_cache;
unsigned long span_cache_offset;
};
@@ -121,7 +98,7 @@ intel_fbo_init(struct intel_context *intel);
extern void
-intel_flip_renderbuffers(struct intel_framebuffer *intel_fb);
+intel_flip_renderbuffers(struct gl_framebuffer *fb);
static INLINE struct intel_region *
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index abb3024bfbb..82e4150c6a9 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -87,7 +87,7 @@ intel_miptree_create_internal(struct intel_context *intel,
mt->pitch = 0;
#ifdef I915
- if (IS_945(intel->intelScreen->deviceID))
+ if (intel->is_945)
ok = i945_miptree_layout(intel, mt, tiling);
else
ok = i915_miptree_layout(intel, mt, tiling);
@@ -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;
diff --git a/src/mesa/drivers/dri/intel/intel_pixel.c b/src/mesa/drivers/dri/intel/intel_pixel.c
index f4e7d4b56ea..cb088e40329 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel.c
@@ -81,10 +81,10 @@ intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one)
return GL_FALSE;
}
- if (!(ctx->Color.ColorMask[0] &&
- ctx->Color.ColorMask[1] &&
- ctx->Color.ColorMask[2] &&
- ctx->Color.ColorMask[3])) {
+ if (!(ctx->Color.ColorMask[0][0] &&
+ ctx->Color.ColorMask[0][1] &&
+ ctx->Color.ColorMask[0][2] &&
+ ctx->Color.ColorMask[0][3])) {
DBG("fallback due to color masking\n");
return GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
index 6bb497baa04..b27766ee6fd 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -226,16 +226,13 @@ 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;
- LOCK_HARDWARE(intel);
-
intel_get_cliprects(intel, &cliprects, &num_cliprects, &x_off, &y_off);
if (num_cliprects != 0) {
GLuint i;
@@ -323,7 +320,6 @@ do_blit_bitmap( GLcontext *ctx,
}
}
out:
- UNLOCK_HARDWARE(intel);
if (INTEL_DEBUG & DEBUG_SYNC)
intel_batchbuffer_flush(intel->batch);
@@ -502,6 +498,7 @@ intel_texture_bitmap(GLcontext * ctx,
meta_restore_fragment_program(&intel->meta);
meta_restore_vertex_program(&intel->meta);
+ _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + old_active_texture);
_mesa_PopClientAttrib();
_mesa_PopAttrib();
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_copy.c b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
index 622aaa22d67..e002516cdd0 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_copy.c
@@ -35,28 +35,33 @@
#include "intel_buffers.h"
#include "intel_regions.h"
#include "intel_pixel.h"
+#include "intel_fbo.h"
#define FILE_DEBUG_FLAG DEBUG_PIXEL
static struct intel_region *
copypix_src_region(struct intel_context *intel, GLenum type)
{
+ struct intel_renderbuffer *depth;
+
+ depth = (struct intel_renderbuffer *)
+ &intel->ctx.DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer;
+
switch (type) {
case GL_COLOR:
return intel_readbuf_region(intel);
case GL_DEPTH:
- /* Don't think this is really possible execpt at 16bpp, when we have no stencil.
- */
- if (intel->depth_region && intel->depth_region->cpp == 2)
- return intel->depth_region;
+ /* Don't think this is really possible execpt at 16bpp, when we
+ * have no stencil. */
+ if (depth && depth->region->cpp == 2)
+ return depth->region;
case GL_STENCIL:
- /* Don't think this is really possible.
- */
+ /* Don't think this is really possible. */
break;
case GL_DEPTH_STENCIL_EXT:
/* Does it matter whether it is stencil/depth or depth/stencil?
*/
- return intel->depth_region;
+ return depth->region;
default:
break;
}
@@ -83,10 +88,10 @@ intel_check_copypixel_blit_fragment_ops(GLcontext * ctx)
ctx->Depth.Test ||
ctx->Fog.Enabled ||
ctx->Stencil._Enabled ||
- !ctx->Color.ColorMask[0] ||
- !ctx->Color.ColorMask[1] ||
- !ctx->Color.ColorMask[2] ||
- !ctx->Color.ColorMask[3] ||
+ !ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3] ||
ctx->Texture._EnabledUnits ||
ctx->FragmentProgram._Enabled ||
ctx->Color.BlendEnabled);
@@ -134,8 +139,6 @@ do_blit_copypixels(GLcontext * ctx,
intelFlush(&intel->ctx);
- LOCK_HARDWARE(intel);
-
intel_get_cliprects(intel, &cliprects, &num_cliprects, &x_off, &y_off);
if (num_cliprects != 0) {
GLint delta_x;
@@ -214,13 +217,11 @@ do_blit_copypixels(GLcontext * ctx,
ctx->Color.ColorLogicOpEnabled ?
ctx->Color.LogicOp : GL_COPY)) {
DBG("%s: blit failure\n", __FUNCTION__);
- UNLOCK_HARDWARE(intel);
return GL_FALSE;
}
}
}
out:
- UNLOCK_HARDWARE(intel);
intel_check_front_buffer_rendering(intel);
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
index 3a35634db0d..7e82c5b8aa2 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
@@ -66,7 +66,6 @@ intel_stencil_drawpixels(GLcontext * ctx,
GLfloat vertices[4][2];
struct intel_renderbuffer *irb;
struct intel_renderbuffer *depth_irb;
- struct gl_renderbuffer *rb;
struct gl_pixelstore_attrib old_unpack;
GLstencil *stencil_pixels;
int row, y1, y2;
@@ -167,7 +166,6 @@ intel_stencil_drawpixels(GLcontext * ctx,
*/
depth_irb = intel_get_renderbuffer(ctx->DrawBuffer, BUFFER_DEPTH);
irb = intel_create_renderbuffer(MESA_FORMAT_ARGB8888);
- rb = &irb->Base;
irb->Base.Width = depth_irb->Base.Width;
irb->Base.Height = depth_irb->Base.Height;
intel_renderbuffer_set_region(irb, depth_irb->region);
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c
index 01a057051e1..7611ba86506 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c
@@ -76,7 +76,7 @@ do_texture_readpixels(GLcontext * ctx,
struct intel_context *intel = intel_context(ctx);
intelScreenPrivate *screen = intel->intelScreen;
GLint pitch = pack->RowLength ? pack->RowLength : width;
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
+ __DRIdrawable *dPriv = intel->driDrawable;
int textureFormat;
GLenum glTextureFormat;
int destFormat, depthFormat, destPitch;
@@ -104,15 +104,12 @@ do_texture_readpixels(GLcontext * ctx,
return GL_FALSE;
}
- LOCK_HARDWARE(intel);
-
if (intel->driDrawable->numClipRects) {
intel->vtbl.install_meta_state(intel);
intel->vtbl.meta_no_depth_write(intel);
intel->vtbl.meta_no_stencil_write(intel);
if (!driClipRectToFramebuffer(ctx->ReadBuffer, &x, &y, &width, &height)) {
- UNLOCK_HARDWARE(intel);
SET_STATE(i830, state);
if (INTEL_DEBUG & DEBUG_PIXEL)
fprintf(stderr, "%s: cliprect failed\n", __FUNCTION__);
@@ -149,7 +146,6 @@ do_texture_readpixels(GLcontext * ctx,
intel->vtbl.leave_meta_state(intel);
}
- UNLOCK_HARDWARE(intel);
intel_region_wait_fence(ctx, dest_region); /* required by GL */
return GL_TRUE;
@@ -223,7 +219,6 @@ do_blit_readpixels(GLcontext * ctx,
* fire with lock held to guarentee cliprects are correct.
*/
intelFlush(&intel->ctx);
- LOCK_HARDWARE(intel);
if (intel->driReadDrawable->numClipRects) {
GLboolean all = (width * height * src->cpp == dst->Base.Size &&
@@ -232,7 +227,7 @@ do_blit_readpixels(GLcontext * ctx,
dri_bo *dst_buffer = intel_bufferobj_buffer(intel, dst,
all ? INTEL_WRITE_FULL :
INTEL_WRITE_PART);
- __DRIdrawablePrivate *dPriv = intel->driReadDrawable;
+ __DRIdrawable *dPriv = intel->driReadDrawable;
int nbox = dPriv->numClipRects;
drm_clip_rect_t *box = dPriv->pClipRects;
drm_clip_rect_t rect;
@@ -260,12 +255,10 @@ do_blit_readpixels(GLcontext * ctx,
rect.y2 - src_rect.y2,
rect.x2 - rect.x1, rect.y2 - rect.y1,
GL_COPY)) {
- UNLOCK_HARDWARE(intel);
return GL_FALSE;
}
}
}
- UNLOCK_HARDWARE(intel);
if (INTEL_DEBUG & DEBUG_PIXEL)
_mesa_printf("%s - DONE\n", __FUNCTION__);
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index d13516ae8ee..f415589c5da 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -361,14 +361,12 @@ intel_region_data(struct intel_context *intel,
intel_region_cow(intel, dst);
}
- LOCK_HARDWARE(intel);
_mesa_copy_rect(intel_region_map(intel, dst) + dst_offset,
dst->cpp,
dst->pitch,
dstx, dsty, width, height, src, src_pitch, srcx, srcy);
intel_region_unmap(intel, dst);
- UNLOCK_HARDWARE(intel);
}
/* Copy rectangular sub-regions. Need better logic about when to
@@ -484,7 +482,6 @@ intel_region_cow(struct intel_context *intel, struct intel_region *region)
/* Now blit from the texture buffer to the new buffer:
*/
- LOCK_HARDWARE(intel);
ok = intelEmitCopyBlit(intel,
region->cpp,
region->pitch, pbo->buffer, 0, region->tiling,
@@ -493,7 +490,6 @@ intel_region_cow(struct intel_context *intel, struct intel_region *region)
region->pitch, region->height,
GL_COPY);
assert(ok);
- UNLOCK_HARDWARE(intel);
}
dri_bo *
@@ -509,125 +505,3 @@ intel_region_buffer(struct intel_context *intel,
return region->buffer;
}
-
-static struct intel_region *
-intel_recreate_static(struct intel_context *intel,
- const char *name,
- struct intel_region *region,
- intelRegion *region_desc)
-{
- intelScreenPrivate *intelScreen = intel->intelScreen;
- int ret;
-
- if (region == NULL) {
- region = calloc(sizeof(*region), 1);
- region->refcount = 1;
- _DBG("%s creating new region %p\n", __FUNCTION__, region);
- }
- else {
- _DBG("%s %p\n", __FUNCTION__, region);
- }
-
- if (intel->ctx.Visual.rgbBits == 24)
- region->cpp = 4;
- else
- region->cpp = intel->ctx.Visual.rgbBits / 8;
- region->pitch = intelScreen->pitch;
- region->width = intelScreen->width;
- region->height = intelScreen->height;
-
- if (region->buffer != NULL) {
- dri_bo_unreference(region->buffer);
- 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,
- 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 (intel->gen >= 4 && region_desc == &intelScreen->depth)
- region->tiling = I915_TILING_Y;
- else
- region->tiling = I915_TILING_X;
- } else {
- region->tiling = I915_TILING_NONE;
- }
-
- region->bit_6_swizzle = I915_BIT_6_SWIZZLE_NONE;
- }
-
- assert(region->buffer != NULL);
-
- return region;
-}
-
-/**
- * Create intel_region structs to describe the static front, back, and depth
- * buffers created by the xserver.
- *
- * Although FBO's mean we now no longer use these as render targets in
- * all circumstances, they won't go away until the back and depth
- * buffers become private, and the front buffer will remain even then.
- *
- * Note that these don't allocate video memory, just describe
- * allocations alread made by the X server.
- */
-void
-intel_recreate_static_regions(struct intel_context *intel)
-{
- intelScreenPrivate *intelScreen = intel->intelScreen;
-
- intel->front_region =
- intel_recreate_static(intel, "front",
- intel->front_region,
- &intelScreen->front);
-
- intel->back_region =
- intel_recreate_static(intel, "back",
- intel->back_region,
- &intelScreen->back);
-
- /* Still assumes front.cpp == depth.cpp. We can kill this when we move to
- * private buffers.
- */
- intel->depth_region =
- intel_recreate_static(intel, "depth",
- intel->depth_region,
- &intelScreen->depth);
-}
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index f3de7d14649..96e7f2885a3 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -31,7 +31,6 @@
#include "main/renderbuffer.h"
#include "utils.h"
-#include "vblank.h"
#include "xmlpool.h"
#include "intel_batchbuffer.h"
@@ -39,7 +38,7 @@
#include "intel_bufmgr.h"
#include "intel_chipset.h"
#include "intel_fbo.h"
-#include "intel_swapbuffers.h"
+#include "intel_regions.h"
#include "intel_screen.h"
#include "intel_tex.h"
@@ -54,7 +53,6 @@
PUBLIC const char __driConfigOptions[] =
DRI_CONF_BEGIN
DRI_CONF_SECTION_PERFORMANCE
- DRI_CONF_FTHROTTLE_MODE(DRI_CONF_FTHROTTLE_IRQS)
DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_ALWAYS_SYNC)
/* Options correspond to DRI_CONF_BO_REUSE_DISABLED,
* DRI_CONF_BO_REUSE_ALL
@@ -96,157 +94,64 @@ PUBLIC const char __driConfigOptions[] =
DRI_CONF_SECTION_END
DRI_CONF_END;
-const GLuint __driNConfigOptions = 12;
+const GLuint __driNConfigOptions = 11;
#ifdef USE_NEW_INTERFACE
static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
#endif /*USE_NEW_INTERFACE */
-/**
- * Map all the memory regions described by the screen.
- * \return GL_TRUE if success, GL_FALSE if error.
- */
-GLboolean
-intelMapScreenRegions(__DRIscreenPrivate * sPriv)
-{
- intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private;
-
- if (0)
- _mesa_printf("TEX 0x%08x ", intelScreen->tex.handle);
- if (intelScreen->tex.size != 0) {
- if (drmMap(sPriv->fd,
- intelScreen->tex.handle,
- intelScreen->tex.size,
- (drmAddress *) & intelScreen->tex.map) != 0) {
- intelUnmapScreenRegions(intelScreen);
- return GL_FALSE;
- }
- }
-
- return GL_TRUE;
-}
-
-void
-intelUnmapScreenRegions(intelScreenPrivate * intelScreen)
-{
- if (intelScreen->tex.map) {
- drmUnmap(intelScreen->tex.map, intelScreen->tex.size);
- intelScreen->tex.map = NULL;
- }
-}
+static const __DRItexOffsetExtension intelTexOffsetExtension = {
+ { __DRI_TEX_OFFSET },
+ intelSetTexOffset,
+};
+static const __DRItexBufferExtension intelTexBufferExtension = {
+ { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
+ intelSetTexBuffer,
+ intelSetTexBuffer2,
+};
static void
-intelPrintDRIInfo(intelScreenPrivate * intelScreen,
- __DRIscreenPrivate * sPriv, I830DRIPtr gDRIPriv)
+intelDRI2Flush(__DRIdrawable *drawable)
{
- fprintf(stderr, "*** Front size: 0x%x offset: 0x%x pitch: %d\n",
- intelScreen->front.size, intelScreen->front.offset,
- intelScreen->pitch);
- fprintf(stderr, "*** Back size: 0x%x offset: 0x%x pitch: %d\n",
- intelScreen->back.size, intelScreen->back.offset,
- intelScreen->pitch);
- fprintf(stderr, "*** Depth size: 0x%x offset: 0x%x pitch: %d\n",
- intelScreen->depth.size, intelScreen->depth.offset,
- intelScreen->pitch);
- fprintf(stderr, "*** Texture size: 0x%x offset: 0x%x\n",
- intelScreen->tex.size, intelScreen->tex.offset);
- fprintf(stderr, "*** Memory : 0x%x\n", gDRIPriv->mem);
-}
+ struct intel_context *intel = drawable->driContextPriv->driverPrivate;
+ if (intel->gen < 4)
+ INTEL_FIREVERTICES(intel);
-static void
-intelPrintSAREA(const drm_i915_sarea_t * sarea)
-{
- fprintf(stderr, "SAREA: sarea width %d height %d\n", sarea->width,
- sarea->height);
- fprintf(stderr, "SAREA: pitch: %d\n", sarea->pitch);
- fprintf(stderr,
- "SAREA: front offset: 0x%08x size: 0x%x handle: 0x%x tiled: %d\n",
- sarea->front_offset, sarea->front_size,
- (unsigned) sarea->front_handle, sarea->front_tiled);
- fprintf(stderr,
- "SAREA: back offset: 0x%08x size: 0x%x handle: 0x%x tiled: %d\n",
- sarea->back_offset, sarea->back_size,
- (unsigned) sarea->back_handle, sarea->back_tiled);
- fprintf(stderr, "SAREA: depth offset: 0x%08x size: 0x%x handle: 0x%x tiled: %d\n",
- sarea->depth_offset, sarea->depth_size,
- (unsigned) sarea->depth_handle, sarea->depth_tiled);
- fprintf(stderr, "SAREA: tex offset: 0x%08x size: 0x%x handle: 0x%x\n",
- sarea->tex_offset, sarea->tex_size, (unsigned) sarea->tex_handle);
+ if (intel->batch->map != intel->batch->ptr)
+ intel_batchbuffer_flush(intel->batch);
}
-
-/**
- * A number of the screen parameters are obtained/computed from
- * information in the SAREA. This function updates those parameters.
- */
static void
-intelUpdateScreenFromSAREA(intelScreenPrivate * intelScreen,
- drm_i915_sarea_t * sarea)
+intelDRI2FlushInvalidate(__DRIdrawable *drawable)
{
- intelScreen->width = sarea->width;
- intelScreen->height = sarea->height;
- intelScreen->pitch = sarea->pitch;
-
- intelScreen->front.offset = sarea->front_offset;
- intelScreen->front.handle = sarea->front_handle;
- intelScreen->front.size = sarea->front_size;
- intelScreen->front.tiled = sarea->front_tiled;
-
- intelScreen->back.offset = sarea->back_offset;
- intelScreen->back.handle = sarea->back_handle;
- intelScreen->back.size = sarea->back_size;
- intelScreen->back.tiled = sarea->back_tiled;
-
- intelScreen->depth.offset = sarea->depth_offset;
- intelScreen->depth.handle = sarea->depth_handle;
- intelScreen->depth.size = sarea->depth_size;
- intelScreen->depth.tiled = sarea->depth_tiled;
-
- if (intelScreen->driScrnPriv->ddx_version.minor >= 9) {
- intelScreen->front.bo_handle = sarea->front_bo_handle;
- intelScreen->back.bo_handle = sarea->back_bo_handle;
- intelScreen->depth.bo_handle = sarea->depth_bo_handle;
- } else {
- intelScreen->front.bo_handle = -1;
- intelScreen->back.bo_handle = -1;
- intelScreen->depth.bo_handle = -1;
- }
+ struct intel_context *intel = drawable->driContextPriv->driverPrivate;
- intelScreen->tex.offset = sarea->tex_offset;
- intelScreen->logTextureGranularity = sarea->log_tex_granularity;
- intelScreen->tex.handle = sarea->tex_handle;
- intelScreen->tex.size = sarea->tex_size;
+ intel->using_dri2_swapbuffers = GL_TRUE;
- if (0)
- intelPrintSAREA(sarea);
-}
+ intelDRI2Flush(drawable);
+ drawable->validBuffers = GL_FALSE;
-static const __DRItexOffsetExtension intelTexOffsetExtension = {
- { __DRI_TEX_OFFSET },
- intelSetTexOffset,
-};
+ intel_update_renderbuffers(intel->driContext, drawable);
+}
-static const __DRItexBufferExtension intelTexBufferExtension = {
- { __DRI_TEX_BUFFER, __DRI_TEX_BUFFER_VERSION },
- intelSetTexBuffer,
- intelSetTexBuffer2,
+static const struct __DRI2flushExtensionRec intelFlushExtension = {
+ { __DRI2_FLUSH, __DRI2_FLUSH_VERSION },
+ intelDRI2Flush,
+ intelDRI2FlushInvalidate,
};
static const __DRIextension *intelScreenExtensions[] = {
&driReadDrawableExtension,
- &driCopySubBufferExtension.base,
- &driSwapControlExtension.base,
- &driFrameTrackingExtension.base,
- &driMediaStreamCounterExtension.base,
&intelTexOffsetExtension.base,
&intelTexBufferExtension.base,
+ &intelFlushExtension.base,
NULL
};
static GLboolean
-intel_get_param(__DRIscreenPrivate *psp, int param, int *value)
+intel_get_param(__DRIscreen *psp, int param, int *value)
{
int ret;
struct drm_i915_getparam gp;
@@ -263,68 +168,12 @@ intel_get_param(__DRIscreenPrivate *psp, int param, int *value)
return GL_TRUE;
}
-static GLboolean intelInitDriver(__DRIscreenPrivate *sPriv)
-{
- intelScreenPrivate *intelScreen;
- I830DRIPtr gDRIPriv = (I830DRIPtr) sPriv->pDevPriv;
- drm_i915_sarea_t *sarea;
-
- if (sPriv->devPrivSize != sizeof(I830DRIRec)) {
- fprintf(stderr,
- "\nERROR! sizeof(I830DRIRec) does not match passed size from device driver\n");
- return GL_FALSE;
- }
-
- /* Allocate the private area */
- intelScreen = (intelScreenPrivate *) CALLOC(sizeof(intelScreenPrivate));
- if (!intelScreen) {
- fprintf(stderr, "\nERROR! Allocating private area failed\n");
- return GL_FALSE;
- }
- /* parse information in __driConfigOptions */
- driParseOptionInfo(&intelScreen->optionCache,
- __driConfigOptions, __driNConfigOptions);
-
- intelScreen->driScrnPriv = sPriv;
- sPriv->private = (void *) intelScreen;
- sarea = (drm_i915_sarea_t *)
- (((GLubyte *) sPriv->pSAREA) + gDRIPriv->sarea_priv_offset);
- intelScreen->sarea = sarea;
-
- intelScreen->deviceID = gDRIPriv->deviceID;
-
- intelUpdateScreenFromSAREA(intelScreen, sarea);
-
- if (!intelMapScreenRegions(sPriv)) {
- fprintf(stderr, "\nERROR! mapping regions\n");
- _mesa_free(intelScreen);
- sPriv->private = NULL;
- return GL_FALSE;
- }
-
- if (0)
- intelPrintDRIInfo(intelScreen, sPriv, gDRIPriv);
-
- intelScreen->drmMinor = sPriv->drm_version.minor;
-
- /* Determine if IRQs are active? */
- if (!intel_get_param(sPriv, I915_PARAM_IRQ_ACTIVE,
- &intelScreen->irq_active))
- return GL_FALSE;
-
- sPriv->extensions = intelScreenExtensions;
-
- return GL_TRUE;
-}
-
-
static void
-intelDestroyScreen(__DRIscreenPrivate * sPriv)
+intelDestroyScreen(__DRIscreen * sPriv)
{
intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private;
dri_bufmgr_destroy(intelScreen->bufmgr);
- intelUnmapScreenRegions(intelScreen);
driDestroyOptionInfo(&intelScreen->optionCache);
FREE(intelScreen);
@@ -336,10 +185,12 @@ intelDestroyScreen(__DRIscreenPrivate * sPriv)
* This is called when we need to set up GL rendering to a new X window.
*/
static GLboolean
-intelCreateBuffer(__DRIscreenPrivate * driScrnPriv,
- __DRIdrawablePrivate * driDrawPriv,
+intelCreateBuffer(__DRIscreen * driScrnPriv,
+ __DRIdrawable * driDrawPriv,
const __GLcontextModes * mesaVis, GLboolean isPixmap)
{
+ struct intel_renderbuffer *rb;
+
if (isPixmap) {
return GL_FALSE; /* not implemented */
}
@@ -348,12 +199,12 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv,
mesaVis->depthBits != 24);
gl_format rgbFormat;
- struct intel_framebuffer *intel_fb = CALLOC_STRUCT(intel_framebuffer);
+ struct gl_framebuffer *fb = CALLOC_STRUCT(gl_framebuffer);
- if (!intel_fb)
+ if (!fb)
return GL_FALSE;
- _mesa_initialize_framebuffer(&intel_fb->Base, mesaVis);
+ _mesa_initialize_framebuffer(fb, mesaVis);
if (mesaVis->redBits == 5)
rgbFormat = MESA_FORMAT_RGB565;
@@ -363,16 +214,12 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv,
rgbFormat = MESA_FORMAT_ARGB8888;
/* setup the hardware-based renderbuffers */
- intel_fb->color_rb[0] = intel_create_renderbuffer(rgbFormat);
- _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_FRONT_LEFT,
- &intel_fb->color_rb[0]->Base);
+ rb = intel_create_renderbuffer(rgbFormat);
+ _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &rb->Base);
if (mesaVis->doubleBufferMode) {
- intel_fb->color_rb[1] = intel_create_renderbuffer(rgbFormat);
-
- _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_BACK_LEFT,
- &intel_fb->color_rb[1]->Base);
-
+ rb = intel_create_renderbuffer(rgbFormat);
+ _mesa_add_renderbuffer(fb, BUFFER_BACK_LEFT, &rb->Base);
}
if (mesaVis->depthBits == 24) {
@@ -381,115 +228,63 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv,
struct intel_renderbuffer *depthStencilRb
= intel_create_renderbuffer(MESA_FORMAT_S8_Z24);
/* note: bind RB to two attachment points */
- _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_DEPTH,
- &depthStencilRb->Base);
- _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_STENCIL,
- &depthStencilRb->Base);
+ _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthStencilRb->Base);
+ _mesa_add_renderbuffer(fb, BUFFER_STENCIL, &depthStencilRb->Base);
} else {
struct intel_renderbuffer *depthRb
= intel_create_renderbuffer(MESA_FORMAT_X8_Z24);
- _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_DEPTH,
- &depthRb->Base);
+ _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base);
}
}
else if (mesaVis->depthBits == 16) {
/* just 16-bit depth buffer, no hw stencil */
struct intel_renderbuffer *depthRb
= intel_create_renderbuffer(MESA_FORMAT_Z16);
- _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_DEPTH, &depthRb->Base);
+ _mesa_add_renderbuffer(fb, BUFFER_DEPTH, &depthRb->Base);
}
/* now add any/all software-based renderbuffers we may need */
- _mesa_add_soft_renderbuffers(&intel_fb->Base,
+ _mesa_add_soft_renderbuffers(fb,
GL_FALSE, /* never sw color */
GL_FALSE, /* never sw depth */
swStencil, mesaVis->accumRedBits > 0,
GL_FALSE, /* never sw alpha */
GL_FALSE /* never sw aux */ );
- driDrawPriv->driverPrivate = (void *) intel_fb;
+ driDrawPriv->driverPrivate = fb;
return GL_TRUE;
}
}
static void
-intelDestroyBuffer(__DRIdrawablePrivate * driDrawPriv)
+intelDestroyBuffer(__DRIdrawable * driDrawPriv)
{
- struct intel_framebuffer *intel_fb = driDrawPriv->driverPrivate;
- struct intel_renderbuffer *depth_rb;
- struct intel_renderbuffer *stencil_rb;
-
- if (intel_fb) {
- if (intel_fb->color_rb[0]) {
- intel_renderbuffer_set_region(intel_fb->color_rb[0], NULL);
- }
-
- if (intel_fb->color_rb[1]) {
- intel_renderbuffer_set_region(intel_fb->color_rb[1], NULL);
- }
-
- depth_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_DEPTH);
- if (depth_rb) {
- intel_renderbuffer_set_region(depth_rb, NULL);
- }
-
- stencil_rb = intel_get_renderbuffer(&intel_fb->Base, BUFFER_STENCIL);
- if (stencil_rb) {
- intel_renderbuffer_set_region(stencil_rb, NULL);
- }
- }
-
- _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
+ struct gl_framebuffer *fb = driDrawPriv->driverPrivate;
+
+ _mesa_reference_framebuffer(&fb, NULL);
}
-
-/**
- * Get information about previous buffer swaps.
- */
-static int
-intelGetSwapInfo(__DRIdrawablePrivate * dPriv, __DRIswapInfo * sInfo)
-{
- struct intel_framebuffer *intel_fb;
-
- if ((dPriv == NULL) || (dPriv->driverPrivate == NULL)
- || (sInfo == NULL)) {
- return -1;
- }
-
- intel_fb = dPriv->driverPrivate;
- sInfo->swap_count = intel_fb->swap_count;
- sInfo->swap_ust = intel_fb->swap_ust;
- sInfo->swap_missed_count = intel_fb->swap_missed_count;
-
- sInfo->swap_missed_usage = (sInfo->swap_missed_count != 0)
- ? driCalculateSwapUsage(dPriv, 0, intel_fb->swap_missed_ust)
- : 0.0;
-
- return 0;
-}
-
-
/* There are probably better ways to do this, such as an
* init-designated function to register chipids and createcontext
* functions.
*/
extern GLboolean i830CreateContext(const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate);
extern GLboolean i915CreateContext(const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate);
extern GLboolean brwCreateContext(const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate);
static GLboolean
intelCreateContext(const __GLcontextModes * mesaVis,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
intelScreenPrivate *intelScreen = (intelScreenPrivate *) sPriv->private;
#ifdef I915
@@ -510,152 +305,20 @@ intelCreateContext(const __GLcontextModes * mesaVis,
return GL_FALSE;
}
-
-static __DRIconfig **
-intelFillInModes(__DRIscreenPrivate *psp,
- unsigned pixel_bits, unsigned depth_bits,
- unsigned stencil_bits, GLboolean have_back_buffer)
-{
- __DRIconfig **configs;
- __GLcontextModes *m;
- unsigned depth_buffer_factor;
- unsigned back_buffer_factor;
- int i;
-
- /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
- * support pageflipping at all.
- */
- static const GLenum back_buffer_modes[] = {
- GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML
- };
-
- uint8_t depth_bits_array[3];
- uint8_t stencil_bits_array[3];
- uint8_t msaa_samples_array[1];
-
- depth_bits_array[0] = 0;
- depth_bits_array[1] = depth_bits;
- depth_bits_array[2] = depth_bits;
-
- /* Just like with the accumulation buffer, always provide some modes
- * with a stencil buffer. It will be a sw fallback, but some apps won't
- * care about that.
- */
- stencil_bits_array[0] = 0;
- stencil_bits_array[1] = 0;
- if (depth_bits == 24)
- stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
-
- stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits;
-
- msaa_samples_array[0] = 0;
-
- depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1;
- back_buffer_factor = (have_back_buffer) ? 3 : 1;
-
- if (pixel_bits == 16) {
- configs = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
- depth_bits_array, stencil_bits_array,
- depth_buffer_factor, back_buffer_modes,
- back_buffer_factor,
- msaa_samples_array, 1);
- }
- else {
- __DRIconfig **configs_a8r8g8b8;
- __DRIconfig **configs_x8r8g8b8;
-
- configs_a8r8g8b8 = driCreateConfigs(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
- depth_bits_array,
- stencil_bits_array,
- depth_buffer_factor,
- back_buffer_modes,
- back_buffer_factor,
- msaa_samples_array, 1);
- configs_x8r8g8b8 = driCreateConfigs(GL_BGR, GL_UNSIGNED_INT_8_8_8_8_REV,
- depth_bits_array,
- stencil_bits_array,
- depth_buffer_factor,
- back_buffer_modes,
- back_buffer_factor,
- msaa_samples_array, 1);
- configs = driConcatConfigs(configs_a8r8g8b8, configs_x8r8g8b8);
- }
-
- if (configs == NULL) {
- fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
- __LINE__);
- return NULL;
- }
-
- /* Mark the visual as slow if there are "fake" stencil bits.
- */
- for (i = 0; configs[i]; i++) {
- m = &configs[i]->modes;
- if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) {
- m->visualRating = GLX_SLOW_CONFIG;
- }
- }
-
- return configs;
-}
-
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;
- __DRIscreenPrivate *spriv = intelScreen->driScrnPriv;
+ __DRIscreen *spriv = intelScreen->driScrnPriv;
int num_fences = 0;
intelScreen->no_hw = getenv("INTEL_NO_HW") != NULL;
- gp.param = I915_PARAM_HAS_GEM;
- gp.value = &gem_kernel;
-
- (void) drmCommandWriteRead(spriv->fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
-
- /* 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;
- }
+ 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))
@@ -668,78 +331,20 @@ intel_init_bufmgr(intelScreenPrivate *intelScreen)
/**
* This is the driver specific part of the createNewScreen entry point.
- * Called when using legacy DRI.
- *
- * \todo maybe fold this into intelInitDriver
- *
- * \return the __GLcontextModes supported by this driver
- */
-static const __DRIconfig **intelInitScreen(__DRIscreenPrivate *psp)
-{
- intelScreenPrivate *intelScreen;
-#ifdef I915
- static const __DRIversion ddx_expected = { 1, 5, 0 };
-#else
- static const __DRIversion ddx_expected = { 1, 6, 0 };
-#endif
- static const __DRIversion dri_expected = { 4, 0, 0 };
- static const __DRIversion drm_expected = { 1, 5, 0 };
- I830DRIPtr dri_priv = (I830DRIPtr) psp->pDevPriv;
-
- if (!driCheckDriDdxDrmVersions2("i915",
- &psp->dri_version, &dri_expected,
- &psp->ddx_version, &ddx_expected,
- &psp->drm_version, &drm_expected)) {
- return NULL;
- }
-
- if (!intelInitDriver(psp))
- return NULL;
-
- psp->extensions = intelScreenExtensions;
-
- intelScreen = psp->private;
- if (!intel_init_bufmgr(intelScreen))
- return GL_FALSE;
-
- return (const __DRIconfig **)
- intelFillInModes(psp, dri_priv->cpp * 8,
- (dri_priv->cpp == 2) ? 16 : 24,
- (dri_priv->cpp == 2) ? 0 : 8, 1);
-}
-
-struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen)
-{
- /*
- * This should probably change to have the screen allocate a dummy
- * context at screen creation. For now just use the current context.
- */
-
- GET_CURRENT_CONTEXT(ctx);
- if (ctx == NULL) {
- _mesa_problem(NULL, "No current context in intelScreenContext\n");
- return NULL;
- }
- return intel_context(ctx);
-}
-
-/**
- * This is the driver specific part of the createNewScreen entry point.
* Called when using DRI2.
*
* \return the __GLcontextModes supported by this driver
*/
static const
-__DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp)
+__DRIconfig **intelInitScreen2(__DRIscreen *psp)
{
intelScreenPrivate *intelScreen;
GLenum fb_format[3];
GLenum fb_type[3];
- /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
- * support pageflipping at all.
- */
+
static const GLenum back_buffer_modes[] = {
- GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML
+ GLX_NONE, GLX_SWAP_UNDEFINED_OML,
+ GLX_SWAP_EXCHANGE_OML, GLX_SWAP_COPY_OML
};
uint8_t depth_bits[4], stencil_bits[4], msaa_samples_array[1];
int color;
@@ -839,19 +444,19 @@ __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp)
}
const struct __DriverAPIRec driDriverAPI = {
- .InitScreen = intelInitScreen,
.DestroyScreen = intelDestroyScreen,
.CreateContext = intelCreateContext,
.DestroyContext = intelDestroyContext,
.CreateBuffer = intelCreateBuffer,
.DestroyBuffer = intelDestroyBuffer,
- .SwapBuffers = intelSwapBuffers,
.MakeCurrent = intelMakeCurrent,
.UnbindContext = intelUnbindContext,
- .GetSwapInfo = intelGetSwapInfo,
- .GetDrawableMSC = driDrawableGetMSC32,
- .WaitForMSC = driWaitForMSC32,
- .CopySubBuffer = intelCopySubBuffer,
-
.InitScreen2 = intelInitScreen2,
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driDRI2Extension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h
index a9b9e109a6a..e87e306d86b 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.h
+++ b/src/mesa/drivers/dri/intel/intel_screen.h
@@ -66,7 +66,7 @@ typedef struct
int logTextureGranularity;
- __DRIscreenPrivate *driScrnPriv;
+ __DRIscreen *driScrnPriv;
volatile drm_i915_sarea_t *sarea;
@@ -77,7 +77,6 @@ typedef struct
GLboolean no_hw;
GLboolean no_vbo;
- int ttm;
dri_bufmgr *bufmgr;
GLboolean kernel_exec_fencing;
@@ -89,18 +88,18 @@ typedef struct
-extern GLboolean intelMapScreenRegions(__DRIscreenPrivate * sPriv);
+extern GLboolean intelMapScreenRegions(__DRIscreen * sPriv);
extern void intelUnmapScreenRegions(intelScreenPrivate * intelScreen);
-extern void intelDestroyContext(__DRIcontextPrivate * driContextPriv);
+extern void intelDestroyContext(__DRIcontext * driContextPriv);
-extern GLboolean intelUnbindContext(__DRIcontextPrivate * driContextPriv);
+extern GLboolean intelUnbindContext(__DRIcontext * driContextPriv);
extern GLboolean
-intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
- __DRIdrawablePrivate * driDrawPriv,
- __DRIdrawablePrivate * driReadPriv);
+intelMakeCurrent(__DRIcontext * driContextPriv,
+ __DRIdrawable * driDrawPriv,
+ __DRIdrawable * driReadPriv);
extern struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen);
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index 34c3d9df74c..605734d8e58 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -517,7 +517,6 @@ intelSpanRenderStart(GLcontext * ctx)
GLuint i;
intelFlush(&intel->ctx);
- LOCK_HARDWARE(intel);
for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
if (ctx->Texture.Unit[i]._ReallyEnabled) {
@@ -553,8 +552,6 @@ intelSpanRenderFinish(GLcontext * ctx)
intel_map_unmap_framebuffer(intel, ctx->DrawBuffer, GL_FALSE);
if (ctx->ReadBuffer != ctx->DrawBuffer)
intel_map_unmap_framebuffer(intel, ctx->ReadBuffer, GL_FALSE);
-
- UNLOCK_HARDWARE(intel);
}
@@ -613,15 +610,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->Base.Format) {
@@ -667,6 +656,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->Base.Format) {
case MESA_FORMAT_RGB565:
switch (tiling) {
diff --git a/src/mesa/drivers/dri/intel/intel_state.c b/src/mesa/drivers/dri/intel/intel_state.c
index f18e625244e..c5ef909dbf1 100644
--- a/src/mesa/drivers/dri/intel/intel_state.c
+++ b/src/mesa/drivers/dri/intel/intel_state.c
@@ -194,25 +194,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
@@ -227,5 +208,4 @@ void
intelInitStateFuncs(struct dd_function_table *functions)
{
functions->RenderMode = intelRenderMode;
- functions->ClearColor = intelClearColor;
}
diff --git a/src/mesa/drivers/dri/intel/intel_swapbuffers.c b/src/mesa/drivers/dri/intel/intel_swapbuffers.c
deleted file mode 100644
index 5af2f5f1cac..00000000000
--- a/src/mesa/drivers/dri/intel/intel_swapbuffers.c
+++ /dev/null
@@ -1,247 +0,0 @@
-/**************************************************************************
- *
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-#include "intel_blit.h"
-#include "intel_buffers.h"
-#include "intel_swapbuffers.h"
-#include "intel_fbo.h"
-#include "drirenderbuffer.h"
-#include "vblank.h"
-#include "i915_drm.h"
-
-
-
-/*
- * Correct a drawablePrivate's set of vblank flags WRT the current context.
- * When considering multiple crtcs.
- */
-GLuint
-intelFixupVblank(struct intel_context *intel, __DRIdrawablePrivate *dPriv)
-{
- if (!intel->intelScreen->driScrnPriv->dri2.enabled &&
- intel->intelScreen->driScrnPriv->ddx_version.minor >= 7) {
- volatile drm_i915_sarea_t *sarea = intel->sarea;
- drm_clip_rect_t drw_rect = { .x1 = dPriv->x, .x2 = dPriv->x + dPriv->w,
- .y1 = dPriv->y, .y2 = dPriv->y + dPriv->h };
- drm_clip_rect_t planeA_rect = { .x1 = sarea->planeA_x, .y1 = sarea->planeA_y,
- .x2 = sarea->planeA_x + sarea->planeA_w,
- .y2 = sarea->planeA_y + sarea->planeA_h };
- drm_clip_rect_t planeB_rect = { .x1 = sarea->planeB_x, .y1 = sarea->planeB_y,
- .x2 = sarea->planeB_x + sarea->planeB_w,
- .y2 = sarea->planeB_y + sarea->planeB_h };
- GLint areaA = driIntersectArea( drw_rect, planeA_rect );
- GLint areaB = driIntersectArea( drw_rect, planeB_rect );
- GLuint flags = dPriv->vblFlags;
-
- /* Update vblank info
- */
- if (areaB > areaA || (areaA == areaB && areaB > 0)) {
- flags = dPriv->vblFlags | VBLANK_FLAG_SECONDARY;
- } else {
- flags = dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY;
- }
-
- /* Do the stupid test: Is one of them actually disabled?
- */
- if (sarea->planeA_w == 0 || sarea->planeA_h == 0) {
- flags = dPriv->vblFlags | VBLANK_FLAG_SECONDARY;
- } else if (sarea->planeB_w == 0 || sarea->planeB_h == 0) {
- flags = dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY;
- }
-
- return flags;
- } else {
- return dPriv->vblFlags & ~VBLANK_FLAG_SECONDARY;
- }
-}
-
-
-/**
- * Called from driSwapBuffers()
- */
-void
-intelSwapBuffers(__DRIdrawablePrivate * dPriv)
-{
- __DRIscreenPrivate *psp = dPriv->driScreenPriv;
-
- if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
- GET_CURRENT_CONTEXT(ctx);
- struct intel_context *intel;
-
- if (ctx == NULL)
- return;
-
- intel = intel_context(ctx);
-
- if (ctx->Visual.doubleBufferMode) {
- GLboolean missed_target;
- struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
- int64_t ust;
-
- _mesa_notifySwapBuffers(ctx); /* flush pending rendering comands */
-
- /*
- * The old swapping ioctl was incredibly racy, just wait for vblank
- * and do the swap ourselves.
- */
- driWaitForVBlank(dPriv, &missed_target);
-
- /*
- * Update each buffer's vbl_pending so we don't get too out of
- * sync
- */
- intel_get_renderbuffer(&intel_fb->Base,
- BUFFER_BACK_LEFT)->vbl_pending = dPriv->vblSeq;
- intel_get_renderbuffer(&intel_fb->Base,
- BUFFER_FRONT_LEFT)->vbl_pending = dPriv->vblSeq;
-
- intelCopyBuffer(dPriv, NULL);
-
- intel_fb->swap_count++;
- (*psp->systemTime->getUST) (&ust);
- if (missed_target) {
- intel_fb->swap_missed_count++;
- intel_fb->swap_missed_ust = ust - intel_fb->swap_ust;
- }
-
- intel_fb->swap_ust = ust;
- }
- drmCommandNone(intel->driFd, DRM_I915_GEM_THROTTLE);
- }
- else {
- /* XXX this shouldn't be an error but we can't handle it for now */
- fprintf(stderr, "%s: drawable has no context!\n", __FUNCTION__);
- }
-}
-
-
-/**
- * Called from driCopySubBuffer()
- */
-void
-intelCopySubBuffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h)
-{
- if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
- struct intel_context *intel =
- (struct intel_context *) dPriv->driContextPriv->driverPrivate;
- GLcontext *ctx = &intel->ctx;
-
- if (ctx->Visual.doubleBufferMode) {
- drm_clip_rect_t rect;
- rect.x1 = x + dPriv->x;
- rect.y1 = (dPriv->h - y - h) + dPriv->y;
- rect.x2 = rect.x1 + w;
- rect.y2 = rect.y1 + h;
- _mesa_notifySwapBuffers(ctx); /* flush pending rendering comands */
- intelCopyBuffer(dPriv, &rect);
- }
- }
- else {
- /* XXX this shouldn't be an error but we can't handle it for now */
- fprintf(stderr, "%s: drawable has no context!\n", __FUNCTION__);
- }
-}
-
-
-/**
- * This will be called whenever the currently bound window is moved/resized.
- * XXX: actually, it seems to NOT be called when the window is only moved (BP).
- */
-void
-intelWindowMoved(struct intel_context *intel)
-{
- GLcontext *ctx = &intel->ctx;
- __DRIdrawablePrivate *dPriv = intel->driDrawable;
- struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
-
- if (!intel->intelScreen->driScrnPriv->dri2.enabled &&
- intel->intelScreen->driScrnPriv->ddx_version.minor >= 7) {
- GLuint flags = intelFixupVblank(intel, dPriv);
-
- /* Check to see if we changed pipes */
- if (flags != dPriv->vblFlags && dPriv->vblFlags &&
- !(dPriv->vblFlags & VBLANK_FLAG_NO_IRQ)) {
- int64_t count;
- drmVBlank vbl;
- int i;
-
- /*
- * Deal with page flipping
- */
- vbl.request.type = DRM_VBLANK_ABSOLUTE;
-
- if ( dPriv->vblFlags & VBLANK_FLAG_SECONDARY ) {
- vbl.request.type |= DRM_VBLANK_SECONDARY;
- }
-
- for (i = 0; i < 2; i++) {
- if (!intel_fb->color_rb[i] ||
- (intel_fb->vbl_waited - intel_fb->color_rb[i]->vbl_pending) <=
- (1<<23))
- continue;
-
- vbl.request.sequence = intel_fb->color_rb[i]->vbl_pending;
- drmWaitVBlank(intel->driFd, &vbl);
- }
-
- /*
- * Update msc_base from old pipe
- */
- driDrawableGetMSC32(dPriv->driScreenPriv, dPriv, &count);
- dPriv->msc_base = count;
- /*
- * Then get new vblank_base and vblSeq values
- */
- dPriv->vblFlags = flags;
- driGetCurrentVBlank(dPriv);
- dPriv->vblank_base = dPriv->vblSeq;
-
- intel_fb->vbl_waited = dPriv->vblSeq;
-
- for (i = 0; i < 2; i++) {
- if (intel_fb->color_rb[i])
- intel_fb->color_rb[i]->vbl_pending = intel_fb->vbl_waited;
- }
- }
- } else {
- dPriv->vblFlags &= ~VBLANK_FLAG_SECONDARY;
- }
-
- /* Update Mesa's notion of window size */
- driUpdateFramebufferSize(ctx, dPriv);
- intel_fb->Base.Initialized = GL_TRUE; /* XXX remove someday */
-
- /* Update hardware scissor */
- if (ctx->Driver.Scissor != NULL) {
- ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y,
- ctx->Scissor.Width, ctx->Scissor.Height);
- }
-
- /* Re-calculate viewport related state */
- if (ctx->Driver.DepthRange != NULL)
- ctx->Driver.DepthRange( ctx, ctx->Viewport.Near, ctx->Viewport.Far );
-}
diff --git a/src/mesa/drivers/dri/intel/intel_swapbuffers.h b/src/mesa/drivers/dri/intel/intel_swapbuffers.h
deleted file mode 100644
index 75bb6242ffc..00000000000
--- a/src/mesa/drivers/dri/intel/intel_swapbuffers.h
+++ /dev/null
@@ -1,52 +0,0 @@
-
-/**************************************************************************
- *
- * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-#ifndef INTEL_SWAPBUFFERS_H
-#define INTEL_SWAPBUFFERS_H
-
-#include "dri_util.h"
-#include "drm.h"
-
-struct intel_context;
-struct intel_framebuffer;
-
-
-extern void
-intelSwapBuffers(__DRIdrawablePrivate * dPriv);
-
-extern void
-intelCopySubBuffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h);
-
-extern GLuint
-intelFixupVblank(struct intel_context *intel, __DRIdrawablePrivate *dPriv);
-
-extern void
-intelWindowMoved(struct intel_context *intel);
-
-
-#endif /* INTEL_SWAPBUFFERS_H */
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index a80cab31f32..79994b4a6a0 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -109,7 +109,6 @@ do_copy_texsubimage(struct intel_context *intel,
}
/* intelFlush(ctx); */
- LOCK_HARDWARE(intel);
{
drm_intel_bo *dst_bo = intel_region_buffer(intel,
intelImage->mt->region,
@@ -131,13 +130,12 @@ do_copy_texsubimage(struct intel_context *intel,
/* Can't blit to tiled buffers with non-tile-aligned offset. */
if (intelImage->mt->region->tiling == I915_TILING_Y) {
- UNLOCK_HARDWARE(intel);
return GL_FALSE;
}
if (ctx->ReadBuffer->Name == 0) {
/* reading from a window, adjust x, y */
- const __DRIdrawablePrivate *dPriv = intel->driReadDrawable;
+ const __DRIdrawable *dPriv = intel->driReadDrawable;
y = dPriv->y + (dPriv->h - (y + height));
x += dPriv->x;
@@ -169,13 +167,10 @@ do_copy_texsubimage(struct intel_context *intel,
image_x + dstx, image_y + dsty,
width, height,
GL_COPY)) {
- UNLOCK_HARDWARE(intel);
return GL_FALSE;
}
}
- UNLOCK_HARDWARE(intel);
-
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c
index 87efb72cc51..a7c6c45ffe4 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_format.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_format.c
@@ -173,13 +173,13 @@ intelChooseTextureFormat(GLcontext * ctx, GLint internalFormat,
return MESA_FORMAT_SARGB8;
case GL_SLUMINANCE_EXT:
case GL_SLUMINANCE8_EXT:
- if (IS_G4X(intel->intelScreen->deviceID))
+ if (intel->has_luminance_srgb)
return MESA_FORMAT_SL8;
else
return MESA_FORMAT_SARGB8;
case GL_SLUMINANCE_ALPHA_EXT:
case GL_SLUMINANCE8_ALPHA8_EXT:
- if (IS_G4X(intel->intelScreen->deviceID))
+ if (intel->has_luminance_srgb)
return MESA_FORMAT_SLA8;
else
return MESA_FORMAT_SARGB8;
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index fe4806c00a6..f5d0dabebb6 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -234,7 +234,6 @@ try_pbo_upload(struct intel_context *intel,
if (drm_intel_bo_references(intel->batch->buf, dst_buffer))
intelFlush(&intel->ctx);
- LOCK_HARDWARE(intel);
{
dri_bo *src_buffer = intel_bufferobj_buffer(intel, pbo, INTEL_READ);
@@ -244,11 +243,9 @@ try_pbo_upload(struct intel_context *intel,
dst_stride, dst_buffer, 0, GL_FALSE,
0, 0, dst_x, dst_y, width, height,
GL_COPY)) {
- UNLOCK_HARDWARE(intel);
return GL_FALSE;
}
}
- UNLOCK_HARDWARE(intel);
return GL_TRUE;
}
@@ -468,8 +465,6 @@ intelTexImage(GLcontext * ctx,
pixels, unpack, "glTexImage");
}
- LOCK_HARDWARE(intel);
-
if (intelImage->mt) {
if (pixels != NULL) {
/* Flush any queued rendering with the texture before mapping. */
@@ -550,8 +545,6 @@ intelTexImage(GLcontext * ctx,
intel_miptree_image_unmap(intel, intelImage->mt);
texImage->Data = NULL;
}
-
- UNLOCK_HARDWARE(intel);
}
@@ -731,7 +724,7 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
GLint glx_texture_format,
__DRIdrawable *dPriv)
{
- struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
+ struct gl_framebuffer *fb = dPriv->driverPrivate;
struct intel_context *intel = pDRICtx->driverPrivate;
GLcontext *ctx = &intel->ctx;
struct intel_texture_object *intelObj;
@@ -748,9 +741,10 @@ intelSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
if (!intelObj)
return;
- intel_update_renderbuffers(pDRICtx, dPriv);
+ if (!dPriv->validBuffers)
+ intel_update_renderbuffers(pDRICtx, dPriv);
- rb = intel_fb->color_rb[0];
+ rb = intel_get_renderbuffer(fb, BUFFER_FRONT_LEFT);
/* If the region isn't set, then intel_update_renderbuffers was unable
* to get the buffers for the drawable.
*/
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index 1f682082660..7f1dc890220 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -72,8 +72,6 @@ intelTexSubimage(GLcontext * ctx,
if (!pixels)
return;
- LOCK_HARDWARE(intel);
-
/* Map buffer if necessary. Need to lock to prevent other contexts
* from uploading the buffer under us.
*/
@@ -129,8 +127,6 @@ intelTexSubimage(GLcontext * ctx,
intel_miptree_image_unmap(intel, intelImage->mt);
texImage->Data = NULL;
}
-
- UNLOCK_HARDWARE(intel);
}
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c
index 37cea9dd44a..11bce31b12c 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.c
+++ b/src/mesa/drivers/dri/mach64/mach64_context.c
@@ -87,11 +87,11 @@ static const struct dri_extension card_extensions[] =
/* Create the device specific context.
*/
GLboolean mach64CreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
GLcontext *ctx, *shareCtx;
- __DRIscreenPrivate *driScreen = driContextPriv->driScreenPriv;
+ __DRIscreen *driScreen = driContextPriv->driScreenPriv;
struct dd_function_table functions;
mach64ContextPtr mmesa;
mach64ScreenPtr mach64Screen;
@@ -258,7 +258,7 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual,
/* Destroy the device specific context.
*/
-void mach64DestroyContext( __DRIcontextPrivate *driContextPriv )
+void mach64DestroyContext( __DRIcontext *driContextPriv )
{
mach64ContextPtr mmesa = (mach64ContextPtr) driContextPriv->driverPrivate;
@@ -305,9 +305,9 @@ void mach64DestroyContext( __DRIcontextPrivate *driContextPriv )
* buffer `b'.
*/
GLboolean
-mach64MakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv )
+mach64MakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv )
{
if ( driContextPriv ) {
GET_CURRENT_CONTEXT(ctx);
@@ -350,7 +350,7 @@ mach64MakeCurrent( __DRIcontextPrivate *driContextPriv,
/* Force the context `c' to be unbound from its buffer.
*/
GLboolean
-mach64UnbindContext( __DRIcontextPrivate *driContextPriv )
+mach64UnbindContext( __DRIcontext *driContextPriv )
{
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h
index 854751626d0..18fc859d013 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.h
+++ b/src/mesa/drivers/dri/mach64/mach64_context.h
@@ -232,9 +232,9 @@ struct mach64_context {
/* Mirrors of some DRI state
*/
- __DRIcontextPrivate *driContext; /* DRI context */
- __DRIscreenPrivate *driScreen; /* DRI screen */
- __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */
+ __DRIcontext *driContext; /* DRI context */
+ __DRIscreen *driScreen; /* DRI screen */
+ __DRIdrawable *driDrawable; /* DRI drawable bound to this ctx */
unsigned int lastStamp; /* mirror driDrawable->lastStamp */
@@ -274,16 +274,16 @@ struct mach64_context {
extern GLboolean mach64CreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate );
-extern void mach64DestroyContext( __DRIcontextPrivate * );
+extern void mach64DestroyContext( __DRIcontext * );
-extern GLboolean mach64MakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv );
+extern GLboolean mach64MakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv );
-extern GLboolean mach64UnbindContext( __DRIcontextPrivate *driContextPriv );
+extern GLboolean mach64UnbindContext( __DRIcontext *driContextPriv );
/* ================================================================
* Byte ordering
diff --git a/src/mesa/drivers/dri/mach64/mach64_ioctl.c b/src/mesa/drivers/dri/mach64/mach64_ioctl.c
index ef5c0625c31..03587c44fda 100644
--- a/src/mesa/drivers/dri/mach64/mach64_ioctl.c
+++ b/src/mesa/drivers/dri/mach64/mach64_ioctl.c
@@ -279,7 +279,7 @@ static int mach64WaitForFrameCompletion( mach64ContextPtr mmesa )
/* Copy the back color buffer to the front color buffer.
*/
-void mach64CopyBuffer( __DRIdrawablePrivate *dPriv )
+void mach64CopyBuffer( __DRIdrawable *dPriv )
{
mach64ContextPtr mmesa;
GLint nbox, i, ret;
@@ -668,7 +668,7 @@ void mach64PerformanceBoxesLocked( mach64ContextPtr mmesa )
static void mach64DDClear( GLcontext *ctx, GLbitfield mask )
{
mach64ContextPtr mmesa = MACH64_CONTEXT( ctx );
- __DRIdrawablePrivate *dPriv = mmesa->driDrawable;
+ __DRIdrawable *dPriv = mmesa->driDrawable;
drm_mach64_clear_t clear;
GLuint flags = 0;
GLint i;
diff --git a/src/mesa/drivers/dri/mach64/mach64_ioctl.h b/src/mesa/drivers/dri/mach64/mach64_ioctl.h
index 6ef9bc0bcaf..1ffda1932f1 100644
--- a/src/mesa/drivers/dri/mach64/mach64_ioctl.h
+++ b/src/mesa/drivers/dri/mach64/mach64_ioctl.h
@@ -78,7 +78,7 @@ extern void mach64FireBlitLocked( mach64ContextPtr mmesa, void *buffer,
GLint offset, GLint pitch, GLint format,
GLint x, GLint y, GLint width, GLint height );
-extern void mach64CopyBuffer( __DRIdrawablePrivate *dPriv );
+extern void mach64CopyBuffer( __DRIdrawable *dPriv );
#if ENABLE_PERF_BOXES
extern void mach64PerformanceCounters( mach64ContextPtr mmesa );
extern void mach64PerformanceBoxesLocked( mach64ContextPtr mmesa );
diff --git a/src/mesa/drivers/dri/mach64/mach64_lock.c b/src/mesa/drivers/dri/mach64/mach64_lock.c
index f7ef4da8530..1a95a8f619d 100644
--- a/src/mesa/drivers/dri/mach64/mach64_lock.c
+++ b/src/mesa/drivers/dri/mach64/mach64_lock.c
@@ -50,8 +50,8 @@ int prevLockLine = 0;
*/
void mach64GetLock( mach64ContextPtr mmesa, GLuint flags )
{
- __DRIdrawablePrivate *dPriv = mmesa->driDrawable;
- __DRIscreenPrivate *sPriv = mmesa->driScreen;
+ __DRIdrawable *dPriv = mmesa->driDrawable;
+ __DRIscreen *sPriv = mmesa->driScreen;
drm_mach64_sarea_t *sarea = mmesa->sarea;
int i;
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_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c
index 61e174533de..5cbfb85627a 100644
--- a/src/mesa/drivers/dri/mach64/mach64_screen.c
+++ b/src/mesa/drivers/dri/mach64/mach64_screen.c
@@ -66,7 +66,7 @@ static const GLuint __driNConfigOptions = 2;
#endif
static const __DRIconfig **
-mach64FillInModes( __DRIscreenPrivate *psp,
+mach64FillInModes( __DRIscreen *psp,
unsigned pixel_bits, unsigned depth_bits,
unsigned stencil_bits, GLboolean have_back_buffer )
{
@@ -142,7 +142,7 @@ mach64FillInModes( __DRIscreenPrivate *psp,
/* Create the device specific screen private data struct.
*/
static mach64ScreenRec *
-mach64CreateScreen( __DRIscreenPrivate *sPriv )
+mach64CreateScreen( __DRIscreen *sPriv )
{
mach64ScreenPtr mach64Screen;
ATIDRIPtr serverInfo = (ATIDRIPtr)sPriv->pDevPriv;
@@ -270,7 +270,7 @@ mach64CreateScreen( __DRIscreenPrivate *sPriv )
/* Destroy the device specific screen private data struct.
*/
static void
-mach64DestroyScreen( __DRIscreenPrivate *driScreen )
+mach64DestroyScreen( __DRIscreen *driScreen )
{
mach64ScreenRec *mach64Screen = (mach64ScreenRec *) driScreen->private;
@@ -297,8 +297,8 @@ mach64DestroyScreen( __DRIscreenPrivate *driScreen )
* data.
*/
static GLboolean
-mach64CreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+mach64CreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -368,7 +368,7 @@ mach64CreateBuffer( __DRIscreenPrivate *driScrnPriv,
static void
-mach64DestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+mach64DestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
@@ -376,7 +376,7 @@ mach64DestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
/* Copy the back color buffer to the front color buffer */
static void
-mach64SwapBuffers(__DRIdrawablePrivate *dPriv)
+mach64SwapBuffers(__DRIdrawable *dPriv)
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
mach64ContextPtr mmesa;
@@ -398,7 +398,7 @@ mach64SwapBuffers(__DRIdrawablePrivate *dPriv)
/* Initialize the driver specific screen private data.
*/
static GLboolean
-mach64InitDriver( __DRIscreenPrivate *driScreen )
+mach64InitDriver( __DRIscreen *driScreen )
{
driScreen->private = (void *) mach64CreateScreen( driScreen );
@@ -418,7 +418,7 @@ mach64InitDriver( __DRIscreenPrivate *driScreen )
* \return the __GLcontextModes supported by this driver
*/
static const __DRIconfig **
-mach64InitScreen(__DRIscreenPrivate *psp)
+mach64InitScreen(__DRIscreen *psp)
{
static const __DRIversion ddx_expected = { 6, 4, 0 };
static const __DRIversion dri_expected = { 4, 0, 0 };
@@ -455,3 +455,9 @@ const struct __DriverAPIRec driDriverAPI = {
.SwapBuffersMSC = NULL
};
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.h b/src/mesa/drivers/dri/mach64/mach64_screen.h
index be5e29a3e58..1966809c03c 100644
--- a/src/mesa/drivers/dri/mach64/mach64_screen.h
+++ b/src/mesa/drivers/dri/mach64/mach64_screen.h
@@ -70,7 +70,7 @@ typedef struct {
drmBufMapPtr buffers;
- __DRIscreenPrivate *driScreen;
+ __DRIscreen *driScreen;
driOptionCache optionCache;
diff --git a/src/mesa/drivers/dri/mach64/mach64_span.c b/src/mesa/drivers/dri/mach64/mach64_span.c
index d9d1244a9f3..0c52c0c88cb 100644
--- a/src/mesa/drivers/dri/mach64/mach64_span.c
+++ b/src/mesa/drivers/dri/mach64/mach64_span.c
@@ -39,8 +39,8 @@
#define LOCAL_VARS \
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \
- __DRIscreenPrivate *sPriv = mmesa->driScreen; \
- __DRIdrawablePrivate *dPriv = mmesa->driDrawable; \
+ __DRIscreen *sPriv = mmesa->driScreen; \
+ __DRIdrawable *dPriv = mmesa->driDrawable; \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
GLuint height = dPriv->h; \
GLushort p; \
@@ -48,8 +48,8 @@
#define LOCAL_DEPTH_VARS \
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \
- __DRIdrawablePrivate *dPriv = mmesa->driDrawable; \
- __DRIscreenPrivate *driScreen = mmesa->driScreen; \
+ __DRIdrawable *dPriv = mmesa->driDrawable; \
+ __DRIscreen *driScreen = mmesa->driScreen; \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
GLuint height = dPriv->h; \
char *buf = (char *)(driScreen->pFB + drb->offset + \
diff --git a/src/mesa/drivers/dri/mach64/mach64_state.c b/src/mesa/drivers/dri/mach64/mach64_state.c
index 754ed86e59d..b9093b5a139 100644
--- a/src/mesa/drivers/dri/mach64/mach64_state.c
+++ b/src/mesa/drivers/dri/mach64/mach64_state.c
@@ -385,7 +385,7 @@ static void mach64UpdateClipping( GLcontext *ctx )
mach64ScreenPtr mach64Screen = mmesa->mach64Screen;
if ( mmesa->driDrawable ) {
- __DRIdrawablePrivate *drawable = mmesa->driDrawable;
+ __DRIdrawable *drawable = mmesa->driDrawable;
int x1 = 0;
int y1 = 0;
int x2 = drawable->w - 1;
@@ -524,10 +524,10 @@ static void mach64UpdateMasks( GLcontext *ctx )
/* mach64 can't color mask with alpha blending enabled */
if ( !ctx->Color.BlendEnabled ) {
mask = mach64PackColor( mmesa->mach64Screen->cpp,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP] );
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP] );
}
if ( mmesa->setup.dp_write_mask != mask ) {
@@ -686,7 +686,7 @@ static void mach64DDLogicOpCode( GLcontext *ctx, GLenum opcode )
void mach64SetCliprects( GLcontext *ctx, GLenum mode )
{
mach64ContextPtr mmesa = MACH64_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = mmesa->driDrawable;
+ __DRIdrawable *dPriv = mmesa->driDrawable;
switch ( mode ) {
case GL_FRONT_LEFT:
diff --git a/src/mesa/drivers/dri/mach64/mach64_tex.c b/src/mesa/drivers/dri/mach64/mach64_tex.c
index 2e85336c4f7..1bce967d58f 100644
--- a/src/mesa/drivers/dri/mach64/mach64_tex.c
+++ b/src/mesa/drivers/dri/mach64/mach64_tex.c
@@ -125,7 +125,7 @@ mach64AllocTexObj( struct gl_texture_object *texObj )
mach64SetTexWrap( t, texObj->WrapS, texObj->WrapT );
mach64SetTexFilter( t, texObj->MinFilter, texObj->MagFilter );
- mach64SetTexBorderColor( t, texObj->BorderColor );
+ mach64SetTexBorderColor( t, texObj->BorderColor.f );
return t;
}
@@ -465,7 +465,7 @@ static void mach64DDTexParameter( GLcontext *ctx, GLenum target,
case GL_TEXTURE_BORDER_COLOR:
if ( t->base.bound ) FLUSH_BATCH( mmesa );
- mach64SetTexBorderColor( t, tObj->BorderColor );
+ mach64SetTexBorderColor( t, tObj->BorderColor.f );
break;
case GL_TEXTURE_BASE_LEVEL:
@@ -560,7 +560,6 @@ void mach64InitTextureFuncs( struct dd_function_table *functions )
functions->IsTextureResident = driIsTextureResident;
functions->UpdateTexturePalette = NULL;
- functions->ActiveTexture = NULL;
driInitTextureFormats();
}
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/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c
index d0902e565b7..e7813b63725 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c
@@ -106,7 +106,7 @@ int MGA_DEBUG = 0;
#endif
static const __DRIconfig **
-mgaFillInModes( __DRIscreenPrivate *psp,
+mgaFillInModes( __DRIscreen *psp,
unsigned pixel_bits, unsigned depth_bits,
unsigned stencil_bits, GLboolean have_back_buffer )
{
@@ -188,7 +188,7 @@ const __DRIextension *mgaScreenExtensions[] = {
};
static GLboolean
-mgaInitDriver(__DRIscreenPrivate *sPriv)
+mgaInitDriver(__DRIscreen *sPriv)
{
mgaScreenPrivate *mgaScreen;
MGADRIPtr serverInfo = (MGADRIPtr)sPriv->pDevPriv;
@@ -330,7 +330,7 @@ mgaInitDriver(__DRIscreenPrivate *sPriv)
static void
-mgaDestroyScreen(__DRIscreenPrivate *sPriv)
+mgaDestroyScreen(__DRIscreen *sPriv)
{
mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *) sPriv->private;
@@ -424,14 +424,14 @@ static const struct dri_debug_control debug_control[] =
static GLboolean
mgaCreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
int i;
unsigned maxlevels;
GLcontext *ctx, *shareCtx;
mgaContextPtr mmesa;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *)sPriv->private;
drm_mga_sarea_t *saPriv = (drm_mga_sarea_t *)(((char*)sPriv->pSAREA)+
mgaScreen->sarea_priv_offset);
@@ -643,7 +643,7 @@ mgaCreateContext( const __GLcontextModes *mesaVis,
}
static void
-mgaDestroyContext(__DRIcontextPrivate *driContextPriv)
+mgaDestroyContext(__DRIcontext *driContextPriv)
{
mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate;
@@ -695,8 +695,8 @@ mgaDestroyContext(__DRIcontextPrivate *driContextPriv)
static GLboolean
-mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+mgaCreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -812,13 +812,13 @@ mgaCreateBuffer( __DRIscreenPrivate *driScrnPriv,
static void
-mgaDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+mgaDestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static void
-mgaSwapBuffers(__DRIdrawablePrivate *dPriv)
+mgaSwapBuffers(__DRIdrawable *dPriv)
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
mgaContextPtr mmesa;
@@ -837,7 +837,7 @@ mgaSwapBuffers(__DRIdrawablePrivate *dPriv)
}
static GLboolean
-mgaUnbindContext(__DRIcontextPrivate *driContextPriv)
+mgaUnbindContext(__DRIcontext *driContextPriv)
{
mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate;
if (mmesa)
@@ -853,9 +853,9 @@ mgaUnbindContext(__DRIcontextPrivate *driContextPriv)
* But why are we doing context initialization here???
*/
static GLboolean
-mgaMakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv)
+mgaMakeCurrent(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv)
{
if (driContextPriv) {
mgaContextPtr mmesa = (mgaContextPtr) driContextPriv->driverPrivate;
@@ -890,7 +890,7 @@ mgaMakeCurrent(__DRIcontextPrivate *driContextPriv,
void mgaGetLock( mgaContextPtr mmesa, GLuint flags )
{
- __DRIdrawablePrivate *dPriv = mmesa->driDrawable;
+ __DRIdrawable *dPriv = mmesa->driDrawable;
drm_mga_sarea_t *sarea = mmesa->sarea;
int me = mmesa->hHWContext;
int i;
@@ -958,7 +958,7 @@ static const __DRIconfig **mgaInitScreen(__DRIscreen *psp)
* Get information about previous buffer swaps.
*/
static int
-getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo )
+getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo )
{
mgaContextPtr mmesa;
@@ -996,3 +996,10 @@ const struct __DriverAPIRec driDriverAPI = {
.WaitForSBC = NULL,
.SwapBuffersMSC = NULL
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.h b/src/mesa/drivers/dri/mga/mga_xmesa.h
index 07c22bd5966..aee146090c0 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.h
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.h
@@ -67,7 +67,7 @@ typedef struct mga_screen_private_s {
char *texVirtual[MGA_NR_TEX_HEAPS];
- __DRIscreenPrivate *sPriv;
+ __DRIscreen *sPriv;
drmBufMapPtr bufs;
drmRegion mmio;
diff --git a/src/mesa/drivers/dri/mga/mgacontext.h b/src/mesa/drivers/dri/mga/mgacontext.h
index 30640a29b35..41415659314 100644
--- a/src/mesa/drivers/dri/mga/mgacontext.h
+++ b/src/mesa/drivers/dri/mga/mgacontext.h
@@ -294,10 +294,10 @@ struct mga_context_t {
drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
int driFd;
- __DRIdrawablePrivate *driDrawable;
- __DRIdrawablePrivate *driReadable;
+ __DRIdrawable *driDrawable;
+ __DRIdrawable *driReadable;
- __DRIscreenPrivate *driScreen;
+ __DRIscreen *driScreen;
struct mga_screen_private_s *mgaScreen;
drm_mga_sarea_t *sarea;
diff --git a/src/mesa/drivers/dri/mga/mgaioctl.c b/src/mesa/drivers/dri/mga/mgaioctl.c
index 3eaa7ecf6bd..259358eaa3f 100644
--- a/src/mesa/drivers/dri/mga/mgaioctl.c
+++ b/src/mesa/drivers/dri/mga/mgaioctl.c
@@ -204,7 +204,7 @@ static void
mgaClear( GLcontext *ctx, GLbitfield mask )
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = mmesa->driDrawable;
+ __DRIdrawable *dPriv = mmesa->driDrawable;
GLuint flags = 0;
GLuint clear_color = mmesa->ClearColor;
GLuint clear_depth = 0;
@@ -406,7 +406,7 @@ static void mgaWaitForFrameCompletion( mgaContextPtr mmesa )
/*
* Copy the back buffer to the front buffer.
*/
-void mgaCopyBuffer( __DRIdrawablePrivate *dPriv )
+void mgaCopyBuffer( __DRIdrawable *dPriv )
{
mgaContextPtr mmesa;
drm_clip_rect_t *pbox;
@@ -414,7 +414,7 @@ void mgaCopyBuffer( __DRIdrawablePrivate *dPriv )
GLint ret;
GLint i;
GLboolean missed_target;
- __DRIscreenPrivate *psp = dPriv->driScreenPriv;
+ __DRIscreen *psp = dPriv->driScreenPriv;
assert(dPriv);
assert(dPriv->driContextPriv);
diff --git a/src/mesa/drivers/dri/mga/mgaioctl.h b/src/mesa/drivers/dri/mga/mgaioctl.h
index dbc823de802..7a8660d2035 100644
--- a/src/mesa/drivers/dri/mga/mgaioctl.h
+++ b/src/mesa/drivers/dri/mga/mgaioctl.h
@@ -32,7 +32,7 @@
#include "mgacontext.h"
#include "mga_xmesa.h"
-void mgaCopyBuffer( __DRIdrawablePrivate *dPriv );
+void mgaCopyBuffer( __DRIdrawable *dPriv );
void mgaWaitForVBlank( mgaContextPtr mmesa );
void mgaGetILoadBufferLocked( mgaContextPtr mmesa );
diff --git a/src/mesa/drivers/dri/mga/mgapixel.c b/src/mesa/drivers/dri/mga/mgapixel.c
index 977dfa0b760..69415f8a839 100644
--- a/src/mesa/drivers/dri/mga/mgapixel.c
+++ b/src/mesa/drivers/dri/mga/mgapixel.c
@@ -134,10 +134,10 @@ check_color_per_fragment_ops( const GLcontext *ctx )
ctx->Fog.Enabled ||
ctx->Scissor.Enabled ||
ctx->Stencil._Enabled ||
- !ctx->Color.ColorMask[0] ||
- !ctx->Color.ColorMask[1] ||
- !ctx->Color.ColorMask[2] ||
- !ctx->Color.ColorMask[3] ||
+ !ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3] ||
ctx->Color.ColorLogicOpEnabled ||
ctx->Texture._EnabledUnits
) &&
@@ -150,10 +150,10 @@ static GLboolean
check_depth_per_fragment_ops( const GLcontext *ctx )
{
return ( ctx->Current.RasterPosValid &&
- ctx->Color.ColorMask[RCOMP] == 0 &&
- ctx->Color.ColorMask[BCOMP] == 0 &&
- ctx->Color.ColorMask[GCOMP] == 0 &&
- ctx->Color.ColorMask[ACOMP] == 0 &&
+ ctx->Color.ColorMask[0][RCOMP] == 0 &&
+ ctx->Color.ColorMask[0][BCOMP] == 0 &&
+ ctx->Color.ColorMask[0][GCOMP] == 0 &&
+ ctx->Color.ColorMask[0][ACOMP] == 0 &&
ctx->Pixel.ZoomX == 1.0F &&
( ctx->Pixel.ZoomY == 1.0F || ctx->Pixel.ZoomY == -1.0F ) );
}
@@ -299,7 +299,7 @@ mgaTryReadPixels( GLcontext *ctx,
#if 0
{
- __DRIdrawablePrivate *dPriv = mmesa->driDrawable;
+ __DRIdrawable *dPriv = mmesa->driDrawable;
int nbox, retcode, i;
UPDATE_LOCK( mmesa, DRM_LOCK_FLUSH | DRM_LOCK_QUIESCENT );
@@ -399,7 +399,7 @@ static void do_draw_pix( GLcontext *ctx,
#if 0
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
drmMGABlit blit;
- __DRIdrawablePrivate *dPriv = mmesa->driDrawable;
+ __DRIdrawable *dPriv = mmesa->driDrawable;
drm_clip_rect_t pbox = dPriv->pClipRects;
int nbox = dPriv->numClipRects;
int retcode, i;
@@ -525,10 +525,10 @@ mgaTryDrawPixels( GLcontext *ctx,
mmesa->mgaScreen->backOffset);
planemask = mgaPackColor(cpp,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP]);
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP]);
if (cpp == 2)
planemask |= planemask << 16;
diff --git a/src/mesa/drivers/dri/mga/mgaspan.c b/src/mesa/drivers/dri/mga/mgaspan.c
index 2ff1cac8e24..10606c152c3 100644
--- a/src/mesa/drivers/dri/mga/mgaspan.c
+++ b/src/mesa/drivers/dri/mga/mgaspan.c
@@ -36,9 +36,9 @@
#define LOCAL_VARS \
mgaContextPtr mmesa = MGA_CONTEXT(ctx); \
- __DRIscreenPrivate *sPriv = mmesa->driScreen; \
+ __DRIscreen *sPriv = mmesa->driScreen; \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
- const __DRIdrawablePrivate *dPriv = drb->dPriv; \
+ const __DRIdrawable *dPriv = drb->dPriv; \
GLuint pitch = drb->pitch; \
GLuint height = dPriv->h; \
char *buf = (char *)(sPriv->pFB + \
@@ -52,9 +52,9 @@
#define LOCAL_DEPTH_VARS \
mgaContextPtr mmesa = MGA_CONTEXT(ctx); \
- __DRIscreenPrivate *sPriv = mmesa->driScreen; \
+ __DRIscreen *sPriv = mmesa->driScreen; \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
- const __DRIdrawablePrivate *dPriv = drb->dPriv; \
+ const __DRIdrawable *dPriv = drb->dPriv; \
GLuint pitch = drb->pitch; \
GLuint height = dPriv->h; \
char *buf = (char *)(sPriv->pFB + \
diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c
index 7c830ec0974..0253044761d 100644
--- a/src/mesa/drivers/dri/mga/mgastate.c
+++ b/src/mesa/drivers/dri/mga/mgastate.c
@@ -374,13 +374,11 @@ static void mgaDDColorMask(GLcontext *ctx,
{
mgaContextPtr mmesa = MGA_CONTEXT( ctx );
mgaScreenPrivate *mgaScreen = mmesa->mgaScreen;
-
-
GLuint mask = mgaPackColor(mgaScreen->cpp,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP]);
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP]);
if (mgaScreen->cpp == 2)
mask = mask | (mask << 16);
@@ -748,7 +746,7 @@ static void mgaDDLogicOp( GLcontext *ctx, GLenum opcode )
static void mga_set_cliprects(mgaContextPtr mmesa)
{
- __DRIdrawablePrivate *driDrawable = mmesa->driDrawable;
+ __DRIdrawable *driDrawable = mmesa->driDrawable;
if ((mmesa->draw_buffer != MGA_FRONT)
|| (driDrawable->numBackClipRects == 0)) {
@@ -776,8 +774,8 @@ static void mga_set_cliprects(mgaContextPtr mmesa)
void mgaUpdateRects( mgaContextPtr mmesa, GLuint buffers )
{
- __DRIdrawablePrivate *const driDrawable = mmesa->driDrawable;
- __DRIdrawablePrivate *const driReadable = mmesa->driReadable;
+ __DRIdrawable *const driDrawable = mmesa->driDrawable;
+ __DRIdrawable *const driReadable = mmesa->driReadable;
mmesa->dirty_cliprects = 0;
diff --git a/src/mesa/drivers/dri/mga/mgatex.c b/src/mesa/drivers/dri/mga/mgatex.c
index 45f2ccbd9fc..ca3dd4b0139 100644
--- a/src/mesa/drivers/dri/mga/mgatex.c
+++ b/src/mesa/drivers/dri/mga/mgatex.c
@@ -329,7 +329,7 @@ mgaAllocTexObj( struct gl_texture_object *tObj )
mgaSetTexWrapping( t, tObj->WrapS, tObj->WrapT );
mgaSetTexFilter( t, tObj->MinFilter, tObj->MagFilter );
- mgaSetTexBorderColor( t, tObj->BorderColor );
+ mgaSetTexBorderColor( t, tObj->BorderColor.f );
}
return( t );
@@ -458,7 +458,7 @@ mgaTexParameter( GLcontext *ctx, GLenum target,
case GL_TEXTURE_BORDER_COLOR:
FLUSH_BATCH(mmesa);
- mgaSetTexBorderColor(t, tObj->BorderColor);
+ mgaSetTexBorderColor(t, tObj->BorderColor.f);
break;
case GL_TEXTURE_BASE_LEVEL:
diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c
index 0b250876c54..e389e1c87b0 100644
--- a/src/mesa/drivers/dri/r128/r128_context.c
+++ b/src/mesa/drivers/dri/r128/r128_context.c
@@ -101,11 +101,11 @@ static const struct dri_debug_control debug_control[] =
/* Create the device specific context.
*/
GLboolean r128CreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
GLcontext *ctx, *shareCtx;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
struct dd_function_table functions;
r128ContextPtr rmesa;
r128ScreenPtr r128scrn;
@@ -274,7 +274,7 @@ GLboolean r128CreateContext( const __GLcontextModes *glVisual,
/* Destroy the device specific context.
*/
-void r128DestroyContext( __DRIcontextPrivate *driContextPriv )
+void r128DestroyContext( __DRIcontext *driContextPriv )
{
r128ContextPtr rmesa = (r128ContextPtr) driContextPriv->driverPrivate;
@@ -325,9 +325,9 @@ void r128DestroyContext( __DRIcontextPrivate *driContextPriv )
* buffer `b'.
*/
GLboolean
-r128MakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv )
+r128MakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv )
{
if ( driContextPriv ) {
GET_CURRENT_CONTEXT(ctx);
@@ -364,7 +364,7 @@ r128MakeCurrent( __DRIcontextPrivate *driContextPriv,
/* Force the context `c' to be unbound from its buffer.
*/
GLboolean
-r128UnbindContext( __DRIcontextPrivate *driContextPriv )
+r128UnbindContext( __DRIcontext *driContextPriv )
{
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/r128/r128_context.h b/src/mesa/drivers/dri/r128/r128_context.h
index 0e10209a6ad..65f845c1159 100644
--- a/src/mesa/drivers/dri/r128/r128_context.h
+++ b/src/mesa/drivers/dri/r128/r128_context.h
@@ -186,9 +186,9 @@ struct r128_context {
/* Mirrors of some DRI state
*/
- __DRIcontextPrivate *driContext; /* DRI context */
- __DRIscreenPrivate *driScreen; /* DRI screen */
- __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */
+ __DRIcontext *driContext; /* DRI context */
+ __DRIscreen *driScreen; /* DRI screen */
+ __DRIdrawable *driDrawable; /* DRI drawable bound to this ctx */
unsigned int lastStamp; /* mirror driDrawable->lastStamp */
@@ -225,16 +225,16 @@ struct r128_context {
extern GLboolean r128CreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate );
-extern void r128DestroyContext( __DRIcontextPrivate * );
+extern void r128DestroyContext( __DRIcontext * );
-extern GLboolean r128MakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv );
+extern GLboolean r128MakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv );
-extern GLboolean r128UnbindContext( __DRIcontextPrivate *driContextPriv );
+extern GLboolean r128UnbindContext( __DRIcontext *driContextPriv );
/* ================================================================
* Debugging:
diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.c b/src/mesa/drivers/dri/r128/r128_ioctl.c
index 84ac3d9f797..56758d971c3 100644
--- a/src/mesa/drivers/dri/r128/r128_ioctl.c
+++ b/src/mesa/drivers/dri/r128/r128_ioctl.c
@@ -248,7 +248,7 @@ static int r128WaitForFrameCompletion( r128ContextPtr rmesa )
/* Copy the back color buffer to the front color buffer.
*/
-void r128CopyBuffer( __DRIdrawablePrivate *dPriv )
+void r128CopyBuffer( __DRIdrawable *dPriv )
{
r128ContextPtr rmesa;
GLint nbox, i, ret;
@@ -327,7 +327,7 @@ void r128CopyBuffer( __DRIdrawablePrivate *dPriv )
#endif
}
-void r128PageFlip( __DRIdrawablePrivate *dPriv )
+void r128PageFlip( __DRIdrawable *dPriv )
{
r128ContextPtr rmesa;
GLint ret;
@@ -401,7 +401,7 @@ void r128PageFlip( __DRIdrawablePrivate *dPriv )
static void r128Clear( GLcontext *ctx, GLbitfield mask )
{
r128ContextPtr rmesa = R128_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = rmesa->driDrawable;
+ __DRIdrawable *dPriv = rmesa->driDrawable;
drm_r128_clear_t clear;
GLuint flags = 0;
GLint i;
diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.h b/src/mesa/drivers/dri/r128/r128_ioctl.h
index 4b0c9cdc7fe..84ace900eec 100644
--- a/src/mesa/drivers/dri/r128/r128_ioctl.h
+++ b/src/mesa/drivers/dri/r128/r128_ioctl.h
@@ -85,8 +85,8 @@ extern void r128ReadDepthSpanLocked( r128ContextPtr rmesa,
extern void r128ReadDepthPixelsLocked( r128ContextPtr rmesa, GLuint n,
const GLint x[], const GLint y[] );
-extern void r128CopyBuffer( __DRIdrawablePrivate *dPriv );
-extern void r128PageFlip( __DRIdrawablePrivate *dPriv );
+extern void r128CopyBuffer( __DRIdrawable *dPriv );
+extern void r128PageFlip( __DRIdrawable *dPriv );
void r128WaitForVBlank( r128ContextPtr rmesa );
extern void r128WaitForIdleLocked( r128ContextPtr rmesa );
diff --git a/src/mesa/drivers/dri/r128/r128_lock.c b/src/mesa/drivers/dri/r128/r128_lock.c
index 81488a27424..9bc3515b5aa 100644
--- a/src/mesa/drivers/dri/r128/r128_lock.c
+++ b/src/mesa/drivers/dri/r128/r128_lock.c
@@ -68,8 +68,8 @@ r128UpdatePageFlipping( r128ContextPtr rmesa )
*/
void r128GetLock( r128ContextPtr rmesa, GLuint flags )
{
- __DRIdrawablePrivate *dPriv = rmesa->driDrawable;
- __DRIscreenPrivate *sPriv = rmesa->driScreen;
+ __DRIdrawable *dPriv = rmesa->driDrawable;
+ __DRIscreen *sPriv = rmesa->driScreen;
drm_r128_sarea_t *sarea = rmesa->sarea;
int i;
diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c
index 9da3b5fb73d..80b265811ec 100644
--- a/src/mesa/drivers/dri/r128/r128_screen.c
+++ b/src/mesa/drivers/dri/r128/r128_screen.c
@@ -91,7 +91,7 @@ static const GLuint __driNConfigOptions = 3;
/* Create the device specific screen private data struct.
*/
static r128ScreenPtr
-r128CreateScreen( __DRIscreenPrivate *sPriv )
+r128CreateScreen( __DRIscreen *sPriv )
{
r128ScreenPtr r128Screen;
R128DRIPtr r128DRIPriv = (R128DRIPtr)sPriv->pDevPriv;
@@ -236,7 +236,7 @@ r128CreateScreen( __DRIscreenPrivate *sPriv )
/* Destroy the device specific screen private data struct.
*/
static void
-r128DestroyScreen( __DRIscreenPrivate *sPriv )
+r128DestroyScreen( __DRIscreen *sPriv )
{
r128ScreenPtr r128Screen = (r128ScreenPtr)sPriv->private;
@@ -262,8 +262,8 @@ r128DestroyScreen( __DRIscreenPrivate *sPriv )
* data.
*/
static GLboolean
-r128CreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+r128CreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -349,7 +349,7 @@ r128CreateBuffer( __DRIscreenPrivate *driScrnPriv,
static void
-r128DestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+r128DestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
@@ -357,7 +357,7 @@ r128DestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
/* Copy the back color buffer to the front color buffer */
static void
-r128SwapBuffers(__DRIdrawablePrivate *dPriv)
+r128SwapBuffers(__DRIdrawable *dPriv)
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
r128ContextPtr rmesa;
@@ -384,7 +384,7 @@ r128SwapBuffers(__DRIdrawablePrivate *dPriv)
/* Initialize the driver specific screen private data.
*/
static GLboolean
-r128InitDriver( __DRIscreenPrivate *sPriv )
+r128InitDriver( __DRIscreen *sPriv )
{
sPriv->private = (void *) r128CreateScreen( sPriv );
@@ -397,7 +397,7 @@ r128InitDriver( __DRIscreenPrivate *sPriv )
}
static const __DRIconfig **
-r128FillInModes( __DRIscreenPrivate *psp,
+r128FillInModes( __DRIscreen *psp,
unsigned pixel_bits, unsigned depth_bits,
unsigned stencil_bits, GLboolean have_back_buffer )
{
@@ -478,7 +478,7 @@ r128FillInModes( __DRIscreenPrivate *psp,
* \return the __GLcontextModes supported by this driver
*/
static const __DRIconfig **
-r128InitScreen(__DRIscreenPrivate *psp)
+r128InitScreen(__DRIscreen *psp)
{
static const __DRIversion ddx_expected = { 4, 0, 0 };
static const __DRIversion dri_expected = { 4, 0, 0 };
@@ -517,3 +517,10 @@ const struct __DriverAPIRec driDriverAPI = {
.WaitForSBC = NULL,
.SwapBuffersMSC = NULL
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/r128/r128_screen.h b/src/mesa/drivers/dri/r128/r128_screen.h
index e2fa1677c9f..8d450adff34 100644
--- a/src/mesa/drivers/dri/r128/r128_screen.h
+++ b/src/mesa/drivers/dri/r128/r128_screen.h
@@ -71,7 +71,7 @@ typedef struct {
drmBufMapPtr buffers;
- __DRIscreenPrivate *driScreen;
+ __DRIscreen *driScreen;
unsigned int sarea_priv_offset;
/* Configuration cache with default values for all contexts */
diff --git a/src/mesa/drivers/dri/r128/r128_span.c b/src/mesa/drivers/dri/r128/r128_span.c
index d238cc3c941..0413e5b4f12 100644
--- a/src/mesa/drivers/dri/r128/r128_span.c
+++ b/src/mesa/drivers/dri/r128/r128_span.c
@@ -50,8 +50,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define LOCAL_VARS \
r128ContextPtr rmesa = R128_CONTEXT(ctx); \
- __DRIscreenPrivate *sPriv = rmesa->driScreen; \
- __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \
+ __DRIscreen *sPriv = rmesa->driScreen; \
+ __DRIdrawable *dPriv = rmesa->driDrawable; \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
GLuint height = dPriv->h; \
GLuint p; \
@@ -60,8 +60,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define LOCAL_DEPTH_VARS \
r128ContextPtr rmesa = R128_CONTEXT(ctx); \
r128ScreenPtr r128scrn = rmesa->r128Screen; \
- __DRIscreenPrivate *sPriv = rmesa->driScreen; \
- __DRIdrawablePrivate *dPriv = rmesa->driDrawable; \
+ __DRIscreen *sPriv = rmesa->driScreen; \
+ __DRIdrawable *dPriv = rmesa->driDrawable; \
GLuint height = dPriv->h; \
(void) r128scrn; (void) sPriv; (void) height
diff --git a/src/mesa/drivers/dri/r128/r128_state.c b/src/mesa/drivers/dri/r128/r128_state.c
index 4ae7bf5b97d..2254a7a4ffc 100644
--- a/src/mesa/drivers/dri/r128/r128_state.c
+++ b/src/mesa/drivers/dri/r128/r128_state.c
@@ -572,7 +572,7 @@ static void r128UpdateClipping( GLcontext *ctx )
r128ContextPtr rmesa = R128_CONTEXT(ctx);
if ( rmesa->driDrawable ) {
- __DRIdrawablePrivate *drawable = rmesa->driDrawable;
+ __DRIdrawable *drawable = rmesa->driDrawable;
int x1 = 0;
int y1 = 0;
int x2 = drawable->w - 1;
@@ -702,10 +702,10 @@ static void r128UpdateMasks( GLcontext *ctx )
r128ContextPtr rmesa = R128_CONTEXT(ctx);
GLuint mask = r128PackColor( rmesa->r128Screen->cpp,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP] );
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP] );
if ( rmesa->setup.plane_3d_mask_c != mask ) {
rmesa->setup.plane_3d_mask_c = mask;
diff --git a/src/mesa/drivers/dri/r128/r128_tex.c b/src/mesa/drivers/dri/r128/r128_tex.c
index 0a1207fb89f..f1be7cc1c4f 100644
--- a/src/mesa/drivers/dri/r128/r128_tex.c
+++ b/src/mesa/drivers/dri/r128/r128_tex.c
@@ -169,7 +169,7 @@ static r128TexObjPtr r128AllocTexObj( struct gl_texture_object *texObj )
r128SetTexWrap( t, texObj->WrapS, texObj->WrapT );
r128SetTexFilter( t, texObj->MinFilter, texObj->MagFilter );
- r128SetTexBorderColor( t, texObj->BorderColor );
+ r128SetTexBorderColor( t, texObj->BorderColor.f );
}
return t;
@@ -535,7 +535,7 @@ static void r128TexParameter( GLcontext *ctx, GLenum target,
case GL_TEXTURE_BORDER_COLOR:
if ( t->base.bound ) FLUSH_BATCH( rmesa );
- r128SetTexBorderColor( t, tObj->BorderColor );
+ r128SetTexBorderColor( t, tObj->BorderColor.f );
break;
case GL_TEXTURE_BASE_LEVEL:
diff --git a/src/mesa/drivers/dri/r128/r128_tris.c b/src/mesa/drivers/dri/r128/r128_tris.c
index 82d825b8d28..86d4717b050 100644
--- a/src/mesa/drivers/dri/r128/r128_tris.c
+++ b/src/mesa/drivers/dri/r128/r128_tris.c
@@ -651,12 +651,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/Makefile b/src/mesa/drivers/dri/r200/Makefile
index 8212dc12031..14eb96c1bab 100644
--- a/src/mesa/drivers/dri/r200/Makefile
+++ b/src/mesa/drivers/dri/r200/Makefile
@@ -9,10 +9,6 @@ LIBNAME = r200_dri.so
MINIGLX_SOURCES = server/radeon_dri.c
-ifeq ($(USING_EGL), 1)
-EGL_SOURCES = server/radeon_egl.c
-endif
-
ifeq ($(RADEON_LDFLAGS),)
CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c
endif
@@ -29,8 +25,8 @@ RADEON_COMMON_SOURCES = \
radeon_mipmap_tree.c \
radeon_queryobj.c \
radeon_span.c \
- radeon_texture.c
-
+ radeon_texture.c \
+ radeon_tex_copy.c
DRIVER_SOURCES = r200_context.c \
r200_ioctl.c \
@@ -46,6 +42,7 @@ DRIVER_SOURCES = r200_context.c \
r200_sanity.c \
r200_fragshader.c \
r200_vertprog.c \
+ r200_blit.c \
radeon_screen.c \
$(EGL_SOURCES) \
$(RADEON_COMMON_SOURCES) \
@@ -55,7 +52,7 @@ C_SOURCES = $(COMMON_SOURCES) $(DRIVER_SOURCES)
X86_SOURCES =
-DRIVER_DEFINES = -DRADEON_R200 -Wall
+DRIVER_DEFINES = -DRADEON_R200
DRI_LIB_DEPS += $(RADEON_LDFLAGS)
diff --git a/src/mesa/drivers/dri/r200/r200_blit.c b/src/mesa/drivers/dri/r200/r200_blit.c
new file mode 100644
index 00000000000..e446d532cf7
--- /dev/null
+++ b/src/mesa/drivers/dri/r200/r200_blit.c
@@ -0,0 +1,407 @@
+/*
+ * Copyright (C) 2009 Maciej Cencora <m.cencora@gmail.com>
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "radeon_common.h"
+#include "r200_context.h"
+#include "r200_blit.h"
+
+static inline uint32_t cmdpacket0(struct radeon_screen *rscrn,
+ int reg, int count)
+{
+ if (count)
+ return CP_PACKET0(reg, count - 1);
+ return CP_PACKET2;
+}
+
+/* common formats supported as both textures and render targets */
+static unsigned is_blit_supported(gl_format mesa_format)
+{
+ /* XXX others? BE/LE? */
+ switch (mesa_format) {
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_A8:
+ break;
+ default:
+ return 0;
+ }
+
+ /* ??? */
+ if (_mesa_get_format_bits(mesa_format, GL_DEPTH_BITS) > 0)
+ return 0;
+
+ return 1;
+}
+
+static inline void emit_vtx_state(struct r200_context *r200)
+{
+ BATCH_LOCALS(&r200->radeon);
+
+ BEGIN_BATCH(14);
+ if (r200->radeon.radeonScreen->chip_flags & RADEON_CHIPSET_TCL) {
+ OUT_BATCH_REGVAL(R200_SE_VAP_CNTL_STATUS, 0);
+ } else {
+ OUT_BATCH_REGVAL(R200_SE_VAP_CNTL_STATUS, RADEON_TCL_BYPASS);
+ }
+ OUT_BATCH_REGVAL(R200_SE_VAP_CNTL, (R200_VAP_FORCE_W_TO_ONE |
+ (9 << R200_VAP_VF_MAX_VTX_NUM__SHIFT)));
+ OUT_BATCH_REGVAL(R200_SE_VTX_STATE_CNTL, 0);
+ OUT_BATCH_REGVAL(R200_SE_VTE_CNTL, 0);
+ OUT_BATCH_REGVAL(R200_SE_VTX_FMT_0, R200_VTX_XY);
+ OUT_BATCH_REGVAL(R200_SE_VTX_FMT_1, (2 << R200_VTX_TEX0_COMP_CNT_SHIFT));
+ OUT_BATCH_REGVAL(RADEON_SE_CNTL, (RADEON_DIFFUSE_SHADE_GOURAUD |
+ RADEON_BFACE_SOLID |
+ RADEON_FFACE_SOLID |
+ RADEON_VTX_PIX_CENTER_OGL |
+ RADEON_ROUND_MODE_ROUND |
+ RADEON_ROUND_PREC_4TH_PIX));
+ END_BATCH();
+}
+
+static void inline emit_tx_setup(struct r200_context *r200,
+ gl_format mesa_format,
+ struct radeon_bo *bo,
+ intptr_t offset,
+ unsigned width,
+ unsigned height,
+ unsigned pitch)
+{
+ uint32_t txformat = R200_TXFORMAT_NON_POWER2;
+ BATCH_LOCALS(&r200->radeon);
+
+ assert(width <= 2047);
+ assert(height <= 2047);
+ assert(offset % 32 == 0);
+
+ /* XXX others? BE/LE? */
+ switch (mesa_format) {
+ case MESA_FORMAT_ARGB8888:
+ txformat |= R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP;
+ break;
+ case MESA_FORMAT_XRGB8888:
+ txformat |= R200_TXFORMAT_ARGB8888;
+ break;
+ case MESA_FORMAT_RGB565:
+ txformat |= R200_TXFORMAT_RGB565;
+ break;
+ case MESA_FORMAT_ARGB4444:
+ txformat |= R200_TXFORMAT_ARGB4444 | R200_TXFORMAT_ALPHA_IN_MAP;
+ break;
+ case MESA_FORMAT_ARGB1555:
+ txformat |= R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP;
+ break;
+ case MESA_FORMAT_A8:
+ txformat |= R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP;
+ break;
+ default:
+ break;
+ }
+
+ BEGIN_BATCH(28);
+ OUT_BATCH_REGVAL(RADEON_PP_CNTL, RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE);
+ OUT_BATCH_REGVAL(R200_PP_CNTL_X, 0);
+ OUT_BATCH_REGVAL(R200_PP_TXMULTI_CTL_0, 0);
+ OUT_BATCH_REGVAL(R200_PP_TXCBLEND_0, (R200_TXC_ARG_A_ZERO |
+ R200_TXC_ARG_B_ZERO |
+ R200_TXC_ARG_C_R0_COLOR |
+ R200_TXC_OP_MADD));
+ OUT_BATCH_REGVAL(R200_PP_TXCBLEND2_0, R200_TXC_CLAMP_0_1 | R200_TXC_OUTPUT_REG_R0);
+ OUT_BATCH_REGVAL(R200_PP_TXABLEND_0, (R200_TXA_ARG_A_ZERO |
+ R200_TXA_ARG_B_ZERO |
+ R200_TXA_ARG_C_R0_ALPHA |
+ R200_TXA_OP_MADD));
+ OUT_BATCH_REGVAL(R200_PP_TXABLEND2_0, R200_TXA_CLAMP_0_1 | R200_TXA_OUTPUT_REG_R0);
+ OUT_BATCH_REGVAL(R200_PP_TXFILTER_0, (R200_CLAMP_S_CLAMP_LAST |
+ R200_CLAMP_T_CLAMP_LAST |
+ R200_MAG_FILTER_NEAREST |
+ R200_MIN_FILTER_NEAREST));
+ OUT_BATCH_REGVAL(R200_PP_TXFORMAT_0, txformat);
+ OUT_BATCH_REGVAL(R200_PP_TXFORMAT_X_0, 0);
+ OUT_BATCH_REGVAL(R200_PP_TXSIZE_0, ((width - 1) |
+ ((height - 1) << RADEON_TEX_VSIZE_SHIFT)));
+ OUT_BATCH_REGVAL(R200_PP_TXPITCH_0, pitch * _mesa_get_format_bytes(mesa_format) - 32);
+
+ OUT_BATCH_REGSEQ(R200_PP_TXOFFSET_0, 1);
+ OUT_BATCH_RELOC(0, bo, 0, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
+
+ END_BATCH();
+}
+
+static inline void emit_cb_setup(struct r200_context *r200,
+ struct radeon_bo *bo,
+ intptr_t offset,
+ gl_format mesa_format,
+ unsigned pitch,
+ unsigned width,
+ unsigned height)
+{
+ uint32_t dst_pitch = pitch;
+ uint32_t dst_format = 0;
+ BATCH_LOCALS(&r200->radeon);
+
+ /* XXX others? BE/LE? */
+ switch (mesa_format) {
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_XRGB8888:
+ dst_format = RADEON_COLOR_FORMAT_ARGB8888;
+ break;
+ case MESA_FORMAT_RGB565:
+ dst_format = RADEON_COLOR_FORMAT_RGB565;
+ break;
+ case MESA_FORMAT_ARGB4444:
+ dst_format = RADEON_COLOR_FORMAT_ARGB4444;
+ break;
+ case MESA_FORMAT_ARGB1555:
+ dst_format = RADEON_COLOR_FORMAT_ARGB1555;
+ break;
+ case MESA_FORMAT_A8:
+ dst_format = RADEON_COLOR_FORMAT_RGB8;
+ break;
+ default:
+ break;
+ }
+
+ BEGIN_BATCH_NO_AUTOSTATE(22);
+ OUT_BATCH_REGVAL(R200_RE_AUX_SCISSOR_CNTL, 0);
+ OUT_BATCH_REGVAL(R200_RE_CNTL, 0);
+ OUT_BATCH_REGVAL(RADEON_RE_TOP_LEFT, 0);
+ OUT_BATCH_REGVAL(RADEON_RE_WIDTH_HEIGHT, ((width << RADEON_RE_WIDTH_SHIFT) |
+ (height << RADEON_RE_HEIGHT_SHIFT)));
+ OUT_BATCH_REGVAL(RADEON_RB3D_PLANEMASK, 0xffffffff);
+ OUT_BATCH_REGVAL(RADEON_RB3D_BLENDCNTL, RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ZERO);
+ OUT_BATCH_REGVAL(RADEON_RB3D_CNTL, dst_format);
+
+ OUT_BATCH_REGSEQ(RADEON_RB3D_COLOROFFSET, 1);
+ OUT_BATCH_RELOC(0, bo, 0, 0, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_BATCH_REGSEQ(RADEON_RB3D_COLORPITCH, 1);
+ OUT_BATCH_RELOC(dst_pitch, bo, dst_pitch, 0, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0);
+
+ END_BATCH();
+}
+
+static GLboolean validate_buffers(struct r200_context *r200,
+ struct radeon_bo *src_bo,
+ struct radeon_bo *dst_bo)
+{
+ int ret;
+ radeon_cs_space_add_persistent_bo(r200->radeon.cmdbuf.cs,
+ src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+
+ radeon_cs_space_add_persistent_bo(r200->radeon.cmdbuf.cs,
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+
+ ret = radeon_cs_space_check_with_bo(r200->radeon.cmdbuf.cs,
+ first_elem(&r200->radeon.dma.reserved)->bo,
+ RADEON_GEM_DOMAIN_GTT, 0);
+ if (ret)
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
+
+/**
+ * Calculate texcoords for given image region.
+ * Output values are [minx, maxx, miny, maxy]
+ */
+static inline void calc_tex_coords(float img_width, float img_height,
+ float x, float y,
+ float reg_width, float reg_height,
+ unsigned flip_y, float *buf)
+{
+ buf[0] = x / img_width;
+ buf[1] = buf[0] + reg_width / img_width;
+ buf[2] = y / img_height;
+ buf[3] = buf[2] + reg_height / img_height;
+ if (flip_y)
+ {
+ buf[2] = 1.0 - buf[2];
+ buf[3] = 1.0 - buf[3];
+ }
+}
+
+static inline void emit_draw_packet(struct r200_context *r200,
+ unsigned src_width, unsigned src_height,
+ unsigned src_x_offset, unsigned src_y_offset,
+ unsigned dst_x_offset, unsigned dst_y_offset,
+ unsigned reg_width, unsigned reg_height,
+ unsigned flip_y)
+{
+ float texcoords[4];
+ float verts[12];
+ BATCH_LOCALS(&r200->radeon);
+
+ calc_tex_coords(src_width, src_height,
+ src_x_offset, src_y_offset,
+ reg_width, reg_height,
+ flip_y, texcoords);
+
+ verts[0] = dst_x_offset;
+ verts[1] = dst_y_offset + reg_height;
+ verts[2] = texcoords[0];
+ verts[3] = texcoords[3];
+
+ verts[4] = dst_x_offset + reg_width;
+ verts[5] = dst_y_offset + reg_height;
+ verts[6] = texcoords[1];
+ verts[7] = texcoords[3];
+
+ verts[8] = dst_x_offset + reg_width;
+ verts[9] = dst_y_offset;
+ verts[10] = texcoords[1];
+ verts[11] = texcoords[2];
+
+ BEGIN_BATCH(14);
+ OUT_BATCH(R200_CP_CMD_3D_DRAW_IMMD_2 | (12 << 16));
+ OUT_BATCH(RADEON_CP_VC_CNTL_PRIM_WALK_RING |
+ RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST |
+ (3 << 16));
+ OUT_BATCH_TABLE(verts, 12);
+ END_BATCH();
+}
+
+/**
+ * Copy a region of [@a width x @a height] pixels from source buffer
+ * to destination buffer.
+ * @param[in] r200 r200 context
+ * @param[in] src_bo source radeon buffer object
+ * @param[in] src_offset offset of the source image in the @a src_bo
+ * @param[in] src_mesaformat source image format
+ * @param[in] src_pitch aligned source image width
+ * @param[in] src_width source image width
+ * @param[in] src_height source image height
+ * @param[in] src_x_offset x offset in the source image
+ * @param[in] src_y_offset y offset in the source image
+ * @param[in] dst_bo destination radeon buffer object
+ * @param[in] dst_offset offset of the destination image in the @a dst_bo
+ * @param[in] dst_mesaformat destination image format
+ * @param[in] dst_pitch aligned destination image width
+ * @param[in] dst_width destination image width
+ * @param[in] dst_height destination image height
+ * @param[in] dst_x_offset x offset in the destination image
+ * @param[in] dst_y_offset y offset in the destination image
+ * @param[in] width region width
+ * @param[in] height region height
+ * @param[in] flip_y set if y coords of the source image need to be flipped
+ */
+unsigned r200_blit(GLcontext *ctx,
+ struct radeon_bo *src_bo,
+ intptr_t src_offset,
+ gl_format src_mesaformat,
+ unsigned src_pitch,
+ unsigned src_width,
+ unsigned src_height,
+ unsigned src_x_offset,
+ unsigned src_y_offset,
+ struct radeon_bo *dst_bo,
+ intptr_t dst_offset,
+ gl_format dst_mesaformat,
+ unsigned dst_pitch,
+ unsigned dst_width,
+ unsigned dst_height,
+ unsigned dst_x_offset,
+ unsigned dst_y_offset,
+ unsigned reg_width,
+ unsigned reg_height,
+ unsigned flip_y)
+{
+ struct r200_context *r200 = R200_CONTEXT(ctx);
+
+ if (!is_blit_supported(dst_mesaformat))
+ return GL_FALSE;
+
+ /* Make sure that colorbuffer has even width - hw limitation */
+ if (dst_pitch % 2 > 0)
+ ++dst_pitch;
+
+ /* Rendering to small buffer doesn't work.
+ * Looks like a hw limitation.
+ */
+ if (dst_pitch < 32)
+ return GL_FALSE;
+
+ /* Need to clamp the region size to make sure
+ * we don't read outside of the source buffer
+ * or write outside of the destination buffer.
+ */
+ if (reg_width + src_x_offset > src_width)
+ reg_width = src_width - src_x_offset;
+ if (reg_height + src_y_offset > src_height)
+ reg_height = src_height - src_y_offset;
+ if (reg_width + dst_x_offset > dst_width)
+ reg_width = dst_width - dst_x_offset;
+ if (reg_height + dst_y_offset > dst_height)
+ reg_height = dst_height - dst_y_offset;
+
+ if (src_bo == dst_bo) {
+ return GL_FALSE;
+ }
+
+ if (src_offset % 32 || dst_offset % 32) {
+ return GL_FALSE;
+ }
+
+ if (0) {
+ fprintf(stderr, "src: size [%d x %d], pitch %d, "
+ "offset [%d x %d], format %s, bo %p\n",
+ src_width, src_height, src_pitch,
+ src_x_offset, src_y_offset,
+ _mesa_get_format_name(src_mesaformat),
+ src_bo);
+ fprintf(stderr, "dst: pitch %d, offset[%d x %d], format %s, bo %p\n",
+ dst_pitch, dst_x_offset, dst_y_offset,
+ _mesa_get_format_name(dst_mesaformat), dst_bo);
+ fprintf(stderr, "region: %d x %d\n", reg_width, reg_height);
+ }
+
+ /* Flush is needed to make sure that source buffer has correct data */
+ radeonFlush(r200->radeon.glCtx);
+
+ rcommonEnsureCmdBufSpace(&r200->radeon, 78, __FUNCTION__);
+
+ if (!validate_buffers(r200, src_bo, dst_bo))
+ return GL_FALSE;
+
+ /* 14 */
+ emit_vtx_state(r200);
+ /* 28 */
+ emit_tx_setup(r200, src_mesaformat, src_bo, src_offset, src_width, src_height, src_pitch);
+ /* 22 */
+ emit_cb_setup(r200, dst_bo, dst_offset, dst_mesaformat, dst_pitch, dst_width, dst_height);
+ /* 14 */
+ emit_draw_packet(r200, src_width, src_height,
+ src_x_offset, src_y_offset,
+ dst_x_offset, dst_y_offset,
+ reg_width, reg_height,
+ flip_y);
+
+ radeonFlush(ctx);
+
+ return GL_TRUE;
+}
diff --git a/src/mesa/drivers/dri/r200/r200_blit.h b/src/mesa/drivers/dri/r200/r200_blit.h
new file mode 100644
index 00000000000..38487266ae1
--- /dev/null
+++ b/src/mesa/drivers/dri/r200/r200_blit.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2009 Maciej Cencora <m.cencora@gmail.com>
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef R200_BLIT_H
+#define R200_BLIT_H
+
+void r200_blit_init(struct r200_context *r200);
+
+unsigned r200_blit(GLcontext *ctx,
+ struct radeon_bo *src_bo,
+ intptr_t src_offset,
+ gl_format src_mesaformat,
+ unsigned src_pitch,
+ unsigned src_width,
+ unsigned src_height,
+ unsigned src_x_offset,
+ unsigned src_y_offset,
+ struct radeon_bo *dst_bo,
+ intptr_t dst_offset,
+ gl_format dst_mesaformat,
+ unsigned dst_pitch,
+ unsigned dst_width,
+ unsigned dst_height,
+ unsigned dst_x_offset,
+ unsigned dst_y_offset,
+ unsigned width,
+ unsigned height,
+ unsigned flip_y);
+
+#endif // R200_BLIT_H
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 5f985d624d8..453c8de2200 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -61,6 +61,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r200_maos.h"
#include "r200_vertprog.h"
#include "radeon_queryobj.h"
+#include "r200_blit.h"
#include "radeon_span.h"
@@ -268,16 +269,17 @@ static void r200_init_vtbl(radeonContextPtr radeon)
radeon->vtbl.fallback = r200Fallback;
radeon->vtbl.update_scissor = r200_vtbl_update_scissor;
radeon->vtbl.emit_query_finish = r200_emit_query_finish;
+ radeon->vtbl.blit = r200_blit;
}
/* Create the device specific rendering context.
*/
GLboolean r200CreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private);
struct dd_function_table functions;
r200ContextPtr rmesa;
@@ -294,6 +296,7 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
if ( !rmesa )
return GL_FALSE;
+ rmesa->radeon.radeonScreen = screen;
r200_init_vtbl(&rmesa->radeon);
/* init exp fog table data */
r200InitStaticFogData();
@@ -326,7 +329,7 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
r200InitDriverFuncs(&functions);
r200InitIoctlFuncs(&functions);
r200InitStateFuncs(&functions);
- r200InitTextureFuncs(&functions);
+ r200InitTextureFuncs(&rmesa->radeon, &functions);
r200InitShaderFuncs(&functions);
radeonInitQueryObjFunctions(&functions);
@@ -496,7 +499,7 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual,
}
-void r200DestroyContext( __DRIcontextPrivate *driContextPriv )
+void r200DestroyContext( __DRIcontext *driContextPriv )
{
int i;
r200ContextPtr rmesa = (r200ContextPtr)driContextPriv->driverPrivate;
diff --git a/src/mesa/drivers/dri/r200/r200_context.h b/src/mesa/drivers/dri/r200/r200_context.h
index 246f98c6dc5..a9dce310ae1 100644
--- a/src/mesa/drivers/dri/r200/r200_context.h
+++ b/src/mesa/drivers/dri/r200/r200_context.h
@@ -636,14 +636,16 @@ struct r200_context {
#define R200_CONTEXT(ctx) ((r200ContextPtr)(ctx->DriverCtx))
-extern void r200DestroyContext( __DRIcontextPrivate *driContextPriv );
+extern void r200DestroyContext( __DRIcontext *driContextPriv );
extern GLboolean r200CreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate);
-extern GLboolean r200MakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv );
-extern GLboolean r200UnbindContext( __DRIcontextPrivate *driContextPriv );
+extern GLboolean r200MakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv );
+extern GLboolean r200UnbindContext( __DRIcontext *driContextPriv );
+
+extern void r200_init_texcopy_functions(struct dd_function_table *table);
/* ================================================================
* Debugging:
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c
index b238adb9721..66c5d3655a9 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.c
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.c
@@ -61,7 +61,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
static void r200KernelClear(GLcontext *ctx, GLuint flags)
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
GLint cx, cy, cw, ch, ret;
GLuint i;
@@ -185,7 +185,7 @@ static void r200KernelClear(GLcontext *ctx, GLuint flags)
static void r200Clear( GLcontext *ctx, GLbitfield mask )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
GLuint flags = 0;
GLuint color_mask = 0;
GLuint orig_mask = mask;
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_pixel.c b/src/mesa/drivers/dri/r200/r200_pixel.c
index 95773871e02..bfb7e2a2ed3 100644
--- a/src/mesa/drivers/dri/r200/r200_pixel.c
+++ b/src/mesa/drivers/dri/r200/r200_pixel.c
@@ -88,10 +88,10 @@ check_color_per_fragment_ops( const GLcontext *ctx )
ctx->Fog.Enabled ||
ctx->Scissor.Enabled ||
ctx->Stencil._Enabled ||
- !ctx->Color.ColorMask[0] ||
- !ctx->Color.ColorMask[1] ||
- !ctx->Color.ColorMask[2] ||
- !ctx->Color.ColorMask[3] ||
+ !ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3] ||
ctx->Color.ColorLogicOpEnabled ||
ctx->Texture._EnabledUnits
) &&
@@ -214,7 +214,7 @@ r200TryReadPixels( GLcontext *ctx,
}
{
- __DRIdrawablePrivate *dPriv = rmesa->radeon.dri.drawable;
+ __DRIdrawable *dPriv = rmesa->radeon.dri.drawable;
driRenderbuffer *drb = (driRenderbuffer *) ctx->ReadBuffer->_ColorReadBuffer;
int nbox = dPriv->numClipRects;
int src_offset = drb->offset
@@ -298,7 +298,7 @@ static void do_draw_pix( GLcontext *ctx,
#if 0
r200ContextPtr rmesa = R200_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
drm_clip_rect_t *box = dPriv->pClipRects;
struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorDrawBuffers[0];
driRenderbuffer *drb = (driRenderbuffer *) rb;
@@ -400,10 +400,10 @@ r200TryDrawPixels( GLcontext *ctx,
case GL_RGBA:
case GL_BGRA:
planemask = radeonPackColor(cpp,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP]);
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP]);
if (cpp == 2)
planemask |= planemask << 16;
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index 6d99c039ded..7fe482fe15f 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -721,10 +721,10 @@ static void r200ColorMask( GLcontext *ctx,
if (!rrb)
return;
mask = radeonPackColor( rrb->cpp,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP] );
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP] );
if (!(r && g && b && a))
@@ -1585,7 +1585,7 @@ static void r200ClearStencil( GLcontext *ctx, GLint s )
void r200UpdateWindow( GLcontext *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0;
GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0;
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -1665,7 +1665,7 @@ static void r200DepthRange( GLcontext *ctx, GLclampd nearval,
void r200UpdateViewportOffset( GLcontext *ctx )
{
r200ContextPtr rmesa = R200_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
GLfloat xoffset = (GLfloat)dPriv->x;
GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h;
const GLfloat *v = ctx->Viewport._WindowMap.m;
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_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index a4177215537..0916df64765 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -378,7 +378,7 @@ static void r200TexParameter( GLcontext *ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- r200SetTexBorderColor( t, texObj->BorderColor );
+ r200SetTexBorderColor( t, texObj->BorderColor.f );
break;
case GL_TEXTURE_BASE_LEVEL:
@@ -470,14 +470,14 @@ static struct gl_texture_object *r200NewTextureObject(GLcontext * ctx,
r200SetTexWrap( t, t->base.WrapS, t->base.WrapT, t->base.WrapR );
r200SetTexMaxAnisotropy( t, t->base.MaxAnisotropy );
r200SetTexFilter(t, t->base.MinFilter, t->base.MagFilter);
- r200SetTexBorderColor(t, t->base.BorderColor);
+ r200SetTexBorderColor(t, t->base.BorderColor.f);
return &t->base;
}
-void r200InitTextureFuncs( struct dd_function_table *functions )
+void r200InitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *functions )
{
/* Note: we only plug in the functions we implement in the driver
* since _mesa_init_driver_functions() was already called.
@@ -511,6 +511,11 @@ void r200InitTextureFuncs( struct dd_function_table *functions )
functions->CompressedTexImage2D = radeonCompressedTexImage2D;
functions->CompressedTexSubImage2D = radeonCompressedTexSubImage2D;
+ if (radeon->radeonScreen->kernel_mm) {
+ functions->CopyTexImage2D = radeonCopyTexImage2D;
+ functions->CopyTexSubImage2D = radeonCopyTexSubImage2D;
+ }
+
functions->GenerateMipmap = radeonGenerateMipmap;
functions->NewTextureImage = radeonNewTextureImage;
diff --git a/src/mesa/drivers/dri/r200/r200_tex.h b/src/mesa/drivers/dri/r200/r200_tex.h
index e122de6e5ed..1a1e7038df6 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.h
+++ b/src/mesa/drivers/dri/r200/r200_tex.h
@@ -48,7 +48,7 @@ extern int r200UploadTexImages( r200ContextPtr rmesa, radeonTexObjPtr t, GLuint
extern void r200DestroyTexObj( r200ContextPtr rmesa, radeonTexObjPtr t );
-extern void r200InitTextureFuncs( struct dd_function_table *functions );
+extern void r200InitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *functions );
extern void r200UpdateFragmentShader( GLcontext *ctx );
diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c
index 7782404a794..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);
diff --git a/src/mesa/drivers/dri/r200/radeon_tex_copy.c b/src/mesa/drivers/dri/r200/radeon_tex_copy.c
new file mode 120000
index 00000000000..dfa5ba34e65
--- /dev/null
+++ b/src/mesa/drivers/dri/r200/radeon_tex_copy.c
@@ -0,0 +1 @@
+../radeon/radeon_tex_copy.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r200/server/radeon_egl.c b/src/mesa/drivers/dri/r200/server/radeon_egl.c
deleted file mode 120000
index d7735a76438..00000000000
--- a/src/mesa/drivers/dri/r200/server/radeon_egl.c
+++ /dev/null
@@ -1 +0,0 @@
-../../radeon/server/radeon_egl.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/Makefile b/src/mesa/drivers/dri/r300/Makefile
index f87a6dd2ddc..04459c2ddfa 100644
--- a/src/mesa/drivers/dri/r300/Makefile
+++ b/src/mesa/drivers/dri/r300/Makefile
@@ -9,10 +9,6 @@ LIBNAME = r300_dri.so
MINIGLX_SOURCES = server/radeon_dri.c
-ifeq ($(USING_EGL), 1)
-EGL_SOURCES = server/radeon_egl.c
-endif
-
ifeq ($(RADEON_LDFLAGS),)
CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c
endif
@@ -39,13 +35,14 @@ RADEON_COMMON_SOURCES = \
radeon_mipmap_tree.c \
radeon_span.c \
radeon_queryobj.c \
- radeon_texture.c
+ radeon_texture.c \
+ radeon_tex_copy.c
DRIVER_SOURCES = \
radeon_screen.c \
+ r300_blit.c \
r300_context.c \
r300_draw.c \
- r300_ioctl.c \
r300_cmdbuf.c \
r300_state.c \
r300_render.c \
@@ -65,7 +62,6 @@ C_SOURCES = $(COMMON_SOURCES) $(DRIVER_SOURCES)
DRIVER_DEFINES = -DRADEON_R300
# -DRADEON_BO_TRACK \
- -Wall
DRI_LIB_DEPS += $(RADEON_LDFLAGS)
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_code.h b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
index 902b7cfa53b..6d979bbaecf 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_code.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_code.h
@@ -59,7 +59,9 @@ enum {
RC_STATE_SHADOW_AMBIENT = 0,
RC_STATE_R300_WINDOW_DIMENSION,
- RC_STATE_R300_TEXRECT_FACTOR
+ RC_STATE_R300_TEXRECT_FACTOR,
+ RC_STATE_R300_VIEWPORT_SCALE,
+ RC_STATE_R300_VIEWPORT_OFFSET
};
struct rc_constant {
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
index 41ea23ee327..272f9072d4a 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c
@@ -229,7 +229,8 @@ void rc_copy_output(struct radeon_compiler * c, unsigned output, unsigned dup_ou
/**
* Introduce standard code fragment to deal with fragment.position.
*/
-void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsigned new_input)
+void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsigned new_input,
+ int full_vtransform)
{
unsigned tempregi = rc_find_free_temporary(c);
struct rc_instruction * inst_rcp;
@@ -279,13 +280,19 @@ void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsig
inst_mad->U.I.SrcReg[0].Swizzle = RC_MAKE_SWIZZLE(RC_SWIZZLE_X, RC_SWIZZLE_Y, RC_SWIZZLE_Z, RC_SWIZZLE_ZERO);
inst_mad->U.I.SrcReg[1].File = RC_FILE_CONSTANT;
- inst_mad->U.I.SrcReg[1].Index = rc_constants_add_state(&c->Program.Constants, RC_STATE_R300_WINDOW_DIMENSION, 0);
inst_mad->U.I.SrcReg[1].Swizzle = RC_MAKE_SWIZZLE(RC_SWIZZLE_X, RC_SWIZZLE_Y, RC_SWIZZLE_Z, RC_SWIZZLE_ZERO);
inst_mad->U.I.SrcReg[2].File = RC_FILE_CONSTANT;
- inst_mad->U.I.SrcReg[2].Index = inst_mad->U.I.SrcReg[1].Index;
inst_mad->U.I.SrcReg[2].Swizzle = RC_MAKE_SWIZZLE(RC_SWIZZLE_X, RC_SWIZZLE_Y, RC_SWIZZLE_Z, RC_SWIZZLE_ZERO);
+ if (full_vtransform) {
+ inst_mad->U.I.SrcReg[1].Index = rc_constants_add_state(&c->Program.Constants, RC_STATE_R300_VIEWPORT_SCALE, 0);
+ inst_mad->U.I.SrcReg[2].Index = rc_constants_add_state(&c->Program.Constants, RC_STATE_R300_VIEWPORT_OFFSET, 0);
+ } else {
+ inst_mad->U.I.SrcReg[1].Index =
+ inst_mad->U.I.SrcReg[2].Index = rc_constants_add_state(&c->Program.Constants, RC_STATE_R300_WINDOW_DIMENSION, 0);
+ }
+
for (inst = inst_mad->Next; inst != &c->Program.Instructions; inst = inst->Next) {
const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode);
unsigned i;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
index 87a732cd90d..f27f858652e 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.h
@@ -23,6 +23,8 @@
#ifndef RADEON_COMPILER_H
#define RADEON_COMPILER_H
+#include "../../../../main/compiler.h"
+
#include "memory_pool.h"
#include "radeon_code.h"
#include "radeon_program.h"
@@ -73,7 +75,8 @@ void rc_calculate_inputs_outputs(struct radeon_compiler * c);
void rc_move_input(struct radeon_compiler * c, unsigned input, struct rc_src_register new_input);
void rc_move_output(struct radeon_compiler * c, unsigned output, unsigned new_output, unsigned writemask);
void rc_copy_output(struct radeon_compiler * c, unsigned output, unsigned dup_output);
-void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsigned new_input);
+void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsigned new_input,
+ int full_vtransform);
struct r300_fragment_program_compiler {
struct radeon_compiler Base;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
index 828d0c8e28e..b2fe7f76b2f 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_pair_regalloc.c
@@ -49,7 +49,7 @@ struct register_info {
unsigned int Used:1;
unsigned int Allocated:1;
- rc_register_file File:3;
+ unsigned int File:3;
unsigned int Index:RC_REGISTER_INDEX_BITS;
};
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.h b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
index 03592884eb2..e3188676965 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.h
@@ -39,7 +39,7 @@
struct radeon_compiler;
struct rc_src_register {
- rc_register_file File:3;
+ unsigned int File:3;
/** Negative values may be used for relative addressing. */
signed int Index:(RC_REGISTER_INDEX_BITS+1);
@@ -55,7 +55,7 @@ struct rc_src_register {
};
struct rc_dst_register {
- rc_register_file File:3;
+ unsigned int File:3;
/** Negative values may be used for relative addressing. */
signed int Index:(RC_REGISTER_INDEX_BITS+1);
@@ -79,20 +79,20 @@ struct rc_sub_instruction {
/**
* Opcode of this instruction, according to \ref rc_opcode enums.
*/
- rc_opcode Opcode:8;
+ unsigned int Opcode:8;
/**
* Saturate each value of the result to the range [0,1] or [-1,1],
* according to \ref rc_saturate_mode enums.
*/
- rc_saturate_mode SaturateMode:2;
+ unsigned int SaturateMode:2;
/**
* Writing to the special register RC_SPECIAL_ALU_RESULT
*/
/*@{*/
- rc_write_aluresult WriteALUResult:2;
- rc_compare_func ALUResultCompare:3;
+ unsigned int WriteALUResult:2;
+ unsigned int ALUResultCompare:3;
/*@}*/
/**
@@ -103,7 +103,7 @@ struct rc_sub_instruction {
unsigned int TexSrcUnit:5;
/** Source texture target, one of the \ref rc_texture_target enums */
- rc_texture_target TexSrcTarget:3;
+ unsigned int TexSrcTarget:3;
/** True if tex instruction should do shadow comparison */
unsigned int TexShadow:1;
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
index 16005984287..6685ade3ea8 100644
--- a/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
+++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_pair.h
@@ -52,12 +52,12 @@ struct r300_fragment_program_compiler;
struct radeon_pair_instruction_source {
unsigned int Used:1;
- rc_register_file File:3;
+ unsigned int File:3;
unsigned int Index:RC_REGISTER_INDEX_BITS;
};
struct radeon_pair_instruction_rgb {
- rc_opcode Opcode:8;
+ unsigned int Opcode:8;
unsigned int DestIndex:RC_REGISTER_INDEX_BITS;
unsigned int WriteMask:3;
unsigned int OutputWriteMask:3;
@@ -74,7 +74,7 @@ struct radeon_pair_instruction_rgb {
};
struct radeon_pair_instruction_alpha {
- rc_opcode Opcode:8;
+ unsigned int Opcode:8;
unsigned int DestIndex:RC_REGISTER_INDEX_BITS;
unsigned int WriteMask:1;
unsigned int OutputWriteMask:1;
@@ -95,8 +95,8 @@ struct rc_pair_instruction {
struct radeon_pair_instruction_rgb RGB;
struct radeon_pair_instruction_alpha Alpha;
- rc_write_aluresult WriteALUResult:2;
- rc_compare_func ALUResultCompare:3;
+ unsigned int WriteALUResult:2;
+ unsigned int ALUResultCompare:3;
};
diff --git a/src/mesa/drivers/dri/r300/r300_blit.c b/src/mesa/drivers/dri/r300/r300_blit.c
new file mode 100644
index 00000000000..e24c7955d4b
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/r300_blit.c
@@ -0,0 +1,648 @@
+/*
+ * Copyright (C) 2009 Maciej Cencora <m.cencora@gmail.com>
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "radeon_common.h"
+#include "r300_context.h"
+
+#include "r300_blit.h"
+#include "r300_cmdbuf.h"
+#include "r300_emit.h"
+#include "r300_tex.h"
+#include "compiler/radeon_compiler.h"
+#include "compiler/radeon_opcodes.h"
+
+static void vp_ins_outs(struct r300_vertex_program_compiler *c)
+{
+ c->code->inputs[VERT_ATTRIB_POS] = 0;
+ c->code->inputs[VERT_ATTRIB_TEX0] = 1;
+ c->code->outputs[VERT_RESULT_HPOS] = 0;
+ c->code->outputs[VERT_RESULT_TEX0] = 1;
+}
+
+static void fp_allocate_hw_inputs(
+ struct r300_fragment_program_compiler * c,
+ void (*allocate)(void * data, unsigned input, unsigned hwreg),
+ void * mydata)
+{
+ allocate(mydata, FRAG_ATTRIB_TEX0, 0);
+}
+
+static void create_vertex_program(struct r300_context *r300)
+{
+ struct r300_vertex_program_compiler compiler;
+ struct rc_instruction *inst;
+
+ rc_init(&compiler.Base);
+
+ inst = rc_insert_new_instruction(&compiler.Base, compiler.Base.Program.Instructions.Prev);
+ inst->U.I.Opcode = RC_OPCODE_MOV;
+ inst->U.I.DstReg.File = RC_FILE_OUTPUT;
+ inst->U.I.DstReg.Index = VERT_RESULT_HPOS;
+ inst->U.I.DstReg.RelAddr = 0;
+ inst->U.I.DstReg.WriteMask = RC_MASK_XYZW;
+ inst->U.I.SrcReg[0].Abs = 0;
+ inst->U.I.SrcReg[0].File = RC_FILE_INPUT;
+ inst->U.I.SrcReg[0].Index = VERT_ATTRIB_POS;
+ inst->U.I.SrcReg[0].Negate = 0;
+ inst->U.I.SrcReg[0].RelAddr = 0;
+ inst->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_XYZW;
+
+ inst = rc_insert_new_instruction(&compiler.Base, compiler.Base.Program.Instructions.Prev);
+ inst->U.I.Opcode = RC_OPCODE_MOV;
+ inst->U.I.DstReg.File = RC_FILE_OUTPUT;
+ inst->U.I.DstReg.Index = VERT_RESULT_TEX0;
+ inst->U.I.DstReg.RelAddr = 0;
+ inst->U.I.DstReg.WriteMask = RC_MASK_XYZW;
+ inst->U.I.SrcReg[0].Abs = 0;
+ inst->U.I.SrcReg[0].File = RC_FILE_INPUT;
+ inst->U.I.SrcReg[0].Index = VERT_ATTRIB_TEX0;
+ inst->U.I.SrcReg[0].Negate = 0;
+ inst->U.I.SrcReg[0].RelAddr = 0;
+ inst->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_XYZW;
+
+ compiler.Base.Program.InputsRead = (1 << VERT_ATTRIB_POS) | (1 << VERT_ATTRIB_TEX0);
+ compiler.RequiredOutputs = compiler.Base.Program.OutputsWritten = (1 << VERT_RESULT_HPOS) | (1 << VERT_RESULT_TEX0);
+ compiler.SetHwInputOutput = vp_ins_outs;
+ compiler.code = &r300->blit.vp_code;
+
+ r3xx_compile_vertex_program(&compiler);
+}
+
+static void create_fragment_program(struct r300_context *r300)
+{
+ struct r300_fragment_program_compiler compiler;
+ struct rc_instruction *inst;
+
+ rc_init(&compiler.Base);
+
+ inst = rc_insert_new_instruction(&compiler.Base, compiler.Base.Program.Instructions.Prev);
+ inst->U.I.Opcode = RC_OPCODE_TEX;
+ inst->U.I.TexSrcTarget = RC_TEXTURE_2D;
+ inst->U.I.TexSrcUnit = 0;
+ inst->U.I.DstReg.File = RC_FILE_OUTPUT;
+ inst->U.I.DstReg.Index = FRAG_RESULT_COLOR;
+ inst->U.I.DstReg.WriteMask = RC_MASK_XYZW;
+ inst->U.I.SrcReg[0].Abs = 0;
+ inst->U.I.SrcReg[0].File = RC_FILE_INPUT;
+ inst->U.I.SrcReg[0].Index = FRAG_ATTRIB_TEX0;
+ inst->U.I.SrcReg[0].Negate = 0;
+ inst->U.I.SrcReg[0].RelAddr = 0;
+ inst->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_XYZW;
+
+ compiler.Base.Program.InputsRead = (1 << FRAG_ATTRIB_TEX0);
+ compiler.OutputColor = FRAG_RESULT_COLOR;
+ compiler.OutputDepth = FRAG_RESULT_DEPTH;
+ compiler.is_r500 = (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515);
+ compiler.code = &r300->blit.fp_code;
+ compiler.AllocateHwInputs = fp_allocate_hw_inputs;
+
+ r3xx_compile_fragment_program(&compiler);
+}
+
+void r300_blit_init(struct r300_context *r300)
+{
+ create_vertex_program(r300);
+ create_fragment_program(r300);
+}
+
+static void r300_emit_tx_setup(struct r300_context *r300,
+ gl_format mesa_format,
+ struct radeon_bo *bo,
+ intptr_t offset,
+ unsigned width,
+ unsigned height,
+ unsigned pitch)
+{
+ BATCH_LOCALS(&r300->radeon);
+
+ assert(width <= 2048);
+ assert(height <= 2048);
+ assert(r300TranslateTexFormat(mesa_format) >= 0);
+ assert(offset % 32 == 0);
+
+ BEGIN_BATCH(17);
+ OUT_BATCH_REGVAL(R300_TX_FILTER0_0,
+ (R300_TX_CLAMP_TO_EDGE << R300_TX_WRAP_S_SHIFT) |
+ (R300_TX_CLAMP_TO_EDGE << R300_TX_WRAP_T_SHIFT) |
+ (R300_TX_CLAMP_TO_EDGE << R300_TX_WRAP_R_SHIFT) |
+ R300_TX_MIN_FILTER_MIP_NONE |
+ R300_TX_MIN_FILTER_NEAREST |
+ R300_TX_MAG_FILTER_NEAREST |
+ (0 << 28));
+ OUT_BATCH_REGVAL(R300_TX_FILTER1_0, 0);
+ OUT_BATCH_REGVAL(R300_TX_SIZE_0,
+ ((width-1) << R300_TX_WIDTHMASK_SHIFT) |
+ ((height-1) << R300_TX_HEIGHTMASK_SHIFT) |
+ (0 << R300_TX_DEPTHMASK_SHIFT) |
+ (0 << R300_TX_MAX_MIP_LEVEL_SHIFT) |
+ R300_TX_SIZE_TXPITCH_EN);
+
+ OUT_BATCH_REGVAL(R300_TX_FORMAT_0, r300TranslateTexFormat(mesa_format));
+ OUT_BATCH_REGVAL(R300_TX_FORMAT2_0, pitch - 1);
+ OUT_BATCH_REGSEQ(R300_TX_OFFSET_0, 1);
+ OUT_BATCH_RELOC(0, bo, offset, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
+
+ OUT_BATCH_REGSEQ(R300_TX_INVALTAGS, 2);
+ OUT_BATCH(0);
+ OUT_BATCH(1);
+
+ END_BATCH();
+}
+
+#define EASY_US_FORMAT(FMT, C0, C1, C2, C3, SIGN) \
+ (FMT | R500_C0_SEL_##C0 | R500_C1_SEL_##C1 | \
+ R500_C2_SEL_##C2 | R500_C3_SEL_##C3 | R500_OUT_SIGN(SIGN))
+
+static uint32_t mesa_format_to_us_format(gl_format mesa_format)
+{
+ switch(mesa_format)
+ {
+ case MESA_FORMAT_RGBA8888: // x
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_8, A, B, G, R, 0);
+ case MESA_FORMAT_RGB565: // x
+ case MESA_FORMAT_ARGB1555: // x
+ case MESA_FORMAT_RGBA8888_REV: // x
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_8, R, G, B, A, 0);
+ case MESA_FORMAT_ARGB8888: // x
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_8, B, G, R, A, 0);
+ case MESA_FORMAT_ARGB8888_REV:
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_8, A, R, G, B, 0);
+ case MESA_FORMAT_XRGB8888:
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_8, A, R, G, B, 0);
+
+ case MESA_FORMAT_RGB332:
+ return EASY_US_FORMAT(R500_OUT_FMT_C_3_3_2, A, R, G, B, 0);
+
+ case MESA_FORMAT_RGBA_FLOAT32:
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_32_FP, R, G, B, A, 0);
+ case MESA_FORMAT_RGBA_FLOAT16:
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_16_FP, R, G, B, A, 0);
+ case MESA_FORMAT_ALPHA_FLOAT32:
+ return EASY_US_FORMAT(R500_OUT_FMT_C_32_FP, A, A, A, A, 0);
+ case MESA_FORMAT_ALPHA_FLOAT16:
+ return EASY_US_FORMAT(R500_OUT_FMT_C_16_FP, A, A, A, A, 0);
+
+ case MESA_FORMAT_SIGNED_RGBA8888:
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_8, R, G, B, A, 0xf);
+ case MESA_FORMAT_SIGNED_RGBA8888_REV:
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_8, A, B, G, R, 0xf);
+ case MESA_FORMAT_SIGNED_RGBA_16:
+ return EASY_US_FORMAT(R500_OUT_FMT_C4_16, R, G, B, A, 0xf);
+
+ default:
+ fprintf(stderr, "Unsupported format %s for US output\n", _mesa_get_format_name(mesa_format));
+ assert(0);
+ return 0;
+ }
+}
+#undef EASY_US_FORMAT
+
+static void r500_emit_fp_setup(struct r300_context *r300,
+ struct r500_fragment_program_code *fp,
+ gl_format dst_format)
+{
+ r500_emit_fp(r300, (uint32_t *)fp->inst, (fp->inst_end + 1) * 6, 0, 0, 0);
+ BATCH_LOCALS(&r300->radeon);
+
+ BEGIN_BATCH(10);
+ OUT_BATCH_REGSEQ(R500_US_CODE_ADDR, 3);
+ OUT_BATCH(R500_US_CODE_START_ADDR(0) | R500_US_CODE_END_ADDR(fp->inst_end));
+ OUT_BATCH(R500_US_CODE_RANGE_ADDR(0) | R500_US_CODE_RANGE_SIZE(fp->inst_end));
+ OUT_BATCH(0);
+ OUT_BATCH_REGVAL(R500_US_CONFIG, 0);
+ OUT_BATCH_REGVAL(R500_US_OUT_FMT_0, mesa_format_to_us_format(dst_format));
+ OUT_BATCH_REGVAL(R500_US_PIXSIZE, fp->max_temp_idx);
+ END_BATCH();
+}
+
+static void r500_emit_rs_setup(struct r300_context *r300)
+{
+ BATCH_LOCALS(&r300->radeon);
+
+ BEGIN_BATCH(7);
+ OUT_BATCH_REGSEQ(R300_RS_COUNT, 2);
+ OUT_BATCH((4 << R300_IT_COUNT_SHIFT) | R300_HIRES_EN);
+ OUT_BATCH(0);
+ OUT_BATCH_REGVAL(R500_RS_INST_0,
+ (0 << R500_RS_INST_TEX_ID_SHIFT) |
+ (0 << R500_RS_INST_TEX_ADDR_SHIFT) |
+ R500_RS_INST_TEX_CN_WRITE |
+ R500_RS_INST_COL_CN_NO_WRITE);
+ OUT_BATCH_REGVAL(R500_RS_IP_0,
+ (0 << R500_RS_IP_TEX_PTR_S_SHIFT) |
+ (1 << R500_RS_IP_TEX_PTR_T_SHIFT) |
+ (2 << R500_RS_IP_TEX_PTR_R_SHIFT) |
+ (3 << R500_RS_IP_TEX_PTR_Q_SHIFT));
+ END_BATCH();
+}
+
+static void r300_emit_fp_setup(struct r300_context *r300,
+ struct r300_fragment_program_code *code,
+ gl_format dst_format)
+{
+ unsigned i;
+ BATCH_LOCALS(&r300->radeon);
+
+ BEGIN_BATCH((code->alu.length + 1) * 4 + code->tex.length + 1 + 11);
+
+ OUT_BATCH_REGSEQ(R300_US_ALU_RGB_INST_0, code->alu.length);
+ for (i = 0; i < code->alu.length; i++) {
+ OUT_BATCH(code->alu.inst[i].rgb_inst);
+ }
+ OUT_BATCH_REGSEQ(R300_US_ALU_RGB_ADDR_0, code->alu.length);
+ for (i = 0; i < code->alu.length; i++) {
+ OUT_BATCH(code->alu.inst[i].rgb_addr);
+ }
+ OUT_BATCH_REGSEQ(R300_US_ALU_ALPHA_INST_0, code->alu.length);
+ for (i = 0; i < code->alu.length; i++) {
+ OUT_BATCH(code->alu.inst[i].alpha_inst);
+ }
+ OUT_BATCH_REGSEQ(R300_US_ALU_ALPHA_ADDR_0, code->alu.length);
+ for (i = 0; i < code->alu.length; i++) {
+ OUT_BATCH(code->alu.inst[i].alpha_addr);
+ }
+
+ OUT_BATCH_REGSEQ(R300_US_TEX_INST_0, code->tex.length);
+ OUT_BATCH_TABLE(code->tex.inst, code->tex.length);
+
+ OUT_BATCH_REGSEQ(R300_US_CONFIG, 3);
+ OUT_BATCH(R300_PFS_CNTL_FIRST_NODE_HAS_TEX);
+ OUT_BATCH(code->pixsize);
+ OUT_BATCH(code->code_offset);
+ OUT_BATCH_REGSEQ(R300_US_CODE_ADDR_0, 4);
+ OUT_BATCH_TABLE(code->code_addr, 4);
+ OUT_BATCH_REGVAL(R500_US_OUT_FMT_0, mesa_format_to_us_format(dst_format));
+ END_BATCH();
+}
+
+static void r300_emit_rs_setup(struct r300_context *r300)
+{
+ BATCH_LOCALS(&r300->radeon);
+
+ BEGIN_BATCH(7);
+ OUT_BATCH_REGSEQ(R300_RS_COUNT, 2);
+ OUT_BATCH((4 << R300_IT_COUNT_SHIFT) | R300_HIRES_EN);
+ OUT_BATCH(0);
+ OUT_BATCH_REGVAL(R300_RS_INST_0,
+ R300_RS_INST_TEX_ID(0) |
+ R300_RS_INST_TEX_ADDR(0) |
+ R300_RS_INST_TEX_CN_WRITE);
+ OUT_BATCH_REGVAL(R300_RS_IP_0,
+ R300_RS_TEX_PTR(0) |
+ R300_RS_SEL_S(R300_RS_SEL_C0) |
+ R300_RS_SEL_T(R300_RS_SEL_C1) |
+ R300_RS_SEL_R(R300_RS_SEL_K0) |
+ R300_RS_SEL_Q(R300_RS_SEL_K1));
+ END_BATCH();
+}
+
+static void emit_pvs_setup(struct r300_context *r300,
+ uint32_t *vp_code,
+ unsigned vp_len)
+{
+ BATCH_LOCALS(&r300->radeon);
+
+ r300_emit_vpu(r300, vp_code, vp_len * 4, R300_PVS_CODE_START);
+
+ BEGIN_BATCH(4);
+ OUT_BATCH_REGSEQ(R300_VAP_PVS_CODE_CNTL_0, 3);
+ OUT_BATCH((0 << R300_PVS_FIRST_INST_SHIFT) |
+ ((vp_len - 1) << R300_PVS_XYZW_VALID_INST_SHIFT) |
+ ((vp_len - 1)<< R300_PVS_LAST_INST_SHIFT));
+ OUT_BATCH(0);
+ OUT_BATCH((vp_len - 1) << R300_PVS_LAST_VTX_SRC_INST_SHIFT);
+ END_BATCH();
+}
+
+static void emit_vap_setup(struct r300_context *r300)
+{
+ BATCH_LOCALS(&r300->radeon);
+
+ BEGIN_BATCH(12);
+ OUT_BATCH_REGSEQ(R300_SE_VTE_CNTL, 2);
+ OUT_BATCH(R300_VTX_XY_FMT | R300_VTX_Z_FMT);
+ OUT_BATCH(4);
+
+ OUT_BATCH_REGVAL(R300_VAP_PSC_SGN_NORM_CNTL, 0xaaaaaaaa);
+ OUT_BATCH_REGVAL(R300_VAP_PROG_STREAM_CNTL_0,
+ ((R300_DATA_TYPE_FLOAT_2 | (0 << R300_DST_VEC_LOC_SHIFT)) << 0) |
+ (((1 << R300_DST_VEC_LOC_SHIFT) | R300_DATA_TYPE_FLOAT_2 | R300_LAST_VEC) << 16));
+ OUT_BATCH_REGVAL(R300_VAP_PROG_STREAM_CNTL_EXT_0,
+ ((((R300_SWIZZLE_SELECT_X << R300_SWIZZLE_SELECT_X_SHIFT) |
+ (R300_SWIZZLE_SELECT_Y << R300_SWIZZLE_SELECT_Y_SHIFT) |
+ (R300_SWIZZLE_SELECT_FP_ZERO << R300_SWIZZLE_SELECT_Z_SHIFT) |
+ (R300_SWIZZLE_SELECT_FP_ONE << R300_SWIZZLE_SELECT_W_SHIFT) |
+ (0xf << R300_WRITE_ENA_SHIFT) ) << 0) |
+ (((R300_SWIZZLE_SELECT_X << R300_SWIZZLE_SELECT_X_SHIFT) |
+ (R300_SWIZZLE_SELECT_Y << R300_SWIZZLE_SELECT_Y_SHIFT) |
+ (R300_SWIZZLE_SELECT_FP_ZERO << R300_SWIZZLE_SELECT_Z_SHIFT) |
+ (R300_SWIZZLE_SELECT_FP_ONE << R300_SWIZZLE_SELECT_W_SHIFT) |
+ (0xf << R300_WRITE_ENA_SHIFT) ) << 16) ) );
+ OUT_BATCH_REGSEQ(R300_VAP_OUTPUT_VTX_FMT_0, 2);
+ OUT_BATCH(R300_VAP_OUTPUT_VTX_FMT_0__POS_PRESENT);
+ OUT_BATCH(R300_VAP_OUTPUT_VTX_FMT_1__4_COMPONENTS);
+ END_BATCH();
+}
+
+static GLboolean validate_buffers(struct r300_context *r300,
+ struct radeon_bo *src_bo,
+ struct radeon_bo *dst_bo)
+{
+ int ret;
+ radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs,
+ src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+
+ radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs,
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+
+ ret = radeon_cs_space_check_with_bo(r300->radeon.cmdbuf.cs,
+ first_elem(&r300->radeon.dma.reserved)->bo,
+ RADEON_GEM_DOMAIN_GTT, 0);
+ if (ret)
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
+
+/**
+ * Calculate texcoords for given image region.
+ * Output values are [minx, maxx, miny, maxy]
+ */
+static void calc_tex_coords(float img_width, float img_height,
+ float x, float y,
+ float reg_width, float reg_height,
+ unsigned flip_y, float *buf)
+{
+ buf[0] = x / img_width;
+ buf[1] = buf[0] + reg_width / img_width;
+ buf[2] = y / img_height;
+ buf[3] = buf[2] + reg_height / img_height;
+ if (flip_y)
+ {
+ buf[2] = 1.0 - buf[2];
+ buf[3] = 1.0 - buf[3];
+ }
+}
+
+static void emit_draw_packet(struct r300_context *r300,
+ unsigned src_width, unsigned src_height,
+ unsigned src_x_offset, unsigned src_y_offset,
+ unsigned dst_x_offset, unsigned dst_y_offset,
+ unsigned reg_width, unsigned reg_height,
+ unsigned flip_y)
+{
+ float texcoords[4];
+
+ calc_tex_coords(src_width, src_height,
+ src_x_offset, src_y_offset,
+ reg_width, reg_height,
+ flip_y, texcoords);
+
+ float verts[] = { dst_x_offset, dst_y_offset,
+ texcoords[0], texcoords[2],
+ dst_x_offset, dst_y_offset + reg_height,
+ texcoords[0], texcoords[3],
+ dst_x_offset + reg_width, dst_y_offset + reg_height,
+ texcoords[1], texcoords[3],
+ dst_x_offset + reg_width, dst_y_offset,
+ texcoords[1], texcoords[2] };
+
+ BATCH_LOCALS(&r300->radeon);
+
+ BEGIN_BATCH(19);
+ OUT_BATCH_PACKET3(R300_PACKET3_3D_DRAW_IMMD_2, 16);
+ OUT_BATCH(R300_VAP_VF_CNTL__PRIM_WALK_VERTEX_EMBEDDED |
+ (4 << 16) | R300_VAP_VF_CNTL__PRIM_QUADS);
+ OUT_BATCH_TABLE(verts, 16);
+ END_BATCH();
+}
+
+static void other_stuff(struct r300_context *r300)
+{
+ BATCH_LOCALS(&r300->radeon);
+
+ BEGIN_BATCH(15);
+ OUT_BATCH_REGVAL(R300_GA_POLY_MODE,
+ R300_GA_POLY_MODE_FRONT_PTYPE_TRI | R300_GA_POLY_MODE_BACK_PTYPE_TRI);
+ OUT_BATCH_REGVAL(R300_SU_CULL_MODE, R300_FRONT_FACE_CCW);
+ OUT_BATCH_REGVAL(R300_FG_FOG_BLEND, 0);
+ OUT_BATCH_REGVAL(R300_FG_ALPHA_FUNC, 0);
+ OUT_BATCH_REGSEQ(R300_RB3D_CBLEND, 2);
+ OUT_BATCH(0x0);
+ OUT_BATCH(0x0);
+ OUT_BATCH_REGVAL(R300_VAP_CLIP_CNTL, R300_CLIP_DISABLE);
+ OUT_BATCH_REGVAL(R300_ZB_CNTL, 0);
+ END_BATCH();
+}
+
+static void emit_cb_setup(struct r300_context *r300,
+ struct radeon_bo *bo,
+ intptr_t offset,
+ gl_format mesa_format,
+ unsigned pitch,
+ unsigned width,
+ unsigned height)
+{
+ BATCH_LOCALS(&r300->radeon);
+
+ unsigned x1, y1, x2, y2;
+ x1 = 0;
+ y1 = 0;
+ x2 = width - 1;
+ y2 = height - 1;
+
+ if (r300->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV515) {
+ x1 += R300_SCISSORS_OFFSET;
+ y1 += R300_SCISSORS_OFFSET;
+ x2 += R300_SCISSORS_OFFSET;
+ y2 += R300_SCISSORS_OFFSET;
+ }
+
+ r300_emit_cb_setup(r300, bo, offset, mesa_format,
+ _mesa_get_format_bytes(mesa_format),
+ _mesa_format_row_stride(mesa_format, pitch));
+
+ BEGIN_BATCH_NO_AUTOSTATE(5);
+ OUT_BATCH_REGSEQ(R300_SC_SCISSORS_TL, 2);
+ OUT_BATCH((x1 << R300_SCISSORS_X_SHIFT)|(y1 << R300_SCISSORS_Y_SHIFT));
+ OUT_BATCH((x2 << R300_SCISSORS_X_SHIFT)|(y2 << R300_SCISSORS_Y_SHIFT));
+ OUT_BATCH_REGVAL(R300_RB3D_CCTL, 0);
+ END_BATCH();
+}
+
+static unsigned is_blit_supported(gl_format dst_format)
+{
+ switch (dst_format) {
+ case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_ARGB8888_REV:
+ case MESA_FORMAT_XRGB8888:
+ break;
+ default:
+ return 0;
+ }
+
+ if (_mesa_get_format_bits(dst_format, GL_DEPTH_BITS) > 0)
+ return 0;
+
+ return 1;
+}
+
+/**
+ * Copy a region of [@a width x @a height] pixels from source buffer
+ * to destination buffer.
+ * @param[in] r300 r300 context
+ * @param[in] src_bo source radeon buffer object
+ * @param[in] src_offset offset of the source image in the @a src_bo
+ * @param[in] src_mesaformat source image format
+ * @param[in] src_pitch aligned source image width
+ * @param[in] src_width source image width
+ * @param[in] src_height source image height
+ * @param[in] src_x_offset x offset in the source image
+ * @param[in] src_y_offset y offset in the source image
+ * @param[in] dst_bo destination radeon buffer object
+ * @param[in] dst_offset offset of the destination image in the @a dst_bo
+ * @param[in] dst_mesaformat destination image format
+ * @param[in] dst_pitch aligned destination image width
+ * @param[in] dst_width destination image width
+ * @param[in] dst_height destination image height
+ * @param[in] dst_x_offset x offset in the destination image
+ * @param[in] dst_y_offset y offset in the destination image
+ * @param[in] width region width
+ * @param[in] height region height
+ * @param[in] flip_y set if y coords of the source image need to be flipped
+ */
+unsigned r300_blit(GLcontext *ctx,
+ struct radeon_bo *src_bo,
+ intptr_t src_offset,
+ gl_format src_mesaformat,
+ unsigned src_pitch,
+ unsigned src_width,
+ unsigned src_height,
+ unsigned src_x_offset,
+ unsigned src_y_offset,
+ struct radeon_bo *dst_bo,
+ intptr_t dst_offset,
+ gl_format dst_mesaformat,
+ unsigned dst_pitch,
+ unsigned dst_width,
+ unsigned dst_height,
+ unsigned dst_x_offset,
+ unsigned dst_y_offset,
+ unsigned reg_width,
+ unsigned reg_height,
+ unsigned flip_y)
+{
+ r300ContextPtr r300 = R300_CONTEXT(ctx);
+
+ if (!is_blit_supported(dst_mesaformat))
+ return 0;
+
+ /* Make sure that colorbuffer has even width - hw limitation */
+ if (dst_pitch % 2 > 0)
+ ++dst_pitch;
+
+ /* Rendering to small buffer doesn't work.
+ * Looks like a hw limitation.
+ */
+ if (dst_pitch < 32)
+ return 0;
+
+ /* Need to clamp the region size to make sure
+ * we don't read outside of the source buffer
+ * or write outside of the destination buffer.
+ */
+ if (reg_width + src_x_offset > src_width)
+ reg_width = src_width - src_x_offset;
+ if (reg_height + src_y_offset > src_height)
+ reg_height = src_height - src_y_offset;
+ if (reg_width + dst_x_offset > dst_width)
+ reg_width = dst_width - dst_x_offset;
+ if (reg_height + dst_y_offset > dst_height)
+ reg_height = dst_height - dst_y_offset;
+
+ if (src_bo == dst_bo) {
+ return 0;
+ }
+
+ if (src_offset % 32 || dst_offset % 32) {
+ return GL_FALSE;
+ }
+
+ if (0) {
+ fprintf(stderr, "src: size [%d x %d], pitch %d, "
+ "offset [%d x %d], format %s, bo %p\n",
+ src_width, src_height, src_pitch,
+ src_x_offset, src_y_offset,
+ _mesa_get_format_name(src_mesaformat),
+ src_bo);
+ fprintf(stderr, "dst: pitch %d, offset[%d x %d], format %s, bo %p\n",
+ dst_pitch, dst_x_offset, dst_y_offset,
+ _mesa_get_format_name(dst_mesaformat), dst_bo);
+ fprintf(stderr, "region: %d x %d\n", reg_width, reg_height);
+ }
+
+ /* Flush is needed to make sure that source buffer has correct data */
+ radeonFlush(r300->radeon.glCtx);
+
+ if (!validate_buffers(r300, src_bo, dst_bo))
+ return 0;
+
+ rcommonEnsureCmdBufSpace(&r300->radeon, 200, __FUNCTION__);
+
+ other_stuff(r300);
+
+ r300_emit_tx_setup(r300, src_mesaformat, src_bo, src_offset, src_width, src_height, src_pitch);
+
+ if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515) {
+ r500_emit_fp_setup(r300, &r300->blit.fp_code.code.r500, dst_mesaformat);
+ r500_emit_rs_setup(r300);
+ } else {
+ r300_emit_fp_setup(r300, &r300->blit.fp_code.code.r300, dst_mesaformat);
+ r300_emit_rs_setup(r300);
+ }
+
+ emit_pvs_setup(r300, r300->blit.vp_code.body.d, 2);
+ emit_vap_setup(r300);
+
+ emit_cb_setup(r300, dst_bo, dst_offset, dst_mesaformat, dst_pitch, dst_width, dst_height);
+
+ emit_draw_packet(r300, src_width, src_height,
+ src_x_offset, src_y_offset,
+ dst_x_offset, dst_y_offset,
+ reg_width, reg_height,
+ flip_y);
+
+ r300EmitCacheFlush(r300);
+
+ radeonFlush(r300->radeon.glCtx);
+
+ return 1;
+}
diff --git a/src/mesa/drivers/dri/r300/r300_blit.h b/src/mesa/drivers/dri/r300/r300_blit.h
new file mode 100644
index 00000000000..735acaddd70
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/r300_blit.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2009 Maciej Cencora <m.cencora@gmail.com>
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef R300_BLIT_H
+#define R300_BLIT_H
+
+void r300_blit_init(struct r300_context *r300);
+
+unsigned r300_blit(GLcontext *ctx,
+ struct radeon_bo *src_bo,
+ intptr_t src_offset,
+ gl_format src_mesaformat,
+ unsigned src_pitch,
+ unsigned src_width,
+ unsigned src_height,
+ unsigned src_x_offset,
+ unsigned src_y_offset,
+ struct radeon_bo *dst_bo,
+ intptr_t dst_offset,
+ gl_format dst_mesaformat,
+ unsigned dst_pitch,
+ unsigned dst_width,
+ unsigned dst_height,
+ unsigned dst_x_offset,
+ unsigned dst_y_offset,
+ unsigned reg_width,
+ unsigned reg_height,
+ unsigned flip_y);
+
+#endif // R300_BLIT_H \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 96c96d8d9a5..4787bafc66a 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -69,7 +69,7 @@ static unsigned packet0_count(r300ContextPtr r300, uint32_t *pkt)
#define vpu_count(ptr) (((drm_r300_cmd_header_t*)(ptr))->vpu.count)
#define r500fp_count(ptr) (((drm_r300_cmd_header_t*)(ptr))->r500fp.count)
-int check_vpu(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_vpu(GLcontext *ctx, struct radeon_state_atom *atom)
{
r300ContextPtr r300 = R300_CONTEXT(ctx);
int cnt;
@@ -83,54 +83,73 @@ int check_vpu(GLcontext *ctx, struct radeon_state_atom *atom)
return cnt ? (cnt * 4) + extra : 0;
}
+void r300_emit_vpu(struct r300_context *r300,
+ uint32_t *data,
+ unsigned len,
+ uint32_t addr)
+{
+ BATCH_LOCALS(&r300->radeon);
+
+ BEGIN_BATCH_NO_AUTOSTATE(5 + len);
+ OUT_BATCH_REGVAL(R300_VAP_PVS_STATE_FLUSH_REG, 0);
+ OUT_BATCH_REGVAL(R300_VAP_PVS_VECTOR_INDX_REG, addr);
+ OUT_BATCH(CP_PACKET0(R300_VAP_PVS_UPLOAD_DATA, len-1) | RADEON_ONE_REG_WR);
+ OUT_BATCH_TABLE(data, len);
+ END_BATCH();
+}
-void emit_vpu(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_vpu_state(GLcontext *ctx, struct radeon_state_atom * atom)
{
- r300ContextPtr r300 = R300_CONTEXT(ctx);
- BATCH_LOCALS(&r300->radeon);
- drm_r300_cmd_header_t cmd;
- uint32_t addr, ndw;
+ r300ContextPtr r300 = R300_CONTEXT(ctx);
+ drm_r300_cmd_header_t cmd;
+ uint32_t addr, ndw;
- cmd.u = atom->cmd[0];
- addr = (cmd.vpu.adrhi << 8) | cmd.vpu.adrlo;
- ndw = atom->check(ctx, atom);
+ cmd.u = atom->cmd[0];
+ addr = (cmd.vpu.adrhi << 8) | cmd.vpu.adrlo;
+ ndw = atom->check(ctx, atom);
- BEGIN_BATCH_NO_AUTOSTATE(ndw);
+ r300_emit_vpu(r300, &atom->cmd[1], vpu_count(atom->cmd) * 4, addr);
+}
- ndw -= 5;
- OUT_BATCH_REGVAL(R300_VAP_PVS_VECTOR_INDX_REG, addr);
- OUT_BATCH(CP_PACKET0(R300_VAP_PVS_UPLOAD_DATA, ndw-1) | RADEON_ONE_REG_WR);
- OUT_BATCH_TABLE(&atom->cmd[1], ndw);
- OUT_BATCH_REGVAL(R300_VAP_PVS_STATE_FLUSH_REG, 0);
- END_BATCH();
+void r500_emit_fp(struct r300_context *r300,
+ uint32_t *data,
+ unsigned len,
+ uint32_t addr,
+ unsigned type,
+ unsigned clamp)
+{
+ BATCH_LOCALS(&r300->radeon);
+
+ addr |= (type << 16);
+ addr |= (clamp << 17);
+
+ BEGIN_BATCH_NO_AUTOSTATE(len + 3);
+ OUT_BATCH(CP_PACKET0(R500_GA_US_VECTOR_INDEX, 0));
+ OUT_BATCH(addr);
+ OUT_BATCH(CP_PACKET0(R500_GA_US_VECTOR_DATA, len-1) | RADEON_ONE_REG_WR);
+ OUT_BATCH_TABLE(data, len);
+ END_BATCH();
}
-void emit_r500fp(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_r500fp_atom(GLcontext *ctx, struct radeon_state_atom * atom)
{
- r300ContextPtr r300 = R300_CONTEXT(ctx);
- BATCH_LOCALS(&r300->radeon);
- drm_r300_cmd_header_t cmd;
- uint32_t addr, ndw, sz;
- int type, clamp;
-
- ndw = atom->check(ctx, atom);
-
- cmd.u = atom->cmd[0];
- sz = cmd.r500fp.count;
- addr = ((cmd.r500fp.adrhi_flags & 1) << 8) | cmd.r500fp.adrlo;
- type = !!(cmd.r500fp.adrhi_flags & R500FP_CONSTANT_TYPE);
- clamp = !!(cmd.r500fp.adrhi_flags & R500FP_CONSTANT_CLAMP);
-
- addr |= (type << 16);
- addr |= (clamp << 17);
-
- BEGIN_BATCH_NO_AUTOSTATE(ndw);
- OUT_BATCH(CP_PACKET0(R500_GA_US_VECTOR_INDEX, 0));
- OUT_BATCH(addr);
- ndw-=3;
- OUT_BATCH(CP_PACKET0(R500_GA_US_VECTOR_DATA, ndw-1) | RADEON_ONE_REG_WR);
- OUT_BATCH_TABLE(&atom->cmd[1], ndw);
- END_BATCH();
+ r300ContextPtr r300 = R300_CONTEXT(ctx);
+ drm_r300_cmd_header_t cmd;
+ uint32_t addr, count;
+ int type, clamp;
+
+ cmd.u = atom->cmd[0];
+ addr = ((cmd.r500fp.adrhi_flags & 1) << 8) | cmd.r500fp.adrlo;
+ type = !!(cmd.r500fp.adrhi_flags & R500FP_CONSTANT_TYPE);
+ clamp = !!(cmd.r500fp.adrhi_flags & R500FP_CONSTANT_CLAMP);
+
+ if (type) {
+ count = r500fp_count(atom->cmd) * 4;
+ } else {
+ count = r500fp_count(atom->cmd) * 6;
+ }
+
+ r500_emit_fp(r300, &atom->cmd[1], count, addr, type, clamp);
}
static int check_tex_offsets(GLcontext *ctx, struct radeon_state_atom * atom)
@@ -253,110 +272,136 @@ static int check_cb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
return dw;
}
-static void emit_cb_offset(GLcontext *ctx, struct radeon_state_atom * atom)
+static void emit_scissor(struct r300_context *r300,
+ unsigned width,
+ unsigned height)
{
- r300ContextPtr r300 = R300_CONTEXT(ctx);
- BATCH_LOCALS(&r300->radeon);
- struct radeon_renderbuffer *rrb;
- uint32_t cbpitch;
- uint32_t offset = r300->radeon.state.color.draw_offset;
- uint32_t dw = 6;
- int i;
+ int i;
+ BATCH_LOCALS(&r300->radeon);
+ if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515) {
+ BEGIN_BATCH_NO_AUTOSTATE(3);
+ OUT_BATCH_REGSEQ(R300_SC_SCISSORS_TL, 2);
+ OUT_BATCH(0);
+ OUT_BATCH(((width - 1) << R300_SCISSORS_X_SHIFT) |
+ ((height - 1) << R300_SCISSORS_Y_SHIFT));
+ END_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(16);
+ for (i = 0; i < 4; i++) {
+ OUT_BATCH_REGSEQ(R300_SC_CLIPRECT_TL_0 + (i * 8), 2);
+ OUT_BATCH((0 << R300_CLIPRECT_X_SHIFT) | (0 << R300_CLIPRECT_Y_SHIFT));
+ OUT_BATCH(((width - 1) << R300_CLIPRECT_X_SHIFT) | ((height - 1) << R300_CLIPRECT_Y_SHIFT));
+ }
+ OUT_BATCH_REGSEQ(R300_SC_CLIP_RULE, 1);
+ OUT_BATCH(0xAAAA);
+ OUT_BATCH_REGSEQ(R300_SC_SCREENDOOR, 1);
+ OUT_BATCH(0xffffff);
+ END_BATCH();
+ } else {
+ BEGIN_BATCH_NO_AUTOSTATE(3);
+ OUT_BATCH_REGSEQ(R300_SC_SCISSORS_TL, 2);
+ OUT_BATCH((R300_SCISSORS_OFFSET << R300_SCISSORS_X_SHIFT) |
+ (R300_SCISSORS_OFFSET << R300_SCISSORS_Y_SHIFT));
+ OUT_BATCH(((width + R300_SCISSORS_OFFSET - 1) << R300_SCISSORS_X_SHIFT) |
+ ((height + R300_SCISSORS_OFFSET - 1) << R300_SCISSORS_Y_SHIFT));
+ END_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(16);
+ for (i = 0; i < 4; i++) {
+ OUT_BATCH_REGSEQ(R300_SC_CLIPRECT_TL_0 + (i * 8), 2);
+ OUT_BATCH((R300_SCISSORS_OFFSET << R300_CLIPRECT_X_SHIFT) | (R300_SCISSORS_OFFSET << R300_CLIPRECT_Y_SHIFT));
+ OUT_BATCH(((R300_SCISSORS_OFFSET + width - 1) << R300_CLIPRECT_X_SHIFT) |
+ ((R300_SCISSORS_OFFSET + height - 1) << R300_CLIPRECT_Y_SHIFT));
+ }
+ OUT_BATCH_REGSEQ(R300_SC_CLIP_RULE, 1);
+ OUT_BATCH(0xAAAA);
+ OUT_BATCH_REGSEQ(R300_SC_SCREENDOOR, 1);
+ OUT_BATCH(0xffffff);
+ END_BATCH();
+ }
+}
- rrb = radeon_get_colorbuffer(&r300->radeon);
- if (!rrb || !rrb->bo) {
- fprintf(stderr, "no rrb\n");
- return;
- }
+void r300_emit_cb_setup(struct r300_context *r300,
+ struct radeon_bo *bo,
+ uint32_t offset,
+ GLuint format,
+ unsigned cpp,
+ unsigned pitch)
+{
+ BATCH_LOCALS(&r300->radeon);
+ uint32_t cbpitch = pitch / cpp;
+ uint32_t dw = 6;
- if (RADEON_DEBUG & RADEON_STATE)
- fprintf(stderr,"rrb is %p %d %dx%d\n", rrb, offset, rrb->base.Width, rrb->base.Height);
- cbpitch = (rrb->pitch / rrb->cpp);
- if (rrb->cpp == 4)
- cbpitch |= R300_COLOR_FORMAT_ARGB8888;
- else switch (rrb->base.Format) {
+ assert(offset % 32 == 0);
+
+ switch (format) {
case MESA_FORMAT_RGB565:
- assert(_mesa_little_endian());
- cbpitch |= R300_COLOR_FORMAT_RGB565;
- break;
+ 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;
+ assert(!_mesa_little_endian());
+ cbpitch |= R300_COLOR_FORMAT_RGB565;
+ break;
case MESA_FORMAT_ARGB4444:
- assert(_mesa_little_endian());
- cbpitch |= R300_COLOR_FORMAT_ARGB4444;
- break;
+ 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:
- _mesa_problem(ctx, "unexpected format in emit_cb_offset()");
- }
+ 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:
+ if (cpp == 4) {
+ cbpitch |= R300_COLOR_FORMAT_ARGB8888;
+ } else {
+ _mesa_problem(r300->radeon.glCtx, "unexpected format in emit_cb_offset()");;
+ }
+ break;
+ }
- if (rrb->bo->flags & RADEON_BO_FLAGS_MACRO_TILE)
- cbpitch |= R300_COLOR_TILE_ENABLE;
+ if (bo->flags & RADEON_BO_FLAGS_MACRO_TILE)
+ cbpitch |= R300_COLOR_TILE_ENABLE;
+
+ if (r300->radeon.radeonScreen->kernel_mm)
+ dw += 2;
+
+ BEGIN_BATCH_NO_AUTOSTATE(dw);
+ OUT_BATCH_REGSEQ(R300_RB3D_COLOROFFSET0, 1);
+ OUT_BATCH_RELOC(offset, bo, offset, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_BATCH_REGSEQ(R300_RB3D_COLORPITCH0, 1);
+ if (!r300->radeon.radeonScreen->kernel_mm)
+ OUT_BATCH(cbpitch);
+ else
+ OUT_BATCH_RELOC(cbpitch, bo, cbpitch, 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ END_BATCH();
+}
+
+static void emit_cb_offset_atom(GLcontext *ctx, struct radeon_state_atom * atom)
+{
+ r300ContextPtr r300 = R300_CONTEXT(ctx);
+ struct radeon_renderbuffer *rrb;
+ uint32_t offset = r300->radeon.state.color.draw_offset;
+
+ rrb = radeon_get_colorbuffer(&r300->radeon);
+ if (!rrb || !rrb->bo) {
+ fprintf(stderr, "no rrb\n");
+ return;
+ }
+
+ if (RADEON_DEBUG & RADEON_STATE)
+ fprintf(stderr,"rrb is %p %d %dx%d\n", rrb, offset, rrb->base.Width, rrb->base.Height);
+
+ r300_emit_cb_setup(r300, rrb->bo, offset, rrb->base.Format, rrb->cpp, rrb->pitch);
- if (r300->radeon.radeonScreen->kernel_mm)
- dw += 2;
- BEGIN_BATCH_NO_AUTOSTATE(dw);
- OUT_BATCH_REGSEQ(R300_RB3D_COLOROFFSET0, 1);
- OUT_BATCH_RELOC(offset, rrb->bo, offset, 0, RADEON_GEM_DOMAIN_VRAM, 0);
- OUT_BATCH_REGSEQ(R300_RB3D_COLORPITCH0, 1);
- if (!r300->radeon.radeonScreen->kernel_mm)
- OUT_BATCH(cbpitch);
- else
- OUT_BATCH_RELOC(cbpitch, rrb->bo, cbpitch, 0, RADEON_GEM_DOMAIN_VRAM, 0);
- END_BATCH();
if (r300->radeon.radeonScreen->driScreen->dri2.enabled) {
- if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515) {
- BEGIN_BATCH_NO_AUTOSTATE(3);
- OUT_BATCH_REGSEQ(R300_SC_SCISSORS_TL, 2);
- OUT_BATCH(0);
- OUT_BATCH(((rrb->base.Width - 1) << R300_SCISSORS_X_SHIFT) |
- ((rrb->base.Height - 1) << R300_SCISSORS_Y_SHIFT));
- END_BATCH();
- BEGIN_BATCH_NO_AUTOSTATE(16);
- for (i = 0; i < 4; i++) {
- OUT_BATCH_REGSEQ(R300_SC_CLIPRECT_TL_0 + (i * 8), 2);
- OUT_BATCH((0 << R300_CLIPRECT_X_SHIFT) | (0 << R300_CLIPRECT_Y_SHIFT));
- OUT_BATCH(((rrb->base.Width - 1) << R300_CLIPRECT_X_SHIFT) | ((rrb->base.Height - 1) << R300_CLIPRECT_Y_SHIFT));
- }
- OUT_BATCH_REGSEQ(R300_SC_CLIP_RULE, 1);
- OUT_BATCH(0xAAAA);
- OUT_BATCH_REGSEQ(R300_SC_SCREENDOOR, 1);
- OUT_BATCH(0xffffff);
- END_BATCH();
- } else {
- BEGIN_BATCH_NO_AUTOSTATE(3);
- OUT_BATCH_REGSEQ(R300_SC_SCISSORS_TL, 2);
- OUT_BATCH((R300_SCISSORS_OFFSET << R300_SCISSORS_X_SHIFT) |
- (R300_SCISSORS_OFFSET << R300_SCISSORS_Y_SHIFT));
- OUT_BATCH(((rrb->base.Width + R300_SCISSORS_OFFSET - 1) << R300_SCISSORS_X_SHIFT) |
- ((rrb->base.Height + R300_SCISSORS_OFFSET - 1) << R300_SCISSORS_Y_SHIFT));
- END_BATCH();
- BEGIN_BATCH_NO_AUTOSTATE(16);
- for (i = 0; i < 4; i++) {
- OUT_BATCH_REGSEQ(R300_SC_CLIPRECT_TL_0 + (i * 8), 2);
- OUT_BATCH((R300_SCISSORS_OFFSET << R300_CLIPRECT_X_SHIFT) | (R300_SCISSORS_OFFSET << R300_CLIPRECT_Y_SHIFT));
- OUT_BATCH(((R300_SCISSORS_OFFSET + rrb->base.Width - 1) << R300_CLIPRECT_X_SHIFT) |
- ((R300_SCISSORS_OFFSET + rrb->base.Height - 1) << R300_CLIPRECT_Y_SHIFT));
- }
- OUT_BATCH_REGSEQ(R300_SC_CLIP_RULE, 1);
- OUT_BATCH(0xAAAA);
- OUT_BATCH_REGSEQ(R300_SC_SCREENDOOR, 1);
- OUT_BATCH(0xffffff);
- END_BATCH();
- }
+ emit_scissor(r300, rrb->base.Width, rrb->base.Height);
}
}
@@ -452,7 +497,7 @@ static int check_variable(GLcontext *ctx, struct radeon_state_atom *atom)
return cnt ? cnt + 1 : 0;
}
-int check_r500fp(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_r500fp(GLcontext *ctx, struct radeon_state_atom *atom)
{
int cnt;
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -464,7 +509,7 @@ int check_r500fp(GLcontext *ctx, struct radeon_state_atom *atom)
return cnt ? (cnt * 6) + extra : 0;
}
-int check_r500fp_const(GLcontext *ctx, struct radeon_state_atom *atom)
+static int check_r500fp_const(GLcontext *ctx, struct radeon_state_atom *atom)
{
int cnt;
r300ContextPtr r300 = R300_CONTEXT(ctx);
@@ -641,13 +686,13 @@ void r300InitCmdBuf(r300ContextPtr r300)
r300->hw.r500fp.cmd[R300_FPI_CMD_0] =
cmdr500fp(r300->radeon.radeonScreen, 0, 0, 0, 0);
if (r300->radeon.radeonScreen->kernel_mm)
- r300->hw.r500fp.emit = emit_r500fp;
+ r300->hw.r500fp.emit = emit_r500fp_atom;
ALLOC_STATE(r500fp_const, r500fp_const, R500_FPP_CMDSIZE, 0);
r300->hw.r500fp_const.cmd[R300_FPI_CMD_0] =
cmdr500fp(r300->radeon.radeonScreen, 0, 0, 1, 0);
if (r300->radeon.radeonScreen->kernel_mm)
- r300->hw.r500fp_const.emit = emit_r500fp;
+ r300->hw.r500fp_const.emit = emit_r500fp_atom;
} else {
ALLOC_STATE(fp, always, R300_FP_CMDSIZE, 0);
r300->hw.fp.cmd[R300_FP_CMD_0] = cmdpacket0(r300->radeon.radeonScreen, R300_US_CONFIG, 3);
@@ -691,7 +736,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
ALLOC_STATE(rop, always, 2, 0);
r300->hw.rop.cmd[0] = cmdpacket0(r300->radeon.radeonScreen, R300_RB3D_ROPCNTL, 1);
ALLOC_STATE(cb, cb_offset, R300_CB_CMDSIZE, 0);
- r300->hw.cb.emit = &emit_cb_offset;
+ r300->hw.cb.emit = &emit_cb_offset_atom;
ALLOC_STATE(rb3d_dither_ctl, always, 10, 0);
r300->hw.rb3d_dither_ctl.cmd[0] = cmdpacket0(r300->radeon.radeonScreen, R300_RB3D_DITHER_CTL, 9);
ALLOC_STATE(rb3d_aaresolve_ctl, always, 2, 0);
@@ -755,20 +800,20 @@ void r300InitCmdBuf(r300ContextPtr r300)
r300->hw.vpi.cmd[0] =
cmdvpu(r300->radeon.radeonScreen, R300_PVS_CODE_START, 0);
if (r300->radeon.radeonScreen->kernel_mm)
- r300->hw.vpi.emit = emit_vpu;
+ r300->hw.vpi.emit = emit_vpu_state;
if (is_r500) {
ALLOC_STATE(vpp, vpu, R300_VPP_CMDSIZE, 0);
r300->hw.vpp.cmd[0] =
cmdvpu(r300->radeon.radeonScreen, R500_PVS_CONST_START, 0);
if (r300->radeon.radeonScreen->kernel_mm)
- r300->hw.vpp.emit = emit_vpu;
+ r300->hw.vpp.emit = emit_vpu_state;
ALLOC_STATE(vps, vpu, R300_VPS_CMDSIZE, 0);
r300->hw.vps.cmd[0] =
cmdvpu(r300->radeon.radeonScreen, R500_POINT_VPORT_SCALE_OFFSET, 1);
if (r300->radeon.radeonScreen->kernel_mm)
- r300->hw.vps.emit = emit_vpu;
+ r300->hw.vps.emit = emit_vpu_state;
for (i = 0; i < 6; i++) {
ALLOC_STATE(vpucp[i], vpu, R300_VPUCP_CMDSIZE, 0);
@@ -776,20 +821,20 @@ void r300InitCmdBuf(r300ContextPtr r300)
cmdvpu(r300->radeon.radeonScreen,
R500_PVS_UCP_START + i, 1);
if (r300->radeon.radeonScreen->kernel_mm)
- r300->hw.vpucp[i].emit = emit_vpu;
+ r300->hw.vpucp[i].emit = emit_vpu_state;
}
} else {
ALLOC_STATE(vpp, vpu, R300_VPP_CMDSIZE, 0);
r300->hw.vpp.cmd[0] =
cmdvpu(r300->radeon.radeonScreen, R300_PVS_CONST_START, 0);
if (r300->radeon.radeonScreen->kernel_mm)
- r300->hw.vpp.emit = emit_vpu;
+ r300->hw.vpp.emit = emit_vpu_state;
ALLOC_STATE(vps, vpu, R300_VPS_CMDSIZE, 0);
r300->hw.vps.cmd[0] =
cmdvpu(r300->radeon.radeonScreen, R300_POINT_VPORT_SCALE_OFFSET, 1);
if (r300->radeon.radeonScreen->kernel_mm)
- r300->hw.vps.emit = emit_vpu;
+ r300->hw.vps.emit = emit_vpu_state;
for (i = 0; i < 6; i++) {
ALLOC_STATE(vpucp[i], vpu, R300_VPUCP_CMDSIZE, 0);
@@ -797,7 +842,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
cmdvpu(r300->radeon.radeonScreen,
R300_PVS_UCP_START + i, 1);
if (r300->radeon.radeonScreen->kernel_mm)
- r300->hw.vpucp[i].emit = emit_vpu;
+ r300->hw.vpucp[i].emit = emit_vpu_state;
}
}
}
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.h b/src/mesa/drivers/dri/r300/r300_cmdbuf.h
index 1b703e518a0..0e68da928ed 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.h
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.h
@@ -44,14 +44,26 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define FIREAOS_BUFSZ (3)
#define SCISSORS_BUFSZ (3)
-extern void r300InitCmdBuf(r300ContextPtr r300);
+void r300InitCmdBuf(r300ContextPtr r300);
void r300_emit_scissor(GLcontext *ctx);
-void emit_vpu(GLcontext *ctx, struct radeon_state_atom * atom);
-int check_vpu(GLcontext *ctx, struct radeon_state_atom *atom);
+void r300_emit_vpu(struct r300_context *ctx,
+ uint32_t *data,
+ unsigned len,
+ uint32_t addr);
-void emit_r500fp(GLcontext *ctx, struct radeon_state_atom * atom);
-int check_r500fp(GLcontext *ctx, struct radeon_state_atom *atom);
-int check_r500fp_const(GLcontext *ctx, struct radeon_state_atom *atom);
+void r500_emit_fp(struct r300_context *r300,
+ uint32_t *data,
+ unsigned len,
+ uint32_t addr,
+ unsigned type,
+ unsigned clamp);
-#endif /* __R300_CMDBUF_H__ */
+void r300_emit_cb_setup(struct r300_context *r300,
+ struct radeon_bo *bo,
+ uint32_t offset,
+ GLuint format,
+ unsigned cpp,
+ unsigned pitch);
+
+#endif /* __R300_CMDBUF_H__ */
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 2ad51863845..eedb7b6ed86 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -52,12 +52,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "tnl/t_pipeline.h"
#include "drivers/common/driverfuncs.h"
+#include "drivers/common/meta.h"
#include "r300_context.h"
#include "radeon_span.h"
+#include "r300_blit.h"
#include "r300_cmdbuf.h"
#include "r300_state.h"
-#include "r300_ioctl.h"
#include "r300_tex.h"
#include "r300_emit.h"
#include "r300_swtcl.h"
@@ -87,7 +88,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/remap_helper.h"
-
static const struct dri_extension card_extensions[] = {
/* *INDENT-OFF* */
{"GL_ARB_depth_texture", NULL},
@@ -319,6 +319,8 @@ static void r300_init_vtbl(radeonContextPtr radeon)
radeon->vtbl.emit_query_finish = rv530_emit_query_finish_single_z;
} else
radeon->vtbl.emit_query_finish = r300_emit_query_finish;
+
+ radeon->vtbl.blit = r300_blit;
}
static void r300InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
@@ -444,15 +446,24 @@ static void r300InitGLExtensions(GLcontext *ctx)
if (!r300->radeon.radeonScreen->drmSupportsOcclusionQueries) {
_mesa_disable_extension(ctx, "GL_ARB_occlusion_query");
}
+ if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV350)
+ _mesa_enable_extension(ctx, "GL_ARB_half_float_vertex");
+}
+
+static void r300InitIoctlFuncs(struct dd_function_table *functions)
+{
+ functions->Clear = _mesa_meta_Clear;
+ functions->Finish = radeonFinish;
+ functions->Flush = radeonFlush;
}
/* Create the device specific rendering context.
*/
GLboolean r300CreateContext(const __GLcontextModes * glVisual,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
struct dd_function_table functions;
r300ContextPtr r300;
@@ -474,7 +485,7 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,
_mesa_init_driver_functions(&functions);
r300InitIoctlFuncs(&functions);
r300InitStateFuncs(&functions);
- r300InitTextureFuncs(&functions);
+ r300InitTextureFuncs(&r300->radeon, &functions);
r300InitShaderFuncs(&functions);
radeonInitQueryObjFunctions(&functions);
radeonInitBufferObjectFuncs(&functions);
@@ -525,6 +536,7 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,
r300InitSwtcl(ctx);
}
+ r300_blit_init(r300);
radeon_fbo_init(&r300->radeon);
radeonInitSpanFuncs( ctx );
r300InitCmdBuf(r300);
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index 518d5cdbf4f..78ab43a99f9 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -533,14 +533,19 @@ struct r300_context {
uint32_t fallback;
+ struct {
+ struct r300_vertex_program_code vp_code;
+ struct rX00_fragment_program_code fp_code;
+ } blit;
+
DECLARE_RENDERINPUTS(render_inputs_bitset);
};
#define R300_CONTEXT(ctx) ((r300ContextPtr)(ctx->DriverCtx))
-extern void r300DestroyContext(__DRIcontextPrivate * driContextPriv);
+extern void r300DestroyContext(__DRIcontext * driContextPriv);
extern GLboolean r300CreateContext(const __GLcontextModes * glVisual,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate);
extern void r300InitShaderFuncs(struct dd_function_table *functions);
diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c
index 1d1d41fc5c7..813495a0466 100644
--- a/src/mesa/drivers/dri/r300/r300_draw.c
+++ b/src/mesa/drivers/dri/r300/r300_draw.c
@@ -53,6 +53,8 @@ static int getTypeSize(GLenum type)
switch (type) {
case GL_DOUBLE:
return sizeof(GLdouble);
+ case GL_HALF_FLOAT:
+ return sizeof(GLhalfARB);
case GL_FLOAT:
return sizeof(GLfloat);
case GL_INT:
@@ -97,7 +99,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);
@@ -108,7 +110,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;
@@ -117,6 +119,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);
@@ -127,6 +130,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
}
@@ -170,10 +174,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;
@@ -239,6 +245,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,
@@ -277,6 +284,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);
}
@@ -291,6 +299,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;
@@ -314,6 +324,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;
}
@@ -373,6 +384,18 @@ static void r300TranslateAttrib(GLcontext *ctx, GLuint attr, int count, const st
r300_attr._signed = 0;
r300_attr.normalize = 0;
break;
+ case GL_HALF_FLOAT:
+ switch (input->Size) {
+ case 1:
+ case 2:
+ r300_attr.data_type = R300_DATA_TYPE_FLT16_2;
+ break;
+ case 3:
+ case 4:
+ r300_attr.data_type = R300_DATA_TYPE_FLT16_4;
+ break;
+ }
+ break;
case GL_SHORT:
r300_attr._signed = 1;
r300_attr.normalize = input->Normalized;
@@ -524,6 +547,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) {
@@ -533,6 +557,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.c b/src/mesa/drivers/dri/r300/r300_emit.c
index 71287514ece..740c9022217 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.c
+++ b/src/mesa/drivers/dri/r300/r300_emit.c
@@ -46,6 +46,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_context.h"
#include "r300_emit.h"
+#include "r300_render.h"
+#include "r300_swtcl.h"
+
GLuint r300VAPInputCntl0(GLcontext * ctx, GLuint InputsRead)
{
@@ -112,7 +115,7 @@ GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes)
if (first_free_texcoord > 8) {
fprintf(stderr, "\tout of free texcoords\n");
- _mesa_exit(-1);
+ exit(-1);
}
return ret;
diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
index d94ed088248..e41aeff91a4 100644
--- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c
+++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c
@@ -118,7 +118,7 @@ static void insert_WPOS_trailer(struct r300_fragment_program_compiler *compiler,
return;
}
- rc_transform_fragment_wpos(&compiler->Base, FRAG_ATTRIB_WPOS, fp->wpos_attr);
+ rc_transform_fragment_wpos(&compiler->Base, FRAG_ATTRIB_WPOS, fp->wpos_attr, GL_FALSE);
}
/**
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c
deleted file mode 100644
index bb34efe8272..00000000000
--- a/src/mesa/drivers/dri/r300/r300_ioctl.c
+++ /dev/null
@@ -1,780 +0,0 @@
-/*
-Copyright (C) The Weather Channel, Inc. 2002.
-Copyright (C) 2004 Nicolai Haehnle.
-All Rights Reserved.
-
-The Weather Channel (TM) funded Tungsten Graphics to develop the
-initial release of the Radeon 8500 driver under the XFree86 license.
-This notice must be preserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-/**
- * \file
- *
- * \author Keith Whitwell <keith@tungstengraphics.com>
- *
- * \author Nicolai Haehnle <prefect_@gmx.net>
- */
-
-#include <sched.h>
-#include <errno.h>
-
-#include "main/glheader.h"
-#include "main/imports.h"
-#include "main/macros.h"
-#include "main/context.h"
-#include "main/simple_list.h"
-#include "swrast/swrast.h"
-
-#include "radeon_common.h"
-#include "radeon_lock.h"
-#include "r300_context.h"
-#include "r300_ioctl.h"
-#include "r300_cmdbuf.h"
-#include "r300_state.h"
-#include "r300_vertprog.h"
-#include "radeon_reg.h"
-#include "r300_emit.h"
-#include "r300_context.h"
-
-#define R200_3D_DRAW_IMMD_2 0xC0003500
-
-#define CLEARBUFFER_COLOR 0x1
-#define CLEARBUFFER_DEPTH 0x2
-#define CLEARBUFFER_STENCIL 0x4
-
-#if 1
-
-/**
- * Fragment program helper macros
- */
-
-/* Produce unshifted source selectors */
-#define FP_TMP(idx) (idx)
-#define FP_CONST(idx) ((idx) | (1 << 5))
-
-/* Produce source/dest selector dword */
-#define FP_SELC_MASK_NO 0
-#define FP_SELC_MASK_X 1
-#define FP_SELC_MASK_Y 2
-#define FP_SELC_MASK_XY 3
-#define FP_SELC_MASK_Z 4
-#define FP_SELC_MASK_XZ 5
-#define FP_SELC_MASK_YZ 6
-#define FP_SELC_MASK_XYZ 7
-
-#define FP_SELC(destidx,regmask,outmask,src0,src1,src2) \
- (((destidx) << R300_ALU_DSTC_SHIFT) | \
- (FP_SELC_MASK_##regmask << 23) | \
- (FP_SELC_MASK_##outmask << 26) | \
- ((src0) << R300_ALU_SRC0C_SHIFT) | \
- ((src1) << R300_ALU_SRC1C_SHIFT) | \
- ((src2) << R300_ALU_SRC2C_SHIFT))
-
-#define FP_SELA_MASK_NO 0
-#define FP_SELA_MASK_W 1
-
-#define FP_SELA(destidx,regmask,outmask,src0,src1,src2) \
- (((destidx) << R300_ALU_DSTA_SHIFT) | \
- (FP_SELA_MASK_##regmask << 23) | \
- (FP_SELA_MASK_##outmask << 24) | \
- ((src0) << R300_ALU_SRC0A_SHIFT) | \
- ((src1) << R300_ALU_SRC1A_SHIFT) | \
- ((src2) << R300_ALU_SRC2A_SHIFT))
-
-/* Produce unshifted argument selectors */
-#define FP_ARGC(source) R300_ALU_ARGC_##source
-#define FP_ARGA(source) R300_ALU_ARGA_##source
-#define FP_ABS(arg) ((arg) | (1 << 6))
-#define FP_NEG(arg) ((arg) ^ (1 << 5))
-
-/* Produce instruction dword */
-#define FP_INSTRC(opcode,arg0,arg1,arg2) \
- (R300_ALU_OUTC_##opcode | \
- ((arg0) << R300_ALU_ARG0C_SHIFT) | \
- ((arg1) << R300_ALU_ARG1C_SHIFT) | \
- ((arg2) << R300_ALU_ARG2C_SHIFT))
-
-#define FP_INSTRA(opcode,arg0,arg1,arg2) \
- (R300_ALU_OUTA_##opcode | \
- ((arg0) << R300_ALU_ARG0A_SHIFT) | \
- ((arg1) << R300_ALU_ARG1A_SHIFT) | \
- ((arg2) << R300_ALU_ARG2A_SHIFT))
-
-#endif
-
-static void r300EmitClearState(GLcontext * ctx);
-
-static void r300ClearBuffer(r300ContextPtr r300, int flags,
- struct radeon_renderbuffer *rrb,
- struct radeon_renderbuffer *rrbd)
-{
- BATCH_LOCALS(&r300->radeon);
- GLcontext *ctx = r300->radeon.glCtx;
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&r300->radeon);
- GLuint cbpitch = 0;
- r300ContextPtr rmesa = r300;
-
- if (RADEON_DEBUG & RADEON_IOCTL)
- fprintf(stderr, "%s: buffer %p (%i,%i %ix%i)\n",
- __FUNCTION__, rrb, dPriv->x, dPriv->y,
- dPriv->w, dPriv->h);
-
- if (rrb) {
- cbpitch = (rrb->pitch / rrb->cpp);
- if (rrb->cpp == 4)
- cbpitch |= R300_COLOR_FORMAT_ARGB8888;
- else
- cbpitch |= R300_COLOR_FORMAT_RGB565;
-
- if (rrb->bo->flags & RADEON_BO_FLAGS_MACRO_TILE){
- cbpitch |= R300_COLOR_TILE_ENABLE;
- }
- }
-
- /* TODO in bufmgr */
- cp_wait(&r300->radeon, R300_WAIT_3D | R300_WAIT_3D_CLEAN);
- end_3d(&rmesa->radeon);
-
- if (flags & CLEARBUFFER_COLOR) {
- assert(rrb != 0);
- BEGIN_BATCH_NO_AUTOSTATE(6);
- OUT_BATCH_REGSEQ(R300_RB3D_COLOROFFSET0, 1);
- OUT_BATCH_RELOC(0, rrb->bo, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
- OUT_BATCH_REGVAL(R300_RB3D_COLORPITCH0, cbpitch);
- END_BATCH();
- }
-#if 1
- if (flags & (CLEARBUFFER_DEPTH | CLEARBUFFER_STENCIL)) {
- uint32_t zbpitch = (rrbd->pitch / rrbd->cpp);
- if (rrbd->bo->flags & RADEON_BO_FLAGS_MACRO_TILE){
- zbpitch |= R300_DEPTHMACROTILE_ENABLE;
- }
- if (rrbd->bo->flags & RADEON_BO_FLAGS_MICRO_TILE){
- zbpitch |= R300_DEPTHMICROTILE_TILED;
- }
- BEGIN_BATCH_NO_AUTOSTATE(6);
- OUT_BATCH_REGSEQ(R300_ZB_DEPTHOFFSET, 1);
- OUT_BATCH_RELOC(0, rrbd->bo, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
- OUT_BATCH_REGSEQ(R300_ZB_DEPTHPITCH, 1);
- if (!r300->radeon.radeonScreen->kernel_mm)
- OUT_BATCH(zbpitch);
- else
- OUT_BATCH_RELOC(zbpitch, rrbd->bo, zbpitch, 0, RADEON_GEM_DOMAIN_VRAM, 0);
- END_BATCH();
- }
-#endif
- BEGIN_BATCH_NO_AUTOSTATE(6);
- OUT_BATCH_REGSEQ(RB3D_COLOR_CHANNEL_MASK, 1);
- if (flags & CLEARBUFFER_COLOR) {
- OUT_BATCH((ctx->Color.ColorMask[BCOMP] ? RB3D_COLOR_CHANNEL_MASK_BLUE_MASK0 : 0) |
- (ctx->Color.ColorMask[GCOMP] ? RB3D_COLOR_CHANNEL_MASK_GREEN_MASK0 : 0) |
- (ctx->Color.ColorMask[RCOMP] ? RB3D_COLOR_CHANNEL_MASK_RED_MASK0 : 0) |
- (ctx->Color.ColorMask[ACOMP] ? RB3D_COLOR_CHANNEL_MASK_ALPHA_MASK0 : 0));
- } else {
- OUT_BATCH(0);
- }
-
-
- {
- uint32_t t1, t2;
-
- t1 = 0x0;
- t2 = 0x0;
-
- if (flags & CLEARBUFFER_DEPTH) {
- t1 |= R300_Z_ENABLE | R300_Z_WRITE_ENABLE;
- t2 |=
- (R300_ZS_ALWAYS << R300_Z_FUNC_SHIFT);
- }
-
- if (flags & CLEARBUFFER_STENCIL) {
- t1 |= R300_STENCIL_ENABLE;
- t2 |=
- (R300_ZS_ALWAYS <<
- R300_S_FRONT_FUNC_SHIFT) |
- (R300_ZS_REPLACE <<
- R300_S_FRONT_SFAIL_OP_SHIFT) |
- (R300_ZS_REPLACE <<
- R300_S_FRONT_ZPASS_OP_SHIFT) |
- (R300_ZS_REPLACE <<
- R300_S_FRONT_ZFAIL_OP_SHIFT);
- }
-
- OUT_BATCH_REGSEQ(R300_ZB_CNTL, 3);
- OUT_BATCH(t1);
- OUT_BATCH(t2);
- OUT_BATCH(((ctx->Stencil.WriteMask[0] & R300_STENCILREF_MASK) <<
- R300_STENCILWRITEMASK_SHIFT) |
- (ctx->Stencil.Clear & R300_STENCILREF_MASK));
- END_BATCH();
- }
-
- if (!rmesa->radeon.radeonScreen->kernel_mm) {
- BEGIN_BATCH_NO_AUTOSTATE(9);
- OUT_BATCH(cmdpacket3(r300->radeon.radeonScreen, R300_CMD_PACKET3_CLEAR));
- OUT_BATCH_FLOAT32(dPriv->w / 2.0);
- OUT_BATCH_FLOAT32(dPriv->h / 2.0);
- OUT_BATCH_FLOAT32(ctx->Depth.Clear);
- OUT_BATCH_FLOAT32(1.0);
- OUT_BATCH_FLOAT32(ctx->Color.ClearColor[0]);
- OUT_BATCH_FLOAT32(ctx->Color.ClearColor[1]);
- OUT_BATCH_FLOAT32(ctx->Color.ClearColor[2]);
- OUT_BATCH_FLOAT32(ctx->Color.ClearColor[3]);
- END_BATCH();
- } else {
- OUT_BATCH(CP_PACKET3(R200_3D_DRAW_IMMD_2, 8));
- OUT_BATCH(R300_PRIM_TYPE_POINT | R300_PRIM_WALK_RING |
- (1 << R300_PRIM_NUM_VERTICES_SHIFT));
- OUT_BATCH_FLOAT32(dPriv->w / 2.0);
- OUT_BATCH_FLOAT32(dPriv->h / 2.0);
- OUT_BATCH_FLOAT32(ctx->Depth.Clear);
- OUT_BATCH_FLOAT32(1.0);
- OUT_BATCH_FLOAT32(ctx->Color.ClearColor[0]);
- OUT_BATCH_FLOAT32(ctx->Color.ClearColor[1]);
- OUT_BATCH_FLOAT32(ctx->Color.ClearColor[2]);
- OUT_BATCH_FLOAT32(ctx->Color.ClearColor[3]);
- }
-
- r300EmitCacheFlush(rmesa);
- cp_wait(&r300->radeon, R300_WAIT_3D | R300_WAIT_3D_CLEAN);
-
- R300_STATECHANGE(r300, cb);
- R300_STATECHANGE(r300, cmk);
- R300_STATECHANGE(r300, zs);
-}
-
-static void r300EmitClearState(GLcontext * ctx)
-{
- r300ContextPtr r300 = R300_CONTEXT(ctx);
- BATCH_LOCALS(&r300->radeon);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&r300->radeon);
- int i;
- int has_tcl;
- int is_r500 = 0;
- GLuint vap_cntl;
-
- has_tcl = r300->options.hw_tcl_enabled;
-
- if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515)
- is_r500 = 1;
-
- /* State atom dirty tracking is a little subtle here.
- *
- * On the one hand, we need to make sure base state is emitted
- * here if we start with an empty batch buffer, otherwise clear
- * works incorrectly with multiple processes. Therefore, the first
- * BEGIN_BATCH cannot be a BEGIN_BATCH_NO_AUTOSTATE.
- *
- * On the other hand, implicit state emission clears the state atom
- * dirty bits, so we have to call R300_STATECHANGE later than the
- * first BEGIN_BATCH.
- *
- * The final trickiness is that, because we change state, we need
- * to ensure that any stored swtcl primitives are flushed properly
- * before we start changing state. See the R300_NEWPRIM in r300Clear
- * for this.
- */
- BEGIN_BATCH(31);
- OUT_BATCH_REGSEQ(R300_VAP_PROG_STREAM_CNTL_0, 1);
- if (!has_tcl)
- OUT_BATCH(((((0 << R300_DST_VEC_LOC_SHIFT) | R300_DATA_TYPE_FLOAT_4) << R300_DATA_TYPE_0_SHIFT) |
- ((R300_LAST_VEC | (2 << R300_DST_VEC_LOC_SHIFT) | R300_DATA_TYPE_FLOAT_4) << R300_DATA_TYPE_1_SHIFT)));
- else
- OUT_BATCH(((((0 << R300_DST_VEC_LOC_SHIFT) | R300_DATA_TYPE_FLOAT_4) << R300_DATA_TYPE_0_SHIFT) |
- ((R300_LAST_VEC | (1 << R300_DST_VEC_LOC_SHIFT) | R300_DATA_TYPE_FLOAT_4) << R300_DATA_TYPE_1_SHIFT)));
-
- OUT_BATCH_REGVAL(R300_FG_FOG_BLEND, 0);
- OUT_BATCH_REGVAL(R300_VAP_PROG_STREAM_CNTL_EXT_0,
- ((((R300_SWIZZLE_SELECT_X << R300_SWIZZLE_SELECT_X_SHIFT) |
- (R300_SWIZZLE_SELECT_Y << R300_SWIZZLE_SELECT_Y_SHIFT) |
- (R300_SWIZZLE_SELECT_Z << R300_SWIZZLE_SELECT_Z_SHIFT) |
- (R300_SWIZZLE_SELECT_W << R300_SWIZZLE_SELECT_W_SHIFT) |
- ((R300_WRITE_ENA_X | R300_WRITE_ENA_Y | R300_WRITE_ENA_Z | R300_WRITE_ENA_W) << R300_WRITE_ENA_SHIFT))
- << R300_SWIZZLE0_SHIFT) |
- (((R300_SWIZZLE_SELECT_X << R300_SWIZZLE_SELECT_X_SHIFT) |
- (R300_SWIZZLE_SELECT_Y << R300_SWIZZLE_SELECT_Y_SHIFT) |
- (R300_SWIZZLE_SELECT_Z << R300_SWIZZLE_SELECT_Z_SHIFT) |
- (R300_SWIZZLE_SELECT_W << R300_SWIZZLE_SELECT_W_SHIFT) |
- ((R300_WRITE_ENA_X | R300_WRITE_ENA_Y | R300_WRITE_ENA_Z | R300_WRITE_ENA_W) << R300_WRITE_ENA_SHIFT))
- << R300_SWIZZLE1_SHIFT)));
-
- /* R300_VAP_INPUT_CNTL_0, R300_VAP_INPUT_CNTL_1 */
- OUT_BATCH_REGSEQ(R300_VAP_VTX_STATE_CNTL, 2);
- OUT_BATCH((R300_SEL_USER_COLOR_0 << R300_COLOR_0_ASSEMBLY_SHIFT));
- OUT_BATCH(R300_INPUT_CNTL_POS | R300_INPUT_CNTL_COLOR | R300_INPUT_CNTL_TC0);
-
- /* comes from fglrx startup of clear */
- OUT_BATCH_REGSEQ(R300_SE_VTE_CNTL, 2);
- OUT_BATCH(R300_VTX_W0_FMT | R300_VPORT_X_SCALE_ENA |
- R300_VPORT_X_OFFSET_ENA | R300_VPORT_Y_SCALE_ENA |
- R300_VPORT_Y_OFFSET_ENA | R300_VPORT_Z_SCALE_ENA |
- R300_VPORT_Z_OFFSET_ENA);
- OUT_BATCH(0x8);
-
- OUT_BATCH_REGVAL(R300_VAP_PSC_SGN_NORM_CNTL, 0xaaaaaaaa);
-
- OUT_BATCH_REGSEQ(R300_VAP_OUTPUT_VTX_FMT_0, 2);
- OUT_BATCH(R300_VAP_OUTPUT_VTX_FMT_0__POS_PRESENT |
- R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT);
- OUT_BATCH(0); /* no textures */
-
- OUT_BATCH_REGVAL(R300_TX_ENABLE, 0);
-
- OUT_BATCH_REGSEQ(R300_SE_VPORT_XSCALE, 6);
- OUT_BATCH_FLOAT32(1.0);
- OUT_BATCH_FLOAT32(dPriv->x);
- OUT_BATCH_FLOAT32(1.0);
- OUT_BATCH_FLOAT32(dPriv->y);
- OUT_BATCH_FLOAT32(1.0);
- OUT_BATCH_FLOAT32(0.0);
-
- OUT_BATCH_REGVAL(R300_FG_ALPHA_FUNC, 0);
-
- OUT_BATCH_REGSEQ(R300_RB3D_CBLEND, 2);
- OUT_BATCH(0x0);
- OUT_BATCH(0x0);
- END_BATCH();
-
- R300_STATECHANGE(r300, vir[0]);
- R300_STATECHANGE(r300, fogs);
- R300_STATECHANGE(r300, vir[1]);
- R300_STATECHANGE(r300, vic);
- R300_STATECHANGE(r300, vte);
- R300_STATECHANGE(r300, vof);
- R300_STATECHANGE(r300, txe);
- R300_STATECHANGE(r300, vpt);
- R300_STATECHANGE(r300, at);
- R300_STATECHANGE(r300, bld);
- R300_STATECHANGE(r300, ps);
-
- if (has_tcl) {
- R300_STATECHANGE(r300, vap_clip_cntl);
-
- BEGIN_BATCH_NO_AUTOSTATE(2);
- OUT_BATCH_REGVAL(R300_VAP_CLIP_CNTL, R300_PS_UCP_MODE_CLIP_AS_TRIFAN | R300_CLIP_DISABLE);
- END_BATCH();
- }
-
- BEGIN_BATCH_NO_AUTOSTATE(2);
- OUT_BATCH_REGVAL(R300_GA_POINT_SIZE,
- ((dPriv->w * 6) << R300_POINTSIZE_X_SHIFT) |
- ((dPriv->h * 6) << R300_POINTSIZE_Y_SHIFT));
- END_BATCH();
-
- if (!is_r500) {
- R300_STATECHANGE(r300, ri);
- R300_STATECHANGE(r300, rc);
- R300_STATECHANGE(r300, rr);
-
- BEGIN_BATCH(14);
- OUT_BATCH_REGSEQ(R300_RS_IP_0, 8);
- for (i = 0; i < 8; ++i)
- OUT_BATCH(R300_RS_SEL_T(1) | R300_RS_SEL_R(2) | R300_RS_SEL_Q(3));
-
- OUT_BATCH_REGSEQ(R300_RS_COUNT, 2);
- OUT_BATCH((1 << R300_IC_COUNT_SHIFT) | R300_HIRES_EN);
- OUT_BATCH(0x0);
-
- OUT_BATCH_REGVAL(R300_RS_INST_0, R300_RS_INST_COL_CN_WRITE);
- END_BATCH();
- } else {
- R300_STATECHANGE(r300, ri);
- R300_STATECHANGE(r300, rc);
- R300_STATECHANGE(r300, rr);
-
- BEGIN_BATCH(14);
- OUT_BATCH_REGSEQ(R500_RS_IP_0, 8);
- for (i = 0; i < 8; ++i) {
- OUT_BATCH((R500_RS_IP_PTR_K0 << R500_RS_IP_TEX_PTR_S_SHIFT) |
- (R500_RS_IP_PTR_K0 << R500_RS_IP_TEX_PTR_T_SHIFT) |
- (R500_RS_IP_PTR_K0 << R500_RS_IP_TEX_PTR_R_SHIFT) |
- (R500_RS_IP_PTR_K1 << R500_RS_IP_TEX_PTR_Q_SHIFT));
- }
-
- OUT_BATCH_REGSEQ(R300_RS_COUNT, 2);
- OUT_BATCH((1 << R300_IC_COUNT_SHIFT) | R300_HIRES_EN);
- OUT_BATCH(0x0);
-
- OUT_BATCH_REGVAL(R500_RS_INST_0, R500_RS_INST_COL_CN_WRITE);
- END_BATCH();
- }
-
- if (!is_r500) {
- R300_STATECHANGE(r300, fp);
- R300_STATECHANGE(r300, fpi[0]);
- R300_STATECHANGE(r300, fpi[1]);
- R300_STATECHANGE(r300, fpi[2]);
- R300_STATECHANGE(r300, fpi[3]);
-
- BEGIN_BATCH(17);
- OUT_BATCH_REGSEQ(R300_US_CONFIG, 3);
- OUT_BATCH(0x0);
- OUT_BATCH(0x0);
- OUT_BATCH(0x0);
- OUT_BATCH_REGSEQ(R300_US_CODE_ADDR_0, 4);
- OUT_BATCH(0x0);
- OUT_BATCH(0x0);
- OUT_BATCH(0x0);
- OUT_BATCH(R300_RGBA_OUT);
-
- OUT_BATCH_REGVAL(R300_US_ALU_RGB_INST_0,
- FP_INSTRC(MAD, FP_ARGC(SRC0C_XYZ), FP_ARGC(ONE), FP_ARGC(ZERO)));
- OUT_BATCH_REGVAL(R300_US_ALU_RGB_ADDR_0,
- FP_SELC(0, NO, XYZ, FP_TMP(0), 0, 0));
- OUT_BATCH_REGVAL(R300_US_ALU_ALPHA_INST_0,
- FP_INSTRA(MAD, FP_ARGA(SRC0A), FP_ARGA(ONE), FP_ARGA(ZERO)));
- OUT_BATCH_REGVAL(R300_US_ALU_ALPHA_ADDR_0,
- FP_SELA(0, NO, W, FP_TMP(0), 0, 0));
- END_BATCH();
- } else {
- struct radeon_state_atom r500fp;
- uint32_t _cmd[10];
-
- R300_STATECHANGE(r300, fp);
- R300_STATECHANGE(r300, r500fp);
-
- BEGIN_BATCH(7);
- OUT_BATCH_REGSEQ(R500_US_CONFIG, 2);
- OUT_BATCH(R500_ZERO_TIMES_ANYTHING_EQUALS_ZERO);
- OUT_BATCH(0x0);
- OUT_BATCH_REGSEQ(R500_US_CODE_ADDR, 3);
- OUT_BATCH(R500_US_CODE_START_ADDR(0) | R500_US_CODE_END_ADDR(1));
- OUT_BATCH(R500_US_CODE_RANGE_ADDR(0) | R500_US_CODE_RANGE_SIZE(1));
- OUT_BATCH(R500_US_CODE_OFFSET_ADDR(0));
- END_BATCH();
-
- r500fp.check = check_r500fp;
- r500fp.cmd = _cmd;
- r500fp.cmd[0] = cmdr500fp(r300->radeon.radeonScreen, 0, 1, 0, 0);
- r500fp.cmd[1] = R500_INST_TYPE_OUT |
- R500_INST_TEX_SEM_WAIT |
- R500_INST_LAST |
- R500_INST_RGB_OMASK_R |
- R500_INST_RGB_OMASK_G |
- R500_INST_RGB_OMASK_B |
- R500_INST_ALPHA_OMASK |
- R500_INST_RGB_CLAMP |
- R500_INST_ALPHA_CLAMP;
- r500fp.cmd[2] = R500_RGB_ADDR0(0) |
- R500_RGB_ADDR1(0) |
- R500_RGB_ADDR1_CONST |
- R500_RGB_ADDR2(0) |
- R500_RGB_ADDR2_CONST;
- r500fp.cmd[3] = R500_ALPHA_ADDR0(0) |
- R500_ALPHA_ADDR1(0) |
- R500_ALPHA_ADDR1_CONST |
- R500_ALPHA_ADDR2(0) |
- R500_ALPHA_ADDR2_CONST;
- r500fp.cmd[4] = R500_ALU_RGB_SEL_A_SRC0 |
- R500_ALU_RGB_R_SWIZ_A_R |
- R500_ALU_RGB_G_SWIZ_A_G |
- R500_ALU_RGB_B_SWIZ_A_B |
- R500_ALU_RGB_SEL_B_SRC0 |
- R500_ALU_RGB_R_SWIZ_B_R |
- R500_ALU_RGB_B_SWIZ_B_G |
- R500_ALU_RGB_G_SWIZ_B_B;
- r500fp.cmd[5] = R500_ALPHA_OP_CMP |
- R500_ALPHA_SWIZ_A_A |
- R500_ALPHA_SWIZ_B_A;
- r500fp.cmd[6] = R500_ALU_RGBA_OP_CMP |
- R500_ALU_RGBA_R_SWIZ_0 |
- R500_ALU_RGBA_G_SWIZ_0 |
- R500_ALU_RGBA_B_SWIZ_0 |
- R500_ALU_RGBA_A_SWIZ_0;
-
- r500fp.cmd[7] = 0;
- if (r300->radeon.radeonScreen->kernel_mm) {
- emit_r500fp(ctx, &r500fp);
- } else {
- int dwords = r500fp.check(ctx,&r500fp);
- BEGIN_BATCH_NO_AUTOSTATE(dwords);
- OUT_BATCH_TABLE(r500fp.cmd, dwords);
- END_BATCH();
- }
-
- }
-
- BEGIN_BATCH(2);
- OUT_BATCH_REGVAL(R300_VAP_PVS_STATE_FLUSH_REG, 0);
- END_BATCH();
-
- if (has_tcl) {
- vap_cntl = ((10 << R300_PVS_NUM_SLOTS_SHIFT) |
- (5 << R300_PVS_NUM_CNTLRS_SHIFT) |
- (12 << R300_VF_MAX_VTX_NUM_SHIFT));
- if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515)
- vap_cntl |= R500_TCL_STATE_OPTIMIZATION;
- } else {
- vap_cntl = ((10 << R300_PVS_NUM_SLOTS_SHIFT) |
- (5 << R300_PVS_NUM_CNTLRS_SHIFT) |
- (5 << R300_VF_MAX_VTX_NUM_SHIFT));
- }
-
- if (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV515)
- vap_cntl |= (2 << R300_PVS_NUM_FPUS_SHIFT);
- else if ((r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) ||
- (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) ||
- (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570))
- vap_cntl |= (5 << R300_PVS_NUM_FPUS_SHIFT);
- else if ((r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV410) ||
- (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_R420))
- vap_cntl |= (6 << R300_PVS_NUM_FPUS_SHIFT);
- else if ((r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_R520) ||
- (r300->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580))
- vap_cntl |= (8 << R300_PVS_NUM_FPUS_SHIFT);
- else
- vap_cntl |= (4 << R300_PVS_NUM_FPUS_SHIFT);
-
- R300_STATECHANGE(r300, vap_cntl);
-
- BEGIN_BATCH(2);
- OUT_BATCH_REGVAL(R300_VAP_CNTL, vap_cntl);
- END_BATCH();
-
- if (has_tcl) {
- struct radeon_state_atom vpu;
- uint32_t _cmd[10];
- R300_STATECHANGE(r300, pvs);
- R300_STATECHANGE(r300, vap_flush);
- R300_STATECHANGE(r300, vpi);
-
- BEGIN_BATCH(4);
- OUT_BATCH_REGSEQ(R300_VAP_PVS_CODE_CNTL_0, 3);
- OUT_BATCH((0 << R300_PVS_FIRST_INST_SHIFT) |
- (0 << R300_PVS_XYZW_VALID_INST_SHIFT) |
- (1 << R300_PVS_LAST_INST_SHIFT));
- OUT_BATCH((0 << R300_PVS_CONST_BASE_OFFSET_SHIFT) |
- (0 << R300_PVS_MAX_CONST_ADDR_SHIFT));
- OUT_BATCH(1 << R300_PVS_LAST_VTX_SRC_INST_SHIFT);
- END_BATCH();
-
- vpu.check = check_vpu;
- vpu.cmd = _cmd;
- vpu.cmd[0] = cmdvpu(r300->radeon.radeonScreen, 0, 2);
-
- vpu.cmd[1] = PVS_OP_DST_OPERAND(VE_ADD, GL_FALSE, GL_FALSE,
- 0, 0xf, PVS_DST_REG_OUT);
- vpu.cmd[2] = PVS_SRC_OPERAND(0, PVS_SRC_SELECT_X, PVS_SRC_SELECT_Y,
- PVS_SRC_SELECT_Z, PVS_SRC_SELECT_W,
- PVS_SRC_REG_INPUT, NEGATE_NONE);
- vpu.cmd[3] = PVS_SRC_OPERAND(0, PVS_SRC_SELECT_FORCE_0,
- PVS_SRC_SELECT_FORCE_0,
- PVS_SRC_SELECT_FORCE_0,
- PVS_SRC_SELECT_FORCE_0,
- PVS_SRC_REG_INPUT, NEGATE_NONE);
- vpu.cmd[4] = 0x0;
-
- vpu.cmd[5] = PVS_OP_DST_OPERAND(VE_ADD, GL_FALSE, GL_FALSE, 1, 0xf,
- PVS_DST_REG_OUT);
- vpu.cmd[6] = PVS_SRC_OPERAND(1, PVS_SRC_SELECT_X,
- PVS_SRC_SELECT_Y, PVS_SRC_SELECT_Z,
- PVS_SRC_SELECT_W, PVS_SRC_REG_INPUT,
- NEGATE_NONE);
- vpu.cmd[7] = PVS_SRC_OPERAND(1, PVS_SRC_SELECT_FORCE_0,
- PVS_SRC_SELECT_FORCE_0,
- PVS_SRC_SELECT_FORCE_0,
- PVS_SRC_SELECT_FORCE_0,
- PVS_SRC_REG_INPUT, NEGATE_NONE);
- vpu.cmd[8] = 0x0;
-
- if (r300->radeon.radeonScreen->kernel_mm) {
- int dwords = r300->hw.vap_flush.check(ctx,&r300->hw.vap_flush);
- BEGIN_BATCH_NO_AUTOSTATE(dwords);
- OUT_BATCH_TABLE(r300->hw.vap_flush.cmd, dwords);
- END_BATCH();
- emit_vpu(ctx, &vpu);
- } else {
- int dwords = vpu.check(ctx,&vpu);
- BEGIN_BATCH_NO_AUTOSTATE(dwords);
- OUT_BATCH_TABLE(vpu.cmd, dwords);
- END_BATCH();
- }
-
- }
-}
-
-static int r300KernelClear(GLcontext *ctx, GLuint flags)
-{
- r300ContextPtr r300 = R300_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&r300->radeon);
- struct radeon_framebuffer *rfb = dPriv->driverPrivate;
- struct radeon_renderbuffer *rrb;
- struct radeon_renderbuffer *rrbd;
- int bits = 0, ret;
-
- /* Make sure it fits there. */
- radeon_cs_space_reset_bos(r300->radeon.cmdbuf.cs);
-
- if (flags & BUFFER_BIT_COLOR0) {
- rrb = radeon_get_renderbuffer(&rfb->base, BUFFER_COLOR0);
- radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs,
- rrb->bo, 0, RADEON_GEM_DOMAIN_VRAM);
- }
-
- if (flags & BUFFER_BIT_FRONT_LEFT) {
- rrb = radeon_get_renderbuffer(&rfb->base, BUFFER_FRONT_LEFT);
- radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs,
- rrb->bo, 0, RADEON_GEM_DOMAIN_VRAM);
- }
-
- if (flags & BUFFER_BIT_BACK_LEFT) {
- rrb = radeon_get_renderbuffer(&rfb->base, BUFFER_BACK_LEFT);
- radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs,
- rrb->bo, 0, RADEON_GEM_DOMAIN_VRAM);
- }
-
- rrbd = radeon_get_renderbuffer(&rfb->base, BUFFER_DEPTH);
- if (rrbd) {
- radeon_cs_space_add_persistent_bo(r300->radeon.cmdbuf.cs,
- rrbd->bo, 0, RADEON_GEM_DOMAIN_VRAM);
- }
-
- ret = radeon_cs_space_check(r300->radeon.cmdbuf.cs);
- if (ret)
- return -1;
-
- rcommonEnsureCmdBufSpace(&r300->radeon, 421 * 3, __FUNCTION__);
- if (flags || bits)
- r300EmitClearState(ctx);
-
- rrbd = radeon_get_renderbuffer(&rfb->base, BUFFER_DEPTH);
- if (rrbd && (flags & BUFFER_BIT_DEPTH))
- bits |= CLEARBUFFER_DEPTH;
-
- if (rrbd && (flags & BUFFER_BIT_STENCIL))
- bits |= CLEARBUFFER_STENCIL;
-
- if (flags & BUFFER_BIT_COLOR0) {
- rrb = radeon_get_renderbuffer(&rfb->base, BUFFER_COLOR0);
- r300ClearBuffer(r300, CLEARBUFFER_COLOR, rrb, NULL);
- bits = 0;
- }
-
- if (flags & BUFFER_BIT_FRONT_LEFT) {
- rrb = radeon_get_renderbuffer(&rfb->base, BUFFER_FRONT_LEFT);
- r300ClearBuffer(r300, bits | CLEARBUFFER_COLOR, rrb, rrbd);
- bits = 0;
- }
-
- if (flags & BUFFER_BIT_BACK_LEFT) {
- rrb = radeon_get_renderbuffer(&rfb->base, BUFFER_BACK_LEFT);
- r300ClearBuffer(r300, bits | CLEARBUFFER_COLOR, rrb, rrbd);
- bits = 0;
- }
-
- if (bits)
- r300ClearBuffer(r300, bits, NULL, rrbd);
-
- COMMIT_BATCH();
- return 0;
-}
-
-/**
- * Buffer clear
- */
-static void r300Clear(GLcontext * ctx, GLbitfield mask)
-{
- r300ContextPtr r300 = R300_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&r300->radeon);
- const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask);
- GLbitfield swrast_mask = 0, tri_mask = 0;
- int i, ret;
- struct gl_framebuffer *fb = ctx->DrawBuffer;
-
- if (RADEON_DEBUG & RADEON_IOCTL)
- fprintf(stderr, "r300Clear\n");
-
- if (!r300->radeon.radeonScreen->driScreen->dri2.enabled) {
- LOCK_HARDWARE(&r300->radeon);
- UNLOCK_HARDWARE(&r300->radeon);
- if (dPriv->numClipRects == 0)
- return;
- }
-
- /* Flush swtcl vertices if necessary, because we will change hardware
- * state during clear. See also the state-related comment in
- * r300EmitClearState.
- */
- R300_NEWPRIM(r300);
-
- if (colorMask == ~0)
- tri_mask |= (mask & BUFFER_BITS_COLOR);
- else
- tri_mask |= (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT));
-
-
- /* HW stencil */
- if (mask & BUFFER_BIT_STENCIL) {
- tri_mask |= BUFFER_BIT_STENCIL;
- }
-
- /* HW depth */
- if (mask & BUFFER_BIT_DEPTH) {
- tri_mask |= BUFFER_BIT_DEPTH;
- }
-
- /* If we're doing a tri pass for depth/stencil, include a likely color
- * buffer with it.
- */
-
- for (i = 0; i < BUFFER_COUNT; i++) {
- GLuint bufBit = 1 << i;
- if ((tri_mask) & bufBit) {
- if (!fb->Attachment[i].Renderbuffer->ClassID) {
- tri_mask &= ~bufBit;
- swrast_mask |= bufBit;
- }
- }
- }
-
- /* SW fallback clearing */
- swrast_mask = mask & ~tri_mask;
-
- ret = 0;
- if (tri_mask) {
- if (r300->radeon.radeonScreen->kernel_mm)
- radeonUserClear(ctx, tri_mask);
- else {
- /* if kernel clear fails due to size restraints fallback */
- ret = r300KernelClear(ctx, tri_mask);
- if (ret < 0)
- swrast_mask |= tri_mask;
- }
- }
-
- if (swrast_mask) {
- if (RADEON_DEBUG & RADEON_FALLBACKS)
- fprintf(stderr, "%s: swrast clear, mask: %x\n",
- __FUNCTION__, swrast_mask);
- _swrast_Clear(ctx, swrast_mask);
- }
-}
-
-void r300InitIoctlFuncs(struct dd_function_table *functions)
-{
- functions->Clear = r300Clear;
- functions->Finish = radeonFinish;
- functions->Flush = radeonFlush;
-}
diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.h b/src/mesa/drivers/dri/r300/r300_ioctl.h
deleted file mode 100644
index 3abfa71a6e8..00000000000
--- a/src/mesa/drivers/dri/r300/r300_ioctl.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-Copyright (C) The Weather Channel, Inc. 2002. All Rights Reserved.
-
-The Weather Channel (TM) funded Tungsten Graphics to develop the
-initial release of the Radeon 8500 driver under the XFree86 license.
-This notice must be preserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-/*
- * Authors:
- * Keith Whitwell <keith@tungstengraphics.com>
- * Nicolai Haehnle <prefect_@gmx.net>
- */
-
-#ifndef __R300_IOCTL_H__
-#define __R300_IOCTL_H__
-
-#include "r300_context.h"
-#include "radeon_drm.h"
-
-extern void r300InitIoctlFuncs(struct dd_function_table *functions);
-
-#endif /* __R300_IOCTL_H__ */
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index ea684e7df18..d18ebab8ff2 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -230,6 +230,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_DATA_TYPE_SHORT_4 7
# define R300_DATA_TYPE_VECTOR_3_TTT 8
# define R300_DATA_TYPE_VECTOR_3_EET 9
+# define R300_DATA_TYPE_FLT16_2 11
+# define R300_DATA_TYPE_FLT16_4 12
+
# define R300_SKIP_DWORDS_SHIFT 4
# define R300_DST_VEC_LOC_SHIFT 8
# define R300_LAST_VEC (1 << 13)
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 66b57e58a71..017d45a5039 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -994,7 +994,7 @@ static void r300StencilOpSeparate(GLcontext * ctx, GLenum face,
static void r300UpdateWindow(GLcontext * ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0;
GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0;
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -1047,7 +1047,7 @@ static void r300DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
void r300UpdateViewportOffset(GLcontext * ctx)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
GLfloat xoffset = (GLfloat) dPriv->x;
GLfloat yoffset = (GLfloat) dPriv->y + dPriv->h;
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -1308,7 +1308,7 @@ static void r300SetupTextures(GLcontext * ctx)
fprintf(stderr,
"Aiiee ! mtu=%d is greater than R300_MAX_TEXTURE_UNITS=%d\n",
mtu, R300_MAX_TEXTURE_UNITS);
- _mesa_exit(-1);
+ exit(-1);
}
/* We cannot let disabled tmu offsets pass DRM */
@@ -1765,9 +1765,10 @@ static void r300ResetHwState(r300ContextPtr r300)
radeon_firevertices(&r300->radeon);
r300ColorMask(ctx,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP], ctx->Color.ColorMask[ACOMP]);
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP]);
r300Enable(ctx, GL_DEPTH_TEST, ctx->Depth.Test);
r300DepthMask(ctx, ctx->Depth.Mask);
@@ -2036,7 +2037,7 @@ static const GLfloat *get_fragmentprogram_constant(GLcontext *ctx, GLuint index,
}
case RC_STATE_R300_WINDOW_DIMENSION: {
- __DRIdrawablePrivate * drawable = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable * drawable = radeon_get_drawable(&rmesa->radeon);
buffer[0] = drawable->w * 0.5f; /* width*0.5 */
buffer[1] = drawable->h * 0.5f; /* height*0.5 */
buffer[2] = 0.5F; /* for moving range [-1 1] -> [0 1] */
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c
index ee2c71e1a7f..93983cee205 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;
@@ -215,7 +215,7 @@ void r300ChooseSwtclVertexFormat(GLcontext *ctx, GLuint *_InputsRead, GLuint *_
if (first_free_tex >= ctx->Const.MaxTextureUnits) {
fprintf(stderr, "\tout of free texcoords to write fog coordinate\n");
- _mesa_exit(-1);
+ exit(-1);
}
R300_NEWPRIM(rmesa);
@@ -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 de6e6e166aa..8dd85073954 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -211,7 +211,7 @@ static void r300TexParameter(GLcontext * ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- r300SetTexBorderColor(t, texObj->BorderColor);
+ r300SetTexBorderColor(t, texObj->BorderColor.f);
break;
case GL_TEXTURE_BASE_LEVEL:
@@ -303,12 +303,12 @@ static struct gl_texture_object *r300NewTextureObject(GLcontext * ctx,
/* Initialize hardware state */
r300UpdateTexWrap(t);
r300SetTexFilter(t, t->base.MinFilter, t->base.MagFilter, t->base.MaxAnisotropy);
- r300SetTexBorderColor(t, t->base.BorderColor);
+ r300SetTexBorderColor(t, t->base.BorderColor.f);
return &t->base;
}
-void r300InitTextureFuncs(struct dd_function_table *functions)
+void r300InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions)
{
/* Note: we only plug in the functions we implement in the driver
* since _mesa_init_driver_functions() was already called.
@@ -336,6 +336,11 @@ void r300InitTextureFuncs(struct dd_function_table *functions)
functions->CompressedTexImage2D = radeonCompressedTexImage2D;
functions->CompressedTexSubImage2D = radeonCompressedTexSubImage2D;
+ if (radeon->radeonScreen->kernel_mm) {
+ functions->CopyTexImage2D = radeonCopyTexImage2D;
+ functions->CopyTexSubImage2D = radeonCopyTexSubImage2D;
+ }
+
functions->GenerateMipmap = radeonGenerateMipmap;
driInitTextureFormats();
diff --git a/src/mesa/drivers/dri/r300/r300_tex.h b/src/mesa/drivers/dri/r300/r300_tex.h
index 8a653ea2d11..9694e703b83 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.h
+++ b/src/mesa/drivers/dri/r300/r300_tex.h
@@ -49,6 +49,8 @@ extern void r300SetTexOffset(__DRIcontext *pDRICtx, GLint texname,
extern GLboolean r300ValidateBuffers(GLcontext * ctx);
-extern void r300InitTextureFuncs(struct dd_function_table *functions);
+extern void r300InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions);
+
+int32_t r300TranslateTexFormat(gl_format mesaFormat);
#endif /* __r300_TEX_H__ */
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index 1dc5f822d95..09e046859a4 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -49,14 +49,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r300_tex.h"
#include "r300_reg.h"
-#define VALID_FORMAT(f) ( ((f) <= MESA_FORMAT_RGBA_DXT5 \
- || ((f) >= MESA_FORMAT_RGBA_FLOAT32 && \
- (f) <= MESA_FORMAT_INTENSITY_FLOAT16)) \
- && tx_table[f].flag )
-
-#define _ASSIGN(entry, format) \
- [ MESA_FORMAT_ ## entry ] = { format, 0, 1}
-
/*
* Note that the _REV formats are the same as the non-REV formats. This is
* because the REV and non-REV formats are identical as a byte string, but
@@ -66,67 +58,119 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* identically. -- paulus
*/
-static const struct tx_table {
- GLuint format, filter, flag;
-} tx_table[] = {
- /* *INDENT-OFF* */
+int32_t r300TranslateTexFormat(gl_format mesaFormat)
+{
+ switch (mesaFormat)
+ {
#ifdef MESA_LITTLE_ENDIAN
- _ASSIGN(RGBA8888, R300_EASY_TX_FORMAT(Y, Z, W, X, W8Z8Y8X8)),
- _ASSIGN(RGBA8888_REV, R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8)),
- _ASSIGN(ARGB8888, R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)),
- _ASSIGN(ARGB8888_REV, R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8)),
+ case MESA_FORMAT_RGBA8888:
+ return R300_EASY_TX_FORMAT(Y, Z, W, X, W8Z8Y8X8);
+ case MESA_FORMAT_RGBA8888_REV:
+ return R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8);
+ case MESA_FORMAT_ARGB8888:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8);
+ case MESA_FORMAT_ARGB8888_REV:
+ return R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8);
#else
- _ASSIGN(RGBA8888, R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8)),
- _ASSIGN(RGBA8888_REV, R300_EASY_TX_FORMAT(Y, Z, W, X, W8Z8Y8X8)),
- _ASSIGN(ARGB8888, R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8)),
- _ASSIGN(ARGB8888_REV, R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)),
+ case MESA_FORMAT_RGBA8888:
+ return R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8);
+ case MESA_FORMAT_RGBA8888_REV:
+ return R300_EASY_TX_FORMAT(Y, Z, W, X, W8Z8Y8X8);
+ case MESA_FORMAT_ARGB8888:
+ return R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8);
+ case MESA_FORMAT_ARGB8888_REV:
+ return 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)),
- _ASSIGN(ARGB4444, R300_EASY_TX_FORMAT(X, Y, Z, W, W4Z4Y4X4)),
- _ASSIGN(ARGB4444_REV, R300_EASY_TX_FORMAT(X, Y, Z, W, W4Z4Y4X4)),
- _ASSIGN(ARGB1555, R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5)),
- _ASSIGN(ARGB1555_REV, R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5)),
- _ASSIGN(AL88, R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8)),
- _ASSIGN(AL88_REV, R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8)),
- _ASSIGN(RGB332, R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z3Y3X2)),
- _ASSIGN(A8, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, X8)),
- _ASSIGN(L8, R300_EASY_TX_FORMAT(X, X, X, ONE, X8)),
- _ASSIGN(I8, R300_EASY_TX_FORMAT(X, X, X, X, X8)),
- _ASSIGN(CI8, R300_EASY_TX_FORMAT(X, X, X, X, X8)),
- _ASSIGN(YCBCR, R300_EASY_TX_FORMAT(X, Y, Z, ONE, G8R8_G8B8) | R300_TX_FORMAT_YUV_MODE),
- _ASSIGN(YCBCR_REV, R300_EASY_TX_FORMAT(X, Y, Z, ONE, G8R8_G8B8) | R300_TX_FORMAT_YUV_MODE),
- _ASSIGN(RGB_DXT1, R300_EASY_TX_FORMAT(X, Y, Z, ONE, DXT1)),
- _ASSIGN(RGBA_DXT1, R300_EASY_TX_FORMAT(X, Y, Z, W, DXT1)),
- _ASSIGN(RGBA_DXT3, R300_EASY_TX_FORMAT(X, Y, Z, W, DXT3)),
- _ASSIGN(RGBA_DXT5, R300_EASY_TX_FORMAT(Y, Z, W, X, DXT5)),
- _ASSIGN(RGBA_FLOAT32, R300_EASY_TX_FORMAT(Z, Y, X, W, FL_R32G32B32A32)),
- _ASSIGN(RGBA_FLOAT16, R300_EASY_TX_FORMAT(Z, Y, X, W, FL_R16G16B16A16)),
- _ASSIGN(RGB_FLOAT32, 0xffffffff),
- _ASSIGN(RGB_FLOAT16, 0xffffffff),
- _ASSIGN(ALPHA_FLOAT32, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, FL_I32)),
- _ASSIGN(ALPHA_FLOAT16, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, FL_I16)),
- _ASSIGN(LUMINANCE_FLOAT32, R300_EASY_TX_FORMAT(X, X, X, ONE, FL_I32)),
- _ASSIGN(LUMINANCE_FLOAT16, R300_EASY_TX_FORMAT(X, X, X, ONE, FL_I16)),
- _ASSIGN(LUMINANCE_ALPHA_FLOAT32, R300_EASY_TX_FORMAT(X, X, X, Y, FL_I32A32)),
- _ASSIGN(LUMINANCE_ALPHA_FLOAT16, R300_EASY_TX_FORMAT(X, X, X, Y, FL_I16A16)),
- _ASSIGN(INTENSITY_FLOAT32, R300_EASY_TX_FORMAT(X, X, X, X, FL_I32)),
- _ASSIGN(INTENSITY_FLOAT16, R300_EASY_TX_FORMAT(X, X, X, X, FL_I16)),
- _ASSIGN(Z16, R300_EASY_TX_FORMAT(X, X, X, X, X16)),
- _ASSIGN(Z24_S8, R300_EASY_TX_FORMAT(X, X, X, X, X24_Y8)),
- _ASSIGN(S8_Z24, R300_EASY_TX_FORMAT(Y, Y, Y, Y, X24_Y8)),
- _ASSIGN(Z32, R300_EASY_TX_FORMAT(X, X, X, X, X32)),
- /* EXT_texture_sRGB */
- _ASSIGN(SRGBA8, R300_EASY_TX_FORMAT(Y, Z, W, X, W8Z8Y8X8) | R300_TX_FORMAT_GAMMA),
- _ASSIGN(SLA8, R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8) | R300_TX_FORMAT_GAMMA),
- _ASSIGN(SL8, R300_EASY_TX_FORMAT(X, X, X, ONE, X8) | R300_TX_FORMAT_GAMMA),
- /* *INDENT-ON* */
+ case MESA_FORMAT_XRGB8888:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8);
+ case MESA_FORMAT_RGB888:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8);
+ case MESA_FORMAT_RGB565:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5);
+ case MESA_FORMAT_RGB565_REV:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5);
+ case MESA_FORMAT_ARGB4444:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, W4Z4Y4X4);
+ case MESA_FORMAT_ARGB4444_REV:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, W4Z4Y4X4);
+ case MESA_FORMAT_ARGB1555:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5);
+ case MESA_FORMAT_ARGB1555_REV:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5);
+ case MESA_FORMAT_AL88:
+ return R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8);
+ case MESA_FORMAT_AL88_REV:
+ return R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8);
+ case MESA_FORMAT_RGB332:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z3Y3X2);
+ case MESA_FORMAT_A8:
+ return R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, X8);
+ case MESA_FORMAT_L8:
+ return R300_EASY_TX_FORMAT(X, X, X, ONE, X8);
+ case MESA_FORMAT_I8:
+ return R300_EASY_TX_FORMAT(X, X, X, X, X8);
+ case MESA_FORMAT_CI8:
+ return R300_EASY_TX_FORMAT(X, X, X, X, X8);
+ case MESA_FORMAT_YCBCR:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, G8R8_G8B8) | R300_TX_FORMAT_YUV_MODE;
+ case MESA_FORMAT_YCBCR_REV:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, G8R8_G8B8) | R300_TX_FORMAT_YUV_MODE;
+ case MESA_FORMAT_RGB_DXT1:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, DXT1);
+ case MESA_FORMAT_RGBA_DXT1:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, DXT1);
+ case MESA_FORMAT_RGBA_DXT3:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, DXT3);
+ case MESA_FORMAT_RGBA_DXT5:
+ return R300_EASY_TX_FORMAT(Y, Z, W, X, DXT5);
+ case MESA_FORMAT_RGBA_FLOAT32:
+ return R300_EASY_TX_FORMAT(Z, Y, X, W, FL_R32G32B32A32);
+ case MESA_FORMAT_RGBA_FLOAT16:
+ return R300_EASY_TX_FORMAT(Z, Y, X, W, FL_R16G16B16A16);
+ case MESA_FORMAT_ALPHA_FLOAT32:
+ return R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, FL_I32);
+ case MESA_FORMAT_ALPHA_FLOAT16:
+ return R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, FL_I16);
+ case MESA_FORMAT_LUMINANCE_FLOAT32:
+ return R300_EASY_TX_FORMAT(X, X, X, ONE, FL_I32);
+ case MESA_FORMAT_LUMINANCE_FLOAT16:
+ return R300_EASY_TX_FORMAT(X, X, X, ONE, FL_I16);
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
+ return R300_EASY_TX_FORMAT(X, X, X, Y, FL_I32A32);
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
+ return R300_EASY_TX_FORMAT(X, X, X, Y, FL_I16A16);
+ case MESA_FORMAT_INTENSITY_FLOAT32:
+ return R300_EASY_TX_FORMAT(X, X, X, X, FL_I32);
+ case MESA_FORMAT_INTENSITY_FLOAT16:
+ return R300_EASY_TX_FORMAT(X, X, X, X, FL_I16);
+ case MESA_FORMAT_Z16:
+ return R300_EASY_TX_FORMAT(X, X, X, X, X16);
+ case MESA_FORMAT_Z24_S8:
+ return R300_EASY_TX_FORMAT(X, X, X, X, X24_Y8);
+ case MESA_FORMAT_S8_Z24:
+ return R300_EASY_TX_FORMAT(Y, Y, Y, Y, X24_Y8);
+ case MESA_FORMAT_Z32:
+ return R300_EASY_TX_FORMAT(X, X, X, X, X32);
+ /* EXT_texture_sRGB */
+ case MESA_FORMAT_SRGBA8:
+ return R300_EASY_TX_FORMAT(Y, Z, W, X, W8Z8Y8X8) | R300_TX_FORMAT_GAMMA;
+ case MESA_FORMAT_SLA8:
+ return R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8) | R300_TX_FORMAT_GAMMA;
+ case MESA_FORMAT_SL8:
+ return R300_EASY_TX_FORMAT(X, X, X, ONE, X8) | R300_TX_FORMAT_GAMMA;
+ case MESA_FORMAT_SRGB_DXT1:
+ return R300_EASY_TX_FORMAT(X, Y, Z, ONE, DXT1) | R300_TX_FORMAT_GAMMA;
+ case MESA_FORMAT_SRGBA_DXT1:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, DXT1) | R300_TX_FORMAT_GAMMA;
+ case MESA_FORMAT_SRGBA_DXT3:
+ return R300_EASY_TX_FORMAT(X, Y, Z, W, DXT3) | R300_TX_FORMAT_GAMMA;
+ case MESA_FORMAT_SRGBA_DXT5:
+ return R300_EASY_TX_FORMAT(Y, Z, W, X, DXT5) | R300_TX_FORMAT_GAMMA;
+ default:
+ return -1;
+ }
};
-#undef _ASSIGN
-
void r300SetDepthTexMode(struct gl_texture_object *tObj)
{
static const GLuint formats[3][3] = {
@@ -203,19 +247,18 @@ static void setup_hardware_state(r300ContextPtr rmesa, radeonTexObj *t)
const struct gl_texture_image *firstImage;
firstImage = t->base.Image[0][t->minLod];
- if (!t->image_override
- && VALID_FORMAT(firstImage->TexFormat)) {
+ if (!t->image_override) {
if (firstImage->_BaseFormat == GL_DEPTH_COMPONENT) {
r300SetDepthTexMode(&t->base);
} else {
- t->pp_txformat = tx_table[firstImage->TexFormat].format;
+ int32_t txformat = r300TranslateTexFormat(firstImage->TexFormat);
+ if (txformat < 0) {
+ _mesa_problem(rmesa->radeon.glCtx, "%s: Invalid format %s",
+ __FUNCTION__, _mesa_get_format_name(firstImage->TexFormat));
+ exit(1);
+ }
+ t->pp_txformat = (uint32_t) txformat;
}
-
- t->pp_txfilter |= tx_table[firstImage->TexFormat].filter;
- } else if (!t->image_override) {
- _mesa_problem(NULL, "unexpected texture format in %s",
- __FUNCTION__);
- return;
}
if (t->image_override && t->bo)
@@ -355,18 +398,15 @@ void r300SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
switch (depth) {
case 32:
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8);
- t->pp_txfilter |= tx_table[2].filter;
pitch_val /= 4;
break;
case 24:
default:
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8);
- t->pp_txfilter |= tx_table[4].filter;
pitch_val /= 4;
break;
case 16:
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5);
- t->pp_txfilter |= tx_table[5].filter;
pitch_val /= 2;
break;
}
@@ -407,18 +447,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 */
@@ -456,18 +485,15 @@ void r300SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8);
else
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8);
- t->pp_txfilter |= tx_table[2].filter;
pitch_val /= 4;
break;
case 3:
default:
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8);
- t->pp_txfilter |= tx_table[4].filter;
pitch_val /= 4;
break;
case 2:
t->pp_txformat = R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5);
- t->pp_txfilter |= tx_table[5].filter;
pitch_val /= 2;
break;
}
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index bede6e0418d..e6fa57d439b 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -364,7 +364,7 @@ static void r300EmitVertexProgram(r300ContextPtr r300, int dest, struct r300_ver
break;
default:
fprintf(stderr, "%s:%s don't know how to handle dest %04x\n", __FILE__, __FUNCTION__, dest);
- _mesa_exit(-1);
+ exit(-1);
}
}
diff --git a/src/mesa/drivers/dri/r300/radeon_tex_copy.c b/src/mesa/drivers/dri/r300/radeon_tex_copy.c
new file mode 120000
index 00000000000..dfa5ba34e65
--- /dev/null
+++ b/src/mesa/drivers/dri/r300/radeon_tex_copy.c
@@ -0,0 +1 @@
+../radeon/radeon_tex_copy.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r300/server/radeon_egl.c b/src/mesa/drivers/dri/r300/server/radeon_egl.c
deleted file mode 120000
index d7735a76438..00000000000
--- a/src/mesa/drivers/dri/r300/server/radeon_egl.c
+++ /dev/null
@@ -1 +0,0 @@
-../../radeon/server/radeon_egl.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r600/Makefile b/src/mesa/drivers/dri/r600/Makefile
index 26f47b72687..5d509415393 100644
--- a/src/mesa/drivers/dri/r600/Makefile
+++ b/src/mesa/drivers/dri/r600/Makefile
@@ -9,10 +9,6 @@ LIBNAME = r600_dri.so
MINIGLX_SOURCES = server/radeon_dri.c
-ifeq ($(USING_EGL), 1)
-EGL_SOURCES = server/radeon_egl.c
-endif
-
ifeq ($(RADEON_LDFLAGS),)
CS_SOURCES = radeon_cs_space_drm.c radeon_bo.c radeon_cs.c
endif
@@ -39,7 +35,8 @@ RADEON_COMMON_SOURCES = \
radeon_mipmap_tree.c \
radeon_span.c \
radeon_texture.c \
- radeon_queryobj.c
+ radeon_queryobj.c \
+ radeon_tex_copy.c
DRIVER_SOURCES = \
radeon_screen.c \
@@ -59,6 +56,7 @@ DRIVER_SOURCES = \
r700_render.c \
r600_tex.c \
r600_texstate.c \
+ r600_blit.c \
r700_debug.c \
$(RADEON_COMMON_SOURCES) \
$(EGL_SOURCES) \
@@ -66,9 +64,8 @@ DRIVER_SOURCES = \
C_SOURCES = $(COMMON_SOURCES) $(DRIVER_SOURCES)
-DRIVER_DEFINES = -DRADEON_R600 \
+DRIVER_DEFINES = -DRADEON_R600
# -DRADEON_BO_TRACK \
- -Wall
DRI_LIB_DEPS += $(RADEON_LDFLAGS)
diff --git a/src/mesa/drivers/dri/r600/r600_blit.c b/src/mesa/drivers/dri/r600/r600_blit.c
new file mode 100644
index 00000000000..d7cd59ade62
--- /dev/null
+++ b/src/mesa/drivers/dri/r600/r600_blit.c
@@ -0,0 +1,1660 @@
+/*
+ * Copyright (C) 2009 Advanced Micro Devices, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "radeon_common.h"
+#include "r600_context.h"
+
+#include "r600_blit.h"
+#include "r600_blit_shaders.h"
+#include "r600_cmdbuf.h"
+
+/* common formats supported as both textures and render targets */
+static unsigned is_blit_supported(gl_format mesa_format)
+{
+ switch (mesa_format) {
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_SIGNED_RGBA8888:
+ case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_SIGNED_RGBA8888_REV:
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_ARGB8888_REV:
+ case MESA_FORMAT_XRGB8888_REV:
+ case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_RGB565_REV:
+ case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB4444_REV:
+ case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_ARGB1555_REV:
+ case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_REV:
+ case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_A8:
+ case MESA_FORMAT_I8:
+ case MESA_FORMAT_CI8:
+ case MESA_FORMAT_L8:
+ case MESA_FORMAT_RGBA_FLOAT32:
+ case MESA_FORMAT_RGBA_FLOAT16:
+ case MESA_FORMAT_ALPHA_FLOAT32:
+ case MESA_FORMAT_ALPHA_FLOAT16:
+ case MESA_FORMAT_LUMINANCE_FLOAT32:
+ case MESA_FORMAT_LUMINANCE_FLOAT16:
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
+ case MESA_FORMAT_INTENSITY_FLOAT32: /* X, X, X, X */
+ case MESA_FORMAT_INTENSITY_FLOAT16: /* X, X, X, X */
+ case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z32:
+ case MESA_FORMAT_SRGBA8:
+ case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_SL8:
+ break;
+ default:
+ return 0;
+ }
+
+ /* ??? */
+ /* not sure blit to depth works or not yet */
+ if (_mesa_get_format_bits(mesa_format, GL_DEPTH_BITS) > 0)
+ return 0;
+
+ return 1;
+}
+
+static inline void
+set_render_target(context_t *context, struct radeon_bo *bo, gl_format mesa_format,
+ int nPitchInPixel, int w, int h, intptr_t dst_offset)
+{
+ uint32_t cb_color0_base, cb_color0_size = 0, cb_color0_info = 0, cb_color0_view = 0;
+ int id = 0;
+ uint32_t comp_swap, format;
+ BATCH_LOCALS(&context->radeon);
+
+ cb_color0_base = dst_offset / 256;
+
+ SETfield(cb_color0_size, (nPitchInPixel / 8) - 1,
+ PITCH_TILE_MAX_shift, PITCH_TILE_MAX_mask);
+ SETfield(cb_color0_size, ((nPitchInPixel * h) / 64) - 1,
+ SLICE_TILE_MAX_shift, SLICE_TILE_MAX_mask);
+
+ SETfield(cb_color0_info, ENDIAN_NONE, ENDIAN_shift, ENDIAN_mask);
+ SETfield(cb_color0_info, ARRAY_LINEAR_GENERAL,
+ CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask);
+
+ SETbit(cb_color0_info, BLEND_BYPASS_bit);
+
+ switch(mesa_format) {
+ case MESA_FORMAT_RGBA8888:
+ format = COLOR_8_8_8_8;
+ comp_swap = SWAP_STD_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_SIGNED_RGBA8888:
+ format = COLOR_8_8_8_8;
+ comp_swap = SWAP_STD_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_SNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_RGBA8888_REV:
+ format = COLOR_8_8_8_8;
+ comp_swap = SWAP_STD;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_SIGNED_RGBA8888_REV:
+ format = COLOR_8_8_8_8;
+ comp_swap = SWAP_STD;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_SNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_XRGB8888:
+ format = COLOR_8_8_8_8;
+ comp_swap = SWAP_ALT;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_ARGB8888_REV:
+ case MESA_FORMAT_XRGB8888_REV:
+ format = COLOR_8_8_8_8;
+ comp_swap = SWAP_ALT_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_RGB565:
+ format = COLOR_5_6_5;
+ comp_swap = SWAP_STD_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_RGB565_REV:
+ format = COLOR_5_6_5;
+ comp_swap = SWAP_STD;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_ARGB4444:
+ format = COLOR_4_4_4_4;
+ comp_swap = SWAP_ALT;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_ARGB4444_REV:
+ format = COLOR_4_4_4_4;
+ comp_swap = SWAP_ALT_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_ARGB1555:
+ format = COLOR_1_5_5_5;
+ comp_swap = SWAP_ALT;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_ARGB1555_REV:
+ format = COLOR_1_5_5_5;
+ comp_swap = SWAP_ALT_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_AL88:
+ format = COLOR_8_8;
+ comp_swap = SWAP_STD;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_AL88_REV:
+ format = COLOR_8_8;
+ comp_swap = SWAP_STD_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_RGB332:
+ format = COLOR_3_3_2;
+ comp_swap = SWAP_STD_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_A8:
+ format = COLOR_8;
+ comp_swap = SWAP_ALT_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_I8:
+ case MESA_FORMAT_CI8:
+ format = COLOR_8;
+ comp_swap = SWAP_STD;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_L8:
+ format = COLOR_8;
+ comp_swap = SWAP_ALT;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_RGBA_FLOAT32:
+ format = COLOR_32_32_32_32_FLOAT;
+ comp_swap = SWAP_STD_REV;
+ SETbit(cb_color0_info, BLEND_FLOAT32_bit);
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_RGBA_FLOAT16:
+ format = COLOR_16_16_16_16_FLOAT;
+ comp_swap = SWAP_STD_REV;
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_ALPHA_FLOAT32:
+ format = COLOR_32_FLOAT;
+ comp_swap = SWAP_ALT_REV;
+ SETbit(cb_color0_info, BLEND_FLOAT32_bit);
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_ALPHA_FLOAT16:
+ format = COLOR_16_FLOAT;
+ comp_swap = SWAP_ALT_REV;
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_LUMINANCE_FLOAT32:
+ format = COLOR_32_FLOAT;
+ comp_swap = SWAP_ALT;
+ SETbit(cb_color0_info, BLEND_FLOAT32_bit);
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_LUMINANCE_FLOAT16:
+ format = COLOR_16_FLOAT;
+ comp_swap = SWAP_ALT;
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
+ format = COLOR_32_32_FLOAT;
+ comp_swap = SWAP_ALT_REV;
+ SETbit(cb_color0_info, BLEND_FLOAT32_bit);
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
+ format = COLOR_16_16_FLOAT;
+ comp_swap = SWAP_ALT_REV;
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_INTENSITY_FLOAT32: /* X, X, X, X */
+ format = COLOR_32_FLOAT;
+ comp_swap = SWAP_STD;
+ SETbit(cb_color0_info, BLEND_FLOAT32_bit);
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_INTENSITY_FLOAT16: /* X, X, X, X */
+ format = COLOR_16_FLOAT;
+ comp_swap = SWAP_STD;
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_FLOAT, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_S8_Z24:
+ format = COLOR_8_24;
+ comp_swap = SWAP_STD;
+ SETfield(cb_color0_info, ARRAY_1D_TILED_THIN1,
+ CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask);
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_Z24_S8:
+ format = COLOR_24_8;
+ comp_swap = SWAP_STD;
+ SETfield(cb_color0_info, ARRAY_1D_TILED_THIN1,
+ CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask);
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_Z16:
+ format = COLOR_16;
+ comp_swap = SWAP_STD;
+ SETfield(cb_color0_info, ARRAY_1D_TILED_THIN1,
+ CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask);
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_Z32:
+ format = COLOR_32;
+ comp_swap = SWAP_STD;
+ SETfield(cb_color0_info, ARRAY_1D_TILED_THIN1,
+ CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask);
+ CLEARbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_SRGBA8:
+ format = COLOR_8_8_8_8;
+ comp_swap = SWAP_STD_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_SRGB, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_SLA8:
+ format = COLOR_8_8;
+ comp_swap = SWAP_ALT_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_SRGB, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ case MESA_FORMAT_SL8:
+ format = COLOR_8;
+ comp_swap = SWAP_ALT_REV;
+ SETbit(cb_color0_info, SOURCE_FORMAT_bit);
+ SETfield(cb_color0_info, NUMBER_SRGB, NUMBER_TYPE_shift, NUMBER_TYPE_mask);
+ break;
+ default:
+ fprintf(stderr,"Invalid format for copy %s\n",_mesa_get_format_name(mesa_format));
+ assert("Invalid format for US output\n");
+ return;
+ }
+
+ SETfield(cb_color0_info, format, CB_COLOR0_INFO__FORMAT_shift,
+ CB_COLOR0_INFO__FORMAT_mask);
+ SETfield(cb_color0_info, comp_swap, COMP_SWAP_shift, COMP_SWAP_mask);
+
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(CB_COLOR0_BASE + (4 * id), 1);
+ R600_OUT_BATCH(cb_color0_base);
+ R600_OUT_BATCH_RELOC(0,
+ bo,
+ 0,
+ 0, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
+ END_BATCH();
+
+ if ((context->radeon.radeonScreen->chip_family > CHIP_FAMILY_R600) &&
+ (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770)) {
+ BEGIN_BATCH_NO_AUTOSTATE(2);
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_SURFACE_BASE_UPDATE, 0));
+ R600_OUT_BATCH((2 << id));
+ END_BATCH();
+ }
+
+ /* Set CMASK & TILE buffer to the offset of color buffer as
+ * we don't use those this shouldn't cause any issue and we
+ * then have a valid cmd stream
+ */
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(CB_COLOR0_TILE + (4 * id), 1);
+ R600_OUT_BATCH(cb_color0_base);
+ R600_OUT_BATCH_RELOC(0,
+ bo,
+ 0,
+ 0, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
+ END_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(CB_COLOR0_FRAG + (4 * id), 1);
+ R600_OUT_BATCH(cb_color0_base);
+ R600_OUT_BATCH_RELOC(0,
+ bo,
+ 0,
+ 0, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0);
+ END_BATCH();
+
+ BEGIN_BATCH_NO_AUTOSTATE(12);
+ R600_OUT_BATCH_REGVAL(CB_COLOR0_SIZE + (4 * id), cb_color0_size);
+ R600_OUT_BATCH_REGVAL(CB_COLOR0_VIEW + (4 * id), cb_color0_view);
+ R600_OUT_BATCH_REGVAL(CB_COLOR0_INFO + (4 * id), cb_color0_info);
+ R600_OUT_BATCH_REGVAL(CB_COLOR0_MASK + (4 * id), 0);
+ END_BATCH();
+
+ COMMIT_BATCH();
+
+}
+
+static inline void load_shaders(GLcontext * ctx)
+{
+
+ radeonContextPtr radeonctx = RADEON_CONTEXT(ctx);
+ context_t *context = R700_CONTEXT(ctx);
+ int i, size;
+ uint32_t *shader;
+
+ if (context->blit_bo_loaded == 1)
+ return;
+
+ size = 4096;
+ context->blit_bo = radeon_bo_open(radeonctx->radeonScreen->bom, 0,
+ size, 256, RADEON_GEM_DOMAIN_GTT, 0);
+ radeon_bo_map(context->blit_bo, 1);
+ shader = context->blit_bo->ptr;
+
+ for(i=0; i<sizeof(r6xx_vs)/4; i++) {
+ shader[128+i] = r6xx_vs[i];
+ }
+ for(i=0; i<sizeof(r6xx_ps)/4; i++) {
+ shader[256+i] = r6xx_ps[i];
+ }
+
+ radeon_bo_unmap(context->blit_bo);
+ context->blit_bo_loaded = 1;
+
+}
+
+static inline void
+set_shaders(context_t *context)
+{
+ struct radeon_bo * pbo = context->blit_bo;
+ BATCH_LOCALS(&context->radeon);
+
+ uint32_t sq_pgm_start_fs = (512 >> 8);
+ uint32_t sq_pgm_resources_fs = 0;
+ uint32_t sq_pgm_cf_offset_fs = 0;
+
+ uint32_t sq_pgm_start_vs = (512 >> 8);
+ uint32_t sq_pgm_resources_vs = (1 << NUM_GPRS_shift);
+ uint32_t sq_pgm_cf_offset_vs = 0;
+
+ uint32_t sq_pgm_start_ps = (1024 >> 8);
+ uint32_t sq_pgm_resources_ps = (1 << NUM_GPRS_shift);
+ uint32_t sq_pgm_cf_offset_ps = 0;
+ uint32_t sq_pgm_exports_ps = (1 << 1);
+
+ r700SyncSurf(context, pbo, RADEON_GEM_DOMAIN_GTT, 0, SH_ACTION_ENA_bit);
+
+ /* FS */
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(SQ_PGM_START_FS, 1);
+ R600_OUT_BATCH(sq_pgm_start_fs);
+ R600_OUT_BATCH_RELOC(sq_pgm_start_fs,
+ pbo,
+ sq_pgm_start_fs,
+ RADEON_GEM_DOMAIN_GTT, 0, 0);
+ END_BATCH();
+
+ BEGIN_BATCH_NO_AUTOSTATE(6);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_RESOURCES_FS, sq_pgm_resources_fs);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_CF_OFFSET_FS, sq_pgm_cf_offset_fs);
+ END_BATCH();
+
+ /* VS */
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(SQ_PGM_START_VS, 1);
+ R600_OUT_BATCH(sq_pgm_start_vs);
+ R600_OUT_BATCH_RELOC(sq_pgm_start_vs,
+ pbo,
+ sq_pgm_start_vs,
+ RADEON_GEM_DOMAIN_GTT, 0, 0);
+ END_BATCH();
+
+ BEGIN_BATCH_NO_AUTOSTATE(6);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_RESOURCES_VS, sq_pgm_resources_vs);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_CF_OFFSET_VS, sq_pgm_cf_offset_vs);
+ END_BATCH();
+
+ /* PS */
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(SQ_PGM_START_PS, 1);
+ R600_OUT_BATCH(sq_pgm_start_ps);
+ R600_OUT_BATCH_RELOC(sq_pgm_start_ps,
+ pbo,
+ sq_pgm_start_ps,
+ RADEON_GEM_DOMAIN_GTT, 0, 0);
+ END_BATCH();
+
+ BEGIN_BATCH_NO_AUTOSTATE(9);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_RESOURCES_PS, sq_pgm_resources_ps);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_EXPORTS_PS, sq_pgm_exports_ps);
+ R600_OUT_BATCH_REGVAL(SQ_PGM_CF_OFFSET_PS, sq_pgm_cf_offset_ps);
+ END_BATCH();
+
+ BEGIN_BATCH_NO_AUTOSTATE(18);
+ R600_OUT_BATCH_REGVAL(SPI_VS_OUT_CONFIG, 0); //EXPORT_COUNT is - 1
+ R600_OUT_BATCH_REGVAL(SPI_VS_OUT_ID_0, 0);
+ R600_OUT_BATCH_REGVAL(SPI_PS_INPUT_CNTL_0, SEL_CENTROID_bit);
+ R600_OUT_BATCH_REGVAL(SPI_PS_IN_CONTROL_0, (1 << NUM_INTERP_shift));
+ R600_OUT_BATCH_REGVAL(SPI_PS_IN_CONTROL_1, 0);
+ R600_OUT_BATCH_REGVAL(SPI_INTERP_CONTROL_0, 0);
+ END_BATCH();
+
+ COMMIT_BATCH();
+
+}
+
+static inline void
+set_vtx_resource(context_t *context)
+{
+ struct radeon_bo *bo = context->blit_bo;
+ BATCH_LOCALS(&context->radeon);
+
+ BEGIN_BATCH_NO_AUTOSTATE(6);
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_CTL_CONST, 1));
+ R600_OUT_BATCH(mmSQ_VTX_BASE_VTX_LOC - ASIC_CTL_CONST_BASE_INDEX);
+ R600_OUT_BATCH(0);
+
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_CTL_CONST, 1));
+ R600_OUT_BATCH(mmSQ_VTX_START_INST_LOC - ASIC_CTL_CONST_BASE_INDEX);
+ R600_OUT_BATCH(0);
+ END_BATCH();
+ COMMIT_BATCH();
+
+ if ((context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV610) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV620) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RS780) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RS880) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV710))
+ r700SyncSurf(context, bo, RADEON_GEM_DOMAIN_GTT, 0, TC_ACTION_ENA_bit);
+ else
+ r700SyncSurf(context, bo, RADEON_GEM_DOMAIN_GTT, 0, VC_ACTION_ENA_bit);
+
+ BEGIN_BATCH_NO_AUTOSTATE(9 + 2);
+
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_RESOURCE, 7));
+ R600_OUT_BATCH(SQ_FETCH_RESOURCE_VS_OFFSET * FETCH_RESOURCE_STRIDE);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(48 - 1);
+ R600_OUT_BATCH(16 << SQ_VTX_CONSTANT_WORD2_0__STRIDE_shift);
+ R600_OUT_BATCH(1 << MEM_REQUEST_SIZE_shift);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(SQ_TEX_VTX_VALID_BUFFER << SQ_TEX_RESOURCE_WORD6_0__TYPE_shift);
+ R600_OUT_BATCH_RELOC(SQ_VTX_CONSTANT_WORD0_0,
+ bo,
+ SQ_VTX_CONSTANT_WORD0_0,
+ RADEON_GEM_DOMAIN_GTT, 0, 0);
+ END_BATCH();
+ COMMIT_BATCH();
+
+}
+
+static inline void
+set_tex_resource(context_t * context,
+ gl_format mesa_format, struct radeon_bo *bo, int w, int h,
+ int TexelPitch, intptr_t src_offset)
+{
+ uint32_t sq_tex_resource0, sq_tex_resource1, sq_tex_resource2, sq_tex_resource4, sq_tex_resource6;
+
+ sq_tex_resource0 = sq_tex_resource1 = sq_tex_resource2 = sq_tex_resource4 = sq_tex_resource6 = 0;
+ BATCH_LOCALS(&context->radeon);
+
+ SETfield(sq_tex_resource0, SQ_TEX_DIM_2D, DIM_shift, DIM_mask);
+ SETfield(sq_tex_resource0, ARRAY_LINEAR_GENERAL,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_shift,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_mask);
+
+ switch (mesa_format) {
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_SIGNED_RGBA8888:
+ SETfield(sq_tex_resource1, FMT_8_8_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ if (mesa_format == MESA_FORMAT_SIGNED_RGBA8888) {
+ SETfield(sq_tex_resource4, SQ_FORMAT_COMP_SIGNED,
+ FORMAT_COMP_X_shift, FORMAT_COMP_X_mask);
+ SETfield(sq_tex_resource4, SQ_FORMAT_COMP_SIGNED,
+ FORMAT_COMP_Y_shift, FORMAT_COMP_Y_mask);
+ SETfield(sq_tex_resource4, SQ_FORMAT_COMP_SIGNED,
+ FORMAT_COMP_Z_shift, FORMAT_COMP_Z_mask);
+ SETfield(sq_tex_resource4, SQ_FORMAT_COMP_SIGNED,
+ FORMAT_COMP_W_shift, FORMAT_COMP_W_mask);
+ }
+ break;
+ case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_SIGNED_RGBA8888_REV:
+ SETfield(sq_tex_resource1, FMT_8_8_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ if (mesa_format == MESA_FORMAT_SIGNED_RGBA8888_REV) {
+ SETfield(sq_tex_resource4, SQ_FORMAT_COMP_SIGNED,
+ FORMAT_COMP_X_shift, FORMAT_COMP_X_mask);
+ SETfield(sq_tex_resource4, SQ_FORMAT_COMP_SIGNED,
+ FORMAT_COMP_Y_shift, FORMAT_COMP_Y_mask);
+ SETfield(sq_tex_resource4, SQ_FORMAT_COMP_SIGNED,
+ FORMAT_COMP_Z_shift, FORMAT_COMP_Z_mask);
+ SETfield(sq_tex_resource4, SQ_FORMAT_COMP_SIGNED,
+ FORMAT_COMP_W_shift, FORMAT_COMP_W_mask);
+ }
+ break;
+ case MESA_FORMAT_ARGB8888:
+ SETfield(sq_tex_resource1, FMT_8_8_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_XRGB8888:
+ SETfield(sq_tex_resource1, FMT_8_8_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_ARGB8888_REV:
+ SETfield(sq_tex_resource1, FMT_8_8_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_XRGB8888_REV:
+ SETfield(sq_tex_resource1, FMT_8_8_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_RGB565:
+ SETfield(sq_tex_resource1, FMT_5_6_5,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_RGB565_REV:
+ SETfield(sq_tex_resource1, FMT_5_6_5,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_ARGB4444:
+ SETfield(sq_tex_resource1, FMT_4_4_4_4,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_ARGB4444_REV:
+ SETfield(sq_tex_resource1, FMT_4_4_4_4,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_ARGB1555:
+ SETfield(sq_tex_resource1, FMT_1_5_5_5,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_ARGB1555_REV:
+ SETfield(sq_tex_resource1, FMT_1_5_5_5,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_REV: /* TODO : Check this. */
+ SETfield(sq_tex_resource1, FMT_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_RGB332:
+ SETfield(sq_tex_resource1, FMT_3_3_2,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_A8: /* ZERO, ZERO, ZERO, X */
+ SETfield(sq_tex_resource1, FMT_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_L8: /* X, X, X, ONE */
+ SETfield(sq_tex_resource1, FMT_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_I8: /* X, X, X, X */
+ case MESA_FORMAT_CI8:
+ SETfield(sq_tex_resource1, FMT_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_RGBA_FLOAT32:
+ SETfield(sq_tex_resource1, FMT_32_32_32_32_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_RGBA_FLOAT16:
+ SETfield(sq_tex_resource1, FMT_16_16_16_16_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_ALPHA_FLOAT32: /* ZERO, ZERO, ZERO, X */
+ SETfield(sq_tex_resource1, FMT_32_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_ALPHA_FLOAT16: /* ZERO, ZERO, ZERO, X */
+ SETfield(sq_tex_resource1, FMT_16_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_LUMINANCE_FLOAT32: /* X, X, X, ONE */
+ SETfield(sq_tex_resource1, FMT_32_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_LUMINANCE_FLOAT16: /* X, X, X, ONE */
+ SETfield(sq_tex_resource1, FMT_16_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
+ SETfield(sq_tex_resource1, FMT_32_32_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
+ SETfield(sq_tex_resource1, FMT_16_16_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_INTENSITY_FLOAT32: /* X, X, X, X */
+ SETfield(sq_tex_resource1, FMT_32_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_INTENSITY_FLOAT16: /* X, X, X, X */
+ SETfield(sq_tex_resource1, FMT_16_FLOAT,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_Z16:
+ SETbit(sq_tex_resource0, TILE_TYPE_bit);
+ SETfield(sq_tex_resource0, ARRAY_1D_TILED_THIN1,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_shift,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_mask);
+ SETfield(sq_tex_resource1, FMT_16,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_X8_Z24:
+ SETbit(sq_tex_resource0, TILE_TYPE_bit);
+ SETfield(sq_tex_resource0, ARRAY_1D_TILED_THIN1,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_shift,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_mask);
+ SETfield(sq_tex_resource1, FMT_8_24,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_S8_Z24:
+ SETbit(sq_tex_resource0, TILE_TYPE_bit);
+ SETfield(sq_tex_resource0, ARRAY_1D_TILED_THIN1,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_shift,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_mask);
+ SETfield(sq_tex_resource1, FMT_8_24,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_Z24_S8:
+ SETbit(sq_tex_resource0, TILE_TYPE_bit);
+ SETfield(sq_tex_resource0, ARRAY_1D_TILED_THIN1,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_shift,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_mask);
+ SETfield(sq_tex_resource1, FMT_24_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_0,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_Z32:
+ SETbit(sq_tex_resource0, TILE_TYPE_bit);
+ SETfield(sq_tex_resource0, ARRAY_1D_TILED_THIN1,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_shift,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_mask);
+ SETfield(sq_tex_resource1, FMT_32,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_S8:
+ SETbit(sq_tex_resource0, TILE_TYPE_bit);
+ SETfield(sq_tex_resource0, ARRAY_1D_TILED_THIN1,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_shift,
+ SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_mask);
+ SETfield(sq_tex_resource1, FMT_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ break;
+ case MESA_FORMAT_SRGBA8:
+ SETfield(sq_tex_resource1, FMT_8_8_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_W,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Z,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ SETbit(sq_tex_resource4, SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit);
+ break;
+ case MESA_FORMAT_SLA8:
+ SETfield(sq_tex_resource1, FMT_8_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_Y,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ SETbit(sq_tex_resource4, SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit);
+ break;
+ case MESA_FORMAT_SL8: /* X, X, X, ONE */
+ SETfield(sq_tex_resource1, FMT_8,
+ SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask);
+
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_X,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask);
+ SETfield(sq_tex_resource4, SQ_SEL_1,
+ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask);
+ SETbit(sq_tex_resource4, SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit);
+ break;
+ default:
+ fprintf(stderr,"Invalid format for copy %s\n",_mesa_get_format_name(mesa_format));
+ assert("Invalid format for US output\n");
+ return;
+ };
+
+ SETfield(sq_tex_resource0, (TexelPitch/8)-1, PITCH_shift, PITCH_mask);
+ SETfield(sq_tex_resource0, w - 1, TEX_WIDTH_shift, TEX_WIDTH_mask);
+ SETfield(sq_tex_resource1, h - 1, TEX_HEIGHT_shift, TEX_HEIGHT_mask);
+
+ sq_tex_resource2 = src_offset / 256;
+
+ SETfield(sq_tex_resource6, SQ_TEX_VTX_VALID_TEXTURE,
+ SQ_TEX_RESOURCE_WORD6_0__TYPE_shift,
+ SQ_TEX_RESOURCE_WORD6_0__TYPE_mask);
+
+ r700SyncSurf(context, bo,
+ RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM,
+ 0, TC_ACTION_ENA_bit);
+
+ BEGIN_BATCH_NO_AUTOSTATE(9 + 4);
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_RESOURCE, 7));
+ R600_OUT_BATCH(0 * 7);
+
+ R600_OUT_BATCH(sq_tex_resource0);
+ R600_OUT_BATCH(sq_tex_resource1);
+ R600_OUT_BATCH(sq_tex_resource2);
+ R600_OUT_BATCH(0); //SQ_TEX_RESOURCE3
+ R600_OUT_BATCH(sq_tex_resource4);
+ R600_OUT_BATCH(0); //SQ_TEX_RESOURCE5
+ R600_OUT_BATCH(sq_tex_resource6);
+ R600_OUT_BATCH_RELOC(0,
+ bo,
+ 0,
+ RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
+ R600_OUT_BATCH_RELOC(0,
+ bo,
+ 0,
+ RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
+ END_BATCH();
+ COMMIT_BATCH();
+}
+
+static inline void
+set_tex_sampler(context_t * context)
+{
+ uint32_t sq_tex_sampler_word0 = 0, sq_tex_sampler_word1 = 0, sq_tex_sampler_word2 = 0;
+ int i = 0;
+
+ SETbit(sq_tex_sampler_word2, SQ_TEX_SAMPLER_WORD2_0__TYPE_bit);
+
+ BATCH_LOCALS(&context->radeon);
+
+ BEGIN_BATCH_NO_AUTOSTATE(5);
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_SAMPLER, 3));
+ R600_OUT_BATCH(i * 3);
+ R600_OUT_BATCH(sq_tex_sampler_word0);
+ R600_OUT_BATCH(sq_tex_sampler_word1);
+ R600_OUT_BATCH(sq_tex_sampler_word2);
+ END_BATCH();
+
+}
+
+static inline void
+set_scissors(context_t *context, int x1, int y1, int x2, int y2)
+{
+ BATCH_LOCALS(&context->radeon);
+
+ BEGIN_BATCH_NO_AUTOSTATE(17);
+ R600_OUT_BATCH_REGSEQ(PA_SC_SCREEN_SCISSOR_TL, 2);
+ R600_OUT_BATCH((x1 << 0) | (y1 << 16));
+ R600_OUT_BATCH((x2 << 0) | (y2 << 16));
+
+ R600_OUT_BATCH_REGSEQ(PA_SC_WINDOW_OFFSET, 3);
+ R600_OUT_BATCH(0); //PA_SC_WINDOW_OFFSET
+ R600_OUT_BATCH((x1 << 0) | (y1 << 16) | (WINDOW_OFFSET_DISABLE_bit)); //PA_SC_WINDOW_SCISSOR_TL
+ R600_OUT_BATCH((x2 << 0) | (y2 << 16));
+
+ R600_OUT_BATCH_REGSEQ(PA_SC_GENERIC_SCISSOR_TL, 2);
+ R600_OUT_BATCH((x1 << 0) | (y1 << 16) | (WINDOW_OFFSET_DISABLE_bit));
+ R600_OUT_BATCH((x2 << 0) | (y2 << 16));
+
+ /* XXX 16 of these PA_SC_VPORT_SCISSOR_0_TL_num ... */
+ R600_OUT_BATCH_REGSEQ(PA_SC_VPORT_SCISSOR_0_TL, 2 );
+ R600_OUT_BATCH((x1 << 0) | (y1 << 16) | (WINDOW_OFFSET_DISABLE_bit));
+ R600_OUT_BATCH((x2 << 0) | (y2 << 16));
+ END_BATCH();
+
+ COMMIT_BATCH();
+
+}
+
+static inline void
+set_vb_data(context_t * context, int src_x, int src_y, int dst_x, int dst_y,
+ int w, int h, int src_h, unsigned flip_y)
+{
+ float *vb;
+ radeon_bo_map(context->blit_bo, 1);
+ vb = context->blit_bo->ptr;
+
+ vb[0] = (float)(dst_x);
+ vb[1] = (float)(dst_y);
+ vb[2] = (float)(src_x);
+ vb[3] = (flip_y) ? (float)(src_h - src_y) : (float)src_y;
+
+ vb[4] = (float)(dst_x);
+ vb[5] = (float)(dst_y + h);
+ vb[6] = (float)(src_x);
+ vb[7] = (flip_y) ? (float)(src_h - (src_y + h)) : (float)(src_y + h);
+
+ vb[8] = (float)(dst_x + w);
+ vb[9] = (float)(dst_y + h);
+ vb[10] = (float)(src_x + w);
+ vb[11] = (flip_y) ? (float)(src_h - (src_y + h)) : (float)(src_y + h);
+
+ radeon_bo_unmap(context->blit_bo);
+
+}
+
+static inline void
+draw_auto(context_t *context)
+{
+ BATCH_LOCALS(&context->radeon);
+ uint32_t vgt_primitive_type = 0, vgt_index_type = 0, vgt_draw_initiator = 0, vgt_num_indices;
+
+ SETfield(vgt_primitive_type, DI_PT_RECTLIST,
+ VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift,
+ VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask);
+ SETfield(vgt_index_type, DI_INDEX_SIZE_16_BIT, INDEX_TYPE_shift,
+ INDEX_TYPE_mask);
+ SETfield(vgt_draw_initiator, DI_MAJOR_MODE_0, MAJOR_MODE_shift,
+ MAJOR_MODE_mask);
+ SETfield(vgt_draw_initiator, DI_SRC_SEL_AUTO_INDEX, SOURCE_SELECT_shift,
+ SOURCE_SELECT_mask);
+
+ vgt_num_indices = 3;
+
+ BEGIN_BATCH_NO_AUTOSTATE(10);
+ // 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);
+ //
+ R600_OUT_BATCH(CP_PACKET3(R600_IT_DRAW_INDEX_AUTO, 1));
+ R600_OUT_BATCH(vgt_num_indices);
+ R600_OUT_BATCH(vgt_draw_initiator);
+
+ END_BATCH();
+ COMMIT_BATCH();
+}
+
+static inline void
+set_default_state(context_t *context)
+{
+ int ps_prio = 0;
+ int vs_prio = 1;
+ int gs_prio = 2;
+ int es_prio = 3;
+ int num_ps_gprs;
+ int num_vs_gprs;
+ int num_gs_gprs;
+ int num_es_gprs;
+ int num_temp_gprs;
+ int num_ps_threads;
+ int num_vs_threads;
+ int num_gs_threads;
+ int num_es_threads;
+ int num_ps_stack_entries;
+ int num_vs_stack_entries;
+ int num_gs_stack_entries;
+ int num_es_stack_entries;
+ uint32_t sq_config, sq_gpr_resource_mgmt_1, sq_gpr_resource_mgmt_2;
+ uint32_t sq_thread_resource_mgmt, sq_stack_resource_mgmt_1, sq_stack_resource_mgmt_2;
+ uint32_t ta_cntl_aux, db_watermarks, sq_dyn_gpr_cntl_ps_flush_req, db_debug;
+ BATCH_LOCALS(&context->radeon);
+
+ switch (context->radeon.radeonScreen->chip_family) {
+ case CHIP_FAMILY_R600:
+ num_ps_gprs = 192;
+ num_vs_gprs = 56;
+ num_temp_gprs = 4;
+ num_gs_gprs = 0;
+ num_es_gprs = 0;
+ num_ps_threads = 136;
+ num_vs_threads = 48;
+ num_gs_threads = 4;
+ num_es_threads = 4;
+ num_ps_stack_entries = 128;
+ num_vs_stack_entries = 128;
+ num_gs_stack_entries = 0;
+ num_es_stack_entries = 0;
+ break;
+ case CHIP_FAMILY_RV630:
+ case CHIP_FAMILY_RV635:
+ num_ps_gprs = 84;
+ num_vs_gprs = 36;
+ num_temp_gprs = 4;
+ num_gs_gprs = 0;
+ num_es_gprs = 0;
+ num_ps_threads = 144;
+ num_vs_threads = 40;
+ num_gs_threads = 4;
+ num_es_threads = 4;
+ num_ps_stack_entries = 40;
+ num_vs_stack_entries = 40;
+ num_gs_stack_entries = 32;
+ num_es_stack_entries = 16;
+ break;
+ case CHIP_FAMILY_RV610:
+ case CHIP_FAMILY_RV620:
+ case CHIP_FAMILY_RS780:
+ case CHIP_FAMILY_RS880:
+ default:
+ num_ps_gprs = 84;
+ num_vs_gprs = 36;
+ num_temp_gprs = 4;
+ num_gs_gprs = 0;
+ num_es_gprs = 0;
+ num_ps_threads = 136;
+ num_vs_threads = 48;
+ num_gs_threads = 4;
+ num_es_threads = 4;
+ num_ps_stack_entries = 40;
+ num_vs_stack_entries = 40;
+ num_gs_stack_entries = 32;
+ num_es_stack_entries = 16;
+ break;
+ case CHIP_FAMILY_RV670:
+ num_ps_gprs = 144;
+ num_vs_gprs = 40;
+ num_temp_gprs = 4;
+ num_gs_gprs = 0;
+ num_es_gprs = 0;
+ num_ps_threads = 136;
+ num_vs_threads = 48;
+ num_gs_threads = 4;
+ num_es_threads = 4;
+ num_ps_stack_entries = 40;
+ num_vs_stack_entries = 40;
+ num_gs_stack_entries = 32;
+ num_es_stack_entries = 16;
+ break;
+ case CHIP_FAMILY_RV770:
+ num_ps_gprs = 192;
+ num_vs_gprs = 56;
+ num_temp_gprs = 4;
+ num_gs_gprs = 0;
+ num_es_gprs = 0;
+ num_ps_threads = 188;
+ num_vs_threads = 60;
+ num_gs_threads = 0;
+ num_es_threads = 0;
+ num_ps_stack_entries = 256;
+ num_vs_stack_entries = 256;
+ num_gs_stack_entries = 0;
+ num_es_stack_entries = 0;
+ break;
+ case CHIP_FAMILY_RV730:
+ case CHIP_FAMILY_RV740:
+ num_ps_gprs = 84;
+ num_vs_gprs = 36;
+ num_temp_gprs = 4;
+ num_gs_gprs = 0;
+ num_es_gprs = 0;
+ num_ps_threads = 188;
+ num_vs_threads = 60;
+ num_gs_threads = 0;
+ num_es_threads = 0;
+ num_ps_stack_entries = 128;
+ num_vs_stack_entries = 128;
+ num_gs_stack_entries = 0;
+ num_es_stack_entries = 0;
+ break;
+ case CHIP_FAMILY_RV710:
+ num_ps_gprs = 192;
+ num_vs_gprs = 56;
+ num_temp_gprs = 4;
+ num_gs_gprs = 0;
+ num_es_gprs = 0;
+ num_ps_threads = 144;
+ num_vs_threads = 48;
+ num_gs_threads = 0;
+ num_es_threads = 0;
+ num_ps_stack_entries = 128;
+ num_vs_stack_entries = 128;
+ num_gs_stack_entries = 0;
+ num_es_stack_entries = 0;
+ break;
+ }
+
+ sq_config = 0;
+ if ((context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV610) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV620) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RS780) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RS880) ||
+ (context->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV710))
+ CLEARbit(sq_config, VC_ENABLE_bit);
+ else
+ SETbit(sq_config, VC_ENABLE_bit);
+ SETbit(sq_config, DX9_CONSTS_bit);
+ SETbit(sq_config, ALU_INST_PREFER_VECTOR_bit);
+ SETfield(sq_config, ps_prio, PS_PRIO_shift, PS_PRIO_mask);
+ SETfield(sq_config, vs_prio, VS_PRIO_shift, VS_PRIO_mask);
+ SETfield(sq_config, gs_prio, GS_PRIO_shift, GS_PRIO_mask);
+ SETfield(sq_config, es_prio, ES_PRIO_shift, ES_PRIO_mask);
+
+ sq_gpr_resource_mgmt_1 = 0;
+ SETfield(sq_gpr_resource_mgmt_1, num_ps_gprs, NUM_PS_GPRS_shift, NUM_PS_GPRS_mask);
+ SETfield(sq_gpr_resource_mgmt_1, num_vs_gprs, NUM_VS_GPRS_shift, NUM_VS_GPRS_mask);
+ SETfield(sq_gpr_resource_mgmt_1, num_temp_gprs,
+ NUM_CLAUSE_TEMP_GPRS_shift, NUM_CLAUSE_TEMP_GPRS_mask);
+
+ sq_gpr_resource_mgmt_2 = 0;
+ SETfield(sq_gpr_resource_mgmt_2, num_gs_gprs, NUM_GS_GPRS_shift, NUM_GS_GPRS_mask);
+ SETfield(sq_gpr_resource_mgmt_2, num_es_gprs, NUM_ES_GPRS_shift, NUM_ES_GPRS_mask);
+
+ sq_thread_resource_mgmt = 0;
+ SETfield(sq_thread_resource_mgmt, num_ps_threads,
+ NUM_PS_THREADS_shift, NUM_PS_THREADS_mask);
+ SETfield(sq_thread_resource_mgmt, num_vs_threads,
+ NUM_VS_THREADS_shift, NUM_VS_THREADS_mask);
+ SETfield(sq_thread_resource_mgmt, num_gs_threads,
+ NUM_GS_THREADS_shift, NUM_GS_THREADS_mask);
+ SETfield(sq_thread_resource_mgmt, num_es_threads,
+ NUM_ES_THREADS_shift, NUM_ES_THREADS_mask);
+
+ sq_stack_resource_mgmt_1 = 0;
+ SETfield(sq_stack_resource_mgmt_1, num_ps_stack_entries,
+ NUM_PS_STACK_ENTRIES_shift, NUM_PS_STACK_ENTRIES_mask);
+ SETfield(sq_stack_resource_mgmt_1, num_vs_stack_entries,
+ NUM_VS_STACK_ENTRIES_shift, NUM_VS_STACK_ENTRIES_mask);
+
+ sq_stack_resource_mgmt_2 = 0;
+ SETfield(sq_stack_resource_mgmt_2, num_gs_stack_entries,
+ NUM_GS_STACK_ENTRIES_shift, NUM_GS_STACK_ENTRIES_mask);
+ SETfield(sq_stack_resource_mgmt_2, num_es_stack_entries,
+ NUM_ES_STACK_ENTRIES_shift, NUM_ES_STACK_ENTRIES_mask);
+
+ ta_cntl_aux = 0;
+ SETfield(ta_cntl_aux, 28, TD_FIFO_CREDIT_shift, TD_FIFO_CREDIT_mask);
+ db_watermarks = 0;
+ SETfield(db_watermarks, 4, DEPTH_FREE_shift, DEPTH_FREE_mask);
+ SETfield(db_watermarks, 16, DEPTH_FLUSH_shift, DEPTH_FLUSH_mask);
+ SETfield(db_watermarks, 0, FORCE_SUMMARIZE_shift, FORCE_SUMMARIZE_mask);
+ SETfield(db_watermarks, 4, DEPTH_PENDING_FREE_shift, DEPTH_PENDING_FREE_mask);
+ sq_dyn_gpr_cntl_ps_flush_req = 0;
+ db_debug = 0;
+ if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770) {
+ SETfield(ta_cntl_aux, 3, GRADIENT_CREDIT_shift, GRADIENT_CREDIT_mask);
+ db_debug = 0x82000000;
+ SETfield(db_watermarks, 16, DEPTH_CACHELINE_FREE_shift, DEPTH_CACHELINE_FREE_mask);
+ } else {
+ SETfield(ta_cntl_aux, 2, GRADIENT_CREDIT_shift, GRADIENT_CREDIT_mask);
+ SETfield(db_watermarks, 4, DEPTH_CACHELINE_FREE_shift, DEPTH_CACHELINE_FREE_mask);
+ SETbit(sq_dyn_gpr_cntl_ps_flush_req, VS_PC_LIMIT_ENABLE_bit);
+ }
+
+ BEGIN_BATCH_NO_AUTOSTATE(117);
+ R600_OUT_BATCH_REGSEQ(SQ_CONFIG, 6);
+ R600_OUT_BATCH(sq_config);
+ R600_OUT_BATCH(sq_gpr_resource_mgmt_1);
+ R600_OUT_BATCH(sq_gpr_resource_mgmt_2);
+ R600_OUT_BATCH(sq_thread_resource_mgmt);
+ R600_OUT_BATCH(sq_stack_resource_mgmt_1);
+ R600_OUT_BATCH(sq_stack_resource_mgmt_2);
+
+ R600_OUT_BATCH_REGVAL(TA_CNTL_AUX, ta_cntl_aux);
+ R600_OUT_BATCH_REGVAL(VC_ENHANCE, 0);
+ R600_OUT_BATCH_REGVAL(R7xx_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, sq_dyn_gpr_cntl_ps_flush_req);
+ R600_OUT_BATCH_REGVAL(DB_DEBUG, db_debug);
+ R600_OUT_BATCH_REGVAL(DB_WATERMARKS, db_watermarks);
+
+ R600_OUT_BATCH_REGSEQ(SQ_ESGS_RING_ITEMSIZE, 9);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+
+ R600_OUT_BATCH_REGVAL(CB_CLRCMP_CONTROL,
+ (CLRCMP_SEL_SRC << CLRCMP_FCN_SEL_shift));
+ R600_OUT_BATCH_REGVAL(SQ_VTX_BASE_VTX_LOC, 0);
+ R600_OUT_BATCH_REGVAL(SQ_VTX_START_INST_LOC, 0);
+ R600_OUT_BATCH_REGVAL(DB_DEPTH_INFO, 0);
+ R600_OUT_BATCH_REGVAL(DB_DEPTH_CONTROL, 0);
+ R600_OUT_BATCH_REGVAL(CB_SHADER_MASK, (OUTPUT0_ENABLE_mask));
+ R600_OUT_BATCH_REGVAL(CB_TARGET_MASK, (TARGET0_ENABLE_mask));
+ R600_OUT_BATCH_REGVAL(R7xx_CB_SHADER_CONTROL, (RT0_ENABLE_bit));
+ R600_OUT_BATCH_REGVAL(CB_COLOR_CONTROL, (0xcc << ROP3_shift));
+
+ R600_OUT_BATCH_REGVAL(PA_CL_VTE_CNTL, VTX_XY_FMT_bit);
+ R600_OUT_BATCH_REGVAL(PA_CL_VS_OUT_CNTL, 0);
+ R600_OUT_BATCH_REGVAL(PA_CL_CLIP_CNTL, CLIP_DISABLE_bit);
+ R600_OUT_BATCH_REGVAL(PA_SU_SC_MODE_CNTL, (FACE_bit) |
+ (POLYMODE_PTYPE__TRIANGLES << POLYMODE_FRONT_PTYPE_shift) |
+ (POLYMODE_PTYPE__TRIANGLES << POLYMODE_BACK_PTYPE_shift));
+ R600_OUT_BATCH_REGVAL(PA_SU_VTX_CNTL, (PIX_CENTER_bit) |
+ (X_ROUND_TO_EVEN << PA_SU_VTX_CNTL__ROUND_MODE_shift) |
+ (X_1_256TH << QUANT_MODE_shift));
+
+ R600_OUT_BATCH_REGSEQ(VGT_MAX_VTX_INDX, 4);
+ R600_OUT_BATCH(2048);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+
+ R600_OUT_BATCH_REGSEQ(VGT_OUTPUT_PATH_CNTL, 13);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+
+ R600_OUT_BATCH_REGVAL(VGT_PRIMITIVEID_EN, 0);
+ R600_OUT_BATCH_REGVAL(VGT_MULTI_PRIM_IB_RESET_EN, 0);
+ R600_OUT_BATCH_REGVAL(VGT_INSTANCE_STEP_RATE_0, 0);
+ R600_OUT_BATCH_REGVAL(VGT_INSTANCE_STEP_RATE_1, 0);
+
+ R600_OUT_BATCH_REGSEQ(VGT_STRMOUT_EN, 3);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+ R600_OUT_BATCH(0);
+
+ R600_OUT_BATCH_REGVAL(VGT_STRMOUT_BUFFER_EN, 0);
+
+ END_BATCH();
+ COMMIT_BATCH();
+}
+
+static GLboolean validate_buffers(context_t *rmesa,
+ struct radeon_bo *src_bo,
+ struct radeon_bo *dst_bo)
+{
+ int ret;
+ radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs,
+ src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+
+ radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs,
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+
+ radeon_cs_space_add_persistent_bo(rmesa->radeon.cmdbuf.cs,
+ rmesa->blit_bo, RADEON_GEM_DOMAIN_GTT, 0);
+
+ ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs,
+ rmesa->blit_bo,
+ RADEON_GEM_DOMAIN_GTT, 0);
+ if (ret)
+ return GL_FALSE;
+
+ ret = radeon_cs_space_check_with_bo(rmesa->radeon.cmdbuf.cs,
+ first_elem(&rmesa->radeon.dma.reserved)->bo,
+ RADEON_GEM_DOMAIN_GTT, 0);
+ if (ret)
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
+
+unsigned r600_blit(GLcontext *ctx,
+ struct radeon_bo *src_bo,
+ intptr_t src_offset,
+ gl_format src_mesaformat,
+ unsigned src_pitch,
+ unsigned src_width,
+ unsigned src_height,
+ unsigned src_x,
+ unsigned src_y,
+ struct radeon_bo *dst_bo,
+ intptr_t dst_offset,
+ gl_format dst_mesaformat,
+ unsigned dst_pitch,
+ unsigned dst_width,
+ unsigned dst_height,
+ unsigned dst_x,
+ unsigned dst_y,
+ unsigned w,
+ unsigned h,
+ unsigned flip_y)
+{
+ context_t *context = R700_CONTEXT(ctx);
+ int id = 0;
+
+ if (!is_blit_supported(dst_mesaformat))
+ return GL_FALSE;
+
+ if (src_bo == dst_bo) {
+ return GL_FALSE;
+ }
+
+ if (src_offset % 256 || dst_offset % 256) {
+ return GL_FALSE;
+ }
+
+ if (0) {
+ fprintf(stderr, "src: width %d, height %d, pitch %d vs %d, format %s\n",
+ src_width, src_height, src_pitch,
+ _mesa_format_row_stride(src_mesaformat, src_width),
+ _mesa_get_format_name(src_mesaformat));
+ fprintf(stderr, "dst: width %d, height %d, pitch %d, format %s\n",
+ dst_width, dst_height,
+ _mesa_format_row_stride(dst_mesaformat, dst_width),
+ _mesa_get_format_name(dst_mesaformat));
+ }
+
+ /* Flush is needed to make sure that source buffer has correct data */
+ radeonFlush(ctx);
+
+ rcommonEnsureCmdBufSpace(&context->radeon, 304, __FUNCTION__);
+
+ /* load shaders */
+ load_shaders(context->radeon.glCtx);
+
+ if (!validate_buffers(context, src_bo, dst_bo))
+ return GL_FALSE;
+
+ /* set clear state */
+ /* 117 */
+ set_default_state(context);
+
+ /* shaders */
+ /* 72 */
+ set_shaders(context);
+
+ /* src */
+ /* 20 */
+ set_tex_resource(context, src_mesaformat, src_bo,
+ src_width, src_height, src_pitch, src_offset);
+
+ /* 5 */
+ set_tex_sampler(context);
+
+ /* dst */
+ /* 27 */
+ set_render_target(context, dst_bo, dst_mesaformat,
+ dst_pitch, dst_width, dst_height, dst_offset);
+ /* scissors */
+ /* 17 */
+ set_scissors(context, dst_x, dst_y, dst_x + dst_width, dst_y + dst_height);
+
+ set_vb_data(context, src_x, src_y, dst_x, dst_y, w, h, src_height, flip_y);
+ /* Vertex buffer setup */
+ /* 24 */
+ set_vtx_resource(context);
+
+ /* draw */
+ /* 10 */
+ draw_auto(context);
+
+ /* 7 */
+ r700SyncSurf(context, dst_bo, 0,
+ RADEON_GEM_DOMAIN_VRAM|RADEON_GEM_DOMAIN_GTT,
+ CB_ACTION_ENA_bit | (1 << (id + 6)));
+
+ /* 5 */
+ r700WaitForIdleClean(context);
+
+ radeonFlush(ctx);
+
+ return GL_TRUE;
+}
diff --git a/src/mesa/drivers/dri/r600/r600_blit.h b/src/mesa/drivers/dri/r600/r600_blit.h
new file mode 100644
index 00000000000..f280e23489e
--- /dev/null
+++ b/src/mesa/drivers/dri/r600/r600_blit.h
@@ -0,0 +1,21 @@
+unsigned r600_blit(GLcontext *ctx,
+ struct radeon_bo *src_bo,
+ intptr_t src_offset,
+ gl_format src_mesaformat,
+ unsigned src_pitch,
+ unsigned src_width,
+ unsigned src_height,
+ unsigned src_x_offset,
+ unsigned src_y_offset,
+ struct radeon_bo *dst_bo,
+ intptr_t dst_offset,
+ gl_format dst_mesaformat,
+ unsigned dst_pitch,
+ unsigned dst_width,
+ unsigned dst_height,
+ unsigned dst_x_offset,
+ unsigned dst_y_offset,
+ unsigned w,
+ unsigned h,
+ unsigned flip_y);
+
diff --git a/src/mesa/drivers/dri/r600/r600_blit_shaders.h b/src/mesa/drivers/dri/r600/r600_blit_shaders.h
new file mode 100644
index 00000000000..492dde96368
--- /dev/null
+++ b/src/mesa/drivers/dri/r600/r600_blit_shaders.h
@@ -0,0 +1,28 @@
+const uint32_t r6xx_vs[] =
+{
+ 0x00000004, // CF_DWORD0(ADDR(4))
+ 0x81000000, // SQ_CF_INST_VTX COUNT(1)
+ 0x0000203c, // CF_EXP_IMP CF_POS0 SQ_EXPORT_POS RW_GPR(0) ELEM_SIZE(0)
+ 0x94000b08, // SQ_CF_INST_EXPORT_DONE SWZ XY01 BARRIER(1)
+ 0x00004000, // CF_EXP_IMP 0 SQ_EXPORT_PARAM RW_GPR(0) ELEM_SIZE(0)
+ 0x14200b1a, // SQ_CF_INST_EXPORT_DONE SWZ ZW01 EOP(1) BARRIER(0)
+ 0x00000000,
+ 0x00000000,
+ 0x3c000000, // SQ_VTX_INST_FETCH BUFFER_ID(0) MEGA_FETCH_COUNT(16)
+ 0x68cd1000, // DST_GPR(0) DST_SWZ: XYZW DATA_FORMAT(35) SQ_NUM_FORMAT_SCALED SQ_FORMAT_COMP_SIGNED
+ 0x00080000, // ENDIAN_SWAP(SQ_ENDIAN_NONE) MEGA_FETCH(1)
+ 0x00000000, // VTX_DWORD_PAD
+};
+
+const uint32_t r6xx_ps[] =
+{
+ 0x00000002, // CF_DWORD0 AADR(2)
+ 0x80800000, // SQ_CF_INST_TEX COUNT(1)
+ 0x00000000, // CF_ALLOC_IMP_EXP0 SQ_EXPORT_PIXEL RW_GPR(0) ELEM_SIZE(0)
+ 0x94200688, // SQ_CF_INST_EXPORT_DONE EOP(1) BARRIER(1) SWZ: XYZW
+ 0x00000010, // SQ_TEX_INST_SAMPLE SRC_GPR(0) RESOURCE_ID(0)
+ 0x000d1000, // DST_GPR(0) SWZ: XYZW TEX_UNNORMALIZED
+ 0xb0800000, // SAMPLER_ID(0) SRC_SWZ XYZW
+ 0x00000000, // TEX_DWORD_PAD
+};
+
diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c
index dbd233729c0..68112c49dc3 100644
--- a/src/mesa/drivers/dri/r600/r600_context.c
+++ b/src/mesa/drivers/dri/r600/r600_context.c
@@ -65,6 +65,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "r600_emit.h"
#include "radeon_bocs_wrapper.h"
#include "radeon_queryobj.h"
+#include "r600_blit.h"
#include "r700_state.h"
#include "r700_ioctl.h"
@@ -74,6 +75,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
@@ -97,6 +100,7 @@ static const struct dri_extension card_extensions[] = {
{"GL_ARB_depth_clamp", NULL},
{"GL_ARB_depth_texture", NULL},
{"GL_ARB_fragment_program", NULL},
+ {"GL_ARB_fragment_program_shadow", NULL},
{"GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions},
{"GL_ARB_multitexture", NULL},
{"GL_ARB_point_parameters", GL_ARB_point_parameters_functions},
@@ -109,6 +113,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 +160,12 @@ 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 */
+ {NULL, NULL}
};
static const struct tnl_pipeline_stage *r600_pipeline[] = {
@@ -231,6 +241,7 @@ static void r600_init_vtbl(radeonContextPtr radeon)
radeon->vtbl.pre_emit_atoms = r600_vtbl_pre_emit_atoms;
radeon->vtbl.fallback = r600_fallback;
radeon->vtbl.emit_query_finish = r600_emit_query_finish;
+ radeon->vtbl.blit = r600_blit;
}
static void r600InitConstValues(GLcontext *ctx, radeonScreenPtr screen)
@@ -308,6 +319,14 @@ 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);
+
+ /* 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");
@@ -330,10 +349,10 @@ static void r600InitGLExtensions(GLcontext *ctx)
/* Create the device specific rendering context.
*/
GLboolean r600CreateContext(const __GLcontextModes * glVisual,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
struct dd_function_table functions;
context_t *r600;
@@ -361,7 +380,7 @@ GLboolean r600CreateContext(const __GLcontextModes * glVisual,
_mesa_init_driver_functions(&functions);
r700InitStateFuncs(&functions);
- r600InitTextureFuncs(&functions);
+ r600InitTextureFuncs(&r600->radeon, &functions);
r700InitShaderFuncs(&functions);
radeonInitQueryObjFunctions(&functions);
r700InitIoctlFuncs(&functions);
diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h
index 94662ab5479..72c8c869b70 100644
--- a/src/mesa/drivers/dri/r600/r600_context.h
+++ b/src/mesa/drivers/dri/r600/r600_context.h
@@ -148,13 +148,15 @@ struct r600_context {
GLint nNumActiveAos;
StreamDesc stream_desc[VERT_ATTRIB_MAX];
struct r700_index_buffer ind_buf;
+ struct radeon_bo *blit_bo;
+ GLboolean blit_bo_loaded;
};
#define R700_CONTEXT(ctx) ((context_t *)(ctx->DriverCtx))
#define GL_CONTEXT(context) ((GLcontext *)(context->radeon.glCtx))
extern GLboolean r600CreateContext(const __GLcontextModes * glVisual,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate);
#define R700_CONTEXT_STATES(context) ((R700_CHIP_CONTEXT *)(&context->hw))
@@ -178,6 +180,8 @@ extern GLboolean r700SyncSurf(context_t *context,
uint32_t write_domain,
uint32_t sync_type);
+extern void r700WaitForIdleClean(context_t *context);
+
extern void r700Start3D(context_t *context);
extern void r600InitAtoms(context_t *context);
extern void r700InitDraw(GLcontext *ctx);
diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c
index 9d83a64e220..71dfd7e0591 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.c
+++ b/src/mesa/drivers/dri/r600/r600_tex.c
@@ -305,7 +305,7 @@ static void r600TexParameter(GLcontext * ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- r600SetTexBorderColor(t, texObj->BorderColor);
+ r600SetTexBorderColor(t, texObj->BorderColor.f);
break;
case GL_TEXTURE_BASE_LEVEL:
@@ -391,12 +391,12 @@ static struct gl_texture_object *r600NewTextureObject(GLcontext * ctx,
r600SetTexDefaultState(t);
r600UpdateTexWrap(t);
r600SetTexFilter(t, t->base.MinFilter, t->base.MagFilter, t->base.MaxAnisotropy);
- r600SetTexBorderColor(t, t->base.BorderColor);
+ r600SetTexBorderColor(t, t->base.BorderColor.f);
return &t->base;
}
-void r600InitTextureFuncs(struct dd_function_table *functions)
+void r600InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions)
{
/* Note: we only plug in the functions we implement in the driver
* since _mesa_init_driver_functions() was already called.
@@ -424,6 +424,11 @@ void r600InitTextureFuncs(struct dd_function_table *functions)
functions->CompressedTexImage2D = radeonCompressedTexImage2D;
functions->CompressedTexSubImage2D = radeonCompressedTexSubImage2D;
+ if (radeon->radeonScreen->kernel_mm) {
+ functions->CopyTexImage2D = radeonCopyTexImage2D;
+ functions->CopyTexSubImage2D = radeonCopyTexSubImage2D;
+ }
+
functions->GenerateMipmap = radeonGenerateMipmap;
driInitTextureFormats();
diff --git a/src/mesa/drivers/dri/r600/r600_tex.h b/src/mesa/drivers/dri/r600/r600_tex.h
index fb0e1a023e1..c2141ef5e5c 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.h
+++ b/src/mesa/drivers/dri/r600/r600_tex.h
@@ -58,6 +58,6 @@ extern void r600SetTexOffset(__DRIcontext *pDRICtx, GLint texname,
extern GLboolean r600ValidateBuffers(GLcontext * ctx);
-extern void r600InitTextureFuncs(struct dd_function_table *functions);
+extern void r600InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions);
#endif /* __r600_TEX_H__ */
diff --git a/src/mesa/drivers/dri/r600/r600_texstate.c b/src/mesa/drivers/dri/r600/r600_texstate.c
index 8fdca0bab15..3289d89c926 100644
--- a/src/mesa/drivers/dri/r600/r600_texstate.c
+++ b/src/mesa/drivers/dri/r600/r600_texstate.c
@@ -662,6 +662,37 @@ static GLboolean r600GetTexFormat(struct gl_texture_object *tObj, gl_format mesa
return GL_TRUE;
}
+static GLuint r600_translate_shadow_func(GLenum func)
+{
+ switch (func) {
+ case GL_NEVER:
+ return SQ_TEX_DEPTH_COMPARE_NEVER;
+ case GL_LESS:
+ return SQ_TEX_DEPTH_COMPARE_LESS;
+ case GL_LEQUAL:
+ return SQ_TEX_DEPTH_COMPARE_LESSEQUAL;
+ case GL_GREATER:
+ return SQ_TEX_DEPTH_COMPARE_GREATER;
+ case GL_GEQUAL:
+ return SQ_TEX_DEPTH_COMPARE_GREATEREQUAL;
+ case GL_NOTEQUAL:
+ return SQ_TEX_DEPTH_COMPARE_NOTEQUAL;
+ case GL_EQUAL:
+ return SQ_TEX_DEPTH_COMPARE_EQUAL;
+ case GL_ALWAYS:
+ return SQ_TEX_DEPTH_COMPARE_ALWAYS;
+ default:
+ WARN_ONCE("Unknown shadow compare function! %d", func);
+ return 0;
+ }
+}
+
+static INLINE uint32_t
+S_FIXED(float value, uint32_t frac_bits)
+{
+ return value * (1 << frac_bits);
+}
+
void r600SetDepthTexMode(struct gl_texture_object *tObj)
{
radeonTexObjPtr t;
@@ -681,8 +712,9 @@ void r600SetDepthTexMode(struct gl_texture_object *tObj)
* \param rmesa Context pointer
* \param t the r300 texture object
*/
-static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *texObj)
+static void setup_hardware_state(GLcontext * ctx, struct gl_texture_object *texObj, int unit)
{
+ context_t *rmesa = R700_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
const struct gl_texture_image *firstImage;
GLuint uTexelPitch, row_align;
@@ -744,11 +776,30 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex
t->SQ_TEX_RESOURCE2 = get_base_teximage_offset(t) / 256;
- if ((t->maxLod - t->minLod) > 0) {
- t->SQ_TEX_RESOURCE3 = radeon_miptree_image_offset(t->mt, 0, t->minLod + 1) / 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);
+ t->SQ_TEX_RESOURCE3 = radeon_miptree_image_offset(t->mt, 0, t->minLod + 1) / 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);
+
+ SETfield(t->SQ_TEX_SAMPLER1,
+ S_FIXED(CLAMP(t->base.MinLod - t->minLod, 0, 15), 6),
+ MIN_LOD_shift, MIN_LOD_mask);
+ SETfield(t->SQ_TEX_SAMPLER1,
+ S_FIXED(CLAMP(t->base.MaxLod - t->minLod, 0, 15), 6),
+ MAX_LOD_shift, MAX_LOD_mask);
+ SETfield(t->SQ_TEX_SAMPLER1,
+ S_FIXED(CLAMP(ctx->Texture.Unit[unit].LodBias + t->base.LodBias, -16, 16), 6),
+ SQ_TEX_SAMPLER_WORD1_0__LOD_BIAS_shift, SQ_TEX_SAMPLER_WORD1_0__LOD_BIAS_mask);
+
+ if(texObj->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB)
+ {
+ SETfield(t->SQ_TEX_SAMPLER0, r600_translate_shadow_func(texObj->CompareFunc), DEPTH_COMPARE_FUNCTION_shift, DEPTH_COMPARE_FUNCTION_mask);
+ }
+ else
+ {
+ CLEARfield(t->SQ_TEX_SAMPLER0, DEPTH_COMPARE_FUNCTION_mask);
}
+
}
/**
@@ -756,9 +807,8 @@ static void setup_hardware_state(context_t *rmesa, struct gl_texture_object *tex
*
* Mostly this means populating the texture object's mipmap tree.
*/
-static GLboolean r600_validate_texture(GLcontext * ctx, struct gl_texture_object *texObj)
+static GLboolean r600_validate_texture(GLcontext * ctx, struct gl_texture_object *texObj, int unit)
{
- context_t *rmesa = R700_CONTEXT(ctx);
radeonTexObj *t = radeon_tex_obj(texObj);
if (!radeon_validate_texture_miptree(ctx, texObj))
@@ -766,7 +816,7 @@ static GLboolean r600_validate_texture(GLcontext * ctx, struct gl_texture_object
/* Configure the hardware registers (more precisely, the cached version
* of the hardware registers). */
- setup_hardware_state(rmesa, texObj);
+ setup_hardware_state(ctx, texObj, unit);
t->validated = GL_TRUE;
return GL_TRUE;
@@ -807,7 +857,7 @@ GLboolean r600ValidateBuffers(GLcontext * ctx)
if (!ctx->Texture.Unit[i]._ReallyEnabled)
continue;
- if (!r600_validate_texture(ctx, ctx->Texture.Unit[i]._Current)) {
+ if (!r600_validate_texture(ctx, ctx->Texture.Unit[i]._Current, i)) {
radeon_warning("failed to validate texture for unit %d.\n", i);
}
t = radeon_tex_obj(ctx->Texture.Unit[i]._Current);
@@ -955,18 +1005,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 */
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index b0b38927e67..c01b2fbb146 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -32,12 +32,49 @@
#include "main/mtypes.h"
#include "main/imports.h"
+#include "shader/prog_parameter.h"
#include "radeon_debug.h"
#include "r600_context.h"
#include "r700_assembler.h"
+#define USE_CF_FOR_CONTINUE_BREAK 1
+#define USE_CF_FOR_POP_AFTER 1
+
+struct prog_instruction noise1_insts[12] = {
+ {OPCODE_BGNSUB , {{13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {13, 0, 15, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_MOV , {{0, 0, 0, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {0, 0, 2, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_MOV , {{8, 0, 0, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {0, 0, 4, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_MOV , {{8, 0, 585, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {0, 0, 8, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_SGT , {{0, 0, 585, 0, 0, 0}, {8, 0, 1170, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {0, 1, 1, 0, 8, 1672, 0}, 1, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_IF , {{13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {13, 0, 15, 0, 7, 0, 0}, 0, 0, 0, 1, 0, 0, 0, 15, 0, 0, 0},
+ {OPCODE_MOV , {{0, 0, 1755, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {0, 0, 1, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_RET , {{13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {13, 0, 15, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_ENDIF , {{13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {13, 0, 15, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_MOV , {{0, 0, 1170, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {0, 0, 1, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_RET , {{13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {13, 0, 15, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0},
+ {OPCODE_ENDSUB , {{13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}, {13, 0, 1672, 0, 0, 0}}, {13, 0, 15, 0, 8, 1672, 0}, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0}
+};
+float noise1_const[2][4] = {
+ {0.300000f, 0.900000f, 0.500000f, 0.300000f}
+};
+
+COMPILED_SUB noise1_presub = {
+ &(noise1_insts[0]),
+ 12,
+ 2,
+ 1,
+ 0,
+ &(noise1_const[0]),
+ SWIZZLE_X,
+ SWIZZLE_X,
+ SWIZZLE_X,
+ SWIZZLE_X,
+ {0,0,0},
+ 0
+};
+
BITS addrmode_PVSDST(PVSDST * pPVSDST)
{
return pPVSDST->addrmode0 | ((BITS)pPVSDST->addrmode1 << 1);
@@ -327,22 +364,27 @@ GLuint GetSurfaceFormat(GLenum eType, GLuint nChannels, GLuint * pClient_size)
return(format);
}
-unsigned int r700GetNumOperands(r700_AssemblerBase* pAsm)
+unsigned int r700GetNumOperands(GLuint opcode, GLuint nIsOp3)
{
- if(pAsm->D.dst.op3)
+ if(nIsOp3 > 0)
{
return 3;
}
- switch (pAsm->D.dst.opcode)
+ switch (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 +400,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:
@@ -369,7 +412,7 @@ unsigned int r700GetNumOperands(r700_AssemblerBase* pAsm)
return 1;
default: radeon_error(
- "Need instruction operand number for %x.\n", pAsm->D.dst.opcode);
+ "Need instruction operand number for %x.\n", opcode);
};
return 3;
@@ -383,103 +426,128 @@ 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->D2.bits = 0;
- pAsm->D.bits = 0;
- pAsm->S[0].bits = 0;
- pAsm->S[1].bits = 0;
- pAsm->S[2].bits = 0;
+ pAsm->D.bits = 0;
+ pAsm->S[0].bits = 0;
+ pAsm->S[1].bits = 0;
+ pAsm->S[2].bits = 0;
- pAsm->uLastPosUpdate = 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;
+
+ pAsm->presubs = NULL;
+ pAsm->unPresubArraySize = 0;
+ pAsm->unNumPresub = 0;
+ pAsm->unCurNumILInsts = 0;
+
+ pAsm->unVetTexBits = 0;
+
+ return 0;
}
GLboolean IsTex(gl_inst_opcode Opcode)
{
- if( (OPCODE_TEX==Opcode) || (OPCODE_TXP==Opcode) || (OPCODE_TXB==Opcode) )
+ if( (OPCODE_TEX==Opcode) || (OPCODE_TXP==Opcode) || (OPCODE_TXB==Opcode) ||
+ (OPCODE_DDX==Opcode) || (OPCODE_DDY==Opcode) )
{
return GL_TRUE;
}
@@ -592,6 +660,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)
{
@@ -999,7 +1092,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) )
@@ -1010,7 +1104,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) )
@@ -1043,7 +1138,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) )
@@ -1054,7 +1150,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) )
@@ -1065,7 +1162,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) )
@@ -1165,6 +1263,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);
@@ -1175,10 +1274,18 @@ GLboolean assemble_src(r700_AssemblerBase *pAsm,
}
pAsm->S[fld].src.rtype = SRC_REG_CONSTANT;
- pAsm->S[fld].src.reg = pILInst->SrcReg[src].Index;
+ if(pILInst->SrcReg[src].Index < 0)
+ {
+ WARN_ONCE("Negative register offsets not supported yet!\n");
+ pAsm->S[fld].src.reg = 0;
+ }
+ else
+ {
+ 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)
{
@@ -1191,7 +1298,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;
}
}
@@ -1247,6 +1354,15 @@ GLboolean assemble_dst(r700_AssemblerBase *pAsm)
pAsm->D.dst.writez = (pILInst->DstReg.WriteMask >> 2) & 0x1;
pAsm->D.dst.writew = (pILInst->DstReg.WriteMask >> 3) & 0x1;
+ if(pILInst->SaturateMode == SATURATE_ZERO_ONE)
+ {
+ pAsm->D2.dst2.SaturateMode = 1;
+ }
+ else
+ {
+ pAsm->D2.dst2.SaturateMode = 0;
+ }
+
return GL_TRUE;
}
@@ -1306,6 +1422,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:
@@ -1318,36 +1435,65 @@ GLboolean tex_src(r700_AssemblerBase *pAsm)
pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
break;
case PROGRAM_INPUT:
- switch (pILInst->SrcReg[0].Index)
+ if(SPT_VP == pAsm->currentShaderType)
+ {
+ switch (pILInst->SrcReg[0].Index)
+ {
+ 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:
+ bValidTexCoord = GL_TRUE;
+ pAsm->S[0].src.reg =
+ pAsm->ucVP_AttributeMap[pILInst->SrcReg[0].Index];
+ pAsm->S[0].src.rtype = SRC_REG_INPUT;
+ break;
+ }
+ }
+ else
{
- case FRAG_ATTRIB_WPOS:
- case FRAG_ATTRIB_COL0:
- case FRAG_ATTRIB_COL1:
- case FRAG_ATTRIB_FOGC:
- case FRAG_ATTRIB_TEX0:
- case FRAG_ATTRIB_TEX1:
- case FRAG_ATTRIB_TEX2:
- case FRAG_ATTRIB_TEX3:
- case FRAG_ATTRIB_TEX4:
- case FRAG_ATTRIB_TEX5:
- case FRAG_ATTRIB_TEX6:
- case FRAG_ATTRIB_TEX7:
- bValidTexCoord = GL_TRUE;
+ switch (pILInst->SrcReg[0].Index)
+ {
+ case FRAG_ATTRIB_WPOS:
+ case FRAG_ATTRIB_COL0:
+ case FRAG_ATTRIB_COL1:
+ case FRAG_ATTRIB_FOGC:
+ case FRAG_ATTRIB_TEX0:
+ case FRAG_ATTRIB_TEX1:
+ case FRAG_ATTRIB_TEX2:
+ case FRAG_ATTRIB_TEX3:
+ case FRAG_ATTRIB_TEX4:
+ case FRAG_ATTRIB_TEX5:
+ case FRAG_ATTRIB_TEX6:
+ case FRAG_ATTRIB_TEX7:
+ bValidTexCoord = GL_TRUE;
+ pAsm->S[0].src.reg =
+ pAsm->uiFP_AttributeMap[pILInst->SrcReg[0].Index];
+ pAsm->S[0].src.rtype = SRC_REG_INPUT;
+ break;
+ case FRAG_ATTRIB_FACE:
+ fprintf(stderr, "FRAG_ATTRIB_FACE unsupported\n");
+ break;
+ case FRAG_ATTRIB_PNTC:
+ fprintf(stderr, "FRAG_ATTRIB_PNTC 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;
- case FRAG_ATTRIB_FACE:
- fprintf(stderr, "FRAG_ATTRIB_FACE unsupported\n");
- break;
- case FRAG_ATTRIB_PNTC:
- fprintf(stderr, "FRAG_ATTRIB_PNTC unsupported\n");
- break;
- case FRAG_ATTRIB_VAR0:
- fprintf(stderr, "FRAG_ATTRIB_VAR0 unsupported\n");
- break;
+ }
}
- break;
+
+ break;
}
}
@@ -1392,8 +1538,17 @@ GLboolean assemble_tex_instruction(r700_AssemblerBase *pAsm, GLboolean normalize
tex_instruction_ptr->m_Word0.f.tex_inst = pAsm->D.dst.opcode;
tex_instruction_ptr->m_Word0.f.bc_frac_mode = 0x0;
tex_instruction_ptr->m_Word0.f.fetch_whole_quad = 0x0;
+ tex_instruction_ptr->m_Word0.f.alt_const = 0;
- tex_instruction_ptr->m_Word0.f.resource_id = texture_unit_source->reg;
+ if(SPT_VP == pAsm->currentShaderType)
+ {
+ tex_instruction_ptr->m_Word0.f.resource_id = texture_unit_source->reg + VERT_ATTRIB_MAX;
+ pAsm->unVetTexBits |= 1 << texture_unit_source->reg;
+ }
+ else
+ {
+ tex_instruction_ptr->m_Word0.f.resource_id = texture_unit_source->reg;
+ }
tex_instruction_ptr->m_Word1.f.lod_bias = 0x0;
if (normalized) {
@@ -1412,7 +1567,6 @@ GLboolean assemble_tex_instruction(r700_AssemblerBase *pAsm, GLboolean normalize
tex_instruction_ptr->m_Word2.f.offset_x = 0x0;
tex_instruction_ptr->m_Word2.f.offset_y = 0x0;
tex_instruction_ptr->m_Word2.f.offset_z = 0x0;
-
tex_instruction_ptr->m_Word2.f.sampler_id = texture_unit_source->reg;
// dst
@@ -1529,6 +1683,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",
@@ -1618,7 +1776,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) )
) )
@@ -1648,9 +1807,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;
@@ -1658,7 +1825,7 @@ GLboolean add_alu_instruction(r700_AssemblerBase* pAsm,
}
else
{
- pAsm->cf_current_alu_clause_ptr->m_Word1.f.count++;
+ pAsm->cf_current_alu_clause_ptr->m_Word1.f.count += (GetInstructionSize(alu_instruction_ptr->m_ShaderInstType) / 2);
}
// If this clause constains any instruction that is forward dependent on a TEX instruction,
@@ -1935,7 +2102,7 @@ GLboolean check_scalar(r700_AssemblerBase* pAsm,
GLuint swizzle_key;
- GLuint number_of_operands = r700GetNumOperands(pAsm);
+ GLuint number_of_operands = r700GetNumOperands(pAsm->D.dst.opcode, pAsm->D.dst.op3);
for (src=0; src<number_of_operands; src++)
{
@@ -2024,7 +2191,7 @@ GLboolean check_vector(r700_AssemblerBase* pAsm,
GLuint swizzle_key;
- GLuint number_of_operands = r700GetNumOperands(pAsm);
+ GLuint number_of_operands = r700GetNumOperands(pAsm->D.dst.opcode, pAsm->D.dst.op3);
for (src=0; src<number_of_operands; src++)
{
@@ -2057,7 +2224,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;
}
@@ -2069,7 +2236,7 @@ GLboolean check_vector(r700_AssemblerBase* pAsm,
else
{
if( GL_FALSE == reserve_gpr(pAsm, sel, chan, cycle) )
- {
+ {
return GL_FALSE;
}
}
@@ -2081,7 +2248,7 @@ GLboolean check_vector(r700_AssemblerBase* pAsm,
if( is_cfile(sel) )
{
if( GL_FALSE == reserve_cfile(pAsm, sel, chan) )
- {
+ {
return GL_FALSE;
}
}
@@ -2093,6 +2260,10 @@ GLboolean check_vector(r700_AssemblerBase* pAsm,
GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
{
+ 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;
@@ -2101,7 +2272,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
int current_source_index;
GLuint contiguous_slots_needed;
- GLuint uNumSrc = r700GetNumOperands(pAsm);
+ GLuint uNumSrc = r700GetNumOperands(pAsm->D.dst.opcode, pAsm->D.dst.op3);
//GLuint channel_swizzle, j;
//GLuint chan_counter[4] = {0, 0, 0, 0};
//PVSSRC * pSource[3];
@@ -2158,23 +2329,44 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
contiguous_slots_needed = 0;
- if(GL_TRUE == is_reduction_opcode(&(pAsm->D)) )
+ if(!is_single_scalar_operation)
{
contiguous_slots_needed = 4;
}
+ contiguous_slots_needed += pAsm->D2.dst2.literal_slots;
+
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);
+ if(scalar_channel_index == (number_of_scalar_operations-1))
+ {
+ switch(pAsm->D2.dst2.literal_slots)
+ {
+ case 0:
+ alu_instruction_ptr = (R700ALUInstruction*) CALLOC_STRUCT(R700ALUInstruction);
+ Init_R700ALUInstruction(alu_instruction_ptr);
+ break;
+ case 1:
+ alu_instruction_ptr_hl = (R700ALUInstructionHalfLiteral*) CALLOC_STRUCT(R700ALUInstructionHalfLiteral);
+ Init_R700ALUInstructionHalfLiteral(alu_instruction_ptr_hl, pAsm->C[0].f, pAsm->C[1].f);
+ alu_instruction_ptr = (R700ALUInstruction*)alu_instruction_ptr_hl;
+ break;
+ case 2:
+ alu_instruction_ptr_fl = (R700ALUInstructionFullLiteral*) CALLOC_STRUCT(R700ALUInstructionFullLiteral);
+ Init_R700ALUInstructionFullLiteral(alu_instruction_ptr_fl,pAsm->C[0].f, pAsm->C[1].f, pAsm->C[2].f, pAsm->C[3].f);
+ alu_instruction_ptr = (R700ALUInstruction*)alu_instruction_ptr_fl;
+ break;
+ };
+ }
+ else
+ {
+ alu_instruction_ptr = (R700ALUInstruction*) CALLOC_STRUCT(R700ALUInstruction);
+ Init_R700ALUInstruction(alu_instruction_ptr);
+ }
//src 0
current_source_index = 0;
@@ -2184,7 +2376,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
current_source_index,
pcurrent_source,
scalar_channel_index) )
- {
+ {
return GL_FALSE;
}
@@ -2198,13 +2390,13 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
current_source_index,
pcurrent_source,
scalar_channel_index) )
- {
+ {
return GL_FALSE;
}
}
//other bits
- alu_instruction_ptr->m_Word0.f.index_mode = SQ_INDEX_AR_X;
+ alu_instruction_ptr->m_Word0.f.index_mode = pAsm->D2.dst2.index_mode;
if( (is_single_scalar_operation == GL_TRUE)
|| (GL_TRUE == bSplitInst) )
@@ -2216,9 +2408,17 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
alu_instruction_ptr->m_Word0.f.last = (scalar_channel_index == 3) ? 1 : 0;
}
- alu_instruction_ptr->m_Word0.f.pred_sel = 0x0;
- alu_instruction_ptr->m_Word1_OP2.f.update_pred = 0x0;
- alu_instruction_ptr->m_Word1_OP2.f.update_execute_mask = 0x0;
+ 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) ||
@@ -2227,7 +2427,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;
}
@@ -2257,7 +2457,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
alu_instruction_ptr->m_Word1.f.dst_chan = scalar_channel_index;
- alu_instruction_ptr->m_Word1.f.clamp = pAsm->pILInst[pAsm->uiCurInst].SaturateMode;
+ alu_instruction_ptr->m_Word1.f.clamp = pAsm->D2.dst2.SaturateMode;
if (pAsm->D.dst.op3)
{
@@ -2284,8 +2484,8 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
{
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.src0_abs = pAsm->S[0].src.abs;
+ alu_instruction_ptr->m_Word1_OP2.f6.src1_abs = pAsm->S[1].src.abs;
//alu_instruction_ptr->m_Word1_OP2.f6.update_execute_mask = 0x0;
//alu_instruction_ptr->m_Word1_OP2.f6.update_pred = 0x0;
@@ -2313,8 +2513,8 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
{
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.src0_abs = pAsm->S[0].src.abs;
+ alu_instruction_ptr->m_Word1_OP2.f.src1_abs = pAsm->S[1].src.abs;
//alu_instruction_ptr->m_Word1_OP2.f.update_execute_mask = 0x0;
//alu_instruction_ptr->m_Word1_OP2.f.update_pred = 0x0;
@@ -2341,7 +2541,7 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
}
if(GL_FALSE == add_alu_instruction(pAsm, alu_instruction_ptr, contiguous_slots_needed) )
- {
+ {
return GL_FALSE;
}
@@ -2352,19 +2552,19 @@ GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm)
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 1;
+ {
+ return GL_FALSE;
}
}
- contiguous_slots_needed = 0;
+ contiguous_slots_needed -= 1;
}
return GL_TRUE;
@@ -2415,11 +2615,14 @@ 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;
+ pAsm->D2.bits = 0;
+ pAsm->C[0].bits = pAsm->C[1].bits = pAsm->C[2].bits = pAsm->C[3].bits = 0;
return GL_TRUE;
}
@@ -2652,9 +2855,44 @@ GLboolean assemble_CMP(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
-GLboolean assemble_COS(r700_AssemblerBase *pAsm)
+GLboolean assemble_TRIG(r700_AssemblerBase *pAsm, BITS opcode)
{
- return assemble_math_function(pAsm, SQ_OP2_INST_COS);
+ int tmp;
+ checkop1(pAsm);
+
+ tmp = gethelpr(pAsm);
+
+ pAsm->D.dst.opcode = SQ_OP2_INST_MUL;
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = tmp;
+ pAsm->D.dst.writex = 1;
+
+ assemble_src(pAsm, 0, -1);
+
+ pAsm->S[1].src.rtype = SRC_REC_LITERAL;
+ setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_X);
+ pAsm->D2.dst2.literal_slots = 1;
+ pAsm->C[0].f = 1/(3.1415926535 * 2);
+ pAsm->C[1].f = 0.0F;
+ next_ins(pAsm);
+
+ pAsm->D.dst.opcode = opcode;
+ pAsm->D.dst.math = 1;
+
+ assemble_dst(pAsm);
+
+ 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_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ next_ins(pAsm);
+
+ //TODO - replicate if more channels set in WriteMask
+ return GL_TRUE;
+
}
GLboolean assemble_DOT(r700_AssemblerBase *pAsm)
@@ -2922,13 +3160,15 @@ 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)
+{
+ struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]);
+
+ if(pILInst->Opcode == OPCODE_KIL)
+ checkop1(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;
@@ -2941,21 +3181,34 @@ GLboolean assemble_KIL(r700_AssemblerBase *pAsm)
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) )
+ if(pILInst->Opcode == OPCODE_KIL_NV)
{
- return GL_FALSE;
+ setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE);
+ pAsm->S[1].src.rtype = SRC_REG_TEMPORARY;
+ pAsm->S[1].src.reg = 0;
+ setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_1);
+ neg_PVSSRC(&(pAsm->S[1].src));
}
-
+ else
+ {
+ if( GL_FALSE == assemble_src(pAsm, 0, 1) )
+ {
+ return GL_FALSE;
+ }
+
+ }
+
if ( GL_FALSE == next_ins(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;
}
@@ -3019,6 +3272,7 @@ GLboolean assemble_LRP(r700_AssemblerBase *pAsm)
{
return GL_FALSE;
}
+
if( GL_FALSE == assemble_src(pAsm, 2, -1) )
{
return GL_FALSE;
@@ -3754,77 +4008,137 @@ GLboolean assemble_RSQ(r700_AssemblerBase *pAsm)
return assemble_math_function(pAsm, SQ_OP2_INST_RECIPSQRT_IEEE);
}
-GLboolean assemble_SIN(r700_AssemblerBase *pAsm)
-{
- return assemble_math_function(pAsm, SQ_OP2_INST_SIN);
-}
-
GLboolean assemble_SCS(r700_AssemblerBase *pAsm)
{
BITS tmp;
- checkop1(pAsm);
+ checkop1(pAsm);
- tmp = gethelpr(pAsm);
+ tmp = gethelpr(pAsm);
+ /* tmp.x = src /2*PI */
+ pAsm->D.dst.opcode = SQ_OP2_INST_MUL;
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = tmp;
+ pAsm->D.dst.writex = 1;
- // COS tmp.x, a.x
- pAsm->D.dst.opcode = SQ_OP2_INST_COS;
- pAsm->D.dst.math = 1;
+ assemble_src(pAsm, 0, -1);
- setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
- pAsm->D.dst.rtype = DST_REG_TEMPORARY;
- pAsm->D.dst.reg = tmp;
- pAsm->D.dst.writex = 1;
+ pAsm->S[1].src.rtype = SRC_REC_LITERAL;
+ setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_X);
+ pAsm->D2.dst2.literal_slots = 1;
+ pAsm->C[0].f = 1/(3.1415926535 * 2);
+ pAsm->C[1].f = 0.0F;
- if( GL_FALSE == assemble_src(pAsm, 0, -1) )
- {
- return GL_FALSE;
- }
+ next_ins(pAsm);
- if ( GL_FALSE == next_ins(pAsm) )
- {
- return GL_FALSE;
- }
+ // COS dst.x, a.x
+ pAsm->D.dst.opcode = SQ_OP2_INST_COS;
+ pAsm->D.dst.math = 1;
- // SIN tmp.y, a.x
- pAsm->D.dst.opcode = SQ_OP2_INST_SIN;
- pAsm->D.dst.math = 1;
+ assemble_dst(pAsm);
+ /* mask y */
+ pAsm->D.dst.writey = 0;
- setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
- pAsm->D.dst.rtype = DST_REG_TEMPORARY;
- pAsm->D.dst.reg = tmp;
- pAsm->D.dst.writey = 1;
+ 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_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
- if( GL_FALSE == assemble_src(pAsm, 0, -1) )
- {
- return GL_FALSE;
- }
+ if ( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
- if( GL_FALSE == next_ins(pAsm) )
- {
- return GL_FALSE;
- }
+ // SIN dst.y, a.x
+ pAsm->D.dst.opcode = SQ_OP2_INST_SIN;
+ pAsm->D.dst.math = 1;
- // MOV dst.mask, tmp
- pAsm->D.dst.opcode = SQ_OP2_INST_MOV;
+ assemble_dst(pAsm);
+ /* mask x */
+ pAsm->D.dst.writex = 0;
- if( GL_FALSE == assemble_dst(pAsm) )
- {
- return GL_FALSE;
- }
+ 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_X);
+ noneg_PVSSRC(&(pAsm->S[0].src));
- setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
- pAsm->S[0].src.rtype = DST_REG_TEMPORARY;
- pAsm->S[0].src.reg = tmp;
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
- noswizzle_PVSSRC(&(pAsm->S[0].src));
- pAsm->S[0].src.swizzlez = SQ_SEL_0;
- pAsm->S[0].src.swizzlew = SQ_SEL_0;
+ return GL_TRUE;
+}
- if ( GL_FALSE == next_ins(pAsm) )
- {
- return GL_FALSE;
- }
+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)
+{
+ struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]);
+
+ pAsm->D.dst.opcode = opcode;
+ pAsm->D.dst.math = 1;
+ pAsm->D.dst.predicated = 1;
+
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = pAsm->uHelpReg;
+ pAsm->D.dst.writex = 1;
+ 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 = SRC_REG_TEMPORARY;
+ pAsm->S[0].src.reg = pAsm->last_cond_register + pAsm->starting_temp_register_number;
+ pAsm->S[0].src.swizzlex = pILInst->DstReg.CondSwizzle & 0x7;
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ pAsm->S[1].src.rtype = SRC_REG_TEMPORARY;
+ pAsm->S[1].src.reg = pAsm->uHelpReg;
+ setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE);
+ noneg_PVSSRC(&(pAsm->S[1].src));
+ pAsm->S[1].src.swizzlex = SQ_SEL_0;
+ pAsm->S[1].src.swizzley = SQ_SEL_0;
+ pAsm->S[1].src.swizzlez = SQ_SEL_0;
+ pAsm->S[1].src.swizzlew = SQ_SEL_0;
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
return GL_TRUE;
}
@@ -3907,6 +4221,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:
@@ -4004,24 +4319,6 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
return GL_FALSE;
}
- /* tmp1.z = ABS(tmp1.z) dont have abs support in assembler currently
- * have to do explicit instruction
- */
- 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.writez = 1;
-
- setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
- pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
- pAsm->S[0].src.reg = tmp1;
- noswizzle_PVSSRC(&(pAsm->S[0].src));
- pAsm->S[1].bits = pAsm->S[0].bits;
- flipneg_PVSSRC(&(pAsm->S[1].src));
-
- next_ins(pAsm);
-
/* tmp1.z = RCP_e(|tmp1.z|) */
pAsm->D.dst.opcode = SQ_OP2_INST_RECIP_IEEE;
pAsm->D.dst.math = 1;
@@ -4034,13 +4331,13 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
pAsm->S[0].src.reg = tmp1;
pAsm->S[0].src.swizzlex = SQ_SEL_Z;
+ pAsm->S[0].src.abs = 1;
next_ins(pAsm);
/* MULADD R0.x, R0.x, PS1, (0x3FC00000, 1.5f).x
* MULADD R0.y, R0.y, PS1, (0x3FC00000, 1.5f).x
* muladd has no writemask, have to use another temp
- * also no support for imm constants, so add 1 here
*/
pAsm->D.dst.opcode = SQ_OP3_INST_MULADD;
pAsm->D.dst.op3 = 1;
@@ -4057,30 +4354,12 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
pAsm->S[1].src.reg = tmp1;
setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_Z);
setaddrmode_PVSSRC(&(pAsm->S[2].src), ADDR_ABSOLUTE);
- pAsm->S[2].src.rtype = SRC_REG_TEMPORARY;
+ /* immediate c 1.5 */
+ pAsm->D2.dst2.literal_slots = 1;
+ pAsm->C[0].f = 1.5F;
+ pAsm->S[2].src.rtype = SRC_REC_LITERAL;
pAsm->S[2].src.reg = tmp1;
- setswizzle_PVSSRC(&(pAsm->S[2].src), SQ_SEL_1);
-
- next_ins(pAsm);
-
- /* ADD the remaining .5 */
- 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 = tmp2;
- pAsm->D.dst.writex = 1;
- pAsm->D.dst.writey = 1;
- 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 = tmp2;
- noswizzle_PVSSRC(&(pAsm->S[0].src));
- setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE);
- pAsm->S[1].src.rtype = SRC_REG_TEMPORARY;
- pAsm->S[1].src.reg = 252; // SQ_ALU_SRC_0_5
- noswizzle_PVSSRC(&(pAsm->S[1].src));
+ setswizzle_PVSSRC(&(pAsm->S[2].src), SQ_SEL_X);
next_ins(pAsm);
@@ -4105,22 +4384,35 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
}
- if(pAsm->pILInst[pAsm->uiCurInst].Opcode == OPCODE_TXB)
- {
- pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE_L;
- }
- else
+ switch(pAsm->pILInst[pAsm->uiCurInst].Opcode)
{
- pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE;
+ case OPCODE_DDX:
+ /* will these need WQM(1) on CF inst ? */
+ pAsm->D.dst.opcode = SQ_TEX_INST_GET_GRADIENTS_H;
+ break;
+ case OPCODE_DDY:
+ pAsm->D.dst.opcode = SQ_TEX_INST_GET_GRADIENTS_V;
+ break;
+ case OPCODE_TXB:
+ pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE_L;
+ break;
+ default:
+ if(pAsm->pILInst[pAsm->uiCurInst].TexShadow == 1)
+ pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE_C;
+ else
+ pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE;
}
pAsm->is_tex = GL_TRUE;
if ( GL_TRUE == need_barrier )
+
+ pAsm->is_tex = GL_TRUE;
+ if ( GL_TRUE == need_barrier )
{
pAsm->need_tex_barrier = GL_TRUE;
}
// Set src1 to tex unit id
- pAsm->S[1].src.reg = pAsm->pILInst[pAsm->uiCurInst].TexSrcUnit;
+ pAsm->S[1].src.reg = pAsm->SamplerUnits[pAsm->pILInst[pAsm->uiCurInst].TexSrcUnit];
pAsm->S[1].src.rtype = SRC_REG_TEMPORARY;
//No sw info from mesa compiler, so hard code here.
@@ -4154,11 +4446,46 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
pAsm->S[0].src.swizzlew = SQ_SEL_Y;
}
+ if(pAsm->pILInst[pAsm->uiCurInst].TexShadow == 1)
+ {
+ /* compare value goes to w chan ? */
+ pAsm->S[0].src.swizzlew = SQ_SEL_Z;
+ }
+
if ( GL_FALSE == next_ins(pAsm) )
{
return GL_FALSE;
}
+ /* add ARB shadow ambient but clamp to 0..1 */
+ if(pAsm->pILInst[pAsm->uiCurInst].TexShadow == 1)
+ {
+ /* ADD_SAT dst, dst, ambient[texunit] */
+ pAsm->D.dst.opcode = SQ_OP2_INST_ADD;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+ pAsm->D2.dst2.SaturateMode = 1;
+
+ pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
+ pAsm->S[0].src.reg = pAsm->D.dst.reg;
+ noswizzle_PVSSRC(&(pAsm->S[0].src));
+ noneg_PVSSRC(&(pAsm->S[0].src));
+
+ pAsm->S[1].src.rtype = SRC_REG_CONSTANT;
+ pAsm->S[1].src.reg = pAsm->shadow_regs[pAsm->pILInst[pAsm->uiCurInst].TexSrcUnit];
+ noswizzle_PVSSRC(&(pAsm->S[1].src));
+ noneg_PVSSRC(&(pAsm->S[1].src));
+
+ if( GL_FALSE == next_ins(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ }
+
return GL_TRUE;
}
@@ -4277,27 +4604,909 @@ 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)
+{
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+
+ assemble_LOGIC_PRED(pAsm, SQ_OP2_INST_PRED_SETNE);
+
+
+ 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 AssembleInstr(GLuint uiNumberInsts,
+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
+
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+
+ assemble_LOGIC_PRED(pAsm, SQ_OP2_INST_PRED_SETNE);
+
+ 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 assemble_CONT(r700_AssemblerBase *pAsm)
+{
+#ifdef USE_CF_FOR_CONTINUE_BREAK
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU_PUSH_BEFORE;
+
+ assemble_LOGIC_PRED(pAsm, SQ_OP2_INST_PRED_SETNE);
+
+ 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;
+ }
+ //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, GLuint uiIL_Shift)
+{
+ /* 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 + uiIL_Shift;
+ 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 uiIL_Shift,
+ GLuint uiNumberInsts,
+ struct prog_instruction *pILInst,
+ PRESUB_DESC * pPresubDesc)
+{
+ GLint uiIL_Offset;
+
+ 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;
+ }
+
+ uiIL_Offset = nILindex + uiIL_Shift;
+ pAsm->callers[pAsm->unCallerArrayPointer].subIL_Offset = uiIL_Offset;
+ pAsm->callers[pAsm->unCallerArrayPointer].cf_ptr = pAsm->cf_current_cf_clause_ptr;
+
+ pAsm->callers[pAsm->unCallerArrayPointer].finale_cf_ptr = NULL;
+ pAsm->callers[pAsm->unCallerArrayPointer].prelude_cf_ptr = NULL;
+
+ pAsm->unCallerArrayPointer++;
+
+ int j;
+ GLuint max;
+ GLuint unSubID;
+ GLboolean bRet;
+ for(j=0; j<pAsm->unSubArrayPointer; j++)
+ {
+ if(uiIL_Offset == 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, uiIL_Shift, 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;
+ }
+
+ pAsm->subs[unSubID].pPresubDesc = pPresubDesc;
+ }
+
+ 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_slots = 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 */
+ pAsm->D2.dst2.index_mode = SQ_INDEX_LOOP; /* Check this ! */
+#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_ins(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_slots = 1;
+ pAsm->D2.dst2.SaturateMode = SATURATE_OFF;
+ pAsm->D.dst.predicated = 1;
+ pAsm->D2.dst2.index_mode = SQ_INDEX_LOOP; /* Check this ! */
+
+ 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_ins(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 uiIL_Shift,
+ 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
+ if(pILInst[i].CondUpdate == 1)
+ {
+ /* remember dest register used for cond evaluation */
+ /* XXX also handle PROGRAM_OUTPUT registers here? */
+ pR700AsmCode->last_cond_register = pILInst[i].DstReg.Index;
+ }
+
switch (pILInst[i].Opcode)
{
case OPCODE_ABS:
@@ -4325,7 +5534,7 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_FALSE;
break;
case OPCODE_COS:
- if ( GL_FALSE == assemble_COS(pR700AsmCode) )
+ if ( GL_FALSE == assemble_TRIG(pR700AsmCode, SQ_OP2_INST_COS) )
return GL_FALSE;
break;
@@ -4354,7 +5563,8 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
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;
@@ -4365,7 +5575,8 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
break;
case OPCODE_KIL:
- if ( GL_FALSE == assemble_KIL(pR700AsmCode) )
+ case OPCODE_KIL_NV:
+ if ( GL_FALSE == assemble_KIL(pR700AsmCode, SQ_OP2_INST_KILLGT) )
return GL_FALSE;
break;
case OPCODE_LG2:
@@ -4405,6 +5616,26 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
case OPCODE_MUL:
if ( GL_FALSE == assemble_MUL(pR700AsmCode) )
return GL_FALSE;
+ break;
+
+ case OPCODE_NOISE1:
+ {
+ callPreSub(pR700AsmCode,
+ GLSL_NOISE1,
+ &noise1_presub,
+ pILInst->DstReg.Index + pR700AsmCode->starting_temp_register_number,
+ 1);
+ radeon_error("noise1: not yet supported shader instruction\n");
+ };
+ break;
+ case OPCODE_NOISE2:
+ radeon_error("noise2: not yet supported shader instruction\n");
+ break;
+ case OPCODE_NOISE3:
+ radeon_error("noise3: not yet supported shader instruction\n");
+ break;
+ case OPCODE_NOISE4:
+ radeon_error("noise4: not yet supported shader instruction\n");
break;
case OPCODE_POW:
@@ -4420,22 +5651,78 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
return GL_FALSE;
break;
case OPCODE_SIN:
- if ( GL_FALSE == assemble_SIN(pR700AsmCode) )
+ if ( GL_FALSE == assemble_TRIG(pR700AsmCode, SQ_OP2_INST_SIN) )
return GL_FALSE;
break;
case OPCODE_SCS:
if ( GL_FALSE == assemble_SCS(pR700AsmCode) )
return GL_FALSE;
- break;
+ break;
+
+ case OPCODE_SEQ:
+ if ( GL_FALSE == assemble_LOGIC(pR700AsmCode, SQ_OP2_INST_SETE) )
+ {
+ return GL_FALSE;
+ }
+ break;
+
+ case OPCODE_SGT:
+ 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;
+ }
+ 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) )
+ {
+ 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 ( 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 ( 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 ( GL_FALSE == assemble_LOGIC(pR700AsmCode, SQ_OP2_INST_SETNE) )
+ {
return GL_FALSE;
- break;
+ }
+ break;
//case OP_STP:
// if ( GL_FALSE == assemble_STP(pR700AsmCode) )
@@ -4461,7 +5748,8 @@ GLboolean AssembleInstr(GLuint uiNumberInsts,
}
}
break;
-
+ case OPCODE_DDX:
+ case OPCODE_DDY:
case OPCODE_TEX:
case OPCODE_TXB:
case OPCODE_TXP:
@@ -4469,30 +5757,104 @@ 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;
+ case OPCODE_IF:
+ {
+ GLboolean bHasElse = GL_FALSE;
+
+ if(pILInst[pILInst[i].BranchTarget].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, uiIL_Shift) )
+ {
+ 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,
+ uiIL_Shift,
+ uiNumberInsts,
+ pILInst,
+ NULL) )
+ {
+ 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
@@ -4509,6 +5871,417 @@ 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, struct gl_program * pILProg)
+{
+ GLuint i;
+ GLuint unCFoffset;
+ TypedShaderList * plstCFmain;
+ TypedShaderList * plstCFsub;
+
+ R700ShaderInstruction * pInst;
+ R700ControlFlowGenericClause * pCFInst;
+
+ R700ControlFlowALUClause * pCF_ALU;
+ R700ALUInstruction * pALU;
+ GLuint unConstOffset = 0;
+ GLuint unRegOffset;
+ GLuint unMinRegIndex;
+
+ 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;
+
+ if(NULL != pILProg->Parameters)
+ {
+ unConstOffset = pILProg->Parameters->NumParameters;
+ }
+
+ /* 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;
+ };
+
+ if(NULL != pAsm->subs[i].pPresubDesc)
+ {
+ GLuint uNumSrc;
+
+ unMinRegIndex = pAsm->subs[i].pPresubDesc->pCompiledSub->MinRegIndex;
+ unRegOffset = pAsm->subs[i].pPresubDesc->maxStartReg;
+ unConstOffset += pAsm->subs[i].pPresubDesc->unConstantsStart;
+
+ pInst = plstCFsub->pHead;
+ while(pInst)
+ {
+ if(SIT_CF_ALU == pInst->m_ShaderInstType)
+ {
+ pCF_ALU = (R700ControlFlowALUClause *)pInst;
+
+ pALU = pCF_ALU->m_pLinkedALUInstruction;
+ for(int j=0; j<=pCF_ALU->m_Word1.f.count; j++)
+ {
+ pALU->m_Word1.f.dst_gpr = pALU->m_Word1.f.dst_gpr + unRegOffset - unMinRegIndex;
+
+ if(pALU->m_Word0.f.src0_sel < SQ_ALU_SRC_GPR_SIZE)
+ {
+ pALU->m_Word0.f.src0_sel = pALU->m_Word0.f.src0_sel + unRegOffset - unMinRegIndex;
+ }
+ else if(pALU->m_Word0.f.src0_sel >= SQ_ALU_SRC_CFILE_BASE)
+ {
+ pALU->m_Word0.f.src0_sel += unConstOffset;
+ }
+
+ if( ((pALU->m_Word1.val >> SQ_ALU_WORD1_OP3_ALU_INST_SHIFT) & 0x0000001F)
+ >= SQ_OP3_INST_MUL_LIT )
+ { /* op3 : 3 srcs */
+ if(pALU->m_Word1_OP3.f.src2_sel < SQ_ALU_SRC_GPR_SIZE)
+ {
+ pALU->m_Word1_OP3.f.src2_sel = pALU->m_Word1_OP3.f.src2_sel + unRegOffset - unMinRegIndex;
+ }
+ else if(pALU->m_Word1_OP3.f.src2_sel >= SQ_ALU_SRC_CFILE_BASE)
+ {
+ pALU->m_Word1_OP3.f.src2_sel += unConstOffset;
+ }
+ if(pALU->m_Word0.f.src1_sel < SQ_ALU_SRC_GPR_SIZE)
+ {
+ pALU->m_Word0.f.src1_sel = pALU->m_Word0.f.src1_sel + unRegOffset - unMinRegIndex;
+ }
+ else if(pALU->m_Word0.f.src1_sel >= SQ_ALU_SRC_CFILE_BASE)
+ {
+ pALU->m_Word0.f.src1_sel += unConstOffset;
+ }
+ }
+ else
+ {
+ if(pAsm->bR6xx)
+ {
+ uNumSrc = r700GetNumOperands(pALU->m_Word1_OP2.f6.alu_inst, 0);
+ }
+ else
+ {
+ uNumSrc = r700GetNumOperands(pALU->m_Word1_OP2.f.alu_inst, 0);
+ }
+ if(2 == uNumSrc)
+ { /* 2 srcs */
+ if(pALU->m_Word0.f.src1_sel < SQ_ALU_SRC_GPR_SIZE)
+ {
+ pALU->m_Word0.f.src1_sel = pALU->m_Word0.f.src1_sel + unRegOffset - unMinRegIndex;
+ }
+ else if(pALU->m_Word0.f.src1_sel >= SQ_ALU_SRC_CFILE_BASE)
+ {
+ pALU->m_Word0.f.src1_sel += unConstOffset;
+ }
+ }
+ }
+ pALU = (R700ALUInstruction*)(pALU->pNextInst);
+ }
+ }
+ 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;
+
+ if(NULL != pAsm->subs[pAsm->callers[i].subDescIndex].pPresubDesc)
+ {
+ unMinRegIndex = pAsm->subs[pAsm->callers[i].subDescIndex].pPresubDesc->pCompiledSub->MinRegIndex;
+ unRegOffset = pAsm->subs[pAsm->callers[i].subDescIndex].pPresubDesc->maxStartReg;
+
+ if(NULL != pAsm->callers[i].prelude_cf_ptr)
+ {
+ pCF_ALU = (R700ControlFlowALUClause * )(pAsm->callers[i].prelude_cf_ptr);
+ pALU = pCF_ALU->m_pLinkedALUInstruction;
+ for(int j=0; j<=pCF_ALU->m_Word1.f.count; j++)
+ {
+ pALU->m_Word1.f.dst_gpr = pALU->m_Word1.f.dst_gpr + unRegOffset - unMinRegIndex;
+ pALU = (R700ALUInstruction*)(pALU->pNextInst);
+ }
+ }
+ if(NULL != pAsm->callers[i].finale_cf_ptr)
+ {
+ pCF_ALU = (R700ControlFlowALUClause * )(pAsm->callers[i].finale_cf_ptr);
+ pALU = pCF_ALU->m_pLinkedALUInstruction;
+ for(int j=0; j<=pCF_ALU->m_Word1.f.count; j++)
+ {
+ pALU->m_Word0.f.src0_sel = pALU->m_Word0.f.src0_sel + unRegOffset - unMinRegIndex;
+ pALU = (R700ALUInstruction*)(pALU->pNextInst);
+ }
+ }
+ }
+ }
+
+ return GL_TRUE;
+}
+
+GLboolean callPreSub(r700_AssemblerBase* pAsm,
+ LOADABLE_SCRIPT_SIGNITURE scriptSigniture,
+ COMPILED_SUB * pCompiledSub,
+ GLshort uOutReg,
+ GLshort uNumValidSrc)
+{
+ /* save assemble context */
+ GLuint starting_temp_register_number_save;
+ GLuint number_used_registers_save;
+ GLuint uFirstHelpReg_save;
+ GLuint uHelpReg_save;
+ GLuint uiCurInst_save;
+ struct prog_instruction *pILInst_save;
+ PRESUB_DESC * pPresubDesc;
+ GLboolean bRet;
+ int i;
+
+ R700ControlFlowGenericClause* prelude_cf_ptr = NULL;
+
+ /* copy srcs to presub inputs */
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
+ for(i=0; i<uNumValidSrc; i++)
+ {
+ pAsm->D.dst.opcode = SQ_OP2_INST_MOV;
+ setaddrmode_PVSDST(&(pAsm->D.dst), ADDR_ABSOLUTE);
+ pAsm->D.dst.rtype = DST_REG_TEMPORARY;
+ pAsm->D.dst.reg = pCompiledSub->srcRegIndex[i];
+ pAsm->D.dst.writex = 1;
+ pAsm->D.dst.writey = 1;
+ pAsm->D.dst.writez = 1;
+ pAsm->D.dst.writew = 1;
+
+ if( GL_FALSE == assemble_src(pAsm, i, 0) )
+ {
+ return GL_FALSE;
+ }
+
+ next_ins(pAsm);
+ }
+ if(uNumValidSrc > 0)
+ {
+ prelude_cf_ptr = pAsm->cf_current_alu_clause_ptr;
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
+ }
+
+ /* browse thro existing presubs. */
+ for(i=0; i<pAsm->unNumPresub; i++)
+ {
+ if(pAsm->presubs[i].sptSigniture == scriptSigniture)
+ {
+ break;
+ }
+ }
+
+ if(i == pAsm->unNumPresub)
+ { /* not loaded yet */
+ /* save assemble context */
+ number_used_registers_save = pAsm->number_used_registers;
+ uFirstHelpReg_save = pAsm->uFirstHelpReg;
+ uHelpReg_save = pAsm->uHelpReg;
+ starting_temp_register_number_save = pAsm->starting_temp_register_number;
+ pILInst_save = pAsm->pILInst;
+ uiCurInst_save = pAsm->uiCurInst;
+
+ /* alloc in presub */
+ if( (pAsm->unNumPresub + 1) > pAsm->unPresubArraySize )
+ {
+ pAsm->presubs = (PRESUB_DESC*)_mesa_realloc( (void *)pAsm->presubs,
+ sizeof(PRESUB_DESC) * pAsm->unPresubArraySize,
+ sizeof(PRESUB_DESC) * (pAsm->unPresubArraySize + 4) );
+ if(NULL == pAsm->presubs)
+ {
+ radeon_error("No memeory to allocate built in shader function description structures. \n");
+ return GL_FALSE;
+ }
+ pAsm->unPresubArraySize += 4;
+ }
+
+ pPresubDesc = &(pAsm->presubs[i]);
+ pPresubDesc->sptSigniture = scriptSigniture;
+
+ /* constants offsets need to be final resolved at reloc. */
+ if(0 == pAsm->unNumPresub)
+ {
+ pPresubDesc->unConstantsStart = 0;
+ }
+ else
+ {
+ pPresubDesc->unConstantsStart = pAsm->presubs[i-1].unConstantsStart
+ + pAsm->presubs[i-1].pCompiledSub->NumParameters;
+ }
+
+ pPresubDesc->pCompiledSub = pCompiledSub;
+
+ pPresubDesc->subIL_Shift = pAsm->unCurNumILInsts;
+ pPresubDesc->maxStartReg = uFirstHelpReg_save;
+ pAsm->unCurNumILInsts += pCompiledSub->NumInstructions;
+
+ pAsm->unNumPresub++;
+
+ /* setup new assemble context */
+ pAsm->starting_temp_register_number = 0;
+ pAsm->number_used_registers = pCompiledSub->NumTemporaries;
+ pAsm->uFirstHelpReg = pAsm->number_used_registers;
+ pAsm->uHelpReg = pAsm->uFirstHelpReg;
+
+ bRet = assemble_CAL(pAsm,
+ 0,
+ pPresubDesc->subIL_Shift,
+ pCompiledSub->NumInstructions,
+ pCompiledSub->Instructions,
+ pPresubDesc);
+
+
+ pPresubDesc->number_used_registers = pAsm->number_used_registers;
+
+ /* restore assemble context */
+ pAsm->number_used_registers = number_used_registers_save;
+ pAsm->uFirstHelpReg = uFirstHelpReg_save;
+ pAsm->uHelpReg = uHelpReg_save;
+ pAsm->starting_temp_register_number = starting_temp_register_number_save;
+ pAsm->pILInst = pILInst_save;
+ pAsm->uiCurInst = uiCurInst_save;
+ }
+ else
+ { /* was loaded */
+ pPresubDesc = &(pAsm->presubs[i]);
+
+ bRet = assemble_CAL(pAsm,
+ 0,
+ pPresubDesc->subIL_Shift,
+ pCompiledSub->NumInstructions,
+ pCompiledSub->Instructions,
+ pPresubDesc);
+ }
+
+ if(GL_FALSE == bRet)
+ {
+ radeon_error("Shader presub assemble failed. \n");
+ }
+ else
+ {
+ /* copy presub output to real dst */
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
+ pAsm->D.dst.opcode = SQ_OP2_INST_MOV;
+
+ if( GL_FALSE == assemble_dst(pAsm) )
+ {
+ return GL_FALSE;
+ }
+
+ setaddrmode_PVSSRC(&(pAsm->S[0].src), ADDR_ABSOLUTE);
+ pAsm->S[0].src.rtype = SRC_REG_TEMPORARY;
+ pAsm->S[0].src.reg = pCompiledSub->dstRegIndex;
+ pAsm->S[0].src.swizzlex = pCompiledSub->outputSwizzleX;
+ pAsm->S[0].src.swizzley = pCompiledSub->outputSwizzleY;
+ pAsm->S[0].src.swizzlez = pCompiledSub->outputSwizzleZ;
+ pAsm->S[0].src.swizzlew = pCompiledSub->outputSwizzleW;
+
+ next_ins(pAsm);
+
+ pAsm->callers[pAsm->unCallerArrayPointer - 1].finale_cf_ptr = pAsm->cf_current_alu_clause_ptr;
+ pAsm->callers[pAsm->unCallerArrayPointer - 1].prelude_cf_ptr = prelude_cf_ptr;
+ pAsm->alu_x_opcode = SQ_CF_INST_ALU;
+ }
+
+ if( (pPresubDesc->number_used_registers + pAsm->uFirstHelpReg) > pAsm->number_used_registers )
+ {
+ pAsm->number_used_registers = pPresubDesc->number_used_registers + pAsm->uFirstHelpReg;
+ }
+ if(pAsm->uFirstHelpReg > pPresubDesc->maxStartReg)
+ {
+ pPresubDesc->maxStartReg = pAsm->uFirstHelpReg;
+ }
+
+ return bRet;
+}
+
GLboolean Process_Export(r700_AssemblerBase* pAsm,
GLuint type,
GLuint export_starting_index,
@@ -4803,6 +6576,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)
@@ -4837,6 +6629,21 @@ 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);
+ }
+
+ if(NULL != pR700AsmCode->presubs)
+ {
+ FREE(pR700AsmCode->presubs);
+ }
+
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.h b/src/mesa/drivers/dri/r600/r700_assembler.h
index ee125826612..0064d0814f3 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.h
+++ b/src/mesa/drivers/dri/r600/r700_assembler.h
@@ -34,6 +34,45 @@
#include "r700_shaderinst.h"
#include "r700_shader.h"
+typedef enum LOADABLE_SCRIPT_SIGNITURE
+{
+ GLSL_NOISE1 = 0x10000001,
+ GLSL_NOISE2 = 0x10000002,
+ GLSL_NOISE3 = 0x10000003,
+ GLSL_NOISE4 = 0x10000004
+}LOADABLE_SCRIPT_SIGNITURE;
+
+typedef struct COMPILED_SUB
+{
+ struct prog_instruction *Instructions;
+ GLuint NumInstructions;
+ GLuint NumTemporaries;
+ GLuint NumParameters;
+ GLuint MinRegIndex;
+ GLfloat (*ParameterValues)[4];
+ GLbyte outputSwizzleX;
+ GLbyte outputSwizzleY;
+ GLbyte outputSwizzleZ;
+ GLbyte outputSwizzleW;
+ GLshort srcRegIndex[3];
+ GLushort dstRegIndex;
+}COMPILED_SUB;
+
+typedef struct PRESUB_DESCtag
+{
+ LOADABLE_SCRIPT_SIGNITURE sptSigniture;
+ GLint subIL_Shift;
+ struct prog_src_register InReg[3];
+ struct prog_dst_register OutReg;
+
+ GLushort maxStartReg;
+ GLushort number_used_registers;
+
+ GLuint unConstantsStart;
+
+ COMPILED_SUB * pCompiledSub;
+} PRESUB_DESC;
+
typedef enum SHADER_PIPE_TYPE
{
SPT_VP = 0,
@@ -72,7 +111,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,16 +151,24 @@ typedef struct PVSDSTtag
BITS addrmode1:1; //32
} PVSDST;
+typedef struct PVSINSTtag
+{
+ BITS literal_slots :2;
+ BITS SaturateMode :2;
+ BITS index_mode :3;
+} PVSINST;
+
typedef struct PVSSRCtag
{
- BITS rtype:4;
+ BITS rtype:3;
BITS addrmode0:1;
- BITS reg:10; //15 (8)
+ BITS reg:10; //14 (8)
BITS swizzlex:3;
BITS swizzley:3;
BITS swizzlez:3;
- BITS swizzlew:3; //27
+ BITS swizzlew:3; //26
+ BITS abs:1;
BITS negx:1;
BITS negy:1;
BITS negz:1;
@@ -148,6 +196,7 @@ typedef union PVSDWORDtag
{
BITS bits;
PVSDST dst;
+ PVSINST dst2;
PVSSRC src;
PVSMATH math;
float f;
@@ -251,6 +300,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 +314,56 @@ 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;
+ PRESUB_DESC * pPresubDesc;
+ TypedShaderList lstCFInstructions_local;
+} SUB_OFFSET;
+
+typedef struct CALLER_POINTER
+{
+ GLint subIL_Offset;
+ GLint subDescIndex;
+ R700ControlFlowGenericClause* cf_ptr;
+
+ R700ControlFlowGenericClause* prelude_cf_ptr;
+ R700ControlFlowGenericClause* finale_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,14 +379,19 @@ 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];
+ PVSDWORD C[4];
unsigned int uLastPosUpdate;
+ unsigned int last_cond_register;
OUT_FRAGMENT_FMT_0 fp_stOutFmt0;
@@ -310,6 +400,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 +422,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
//-----------------------------------------------------------------------------------
@@ -373,11 +462,33 @@ typedef struct r700_AssemblerBase
SHADER_PIPE_TYPE currentShaderType;
struct prog_instruction * pILInst;
GLuint uiCurInst;
+ GLubyte SamplerUnits[MAX_SAMPLERS];
GLboolean bR6xx;
/* helper to decide which type of instruction to assemble */
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;
+
+ PRESUB_DESC * presubs;
+ GLuint unPresubArraySize;
+ GLuint unNumPresub;
+ GLuint unCurNumILInsts;
+
+ GLuint unVetTexBits;
+
+ GLuint shadow_regs[R700_MAX_TEXTURE_UNITS];
+
} r700_AssemblerBase;
//Internal use
@@ -399,7 +510,7 @@ BITS is_depth_component_exported(OUT_FRAGMENT_FMT_0* pFPOutFmt) ;
GLboolean is_reduction_opcode(PVSDWORD * dest);
GLuint GetSurfaceFormat(GLenum eType, GLuint nChannels, GLuint * pClient_size);
-unsigned int r700GetNumOperands(r700_AssemblerBase* pAsm);
+unsigned int r700GetNumOperands(GLuint opcode, GLuint nIsOp3);
GLboolean IsTex(gl_inst_opcode Opcode);
GLboolean IsAlu(gl_inst_opcode Opcode);
@@ -447,6 +558,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,
@@ -468,13 +583,20 @@ GLboolean check_vector(r700_AssemblerBase* pAsm,
R700ALUInstruction* alu_instruction_ptr);
GLboolean assemble_alu_instruction(r700_AssemblerBase *pAsm);
GLboolean next_ins(r700_AssemblerBase *pAsm);
+
+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);
GLboolean assemble_ARL(r700_AssemblerBase *pAsm);
GLboolean assemble_BAD(char *opcode_str);
GLboolean assemble_CMP(r700_AssemblerBase *pAsm);
-GLboolean assemble_COS(r700_AssemblerBase *pAsm);
GLboolean assemble_DOT(r700_AssemblerBase *pAsm);
GLboolean assemble_DST(r700_AssemblerBase *pAsm);
GLboolean assemble_EX2(r700_AssemblerBase *pAsm);
@@ -482,7 +604,7 @@ 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);
@@ -495,17 +617,38 @@ GLboolean assemble_MUL(r700_AssemblerBase *pAsm);
GLboolean assemble_POW(r700_AssemblerBase *pAsm);
GLboolean assemble_RCP(r700_AssemblerBase *pAsm);
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_CONT(r700_AssemblerBase *pAsm);
+
+GLboolean assemble_LOGIC(r700_AssemblerBase *pAsm, BITS opcode);
+GLboolean assemble_LOGIC_PRED(r700_AssemblerBase *pAsm, BITS opcode);
+GLboolean assemble_TRIG(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, GLuint uiIL_Shift);
+GLboolean assemble_ENDSUB(r700_AssemblerBase *pAsm);
+GLboolean assemble_RET(r700_AssemblerBase *pAsm);
+GLboolean assemble_CAL(r700_AssemblerBase *pAsm,
+ GLint nILindex,
+ GLuint uiIL_Offest,
+ GLuint uiNumberInsts,
+ struct prog_instruction *pILInst,
+ PRESUB_DESC * pPresubDesc);
+
GLboolean Process_Export(r700_AssemblerBase* pAsm,
GLuint type,
GLuint export_starting_index,
@@ -515,14 +658,25 @@ GLboolean Process_Export(r700_AssemblerBase* pAsm,
GLboolean Move_Depth_Exports_To_Correct_Channels(r700_AssemblerBase *pAsm,
BITS depth_channel_select);
+GLboolean callPreSub(r700_AssemblerBase* pAsm,
+ LOADABLE_SCRIPT_SIGNITURE scriptSigniture,
+ /* struct prog_instruction ** pILInstParent, */
+ COMPILED_SUB * pCompiledSub,
+ GLshort uOutReg,
+ GLshort uNumValidSrc);
//Interface
-GLboolean AssembleInstr(GLuint uiNumberInsts,
+GLboolean AssembleInstr(GLuint uiFirstInst,
+ GLuint uiIL_Shift,
+ 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, struct gl_program * pILProg);
+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 7f1894d840b..ef25cd93fe4 100644
--- a/src/mesa/drivers/dri/r600/r700_chip.c
+++ b/src/mesa/drivers/dri/r600/r700_chip.c
@@ -45,6 +45,9 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
+
+ struct r700_vertex_program *vp = context->selected_vp;
+
struct radeon_bo *bo = NULL;
unsigned int i;
BATCH_LOCALS(&context->radeon);
@@ -52,7 +55,7 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) {
- if (ctx->Texture.Unit[i]._ReallyEnabled) {
+ if (ctx->Texture.Unit[i]._ReallyEnabled) {
radeonTexObj *t = r700->textures[i];
if (t) {
if (!t->image_override) {
@@ -68,7 +71,16 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
BEGIN_BATCH_NO_AUTOSTATE(9 + 4);
R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_RESOURCE, 7));
- R600_OUT_BATCH(i * 7);
+
+ if( (1<<i) & vp->r700AsmCode.unVetTexBits )
+ { /* vs texture */
+ R600_OUT_BATCH((i + VERT_ATTRIB_MAX + SQ_FETCH_RESOURCE_VS_OFFSET) * FETCH_RESOURCE_STRIDE);
+ }
+ else
+ {
+ R600_OUT_BATCH(i * 7);
+ }
+
R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE0);
R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE1);
R600_OUT_BATCH(r700->textures[i]->SQ_TEX_RESOURCE2);
@@ -92,21 +104,35 @@ static void r700SendTexState(GLcontext *ctx, struct radeon_state_atom *atom)
}
}
+#define SAMPLER_STRIDE 3
+
static void r700SendTexSamplerState(GLcontext *ctx, struct radeon_state_atom *atom)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
unsigned int i;
+
+ struct r700_vertex_program *vp = context->selected_vp;
+
BATCH_LOCALS(&context->radeon);
radeon_print(RADEON_STATE, RADEON_VERBOSE, "%s\n", __func__);
for (i = 0; i < R700_TEXTURE_NUMBERUNITS; i++) {
- if (ctx->Texture.Unit[i]._ReallyEnabled) {
+ if (ctx->Texture.Unit[i]._ReallyEnabled) {
radeonTexObj *t = r700->textures[i];
if (t) {
BEGIN_BATCH_NO_AUTOSTATE(5);
R600_OUT_BATCH(CP_PACKET3(R600_IT_SET_SAMPLER, 3));
- R600_OUT_BATCH(i * 3);
+
+ if( (1<<i) & vp->r700AsmCode.unVetTexBits )
+ { /* vs texture */
+ R600_OUT_BATCH((i+SQ_TEX_SAMPLER_VS_OFFSET) * SAMPLER_STRIDE); //work 1
+ }
+ else
+ {
+ R600_OUT_BATCH(i * 3);
+ }
+
R600_OUT_BATCH(r700->textures[i]->SQ_TEX_SAMPLER0);
R600_OUT_BATCH(r700->textures[i]->SQ_TEX_SAMPLER1);
R600_OUT_BATCH(r700->textures[i]->SQ_TEX_SAMPLER2);
@@ -277,14 +303,13 @@ static void r700SetRenderTarget(context_t *context, int id)
R600_STATECHANGE(context, cb_target);
/* color buffer */
- r700->render_target[id].CB_COLOR0_BASE.u32All = context->radeon.state.color.draw_offset;
+ r700->render_target[id].CB_COLOR0_BASE.u32All = context->radeon.state.color.draw_offset / 256;
nPitchInPixel = rrb->pitch/rrb->cpp;
SETfield(r700->render_target[id].CB_COLOR0_SIZE.u32All, (nPitchInPixel/8)-1,
PITCH_TILE_MAX_shift, PITCH_TILE_MAX_mask);
SETfield(r700->render_target[id].CB_COLOR0_SIZE.u32All, ( (nPitchInPixel * context->radeon.radeonScreen->driScreen->fbHeight)/64 )-1,
SLICE_TILE_MAX_shift, SLICE_TILE_MAX_mask);
- r700->render_target[id].CB_COLOR0_BASE.u32All = 0;
SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ENDIAN_NONE, ENDIAN_shift, ENDIAN_mask);
SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ARRAY_LINEAR_GENERAL,
CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask);
@@ -427,13 +452,31 @@ static void r700SendRenderTargetState(GLcontext *ctx, struct radeon_state_atom *
R600_OUT_BATCH((2 << id));
END_BATCH();
}
+ /* Set CMASK & TILE buffer to the offset of color buffer as
+ * we don't use those this shouldn't cause any issue and we
+ * then have a valid cmd stream
+ */
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(CB_COLOR0_TILE + (4 * id), 1);
+ R600_OUT_BATCH(r700->render_target[id].CB_COLOR0_TILE.u32All);
+ R600_OUT_BATCH_RELOC(r700->render_target[id].CB_COLOR0_BASE.u32All,
+ rrb->bo,
+ r700->render_target[id].CB_COLOR0_BASE.u32All,
+ 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ END_BATCH();
+ BEGIN_BATCH_NO_AUTOSTATE(3 + 2);
+ R600_OUT_BATCH_REGSEQ(CB_COLOR0_FRAG + (4 * id), 1);
+ R600_OUT_BATCH(r700->render_target[id].CB_COLOR0_FRAG.u32All);
+ R600_OUT_BATCH_RELOC(r700->render_target[id].CB_COLOR0_BASE.u32All,
+ rrb->bo,
+ r700->render_target[id].CB_COLOR0_BASE.u32All,
+ 0, RADEON_GEM_DOMAIN_VRAM, 0);
+ END_BATCH();
- BEGIN_BATCH_NO_AUTOSTATE(18);
+ BEGIN_BATCH_NO_AUTOSTATE(12);
R600_OUT_BATCH_REGVAL(CB_COLOR0_SIZE + (4 * id), r700->render_target[id].CB_COLOR0_SIZE.u32All);
R600_OUT_BATCH_REGVAL(CB_COLOR0_VIEW + (4 * id), r700->render_target[id].CB_COLOR0_VIEW.u32All);
R600_OUT_BATCH_REGVAL(CB_COLOR0_INFO + (4 * id), r700->render_target[id].CB_COLOR0_INFO.u32All);
- R600_OUT_BATCH_REGVAL(CB_COLOR0_TILE + (4 * id), r700->render_target[id].CB_COLOR0_TILE.u32All);
- R600_OUT_BATCH_REGVAL(CB_COLOR0_FRAG + (4 * id), r700->render_target[id].CB_COLOR0_FRAG.u32All);
R600_OUT_BATCH_REGVAL(CB_COLOR0_MASK + (4 * id), r700->render_target[id].CB_COLOR0_MASK.u32All);
END_BATCH();
@@ -443,68 +486,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)
@@ -1306,8 +1358,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_clear.c b/src/mesa/drivers/dri/r600/r700_clear.c
index c6546ab00c2..98bfdd0937c 100644
--- a/src/mesa/drivers/dri/r600/r700_clear.c
+++ b/src/mesa/drivers/dri/r600/r700_clear.c
@@ -49,14 +49,18 @@ static GLboolean r700ClearFast(context_t *context, GLbitfield mask)
void r700Clear(GLcontext * ctx, GLbitfield mask)
{
context_t *context = R700_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&context->radeon);
- const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask);
+ __DRIdrawable *dPriv = radeon_get_drawable(&context->radeon);
+ const GLuint colorMask = *((GLuint *) & ctx->Color.ColorMask[0]);
GLbitfield swrast_mask = 0, tri_mask = 0;
int i;
struct gl_framebuffer *fb = ctx->DrawBuffer;
radeon_print(RADEON_RENDER, RADEON_VERBOSE, "%s %x\n", __func__, mask);
+ if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT)) {
+ context->radeon.front_buffer_dirty = GL_TRUE;
+ }
+
if( GL_TRUE == r700ClearFast(context, mask) )
{
return;
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c
index ccafd433bfa..84d51e66069 100644
--- a/src/mesa/drivers/dri/r600/r700_fragprog.c
+++ b/src/mesa/drivers/dri/r600/r700_fragprog.c
@@ -34,6 +34,7 @@
#include "main/imports.h"
#include "shader/prog_parameter.h"
#include "shader/prog_statevars.h"
+#include "shader/program.h"
#include "r600_context.h"
#include "r600_cmdbuf.h"
@@ -42,14 +43,68 @@
#include "r700_debug.h"
+void insert_wpos_code(GLcontext *ctx, struct gl_fragment_program *fprog)
+{
+ static const gl_state_index winstate[STATE_LENGTH]
+ = { STATE_INTERNAL, STATE_FB_SIZE, 0, 0, 0};
+ struct prog_instruction *newInst, *inst;
+ GLint win_size; /* state reference */
+ GLuint wpos_temp; /* temp register */
+ int i, j;
+
+ /* PARAM win_size = STATE_FB_SIZE */
+ win_size = _mesa_add_state_reference(fprog->Base.Parameters, winstate);
+
+ wpos_temp = fprog->Base.NumTemporaries++;
+
+ /* scan program where WPOS is used and replace with wpos_temp */
+ inst = fprog->Base.Instructions;
+ for (i = 0; i < fprog->Base.NumInstructions; i++) {
+ for (j=0; j < 3; j++) {
+ if(inst->SrcReg[j].File == PROGRAM_INPUT &&
+ inst->SrcReg[j].Index == FRAG_ATTRIB_WPOS) {
+ inst->SrcReg[j].File = PROGRAM_TEMPORARY;
+ inst->SrcReg[j].Index = wpos_temp;
+ }
+ }
+ inst++;
+ }
+
+ _mesa_insert_instructions(&(fprog->Base), 0, 1);
+
+ newInst = fprog->Base.Instructions;
+ /* invert wpos.y
+ * wpos_temp.xyzw = wpos.x-yzw + winsize.0y00 */
+ newInst[0].Opcode = OPCODE_ADD;
+ newInst[0].DstReg.File = PROGRAM_TEMPORARY;
+ newInst[0].DstReg.Index = wpos_temp;
+ newInst[0].DstReg.WriteMask = WRITEMASK_XYZW;
+
+ newInst[0].SrcReg[0].File = PROGRAM_INPUT;
+ newInst[0].SrcReg[0].Index = FRAG_ATTRIB_WPOS;
+ newInst[0].SrcReg[0].Swizzle = SWIZZLE_XYZW;
+ newInst[0].SrcReg[0].Negate = NEGATE_Y;
+
+ newInst[0].SrcReg[1].File = PROGRAM_STATE_VAR;
+ newInst[0].SrcReg[1].Index = win_size;
+ newInst[0].SrcReg[1].Swizzle = MAKE_SWIZZLE4(SWIZZLE_ZERO, SWIZZLE_Y, SWIZZLE_ZERO, SWIZZLE_ZERO);
+
+}
+
//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,32 +116,99 @@ 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
+ unBit = 1 << FRAG_ATTRIB_FACE;
+ if(mesa_fp->Base.InputsRead & unBit)
+ {
+ pAsm->uiFP_AttributeMap[FRAG_ATTRIB_FACE] = pAsm->number_used_registers++;
+ }
+
+ unBit = 1 << FRAG_ATTRIB_PNTC;
+ if(mesa_fp->Base.InputsRead & unBit)
+ {
+ pAsm->uiFP_AttributeMap[FRAG_ATTRIB_PNTC] = pAsm->number_used_registers++;
+ }
/* Map temporary registers (GPRs) */
pAsm->starting_temp_register_number = pAsm->number_used_registers;
@@ -127,6 +249,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,22 +357,61 @@ 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;
- GLuint unBit;
+ GLuint unBit, shadow_unit;
+ int i;
+ struct prog_instruction *inst;
+ gl_state_index shadow_ambient[STATE_LENGTH]
+ = { STATE_INTERNAL, STATE_SHADOW_AMBIENT, 0, 0, 0};
//Init_Program
Init_r700_AssemblerBase( SPT_FP, &(fp->r700AsmCode), &(fp->r700Shader) );
- Map_Fragment_Program(&(fp->r700AsmCode), mesa_fp);
+
+ if(mesa_fp->Base.InputsRead & FRAG_BIT_WPOS)
+ {
+ insert_wpos_code(ctx, mesa_fp);
+ }
+
+ /* add/map consts for ARB_shadow_ambient */
+ if(mesa_fp->Base.ShadowSamplers)
+ {
+ inst = mesa_fp->Base.Instructions;
+ for (i = 0; i < mesa_fp->Base.NumInstructions; i++)
+ {
+ if(inst->TexShadow == 1)
+ {
+ shadow_unit = inst->TexSrcUnit;
+ shadow_ambient[2] = shadow_unit;
+ fp->r700AsmCode.shadow_regs[shadow_unit] =
+ _mesa_add_state_reference(mesa_fp->Base.Parameters, shadow_ambient);
+ }
+ inst++;
+ }
+ }
+
+ 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,
+ for(i=0; i < MAX_SAMPLERS; i++)
+ {
+ fp->r700AsmCode.SamplerUnits[i] = fp->mesa_program.Base.SamplerUnits[i];
+ }
+
+ fp->r700AsmCode.unCurNumILInsts = mesa_fp->Base.NumInstructions;
+
+ if( GL_FALSE == AssembleInstr(0,
+ 0,
+ mesa_fp->Base.NumInstructions,
&(mesa_fp->Base.Instructions[0]),
&(fp->r700AsmCode)) )
{
@@ -260,6 +423,11 @@ GLboolean r700TranslateFragmentShader(struct r700_fragment_program *fp,
return GL_FALSE;
}
+ if( GL_FALSE == RelocProgram(&(fp->r700AsmCode), &(mesa_fp->Base)) )
+ {
+ return GL_FALSE;
+ }
+
fp->r700Shader.nRegs = (fp->r700AsmCode.number_used_registers == 0) ? 0
: (fp->r700AsmCode.number_used_registers - 1);
@@ -300,7 +468,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)
@@ -325,6 +493,7 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
unsigned int unNumOfReg;
unsigned int unBit;
GLuint exportCount;
+ GLboolean point_sprite = GL_FALSE;
if(GL_FALSE == fp->loaded)
{
@@ -378,6 +547,50 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
CLEARbit(r700->SPI_INPUT_Z.u32All, PROVIDE_Z_TO_SPI_bit);
}
+ if (mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_FACE))
+ {
+ ui += 1;
+ SETfield(r700->SPI_PS_IN_CONTROL_0.u32All, ui, NUM_INTERP_shift, NUM_INTERP_mask);
+ SETbit(r700->SPI_PS_IN_CONTROL_1.u32All, FRONT_FACE_ENA_bit);
+ SETbit(r700->SPI_PS_IN_CONTROL_1.u32All, FRONT_FACE_ALL_BITS_bit);
+ SETfield(r700->SPI_PS_IN_CONTROL_1.u32All, pAsm->uiFP_AttributeMap[FRAG_ATTRIB_FACE], FRONT_FACE_ADDR_shift, FRONT_FACE_ADDR_mask);
+ }
+ else
+ {
+ CLEARbit(r700->SPI_PS_IN_CONTROL_1.u32All, FRONT_FACE_ENA_bit);
+ }
+
+ /* see if we need any point_sprite replacements */
+ for (i = VERT_RESULT_TEX0; i<= VERT_RESULT_TEX7; i++)
+ {
+ if(ctx->Point.CoordReplace[i - VERT_RESULT_TEX0] == GL_TRUE)
+ point_sprite = GL_TRUE;
+ }
+
+ if ((mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC)) || point_sprite)
+ {
+ /* for FRAG_ATTRIB_PNTC we need to increase num_interp */
+ if(mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC))
+ {
+ ui++;
+ SETfield(r700->SPI_PS_IN_CONTROL_0.u32All, ui, NUM_INTERP_shift, NUM_INTERP_mask);
+ }
+ SETbit(r700->SPI_INTERP_CONTROL_0.u32All, PNT_SPRITE_ENA_bit);
+ SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_S, PNT_SPRITE_OVRD_X_shift, PNT_SPRITE_OVRD_X_mask);
+ SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_T, PNT_SPRITE_OVRD_Y_shift, PNT_SPRITE_OVRD_Y_mask);
+ SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_0, PNT_SPRITE_OVRD_Z_shift, PNT_SPRITE_OVRD_Z_mask);
+ SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_1, PNT_SPRITE_OVRD_W_shift, PNT_SPRITE_OVRD_W_mask);
+ if(ctx->Point.SpriteOrigin == GL_LOWER_LEFT)
+ SETbit(r700->SPI_INTERP_CONTROL_0.u32All, PNT_SPRITE_TOP_1_bit);
+ else
+ CLEARbit(r700->SPI_INTERP_CONTROL_0.u32All, PNT_SPRITE_TOP_1_bit);
+ }
+ else
+ {
+ CLEARbit(r700->SPI_INTERP_CONTROL_0.u32All, PNT_SPRITE_ENA_bit);
+ }
+
+
ui = (unNumOfReg < ui) ? ui : unNumOfReg;
SETfield(r700->ps.SQ_PGM_RESOURCES_PS.u32All, ui, NUM_GPRS_shift, NUM_GPRS_mask);
@@ -394,6 +607,13 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
EXPORT_MODE_shift, EXPORT_MODE_mask);
// 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;
+
+ for(ui = 0; ui < R700_MAX_SHADER_EXPORTS; ui++)
+ r700->SPI_PS_INPUT_CNTL[ui].u32All = 0;
+
unBit = 1 << FRAG_ATTRIB_WPOS;
if(mesa_fp->Base.InputsRead & unBit)
{
@@ -407,8 +627,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);
@@ -420,8 +640,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);
@@ -433,8 +653,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);
@@ -448,17 +668,67 @@ 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);
SETfield(r700->SPI_PS_INPUT_CNTL[ui].u32All, ui,
SEMANTIC_shift, SEMANTIC_mask);
CLEARbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, FLAT_SHADE_bit);
+ /* ARB_point_sprite */
+ if(ctx->Point.CoordReplace[i] == GL_TRUE)
+ {
+ SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, PT_SPRITE_TEX_bit);
+ }
}
}
+ unBit = 1 << FRAG_ATTRIB_FACE;
+ if(mesa_fp->Base.InputsRead & unBit)
+ {
+ ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_FACE];
+ 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);
+ }
+ unBit = 1 << FRAG_ATTRIB_PNTC;
+ if(mesa_fp->Base.InputsRead & unBit)
+ {
+ ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_PNTC];
+ 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);
+ SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, PT_SPRITE_TEX_bit);
+ }
+
+
+
+
+ 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);
if (r700->CB_SHADER_CONTROL.u32All != ((1 << exportCount) - 1))
{
@@ -469,7 +739,8 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx)
/* 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)
@@ -482,14 +753,33 @@ 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;
+ COMPILED_SUB * pCompiledSub;
+ GLuint uj;
+ GLuint unConstOffset = r700->ps.num_consts;
+ for(ui=0; ui<pAsm->unNumPresub; ui++)
+ {
+ pCompiledSub = pAsm->presubs[ui].pCompiledSub;
+
+ r700->ps.num_consts += pCompiledSub->NumParameters;
+
+ for(uj=0; uj<pCompiledSub->NumParameters; uj++)
+ {
+ r700->ps.consts[uj + unConstOffset][0].f32All = pCompiledSub->ParameterValues[uj][0];
+ r700->ps.consts[uj + unConstOffset][1].f32All = pCompiledSub->ParameterValues[uj][1];
+ r700->ps.consts[uj + unConstOffset][2].f32All = pCompiledSub->ParameterValues[uj][2];
+ r700->ps.consts[uj + unConstOffset][3].f32All = pCompiledSub->ParameterValues[uj][3];
+ }
+ unConstOffset += pCompiledSub->NumParameters;
+ }
+
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.h b/src/mesa/drivers/dri/r600/r700_fragprog.h
index cbb108d2128..39c59c9201d 100644
--- a/src/mesa/drivers/dri/r600/r700_fragprog.h
+++ b/src/mesa/drivers/dri/r600/r700_fragprog.h
@@ -48,13 +48,17 @@ struct r700_fragment_program
};
/* Internal */
+void insert_wpos_code(GLcontext *ctx, struct gl_fragment_program *fprog);
+
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 47f89c91f87..3a6210c53ac 100644
--- a/src/mesa/drivers/dri/r600/r700_render.c
+++ b/src/mesa/drivers/dri/r600/r700_render.c
@@ -422,7 +422,7 @@ static void r700RunRenderPrimitiveImmediate(GLcontext * ctx, int start, int end,
}
/* start 3d, idle, cb/db flush */
-#define PRE_EMIT_STATE_BUFSZ 10 + 5 + 14
+#define PRE_EMIT_STATE_BUFSZ 10 + 5 + 18
static GLuint r700PredictRenderSize(GLcontext* ctx,
const struct _mesa_prim *prim,
@@ -526,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);
@@ -559,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);
@@ -577,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);
@@ -596,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);
@@ -664,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);
@@ -686,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);
}
}
@@ -757,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);
@@ -770,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
@@ -780,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);
@@ -792,6 +808,7 @@ static void r700FixupIndexBuffer(GLcontext *ctx, const struct _mesa_index_buffer
{
*out++ = in[i];
}
+ radeon_bo_unmap(context->ind_buf.bo);
#endif
}
@@ -837,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;
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_shaderinst.h b/src/mesa/drivers/dri/r600/r700_shaderinst.h
index 2829cca0a3c..cdb9a570f7c 100644
--- a/src/mesa/drivers/dri/r600/r700_shaderinst.h
+++ b/src/mesa/drivers/dri/r600/r700_shaderinst.h
@@ -42,6 +42,13 @@
#define SQ_FETCH_RESOURCE_VS_OFFSET 0x000000a0
#define SQ_FETCH_RESOURCE_VS_COUNT 0x000000b0
+//richard dec.10 glsl
+#define SQ_TEX_SAMPLER_PS_OFFSET 0x00000000
+#define SQ_TEX_SAMPLER_PS_COUNT 0x00000012
+#define SQ_TEX_SAMPLER_VS_OFFSET 0x00000012
+#define SQ_TEX_SAMPLER_VS_COUNT 0x00000012
+//-------------------
+
#define SHADERINST_TYPEMASK_CF 0x10
#define SHADERINST_TYPEMASK_ALU 0x20
#define SHADERINST_TYPEMASK_TEX 0x40
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index 82bd48b97b4..20e8afefbaa 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -59,6 +59,7 @@ static void r700SetClipPlaneState(GLcontext * ctx, GLenum cap, GLboolean state);
static void r700UpdatePolygonMode(GLcontext * ctx);
static void r700SetPolygonOffsetState(GLcontext * ctx, GLboolean state);
static void r700SetStencilState(GLcontext * ctx, GLboolean state);
+static void r700UpdateWindow(GLcontext * ctx, int id);
void r700UpdateShaders(GLcontext * ctx)
{
@@ -85,7 +86,7 @@ void r700UpdateViewportOffset(GLcontext * ctx) //------------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&context->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&context->radeon);
GLfloat xoffset = (GLfloat) dPriv->x;
GLfloat yoffset = (GLfloat) dPriv->y + dPriv->h;
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -780,6 +781,9 @@ static void r700Enable(GLcontext * ctx, GLenum cap, GLboolean state) //---------
case GL_LINE_STIPPLE:
r700UpdateLineStipple(ctx);
break;
+ case GL_DEPTH_CLAMP:
+ r700UpdateWindow(ctx, 0);
+ break;
default:
break;
}
@@ -1071,7 +1075,7 @@ static void r700UpdateWindow(GLcontext * ctx, int id) //--------------------
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&context->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&context->radeon);
GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0;
GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0;
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -1724,10 +1728,10 @@ void r700InitState(GLcontext * ctx) //-------------------
r700InitSQConfig(ctx);
r700ColorMask(ctx,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP]);
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP]);
r700Enable(ctx, GL_DEPTH_TEST, ctx->Depth.Test);
r700DepthMask(ctx, ctx->Depth.Mask);
diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c
index 4ca5ce693a8..782f151f5ac 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);
}
@@ -236,6 +245,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;
}
@@ -326,7 +337,18 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx,
return NULL;
}
- if(GL_FALSE == AssembleInstr(vp->mesa_program->Base.NumInstructions,
+ InitShaderProgram(&(vp->r700AsmCode));
+
+ for(i=0; i < MAX_SAMPLERS; i++)
+ {
+ vp->r700AsmCode.SamplerUnits[i] = vp->mesa_program->Base.SamplerUnits[i];
+ }
+
+ vp->r700AsmCode.unCurNumILInsts = vp->mesa_program->Base.NumInstructions;
+
+ if(GL_FALSE == AssembleInstr(0,
+ 0,
+ vp->mesa_program->Base.NumInstructions,
&(vp->mesa_program->Base.Instructions[0]),
&(vp->r700AsmCode)) )
{
@@ -338,6 +360,11 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx,
return NULL;
}
+ if( GL_FALSE == RelocProgram(&(vp->r700AsmCode), &(vp->mesa_program->Base)) )
+ {
+ return GL_FALSE;
+ }
+
vp->r700Shader.nRegs = (vp->r700AsmCode.number_used_registers == 0) ? 0
: (vp->r700AsmCode.number_used_registers - 1);
@@ -616,6 +643,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)
@@ -628,13 +661,42 @@ 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;
+ COMPILED_SUB * pCompiledSub;
+ GLuint uj;
+ GLuint unConstOffset = r700->vs.num_consts;
+ for(ui=0; ui<vp->r700AsmCode.unNumPresub; ui++)
+ {
+ pCompiledSub = vp->r700AsmCode.presubs[ui].pCompiledSub;
+
+ r700->vs.num_consts += pCompiledSub->NumParameters;
+
+ for(uj=0; uj<pCompiledSub->NumParameters; uj++)
+ {
+ r700->vs.consts[uj + unConstOffset][0].f32All = pCompiledSub->ParameterValues[uj][0];
+ r700->vs.consts[uj + unConstOffset][1].f32All = pCompiledSub->ParameterValues[uj][1];
+ r700->vs.consts[uj + unConstOffset][2].f32All = pCompiledSub->ParameterValues[uj][2];
+ r700->vs.consts[uj + unConstOffset][3].f32All = pCompiledSub->ParameterValues[uj][3];
+ }
+ unConstOffset += pCompiledSub->NumParameters;
+ }
+
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/r600/radeon_tex_copy.c b/src/mesa/drivers/dri/r600/radeon_tex_copy.c
new file mode 120000
index 00000000000..dfa5ba34e65
--- /dev/null
+++ b/src/mesa/drivers/dri/r600/radeon_tex_copy.c
@@ -0,0 +1 @@
+../radeon/radeon_tex_copy.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/r600/server/radeon_egl.c b/src/mesa/drivers/dri/r600/server/radeon_egl.c
deleted file mode 120000
index d7735a76438..00000000000
--- a/src/mesa/drivers/dri/r600/server/radeon_egl.c
+++ /dev/null
@@ -1 +0,0 @@
-../../radeon/server/radeon_egl.c \ No newline at end of file
diff --git a/src/mesa/drivers/dri/radeon/Makefile b/src/mesa/drivers/dri/radeon/Makefile
index 2b2f2c4aa7a..a54ea16ec63 100644
--- a/src/mesa/drivers/dri/radeon/Makefile
+++ b/src/mesa/drivers/dri/radeon/Makefile
@@ -26,7 +26,8 @@ RADEON_COMMON_SOURCES = \
radeon_mipmap_tree.c \
radeon_queryobj.c \
radeon_span.c \
- radeon_texture.c
+ radeon_texture.c \
+ radeon_tex_copy.c
DRIVER_SOURCES = \
radeon_context.c \
@@ -40,6 +41,7 @@ DRIVER_SOURCES = \
radeon_swtcl.c \
radeon_maos.c \
radeon_sanity.c \
+ radeon_blit.c \
$(RADEON_COMMON_SOURCES)
C_SOURCES = \
@@ -47,7 +49,7 @@ C_SOURCES = \
$(DRIVER_SOURCES) \
$(CS_SOURCES)
-DRIVER_DEFINES = -DRADEON_R100 -Wall
+DRIVER_DEFINES = -DRADEON_R100
DRI_LIB_DEPS += $(RADEON_LDFLAGS)
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.c b/src/mesa/drivers/dri/radeon/radeon_blit.c
new file mode 100644
index 00000000000..0df4fbb33c5
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.c
@@ -0,0 +1,403 @@
+/*
+ * Copyright (C) 2010 Advanced Micro Devices, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "radeon_common.h"
+#include "radeon_context.h"
+#include "radeon_blit.h"
+
+static inline uint32_t cmdpacket0(struct radeon_screen *rscrn,
+ int reg, int count)
+{
+ if (count)
+ return CP_PACKET0(reg, count - 1);
+ return CP_PACKET2;
+}
+
+/* common formats supported as both textures and render targets */
+static unsigned is_blit_supported(gl_format mesa_format)
+{
+ /* XXX others? BE/LE? */
+ switch (mesa_format) {
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_A8:
+ break;
+ default:
+ return 0;
+ }
+
+ /* ??? */
+ if (_mesa_get_format_bits(mesa_format, GL_DEPTH_BITS) > 0)
+ return 0;
+
+ return 1;
+}
+
+static inline void emit_vtx_state(struct r100_context *r100)
+{
+ BATCH_LOCALS(&r100->radeon);
+
+ BEGIN_BATCH(8);
+ if (r100->radeon.radeonScreen->chip_flags & RADEON_CHIPSET_TCL) {
+ OUT_BATCH_REGVAL(RADEON_SE_CNTL_STATUS, 0);
+ } else {
+ OUT_BATCH_REGVAL(RADEON_SE_CNTL_STATUS, RADEON_TCL_BYPASS);
+
+ }
+ OUT_BATCH_REGVAL(RADEON_SE_COORD_FMT, (RADEON_VTX_XY_PRE_MULT_1_OVER_W0 |
+ RADEON_TEX1_W_ROUTING_USE_W0));
+ OUT_BATCH_REGVAL(RADEON_SE_VTX_FMT, RADEON_SE_VTX_FMT_XY | RADEON_SE_VTX_FMT_ST0);
+ OUT_BATCH_REGVAL(RADEON_SE_CNTL, (RADEON_DIFFUSE_SHADE_GOURAUD |
+ RADEON_BFACE_SOLID |
+ RADEON_FFACE_SOLID |
+ RADEON_VTX_PIX_CENTER_OGL |
+ RADEON_ROUND_MODE_ROUND |
+ RADEON_ROUND_PREC_4TH_PIX));
+ END_BATCH();
+}
+
+static void inline emit_tx_setup(struct r100_context *r100,
+ gl_format mesa_format,
+ struct radeon_bo *bo,
+ intptr_t offset,
+ unsigned width,
+ unsigned height,
+ unsigned pitch)
+{
+ uint32_t txformat = RADEON_TXFORMAT_NON_POWER2;
+ BATCH_LOCALS(&r100->radeon);
+
+ assert(width <= 2047);
+ assert(height <= 2047);
+ assert(offset % 32 == 0);
+
+ /* XXX others? BE/LE? */
+ switch (mesa_format) {
+ case MESA_FORMAT_ARGB8888:
+ txformat |= RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP;
+ break;
+ case MESA_FORMAT_XRGB8888:
+ txformat |= RADEON_TXFORMAT_ARGB8888;
+ break;
+ case MESA_FORMAT_RGB565:
+ txformat |= RADEON_TXFORMAT_RGB565;
+ break;
+ case MESA_FORMAT_ARGB4444:
+ txformat |= RADEON_TXFORMAT_ARGB4444 | RADEON_TXFORMAT_ALPHA_IN_MAP;
+ break;
+ case MESA_FORMAT_ARGB1555:
+ txformat |= RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP;
+ break;
+ case MESA_FORMAT_A8:
+ txformat |= RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP;
+ break;
+ default:
+ break;
+ }
+
+ BEGIN_BATCH(18);
+ OUT_BATCH_REGVAL(RADEON_PP_CNTL, RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE);
+ OUT_BATCH_REGVAL(RADEON_PP_TXCBLEND_0, (RADEON_COLOR_ARG_A_ZERO |
+ RADEON_COLOR_ARG_B_ZERO |
+ RADEON_COLOR_ARG_C_T0_COLOR |
+ RADEON_BLEND_CTL_ADD |
+ RADEON_CLAMP_TX));
+ OUT_BATCH_REGVAL(RADEON_PP_TXABLEND_0, (RADEON_ALPHA_ARG_A_ZERO |
+ RADEON_ALPHA_ARG_B_ZERO |
+ RADEON_ALPHA_ARG_C_T0_ALPHA |
+ RADEON_BLEND_CTL_ADD |
+ RADEON_CLAMP_TX));
+ OUT_BATCH_REGVAL(RADEON_PP_TXFILTER_0, (RADEON_CLAMP_S_CLAMP_LAST |
+ RADEON_CLAMP_T_CLAMP_LAST |
+ RADEON_MAG_FILTER_NEAREST |
+ RADEON_MIN_FILTER_NEAREST));
+ OUT_BATCH_REGVAL(RADEON_PP_TXFORMAT_0, txformat);
+ OUT_BATCH_REGVAL(RADEON_PP_TEX_SIZE_0, ((width - 1) |
+ ((height - 1) << RADEON_TEX_VSIZE_SHIFT)));
+ OUT_BATCH_REGVAL(RADEON_PP_TEX_PITCH_0, pitch * _mesa_get_format_bytes(mesa_format) - 32);
+
+ OUT_BATCH_REGSEQ(RADEON_PP_TXOFFSET_0, 1);
+ OUT_BATCH_RELOC(0, bo, 0, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0, 0);
+
+ END_BATCH();
+}
+
+static inline void emit_cb_setup(struct r100_context *r100,
+ struct radeon_bo *bo,
+ intptr_t offset,
+ gl_format mesa_format,
+ unsigned pitch,
+ unsigned width,
+ unsigned height)
+{
+ uint32_t dst_pitch = pitch;
+ uint32_t dst_format = 0;
+ BATCH_LOCALS(&r100->radeon);
+
+ /* XXX others? BE/LE? */
+ switch (mesa_format) {
+ case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_XRGB8888:
+ dst_format = RADEON_COLOR_FORMAT_ARGB8888;
+ break;
+ case MESA_FORMAT_RGB565:
+ dst_format = RADEON_COLOR_FORMAT_RGB565;
+ break;
+ case MESA_FORMAT_ARGB4444:
+ dst_format = RADEON_COLOR_FORMAT_ARGB4444;
+ break;
+ case MESA_FORMAT_ARGB1555:
+ dst_format = RADEON_COLOR_FORMAT_ARGB1555;
+ break;
+ case MESA_FORMAT_A8:
+ dst_format = RADEON_COLOR_FORMAT_RGB8;
+ break;
+ default:
+ break;
+ }
+
+ BEGIN_BATCH_NO_AUTOSTATE(18);
+ OUT_BATCH_REGVAL(RADEON_RE_TOP_LEFT, 0);
+ OUT_BATCH_REGVAL(RADEON_RE_WIDTH_HEIGHT, ((width << RADEON_RE_WIDTH_SHIFT) |
+ (height << RADEON_RE_HEIGHT_SHIFT)));
+ OUT_BATCH_REGVAL(RADEON_RB3D_PLANEMASK, 0xffffffff);
+ OUT_BATCH_REGVAL(RADEON_RB3D_BLENDCNTL, RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ZERO);
+ OUT_BATCH_REGVAL(RADEON_RB3D_CNTL, dst_format);
+
+ OUT_BATCH_REGSEQ(RADEON_RB3D_COLOROFFSET, 1);
+ OUT_BATCH_RELOC(0, bo, 0, 0, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0);
+ OUT_BATCH_REGSEQ(RADEON_RB3D_COLORPITCH, 1);
+ OUT_BATCH_RELOC(dst_pitch, bo, dst_pitch, 0, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0);
+
+ END_BATCH();
+}
+
+static GLboolean validate_buffers(struct r100_context *r100,
+ struct radeon_bo *src_bo,
+ struct radeon_bo *dst_bo)
+{
+ int ret;
+ radeon_cs_space_add_persistent_bo(r100->radeon.cmdbuf.cs,
+ src_bo, RADEON_GEM_DOMAIN_VRAM, 0);
+
+ radeon_cs_space_add_persistent_bo(r100->radeon.cmdbuf.cs,
+ dst_bo, 0, RADEON_GEM_DOMAIN_VRAM);
+
+ ret = radeon_cs_space_check_with_bo(r100->radeon.cmdbuf.cs,
+ first_elem(&r100->radeon.dma.reserved)->bo,
+ RADEON_GEM_DOMAIN_GTT, 0);
+ if (ret)
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
+
+/**
+ * Calculate texcoords for given image region.
+ * Output values are [minx, maxx, miny, maxy]
+ */
+static inline void calc_tex_coords(float img_width, float img_height,
+ float x, float y,
+ float reg_width, float reg_height,
+ unsigned flip_y, float *buf)
+{
+ buf[0] = x / img_width;
+ buf[1] = buf[0] + reg_width / img_width;
+ buf[2] = y / img_height;
+ buf[3] = buf[2] + reg_height / img_height;
+ if (flip_y)
+ {
+ buf[2] = 1.0 - buf[2];
+ buf[3] = 1.0 - buf[3];
+ }
+}
+
+static inline void emit_draw_packet(struct r100_context *r100,
+ unsigned src_width, unsigned src_height,
+ unsigned src_x_offset, unsigned src_y_offset,
+ unsigned dst_x_offset, unsigned dst_y_offset,
+ unsigned reg_width, unsigned reg_height,
+ unsigned flip_y)
+{
+ float texcoords[4];
+ float verts[12];
+ BATCH_LOCALS(&r100->radeon);
+
+ calc_tex_coords(src_width, src_height,
+ src_x_offset, src_y_offset,
+ reg_width, reg_height,
+ flip_y, texcoords);
+
+ verts[0] = dst_x_offset;
+ verts[1] = dst_y_offset + reg_height;
+ verts[2] = texcoords[0];
+ verts[3] = texcoords[3];
+
+ verts[4] = dst_x_offset + reg_width;
+ verts[5] = dst_y_offset + reg_height;
+ verts[6] = texcoords[1];
+ verts[7] = texcoords[3];
+
+ verts[8] = dst_x_offset + reg_width;
+ verts[9] = dst_y_offset;
+ verts[10] = texcoords[1];
+ verts[11] = texcoords[2];
+
+ BEGIN_BATCH(15);
+ OUT_BATCH(RADEON_CP_PACKET3_3D_DRAW_IMMD | (13 << 16));
+ OUT_BATCH(RADEON_CP_VC_FRMT_XY | RADEON_CP_VC_FRMT_ST0);
+ OUT_BATCH(RADEON_CP_VC_CNTL_PRIM_WALK_RING |
+ RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST |
+ RADEON_CP_VC_CNTL_MAOS_ENABLE |
+ RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE |
+ (3 << 16));
+ OUT_BATCH_TABLE(verts, 12);
+ END_BATCH();
+}
+
+/**
+ * Copy a region of [@a width x @a height] pixels from source buffer
+ * to destination buffer.
+ * @param[in] r100 r100 context
+ * @param[in] src_bo source radeon buffer object
+ * @param[in] src_offset offset of the source image in the @a src_bo
+ * @param[in] src_mesaformat source image format
+ * @param[in] src_pitch aligned source image width
+ * @param[in] src_width source image width
+ * @param[in] src_height source image height
+ * @param[in] src_x_offset x offset in the source image
+ * @param[in] src_y_offset y offset in the source image
+ * @param[in] dst_bo destination radeon buffer object
+ * @param[in] dst_offset offset of the destination image in the @a dst_bo
+ * @param[in] dst_mesaformat destination image format
+ * @param[in] dst_pitch aligned destination image width
+ * @param[in] dst_width destination image width
+ * @param[in] dst_height destination image height
+ * @param[in] dst_x_offset x offset in the destination image
+ * @param[in] dst_y_offset y offset in the destination image
+ * @param[in] width region width
+ * @param[in] height region height
+ * @param[in] flip_y set if y coords of the source image need to be flipped
+ */
+unsigned r100_blit(GLcontext *ctx,
+ struct radeon_bo *src_bo,
+ intptr_t src_offset,
+ gl_format src_mesaformat,
+ unsigned src_pitch,
+ unsigned src_width,
+ unsigned src_height,
+ unsigned src_x_offset,
+ unsigned src_y_offset,
+ struct radeon_bo *dst_bo,
+ intptr_t dst_offset,
+ gl_format dst_mesaformat,
+ unsigned dst_pitch,
+ unsigned dst_width,
+ unsigned dst_height,
+ unsigned dst_x_offset,
+ unsigned dst_y_offset,
+ unsigned reg_width,
+ unsigned reg_height,
+ unsigned flip_y)
+{
+ struct r100_context *r100 = R100_CONTEXT(ctx);
+
+ if (!is_blit_supported(dst_mesaformat))
+ return GL_FALSE;
+
+ /* Make sure that colorbuffer has even width - hw limitation */
+ if (dst_pitch % 2 > 0)
+ ++dst_pitch;
+
+ /* Rendering to small buffer doesn't work.
+ * Looks like a hw limitation.
+ */
+ if (dst_pitch < 32)
+ return GL_FALSE;
+
+ /* Need to clamp the region size to make sure
+ * we don't read outside of the source buffer
+ * or write outside of the destination buffer.
+ */
+ if (reg_width + src_x_offset > src_width)
+ reg_width = src_width - src_x_offset;
+ if (reg_height + src_y_offset > src_height)
+ reg_height = src_height - src_y_offset;
+ if (reg_width + dst_x_offset > dst_width)
+ reg_width = dst_width - dst_x_offset;
+ if (reg_height + dst_y_offset > dst_height)
+ reg_height = dst_height - dst_y_offset;
+
+ if (src_bo == dst_bo) {
+ return GL_FALSE;
+ }
+
+ if (src_offset % 32 || dst_offset % 32) {
+ return GL_FALSE;
+ }
+
+ if (0) {
+ fprintf(stderr, "src: size [%d x %d], pitch %d, "
+ "offset [%d x %d], format %s, bo %p\n",
+ src_width, src_height, src_pitch,
+ src_x_offset, src_y_offset,
+ _mesa_get_format_name(src_mesaformat),
+ src_bo);
+ fprintf(stderr, "dst: pitch %d, offset[%d x %d], format %s, bo %p\n",
+ dst_pitch, dst_x_offset, dst_y_offset,
+ _mesa_get_format_name(dst_mesaformat), dst_bo);
+ fprintf(stderr, "region: %d x %d\n", reg_width, reg_height);
+ }
+
+ /* Flush is needed to make sure that source buffer has correct data */
+ radeonFlush(ctx);
+
+ rcommonEnsureCmdBufSpace(&r100->radeon, 59, __FUNCTION__);
+
+ if (!validate_buffers(r100, src_bo, dst_bo))
+ return GL_FALSE;
+
+ /* 8 */
+ emit_vtx_state(r100);
+ /* 18 */
+ emit_tx_setup(r100, src_mesaformat, src_bo, src_offset, src_width, src_height, src_pitch);
+ /* 18 */
+ emit_cb_setup(r100, dst_bo, dst_offset, dst_mesaformat, dst_pitch, dst_width, dst_height);
+ /* 15 */
+ emit_draw_packet(r100, src_width, src_height,
+ src_x_offset, src_y_offset,
+ dst_x_offset, dst_y_offset,
+ reg_width, reg_height,
+ flip_y);
+
+ radeonFlush(ctx);
+
+ return GL_TRUE;
+}
diff --git a/src/mesa/drivers/dri/radeon/radeon_blit.h b/src/mesa/drivers/dri/radeon/radeon_blit.h
new file mode 100644
index 00000000000..d36366ff791
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_blit.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 Advanced Micro Devices, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef RADEON_BLIT_H
+#define RADEON_BLIT_H
+
+void r100_blit_init(struct r100_context *r100);
+
+unsigned r100_blit(GLcontext *ctx,
+ struct radeon_bo *src_bo,
+ intptr_t src_offset,
+ gl_format src_mesaformat,
+ unsigned src_pitch,
+ unsigned src_width,
+ unsigned src_height,
+ unsigned src_x_offset,
+ unsigned src_y_offset,
+ struct radeon_bo *dst_bo,
+ intptr_t dst_offset,
+ gl_format dst_mesaformat,
+ unsigned dst_pitch,
+ unsigned dst_width,
+ unsigned dst_height,
+ unsigned dst_x_offset,
+ unsigned dst_y_offset,
+ unsigned width,
+ unsigned height,
+ unsigned flip_y);
+
+#endif // RADEON_BLIT_H
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 9b64c216859..e0b853bc97d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -137,7 +137,7 @@ void radeon_get_cliprects(radeonContextPtr radeon,
unsigned int *num_cliprects,
int *x_off, int *y_off)
{
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(radeon);
struct radeon_framebuffer *rfb = dPriv->driverPrivate;
if (radeon->constant_cliprect) {
@@ -169,8 +169,8 @@ void radeon_get_cliprects(radeonContextPtr radeon,
*/
void radeonSetCliprects(radeonContextPtr radeon)
{
- __DRIdrawablePrivate *const drawable = radeon_get_drawable(radeon);
- __DRIdrawablePrivate *const readable = radeon_get_readable(radeon);
+ __DRIdrawable *const drawable = radeon_get_drawable(radeon);
+ __DRIdrawable *const readable = radeon_get_readable(radeon);
struct radeon_framebuffer *const draw_rfb = drawable->driverPrivate;
struct radeon_framebuffer *const read_rfb = readable->driverPrivate;
int x_off, y_off;
@@ -229,7 +229,7 @@ void radeonUpdateScissor( GLcontext *ctx )
}
if (!rmesa->radeonScreen->kernel_mm) {
/* Fix scissors for dri 1 */
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(rmesa);
+ __DRIdrawable *dPriv = radeon_get_drawable(rmesa);
x1 += dPriv->x;
x2 += dPriv->x + 1;
min_x += dPriv->x;
@@ -428,7 +428,7 @@ static void radeon_flip_renderbuffers(struct radeon_framebuffer *rfb)
/* Copy the back color buffer to the front color buffer.
*/
-void radeonCopyBuffer( __DRIdrawablePrivate *dPriv,
+void radeonCopyBuffer( __DRIdrawable *dPriv,
const drm_clip_rect_t *rect)
{
radeonContextPtr rmesa;
@@ -496,7 +496,7 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv,
UNLOCK_HARDWARE( rmesa );
}
-static int radeonScheduleSwap(__DRIdrawablePrivate *dPriv, GLboolean *missed_target)
+static int radeonScheduleSwap(__DRIdrawable *dPriv, GLboolean *missed_target)
{
radeonContextPtr rmesa;
@@ -519,11 +519,11 @@ static int radeonScheduleSwap(__DRIdrawablePrivate *dPriv, GLboolean *missed_tar
return 0;
}
-static GLboolean radeonPageFlip( __DRIdrawablePrivate *dPriv )
+static GLboolean radeonPageFlip( __DRIdrawable *dPriv )
{
radeonContextPtr radeon;
GLint ret;
- __DRIscreenPrivate *psp;
+ __DRIscreen *psp;
struct radeon_renderbuffer *rrb;
struct radeon_framebuffer *rfb;
@@ -571,10 +571,10 @@ static GLboolean radeonPageFlip( __DRIdrawablePrivate *dPriv )
/**
* Swap front and back buffer.
*/
-void radeonSwapBuffers(__DRIdrawablePrivate * dPriv)
+void radeonSwapBuffers(__DRIdrawable * dPriv)
{
int64_t ust;
- __DRIscreenPrivate *psp;
+ __DRIscreen *psp;
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
radeonContextPtr radeon;
@@ -615,7 +615,7 @@ void radeonSwapBuffers(__DRIdrawablePrivate * dPriv)
}
}
-void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv,
+void radeonCopySubBuffer(__DRIdrawable * dPriv,
int x, int y, int w, int h )
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
@@ -641,6 +641,27 @@ void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv,
}
}
+/**
+ * Check if we're about to draw into the front color buffer.
+ * If so, set the intel->front_buffer_dirty field to true.
+ */
+void
+radeon_check_front_buffer_rendering(GLcontext *ctx)
+{
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
+ const struct gl_framebuffer *fb = ctx->DrawBuffer;
+
+ if (fb->Name == 0) {
+ /* drawing to window system buffer */
+ if (fb->_NumColorDrawBuffers > 0) {
+ if (fb->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT) {
+ radeon->front_buffer_dirty = GL_TRUE;
+ }
+ }
+ }
+}
+
+
void radeon_draw_buffer(GLcontext *ctx, struct gl_framebuffer *fb)
{
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
@@ -817,7 +838,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);
}
}
@@ -834,7 +855,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 */
@@ -885,9 +906,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;
@@ -1095,7 +1116,7 @@ void radeonFlush(GLcontext *ctx)
then no point flushing anything at all.
*/
if (!radeon->dma.flush && !radeon->cmdbuf.cs->cdw && is_empty_list(&radeon->dma.reserved))
- return;
+ goto flush_front;
if (radeon->dma.flush)
radeon->dma.flush( ctx );
@@ -1103,12 +1124,13 @@ void radeonFlush(GLcontext *ctx)
if (radeon->cmdbuf.cs->cdw)
rcommonFlushCmdBuf(radeon, __FUNCTION__);
+flush_front:
if ((ctx->DrawBuffer->Name == 0) && radeon->front_buffer_dirty) {
__DRIscreen *const screen = radeon->radeonScreen->driScreen;
if (screen->dri2.loader && (screen->dri2.loader->base.version >= 2)
&& (screen->dri2.loader->flushFrontBuffer != NULL)) {
- __DRIdrawablePrivate * drawable = radeon_get_drawable(radeon);
+ __DRIdrawable * drawable = radeon_get_drawable(radeon);
(*screen->dri2.loader->flushFrontBuffer)(drawable, drawable->loaderPrivate);
/* Only clear the dirty bit if front-buffer rendering is no longer
@@ -1208,7 +1230,7 @@ int rcommonFlushCmdBuf(radeonContextPtr rmesa, const char *caller)
fprintf(stderr, "drmRadeonCmdBuffer: %d. Kernel failed to "
"parse or rejected command stream. See dmesg "
"for more info.\n", ret);
- _mesa_exit(ret);
+ exit(ret);
}
return ret;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h
index 0608fe2418c..f31f08edf36 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common.h
@@ -13,10 +13,10 @@ void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h);
void radeonWaitForIdleLocked(radeonContextPtr radeon);
extern uint32_t radeonGetAge(radeonContextPtr radeon);
-void radeonCopyBuffer( __DRIdrawablePrivate *dPriv,
+void radeonCopyBuffer( __DRIdrawable *dPriv,
const drm_clip_rect_t *rect);
-void radeonSwapBuffers(__DRIdrawablePrivate * dPriv);
-void radeonCopySubBuffer(__DRIdrawablePrivate * dPriv,
+void radeonSwapBuffers(__DRIdrawable * dPriv);
+void radeonCopySubBuffer(__DRIdrawable * dPriv,
int x, int y, int w, int h );
void radeonUpdatePageFlipping(radeonContextPtr rmesa);
@@ -42,7 +42,9 @@ void
radeon_renderbuffer_set_bo(struct radeon_renderbuffer *rb,
struct radeon_bo *bo);
struct radeon_renderbuffer *
-radeon_create_renderbuffer(gl_format format, __DRIdrawablePrivate *driDrawPriv);
+radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv);
+
+void radeon_check_front_buffer_rendering(GLcontext *ctx);
static inline struct radeon_renderbuffer *radeon_renderbuffer(struct gl_renderbuffer *rb)
{
struct radeon_renderbuffer *rrb = (struct radeon_renderbuffer *)rb;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index 71f70d724b9..b9c29b937e5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -181,10 +181,10 @@ static void radeonInitDriverFuncs(struct dd_function_table *functions)
GLboolean radeonInitContext(radeonContextPtr radeon,
struct dd_function_table* functions,
const __GLcontextModes * glVisual,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate)
{
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
GLcontext* ctx;
GLcontext* shareCtx;
@@ -291,7 +291,7 @@ static void radeon_destroy_atom_list(radeonContextPtr radeon)
* Cleanup common context fields.
* Called by r200DestroyContext/r300DestroyContext
*/
-void radeonDestroyContext(__DRIcontextPrivate *driContextPriv )
+void radeonDestroyContext(__DRIcontext *driContextPriv )
{
#ifdef RADEON_BO_TRACK
FILE *track;
@@ -355,7 +355,7 @@ void radeonDestroyContext(__DRIcontextPrivate *driContextPriv )
/* Force the context `c' to be unbound from its buffer.
*/
-GLboolean radeonUnbindContext(__DRIcontextPrivate * driContextPriv)
+GLboolean radeonUnbindContext(__DRIcontext * driContextPriv)
{
radeonContextPtr radeon = (radeonContextPtr) driContextPriv->driverPrivate;
@@ -499,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;
@@ -525,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]) {
@@ -533,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,
@@ -562,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,
@@ -715,9 +720,9 @@ radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
/* Force the context `c' to be the current context and associate with it
* buffer `b'.
*/
-GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
- __DRIdrawablePrivate * driDrawPriv,
- __DRIdrawablePrivate * driReadPriv)
+GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv,
+ __DRIdrawable * driDrawPriv,
+ __DRIdrawable * driReadPriv)
{
radeonContextPtr radeon;
struct radeon_framebuffer *drfb;
@@ -735,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 62987489428..e397ee8c226 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
@@ -92,7 +92,7 @@ struct radeon_renderbuffer
GLuint pf_pending; /**< sequence number of pending flip */
GLuint vbl_pending; /**< vblank sequence number of pending flip */
- __DRIdrawablePrivate *dPriv;
+ __DRIdrawable *dPriv;
};
struct radeon_framebuffer
@@ -328,6 +328,7 @@ struct radeon_swtcl_info {
GLuint vertex_attr_count;
GLuint emit_prediction;
+ struct radeon_bo *bo;
};
#define RADEON_MAX_AOS_ARRAYS 16
@@ -380,8 +381,8 @@ struct radeon_store {
};
struct radeon_dri_mirror {
- __DRIcontextPrivate *context; /* DRI context */
- __DRIscreenPrivate *screen; /* DRI screen */
+ __DRIcontext *context; /* DRI context */
+ __DRIscreen *screen; /* DRI screen */
drm_context_t hwContext;
drm_hw_lock_t *hwLock;
@@ -517,17 +518,37 @@ struct radeon_context {
void (*free_context)(GLcontext *ctx);
void (*emit_query_finish)(radeonContextPtr radeon);
void (*update_scissor)(GLcontext *ctx);
+ unsigned (*blit)(GLcontext *ctx,
+ struct radeon_bo *src_bo,
+ intptr_t src_offset,
+ gl_format src_mesaformat,
+ unsigned src_pitch,
+ unsigned src_width,
+ unsigned src_height,
+ unsigned src_x_offset,
+ unsigned src_y_offset,
+ struct radeon_bo *dst_bo,
+ intptr_t dst_offset,
+ gl_format dst_mesaformat,
+ unsigned dst_pitch,
+ unsigned dst_width,
+ unsigned dst_height,
+ unsigned dst_x_offset,
+ unsigned dst_y_offset,
+ unsigned reg_width,
+ unsigned reg_height,
+ unsigned flip_y);
} vtbl;
};
#define RADEON_CONTEXT(glctx) ((radeonContextPtr)(ctx->DriverCtx))
-static inline __DRIdrawablePrivate* radeon_get_drawable(radeonContextPtr radeon)
+static inline __DRIdrawable* radeon_get_drawable(radeonContextPtr radeon)
{
return radeon->dri.context->driDrawablePriv;
}
-static inline __DRIdrawablePrivate* radeon_get_readable(radeonContextPtr radeon)
+static inline __DRIdrawable* radeon_get_readable(radeonContextPtr radeon)
{
return radeon->dri.context->driReadablePriv;
}
@@ -580,15 +601,16 @@ static INLINE uint32_t radeonPackFloat24(float f)
GLboolean radeonInitContext(radeonContextPtr radeon,
struct dd_function_table* functions,
const __GLcontextModes * glVisual,
- __DRIcontextPrivate * driContextPriv,
+ __DRIcontext * driContextPriv,
void *sharedContextPrivate);
void radeonCleanupContext(radeonContextPtr radeon);
-GLboolean radeonUnbindContext(__DRIcontextPrivate * driContextPriv);
-void radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable);
-GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
- __DRIdrawablePrivate * driDrawPriv,
- __DRIdrawablePrivate * driReadPriv);
-extern void radeonDestroyContext(__DRIcontextPrivate * driContextPriv);
+GLboolean radeonUnbindContext(__DRIcontext * driContextPriv);
+void radeon_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable,
+ GLboolean front_only);
+GLboolean radeonMakeCurrent(__DRIcontext * driContextPriv,
+ __DRIdrawable * driDrawPriv,
+ __DRIdrawable * driReadPriv);
+extern void radeonDestroyContext(__DRIcontext * driContextPriv);
#endif
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 5e700be4a59..6c08a90bbd6 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -63,6 +63,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_tcl.h"
#include "radeon_maos.h"
#include "radeon_queryobj.h"
+#include "radeon_blit.h"
#define need_GL_ARB_occlusion_query
#define need_GL_EXT_blend_minmax
@@ -202,16 +203,17 @@ static void r100_init_vtbl(radeonContextPtr radeon)
radeon->vtbl.fallback = radeonFallback;
radeon->vtbl.free_context = r100_vtbl_free_context;
radeon->vtbl.emit_query_finish = r100_emit_query_finish;
+ radeon->vtbl.blit = r100_blit;
}
/* Create the device specific context.
*/
GLboolean
r100CreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
radeonScreenPtr screen = (radeonScreenPtr)(sPriv->private);
struct dd_function_table functions;
r100ContextPtr rmesa;
@@ -228,6 +230,7 @@ r100CreateContext( const __GLcontextModes *glVisual,
if ( !rmesa )
return GL_FALSE;
+ rmesa->radeon.radeonScreen = screen;
r100_init_vtbl(&rmesa->radeon);
/* init exp fog table data */
@@ -257,7 +260,7 @@ r100CreateContext( const __GLcontextModes *glVisual,
* (the texture functions are especially important)
*/
_mesa_init_driver_functions( &functions );
- radeonInitTextureFuncs( &functions );
+ radeonInitTextureFuncs( &rmesa->radeon, &functions );
radeonInitQueryObjFunctions(&functions);
if (!radeonInitContext(&rmesa->radeon, &functions,
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.h b/src/mesa/drivers/dri/radeon/radeon_context.h
index 12ab33a009c..d84760bf74f 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.h
+++ b/src/mesa/drivers/dri/radeon/radeon_context.h
@@ -451,9 +451,8 @@ struct r100_context {
#define RADEON_OLD_PACKETS 1
extern GLboolean r100CreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate);
-
#endif /* __RADEON_CONTEXT_H__ */
diff --git a/src/mesa/drivers/dri/radeon/radeon_dma.c b/src/mesa/drivers/dri/radeon/radeon_dma.c
index 232972d7ec7..d31e4e47ddb 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);
@@ -223,8 +221,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 +277,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);
}
@@ -361,9 +356,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 */
@@ -397,11 +389,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;
@@ -416,6 +409,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.
*/
@@ -426,6 +421,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) {
@@ -449,7 +445,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 fc21069a92c..e780b9eef1b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -166,8 +166,9 @@ radeon_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
uint32_t size;
uint32_t pitch = ((cpp * width + 63) & ~63) / cpp;
- fprintf(stderr,"Allocating %d x %d radeon RBO (pitch %d)\n", width,
- height, pitch);
+ if (RADEON_DEBUG & RADEON_MEMORY)
+ fprintf(stderr,"Allocating %d x %d radeon RBO (pitch %d)\n", width,
+ height, pitch);
size = pitch * height * cpp;
rrb->pitch = pitch * cpp;
@@ -246,7 +247,7 @@ radeon_nop_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
* Not used for user-created renderbuffers.
*/
struct radeon_renderbuffer *
-radeon_create_renderbuffer(gl_format format, __DRIdrawablePrivate *driDrawPriv)
+radeon_create_renderbuffer(gl_format format, __DRIdrawable *driDrawPriv)
{
struct radeon_renderbuffer *rrb;
@@ -530,10 +531,9 @@ radeon_render_texture(GLcontext * ctx,
att->TextureLevel);
if (att->Texture->Target == GL_TEXTURE_3D) {
- GLuint offsets[6];
- radeon_miptree_depth_offsets(radeon_image->mt, att->TextureLevel,
- offsets);
- imageOffset += offsets[att->Zoffset];
+ imageOffset += radeon_image->mt->levels[att->TextureLevel].rowstride *
+ radeon_image->mt->levels[att->TextureLevel].height *
+ att->Zoffset;
}
/* store that offset in the region, along with the correct pitch for
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
index a0106d00fa2..afe3d9f12e2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
@@ -46,7 +46,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/shaders.h"
#include "main/texstate.h"
#include "main/varray.h"
-#include "glapi/dispatch.h"
#include "swrast/swrast.h"
#include "main/stencil.h"
#include "main/matrix.h"
@@ -449,7 +448,7 @@ void radeonEmitAOS( r100ContextPtr rmesa,
static void radeonKernelClear(GLcontext *ctx, GLuint flags)
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
drm_radeon_sarea_t *sarea = rmesa->radeon.sarea;
uint32_t clear;
GLint ret, i;
@@ -570,11 +569,15 @@ static void radeonKernelClear(GLcontext *ctx, GLuint flags)
static void radeonClear( GLcontext *ctx, GLbitfield mask )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
GLuint flags = 0;
GLuint color_mask = 0;
GLuint orig_mask = mask;
+ if (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_FRONT_RIGHT)) {
+ rmesa->radeon.front_buffer_dirty = GL_TRUE;
+ }
+
if ( RADEON_DEBUG & RADEON_IOCTL ) {
fprintf( stderr, "radeonClear\n");
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_lock.c b/src/mesa/drivers/dri/radeon/radeon_lock.c
index 7ad781ba619..9dee691938a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_lock.c
+++ b/src/mesa/drivers/dri/radeon/radeon_lock.c
@@ -58,9 +58,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
void radeonGetLock(radeonContextPtr rmesa, GLuint flags)
{
- __DRIdrawablePrivate *const drawable = radeon_get_drawable(rmesa);
- __DRIdrawablePrivate *const readable = radeon_get_readable(rmesa);
- __DRIscreenPrivate *sPriv = rmesa->dri.screen;
+ __DRIdrawable *const drawable = radeon_get_drawable(rmesa);
+ __DRIdrawable *const readable = radeon_get_readable(rmesa);
+ __DRIscreen *sPriv = rmesa->dri.screen;
drmGetLock(rmesa->dri.fd, rmesa->dri.hwContext, flags);
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 d7b5d71d21f..a1a523931fb 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -68,6 +68,19 @@ static unsigned get_compressed_image_size(
return rowStride * ((height + blockHeight - 1) / blockHeight);
}
+static int find_next_power_of_two(GLuint value)
+{
+ int i, tmp;
+
+ i = 0;
+ tmp = value - 1;
+ while (tmp) {
+ tmp >>= 1;
+ i++;
+ }
+ return (1 << i);
+}
+
/**
* Compute sizes and fill in offset and blit information for the given
* image (determined by \p face and \p level).
@@ -80,25 +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 (_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, lvl->height);
+ lvl->size = get_compressed_image_size(mt->mesaFormat, lvl->rowstride, height);
} else if (mt->target == GL_TEXTURE_RECTANGLE_NV) {
row_align = rmesa->texture_rect_row_align - 1;
lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) + row_align) & ~row_align;
- lvl->size = lvl->rowstride * lvl->height;
+ lvl->size = lvl->rowstride * height;
} else if (mt->tilebits & RADEON_TXO_MICRO_TILE) {
/* tile pattern is 16 bytes x2. mipmaps stay 32 byte aligned,
* though the actual offset may be different (if texture is less than
* 32 bytes width) to the untiled case */
lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) * 2 + 31) & ~31;
- lvl->size = lvl->rowstride * ((lvl->height + 1) / 2) * lvl->depth;
+ lvl->size = lvl->rowstride * ((height + 1) / 2) * lvl->depth;
} else {
row_align = rmesa->texture_row_align - 1;
lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) + row_align) & ~row_align;
- lvl->size = lvl->rowstride * lvl->height * lvl->depth;
+ lvl->size = lvl->rowstride * height * lvl->depth;
}
assert(lvl->size > 0);
@@ -110,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)
@@ -161,6 +177,12 @@ static void calculate_miptree_layout_r300(radeonContextPtr rmesa, radeon_mipmap_
for(face = 0; face < mt->faces; face++)
compute_tex_image_offset(rmesa, mt, face, level, &curOffset);
+ /* r600 cube levels seems to be aligned to 8 faces but
+ * we have separate register for 1'st level offset so add
+ * 2 image alignment after 1'st mip level */
+ if(rmesa->radeonScreen->chip_family >= CHIP_FAMILY_R600 &&
+ mt->target == GL_TEXTURE_CUBE_MAP && level >= 1)
+ curOffset += 2 * mt->levels[level].size;
}
/* Note the required size in memory */
@@ -364,25 +386,6 @@ void radeon_try_alloc_miptree(radeonContextPtr rmesa, radeonTexObj *t)
texImg->Depth, t->tile_bits);
}
-/* Although we use the image_offset[] array to store relative offsets
- * to cube faces, Mesa doesn't know anything about this and expects
- * each cube face to be treated as a separate image.
- *
- * These functions present that view to mesa:
- */
-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;
- }
- }
-}
-
GLuint
radeon_miptree_image_offset(radeon_mipmap_tree *mt,
GLuint face, GLuint level)
@@ -603,4 +606,4 @@ uint32_t get_base_teximage_offset(radeonTexObj *texObj)
} 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 a10649b5aea..c911688c1a5 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.h
@@ -88,7 +88,5 @@ GLboolean radeon_miptree_matches_image(radeon_mipmap_tree *mt,
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_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index be2d8365ef5..3080a0fcd0e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -214,10 +214,10 @@ static const GLuint __driNConfigOptions = 17;
#endif
-static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo );
+static int getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo );
static int
-radeonGetParam(__DRIscreenPrivate *sPriv, int param, void *value)
+radeonGetParam(__DRIscreen *sPriv, int param, void *value)
{
int ret;
drm_radeon_getparam_t gp = { 0 };
@@ -249,7 +249,7 @@ radeonGetParam(__DRIscreenPrivate *sPriv, int param, void *value)
}
static const __DRIconfig **
-radeonFillInModes( __DRIscreenPrivate *psp,
+radeonFillInModes( __DRIscreen *psp,
unsigned pixel_bits, unsigned depth_bits,
unsigned stencil_bits, GLboolean have_back_buffer )
{
@@ -911,7 +911,7 @@ static int radeon_set_screen_flags(radeonScreenPtr screen, int device_id)
/* Create the device specific screen private data struct.
*/
static radeonScreenPtr
-radeonCreateScreen( __DRIscreenPrivate *sPriv )
+radeonCreateScreen( __DRIscreen *sPriv )
{
radeonScreenPtr screen;
RADEONDRIPtr dri_priv = (RADEONDRIPtr)sPriv->pDevPriv;
@@ -1250,7 +1250,7 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
}
static radeonScreenPtr
-radeonCreateScreen2(__DRIscreenPrivate *sPriv)
+radeonCreateScreen2(__DRIscreen *sPriv)
{
radeonScreenPtr screen;
int i;
@@ -1401,7 +1401,7 @@ radeonCreateScreen2(__DRIscreenPrivate *sPriv)
/* Destroy the device specific screen private data struct.
*/
static void
-radeonDestroyScreen( __DRIscreenPrivate *sPriv )
+radeonDestroyScreen( __DRIscreen *sPriv )
{
radeonScreenPtr screen = (radeonScreenPtr)sPriv->private;
@@ -1435,7 +1435,7 @@ radeonDestroyScreen( __DRIscreenPrivate *sPriv )
/* Initialize the driver specific screen private data.
*/
static GLboolean
-radeonInitDriver( __DRIscreenPrivate *sPriv )
+radeonInitDriver( __DRIscreen *sPriv )
{
if (sPriv->dri2.enabled) {
sPriv->private = (void *) radeonCreateScreen2( sPriv );
@@ -1459,8 +1459,8 @@ radeonInitDriver( __DRIscreenPrivate *sPriv )
* pbuffers.
*/
static GLboolean
-radeonCreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+radeonCreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -1559,7 +1559,7 @@ static void radeon_cleanup_renderbuffers(struct radeon_framebuffer *rfb)
}
void
-radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+radeonDestroyBuffer(__DRIdrawable *driDrawPriv)
{
struct radeon_framebuffer *rfb;
if (!driDrawPriv)
@@ -1581,7 +1581,7 @@ radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
* \return the __GLcontextModes supported by this driver
*/
static const __DRIconfig **
-radeonInitScreen(__DRIscreenPrivate *psp)
+radeonInitScreen(__DRIscreen *psp)
{
#if defined(RADEON_R100)
static const char *driver_name = "Radeon";
@@ -1631,7 +1631,7 @@ radeonInitScreen(__DRIscreenPrivate *psp)
* \return the __GLcontextModes supported by this driver
*/
static const
-__DRIconfig **radeonInitScreen2(__DRIscreenPrivate *psp)
+__DRIconfig **radeonInitScreen2(__DRIscreen *psp)
{
GLenum fb_format[3];
GLenum fb_type[3];
@@ -1698,7 +1698,7 @@ __DRIconfig **radeonInitScreen2(__DRIscreenPrivate *psp)
* Get information about previous buffer swaps.
*/
static int
-getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo )
+getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo )
{
struct radeon_framebuffer *rfb;
@@ -1751,3 +1751,10 @@ const struct __DriverAPIRec driDriverAPI = {
.InitScreen2 = radeonInitScreen2,
};
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ &driDRI2Extension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h b/src/mesa/drivers/dri/radeon/radeon_screen.h
index 15744e88284..5e6d432e11d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.h
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.h
@@ -86,7 +86,7 @@ typedef struct radeon_screen {
__volatile__ uint32_t *scratch;
- __DRIscreenPrivate *driScreen;
+ __DRIscreen *driScreen;
unsigned int sarea_priv_offset;
unsigned int gart_buffer_offset; /* offset in card memory space */
unsigned int gart_texture_offset; /* offset in card memory space */
@@ -123,5 +123,5 @@ typedef struct radeon_screen {
#define IS_R600_CLASS(screen) \
((screen->chip_flags & RADEON_CLASS_MASK) == RADEON_CLASS_R600)
-extern void radeonDestroyBuffer(__DRIdrawablePrivate *driDrawPriv);
+extern void radeonDestroyBuffer(__DRIdrawable *driDrawPriv);
#endif /* __RADEON_SCREEN_H__ */
diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c
index 665f2b6f516..8db3d2b143b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_span.c
+++ b/src/mesa/drivers/dri/radeon/radeon_span.c
@@ -827,18 +827,21 @@ static void map_unmap_rb(struct gl_renderbuffer *rb, int flag)
}
static void
-radeon_map_unmap_buffers(GLcontext *ctx, GLboolean map)
+radeon_map_unmap_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb,
+ GLboolean map)
{
GLuint i, j;
/* color draw buffers */
for (j = 0; j < ctx->DrawBuffer->_NumColorDrawBuffers; j++)
- map_unmap_rb(ctx->DrawBuffer->_ColorDrawBuffers[j], map);
+ map_unmap_rb(fb->_ColorDrawBuffers[j], map);
+
+ map_unmap_rb(fb->_ColorReadBuffer, map);
/* check for render to textures */
for (i = 0; i < BUFFER_COUNT; i++) {
struct gl_renderbuffer_attachment *att =
- ctx->DrawBuffer->Attachment + i;
+ fb->Attachment + i;
struct gl_texture_object *tex = att->Texture;
if (tex) {
/* Render to texture. Note that a mipmapped texture need not
@@ -854,15 +857,15 @@ radeon_map_unmap_buffers(GLcontext *ctx, GLboolean map)
radeon_teximage_unmap(image);
}
}
-
- map_unmap_rb(ctx->ReadBuffer->_ColorReadBuffer, map);
-
+
/* depth buffer (Note wrapper!) */
- if (ctx->DrawBuffer->_DepthBuffer)
- map_unmap_rb(ctx->DrawBuffer->_DepthBuffer->Wrapped, map);
+ if (fb->_DepthBuffer)
+ map_unmap_rb(fb->_DepthBuffer->Wrapped, map);
+
+ if (fb->_StencilBuffer)
+ map_unmap_rb(fb->_StencilBuffer->Wrapped, map);
- if (ctx->DrawBuffer->_StencilBuffer)
- map_unmap_rb(ctx->DrawBuffer->_StencilBuffer->Wrapped, map);
+ radeon_check_front_buffer_rendering(ctx);
}
static void radeonSpanRenderStart(GLcontext * ctx)
@@ -887,23 +890,30 @@ static void radeonSpanRenderStart(GLcontext * ctx)
ctx->Driver.MapTexture(ctx, ctx->Texture.Unit[i]._Current);
}
- radeon_map_unmap_buffers(ctx, 1);
+ radeon_map_unmap_framebuffer(ctx, ctx->DrawBuffer, GL_TRUE);
+ if (ctx->ReadBuffer != ctx->DrawBuffer)
+ radeon_map_unmap_framebuffer(ctx, ctx->ReadBuffer, GL_TRUE);
}
static void radeonSpanRenderFinish(GLcontext * ctx)
{
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
int i;
+
_swrast_flush(ctx);
- if (!rmesa->radeonScreen->driScreen->dri2.enabled) {
- UNLOCK_HARDWARE(rmesa);
- }
+
for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
if (ctx->Texture.Unit[i]._ReallyEnabled)
ctx->Driver.UnmapTexture(ctx, ctx->Texture.Unit[i]._Current);
}
- radeon_map_unmap_buffers(ctx, 0);
+ radeon_map_unmap_framebuffer(ctx, ctx->DrawBuffer, GL_FALSE);
+ if (ctx->ReadBuffer != ctx->DrawBuffer)
+ radeon_map_unmap_framebuffer(ctx, ctx->ReadBuffer, GL_FALSE);
+
+ if (!rmesa->radeonScreen->driScreen->dri2.enabled) {
+ UNLOCK_HARDWARE(rmesa);
+ }
}
void radeonInitSpanFuncs(GLcontext * ctx)
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index f6c733ab209..1c9ec36daec 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -521,10 +521,10 @@ static void radeonColorMask( GLcontext *ctx,
return;
mask = radeonPackColor( rrb->cpp,
- ctx->Color.ColorMask[RCOMP],
- ctx->Color.ColorMask[GCOMP],
- ctx->Color.ColorMask[BCOMP],
- ctx->Color.ColorMask[ACOMP] );
+ ctx->Color.ColorMask[0][RCOMP],
+ ctx->Color.ColorMask[0][GCOMP],
+ ctx->Color.ColorMask[0][BCOMP],
+ ctx->Color.ColorMask[0][ACOMP] );
if ( rmesa->hw.msk.cmd[MSK_RB3D_PLANEMASK] != mask ) {
RADEON_STATECHANGE( rmesa, msk );
@@ -1400,7 +1400,7 @@ static void radeonClearStencil( GLcontext *ctx, GLint s )
void radeonUpdateWindow( GLcontext *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
GLfloat xoffset = dPriv ? (GLfloat) dPriv->x : 0;
GLfloat yoffset = dPriv ? (GLfloat) dPriv->y + dPriv->h : 0;
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -1455,7 +1455,7 @@ static void radeonDepthRange( GLcontext *ctx, GLclampd nearval,
void radeonUpdateViewportOffset( GLcontext *ctx )
{
r100ContextPtr rmesa = R100_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = radeon_get_drawable(&rmesa->radeon);
+ __DRIdrawable *dPriv = radeon_get_drawable(&rmesa->radeon);
GLfloat xoffset = (GLfloat)dPriv->x;
GLfloat yoffset = (GLfloat)dPriv->y + dPriv->h;
const GLfloat *v = ctx->Viewport._WindowMap.m;
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 749ab75f201..882ee5c194b 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -341,7 +341,7 @@ static void radeonTexParameter( GLcontext *ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- radeonSetTexBorderColor( t, texObj->BorderColor );
+ radeonSetTexBorderColor( t, texObj->BorderColor.f );
break;
case GL_TEXTURE_BASE_LEVEL:
@@ -428,13 +428,13 @@ radeonNewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
radeonSetTexWrap( t, t->base.WrapS, t->base.WrapT );
radeonSetTexMaxAnisotropy( t, t->base.MaxAnisotropy );
radeonSetTexFilter( t, t->base.MinFilter, t->base.MagFilter );
- radeonSetTexBorderColor( t, t->base.BorderColor );
+ radeonSetTexBorderColor( t, t->base.BorderColor.f );
return &t->base;
}
-void radeonInitTextureFuncs( struct dd_function_table *functions )
+void radeonInitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *functions )
{
functions->ChooseTextureFormat = radeonChooseTextureFormat_mesa;
functions->TexImage1D = radeonTexImage1D;
@@ -455,6 +455,11 @@ void radeonInitTextureFuncs( struct dd_function_table *functions )
functions->CompressedTexImage2D = radeonCompressedTexImage2D;
functions->CompressedTexSubImage2D = radeonCompressedTexSubImage2D;
+ if (radeon->radeonScreen->kernel_mm) {
+ functions->CopyTexImage2D = radeonCopyTexImage2D;
+ functions->CopyTexSubImage2D = radeonCopyTexSubImage2D;
+ }
+
functions->GenerateMipmap = radeonGenerateMipmap;
functions->NewTextureImage = radeonNewTextureImage;
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.h b/src/mesa/drivers/dri/radeon/radeon_tex.h
index a4aaddc74fa..0113ffd3dac 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.h
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.h
@@ -52,6 +52,6 @@ extern int radeonUploadTexImages( r100ContextPtr rmesa, radeonTexObjPtr t,
extern void radeonDestroyTexObj( r100ContextPtr rmesa, radeonTexObjPtr t );
-extern void radeonInitTextureFuncs( struct dd_function_table *functions );
+extern void radeonInitTextureFuncs( radeonContextPtr radeon, struct dd_function_table *functions );
#endif /* __RADEON_TEX_H__ */
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
new file mode 100644
index 00000000000..44e144c80f5
--- /dev/null
+++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2009 Maciej Cencora <m.cencora@gmail.com>
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "radeon_common.h"
+#include "radeon_texture.h"
+
+#include "main/image.h"
+#include "main/teximage.h"
+#include "main/texstate.h"
+#include "drivers/common/meta.h"
+
+#include "radeon_mipmap_tree.h"
+#include <main/debug.h>
+
+static GLboolean
+do_copy_texsubimage(GLcontext *ctx,
+ GLenum target, GLint level,
+ struct radeon_tex_obj *tobj,
+ radeon_texture_image *timg,
+ GLint dstx, GLint dsty,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height)
+{
+ radeonContextPtr radeon = RADEON_CONTEXT(ctx);
+ struct radeon_renderbuffer *rrb;
+
+ if (_mesa_get_format_bits(timg->base.TexFormat, GL_DEPTH_BITS) > 0) {
+ rrb = radeon_get_depthbuffer(radeon);
+ } else {
+ rrb = radeon_get_colorbuffer(radeon);
+ }
+
+ if (!timg->mt) {
+ radeon_validate_texture_miptree(ctx, &tobj->base);
+ }
+
+ assert(rrb && rrb->bo);
+ assert(timg->mt->bo);
+ assert(timg->base.Width >= dstx + width);
+ assert(timg->base.Height >= dsty + height);
+
+ intptr_t src_offset = rrb->draw_offset;
+ intptr_t dst_offset = radeon_miptree_image_offset(timg->mt, _mesa_tex_target_to_face(target), level);
+
+ if (0) {
+ fprintf(stderr, "%s: copying to face %d, level %d\n",
+ __FUNCTION__, _mesa_tex_target_to_face(target), level);
+ fprintf(stderr, "to: x %d, y %d, offset %d\n", dstx, dsty, (uint32_t) dst_offset);
+ fprintf(stderr, "from (%dx%d) width %d, height %d, offset %d, pitch %d\n",
+ x, y, rrb->base.Width, rrb->base.Height, (uint32_t) src_offset, rrb->pitch/rrb->cpp);
+ fprintf(stderr, "src size %d, dst size %d\n", rrb->bo->size, timg->mt->bo->size);
+
+ }
+
+ /* blit from src buffer to texture */
+ return radeon->vtbl.blit(ctx, rrb->bo, src_offset, rrb->base.Format, rrb->pitch/rrb->cpp,
+ rrb->base.Width, rrb->base.Height, x, y,
+ timg->mt->bo, dst_offset, timg->base.TexFormat,
+ timg->mt->levels[level].rowstride / _mesa_get_format_bytes(timg->base.TexFormat),
+ timg->base.Width, timg->base.Height,
+ dstx, dsty, width, height, 1);
+}
+
+void
+radeonCopyTexImage2D(GLcontext *ctx, GLenum target, GLint level,
+ GLenum internalFormat,
+ GLint x, GLint y, GLsizei width, GLsizei height,
+ GLint border)
+{
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
+ struct gl_texture_object *texObj =
+ _mesa_select_tex_object(ctx, texUnit, target);
+ struct gl_texture_image *texImage =
+ _mesa_select_tex_image(ctx, texObj, target, level);
+ int srcx, srcy, dstx, dsty;
+
+ if (border)
+ goto fail;
+
+ /* Setup or redefine the texture object, mipmap tree and texture
+ * image. Don't populate yet.
+ */
+ ctx->Driver.TexImage2D(ctx, target, level, internalFormat,
+ width, height, border,
+ GL_RGBA, GL_UNSIGNED_BYTE, NULL,
+ &ctx->DefaultPacking, texObj, texImage);
+
+ srcx = x;
+ srcy = y;
+ dstx = 0;
+ dsty = 0;
+ if (!_mesa_clip_copytexsubimage(ctx,
+ &dstx, &dsty,
+ &srcx, &srcy,
+ &width, &height)) {
+ return;
+ }
+
+ if (!do_copy_texsubimage(ctx, target, level,
+ radeon_tex_obj(texObj), (radeon_texture_image *)texImage,
+ 0, 0, x, y, width, height)) {
+ goto fail;
+ }
+
+ return;
+
+fail:
+ _mesa_meta_CopyTexImage2D(ctx, target, level, internalFormat, x, y,
+ width, height, border);
+}
+
+void
+radeonCopyTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height)
+{
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
+ struct gl_texture_object *texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ struct gl_texture_image *texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+
+ if (!do_copy_texsubimage(ctx, target, level,
+ radeon_tex_obj(texObj), (radeon_texture_image *)texImage,
+ xoffset, yoffset, x, y, width, height)) {
+
+ //DEBUG_FALLBACKS
+
+ _mesa_meta_CopyTexSubImage2D(ctx, target, level,
+ xoffset, yoffset, x, y, width, height);
+ }
+}
diff --git a/src/mesa/drivers/dri/radeon/radeon_texstate.c b/src/mesa/drivers/dri/radeon/radeon_texstate.c
index 3cbe3b47254..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);
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 03178116c1a..4538e74eea1 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -197,21 +197,6 @@ void radeonUnmapTexture(GLcontext *ctx, struct gl_texture_object *texObj)
radeon_bo_unmap(t->mt->bo);
}
-GLuint radeon_face_for_target(GLenum target)
-{
- switch (target) {
- case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
- return (GLuint) target - (GLuint) GL_TEXTURE_CUBE_MAP_POSITIVE_X;
- default:
- return 0;
- }
-}
-
/**
* Wraps Mesa's implementation to ensure that the base level image is mapped.
*
@@ -248,8 +233,15 @@ static void radeon_generate_mipmap(GLcontext *ctx, GLenum target,
void radeonGenerateMipmap(GLcontext* ctx, GLenum target, struct gl_texture_object *texObj)
{
- GLuint face = radeon_face_for_target(target);
+ radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
+ struct radeon_bo *bo;
+ GLuint face = _mesa_tex_target_to_face(target);
radeon_texture_image *baseimage = get_radeon_texture_image(texObj->Image[face][texObj->BaseLevel]);
+ bo = !baseimage->mt ? baseimage->bo : baseimage->mt->bo;
+
+ if (bo && radeon_bo_is_referenced_by_cs(bo, rmesa->cmdbuf.cs)) {
+ radeon_firevertices(rmesa);
+ }
radeon_teximage_map(baseimage, GL_FALSE);
radeon_generate_mipmap(ctx, target, texObj);
@@ -710,7 +702,7 @@ static void radeon_teximage(
radeon_texture_image* image = get_radeon_texture_image(texImage);
GLint postConvWidth = width;
GLint postConvHeight = height;
- GLuint face = radeon_face_for_target(target);
+ GLuint face = _mesa_tex_target_to_face(target);
{
struct radeon_bo *bo;
@@ -863,7 +855,7 @@ static void radeon_texsubimage(GLcontext* ctx, int dims, GLenum target, int leve
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);
+ dims, texObj, texImage, _mesa_tex_target_to_face(target), level);
}
t->validated = GL_FALSE;
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h
index 906daf12d0a..f09dd652142 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.h
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.h
@@ -44,7 +44,6 @@ void radeonMapTexture(GLcontext *ctx, struct gl_texture_object *texObj);
void radeonUnmapTexture(GLcontext *ctx, struct gl_texture_object *texObj);
void radeonGenerateMipmap(GLcontext* ctx, GLenum target, struct gl_texture_object *texObj);
int radeon_validate_texture_miptree(GLcontext * ctx, struct gl_texture_object *texObj);
-GLuint radeon_face_for_target(GLenum target);
gl_format radeonChooseTextureFormat_mesa(GLcontext * ctx,
GLint internalFormat,
@@ -126,4 +125,14 @@ void radeonGetCompressedTexImage(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage);
+void radeonCopyTexImage2D(GLcontext *ctx, GLenum target, GLint level,
+ GLenum internalFormat,
+ GLint x, GLint y, GLsizei width, GLsizei height,
+ GLint border);
+
+void radeonCopyTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLint x, GLint y,
+ GLsizei width, GLsizei height);
+
#endif
diff --git a/src/mesa/drivers/dri/radeon/server/radeon_egl.c b/src/mesa/drivers/dri/radeon/server/radeon_egl.c
deleted file mode 100644
index c16d66e4ece..00000000000
--- a/src/mesa/drivers/dri/radeon/server/radeon_egl.c
+++ /dev/null
@@ -1,1088 +0,0 @@
-/*
- * EGL driver for radeon_dri.so
- */
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <dirent.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-
-#include "eglconfig.h"
-#include "eglcontext.h"
-#include "egldisplay.h"
-#include "egldriver.h"
-#include "eglglobals.h"
-#include "egllog.h"
-#include "eglmode.h"
-#include "eglscreen.h"
-#include "eglsurface.h"
-#include "egldri.h"
-
-#include "mtypes.h"
-#include "memops.h"
-#include "drm.h"
-#include "drm_sarea.h"
-#include "radeon_drm.h"
-#include "radeon_dri.h"
-#include "radeon.h"
-
-static size_t radeon_drm_page_size;
-
-/**
- * radeon driver-specific driver class derived from _EGLDriver
- */
-typedef struct radeon_driver
-{
- _EGLDriver Base; /* base class/object */
- GLuint radeonStuff;
-} radeonDriver;
-
-static int
-RADEONSetParam(driDisplay *disp, int param, int value)
-{
- drm_radeon_setparam_t sp;
- int ret;
-
- memset(&sp, 0, sizeof(sp));
- sp.param = param;
- sp.value = value;
-
- if ((ret=drmCommandWrite(disp->drmFD, DRM_RADEON_SETPARAM, &sp, sizeof(sp)))) {
- fprintf(stderr,"Set param failed\n", ret);
- return -1;
- }
-
- return 0;
-}
-
-static int
-RADEONCheckDRMVersion(driDisplay *disp, RADEONInfoPtr info)
-{
- drmVersionPtr version;
-
- version = drmGetVersion(disp->drmFD);
- if (version) {
- int req_minor, req_patch;
-
- /* Need 1.21.x for card type detection getparam
- */
- req_minor = 21;
- req_patch = 0;
-
- if (version->version_major != 1 ||
- version->version_minor < req_minor ||
- (version->version_minor == req_minor &&
- version->version_patchlevel < req_patch)) {
- /* Incompatible drm version */
- fprintf(stderr,
- "[dri] RADEONDRIScreenInit failed because of a version "
- "mismatch.\n"
- "[dri] radeon.o kernel module version is %d.%d.%d "
- "but version 1.%d.%d or newer is needed.\n"
- "[dri] Disabling DRI.\n",
- version->version_major,
- version->version_minor,
- version->version_patchlevel,
- req_minor,
- req_patch);
- drmFreeVersion(version);
- return 0;
- }
-
- info->drmMinor = version->version_minor;
- drmFreeVersion(version);
- }
-
- return 1;
-}
-
-
-/**
- * \brief Compute base 2 logarithm.
- *
- * \param val value.
- *
- * \return base 2 logarithm of \p val.
- */
-static int RADEONMinBits(int val)
-{
- int bits;
-
- if (!val) return 1;
- for (bits = 0; val; val >>= 1, ++bits);
- return bits;
-}
-
-
-/* Initialize the PCI GART state. Request memory for use in PCI space,
- * and initialize the Radeon registers to point to that memory.
- */
-static int RADEONDRIPciInit(driDisplay *disp, RADEONInfoPtr info)
-{
- int ret;
- int flags = DRM_READ_ONLY | DRM_LOCKED | DRM_KERNEL;
- int s, l;
-
- ret = drmScatterGatherAlloc(disp->drmFD, info->gartSize*1024*1024,
- &info->gartMemHandle);
- if (ret < 0) {
- fprintf(stderr, "[pci] Out of memory (%d)\n", ret);
- return 0;
- }
- fprintf(stderr,
- "[pci] %d kB allocated with handle 0x%04lx\n",
- info->gartSize*1024, (long) info->gartMemHandle);
-
- info->gartOffset = 0;
-
- /* Initialize the CP ring buffer data */
- info->ringStart = info->gartOffset;
- info->ringMapSize = info->ringSize*1024*1024 + radeon_drm_page_size;
-
- info->ringReadOffset = info->ringStart + info->ringMapSize;
- info->ringReadMapSize = radeon_drm_page_size;
-
- /* Reserve space for vertex/indirect buffers */
- info->bufStart = info->ringReadOffset + info->ringReadMapSize;
- info->bufMapSize = info->bufSize*1024*1024;
-
- /* Reserve the rest for AGP textures */
- info->gartTexStart = info->bufStart + info->bufMapSize;
- s = (info->gartSize*1024*1024 - info->gartTexStart);
- l = RADEONMinBits((s-1) / RADEON_NR_TEX_REGIONS);
- if (l < RADEON_LOG_TEX_GRANULARITY) l = RADEON_LOG_TEX_GRANULARITY;
- info->gartTexMapSize = (s >> l) << l;
- info->log2GARTTexGran = l;
-
- if (drmAddMap(disp->drmFD, info->ringStart, info->ringMapSize,
- DRM_SCATTER_GATHER, flags, &info->ringHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add ring mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[pci] ring handle = 0x%08lx\n", info->ringHandle);
-
- if (drmAddMap(disp->drmFD, info->ringReadOffset, info->ringReadMapSize,
- DRM_SCATTER_GATHER, flags, &info->ringReadPtrHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add ring read ptr mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[pci] ring read ptr handle = 0x%08lx\n",
- info->ringReadPtrHandle);
-
- if (drmAddMap(disp->drmFD, info->bufStart, info->bufMapSize,
- DRM_SCATTER_GATHER, 0, &info->bufHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add vertex/indirect buffers mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[pci] vertex/indirect buffers handle = 0x%08lx\n",
- info->bufHandle);
-
- if (drmAddMap(disp->drmFD, info->gartTexStart, info->gartTexMapSize,
- DRM_SCATTER_GATHER, 0, &info->gartTexHandle) < 0) {
- fprintf(stderr,
- "[pci] Could not add GART texture map mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[pci] GART texture map handle = 0x%08lx\n",
- info->gartTexHandle);
-
- return 1;
-}
-
-
-/**
- * \brief Initialize the AGP state
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return one on success, or zero on failure.
- *
- * Acquires and enables the AGP device. Reserves memory in the AGP space for
- * the ring buffer, vertex buffers and textures. Initialize the Radeon
- * registers to point to that memory and add client mappings.
- */
-static int RADEONDRIAgpInit( driDisplay *disp, RADEONInfoPtr info)
-{
- int mode, ret;
- int s, l;
- int agpmode = 1;
-
- if (drmAgpAcquire(disp->drmFD) < 0) {
- fprintf(stderr, "[gart] AGP not available\n");
- return 0;
- }
-
- mode = drmAgpGetMode(disp->drmFD); /* Default mode */
- /* Disable fast write entirely - too many lockups.
- */
- mode &= ~RADEON_AGP_MODE_MASK;
- switch (agpmode) {
- case 4: mode |= RADEON_AGP_4X_MODE;
- case 2: mode |= RADEON_AGP_2X_MODE;
- case 1: default: mode |= RADEON_AGP_1X_MODE;
- }
-
- if (drmAgpEnable(disp->drmFD, mode) < 0) {
- fprintf(stderr, "[gart] AGP not enabled\n");
- drmAgpRelease(disp->drmFD);
- return 0;
- }
-
-#if 0
- /* Workaround for some hardware bugs */
- if (info->ChipFamily < CHIP_FAMILY_R200)
- OUTREG(RADEON_AGP_CNTL, INREG(RADEON_AGP_CNTL) | 0x000e0000);
-#endif
- info->gartOffset = 0;
-
- if ((ret = drmAgpAlloc(disp->drmFD, info->gartSize*1024*1024, 0, NULL,
- &info->gartMemHandle)) < 0) {
- fprintf(stderr, "[gart] Out of memory (%d)\n", ret);
- drmAgpRelease(disp->drmFD);
- return 0;
- }
- fprintf(stderr,
- "[gart] %d kB allocated with handle 0x%08x\n",
- info->gartSize*1024, (unsigned)info->gartMemHandle);
-
- if (drmAgpBind(disp->drmFD,
- info->gartMemHandle, info->gartOffset) < 0) {
- fprintf(stderr, "[gart] Could not bind\n");
- drmAgpFree(disp->drmFD, info->gartMemHandle);
- drmAgpRelease(disp->drmFD);
- return 0;
- }
-
- /* Initialize the CP ring buffer data */
- info->ringStart = info->gartOffset;
- info->ringMapSize = info->ringSize*1024*1024 + radeon_drm_page_size;
-
- info->ringReadOffset = info->ringStart + info->ringMapSize;
- info->ringReadMapSize = radeon_drm_page_size;
-
- /* Reserve space for vertex/indirect buffers */
- info->bufStart = info->ringReadOffset + info->ringReadMapSize;
- info->bufMapSize = info->bufSize*1024*1024;
-
- /* Reserve the rest for AGP textures */
- info->gartTexStart = info->bufStart + info->bufMapSize;
- s = (info->gartSize*1024*1024 - info->gartTexStart);
- l = RADEONMinBits((s-1) / RADEON_NR_TEX_REGIONS);
- if (l < RADEON_LOG_TEX_GRANULARITY) l = RADEON_LOG_TEX_GRANULARITY;
- info->gartTexMapSize = (s >> l) << l;
- info->log2GARTTexGran = l;
-
- if (drmAddMap(disp->drmFD, info->ringStart, info->ringMapSize,
- DRM_AGP, DRM_READ_ONLY, &info->ringHandle) < 0) {
- fprintf(stderr, "[gart] Could not add ring mapping\n");
- return 0;
- }
- fprintf(stderr, "[gart] ring handle = 0x%08lx\n", info->ringHandle);
-
-
- if (drmAddMap(disp->drmFD, info->ringReadOffset, info->ringReadMapSize,
- DRM_AGP, DRM_READ_ONLY, &info->ringReadPtrHandle) < 0) {
- fprintf(stderr,
- "[gart] Could not add ring read ptr mapping\n");
- return 0;
- }
-
- fprintf(stderr,
- "[gart] ring read ptr handle = 0x%08lx\n",
- info->ringReadPtrHandle);
-
- if (drmAddMap(disp->drmFD, info->bufStart, info->bufMapSize,
- DRM_AGP, 0, &info->bufHandle) < 0) {
- fprintf(stderr,
- "[gart] Could not add vertex/indirect buffers mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[gart] vertex/indirect buffers handle = 0x%08lx\n",
- info->bufHandle);
-
- if (drmAddMap(disp->drmFD, info->gartTexStart, info->gartTexMapSize,
- DRM_AGP, 0, &info->gartTexHandle) < 0) {
- fprintf(stderr,
- "[gart] Could not add AGP texture map mapping\n");
- return 0;
- }
- fprintf(stderr,
- "[gart] AGP texture map handle = 0x%08lx\n",
- info->gartTexHandle);
-
- return 1;
-}
-
-
-/**
- * Initialize all the memory-related fields of the RADEONInfo object.
- * This includes the various 'offset' and 'size' fields.
- */
-static int
-RADEONMemoryInit(driDisplay *disp, RADEONInfoPtr info)
-{
- int width_bytes = disp->virtualWidth * disp->cpp;
- int cpp = disp->cpp;
- int bufferSize = ((disp->virtualHeight * width_bytes
- + RADEON_BUFFER_ALIGN)
- & ~RADEON_BUFFER_ALIGN);
- int depthSize = ((((disp->virtualHeight+15) & ~15) * width_bytes
- + RADEON_BUFFER_ALIGN)
- & ~RADEON_BUFFER_ALIGN);
- int l;
- int pcie_gart_table_size = 0;
-
- info->frontOffset = 0;
- info->frontPitch = disp->virtualWidth;
-
- if (disp->card_type==RADEON_CARD_PCIE)
- pcie_gart_table_size = RADEON_PCIGART_TABLE_SIZE;
-
- /* Front, back and depth buffers - everything else texture??
- */
- info->textureSize = disp->fbSize - pcie_gart_table_size - 2 * bufferSize - depthSize;
-
- if (info->textureSize < 0)
- return 0;
-
- l = RADEONMinBits((info->textureSize-1) / RADEON_NR_TEX_REGIONS);
- if (l < RADEON_LOG_TEX_GRANULARITY) l = RADEON_LOG_TEX_GRANULARITY;
-
- /* Round the texture size up to the nearest whole number of
- * texture regions. Again, be greedy about this, don't
- * round down.
- */
- info->log2TexGran = l;
- info->textureSize = (info->textureSize >> l) << l;
-
- /* Set a minimum usable local texture heap size. This will fit
- * two 256x256x32bpp textures.
- */
- if (info->textureSize < 512 * 1024) {
- info->textureOffset = 0;
- info->textureSize = 0;
- }
-
- /* Reserve space for textures */
- info->textureOffset = ((disp->fbSize - pcie_gart_table_size - info->textureSize +
- RADEON_BUFFER_ALIGN) &
- ~RADEON_BUFFER_ALIGN);
-
- /* Reserve space for the shared depth
- * buffer.
- */
- info->depthOffset = ((info->textureOffset - depthSize +
- RADEON_BUFFER_ALIGN) &
- ~RADEON_BUFFER_ALIGN);
- info->depthPitch = disp->virtualWidth;
-
- info->backOffset = ((info->depthOffset - bufferSize +
- RADEON_BUFFER_ALIGN) &
- ~RADEON_BUFFER_ALIGN);
- info->backPitch = disp->virtualWidth;
-
- if (pcie_gart_table_size)
- info->pcieGartTableOffset = disp->fbSize - pcie_gart_table_size;
-
- fprintf(stderr,
- "Will use back buffer at offset 0x%x, pitch %d\n",
- info->backOffset, info->backPitch);
- fprintf(stderr,
- "Will use depth buffer at offset 0x%x, pitch %d\n",
- info->depthOffset, info->depthPitch);
- fprintf(stderr,
- "Will use %d kb for textures at offset 0x%x\n",
- info->textureSize/1024, info->textureOffset);
- if (pcie_gart_table_size)
- {
- fprintf(stderr,
- "Will use %d kb for PCIE GART Table at offset 0x%x\n",
- pcie_gart_table_size/1024, info->pcieGartTableOffset);
- }
-
- /* XXX I don't think these are needed. */
-#if 0
- info->frontPitchOffset = (((info->frontPitch * cpp / 64) << 22) |
- (info->frontOffset >> 10));
-
- info->backPitchOffset = (((info->backPitch * cpp / 64) << 22) |
- (info->backOffset >> 10));
-
- info->depthPitchOffset = (((info->depthPitch * cpp / 64) << 22) |
- (info->depthOffset >> 10));
-#endif
-
- if (pcie_gart_table_size)
- RADEONSetParam(disp, RADEON_SETPARAM_PCIGART_LOCATION, info->pcieGartTableOffset);
-
- return 1;
-}
-
-
-/**
- * \brief Initialize the kernel data structures and enable the CP engine.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return non-zero on success, or zero on failure.
- *
- * This function is a wrapper around the DRM_RADEON_CP_INIT command, passing
- * all the parameters in a drm_radeon_init_t structure.
- */
-static int RADEONDRIKernelInit( driDisplay *disp,
- RADEONInfoPtr info)
-{
- int cpp = disp->bpp / 8;
- drm_radeon_init_t drmInfo;
- int ret;
-
- memset(&drmInfo, 0, sizeof(drmInfo));
-
- if ( (info->ChipFamily >= CHIP_FAMILY_R300) )
- drmInfo.func = RADEON_INIT_R300_CP;
- else if ( (info->ChipFamily == CHIP_FAMILY_R200) ||
- (info->ChipFamily == CHIP_FAMILY_RV250) ||
- (info->ChipFamily == CHIP_FAMILY_M9) ||
- (info->ChipFamily == CHIP_FAMILY_RV280) )
- drmInfo.func = RADEON_INIT_R200_CP;
- else
- drmInfo.func = RADEON_INIT_CP;
-
- /* This is the struct passed to the kernel module for its initialization */
- /* XXX problem here:
- * The front/back/depth_offset/pitch fields may change depending upon
- * which drawing surface we're using!!! They can't be set just once
- * during initialization.
- * Looks like we'll need a new ioctl to update these fields for drawing
- * to other surfaces...
- */
- drmInfo.sarea_priv_offset = sizeof(drm_sarea_t);
- drmInfo.cp_mode = RADEON_DEFAULT_CP_BM_MODE;
- drmInfo.gart_size = info->gartSize*1024*1024;
- drmInfo.ring_size = info->ringSize*1024*1024;
- drmInfo.usec_timeout = 1000;
- drmInfo.fb_bpp = disp->bpp;
- drmInfo.depth_bpp = disp->bpp;
- drmInfo.front_offset = info->frontOffset;
- drmInfo.front_pitch = info->frontPitch * cpp;
- drmInfo.back_offset = info->backOffset;
- drmInfo.back_pitch = info->backPitch * cpp;
- drmInfo.depth_offset = info->depthOffset;
- drmInfo.depth_pitch = info->depthPitch * cpp;
- drmInfo.ring_offset = info->ringHandle;
- drmInfo.ring_rptr_offset = info->ringReadPtrHandle;
- drmInfo.buffers_offset = info->bufHandle;
- drmInfo.gart_textures_offset = info->gartTexHandle;
-
- ret = drmCommandWrite(disp->drmFD, DRM_RADEON_CP_INIT, &drmInfo,
- sizeof(drm_radeon_init_t));
-
- return ret >= 0;
-}
-
-
-/**
- * \brief Add a map for the vertex buffers that will be accessed by any
- * DRI-based clients.
- *
- * \param ctx display handle.
- * \param info driver private data.
- *
- * \return one on success, or zero on failure.
- *
- * Calls drmAddBufs() with the previously allocated vertex buffers.
- */
-static int RADEONDRIBufInit( driDisplay *disp, RADEONInfoPtr info )
-{
- /* Initialize vertex buffers */
- info->bufNumBufs = drmAddBufs(disp->drmFD,
- info->bufMapSize / RADEON_BUFFER_SIZE,
- RADEON_BUFFER_SIZE,
- (disp->card_type!=RADEON_CARD_AGP) ? DRM_SG_BUFFER : DRM_AGP_BUFFER,
- info->bufStart);
-
- if (info->bufNumBufs <= 0) {
- fprintf(stderr,
- "[drm] Could not create vertex/indirect buffers list\n");
- return 0;
- }
- fprintf(stderr,
- "[drm] Added %d %d byte vertex/indirect buffers\n",
- info->bufNumBufs, RADEON_BUFFER_SIZE);
-
- return 1;
-}
-
-
-/**
- * \brief Install an IRQ handler.
- *
- * \param disp display handle.
- * \param info driver private data.
- *
- * Attempts to install an IRQ handler via drmCtlInstHandler(), falling back to
- * IRQ-free operation on failure.
- */
-static void RADEONDRIIrqInit(driDisplay *disp, RADEONInfoPtr info)
-{
- if ((drmCtlInstHandler(disp->drmFD, 0)) != 0)
- fprintf(stderr, "[drm] failure adding irq handler, "
- "there is a device already using that irq\n"
- "[drm] falling back to irq-free operation\n");
-}
-
-
-/**
- * \brief Initialize the AGP heap.
- *
- * \param disp display handle.
- * \param info driver private data.
- *
- * This function is a wrapper around the DRM_RADEON_INIT_HEAP command, passing
- * all the parameters in a drm_radeon_mem_init_heap structure.
- */
-static void RADEONDRIAgpHeapInit(driDisplay *disp,
- RADEONInfoPtr info)
-{
- drm_radeon_mem_init_heap_t drmHeap;
-
- /* Start up the simple memory manager for gart space */
- drmHeap.region = RADEON_MEM_REGION_GART;
- drmHeap.start = 0;
- drmHeap.size = info->gartTexMapSize;
-
- if (drmCommandWrite(disp->drmFD, DRM_RADEON_INIT_HEAP,
- &drmHeap, sizeof(drmHeap))) {
- fprintf(stderr,
- "[drm] Failed to initialized gart heap manager\n");
- } else {
- fprintf(stderr,
- "[drm] Initialized kernel gart heap manager, %d\n",
- info->gartTexMapSize);
- }
-}
-
-static int RADEONGetCardType(driDisplay *disp, RADEONInfoPtr info)
-{
- drm_radeon_getparam_t gp;
- int ret;
-
- gp.param = RADEON_PARAM_CARD_TYPE;
- gp.value = &disp->card_type;
-
- ret=drmCommandWriteRead(disp->drmFD, DRM_RADEON_GETPARAM, &gp, sizeof(gp));
- if (ret) {
- fprintf(stderr, "drm_radeon_getparam_t (RADEON_PARAM_CARD_TYPE) : %d\n", ret);
- return -1;
- }
-
- return disp->card_type;
-}
-
-/**
- * Called at the start of each server generation.
- *
- * \param disp display handle.
- * \param info driver private data.
- *
- * \return non-zero on success, or zero on failure.
- *
- * Performs static frame buffer allocation. Opens the DRM device and add maps
- * to the SAREA, framebuffer and MMIO regions. Fills in \p info with more
- * information. Creates a \e server context to grab the lock for the
- * initialization ioctls and calls the other initilization functions in this
- * file. Starts the CP engine via the DRM_RADEON_CP_START command.
- *
- * Setups a RADEONDRIRec structure to be passed to radeon_dri.so for its
- * initialization.
- */
-static int
-RADEONScreenInit( driDisplay *disp, RADEONInfoPtr info,
- RADEONDRIPtr pRADEONDRI)
-{
- int i, err;
-
- /* XXX this probably isn't needed here */
- {
- int width_bytes = (disp->virtualWidth * disp->cpp);
- int maxy = disp->fbSize / width_bytes;
-
- if (maxy <= disp->virtualHeight * 3) {
- _eglLog(_EGL_WARNING,
- "Static buffer allocation failed -- "
- "need at least %d kB video memory (have %d kB)\n",
- (disp->virtualWidth * disp->virtualHeight *
- disp->cpp * 3 + 1023) / 1024,
- disp->fbSize / 1024);
- return 0;
- }
- }
-
- /* Memory manager setup */
- if (!RADEONMemoryInit(disp, info)) {
- return 0;
- }
-
- /* Create a 'server' context so we can grab the lock for
- * initialization ioctls.
- */
- if ((err = drmCreateContext(disp->drmFD, &disp->serverContext)) != 0) {
- _eglLog(_EGL_WARNING, "%s: drmCreateContext failed %d\n",
- __FUNCTION__, err);
- return 0;
- }
-
- DRM_LOCK(disp->drmFD, disp->pSAREA, disp->serverContext, 0);
-
- /* Initialize the kernel data structures */
- if (!RADEONDRIKernelInit(disp, info)) {
- _eglLog(_EGL_WARNING, "RADEONDRIKernelInit failed\n");
- DRM_UNLOCK(disp->drmFD, disp->pSAREA, disp->serverContext);
- return 0;
- }
-
- /* Initialize the vertex buffers list */
- if (!RADEONDRIBufInit(disp, info)) {
- fprintf(stderr, "RADEONDRIBufInit failed\n");
- DRM_UNLOCK(disp->drmFD, disp->pSAREA, disp->serverContext);
- return 0;
- }
-
- /* Initialize IRQ */
- RADEONDRIIrqInit(disp, info);
-
- /* Initialize kernel gart memory manager */
- RADEONDRIAgpHeapInit(disp, info);
-
- /* Initialize the SAREA private data structure */
- {
- drm_radeon_sarea_t *pSAREAPriv;
- pSAREAPriv = (drm_radeon_sarea_t *)(((char*)disp->pSAREA) +
- sizeof(drm_sarea_t));
- memset(pSAREAPriv, 0, sizeof(*pSAREAPriv));
- pSAREAPriv->pfState = info->page_flip_enable;
- }
-
- for ( i = 0;; i++ ) {
- drmMapType type;
- drmMapFlags flags;
- drm_handle_t handle, offset;
- drmSize size;
- int rc, mtrr;
-
- if ( ( rc = drmGetMap( disp->drmFD, i, &offset, &size, &type, &flags, &handle, &mtrr ) ) != 0 )
- break;
- if ( type == DRM_REGISTERS ) {
- pRADEONDRI->registerHandle = offset;
- pRADEONDRI->registerSize = size;
- break;
- }
- }
- /* Quick hack to clear the front & back buffers. Could also use
- * the clear ioctl to do this, but would need to setup hw state
- * first.
- */
- drimemsetio((char *)disp->pFB + info->frontOffset,
- 0xEE,
- info->frontPitch * disp->cpp * disp->virtualHeight );
-
- drimemsetio((char *)disp->pFB + info->backOffset,
- 0x30,
- info->backPitch * disp->cpp * disp->virtualHeight );
-
-
- /* This is the struct passed to radeon_dri.so for its initialization */
- pRADEONDRI->deviceID = info->Chipset;
- pRADEONDRI->width = disp->virtualWidth;
- pRADEONDRI->height = disp->virtualHeight;
- pRADEONDRI->depth = disp->bpp; /* XXX: depth */
- pRADEONDRI->bpp = disp->bpp;
- pRADEONDRI->IsPCI = (disp->card_type != RADEON_CARD_AGP);;
- pRADEONDRI->frontOffset = info->frontOffset;
- pRADEONDRI->frontPitch = info->frontPitch;
- pRADEONDRI->backOffset = info->backOffset;
- pRADEONDRI->backPitch = info->backPitch;
- pRADEONDRI->depthOffset = info->depthOffset;
- pRADEONDRI->depthPitch = info->depthPitch;
- pRADEONDRI->textureOffset = info->textureOffset;
- pRADEONDRI->textureSize = info->textureSize;
- pRADEONDRI->log2TexGran = info->log2TexGran;
- pRADEONDRI->statusHandle = info->ringReadPtrHandle;
- pRADEONDRI->statusSize = info->ringReadMapSize;
- pRADEONDRI->gartTexHandle = info->gartTexHandle;
- pRADEONDRI->gartTexMapSize = info->gartTexMapSize;
- pRADEONDRI->log2GARTTexGran = info->log2GARTTexGran;
- pRADEONDRI->gartTexOffset = info->gartTexStart;
- pRADEONDRI->sarea_priv_offset = sizeof(drm_sarea_t);
-
- /* Don't release the lock now - let the VT switch handler do it. */
-
- return 1;
-}
-
-
-/**
- * \brief Get Radeon chip family from chipset number.
- *
- * \param info driver private data.
- *
- * \return non-zero on success, or zero on failure.
- *
- * Called by radeonInitFBDev() to set RADEONInfoRec::ChipFamily
- * according to the value of RADEONInfoRec::Chipset. Fails if the
- * chipset is unrecognized or not appropriate for this driver (i.e., not
- * an r100 style radeon)
- */
-static int get_chipfamily_from_chipset( RADEONInfoPtr info )
-{
- switch (info->Chipset) {
- case PCI_CHIP_RADEON_LY:
- case PCI_CHIP_RADEON_LZ:
- info->ChipFamily = CHIP_FAMILY_M6;
- break;
-
- case PCI_CHIP_RADEON_QY:
- case PCI_CHIP_RADEON_QZ:
- info->ChipFamily = CHIP_FAMILY_VE;
- break;
-
- case PCI_CHIP_R200_QL:
- case PCI_CHIP_R200_QN:
- case PCI_CHIP_R200_QO:
- case PCI_CHIP_R200_Ql:
- case PCI_CHIP_R200_BB:
- info->ChipFamily = CHIP_FAMILY_R200;
- break;
-
- case PCI_CHIP_RV200_QW: /* RV200 desktop */
- case PCI_CHIP_RV200_QX:
- info->ChipFamily = CHIP_FAMILY_RV200;
- break;
-
- case PCI_CHIP_RADEON_LW:
- case PCI_CHIP_RADEON_LX:
- info->ChipFamily = CHIP_FAMILY_M7;
- break;
-
- case PCI_CHIP_RV250_Id:
- case PCI_CHIP_RV250_Ie:
- case PCI_CHIP_RV250_If:
- case PCI_CHIP_RV250_Ig:
- info->ChipFamily = CHIP_FAMILY_RV250;
- break;
-
- case PCI_CHIP_RV250_Ld:
- case PCI_CHIP_RV250_Le:
- case PCI_CHIP_RV250_Lf:
- case PCI_CHIP_RV250_Lg:
- info->ChipFamily = CHIP_FAMILY_M9;
- break;
-
- case PCI_CHIP_RV280_Y_:
- case PCI_CHIP_RV280_Ya:
- case PCI_CHIP_RV280_Yb:
- case PCI_CHIP_RV280_Yc:
- info->ChipFamily = CHIP_FAMILY_RV280;
- break;
-
- case PCI_CHIP_R300_ND:
- case PCI_CHIP_R300_NE:
- case PCI_CHIP_R300_NF:
- case PCI_CHIP_R300_NG:
- info->ChipFamily = CHIP_FAMILY_R300;
- break;
-
- case PCI_CHIP_RV370_5460:
- info->ChipFamily = CHIP_FAMILY_RV380;
- break;
-
- default:
- /* Original Radeon/7200 */
- info->ChipFamily = CHIP_FAMILY_RADEON;
- }
-
- return 1;
-}
-
-
-/**
- * \brief Initialize the framebuffer device mode
- *
- * \param disp display handle.
- *
- * \return one on success, or zero on failure.
- *
- * Fills in \p info with some default values and some information from \p disp
- * and then calls RADEONScreenInit() for the screen initialization.
- *
- * Before exiting clears the framebuffer memory accessing it directly.
- */
-static int radeonInitFBDev( driDisplay *disp, RADEONDRIPtr pRADEONDRI )
-{
- int err;
- RADEONInfoPtr info = calloc(1, sizeof(*info));
-
- disp->driverPrivate = (void *)info;
-
- info->gartFastWrite = RADEON_DEFAULT_AGP_FAST_WRITE;
- info->gartSize = RADEON_DEFAULT_AGP_SIZE;
- info->gartTexSize = RADEON_DEFAULT_AGP_TEX_SIZE;
- info->bufSize = RADEON_DEFAULT_BUFFER_SIZE;
- info->ringSize = RADEON_DEFAULT_RING_SIZE;
- info->page_flip_enable = RADEON_DEFAULT_PAGE_FLIP;
-
- fprintf(stderr,
- "Using %d MB AGP aperture\n", info->gartSize);
- fprintf(stderr,
- "Using %d MB for the ring buffer\n", info->ringSize);
- fprintf(stderr,
- "Using %d MB for vertex/indirect buffers\n", info->bufSize);
- fprintf(stderr,
- "Using %d MB for AGP textures\n", info->gartTexSize);
- fprintf(stderr,
- "page flipping %sabled\n", info->page_flip_enable?"en":"dis");
-
- info->Chipset = disp->chipset;
-
- if (!get_chipfamily_from_chipset( info )) {
- fprintf(stderr, "Unknown or non-radeon chipset -- cannot continue\n");
- fprintf(stderr, "==> Verify PCI BusID is correct in miniglx.conf\n");
- return 0;
- }
-#if 0
- if (info->ChipFamily >= CHIP_FAMILY_R300) {
- fprintf(stderr,
- "Direct rendering not yet supported on "
- "Radeon 9700 and newer cards\n");
- return 0;
- }
-#endif
-
-#if 00
- /* don't seem to need this here */
- info->frontPitch = disp->virtualWidth;
-#endif
-
- /* Check the radeon DRM version */
- if (!RADEONCheckDRMVersion(disp, info)) {
- return 0;
- }
-
- if (RADEONGetCardType(disp, info)<0)
- return 0;
-
- if (disp->card_type!=RADEON_CARD_AGP) {
- /* Initialize PCI */
- if (!RADEONDRIPciInit(disp, info))
- return 0;
- }
- else {
- /* Initialize AGP */
- if (!RADEONDRIAgpInit(disp, info))
- return 0;
- }
-
- if (!RADEONScreenInit( disp, info, pRADEONDRI))
- return 0;
-
- /* Initialize and start the CP if required */
- if ((err = drmCommandNone(disp->drmFD, DRM_RADEON_CP_START)) != 0) {
- fprintf(stderr, "%s: CP start %d\n", __FUNCTION__, err);
- return 0;
- }
-
- return 1;
-}
-
-
-/**
- * Create list of all supported surface configs, attach list to the display.
- */
-static EGLBoolean
-radeonFillInConfigs(_EGLDisplay *disp, unsigned pixel_bits,
- unsigned depth_bits,
- unsigned stencil_bits, GLboolean have_back_buffer)
-{
- _EGLConfig *configs;
- _EGLConfig *c;
- unsigned int i, num_configs;
- unsigned int depth_buffer_factor;
- unsigned int back_buffer_factor;
- GLenum fb_format;
- GLenum fb_type;
-
- /* Right now GLX_SWAP_COPY_OML isn't supported, but it would be easy
- * enough to add support. Basically, if a context is created with an
- * fbconfig where the swap method is GLX_SWAP_COPY_OML, pageflipping
- * will never be used.
- */
- static const GLenum back_buffer_modes[] = {
- GLX_NONE, GLX_SWAP_UNDEFINED_OML /*, GLX_SWAP_COPY_OML */
- };
-
- uint8_t depth_bits_array[2];
- uint8_t stencil_bits_array[2];
-
- depth_bits_array[0] = depth_bits;
- depth_bits_array[1] = depth_bits;
-
- /* Just like with the accumulation buffer, always provide some modes
- * with a stencil buffer. It will be a sw fallback, but some apps won't
- * care about that.
- */
- stencil_bits_array[0] = 0;
- stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
-
- depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
- back_buffer_factor = (have_back_buffer) ? 2 : 1;
-
- num_configs = depth_buffer_factor * back_buffer_factor * 2;
-
- if (pixel_bits == 16) {
- fb_format = GL_RGB;
- fb_type = GL_UNSIGNED_SHORT_5_6_5;
- } else {
- fb_format = GL_RGBA;
- fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
- }
-
- configs = calloc(sizeof(*configs), num_configs);
- c = configs;
- if (!_eglFillInConfigs(c, fb_format, fb_type,
- depth_bits_array, stencil_bits_array,
- depth_buffer_factor,
- back_buffer_modes, back_buffer_factor,
- GLX_TRUE_COLOR)) {
- fprintf(stderr, "[%s:%u] Error creating FBConfig!\n",
- __func__, __LINE__);
- return EGL_FALSE;
- }
-
- /* Mark the visual as slow if there are "fake" stencil bits.
- */
- for (i = 0, c = configs; i < num_configs; i++, c++) {
- int stencil = GET_CONFIG_ATTRIB(c, EGL_STENCIL_SIZE);
- if ((stencil != 0) && (stencil != stencil_bits)) {
- SET_CONFIG_ATTRIB(c, EGL_CONFIG_CAVEAT, EGL_SLOW_CONFIG);
- }
- }
-
- for (i = 0, c = configs; i < num_configs; i++, c++)
- _eglAddConfig(disp, c);
-
- free(configs);
-
- return EGL_TRUE;
-}
-
-
-/**
- * Show the given surface on the named screen.
- * If surface is EGL_NO_SURFACE, disable the screen's output.
- */
-static EGLBoolean
-radeonShowScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen,
- EGLSurface surface, EGLModeMESA m)
-{
- EGLBoolean b = _eglDRIShowScreenSurfaceMESA(drv, dpy, screen, surface, m);
- return b;
-}
-
-
-/**
- * Called via eglInitialize() by user.
- */
-static EGLBoolean
-radeonInitialize(_EGLDriver *drv, EGLDisplay dpy, EGLint *major, EGLint *minor)
-{
- __DRIframebuffer framebuffer;
- driDisplay *display;
-
- /* one-time init */
- radeon_drm_page_size = getpagesize();
-
- if (!_eglDRIInitialize(drv, dpy, major, minor))
- return EGL_FALSE;
-
- display = Lookup_driDisplay(dpy);
-
- framebuffer.dev_priv_size = sizeof(RADEONDRIRec);
- framebuffer.dev_priv = malloc(sizeof(RADEONDRIRec));
-
- /* XXX we shouldn't hard-code values here! */
- /* we won't know the screen surface size until the user calls
- * eglCreateScreenSurfaceMESA().
- */
-#if 0
- display->virtualWidth = 1024;
- display->virtualHeight = 768;
-#else
- display->virtualWidth = 1280;
- display->virtualHeight = 1024;
-#endif
- display->bpp = 32;
- display->cpp = 4;
-
- if (!_eglDRIGetDisplayInfo(display))
- return EGL_FALSE;
-
- framebuffer.base = display->pFB;
- framebuffer.width = display->virtualWidth;
- framebuffer.height = display->virtualHeight;
- framebuffer.stride = display->virtualWidth;
- framebuffer.size = display->fbSize;
- radeonInitFBDev( display, framebuffer.dev_priv );
-
- if (!_eglDRICreateDisplay(display, &framebuffer))
- return EGL_FALSE;
-
- if (!_eglDRICreateScreens(display))
- return EGL_FALSE;
-
- /* create a variety of both 32 and 16-bit configurations */
- radeonFillInConfigs(&display->Base, 32, 24, 8, GL_TRUE);
- radeonFillInConfigs(&display->Base, 16, 16, 0, GL_TRUE);
-
- drv->Initialized = EGL_TRUE;
- return EGL_TRUE;
-}
-
-
-/**
- * The bootstrap function. Return a new radeonDriver object and
- * plug in API functions.
- */
-_EGLDriver *
-_eglMain(_EGLDisplay *dpy)
-{
- radeonDriver *radeon;
-
- radeon = (radeonDriver *) calloc(1, sizeof(*radeon));
- if (!radeon) {
- return NULL;
- }
-
- /* First fill in the dispatch table with defaults */
- _eglDRIInitDriverFallbacks(&radeon->Base);
-
- /* then plug in our radeon-specific functions */
- radeon->Base.API.Initialize = radeonInitialize;
- radeon->Base.API.ShowScreenSurfaceMESA = radeonShowScreenSurfaceMESA;
-
- return &radeon->Base;
-}
diff --git a/src/mesa/drivers/dri/radeon/server/radeon_reg.h b/src/mesa/drivers/dri/radeon/server/radeon_reg.h
index e81d7fdcd0e..1b33de1edf7 100644
--- a/src/mesa/drivers/dri/radeon/server/radeon_reg.h
+++ b/src/mesa/drivers/dri/radeon/server/radeon_reg.h
@@ -1959,7 +1959,30 @@
#define RADEON_SE_ZBIAS_FACTOR 0x1db0
#define RADEON_SE_ZBIAS_CONSTANT 0x1db4
-
+#define RADEON_SE_VTX_FMT 0x2080
+# define RADEON_SE_VTX_FMT_XY 0x00000000
+# define RADEON_SE_VTX_FMT_W0 0x00000001
+# define RADEON_SE_VTX_FMT_FPCOLOR 0x00000002
+# define RADEON_SE_VTX_FMT_FPALPHA 0x00000004
+# define RADEON_SE_VTX_FMT_PKCOLOR 0x00000008
+# define RADEON_SE_VTX_FMT_FPSPEC 0x00000010
+# define RADEON_SE_VTX_FMT_FPFOG 0x00000020
+# define RADEON_SE_VTX_FMT_PKSPEC 0x00000040
+# define RADEON_SE_VTX_FMT_ST0 0x00000080
+# define RADEON_SE_VTX_FMT_ST1 0x00000100
+# define RADEON_SE_VTX_FMT_Q1 0x00000200
+# define RADEON_SE_VTX_FMT_ST2 0x00000400
+# define RADEON_SE_VTX_FMT_Q2 0x00000800
+# define RADEON_SE_VTX_FMT_ST3 0x00001000
+# define RADEON_SE_VTX_FMT_Q3 0x00002000
+# define RADEON_SE_VTX_FMT_Q0 0x00004000
+# define RADEON_SE_VTX_FMT_BLND_WEIGHT_CNT_MASK 0x00038000
+# define RADEON_SE_VTX_FMT_N0 0x00040000
+# define RADEON_SE_VTX_FMT_XY1 0x08000000
+# define RADEON_SE_VTX_FMT_Z1 0x10000000
+# define RADEON_SE_VTX_FMT_W1 0x20000000
+# define RADEON_SE_VTX_FMT_N1 0x40000000
+# define RADEON_SE_VTX_FMT_Z 0x80000000
/* Registers for CP and Microcode Engine */
#define RADEON_CP_ME_RAM_ADDR 0x07d4
diff --git a/src/mesa/drivers/dri/savage/savage_init.h b/src/mesa/drivers/dri/savage/savage_init.h
index abb8440fc4c..bfd3077d70c 100644
--- a/src/mesa/drivers/dri/savage/savage_init.h
+++ b/src/mesa/drivers/dri/savage/savage_init.h
@@ -66,7 +66,7 @@ typedef struct {
unsigned int logTextureGranularity[SAVAGE_NR_TEX_HEAPS];
drmAddress texVirtual[SAVAGE_NR_TEX_HEAPS];
- __DRIscreenPrivate *driScrnPriv;
+ __DRIscreen *driScrnPriv;
savageRegion aperture;
savageRegion agpTextures;
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index d307b81e8ec..8e879ca41c0 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -168,7 +168,7 @@ PUBLIC const __DRIextension *savageScreenExtensions[] = {
};
static GLboolean
-savageInitDriver(__DRIscreenPrivate *sPriv)
+savageInitDriver(__DRIscreen *sPriv)
{
savageScreenPrivate *savageScreen;
SAVAGEDRIPtr gDRIPriv = (SAVAGEDRIPtr)sPriv->pDevPriv;
@@ -272,7 +272,7 @@ savageInitDriver(__DRIscreenPrivate *sPriv)
/* Accessed by dlsym from dri_mesa_init.c
*/
static void
-savageDestroyScreen(__DRIscreenPrivate *sPriv)
+savageDestroyScreen(__DRIscreen *sPriv)
{
savageScreenPrivate *savageScreen = (savageScreenPrivate *)sPriv->private;
@@ -288,12 +288,12 @@ savageDestroyScreen(__DRIscreenPrivate *sPriv)
static GLboolean
savageCreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
GLcontext *ctx, *shareCtx;
savageContextPtr imesa;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
struct dd_function_table functions;
savageScreenPrivate *savageScreen = (savageScreenPrivate *)sPriv->private;
drm_savage_sarea_t *saPriv=(drm_savage_sarea_t *)(((char*)sPriv->pSAREA)+
@@ -546,7 +546,7 @@ savageCreateContext( const __GLcontextModes *mesaVis,
}
static void
-savageDestroyContext(__DRIcontextPrivate *driContextPriv)
+savageDestroyContext(__DRIcontext *driContextPriv)
{
savageContextPtr imesa = (savageContextPtr) driContextPriv->driverPrivate;
GLuint i;
@@ -580,8 +580,8 @@ savageDestroyContext(__DRIcontextPrivate *driContextPriv)
static GLboolean
-savageCreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+savageCreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap)
{
@@ -675,13 +675,13 @@ savageCreateBuffer( __DRIscreenPrivate *driScrnPriv,
}
static void
-savageDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+savageDestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
#if 0
-void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv)
+void XMesaSwapBuffers(__DRIdrawable *driDrawPriv)
{
/* XXX should do swap according to the buffer, not the context! */
savageContextPtr imesa = savageCtx;
@@ -694,7 +694,7 @@ void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv)
void savageXMesaSetClipRects(savageContextPtr imesa)
{
- __DRIdrawablePrivate *dPriv = imesa->driDrawable;
+ __DRIdrawable *dPriv = imesa->driDrawable;
if ((dPriv->numBackClipRects == 0)
|| (imesa->glCtx->DrawBuffer->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT)) {
@@ -715,8 +715,8 @@ void savageXMesaSetClipRects(savageContextPtr imesa)
static void savageXMesaWindowMoved( savageContextPtr imesa )
{
- __DRIdrawablePrivate *const drawable = imesa->driDrawable;
- __DRIdrawablePrivate *const readable = imesa->driReadable;
+ __DRIdrawable *const drawable = imesa->driDrawable;
+ __DRIdrawable *const readable = imesa->driReadable;
if (0)
fprintf(stderr, "savageXMesaWindowMoved\n\n");
@@ -731,7 +731,7 @@ static void savageXMesaWindowMoved( savageContextPtr imesa )
static GLboolean
-savageUnbindContext(__DRIcontextPrivate *driContextPriv)
+savageUnbindContext(__DRIcontext *driContextPriv)
{
savageContextPtr savage = (savageContextPtr) driContextPriv->driverPrivate;
if (savage)
@@ -742,7 +742,7 @@ savageUnbindContext(__DRIcontextPrivate *driContextPriv)
#if 0
static GLboolean
-savageOpenFullScreen(__DRIcontextPrivate *driContextPriv)
+savageOpenFullScreen(__DRIcontext *driContextPriv)
{
@@ -761,7 +761,7 @@ savageOpenFullScreen(__DRIcontextPrivate *driContextPriv)
}
static GLboolean
-savageCloseFullScreen(__DRIcontextPrivate *driContextPriv)
+savageCloseFullScreen(__DRIcontext *driContextPriv)
{
if (driContextPriv) {
@@ -777,9 +777,9 @@ savageCloseFullScreen(__DRIcontextPrivate *driContextPriv)
#endif
static GLboolean
-savageMakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv)
+savageMakeCurrent(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv)
{
if (driContextPriv) {
savageContextPtr imesa
@@ -816,9 +816,9 @@ savageMakeCurrent(__DRIcontextPrivate *driContextPriv,
void savageGetLock( savageContextPtr imesa, GLuint flags )
{
- __DRIdrawablePrivate *const drawable = imesa->driDrawable;
- __DRIdrawablePrivate *const readable = imesa->driReadable;
- __DRIscreenPrivate *sPriv = imesa->driScreen;
+ __DRIdrawable *const drawable = imesa->driDrawable;
+ __DRIdrawable *const readable = imesa->driReadable;
+ __DRIscreen *sPriv = imesa->driScreen;
drm_savage_sarea_t *sarea = imesa->sarea;
int me = imesa->hHWContext;
int stamp = drawable->lastStamp;
@@ -883,7 +883,7 @@ void savageGetLock( savageContextPtr imesa, GLuint flags )
}
static const __DRIconfig **
-savageFillInModes( __DRIscreenPrivate *psp,
+savageFillInModes( __DRIscreen *psp,
unsigned pixel_bits, unsigned depth_bits,
unsigned stencil_bits, GLboolean have_back_buffer )
{
@@ -967,7 +967,7 @@ savageFillInModes( __DRIscreenPrivate *psp,
* \return the __GLcontextModes supported by this driver
*/
static const __DRIconfig **
-savageInitScreen(__DRIscreenPrivate *psp)
+savageInitScreen(__DRIscreen *psp)
{
static const __DRIversion ddx_expected = { 2, 0, 0 };
static const __DRIversion dri_expected = { 4, 0, 0 };
@@ -1001,3 +1001,10 @@ const struct __DriverAPIRec driDriverAPI = {
savageMakeCurrent,
savageUnbindContext
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/savage/savagecontext.h b/src/mesa/drivers/dri/savage/savagecontext.h
index 53a37db1cbc..ba1e6e1e1ad 100644
--- a/src/mesa/drivers/dri/savage/savagecontext.h
+++ b/src/mesa/drivers/dri/savage/savagecontext.h
@@ -271,10 +271,10 @@ struct savage_context_t {
drm_hw_lock_t *driHwLock;
GLuint driFd;
- __DRIdrawablePrivate *driDrawable;
- __DRIdrawablePrivate *driReadable;
+ __DRIdrawable *driDrawable;
+ __DRIdrawable *driReadable;
- __DRIscreenPrivate *driScreen;
+ __DRIscreen *driScreen;
savageScreenPrivate *savageScreen;
drm_savage_sarea_t *sarea;
diff --git a/src/mesa/drivers/dri/savage/savageioctl.c b/src/mesa/drivers/dri/savage/savageioctl.c
index 624d6af5e8e..9e181ce3be9 100644
--- a/src/mesa/drivers/dri/savage/savageioctl.c
+++ b/src/mesa/drivers/dri/savage/savageioctl.c
@@ -358,15 +358,15 @@ static void savageDDClear( GLcontext *ctx, GLbitfield mask )
depthMask = 0;
switch (imesa->savageScreen->cpp) {
case 2:
- colorMask = PACK_COLOR_565(ctx->Color.ColorMask[0],
- ctx->Color.ColorMask[1],
- ctx->Color.ColorMask[2]);
+ colorMask = PACK_COLOR_565(ctx->Color.ColorMask[0][0],
+ ctx->Color.ColorMask[0][1],
+ ctx->Color.ColorMask[0][2]);
break;
case 4:
- colorMask = PACK_COLOR_8888(ctx->Color.ColorMask[3],
- ctx->Color.ColorMask[2],
- ctx->Color.ColorMask[1],
- ctx->Color.ColorMask[0]);
+ colorMask = PACK_COLOR_8888(ctx->Color.ColorMask[0][3],
+ ctx->Color.ColorMask[0][2],
+ ctx->Color.ColorMask[0][1],
+ ctx->Color.ColorMask[0][0]);
break;
}
@@ -431,7 +431,7 @@ static void savageDDClear( GLcontext *ctx, GLbitfield mask )
/*
* Copy the back buffer to the front buffer.
*/
-void savageSwapBuffers( __DRIdrawablePrivate *dPriv )
+void savageSwapBuffers( __DRIdrawable *dPriv )
{
savageContextPtr imesa;
@@ -535,7 +535,7 @@ void savageFlushVertices( savageContextPtr imesa )
void savageFlushCmdBufLocked( savageContextPtr imesa, GLboolean discard )
{
- __DRIdrawablePrivate *dPriv = imesa->driDrawable;
+ __DRIdrawable *dPriv = imesa->driDrawable;
if (!imesa->dmaVtxBuf.total)
discard = GL_FALSE;
diff --git a/src/mesa/drivers/dri/savage/savageioctl.h b/src/mesa/drivers/dri/savage/savageioctl.h
index 639605cc517..e7e80816c10 100644
--- a/src/mesa/drivers/dri/savage/savageioctl.h
+++ b/src/mesa/drivers/dri/savage/savageioctl.h
@@ -39,7 +39,7 @@ void savageFlushCmdBuf( savageContextPtr imesa, GLboolean discard );
void savageDDInitIoctlFuncs( GLcontext *ctx );
-void savageSwapBuffers( __DRIdrawablePrivate *dPriv );
+void savageSwapBuffers( __DRIdrawable *dPriv );
#define WAIT_IDLE_EMPTY(imesa) do { \
if (SAVAGE_DEBUG & DEBUG_VERBOSE_MSG) \
diff --git a/src/mesa/drivers/dri/savage/savagerender.c b/src/mesa/drivers/dri/savage/savagerender.c
index d096dfe92fd..c369bb124c2 100644
--- a/src/mesa/drivers/dri/savage/savagerender.c
+++ b/src/mesa/drivers/dri/savage/savagerender.c
@@ -251,13 +251,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;
@@ -296,7 +296,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/savagespan.c b/src/mesa/drivers/dri/savage/savagespan.c
index c6818d31d68..0913dd1278c 100644
--- a/src/mesa/drivers/dri/savage/savagespan.c
+++ b/src/mesa/drivers/dri/savage/savagespan.c
@@ -33,7 +33,7 @@
#define LOCAL_VARS \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
- __DRIdrawablePrivate *const dPriv = drb->dPriv; \
+ __DRIdrawable *const dPriv = drb->dPriv; \
GLuint cpp = drb->cpp; \
GLuint pitch = drb->pitch; \
GLuint height = dPriv->h; \
@@ -43,7 +43,7 @@
#define LOCAL_DEPTH_VARS \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
- __DRIdrawablePrivate *const dPriv = drb->dPriv; \
+ __DRIdrawable *const dPriv = drb->dPriv; \
GLuint zpp = drb->cpp; \
GLuint pitch = drb->pitch; \
GLuint height = dPriv->h; \
diff --git a/src/mesa/drivers/dri/savage/savagetex.c b/src/mesa/drivers/dri/savage/savagetex.c
index e09e52bf002..394be44eac5 100644
--- a/src/mesa/drivers/dri/savage/savagetex.c
+++ b/src/mesa/drivers/dri/savage/savagetex.c
@@ -505,7 +505,7 @@ savageAllocTexObj( struct gl_texture_object *texObj )
savageSetTexWrapping(t,texObj->WrapS,texObj->WrapT);
savageSetTexFilter(t,texObj->MinFilter,texObj->MagFilter);
- savageSetTexBorderColor(t,texObj->BorderColor);
+ savageSetTexBorderColor(t,texObj->BorderColor.f);
}
return t;
@@ -2042,7 +2042,7 @@ static void savageTexParameter( GLcontext *ctx, GLenum target,
break;
case GL_TEXTURE_BORDER_COLOR:
- savageSetTexBorderColor(t,tObj->BorderColor);
+ savageSetTexBorderColor(t,tObj->BorderColor.f);
break;
default:
diff --git a/src/mesa/drivers/dri/savage/savagetris.c b/src/mesa/drivers/dri/savage/savagetris.c
index 8646200f7f5..a177a7d2b60 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_context.c b/src/mesa/drivers/dri/sis/sis_context.c
index b5586b74179..400681a04ab 100644
--- a/src/mesa/drivers/dri/sis/sis_context.c
+++ b/src/mesa/drivers/dri/sis/sis_context.c
@@ -159,11 +159,11 @@ void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer,
GLboolean
sisCreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
GLcontext *ctx, *shareCtx;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
sisContextPtr smesa;
sisScreenPtr sisScreen;
int i;
@@ -336,7 +336,7 @@ sisCreateContext( const __GLcontextModes *glVisual,
}
void
-sisDestroyContext ( __DRIcontextPrivate *driContextPriv )
+sisDestroyContext ( __DRIcontext *driContextPriv )
{
sisContextPtr smesa = (sisContextPtr)driContextPriv->driverPrivate;
@@ -364,9 +364,9 @@ sisDestroyContext ( __DRIcontextPrivate *driContextPriv )
}
GLboolean
-sisMakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv )
+sisMakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv )
{
if ( driContextPriv ) {
GET_CURRENT_CONTEXT(ctx);
@@ -395,7 +395,7 @@ sisMakeCurrent( __DRIcontextPrivate *driContextPriv,
}
GLboolean
-sisUnbindContext( __DRIcontextPrivate *driContextPriv )
+sisUnbindContext( __DRIcontext *driContextPriv )
{
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/sis/sis_context.h b/src/mesa/drivers/dri/sis/sis_context.h
index bc53cb5efa1..4179ee081a7 100644
--- a/src/mesa/drivers/dri/sis/sis_context.h
+++ b/src/mesa/drivers/dri/sis/sis_context.h
@@ -359,9 +359,9 @@ struct sis_context
/* Mirrors of some DRI state
*/
- __DRIcontextPrivate *driContext; /* DRI context */
- __DRIscreenPrivate *driScreen; /* DRI screen */
- __DRIdrawablePrivate *driDrawable; /* DRI drawable bound to this ctx */
+ __DRIcontext *driContext; /* DRI context */
+ __DRIscreen *driScreen; /* DRI screen */
+ __DRIdrawable *driDrawable; /* DRI drawable bound to this ctx */
unsigned int lastStamp; /* mirror driDrawable->lastStamp */
@@ -439,18 +439,18 @@ enum _sis_verbose {
};
extern GLboolean sisCreateContext( const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate );
-extern void sisDestroyContext( __DRIcontextPrivate * );
+extern void sisDestroyContext( __DRIcontext * );
void sisReAllocateBuffers(GLcontext *ctx, GLframebuffer *drawbuffer,
GLuint width, GLuint height);
-extern GLboolean sisMakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv );
+extern GLboolean sisMakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv );
-extern GLboolean sisUnbindContext( __DRIcontextPrivate *driContextPriv );
+extern GLboolean sisUnbindContext( __DRIcontext *driContextPriv );
void WaitEngIdle (sisContextPtr smesa);
void Wait2DEngIdle (sisContextPtr smesa);
diff --git a/src/mesa/drivers/dri/sis/sis_lock.c b/src/mesa/drivers/dri/sis/sis_lock.c
index 806110cad4d..b8ff4e31e25 100644
--- a/src/mesa/drivers/dri/sis/sis_lock.c
+++ b/src/mesa/drivers/dri/sis/sis_lock.c
@@ -46,8 +46,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
void
sisGetLock( sisContextPtr smesa, GLuint flags )
{
- __DRIdrawablePrivate *dPriv = smesa->driDrawable;
- __DRIscreenPrivate *sPriv = smesa->driScreen;
+ __DRIdrawable *dPriv = smesa->driDrawable;
+ __DRIscreen *sPriv = smesa->driScreen;
SISSAREAPrivPtr sarea = smesa->sarea;
drmGetLock( smesa->driFd, smesa->hHWContext, flags );
diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c
index f0e4e81a2b0..cb7ed8a08bb 100644
--- a/src/mesa/drivers/dri/sis/sis_screen.c
+++ b/src/mesa/drivers/dri/sis/sis_screen.c
@@ -64,7 +64,7 @@ static const GLuint __driNConfigOptions = 3;
extern const struct dri_extension card_extensions[];
static const __DRIconfig **
-sisFillInModes(__DRIscreenPrivate *psp, int bpp)
+sisFillInModes(__DRIscreen *psp, int bpp)
{
__DRIconfig **configs;
unsigned depth_buffer_factor;
@@ -116,7 +116,7 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp)
/* Create the device specific screen private data struct.
*/
static sisScreenPtr
-sisCreateScreen( __DRIscreenPrivate *sPriv )
+sisCreateScreen( __DRIscreen *sPriv )
{
sisScreenPtr sisScreen;
SISDRIPtr sisDRIPriv = (SISDRIPtr)sPriv->pDevPriv;
@@ -171,7 +171,7 @@ sisCreateScreen( __DRIscreenPrivate *sPriv )
/* Destroy the device specific screen private data struct.
*/
static void
-sisDestroyScreen( __DRIscreenPrivate *sPriv )
+sisDestroyScreen( __DRIscreen *sPriv )
{
sisScreenPtr sisScreen = (sisScreenPtr)sPriv->private;
@@ -191,8 +191,8 @@ sisDestroyScreen( __DRIscreenPrivate *sPriv )
* data.
*/
static GLboolean
-sisCreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+sisCreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -218,12 +218,12 @@ sisCreateBuffer( __DRIscreenPrivate *driScrnPriv,
static void
-sisDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+sisDestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
-static void sisCopyBuffer( __DRIdrawablePrivate *dPriv )
+static void sisCopyBuffer( __DRIdrawable *dPriv )
{
sisContextPtr smesa = (sisContextPtr)dPriv->driContextPriv->driverPrivate;
int i;
@@ -258,7 +258,7 @@ static void sisCopyBuffer( __DRIdrawablePrivate *dPriv )
/* Copy the back color buffer to the front color buffer */
static void
-sisSwapBuffers(__DRIdrawablePrivate *dPriv)
+sisSwapBuffers(__DRIdrawable *dPriv)
{
if (dPriv->driContextPriv && dPriv->driContextPriv->driverPrivate) {
sisContextPtr smesa = (sisContextPtr) dPriv->driContextPriv->driverPrivate;
@@ -283,7 +283,7 @@ sisSwapBuffers(__DRIdrawablePrivate *dPriv)
* \return the __GLcontextModes supported by this driver
*/
static const __DRIconfig **
-sisInitScreen(__DRIscreenPrivate *psp)
+sisInitScreen(__DRIscreen *psp)
{
static const __DRIversion ddx_expected = {0, 8, 0};
static const __DRIversion dri_expected = {4, 0, 0};
@@ -324,3 +324,10 @@ const struct __DriverAPIRec driDriverAPI = {
.SwapBuffersMSC = NULL
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/sis/sis_screen.h b/src/mesa/drivers/dri/sis/sis_screen.h
index 07c29cfa098..8009fecc31f 100644
--- a/src/mesa/drivers/dri/sis/sis_screen.h
+++ b/src/mesa/drivers/dri/sis/sis_screen.h
@@ -50,7 +50,7 @@ typedef struct {
int cpp;
unsigned int screenX, screenY;
- __DRIscreenPrivate *driScreen;
+ __DRIscreen *driScreen;
unsigned int sarea_priv_offset;
/* Configuration cache with default values for all contexts */
diff --git a/src/mesa/drivers/dri/sis/sis_span.c b/src/mesa/drivers/dri/sis/sis_span.c
index cfbb51007d1..008b00160e8 100644
--- a/src/mesa/drivers/dri/sis/sis_span.c
+++ b/src/mesa/drivers/dri/sis/sis_span.c
@@ -42,7 +42,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define LOCAL_VARS \
sisContextPtr smesa = SIS_CONTEXT(ctx); \
- __DRIdrawablePrivate *dPriv = smesa->driDrawable; \
+ __DRIdrawable *dPriv = smesa->driDrawable; \
struct sis_renderbuffer *srb = (struct sis_renderbuffer *) rb; \
GLuint pitch = srb->pitch; \
char *buf = srb->map; \
@@ -52,7 +52,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define LOCAL_DEPTH_VARS \
sisContextPtr smesa = SIS_CONTEXT(ctx); \
- __DRIdrawablePrivate *dPriv = smesa->driDrawable; \
+ __DRIdrawable *dPriv = smesa->driDrawable; \
struct sis_renderbuffer *srb = (struct sis_renderbuffer *) rb; \
char *buf = srb->map;
diff --git a/src/mesa/drivers/dri/sis/sis_texstate.c b/src/mesa/drivers/dri/sis/sis_texstate.c
index e96a2e880c9..7b0eebd066f 100644
--- a/src/mesa/drivers/dri/sis/sis_texstate.c
+++ b/src/mesa/drivers/dri/sis/sis_texstate.c
@@ -456,10 +456,10 @@ sis_set_texobj_parm( GLcontext *ctx, struct gl_texture_object *texObj,
{
GLubyte c[4];
- CLAMPED_FLOAT_TO_UBYTE(c[0], texObj->BorderColor[0]);
- CLAMPED_FLOAT_TO_UBYTE(c[1], texObj->BorderColor[1]);
- CLAMPED_FLOAT_TO_UBYTE(c[2], texObj->BorderColor[2]);
- CLAMPED_FLOAT_TO_UBYTE(c[3], texObj->BorderColor[3]);
+ CLAMPED_FLOAT_TO_UBYTE(c[0], texObj->BorderColor.f[0]);
+ CLAMPED_FLOAT_TO_UBYTE(c[1], texObj->BorderColor.f[1]);
+ CLAMPED_FLOAT_TO_UBYTE(c[2], texObj->BorderColor.f[2]);
+ CLAMPED_FLOAT_TO_UBYTE(c[3], texObj->BorderColor.f[3]);
current->texture[hw_unit].hwTextureBorderColor =
PACK_COLOR_8888(c[3], c[0], c[1], c[2]);
diff --git a/src/mesa/drivers/dri/sis/sis_tris.c b/src/mesa/drivers/dri/sis/sis_tris.c
index aaa23db308e..4b41d78d82a 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/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c
index e742d414a59..edb1875f767 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_context.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c
@@ -165,12 +165,12 @@ static const struct dri_debug_control debug_control[] =
};
GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
tdfxContextPtr fxMesa;
GLcontext *ctx, *shareCtx;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private;
TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) ((char *) sPriv->pSAREA +
sizeof(drm_sarea_t));
@@ -441,7 +441,7 @@ static GLboolean tdfxInitVertexFormats( tdfxContextPtr fxMesa )
* Initialize the state in an tdfxContextPtr struct.
*/
static GLboolean
-tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, tdfxContextPtr fxMesa )
+tdfxInitContext( __DRIdrawable *driDrawPriv, tdfxContextPtr fxMesa )
{
/* KW: Would be nice to make one of these a member of the other.
*/
@@ -563,7 +563,7 @@ tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, tdfxContextPtr fxMesa )
void
-tdfxDestroyContext( __DRIcontextPrivate *driContextPriv )
+tdfxDestroyContext( __DRIcontext *driContextPriv )
{
tdfxContextPtr fxMesa = (tdfxContextPtr) driContextPriv->driverPrivate;
@@ -607,7 +607,7 @@ tdfxDestroyContext( __DRIcontextPrivate *driContextPriv )
GLboolean
-tdfxUnbindContext( __DRIcontextPrivate *driContextPriv )
+tdfxUnbindContext( __DRIcontext *driContextPriv )
{
GET_CURRENT_CONTEXT(ctx);
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -626,9 +626,9 @@ tdfxUnbindContext( __DRIcontextPrivate *driContextPriv )
GLboolean
-tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv )
+tdfxMakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv )
{
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)driContextPriv );
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.h b/src/mesa/drivers/dri/tdfx/tdfx_context.h
index 3bcb5451193..6e25cac3015 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_context.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_context.h
@@ -892,18 +892,18 @@ struct tdfx_context {
char rendererString[100];
/* stuff added for DRI */
- __DRIscreenPrivate *driScreen;
- __DRIcontextPrivate *driContext;
+ __DRIscreen *driScreen;
+ __DRIcontext *driContext;
/**
* DRI drawable bound to this context for drawing.
*/
- __DRIdrawablePrivate *driDrawable;
+ __DRIdrawable *driDrawable;
/**
* DRI drawable bound to this context for reading.
*/
- __DRIdrawablePrivate *driReadable;
+ __DRIdrawable *driReadable;
drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
@@ -938,19 +938,19 @@ struct tdfx_context {
extern GLboolean
tdfxCreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate );
extern void
-tdfxDestroyContext( __DRIcontextPrivate *driContextPriv );
+tdfxDestroyContext( __DRIcontext *driContextPriv );
extern GLboolean
-tdfxUnbindContext( __DRIcontextPrivate *driContextPriv );
+tdfxUnbindContext( __DRIcontext *driContextPriv );
extern GLboolean
-tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv );
+tdfxMakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv );
extern GLboolean
tdfxInitGlide( tdfxContextPtr tmesa );
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_lock.c b/src/mesa/drivers/dri/tdfx/tdfx_lock.c
index c00f53700ed..f218e4ee576 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_lock.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_lock.c
@@ -44,10 +44,10 @@
void tdfxGetLock( tdfxContextPtr fxMesa )
{
- __DRIcontextPrivate *cPriv = fxMesa->driContext;
- __DRIdrawablePrivate *const drawable = cPriv->driDrawablePriv;
- __DRIdrawablePrivate *const readable = cPriv->driReadablePriv;
- __DRIscreenPrivate *sPriv = drawable->driScreenPriv;
+ __DRIcontext *cPriv = fxMesa->driContext;
+ __DRIdrawable *const drawable = cPriv->driDrawablePriv;
+ __DRIdrawable *const readable = cPriv->driReadablePriv;
+ __DRIscreen *sPriv = drawable->driScreenPriv;
TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) (((char *) sPriv->pSAREA) +
fxMesa->fxScreen->sarea_priv_offset);
unsigned int stamp = drawable->lastStamp;
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c
index c213e67970f..44496274188 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_pixels.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_pixels.c
@@ -494,7 +494,7 @@ tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y,
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
GrLfbInfo_t info;
- __DRIdrawablePrivate *const readable = fxMesa->driReadable;
+ __DRIdrawable *const readable = fxMesa->driReadable;
const GLint winX = readable->x;
const GLint winY = readable->y + readable->h - 1;
const GLint scrX = winX + x;
@@ -552,7 +552,7 @@ tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
GrLfbInfo_t info;
- __DRIdrawablePrivate *const readable = fxMesa->driReadable;
+ __DRIdrawable *const readable = fxMesa->driReadable;
const GLint winX = readable->x;
const GLint winY = readable->y + readable->h - 1;
const GLint scrX = winX + x;
@@ -610,10 +610,10 @@ tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
ctx->Fog.Enabled ||
ctx->Scissor.Enabled ||
ctx->Stencil._Enabled ||
- !ctx->Color.ColorMask[0] ||
- !ctx->Color.ColorMask[1] ||
- !ctx->Color.ColorMask[2] ||
- !ctx->Color.ColorMask[3] ||
+ !ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3] ||
ctx->Color.ColorLogicOpEnabled ||
ctx->Texture._EnabledUnits ||
fxMesa->Fallback)
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_render.c b/src/mesa/drivers/dri/tdfx/tdfx_render.c
index 2cd8e12d955..979bcd45140 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_render.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_render.c
@@ -76,8 +76,8 @@ static void tdfxClear( GLcontext *ctx, GLbitfield mask )
if (fxMesa->glCtx->Visual.redBits != 8) {
/* can only do color masking if running in 24/32bpp on Napalm */
- if (ctx->Color.ColorMask[RCOMP] != ctx->Color.ColorMask[GCOMP] ||
- ctx->Color.ColorMask[GCOMP] != ctx->Color.ColorMask[BCOMP]) {
+ if (ctx->Color.ColorMask[0][RCOMP] != ctx->Color.ColorMask[0][GCOMP] ||
+ ctx->Color.ColorMask[0][GCOMP] != ctx->Color.ColorMask[0][BCOMP]) {
softwareMask |= (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT));
mask &= ~(BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT);
}
@@ -556,7 +556,7 @@ static void uploadTextureImages( tdfxContextPtr fxMesa )
*/
void tdfxUploadClipping( tdfxContextPtr fxMesa )
{
- __DRIdrawablePrivate *dPriv = fxMesa->driDrawable;
+ __DRIdrawable *dPriv = fxMesa->driDrawable;
assert(dPriv);
@@ -721,7 +721,7 @@ void tdfxEmitHwStateLocked( tdfxContextPtr fxMesa )
fxMesa->Glide.grColorMask( fxMesa->Color.ColorMask[RCOMP] ||
fxMesa->Color.ColorMask[GCOMP] ||
fxMesa->Color.ColorMask[BCOMP],
- /*fxMesa->Color.ColorMask[ACOMP]*/GL_FALSE/*[dBorca] no-no*/ );
+ /*fxMesa->Color.ColorMask[0][ACOMP]*/GL_FALSE/*[dBorca] no-no*/ );
}
fxMesa->dirty &= ~TDFX_UPLOAD_COLOR_MASK;
}
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
index 9e5f2b88aea..9f6b35faa28 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c
@@ -68,7 +68,7 @@ static const __DRIextension *tdfxExtensions[] = {
static const GLuint __driNConfigOptions = 1;
static GLboolean
-tdfxCreateScreen( __DRIscreenPrivate *sPriv )
+tdfxCreateScreen( __DRIscreen *sPriv )
{
tdfxScreenPrivate *fxScreen;
TDFXDRIPtr fxDRIPriv = (TDFXDRIPtr) sPriv->pDevPriv;
@@ -119,7 +119,7 @@ tdfxCreateScreen( __DRIscreenPrivate *sPriv )
static void
-tdfxDestroyScreen( __DRIscreenPrivate *sPriv )
+tdfxDestroyScreen( __DRIscreen *sPriv )
{
tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private;
@@ -137,7 +137,7 @@ tdfxDestroyScreen( __DRIscreenPrivate *sPriv )
static GLboolean
-tdfxInitDriver( __DRIscreenPrivate *sPriv )
+tdfxInitDriver( __DRIscreen *sPriv )
{
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)sPriv );
@@ -153,8 +153,8 @@ tdfxInitDriver( __DRIscreenPrivate *sPriv )
static GLboolean
-tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+tdfxCreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -225,14 +225,14 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv,
static void
-tdfxDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+tdfxDestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static void
-tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
+tdfxSwapBuffers( __DRIdrawable *driDrawPriv )
{
GET_CURRENT_CONTEXT(ctx);
@@ -251,7 +251,7 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
* we have to do a glFinish (per the GLX spec).
*/
if ( ctx ) {
- __DRIdrawablePrivate *curDrawPriv;
+ __DRIdrawable *curDrawPriv;
fxMesa = TDFX_CONTEXT(ctx);
curDrawPriv = fxMesa->driContext->driDrawablePriv;
@@ -339,7 +339,7 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
}
static const __DRIconfig **
-tdfxFillInModes(__DRIscreenPrivate *psp,
+tdfxFillInModes(__DRIscreen *psp,
unsigned pixel_bits,
unsigned depth_bits,
unsigned stencil_bits,
@@ -438,3 +438,10 @@ const struct __DriverAPIRec driDriverAPI = {
.WaitForSBC = NULL,
.SwapBuffersMSC = NULL
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.h b/src/mesa/drivers/dri/tdfx/tdfx_screen.h
index 5a68898b369..6aa42e86674 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_screen.h
+++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.h
@@ -61,7 +61,7 @@ typedef struct {
int textureOffset;
int textureSize;
- __DRIscreenPrivate *driScrnPriv;
+ __DRIscreen *driScrnPriv;
unsigned int sarea_priv_offset;
/* Configuration cache with default values for all contexts */
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_span.c b/src/mesa/drivers/dri/tdfx/tdfx_span.c
index 6b38fa5a017..a17bcd952a1 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_span.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_span.c
@@ -47,7 +47,7 @@
#define LOCAL_VARS \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
- __DRIdrawablePrivate *const dPriv = drb->dPriv; \
+ __DRIdrawable *const dPriv = drb->dPriv; \
GLuint pitch = drb->backBuffer ? info.strideInBytes \
: (drb->pitch * drb->cpp); \
const GLuint bottom = dPriv->h - 1; \
@@ -104,7 +104,7 @@
#define HW_READ_CLIPLOOP() \
do { \
- const __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; \
+ const __DRIdrawable *dPriv = fxMesa->driDrawable; \
drm_clip_rect_t *rect = dPriv->pClipRects; \
int _nc = dPriv->numClipRects; \
while (_nc--) { \
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_state.c b/src/mesa/drivers/dri/tdfx/tdfx_state.c
index 16b0bfc7c72..dcbc7647f29 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_state.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_state.c
@@ -617,7 +617,7 @@ static int intersect_rect( drm_clip_rect_t *out,
void tdfxUpdateClipping( GLcontext *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fxMesa->driDrawable;
+ __DRIdrawable *dPriv = fxMesa->driDrawable;
if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) {
fprintf( stderr, "%s()\n", __FUNCTION__ );
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_vb.c b/src/mesa/drivers/dri/tdfx/tdfx_vb.c
index d6fcf986610..0f3c877a3e7 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_vb.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_vb.c
@@ -64,11 +64,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) {
@@ -83,9 +83,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_context.c b/src/mesa/drivers/dri/unichrome/via_context.c
index ff666a383bb..9da96bdd45a 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.c
+++ b/src/mesa/drivers/dri/unichrome/via_context.c
@@ -145,7 +145,7 @@ viaRenderbufferStorage(GLcontext *ctx, struct gl_renderbuffer *rb,
static void
viaInitRenderbuffer(struct via_renderbuffer *vrb, GLenum format,
- __DRIdrawablePrivate *dPriv)
+ __DRIdrawable *dPriv)
{
const GLuint name = 0;
struct gl_renderbuffer *rb = & vrb->Base;
@@ -204,7 +204,7 @@ viaInitRenderbuffer(struct via_renderbuffer *vrb, GLenum format,
static GLboolean
calculate_buffer_parameters(struct via_context *vmesa,
struct gl_framebuffer *fb,
- __DRIdrawablePrivate *dPriv)
+ __DRIdrawable *dPriv)
{
const unsigned shift = vmesa->viaScreen->bitsPerPixel / 16;
const unsigned extra = 32;
@@ -457,12 +457,12 @@ FreeBuffer(struct via_context *vmesa)
GLboolean
viaCreateContext(const __GLcontextModes *visual,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate)
{
GLcontext *ctx, *shareCtx;
struct via_context *vmesa;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
viaScreenPrivate *viaScreen = (viaScreenPrivate *)sPriv->private;
drm_via_sarea_t *saPriv = (drm_via_sarea_t *)
(((GLubyte *)sPriv->pSAREA) + viaScreen->sareaPrivOffset);
@@ -676,7 +676,7 @@ viaCreateContext(const __GLcontextModes *visual,
}
void
-viaDestroyContext(__DRIcontextPrivate *driContextPriv)
+viaDestroyContext(__DRIcontext *driContextPriv)
{
GET_CURRENT_CONTEXT(ctx);
struct via_context *vmesa =
@@ -726,8 +726,8 @@ viaDestroyContext(__DRIcontextPrivate *driContextPriv)
void viaXMesaWindowMoved(struct via_context *vmesa)
{
- __DRIdrawablePrivate *const drawable = vmesa->driDrawable;
- __DRIdrawablePrivate *const readable = vmesa->driReadable;
+ __DRIdrawable *const drawable = vmesa->driDrawable;
+ __DRIdrawable *const readable = vmesa->driReadable;
struct via_renderbuffer * draw_buffer;
struct via_renderbuffer * read_buffer;
GLuint bytePerPixel = vmesa->viaScreen->bitsPerPixel >> 3;
@@ -810,15 +810,15 @@ void viaXMesaWindowMoved(struct via_context *vmesa)
}
GLboolean
-viaUnbindContext(__DRIcontextPrivate *driContextPriv)
+viaUnbindContext(__DRIcontext *driContextPriv)
{
return GL_TRUE;
}
GLboolean
-viaMakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv)
+viaMakeCurrent(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv)
{
if (VIA_DEBUG & DEBUG_DRI) {
fprintf(stderr, "driContextPriv = %016lx\n", (unsigned long)driContextPriv);
@@ -894,8 +894,8 @@ viaMakeCurrent(__DRIcontextPrivate *driContextPriv,
void viaGetLock(struct via_context *vmesa, GLuint flags)
{
- __DRIdrawablePrivate *dPriv = vmesa->driDrawable;
- __DRIscreenPrivate *sPriv = vmesa->driScreen;
+ __DRIdrawable *dPriv = vmesa->driDrawable;
+ __DRIscreen *sPriv = vmesa->driScreen;
drmGetLock(vmesa->driFd, vmesa->hHWContext, flags);
@@ -925,9 +925,9 @@ void viaGetLock(struct via_context *vmesa, GLuint flags)
void
-viaSwapBuffers(__DRIdrawablePrivate *drawablePrivate)
+viaSwapBuffers(__DRIdrawable *drawablePrivate)
{
- __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *)drawablePrivate;
+ __DRIdrawable *dPriv = (__DRIdrawable *)drawablePrivate;
if (dPriv &&
dPriv->driContextPriv &&
diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h
index 4cc9e475c21..4e1ab3a6ca7 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.h
+++ b/src/mesa/drivers/dri/unichrome/via_context.h
@@ -105,7 +105,7 @@ struct via_renderbuffer {
int drawW;
int drawH;
- __DRIdrawablePrivate *dPriv;
+ __DRIdrawable *dPriv;
};
@@ -294,14 +294,14 @@ struct via_context {
/**
* DRI drawable bound to this context for drawing.
*/
- __DRIdrawablePrivate *driDrawable;
+ __DRIdrawable *driDrawable;
/**
* DRI drawable bound to this context for reading.
*/
- __DRIdrawablePrivate *driReadable;
+ __DRIdrawable *driReadable;
- __DRIscreenPrivate *driScreen;
+ __DRIscreen *driScreen;
viaScreenPrivate *viaScreen;
drm_via_sarea_t *sarea;
volatile GLuint* regMMIOBase;
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c
index 69eac441933..c9a31f3383c 100644
--- a/src/mesa/drivers/dri/unichrome/via_ioctl.c
+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c
@@ -204,7 +204,7 @@ static void viaFillBuffer(struct via_context *vmesa,
static void viaClear(GLcontext *ctx, GLbitfield mask)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = vmesa->driDrawable;
+ __DRIdrawable *dPriv = vmesa->driDrawable;
struct via_renderbuffer *const vrb =
(struct via_renderbuffer *) dPriv->driverPrivate;
int flag = 0;
@@ -506,12 +506,12 @@ void viaWaitIdleLocked( struct via_context *vmesa, GLboolean light )
* except that WAIT_IDLE() will spin the CPU polling, while this is
* IRQ driven.
*/
-static void viaWaitIdleVBlank( __DRIdrawablePrivate *dPriv,
+static void viaWaitIdleVBlank( __DRIdrawable *dPriv,
struct via_context *vmesa,
GLuint value )
{
GLboolean missed_target;
- __DRIscreenPrivate *psp = dPriv->driScreenPriv;
+ __DRIscreen *psp = dPriv->driScreenPriv;
VIA_FLUSH_DMA(vmesa);
@@ -590,11 +590,11 @@ void viaResetPageFlippingLocked(struct via_context *vmesa)
/*
* Copy the back buffer to the front buffer.
*/
-void viaCopyBuffer(__DRIdrawablePrivate *dPriv)
+void viaCopyBuffer(__DRIdrawable *dPriv)
{
struct via_context *vmesa =
(struct via_context *)dPriv->driContextPriv->driverPrivate;
- __DRIscreenPrivate *psp = dPriv->driScreenPriv;
+ __DRIscreen *psp = dPriv->driScreenPriv;
if (VIA_DEBUG & DEBUG_IOCTL)
fprintf(stderr,
@@ -634,12 +634,12 @@ void viaCopyBuffer(__DRIdrawablePrivate *dPriv)
}
-void viaPageFlip(__DRIdrawablePrivate *dPriv)
+void viaPageFlip(__DRIdrawable *dPriv)
{
struct via_context *vmesa =
(struct via_context *)dPriv->driContextPriv->driverPrivate;
struct via_renderbuffer buffer_tmp;
- __DRIscreenPrivate *psp = dPriv->driScreenPriv;
+ __DRIscreen *psp = dPriv->driScreenPriv;
VIA_FLUSH_DMA(vmesa);
if (dPriv->vblFlags == VBLANK_FLAG_SYNC &&
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.h b/src/mesa/drivers/dri/unichrome/via_ioctl.h
index 14a833a97d0..c6b32cf0853 100644
--- a/src/mesa/drivers/dri/unichrome/via_ioctl.h
+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.h
@@ -33,8 +33,8 @@ void viaFlushDma(struct via_context *vmesa);
void viaFlushDmaLocked(struct via_context *vmesa, GLuint flags);
void viaInitIoctlFuncs(GLcontext *ctx);
-void viaCopyBuffer(__DRIdrawablePrivate *dpriv);
-void viaPageFlip(__DRIdrawablePrivate *dpriv);
+void viaCopyBuffer(__DRIdrawable *dpriv);
+void viaPageFlip(__DRIdrawable *dpriv);
void viaCheckDma(struct via_context *vmesa, GLuint bytes);
void viaResetPageFlippingLocked(struct via_context *vmesa);
void viaWaitIdle(struct via_context *vmesa, GLboolean light);
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c
index 115d3fbffd5..8c91c937c68 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.c
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c
@@ -86,7 +86,7 @@ static void via_free_empty_buffers( drmBufMapPtr bufs )
static GLboolean
-viaInitDriver(__DRIscreenPrivate *sPriv)
+viaInitDriver(__DRIscreen *sPriv)
{
viaScreenPrivate *viaScreen;
VIADRIPtr gDRIPriv = (VIADRIPtr)sPriv->pDevPriv;
@@ -180,7 +180,7 @@ viaInitDriver(__DRIscreenPrivate *sPriv)
}
static void
-viaDestroyScreen(__DRIscreenPrivate *sPriv)
+viaDestroyScreen(__DRIscreen *sPriv)
{
viaScreenPrivate *viaScreen = (viaScreenPrivate *)sPriv->private;
VIADRIPtr gDRIPriv = (VIADRIPtr)sPriv->pDevPriv;
@@ -199,8 +199,8 @@ viaDestroyScreen(__DRIscreenPrivate *sPriv)
static GLboolean
-viaCreateBuffer(__DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+viaCreateBuffer(__DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap)
{
@@ -310,13 +310,13 @@ viaCreateBuffer(__DRIscreenPrivate *driScrnPriv,
static void
-viaDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+viaDestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static const __DRIconfig **
-viaFillInModes( __DRIscreenPrivate *psp,
+viaFillInModes( __DRIscreen *psp,
unsigned pixel_bits, GLboolean have_back_buffer )
{
__DRIconfig **configs;
@@ -373,7 +373,7 @@ viaFillInModes( __DRIscreenPrivate *psp,
* \return the __GLcontextModes supported by this driver
*/
static const __DRIconfig **
-viaInitScreen(__DRIscreenPrivate *psp)
+viaInitScreen(__DRIscreen *psp)
{
static const __DRIversion ddx_expected = { VIA_DRIDDX_VERSION_MAJOR,
VIA_DRIDDX_VERSION_MINOR,
@@ -401,7 +401,7 @@ viaInitScreen(__DRIscreenPrivate *psp)
* Get information about previous buffer swaps.
*/
static int
-getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo )
+getSwapInfo( __DRIdrawable *dPriv, __DRIswapInfo * sInfo )
{
struct via_context *vmesa;
@@ -439,3 +439,10 @@ const struct __DriverAPIRec driDriverAPI = {
.WaitForSBC = NULL,
.SwapBuffersMSC = NULL
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.h b/src/mesa/drivers/dri/unichrome/via_screen.h
index c3ef722ff07..aa662e01c04 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.h
+++ b/src/mesa/drivers/dri/unichrome/via_screen.h
@@ -61,7 +61,7 @@ typedef struct {
drmAddress agpLinearStart;
GLuint agpBase;
- __DRIscreenPrivate *driScrnPriv;
+ __DRIscreen *driScrnPriv;
drmBufMapPtr bufs;
unsigned int sareaPrivOffset;
/*=* John Sheng [2003.12.9] Tuxracer & VQ *=*/
@@ -77,21 +77,21 @@ typedef struct {
extern GLboolean
viaCreateContext(const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate);
extern void
-viaDestroyContext(__DRIcontextPrivate *driContextPriv);
+viaDestroyContext(__DRIcontext *driContextPriv);
extern GLboolean
-viaUnbindContext(__DRIcontextPrivate *driContextPriv);
+viaUnbindContext(__DRIcontext *driContextPriv);
extern GLboolean
-viaMakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv);
+viaMakeCurrent(__DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv);
extern void
-viaSwapBuffers(__DRIdrawablePrivate *drawablePrivate);
+viaSwapBuffers(__DRIdrawable *drawablePrivate);
#endif
diff --git a/src/mesa/drivers/dri/unichrome/via_span.c b/src/mesa/drivers/dri/unichrome/via_span.c
index e847164cd02..fa3cbf7a79e 100644
--- a/src/mesa/drivers/dri/unichrome/via_span.c
+++ b/src/mesa/drivers/dri/unichrome/via_span.c
@@ -43,7 +43,7 @@
#undef LOCAL_VARS
#define LOCAL_VARS \
struct via_renderbuffer *vrb = (struct via_renderbuffer *) rb; \
- __DRIdrawablePrivate *dPriv = vrb->dPriv; \
+ __DRIdrawable *dPriv = vrb->dPriv; \
GLuint pitch = vrb->pitch; \
GLuint height = dPriv->h; \
GLint p = 0; \
@@ -80,7 +80,7 @@
*/
#define LOCAL_DEPTH_VARS \
struct via_renderbuffer *vrb = (struct via_renderbuffer *) rb; \
- __DRIdrawablePrivate *dPriv = vrb->dPriv; \
+ __DRIdrawable *dPriv = vrb->dPriv; \
GLuint depth_pitch = vrb->pitch; \
GLuint height = dPriv->h; \
char *buf = (char *)(vrb->map)
diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c
index e65f5fd60d1..f7029b94928 100644
--- a/src/mesa/drivers/dri/unichrome/via_state.c
+++ b/src/mesa/drivers/dri/unichrome/via_state.c
@@ -473,7 +473,7 @@ void viaEmitState(struct via_context *vmesa)
*/
if (ctx->Polygon.StippleFlag) {
GLuint *stipple = &ctx->PolygonStipple[0];
- __DRIdrawablePrivate *dPriv = vmesa->driDrawable;
+ __DRIdrawable *dPriv = vmesa->driDrawable;
struct via_renderbuffer *const vrb =
(struct via_renderbuffer *) dPriv->driverPrivate;
GLint i;
@@ -719,7 +719,7 @@ static void viaColorMask(GLcontext *ctx,
void viaCalcViewport(GLcontext *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = vmesa->driDrawable;
+ __DRIdrawable *dPriv = vmesa->driDrawable;
struct via_renderbuffer *const vrb =
(struct via_renderbuffer *) dPriv->driverPrivate;
const GLfloat *v = ctx->Viewport._WindowMap.m;
@@ -888,10 +888,10 @@ static GLboolean viaChooseTextureState(GLcontext *ctx)
if (texObj->Image[0][texObj->BaseLevel]->Border > 0) {
vmesa->regHTXnTB[0] |= (HC_HTXnTB_TBC_S | HC_HTXnTB_TBC_T);
vmesa->regHTXnTBC[0] =
- PACK_COLOR_888(FLOAT_TO_UBYTE(texObj->BorderColor[0]),
- FLOAT_TO_UBYTE(texObj->BorderColor[1]),
- FLOAT_TO_UBYTE(texObj->BorderColor[2]));
- vmesa->regHTXnTRAH[0] = FLOAT_TO_UBYTE(texObj->BorderColor[3]);
+ PACK_COLOR_888(FLOAT_TO_UBYTE(texObj->BorderColor.f[0]),
+ FLOAT_TO_UBYTE(texObj->BorderColor.f[1]),
+ FLOAT_TO_UBYTE(texObj->BorderColor.f[2]));
+ vmesa->regHTXnTRAH[0] = FLOAT_TO_UBYTE(texObj->BorderColor.f[3]);
}
if (texUnit0->LodBias != 0.0f) {
@@ -921,10 +921,10 @@ static GLboolean viaChooseTextureState(GLcontext *ctx)
if (texObj->Image[0][texObj->BaseLevel]->Border > 0) {
vmesa->regHTXnTB[1] |= (HC_HTXnTB_TBC_S | HC_HTXnTB_TBC_T);
vmesa->regHTXnTBC[1] =
- PACK_COLOR_888(FLOAT_TO_UBYTE(texObj->BorderColor[0]),
- FLOAT_TO_UBYTE(texObj->BorderColor[1]),
- FLOAT_TO_UBYTE(texObj->BorderColor[2]));
- vmesa->regHTXnTRAH[1] = FLOAT_TO_UBYTE(texObj->BorderColor[3]);
+ PACK_COLOR_888(FLOAT_TO_UBYTE(texObj->BorderColor.f[0]),
+ FLOAT_TO_UBYTE(texObj->BorderColor.f[1]),
+ FLOAT_TO_UBYTE(texObj->BorderColor.f[2]));
+ vmesa->regHTXnTRAH[1] = FLOAT_TO_UBYTE(texObj->BorderColor.f[3]);
}
@@ -1235,12 +1235,12 @@ static void viaChooseColorState(GLcontext *ctx)
else
vmesa->regHROP = HC_HROP_P;
- vmesa->regHFBBMSKL = PACK_COLOR_888(ctx->Color.ColorMask[0],
- ctx->Color.ColorMask[1],
- ctx->Color.ColorMask[2]);
- vmesa->regHROP |= ctx->Color.ColorMask[3];
+ vmesa->regHFBBMSKL = PACK_COLOR_888(ctx->Color.ColorMask[0][0],
+ ctx->Color.ColorMask[0][1],
+ ctx->Color.ColorMask[0][2]);
+ vmesa->regHROP |= ctx->Color.ColorMask[0][3];
- if (ctx->Color.ColorMask[3])
+ if (ctx->Color.ColorMask[0][3])
vmesa->regEnable |= HC_HenAW_MASK;
else
vmesa->regEnable &= ~HC_HenAW_MASK;
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c
index e2f1f02c99e..01359d51ea6 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.c
+++ b/src/mesa/drivers/dri/unichrome/via_tris.c
@@ -833,13 +833,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/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c
index a863b028adc..9dd4f1e9c37 100644
--- a/src/mesa/drivers/glide/fxddtex.c
+++ b/src/mesa/drivers/glide/fxddtex.c
@@ -275,8 +275,9 @@ fxDDTexEnv(GLcontext * ctx, GLenum target, GLenum pname,
/* apply any lod biasing right now */
if (pname == GL_TEXTURE_LOD_BIAS_EXT) {
GLfloat bias = *param;
- CLAMP_SELF(bias, -ctx->Const.MaxTextureLodBias,
- ctx->Const.MaxTextureLodBias - 0.25);
+ bias = CLAMP(bias,
+ -ctx->Const.MaxTextureLodBias,
+ ctx->Const.MaxTextureLodBias - 0.25);
grTexLodBiasValue(GR_TMU0, bias);
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/osmesa/Makefile b/src/mesa/drivers/osmesa/Makefile
index 92d41494665..9010bbd130a 100644
--- a/src/mesa/drivers/osmesa/Makefile
+++ b/src/mesa/drivers/osmesa/Makefile
@@ -21,7 +21,11 @@ INCLUDE_DIRS = \
# Standalone osmesa needs to be linked with core Mesa APIs
ifeq ($(DRIVER_DIRS), osmesa)
-CORE_MESA = $(TOP)/src/mesa/libmesa.a $(TOP)/src/mesa/libglapi.a
+CORE_MESA = \
+ $(TOP)/src/mesa/libmesa.a \
+ $(TOP)/src/mesa/libglapi.a \
+ $(TOP)/src/glsl/cl/libglslcl.a \
+ $(TOP)/src/glsl/pp/libglslpp.a
else
CORE_MESA =
endif
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index 8929b22af16..76c825a0904 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -301,10 +301,10 @@ static void clear(GLcontext *ctx, GLbitfield mask)
/* Let swrast do all the work if the masks are not set to
* clear all channels. */
- if (ctx->Color.ColorMask[0] != 0xff ||
- ctx->Color.ColorMask[1] != 0xff ||
- ctx->Color.ColorMask[2] != 0xff ||
- ctx->Color.ColorMask[3] != 0xff) {
+ if (!ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3]) {
_swrast_Clear(ctx, mask);
return;
}
diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
index d5fa6428006..7b202dfda70 100644
--- a/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
+++ b/src/mesa/drivers/windows/gldirect/dx7/gld_driver_dx7.c
@@ -269,7 +269,7 @@ void gld_Clear_DX7(
D3DRECT d3dClearRect;
// TODO: Colourmask
- const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask;
+ const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask[0];
if (!gld->pDev)
return;
@@ -427,10 +427,10 @@ void gld_NEW_COLOR(
/*
// Color mask - unsupported by DX7
- if (ctx->Color.ColorMask[0]) dwFlags |= D3DCOLORWRITEENABLE_RED;
- if (ctx->Color.ColorMask[1]) dwFlags |= D3DCOLORWRITEENABLE_GREEN;
- if (ctx->Color.ColorMask[2]) dwFlags |= D3DCOLORWRITEENABLE_BLUE;
- if (ctx->Color.ColorMask[3]) dwFlags |= D3DCOLORWRITEENABLE_ALPHA;
+ if (ctx->Color.ColorMask[0][0]) dwFlags |= D3DCOLORWRITEENABLE_RED;
+ if (ctx->Color.ColorMask[0][1]) dwFlags |= D3DCOLORWRITEENABLE_GREEN;
+ if (ctx->Color.ColorMask[0][2]) dwFlags |= D3DCOLORWRITEENABLE_BLUE;
+ if (ctx->Color.ColorMask[0][3]) dwFlags |= D3DCOLORWRITEENABLE_ALPHA;
_GLD_DX7_DEV(SetRenderState(gld->pDev, D3DRENDERSTATE_COLORWRITEENABLE, dwFlags));
*/
}
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_driver_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
index 7afa9190cdf..7eeb9db2d15 100644
--- a/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
+++ b/src/mesa/drivers/windows/gldirect/dx8/gld_driver_dx8.c
@@ -269,7 +269,7 @@ void gld_Clear_DX8(
D3DRECT d3dClearRect;
// TODO: Colourmask
- const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask;
+ const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask[0];
if (!gld->pDev)
return;
@@ -426,10 +426,10 @@ void gld_NEW_COLOR(
_GLD_DX8_DEV(SetRenderState(gld->pDev, D3DRS_DESTBLEND, dest));
// Color mask
- if (ctx->Color.ColorMask[0]) dwFlags |= D3DCOLORWRITEENABLE_RED;
- if (ctx->Color.ColorMask[1]) dwFlags |= D3DCOLORWRITEENABLE_GREEN;
- if (ctx->Color.ColorMask[2]) dwFlags |= D3DCOLORWRITEENABLE_BLUE;
- if (ctx->Color.ColorMask[3]) dwFlags |= D3DCOLORWRITEENABLE_ALPHA;
+ if (ctx->Color.ColorMask[0][0]) dwFlags |= D3DCOLORWRITEENABLE_RED;
+ if (ctx->Color.ColorMask[0][1]) dwFlags |= D3DCOLORWRITEENABLE_GREEN;
+ if (ctx->Color.ColorMask[0][2]) dwFlags |= D3DCOLORWRITEENABLE_BLUE;
+ if (ctx->Color.ColorMask[0][3]) dwFlags |= D3DCOLORWRITEENABLE_ALPHA;
_GLD_DX8_DEV(SetRenderState(gld->pDev, D3DRS_COLORWRITEENABLE, dwFlags));
}
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_driver_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
index c191564d6eb..0558462dea0 100644
--- a/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
+++ b/src/mesa/drivers/windows/gldirect/dx9/gld_driver_dx9.c
@@ -269,7 +269,7 @@ void gld_Clear_DX9(
D3DRECT d3dClearRect;
// TODO: Colourmask
- const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask;
+ const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask[0];
if (!gld->pDev)
return;
@@ -424,10 +424,10 @@ void gld_NEW_COLOR(
_GLD_DX9_DEV(SetRenderState(gld->pDev, D3DRS_DESTBLEND, dest));
// Color mask
- if (ctx->Color.ColorMask[0]) dwFlags |= D3DCOLORWRITEENABLE_RED;
- if (ctx->Color.ColorMask[1]) dwFlags |= D3DCOLORWRITEENABLE_GREEN;
- if (ctx->Color.ColorMask[2]) dwFlags |= D3DCOLORWRITEENABLE_BLUE;
- if (ctx->Color.ColorMask[3]) dwFlags |= D3DCOLORWRITEENABLE_ALPHA;
+ if (ctx->Color.ColorMask[0][0]) dwFlags |= D3DCOLORWRITEENABLE_RED;
+ if (ctx->Color.ColorMask[0][1]) dwFlags |= D3DCOLORWRITEENABLE_GREEN;
+ if (ctx->Color.ColorMask[0][2]) dwFlags |= D3DCOLORWRITEENABLE_BLUE;
+ if (ctx->Color.ColorMask[0][3]) dwFlags |= D3DCOLORWRITEENABLE_ALPHA;
_GLD_DX9_DEV(SetRenderState(gld->pDev, D3DRS_COLORWRITEENABLE, dwFlags));
}
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/glxapi.c b/src/mesa/drivers/x11/glxapi.c
index 02eea25a712..e11aff1a849 100644
--- a/src/mesa/drivers/x11/glxapi.c
+++ b/src/mesa/drivers/x11/glxapi.c
@@ -50,6 +50,37 @@ struct display_dispatch {
struct display_dispatch *Next;
};
+
+/**
+ * When GLX_INDIRECT_RENDERING is defined, some symbols are missing in
+ * libglapi.a. We need to define them here.
+ */
+#ifdef GLX_INDIRECT_RENDERING
+
+#include "glapi/glapitable.h"
+#include "glapi/glapidispatch.h"
+
+#define KEYWORD1 PUBLIC
+
+#if defined(USE_MGL_NAMESPACE)
+#define NAME(func) mgl##func
+#else
+#define NAME(func) gl##func
+#endif
+
+#define DISPATCH(FUNC, ARGS, MESSAGE) \
+ CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+
+#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \
+ return CALL_ ## FUNC(GET_DISPATCH(), ARGS);
+
+/* skip normal ones */
+#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
+#include "glapi/glapitemp.h"
+
+#endif /* GLX_INDIRECT_RENDERING */
+
+
static struct display_dispatch *DispatchList = NULL;
@@ -1173,6 +1204,9 @@ _glxapi_get_extensions(void)
#ifdef GLX_EXT_texture_from_pixmap
"GLX_EXT_texture_from_pixmap",
#endif
+#ifdef GLX_INTEL_swap_event
+ "GLX_INTEL_swap_event",
+#endif
NULL
};
return extensions;
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index a27d7045abe..df04e3a1011 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -381,7 +381,7 @@ clear_buffers(GLcontext *ctx, GLbitfield buffers)
{
if (ctx->DrawBuffer->Name == 0) {
/* this is a window system framebuffer */
- const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask;
+ const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask[0];
XMesaBuffer b = XMESA_BUFFER(ctx->DrawBuffer);
const GLint x = ctx->DrawBuffer->_Xmin;
const GLint y = ctx->DrawBuffer->_Ymin;
diff --git a/src/mesa/es/.gitignore b/src/mesa/es/.gitignore
new file mode 100644
index 00000000000..7643e9f0dbe
--- /dev/null
+++ b/src/mesa/es/.gitignore
@@ -0,0 +1,5 @@
+glapi/glapi-es*
+glapi/glapi-stamp
+main/get_es*.c
+main/api_exec_es*.c
+objs-es*
diff --git a/src/mesa/es/Makefile b/src/mesa/es/Makefile
new file mode 100644
index 00000000000..fbe67445c93
--- /dev/null
+++ b/src/mesa/es/Makefile
@@ -0,0 +1,141 @@
+# src/mesa/es/Makefile
+#
+TOP := ../../..
+MESA := ..
+
+include $(TOP)/configs/current
+include sources.mak
+
+ES1_LIBS := libes1gallium.a libes1api.a
+ES2_LIBS := libes2gallium.a libes2api.a
+
+# Default rule: create ES1 and ES2 libs
+.PHONY: default es1 es2
+default: depend es1 es2
+
+es1: $(ES1_LIBS)
+ @rm -f subdirs-stamp-tmp
+
+es2: $(ES2_LIBS)
+ @rm -f subdirs-stamp-tmp
+
+# force the inclusion of es's mfeatures.h
+ES1_CPPFLAGS := -include main/mfeatures_es1.h -D__GL_EXPORTS
+ES2_CPPFLAGS := -include main/mfeatures_es2.h -D__GL_EXPORTS
+
+ES1_OBJ_DIR := objs-es1
+ES2_OBJ_DIR := objs-es2
+
+# adjust output dirs
+ES1_OBJECTS := $(addprefix $(ES1_OBJ_DIR)/, $(ES1_OBJECTS))
+ES1_GALLIUM_OBJECTS := $(addprefix $(ES1_OBJ_DIR)/, $(ES1_GALLIUM_OBJECTS))
+ES1_API_OBJECTS := $(addprefix $(ES1_OBJ_DIR)/, $(ES1_API_OBJECTS))
+
+ES2_OBJECTS := $(addprefix $(ES2_OBJ_DIR)/, $(ES2_OBJECTS))
+ES2_GALLIUM_OBJECTS := $(addprefix $(ES2_OBJ_DIR)/, $(ES2_GALLIUM_OBJECTS))
+ES2_API_OBJECTS := $(addprefix $(ES2_OBJ_DIR)/, $(ES2_API_OBJECTS))
+
+# compile either ES1 or ES2 sources
+define es-compile
+ @mkdir -p $(dir $@)
+ $(CC) -c $(CFLAGS) $(ES$(1)_CPPFLAGS) $(ES$(1)_INCLUDES) -o $@ $<
+endef
+
+$(ES1_OBJ_DIR)/%.o: %.c
+ $(call es-compile,1)
+
+$(ES1_OBJ_DIR)/%.o: %.S
+ $(call es-compile,1)
+
+$(ES1_OBJ_DIR)/%.o: $(MESA)/%.c
+ $(call es-compile,1)
+
+$(ES1_OBJ_DIR)/%.o: $(MESA)/%.S
+ $(call es-compile,1)
+
+$(ES2_OBJ_DIR)/%.o: %.c
+ $(call es-compile,2)
+
+$(ES2_OBJ_DIR)/%.o: %.S
+ $(call es-compile,2)
+
+$(ES2_OBJ_DIR)/%.o: $(MESA)/%.c
+ $(call es-compile,2)
+
+$(ES2_OBJ_DIR)/%.o: $(MESA)/%.S
+ $(call es-compile,2)
+
+libes1.a: $(ES1_OBJECTS) $(GLSL_LIBS)
+ @$(MKLIB) -o es1 -static $(ES1_OBJECTS) $(GLSL_LIBS)
+
+libes2.a: $(ES2_OBJECTS) $(GLSL_LIBS)
+ @$(MKLIB) -o es2 -static $(ES1_OBJECTS) $(GLSL_LIBS)
+
+libes1gallium.a: $(ES1_GALLIUM_OBJECTS) $(GLSL_LIBS)
+ @$(MKLIB) -o es1gallium -static $(ES1_GALLIUM_OBJECTS) $(GLSL_LIBS)
+
+libes2gallium.a: $(ES2_GALLIUM_OBJECTS) $(GLSL_LIBS)
+ @$(MKLIB) -o es2gallium -static $(ES2_GALLIUM_OBJECTS) $(GLSL_LIBS)
+
+libes1api.a: $(ES1_API_OBJECTS)
+ @$(MKLIB) -o es1api -static $(ES1_API_OBJECTS)
+
+libes2api.a: $(ES2_API_OBJECTS)
+ @$(MKLIB) -o es2api -static $(ES2_API_OBJECTS)
+
+GENERATED_SOURCES := \
+ main/api_exec_es1.c \
+ main/api_exec_es2.c \
+ main/get_es1.c \
+ main/get_es2.c
+
+main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
+ $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@
+
+main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py
+ $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES2.0 > $@
+
+main/get_es1.c: main/get_gen.py
+ $(PYTHON2) $(PYTHON_FLAGS) $< 1 > $@
+
+main/get_es2.c: main/get_gen.py
+ $(PYTHON2) $(PYTHON_FLAGS) $< 2 > $@
+
+.PHONY: clean
+clean:
+ -rm -f $(ES1_LIBS) $(ES2_LIBS)
+ -rm -rf $(ES1_OBJ_DIR) $(ES2_OBJ_DIR)
+ -rm -f $(GENERATED_SOURCES)
+ -rm -f depend depend.bak
+ -rm -f subdirs-stamp-tmp
+ @$(MAKE) -C glapi clean
+
+# nothing to install
+install:
+
+subdirs-stamp-tmp:
+ @$(MAKE) -C $(MESA) asm_subdirs
+ @$(MAKE) -C $(MESA) glsl_builtin
+ @$(MAKE) -C glapi
+ @touch subdirs-stamp-tmp
+
+# sort to avoid duplicates
+ALL_SOURCES := $(sort $(ES1_ALL_SOURCES) $(ES2_ALL_SOURCES))
+
+# need to make sure the subdirs are processed first
+$(ALL_SOURCES): | subdirs-stamp-tmp
+
+depend: $(ALL_SOURCES)
+ @echo "running $(MKDEP)"
+ @touch depend
+ @# MESA is "..", but luckily, directories are longer than 2 characters
+ @$(MKDEP) -f- -p$(ES1_OBJ_DIR)/ $(DEFINES) $(ES1_CFLAGS) \
+ $(ES1_INCLUDES) $(ES1_ALL_SOURCES) 2>/dev/null | \
+ sed -e 's,^$(ES1_OBJ_DIR)/$(MESA)/,$(ES1_OBJ_DIR)/,' > depend
+ @$(MKDEP) -f- -p$(ES2_OBJ_DIR)/ $(DEFINES) $(ES2_CFLAGS) \
+ $(ES2_INCLUDES) $(ES2_ALL_SOURCES) 2>/dev/null | \
+ sed -e 's,^$(ES2_OBJ_DIR)/$(MESA)/,$(ES2_OBJ_DIR)/,' >> depend
+
+ifneq ($(MAKECMDGOALS),clean)
+-include depend
+endif
diff --git a/src/mesa/es/glapi/Makefile b/src/mesa/es/glapi/Makefile
new file mode 100644
index 00000000000..1e32af867d5
--- /dev/null
+++ b/src/mesa/es/glapi/Makefile
@@ -0,0 +1,90 @@
+TOP = ../../../..
+GLAPI = ../../glapi
+include $(TOP)/configs/current
+
+OUTPUTS := \
+ glapi/glapidispatch.h \
+ glapi/glapioffsets.h \
+ glapi/glapitable.h \
+ glapi/glapitemp.h \
+ glapi/glprocs.h \
+ sparc/glapi_sparc.S \
+ x86-64/glapi_x86-64.S \
+ x86/glapi_x86.S \
+ main/enums.c \
+ main/remap_helper.h
+
+COMMON = gl_XML.py glX_XML.py license.py typeexpr.py
+COMMON := $(addprefix $(GLAPI)/, $(COMMON))
+
+ES1_APIXML := es1_API.xml
+ES2_APIXML := es2_API.xml
+ES1_OUTPUT_DIR := glapi-es1
+ES2_OUTPUT_DIR := glapi-es2
+
+ES1_DEPS = $(ES1_APIXML) base1_API.xml es1_EXT.xml es_EXT.xml \
+ es1_COMPAT.xml es_COMPAT.xml
+ES2_DEPS = $(ES2_APIXML) base2_API.xml es2_EXT.xml es_EXT.xml \
+ es2_COMPAT.xml es_COMPAT.xml
+
+ES1_OUTPUTS := $(addprefix $(ES1_OUTPUT_DIR)/, $(OUTPUTS))
+ES2_OUTPUTS := $(addprefix $(ES2_OUTPUT_DIR)/, $(OUTPUTS))
+
+all: $(ES1_OUTPUTS) $(ES2_OUTPUTS)
+
+$(ES1_OUTPUTS): APIXML := $(ES1_APIXML)
+$(ES2_OUTPUTS): APIXML := $(ES2_APIXML)
+$(ES1_OUTPUTS): $(ES1_DEPS)
+$(ES2_OUTPUTS): $(ES2_DEPS)
+
+define gen-glapi
+ @mkdir -p $(dir $@)
+ $(PYTHON2) $(PYTHON_FLAGS) $< -f $(APIXML) $(1) > $@
+endef
+
+%/glapidispatch.h: $(GLAPI)/gl_table.py $(COMMON)
+ $(call gen-glapi,-c -m remap_table)
+
+%/glapioffsets.h: $(GLAPI)/gl_offsets.py $(COMMON)
+ $(call gen-glapi,-c)
+
+%/glapitable.h: $(GLAPI)/gl_table.py $(COMMON)
+ $(call gen-glapi,-c)
+
+%/glapitemp.h: $(GLAPI)/gl_apitemp.py $(COMMON)
+ $(call gen-glapi,-c)
+
+%/glprocs.h: $(GLAPI)/gl_procs.py $(COMMON)
+ $(call gen-glapi,-c)
+
+%/sparc/glapi_sparc.S: $(GLAPI)/gl_SPARC_asm.py $(COMMON)
+ $(call gen-glapi)
+
+%/x86-64/glapi_x86-64.S: $(GLAPI)/gl_x86-64_asm.py $(COMMON)
+ $(call gen-glapi)
+
+%/x86/glapi_x86.S: $(GLAPI)/gl_x86_asm.py $(COMMON)
+ $(call gen-glapi)
+
+%/main/enums.c: $(GLAPI)/gl_enums.py $(COMMON)
+ $(call gen-glapi)
+
+%/main/remap_helper.h: $(GLAPI)/remap_helper.py $(COMMON)
+ $(call gen-glapi)
+
+verify_xml:
+ @if [ ! -f gl.h ]; then \
+ echo "Please copy gl.h and gl2.h to this directory"; \
+ exit 1; \
+ fi
+ @echo "Verifying that es1_API.xml covers OpenGL ES 1.1..."
+ @$(PYTHON2) $(PYTHON_FLAGS) gl_parse_header.py gl.h > tmp.xml
+ @$(PYTHON2) $(PYTHON_FLAGS) gl_compare.py difference tmp.xml es1_API.xml
+ @echo "Verifying that es2_API.xml covers OpenGL ES 2.0..."
+ @$(PYTHON2) $(PYTHON_FLAGS) gl_parse_header.py gl2.h > tmp.xml
+ @$(PYTHON2) $(PYTHON_FLAGS) gl_compare.py difference tmp.xml es2_API.xml
+ @rm -f tmp.xml
+
+clean:
+ -rm -rf $(ES1_OUTPUT_DIR) $(ES2_OUTPUT_DIR)
+ -rm -f *~ *.pyc *.pyo
diff --git a/src/mesa/es/glapi/base1_API.xml b/src/mesa/es/glapi/base1_API.xml
new file mode 100644
index 00000000000..f5d136ccefc
--- /dev/null
+++ b/src/mesa/es/glapi/base1_API.xml
@@ -0,0 +1,744 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<!-- OpenGL and OpenGL ES 1.x APIs
+ This file defines the base categories that can be shared by all APIs.
+ They are defined in an incremental fashion.
+-->
+
+<OpenGLAPI>
+
+<!-- base subset of OpenGL 1.0 -->
+<category name="base1.0">
+ <enum name="FALSE" value="0x0"/>
+ <enum name="TRUE" value="0x1"/>
+ <enum name="ZERO" value="0x0"/>
+ <enum name="ONE" value="0x1"/>
+ <enum name="NO_ERROR" value="0x0"/>
+
+ <enum name="POINTS" value="0x0000"/>
+ <enum name="LINES" value="0x0001"/>
+ <enum name="LINE_LOOP" value="0x0002"/>
+ <enum name="LINE_STRIP" value="0x0003"/>
+ <enum name="TRIANGLES" value="0x0004"/>
+ <enum name="TRIANGLE_STRIP" value="0x0005"/>
+ <enum name="TRIANGLE_FAN" value="0x0006"/>
+ <enum name="NEVER" value="0x0200"/>
+ <enum name="LESS" value="0x0201"/>
+ <enum name="EQUAL" value="0x0202"/>
+ <enum name="LEQUAL" value="0x0203"/>
+ <enum name="GREATER" value="0x0204"/>
+ <enum name="NOTEQUAL" value="0x0205"/>
+ <enum name="GEQUAL" value="0x0206"/>
+ <enum name="ALWAYS" value="0x0207"/>
+ <enum name="SRC_COLOR" value="0x0300"/>
+ <enum name="ONE_MINUS_SRC_COLOR" value="0x0301"/>
+ <enum name="SRC_ALPHA" value="0x0302"/>
+ <enum name="ONE_MINUS_SRC_ALPHA" value="0x0303"/>
+ <enum name="DST_ALPHA" value="0x0304"/>
+ <enum name="ONE_MINUS_DST_ALPHA" value="0x0305"/>
+ <enum name="DST_COLOR" value="0x0306"/>
+ <enum name="ONE_MINUS_DST_COLOR" value="0x0307"/>
+ <enum name="SRC_ALPHA_SATURATE" value="0x0308"/>
+ <enum name="FRONT" value="0x0404"/>
+ <enum name="BACK" value="0x0405"/>
+ <enum name="FRONT_AND_BACK" value="0x0408"/>
+ <enum name="INVALID_ENUM" value="0x0500"/>
+ <enum name="INVALID_VALUE" value="0x0501"/>
+ <enum name="INVALID_OPERATION" value="0x0502"/>
+ <enum name="OUT_OF_MEMORY" value="0x0505"/>
+ <enum name="CW" value="0x0900"/>
+ <enum name="CCW" value="0x0901"/>
+ <enum name="CULL_FACE" count="1" value="0x0B44">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="DEPTH_TEST" count="1" value="0x0B71">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_TEST" count="1" value="0x0B90">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="DITHER" count="1" value="0x0BD0">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND" count="1" value="0x0BE2">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SCISSOR_TEST" count="1" value="0x0C11">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="UNPACK_ALIGNMENT" count="1" value="0x0CF5">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="PACK_ALIGNMENT" count="1" value="0x0D05">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_TEXTURE_SIZE" count="1" value="0x0D33">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_VIEWPORT_DIMS" count="2" value="0x0D3A">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SUBPIXEL_BITS" count="1" value="0x0D50">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="RED_BITS" count="1" value="0x0D52">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="GREEN_BITS" count="1" value="0x0D53">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLUE_BITS" count="1" value="0x0D54">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="ALPHA_BITS" count="1" value="0x0D55">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="DEPTH_BITS" count="1" value="0x0D56">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_BITS" count="1" value="0x0D57">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_2D" count="1" value="0x0DE1">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="DONT_CARE" value="0x1100"/>
+ <enum name="FASTEST" value="0x1101"/>
+ <enum name="NICEST" value="0x1102"/>
+ <enum name="BYTE" count="1" value="0x1400">
+ <size name="CallLists"/>
+ </enum>
+ <enum name="UNSIGNED_BYTE" count="1" value="0x1401">
+ <size name="CallLists"/>
+ </enum>
+ <enum name="SHORT" count="2" value="0x1402">
+ <size name="CallLists"/>
+ </enum>
+ <enum name="UNSIGNED_SHORT" count="2" value="0x1403">
+ <size name="CallLists"/>
+ </enum>
+ <enum name="FLOAT" count="4" value="0x1406">
+ <size name="CallLists"/>
+ </enum>
+ <enum name="INVERT" value="0x150A"/>
+ <enum name="TEXTURE" value="0x1702"/>
+ <enum name="ALPHA" value="0x1906"/>
+ <enum name="RGB" value="0x1907"/>
+ <enum name="RGBA" value="0x1908"/>
+ <enum name="LUMINANCE" value="0x1909"/>
+ <enum name="LUMINANCE_ALPHA" value="0x190A"/>
+ <enum name="KEEP" value="0x1E00"/>
+ <enum name="REPLACE" value="0x1E01"/>
+ <enum name="INCR" value="0x1E02"/>
+ <enum name="DECR" value="0x1E03"/>
+ <enum name="VENDOR" value="0x1F00"/>
+ <enum name="RENDERER" value="0x1F01"/>
+ <enum name="VERSION" value="0x1F02"/>
+ <enum name="EXTENSIONS" value="0x1F03"/>
+ <enum name="NEAREST" value="0x2600"/>
+ <enum name="LINEAR" value="0x2601"/>
+ <enum name="NEAREST_MIPMAP_NEAREST" value="0x2700"/>
+ <enum name="LINEAR_MIPMAP_NEAREST" value="0x2701"/>
+ <enum name="NEAREST_MIPMAP_LINEAR" value="0x2702"/>
+ <enum name="LINEAR_MIPMAP_LINEAR" value="0x2703"/>
+ <enum name="TEXTURE_MAG_FILTER" count="1" value="0x2800">
+ <size name="TexParameterfv"/>
+ <size name="TexParameteriv"/>
+ <size name="GetTexParameterfv" mode="get"/>
+ <size name="GetTexParameteriv" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_MIN_FILTER" count="1" value="0x2801">
+ <size name="TexParameterfv"/>
+ <size name="TexParameteriv"/>
+ <size name="GetTexParameterfv" mode="get"/>
+ <size name="GetTexParameteriv" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_WRAP_S" count="1" value="0x2802">
+ <size name="TexParameterfv"/>
+ <size name="TexParameteriv"/>
+ <size name="GetTexParameterfv" mode="get"/>
+ <size name="GetTexParameteriv" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_WRAP_T" count="1" value="0x2803">
+ <size name="TexParameterfv"/>
+ <size name="TexParameteriv"/>
+ <size name="GetTexParameterfv" mode="get"/>
+ <size name="GetTexParameteriv" mode="get"/>
+ </enum>
+ <enum name="REPEAT" value="0x2901"/>
+
+ <enum name="DEPTH_BUFFER_BIT" value="0x00000100"/>
+ <enum name="STENCIL_BUFFER_BIT" value="0x00000400"/>
+ <enum name="COLOR_BUFFER_BIT" value="0x00004000"/>
+
+ <type name="float" size="4" float="true" glx_name="FLOAT32"/>
+ <type name="clampf" size="4" float="true" glx_name="FLOAT32"/>
+
+ <type name="int" size="4" glx_name="CARD32"/>
+ <type name="uint" size="4" unsigned="true" glx_name="CARD32"/>
+ <type name="sizei" size="4" glx_name="CARD32"/>
+ <type name="enum" size="4" unsigned="true" glx_name="ENUM"/>
+ <type name="bitfield" size="4" unsigned="true" glx_name="CARD32"/>
+
+ <type name="short" size="2" glx_name="CARD16"/>
+ <type name="ushort" size="2" unsigned="true" glx_name="CARD16"/>
+
+ <type name="byte" size="1" glx_name="CARD8"/>
+ <type name="ubyte" size="1" unsigned="true" glx_name="CARD8"/>
+ <type name="boolean" size="1" unsigned="true" glx_name="CARD8"/>
+
+ <type name="void" size="1"/>
+
+ <function name="BlendFunc" offset="241">
+ <param name="sfactor" type="GLenum"/>
+ <param name="dfactor" type="GLenum"/>
+ <glx rop="160"/>
+ </function>
+
+ <function name="Clear" offset="203">
+ <param name="mask" type="GLbitfield"/>
+ <glx rop="127"/>
+ </function>
+
+ <function name="ClearColor" offset="206">
+ <param name="red" type="GLclampf"/>
+ <param name="green" type="GLclampf"/>
+ <param name="blue" type="GLclampf"/>
+ <param name="alpha" type="GLclampf"/>
+ <glx rop="130"/>
+ </function>
+
+ <function name="ClearStencil" offset="207">
+ <param name="s" type="GLint"/>
+ <glx rop="131"/>
+ </function>
+
+ <function name="ColorMask" offset="210">
+ <param name="red" type="GLboolean"/>
+ <param name="green" type="GLboolean"/>
+ <param name="blue" type="GLboolean"/>
+ <param name="alpha" type="GLboolean"/>
+ <glx rop="134"/>
+ </function>
+
+ <function name="CullFace" offset="152">
+ <param name="mode" type="GLenum"/>
+ <glx rop="79"/>
+ </function>
+
+ <function name="DepthFunc" offset="245">
+ <param name="func" type="GLenum"/>
+ <glx rop="164"/>
+ </function>
+
+ <function name="DepthMask" offset="211">
+ <param name="flag" type="GLboolean"/>
+ <glx rop="135"/>
+ </function>
+
+ <function name="Disable" offset="214">
+ <param name="cap" type="GLenum"/>
+ <glx rop="138" handcode="client"/>
+ </function>
+
+ <function name="Enable" offset="215">
+ <param name="cap" type="GLenum"/>
+ <glx rop="139" handcode="client"/>
+ </function>
+
+ <function name="Finish" offset="216">
+ <glx sop="108" handcode="true"/>
+ </function>
+
+ <function name="Flush" offset="217">
+ <glx sop="142" handcode="true"/>
+ </function>
+
+ <function name="FrontFace" offset="157">
+ <param name="mode" type="GLenum"/>
+ <glx rop="84"/>
+ </function>
+
+ <function name="GetError" offset="261">
+ <return type="GLenum"/>
+ <glx sop="115" handcode="client"/>
+ </function>
+
+ <function name="GetIntegerv" offset="263">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="117" handcode="client"/>
+ </function>
+
+ <function name="GetString" offset="275">
+ <param name="name" type="GLenum"/>
+ <return type="const GLubyte *"/>
+ <glx sop="129" handcode="true"/>
+ </function>
+
+ <function name="Hint" offset="158">
+ <param name="target" type="GLenum"/>
+ <param name="mode" type="GLenum"/>
+ <glx rop="85"/>
+ </function>
+
+ <function name="LineWidth" offset="168">
+ <param name="width" type="GLfloat"/>
+ <glx rop="95"/>
+ </function>
+
+ <function name="PixelStorei" offset="250">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx sop="110" handcode="client"/>
+ </function>
+
+ <function name="ReadPixels" offset="256">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="GLvoid *" output="true" img_width="width" img_height="height" img_format="format" img_type="type" img_target="0"/>
+ <glx sop="111"/>
+ </function>
+
+ <function name="Scissor" offset="176">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="103"/>
+ </function>
+
+ <function name="StencilFunc" offset="243">
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLint"/>
+ <param name="mask" type="GLuint"/>
+ <glx rop="162"/>
+ </function>
+
+ <function name="StencilMask" offset="209">
+ <param name="mask" type="GLuint"/>
+ <glx rop="133"/>
+ </function>
+
+ <function name="StencilOp" offset="244">
+ <param name="fail" type="GLenum"/>
+ <param name="zfail" type="GLenum"/>
+ <param name="zpass" type="GLenum"/>
+ <glx rop="163"/>
+ </function>
+
+ <function name="TexParameterf" offset="178">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="105"/>
+ </function>
+
+ <function name="Viewport" offset="305">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="191"/>
+ </function>
+
+ <!-- these are not in OpenGL ES 1.0 -->
+ <enum name="LINE_WIDTH" count="1" value="0x0B21">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="CULL_FACE_MODE" count="1" value="0x0B45">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FRONT_FACE" count="1" value="0x0B46">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="DEPTH_RANGE" count="2" value="0x0B70">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="DEPTH_WRITEMASK" count="1" value="0x0B72">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="DEPTH_CLEAR_VALUE" count="1" value="0x0B73">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="DEPTH_FUNC" count="1" value="0x0B74">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_CLEAR_VALUE" count="1" value="0x0B91">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_FUNC" count="1" value="0x0B92">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_VALUE_MASK" count="1" value="0x0B93">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_FAIL" count="1" value="0x0B94">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_PASS_DEPTH_FAIL" count="1" value="0x0B95">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_PASS_DEPTH_PASS" count="1" value="0x0B96">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_REF" count="1" value="0x0B97">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_WRITEMASK" count="1" value="0x0B98">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="VIEWPORT" count="4" value="0x0BA2">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SCISSOR_BOX" count="4" value="0x0C10">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="COLOR_CLEAR_VALUE" count="4" value="0x0C22">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="COLOR_WRITEMASK" count="4" value="0x0C23">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="TexParameterfv" offset="179">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="106"/>
+ </function>
+
+ <function name="TexParameteri" offset="180">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="107"/>
+ </function>
+
+ <function name="TexParameteriv" offset="181">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="108"/>
+ </function>
+
+ <function name="GetBooleanv" offset="258">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLboolean *" output="true" variable_param="pname"/>
+ <glx sop="112" handcode="client"/>
+ </function>
+
+ <function name="GetFloatv" offset="262">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="116" handcode="client"/>
+ </function>
+
+ <function name="GetTexParameterfv" offset="282">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="136"/>
+ </function>
+
+ <function name="GetTexParameteriv" offset="283">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="137"/>
+ </function>
+
+ <function name="IsEnabled" offset="286">
+ <param name="cap" type="GLenum"/>
+ <return type="GLboolean"/>
+ <glx sop="140" handcode="client"/>
+ </function>
+</category>
+
+<!-- base subset of OpenGL 1.1 -->
+<category name="base1.1">
+ <enum name="POLYGON_OFFSET_FILL" value="0x8037"/>
+
+ <function name="BindTexture" offset="307">
+ <param name="target" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ <glx rop="4117"/>
+ </function>
+
+ <function name="CopyTexImage2D" offset="324">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <glx rop="4120"/>
+ </function>
+
+ <function name="CopyTexSubImage2D" offset="326">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="4122"/>
+ </function>
+
+ <function name="DeleteTextures" offset="327">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="textures" type="const GLuint *" count="n"/>
+ <glx sop="144"/>
+ </function>
+
+ <function name="DrawArrays" offset="310">
+ <param name="mode" type="GLenum"/>
+ <param name="first" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <glx rop="193" handcode="true"/>
+ </function>
+
+ <function name="DrawElements" offset="311">
+ <param name="mode" type="GLenum"/>
+ <param name="count" type="GLsizei"/>
+ <param name="type" type="GLenum"/>
+ <param name="indices" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="GenTextures" offset="328">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="textures" type="GLuint *" output="true" count="n"/>
+ <glx sop="145" always_array="true"/>
+ </function>
+
+ <function name="PolygonOffset" offset="319">
+ <param name="factor" type="GLfloat"/>
+ <param name="units" type="GLfloat"/>
+ <glx rop="192"/>
+ </function>
+
+ <function name="TexSubImage2D" offset="333">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="UNUSED" type="GLuint" padding="true"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_xoff="xoffset" img_yoff="yoffset" img_format="format" img_type="type" img_target="target" img_pad_dimensions="true"/>
+ <glx rop="4100" large="true"/>
+ </function>
+
+ <!-- these are not in OpenGL ES 1.0 -->
+ <enum name="POLYGON_OFFSET_UNITS" count="1" value="0x2A00">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="POLYGON_OFFSET_FACTOR" count="1" value="0x8038">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_BINDING_2D" count="1" value="0x8069">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="IsTexture" offset="330">
+ <param name="texture" type="GLuint"/>
+ <return type="GLboolean"/>
+ <glx sop="146"/>
+ </function>
+</category>
+
+<!-- base subset of OpenGL 1.2 -->
+<category name="base1.2">
+ <enum name="UNSIGNED_SHORT_4_4_4_4" value="0x8033"/>
+ <enum name="UNSIGNED_SHORT_5_5_5_1" value="0x8034"/>
+ <enum name="CLAMP_TO_EDGE" value="0x812F"/>
+ <enum name="UNSIGNED_SHORT_5_6_5" value="0x8363"/>
+ <enum name="ALIASED_POINT_SIZE_RANGE" count="2" value="0x846D">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="ALIASED_LINE_WIDTH_RANGE" count="2" value="0x846E">
+ <size name="Get" mode="get"/>
+ </enum>
+</category>
+
+<!-- base subset of OpenGL 1.3 -->
+<category name="base1.3">
+ <enum name="SAMPLE_ALPHA_TO_COVERAGE" count="1" value="0x809E">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SAMPLE_COVERAGE" count="1" value="0x80A0">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE0" value="0x84C0"/>
+ <enum name="TEXTURE1" value="0x84C1"/>
+ <enum name="TEXTURE2" value="0x84C2"/>
+ <enum name="TEXTURE3" value="0x84C3"/>
+ <enum name="TEXTURE4" value="0x84C4"/>
+ <enum name="TEXTURE5" value="0x84C5"/>
+ <enum name="TEXTURE6" value="0x84C6"/>
+ <enum name="TEXTURE7" value="0x84C7"/>
+ <enum name="TEXTURE8" value="0x84C8"/>
+ <enum name="TEXTURE9" value="0x84C9"/>
+ <enum name="TEXTURE10" value="0x84CA"/>
+ <enum name="TEXTURE11" value="0x84CB"/>
+ <enum name="TEXTURE12" value="0x84CC"/>
+ <enum name="TEXTURE13" value="0x84CD"/>
+ <enum name="TEXTURE14" value="0x84CE"/>
+ <enum name="TEXTURE15" value="0x84CF"/>
+ <enum name="TEXTURE16" value="0x84D0"/>
+ <enum name="TEXTURE17" value="0x84D1"/>
+ <enum name="TEXTURE18" value="0x84D2"/>
+ <enum name="TEXTURE19" value="0x84D3"/>
+ <enum name="TEXTURE20" value="0x84D4"/>
+ <enum name="TEXTURE21" value="0x84D5"/>
+ <enum name="TEXTURE22" value="0x84D6"/>
+ <enum name="TEXTURE23" value="0x84D7"/>
+ <enum name="TEXTURE24" value="0x84D8"/>
+ <enum name="TEXTURE25" value="0x84D9"/>
+ <enum name="TEXTURE26" value="0x84DA"/>
+ <enum name="TEXTURE27" value="0x84DB"/>
+ <enum name="TEXTURE28" value="0x84DC"/>
+ <enum name="TEXTURE29" value="0x84DD"/>
+ <enum name="TEXTURE30" value="0x84DE"/>
+ <enum name="TEXTURE31" value="0x84DF"/>
+ <enum name="NUM_COMPRESSED_TEXTURE_FORMATS" count="1" value="0x86A2">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="COMPRESSED_TEXTURE_FORMATS" count="-1" value="0x86A3">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="ActiveTexture" offset="374">
+ <param name="texture" type="GLenum"/>
+ <glx rop="197"/>
+ </function>
+
+ <function name="CompressedTexImage2D" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="imageSize" type="GLsizei" counter="true"/>
+ <param name="data" type="const GLvoid *" count="imageSize"/>
+ <glx rop="215" handcode="client"/>
+ </function>
+
+ <function name="CompressedTexSubImage2D" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="imageSize" type="GLsizei" counter="true"/>
+ <param name="data" type="const GLvoid *" count="imageSize"/>
+ <glx rop="218" handcode="client"/>
+ </function>
+
+ <function name="SampleCoverage" offset="assign">
+ <param name="value" type="GLclampf"/>
+ <param name="invert" type="GLboolean"/>
+ <glx rop="229"/>
+ </function>
+
+ <!-- these are not in OpenGL ES 1.0 -->
+ <enum name="SAMPLE_BUFFERS" count="1" value="0x80A8">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SAMPLES" count="1" value="0x80A9">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SAMPLE_COVERAGE_VALUE" count="1" value="0x80AA">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SAMPLE_COVERAGE_INVERT" count="1" value="0x80AB">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="ACTIVE_TEXTURE" count="1" value="0x84E0">
+ <size name="Get" mode="get"/>
+ </enum>
+</category>
+
+<!-- base subset of OpenGL 1.4 -->
+<category name="base1.4">
+ <enum name="GENERATE_MIPMAP_HINT" value="0x8192"/>
+</category>
+
+<!-- base subset of OpenGL 1.5 -->
+<category name="base1.5">
+ <enum name="BUFFER_SIZE" value="0x8764"/>
+ <enum name="BUFFER_USAGE" value="0x8765"/>
+ <enum name="ARRAY_BUFFER" value="0x8892"/>
+ <enum name="ELEMENT_ARRAY_BUFFER" value="0x8893"/>
+ <enum name="ARRAY_BUFFER_BINDING" value="0x8894"/>
+ <enum name="ELEMENT_ARRAY_BUFFER_BINDING" value="0x8895"/>
+ <enum name="STATIC_DRAW" value="0x88E4"/>
+ <enum name="DYNAMIC_DRAW" value="0x88E8"/>
+
+ <type name="intptr" size="4" glx_name="CARD32"/>
+ <type name="sizeiptr" size="4" glx_name="CARD32"/>
+
+ <function name="BindBuffer" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="buffer" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="BufferData" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="size" type="GLsizeiptr" counter="true"/>
+ <param name="data" type="const GLvoid *" count="size" img_null_flag="true"/>
+ <param name="usage" type="GLenum"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="BufferSubData" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="offset" type="GLintptr"/>
+ <param name="size" type="GLsizeiptr" counter="true"/>
+ <param name="data" type="const GLvoid *" count="size"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="DeleteBuffers" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="buffer" type="const GLuint *" count="n"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GenBuffers" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="buffer" type="GLuint *" output="true" count="n"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetBufferParameteriv" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="IsBuffer" offset="assign">
+ <param name="buffer" type="GLuint"/>
+ <return type="GLboolean"/>
+ <glx ignore="true"/>
+ </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/base2_API.xml b/src/mesa/es/glapi/base2_API.xml
new file mode 100644
index 00000000000..6aa43b728ab
--- /dev/null
+++ b/src/mesa/es/glapi/base2_API.xml
@@ -0,0 +1,533 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<!-- OpenGL and OpenGL ES 2.x APIs -->
+
+<OpenGLAPI>
+
+<xi:include href="base1_API.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- base subset of OpenGL 2.0 -->
+<category name="base2.0">
+ <enum name="BLEND_EQUATION_RGB" count="1" value="0x8009"> <!-- same as BLEND_EQUATION -->
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="VERTEX_ATTRIB_ARRAY_ENABLED" count="1" value="0x8622">
+ <size name="GetVertexAttribdv" mode="get"/>
+ <size name="GetVertexAttribfv" mode="get"/>
+ <size name="GetVertexAttribiv" mode="get"/>
+ </enum>
+ <enum name="VERTEX_ATTRIB_ARRAY_SIZE" count="1" value="0x8623">
+ <size name="GetVertexAttribdv" mode="get"/>
+ <size name="GetVertexAttribfv" mode="get"/>
+ <size name="GetVertexAttribiv" mode="get"/>
+ </enum>
+ <enum name="VERTEX_ATTRIB_ARRAY_STRIDE" count="1" value="0x8624">
+ <size name="GetVertexAttribdv" mode="get"/>
+ <size name="GetVertexAttribfv" mode="get"/>
+ <size name="GetVertexAttribiv" mode="get"/>
+ </enum>
+ <enum name="VERTEX_ATTRIB_ARRAY_TYPE" count="1" value="0x8625">
+ <size name="GetVertexAttribdv" mode="get"/>
+ <size name="GetVertexAttribfv" mode="get"/>
+ <size name="GetVertexAttribiv" mode="get"/>
+ </enum>
+ <enum name="CURRENT_VERTEX_ATTRIB" count="1" value="0x8626">
+ <size name="GetVertexAttribdv" mode="get"/>
+ <size name="GetVertexAttribfv" mode="get"/>
+ <size name="GetVertexAttribiv" mode="get"/>
+ </enum>
+ <enum name="VERTEX_ATTRIB_ARRAY_POINTER" value="0x8645"/>
+ <enum name="STENCIL_BACK_FUNC" count="1" value="0x8800">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_BACK_FAIL" count="1" value="0x8801">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_BACK_PASS_DEPTH_FAIL" count="1" value="0x8802">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="STENCIL_BACK_PASS_DEPTH_PASS" count="1" value="0x8803">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_EQUATION_ALPHA" count="1" value="0x883D">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_VERTEX_ATTRIBS" count="1" value="0x8869">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="VERTEX_ATTRIB_ARRAY_NORMALIZED" value="0x886A"/>
+ <enum name="MAX_TEXTURE_IMAGE_UNITS" count="1" value="0x8872">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FRAGMENT_SHADER" value="0x8B30"/>
+ <enum name="VERTEX_SHADER" value="0x8B31"/>
+ <enum name="MAX_VERTEX_TEXTURE_IMAGE_UNITS" value="0x8B4C"/>
+ <enum name="MAX_COMBINED_TEXTURE_IMAGE_UNITS" value="0x8B4D"/>
+ <enum name="SHADER_TYPE" value="0x8B4F"/>
+ <enum name="FLOAT_VEC2" value="0x8B50"/>
+ <enum name="FLOAT_VEC3" value="0x8B51"/>
+ <enum name="FLOAT_VEC4" value="0x8B52"/>
+ <enum name="INT_VEC2" value="0x8B53"/>
+ <enum name="INT_VEC3" value="0x8B54"/>
+ <enum name="INT_VEC4" value="0x8B55"/>
+ <enum name="BOOL" value="0x8B56"/>
+ <enum name="BOOL_VEC2" value="0x8B57"/>
+ <enum name="BOOL_VEC3" value="0x8B58"/>
+ <enum name="BOOL_VEC4" value="0x8B59"/>
+ <enum name="FLOAT_MAT2" value="0x8B5A"/>
+ <enum name="FLOAT_MAT3" value="0x8B5B"/>
+ <enum name="FLOAT_MAT4" value="0x8B5C"/>
+ <enum name="SAMPLER_2D" value="0x8B5E"/>
+ <enum name="SAMPLER_CUBE" value="0x8B60"/>
+ <enum name="DELETE_STATUS" value="0x8B80"/>
+ <enum name="COMPILE_STATUS" value="0x8B81"/>
+ <enum name="LINK_STATUS" value="0x8B82"/>
+ <enum name="VALIDATE_STATUS" value="0x8B83"/>
+ <enum name="INFO_LOG_LENGTH" value="0x8B84"/>
+ <enum name="ATTACHED_SHADERS" value="0x8B85"/>
+ <enum name="ACTIVE_UNIFORMS" value="0x8B86"/>
+ <enum name="ACTIVE_UNIFORM_MAX_LENGTH" value="0x8B87"/>
+ <enum name="SHADER_SOURCE_LENGTH" value="0x8B88"/>
+ <enum name="ACTIVE_ATTRIBUTES" value="0x8B89"/>
+ <enum name="ACTIVE_ATTRIBUTE_MAX_LENGTH" value="0x8B8A"/>
+ <enum name="SHADING_LANGUAGE_VERSION" value="0x8B8C"/>
+ <enum name="CURRENT_PROGRAM" value="0x8B8D"/>
+ <enum name="STENCIL_BACK_REF" value="0x8CA3"/>
+ <enum name="STENCIL_BACK_VALUE_MASK" value="0x8CA4"/>
+ <enum name="STENCIL_BACK_WRITEMASK" value="0x8CA5"/>
+
+ <type name="char" size="1" glx_name="CARD8"/>
+
+ <function name="AttachShader" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="shader" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="BindAttribLocation" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="index" type="GLuint"/>
+ <param name="name" type="const GLchar *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="BlendEquationSeparate" offset="assign">
+ <param name="modeRGB" type="GLenum"/>
+ <param name="modeA" type="GLenum"/>
+ <glx rop="4228"/>
+ </function>
+
+ <function name="CompileShader" offset="assign">
+ <param name="shader" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="CreateProgram" offset="assign">
+ <return type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="CreateShader" offset="assign">
+ <param name="type" type="GLenum"/>
+ <return type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="DeleteProgram" offset="assign">
+ <param name="program" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="DeleteShader" offset="assign">
+ <param name="program" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="DetachShader" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="shader" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="DisableVertexAttribArray" offset="assign">
+ <param name="index" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="EnableVertexAttribArray" offset="assign">
+ <param name="index" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetActiveAttrib" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="index" type="GLuint"/>
+ <param name="bufSize" type="GLsizei "/>
+ <param name="length" type="GLsizei *" output="true"/>
+ <param name="size" type="GLint *" output="true"/>
+ <param name="type" type="GLenum *" output="true"/>
+ <param name="name" type="GLchar *" output="true"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetActiveUniform" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="index" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *" output="true"/>
+ <param name="size" type="GLint *" output="true"/>
+ <param name="type" type="GLenum *" output="true"/>
+ <param name="name" type="GLchar *" output="true"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetAttachedShaders" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="maxCount" type="GLsizei"/>
+ <param name="count" type="GLsizei *" output="true"/>
+ <param name="obj" type="GLuint *" output="true"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetAttribLocation" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="name" type="const GLchar *"/>
+ <return type="GLint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetProgramiv" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetProgramInfoLog" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="infoLog" type="GLchar *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetShaderiv" offset="assign">
+ <param name="shader" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetShaderInfoLog" offset="assign">
+ <param name="shader" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="infoLog" type="GLchar *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetShaderSource" offset="assign">
+ <param name="shader" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *" output="true"/>
+ <param name="source" type="GLchar *" output="true"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetUniformfv" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="location" type="GLint"/>
+ <param name="params" type="GLfloat *" output="true"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetUniformiv" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="location" type="GLint"/>
+ <param name="params" type="GLint *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetUniformLocation" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="name" type="const GLchar *"/>
+ <return type="GLint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetVertexAttribfv" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetVertexAttribiv" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="GetVertexAttribPointerv" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="pointer" type="GLvoid **" output="true"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="IsProgram" offset="assign">
+ <param name="program" type="GLuint"/>
+ <return type="GLboolean"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="IsShader" offset="assign">
+ <param name="shader" type="GLuint"/>
+ <return type="GLboolean"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="LinkProgram" offset="assign">
+ <param name="program" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="ShaderSource" offset="assign">
+ <param name="shader" type="GLuint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="string" type="const GLchar **"/>
+ <param name="length" type="const GLint *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="StencilFuncSeparate" offset="assign">
+ <param name="face" type="GLenum"/>
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLint"/>
+ <param name="mask" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="StencilOpSeparate" offset="assign">
+ <param name="face" type="GLenum"/>
+ <param name="sfail" type="GLenum"/>
+ <param name="zfail" type="GLenum"/>
+ <param name="zpass" type="GLenum"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="StencilMaskSeparate" offset="assign">
+ <param name="face" type="GLenum"/>
+ <param name="mask" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform1f" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="v0" type="GLfloat"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform1fv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLfloat *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform1i" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="v0" type="GLint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform1iv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLint *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform2f" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="v0" type="GLfloat"/>
+ <param name="v1" type="GLfloat"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform2fv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLfloat *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform2i" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="v0" type="GLint"/>
+ <param name="v1" type="GLint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform2iv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLint *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform3f" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="v0" type="GLfloat"/>
+ <param name="v1" type="GLfloat"/>
+ <param name="v2" type="GLfloat"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform3fv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLfloat *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform3i" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="v0" type="GLint"/>
+ <param name="v1" type="GLint"/>
+ <param name="v2" type="GLint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform3iv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLint *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform4f" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="v0" type="GLfloat"/>
+ <param name="v1" type="GLfloat"/>
+ <param name="v2" type="GLfloat"/>
+ <param name="v3" type="GLfloat"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform4fv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLfloat *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform4i" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="v0" type="GLint"/>
+ <param name="v1" type="GLint"/>
+ <param name="v2" type="GLint"/>
+ <param name="v3" type="GLint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="Uniform4iv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="value" type="const GLint *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="UniformMatrix2fv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLfloat *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="UniformMatrix3fv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLfloat *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="UniformMatrix4fv" offset="assign">
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <param name="value" type="const GLfloat *"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="UseProgram" offset="assign">
+ <param name="program" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="ValidateProgram" offset="assign">
+ <param name="program" type="GLuint"/>
+ <glx ignore="true"/>
+ </function>
+
+ <function name="VertexAttrib1f" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLfloat"/>
+ </function>
+
+ <function name="VertexAttrib1fv" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLfloat *"/>
+ </function>
+
+ <function name="VertexAttrib2f" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ </function>
+
+ <function name="VertexAttrib2fv" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLfloat *"/>
+ </function>
+
+ <function name="VertexAttrib3f" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ </function>
+
+ <function name="VertexAttrib3fv" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLfloat *"/>
+ </function>
+
+ <function name="VertexAttrib4f" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <param name="w" type="GLfloat"/>
+ </function>
+
+ <function name="VertexAttrib4fv" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLfloat *"/>
+ </function>
+
+ <function name="VertexAttribPointer" offset="assign">
+ <param name="index" type="GLuint"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="normalized" type="GLboolean"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/es1_API.xml b/src/mesa/es/glapi/es1_API.xml
new file mode 100644
index 00000000000..7ee5515f197
--- /dev/null
+++ b/src/mesa/es/glapi/es1_API.xml
@@ -0,0 +1,1100 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<!-- OpenGL ES 1.x API -->
+
+<OpenGLAPI>
+
+<xi:include href="base1_API.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- core subset of OpenGL 1.3 defined in OpenGL ES 1.0 -->
+<category name="core1.0">
+ <!-- addition to base1.0 -->
+ <enum name="ADD" value="0x0104"/>
+ <enum name="STACK_OVERFLOW" value="0x0503"/>
+ <enum name="STACK_UNDERFLOW" value="0x0504"/>
+ <enum name="EXP" value="0x0800"/>
+ <enum name="EXP2" value="0x0801"/>
+ <enum name="POINT_SMOOTH" count="1" value="0x0B10">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LINE_SMOOTH" count="1" value="0x0B20">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHTING" count="1" value="0x0B50">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHT_MODEL_TWO_SIDE" count="1" value="0x0B52">
+ <size name="LightModelfv"/>
+ <size name="LightModeliv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHT_MODEL_AMBIENT" count="4" value="0x0B53">
+ <size name="LightModelfv"/>
+ <size name="LightModeliv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="COLOR_MATERIAL" count="1" value="0x0B57">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FOG" count="1" value="0x0B60">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FOG_DENSITY" count="1" value="0x0B62">
+ <size name="Fogfv"/>
+ <size name="Fogiv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FOG_START" count="1" value="0x0B63">
+ <size name="Fogfv"/>
+ <size name="Fogiv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FOG_END" count="1" value="0x0B64">
+ <size name="Fogfv"/>
+ <size name="Fogiv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FOG_MODE" count="1" value="0x0B65">
+ <size name="Fogfv"/>
+ <size name="Fogiv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FOG_COLOR" count="4" value="0x0B66">
+ <size name="Fogfv"/>
+ <size name="Fogiv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="NORMALIZE" count="1" value="0x0BA1">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="ALPHA_TEST" count="1" value="0x0BC0">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="PERSPECTIVE_CORRECTION_HINT" count="1" value="0x0C50">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="POINT_SMOOTH_HINT" count="1" value="0x0C51">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LINE_SMOOTH_HINT" count="1" value="0x0C52">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="POLYGON_SMOOTH_HINT" count="1" value="0x0C53">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FOG_HINT" count="1" value="0x0C54">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_LIGHTS" count="1" value="0x0D31">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_MODELVIEW_STACK_DEPTH" count="1" value="0x0D36">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_PROJECTION_STACK_DEPTH" count="1" value="0x0D38">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_TEXTURE_STACK_DEPTH" count="1" value="0x0D39">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="AMBIENT" count="4" value="0x1200">
+ <size name="Materialfv"/>
+ <size name="Materialiv"/>
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetMaterialfv" mode="get"/>
+ <size name="GetMaterialiv" mode="get"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="DIFFUSE" count="4" value="0x1201">
+ <size name="Materialfv"/>
+ <size name="Materialiv"/>
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetMaterialfv" mode="get"/>
+ <size name="GetMaterialiv" mode="get"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="SPECULAR" count="4" value="0x1202">
+ <size name="Materialfv"/>
+ <size name="Materialiv"/>
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetMaterialfv" mode="get"/>
+ <size name="GetMaterialiv" mode="get"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="POSITION" count="4" value="0x1203">
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="SPOT_DIRECTION" count="3" value="0x1204">
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="SPOT_EXPONENT" count="1" value="0x1205">
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="SPOT_CUTOFF" count="1" value="0x1206">
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="CONSTANT_ATTENUATION" count="1" value="0x1207">
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="LINEAR_ATTENUATION" count="1" value="0x1208">
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="QUADRATIC_ATTENUATION" count="1" value="0x1209">
+ <size name="Lightfv"/>
+ <size name="Lightiv"/>
+ <size name="GetLightfv" mode="get"/>
+ <size name="GetLightiv" mode="get"/>
+ </enum>
+ <enum name="CLEAR" value="0x1500"/>
+ <enum name="AND" value="0x1501"/>
+ <enum name="AND_REVERSE" value="0x1502"/>
+ <enum name="COPY" value="0x1503"/>
+ <enum name="AND_INVERTED" value="0x1504"/>
+ <enum name="NOOP" value="0x1505"/>
+ <enum name="XOR" value="0x1506"/>
+ <enum name="OR" value="0x1507"/>
+ <enum name="NOR" value="0x1508"/>
+ <enum name="EQUIV" value="0x1509"/>
+ <enum name="OR_REVERSE" value="0x150B"/>
+ <enum name="COPY_INVERTED" value="0x150C"/>
+ <enum name="OR_INVERTED" value="0x150D"/>
+ <enum name="NAND" value="0x150E"/>
+ <enum name="SET" value="0x150F"/>
+ <enum name="EMISSION" count="4" value="0x1600">
+ <size name="Materialfv"/>
+ <size name="Materialiv"/>
+ <size name="GetMaterialfv" mode="get"/>
+ <size name="GetMaterialiv" mode="get"/>
+ </enum>
+ <enum name="SHININESS" count="1" value="0x1601">
+ <size name="Materialfv"/>
+ <size name="Materialiv"/>
+ <size name="GetMaterialfv" mode="get"/>
+ <size name="GetMaterialiv" mode="get"/>
+ </enum>
+ <enum name="AMBIENT_AND_DIFFUSE" count="4" value="0x1602">
+ <size name="Materialfv"/>
+ <size name="Materialiv"/>
+ <size name="GetMaterialfv" mode="get"/>
+ <size name="GetMaterialiv" mode="get"/>
+ </enum>
+ <enum name="MODELVIEW" value="0x1700"/>
+ <enum name="PROJECTION" value="0x1701"/>
+ <enum name="FLAT" value="0x1D00"/>
+ <enum name="SMOOTH" value="0x1D01"/>
+ <enum name="MODULATE" value="0x2100"/>
+ <enum name="DECAL" value="0x2101"/>
+ <enum name="TEXTURE_ENV_MODE" count="1" value="0x2200">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_ENV_COLOR" count="4" value="0x2201">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_ENV" value="0x2300"/>
+ <enum name="LIGHT0" count="1" value="0x4000">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHT1" count="1" value="0x4001">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHT2" count="1" value="0x4002">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHT3" count="1" value="0x4003">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHT4" count="1" value="0x4004">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHT5" count="1" value="0x4005">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHT6" count="1" value="0x4006">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LIGHT7" count="1" value="0x4007">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="AlphaFunc" offset="240">
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLclampf"/>
+ <glx rop="159"/>
+ </function>
+
+ <function name="Color4f" offset="29" vectorequiv="Color4fv">
+ <param name="red" type="GLfloat"/>
+ <param name="green" type="GLfloat"/>
+ <param name="blue" type="GLfloat"/>
+ <param name="alpha" type="GLfloat"/>
+ </function>
+
+ <function name="Fogf" offset="153">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="80"/>
+ </function>
+
+ <function name="Fogfv" offset="154">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="81"/>
+ </function>
+
+ <function name="Lightf" offset="159">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="86"/>
+ </function>
+
+ <function name="Lightfv" offset="160">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="87"/>
+ </function>
+
+ <function name="LightModelf" offset="163">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="90"/>
+ </function>
+
+ <function name="LightModelfv" offset="164">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="91"/>
+ </function>
+
+ <function name="LoadIdentity" offset="290">
+ <glx rop="176"/>
+ </function>
+
+ <function name="LoadMatrixf" offset="291">
+ <param name="m" type="const GLfloat *" count="16"/>
+ <glx rop="177"/>
+ </function>
+
+ <function name="LogicOp" offset="242">
+ <param name="opcode" type="GLenum"/>
+ <glx rop="161"/>
+ </function>
+
+ <function name="Materialf" offset="169">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="96"/>
+ </function>
+
+ <function name="Materialfv" offset="170">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="97"/>
+ </function>
+
+ <function name="MatrixMode" offset="293">
+ <param name="mode" type="GLenum"/>
+ <glx rop="179"/>
+ </function>
+
+ <function name="MultMatrixf" offset="294">
+ <param name="m" type="const GLfloat *" count="16"/>
+ <glx rop="180"/>
+ </function>
+
+ <function name="Normal3f" offset="56" vectorequiv="Normal3fv">
+ <param name="nx" type="GLfloat"/>
+ <param name="ny" type="GLfloat"/>
+ <param name="nz" type="GLfloat"/>
+ </function>
+
+ <function name="PointSize" offset="173">
+ <param name="size" type="GLfloat"/>
+ <glx rop="100"/>
+ </function>
+
+ <function name="PopMatrix" offset="297">
+ <glx rop="183"/>
+ </function>
+
+ <function name="PushMatrix" offset="298">
+ <glx rop="184"/>
+ </function>
+
+ <function name="Rotatef" offset="300">
+ <param name="angle" type="GLfloat"/>
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <glx rop="186"/>
+ </function>
+
+ <function name="Scalef" offset="302">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <glx rop="188"/>
+ </function>
+
+ <function name="ShadeModel" offset="177">
+ <param name="mode" type="GLenum"/>
+ <glx rop="104"/>
+ </function>
+
+ <function name="TexEnvf" offset="184">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="111"/>
+ </function>
+
+ <function name="TexEnvfv" offset="185">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="112"/>
+ </function>
+
+ <function name="TexImage2D" offset="183">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_format="format" img_type="type" img_target="target" img_send_null="true" img_pad_dimensions="true"/>
+ <glx rop="110" large="true"/>
+ </function>
+
+ <function name="Translatef" offset="304">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <glx rop="190"/>
+ </function>
+
+ <!-- addition to base1.1 -->
+ <enum name="COLOR_LOGIC_OP" value="0x0BF2"/>
+ <enum name="VERTEX_ARRAY" count="1" value="0x8074">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="NORMAL_ARRAY" count="1" value="0x8075">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="COLOR_ARRAY" count="1" value="0x8076">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_COORD_ARRAY" count="1" value="0x8078">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="ColorPointer" offset="308">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="DisableClientState" offset="309">
+ <param name="array" type="GLenum"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="EnableClientState" offset="313">
+ <param name="array" type="GLenum"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="NormalPointer" offset="318">
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="TexCoordPointer" offset="320">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="VertexPointer" offset="321">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <!-- addition to base1.2 -->
+ <enum name="SMOOTH_POINT_SIZE_RANGE" count="2" value="0x0B12">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SMOOTH_LINE_WIDTH_RANGE" count="2" value="0x0B22">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="RESCALE_NORMAL" count="1" value="0x803A">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_ELEMENTS_VERTICES" count="1" value="0x80E8">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_ELEMENTS_INDICES" count="1" value="0x80E9">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <!-- addition to base1.3 -->
+ <enum name="MULTISAMPLE" count="1" value="0x809D">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SAMPLE_ALPHA_TO_ONE" count="1" value="0x809F">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_TEXTURE_UNITS" count="1" value="0x84E2">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="ClientActiveTexture" offset="375">
+ <param name="texture" type="GLenum"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="MultiTexCoord4f" offset="402" vectorequiv="MultiTexCoord4fv">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLfloat"/>
+ <param name="t" type="GLfloat"/>
+ <param name="r" type="GLfloat"/>
+ <param name="q" type="GLfloat"/>
+ </function>
+</category>
+
+<!-- core subset of OpenGL 1.5 defined in OpenGL ES 1.1 -->
+<category name="core1.1">
+ <!-- addition to base1.0 -->
+ <enum name="CURRENT_COLOR" count="4" value="0x0B00">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="CURRENT_NORMAL" count="3" value="0x0B02">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="CURRENT_TEXTURE_COORDS" count="4" value="0x0B03">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="POINT_SIZE" count="1" value="0x0B11">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SHADE_MODEL" count="1" value="0x0B54">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MATRIX_MODE" count="1" value="0x0BA0">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MODELVIEW_STACK_DEPTH" count="1" value="0x0BA3">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="PROJECTION_STACK_DEPTH" count="1" value="0x0BA4">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_STACK_DEPTH" count="1" value="0x0BA5">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MODELVIEW_MATRIX" count="16" value="0x0BA6">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="PROJECTION_MATRIX" count="16" value="0x0BA7">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_MATRIX" count="16" value="0x0BA8">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="ALPHA_TEST_FUNC" count="1" value="0x0BC1">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="ALPHA_TEST_REF" count="1" value="0x0BC2">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_DST" count="1" value="0x0BE0">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_SRC" count="1" value="0x0BE1">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="LOGIC_OP_MODE" count="1" value="0x0BF0">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="ALPHA_SCALE" count="1" value="0x0D1C">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="MAX_CLIP_PLANES" count="1" value="0x0D32">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="CLIP_PLANE0" count="1" value="0x3000">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="CLIP_PLANE1" count="1" value="0x3001">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="CLIP_PLANE2" count="1" value="0x3002">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="CLIP_PLANE3" count="1" value="0x3003">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="CLIP_PLANE4" count="1" value="0x3004">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="CLIP_PLANE5" count="1" value="0x3005">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="Color4ub" offset="35" vectorequiv="Color4ubv">
+ <param name="red" type="GLubyte"/>
+ <param name="green" type="GLubyte"/>
+ <param name="blue" type="GLubyte"/>
+ <param name="alpha" type="GLubyte"/>
+ </function>
+
+ <function name="GetLightfv" offset="264">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="118"/>
+ </function>
+
+ <function name="GetMaterialfv" offset="269">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="123"/>
+ </function>
+
+ <function name="GetTexEnvfv" offset="276">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="130"/>
+ </function>
+
+ <function name="GetTexEnviv" offset="277">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="131"/>
+ </function>
+
+ <function name="TexEnvi" offset="186">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="113"/>
+ </function>
+
+ <function name="TexEnviv" offset="187">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="114"/>
+ </function>
+
+ <!-- addition to base1.1 -->
+ <enum name="VERTEX_ARRAY_SIZE" count="1" value="0x807A">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="VERTEX_ARRAY_TYPE" count="1" value="0x807B">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="VERTEX_ARRAY_STRIDE" count="1" value="0x807C">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="NORMAL_ARRAY_TYPE" count="1" value="0x807E">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="NORMAL_ARRAY_STRIDE" count="1" value="0x807F">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="COLOR_ARRAY_SIZE" count="1" value="0x8081">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="COLOR_ARRAY_TYPE" count="1" value="0x8082">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="COLOR_ARRAY_STRIDE" count="1" value="0x8083">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_COORD_ARRAY_SIZE" count="1" value="0x8088">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_COORD_ARRAY_TYPE" count="1" value="0x8089">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_COORD_ARRAY_STRIDE" count="1" value="0x808A">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="VERTEX_ARRAY_POINTER" value="0x808E"/>
+ <enum name="NORMAL_ARRAY_POINTER" value="0x808F"/>
+ <enum name="COLOR_ARRAY_POINTER" value="0x8090"/>
+ <enum name="TEXTURE_COORD_ARRAY_POINTER" value="0x8092"/>
+
+ <function name="GetPointerv" offset="329">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLvoid **" output="true"/>
+ <glx handcode="true"/>
+ </function>
+
+ <!-- addition to base1.2 -->
+
+ <!-- addition to base1.3 -->
+ <enum name="CLIENT_ACTIVE_TEXTURE" count="1" value="0x84E1">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="SUBTRACT" value="0x84E7"/>
+ <enum name="COMBINE" value="0x8570"/>
+ <enum name="COMBINE_RGB" count="1" value="0x8571">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="COMBINE_ALPHA" count="1" value="0x8572">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="RGB_SCALE" count="1" value="0x8573">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="ADD_SIGNED" value="0x8574"/>
+ <enum name="INTERPOLATE" value="0x8575"/>
+ <enum name="CONSTANT" value="0x8576"/>
+ <enum name="PRIMARY_COLOR" value="0x8577"/>
+ <enum name="PREVIOUS" value="0x8578"/>
+ <enum name="OPERAND0_RGB" count="1" value="0x8590">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="OPERAND1_RGB" count="1" value="0x8591">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="OPERAND2_RGB" count="1" value="0x8592">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="OPERAND0_ALPHA" count="1" value="0x8598">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="OPERAND1_ALPHA" count="1" value="0x8599">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="OPERAND2_ALPHA" count="1" value="0x859A">
+ <size name="TexEnvfv"/>
+ <size name="TexEnviv"/>
+ <size name="GetTexEnvfv" mode="get"/>
+ <size name="GetTexEnviv" mode="get"/>
+ </enum>
+ <enum name="DOT3_RGB" value="0x86AE"/>
+ <enum name="DOT3_RGBA" value="0x86AF"/>
+
+ <!-- addition to base1.4 -->
+ <enum name="POINT_SIZE_MIN" count="1" value="0x8126">
+ <size name="PointParameterfv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="POINT_SIZE_MAX" count="1" value="0x8127">
+ <size name="PointParameterfv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="POINT_FADE_THRESHOLD_SIZE" count="1" value="0x8128">
+ <size name="PointParameterfv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="POINT_DISTANCE_ATTENUATION" count="3" value="0x8129">
+ <size name="PointParameterfv"/>
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="GENERATE_MIPMAP" count="1" value="0x8191">
+ <size name="TexParameterfv"/>
+ <size name="TexParameteriv"/>
+ <size name="GetTexParameterfv" mode="get"/>
+ <size name="GetTexParameteriv" mode="get"/>
+ </enum>
+
+ <function name="PointParameterf" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="2065"/>
+ </function>
+
+ <function name="PointParameterfv" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="2066"/>
+ </function>
+
+ <!-- addition to base1.5 -->
+ <enum name="SRC0_RGB" value="0x8580"/>
+ <enum name="SRC1_RGB" value="0x8581"/>
+ <enum name="SRC2_RGB" value="0x8582"/>
+ <enum name="SRC0_ALPHA" value="0x8588"/>
+ <enum name="SRC1_ALPHA" value="0x8589"/>
+ <enum name="SRC2_ALPHA" value="0x858A"/>
+ <enum name="VERTEX_ARRAY_BUFFER_BINDING" count="1" value="0x8896">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="NORMAL_ARRAY_BUFFER_BINDING" count="1" value="0x8897">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="COLOR_ARRAY_BUFFER_BINDING" count="1" value="0x8898">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_COORD_ARRAY_BUFFER_BINDING" count="1" value="0x889A">
+ <size name="Get" mode="get"/>
+ </enum>
+</category>
+
+<!-- OpenGL ES 1.0 -->
+<category name="es1.0">
+ <!-- addition to core1.0 -->
+
+ <!-- from GL_OES_fixed_point -->
+ <enum name="FIXED" value="0x140C"/>
+
+ <type name="fixed" size="4" />
+ <type name="clampx" size="4" />
+
+ <function name="AlphaFuncx" offset="assign">
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLclampx"/>
+ </function>
+
+ <function name="ClearColorx" offset="assign">
+ <param name="red" type="GLclampx"/>
+ <param name="green" type="GLclampx"/>
+ <param name="blue" type="GLclampx"/>
+ <param name="alpha" type="GLclampx"/>
+ </function>
+
+ <function name="ClearDepthx" offset="assign">
+ <param name="depth" type="GLclampx"/>
+ </function>
+
+ <function name="Color4x" offset="assign">
+ <param name="red" type="GLfixed"/>
+ <param name="green" type="GLfixed"/>
+ <param name="blue" type="GLfixed"/>
+ <param name="alpha" type="GLfixed"/>
+ </function>
+
+ <function name="DepthRangex" offset="assign">
+ <param name="zNear" type="GLclampx"/>
+ <param name="zFar" type="GLclampx"/>
+ </function>
+
+ <function name="Fogx" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="Fogxv" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="Frustumx" offset="assign">
+ <param name="left" type="GLfixed"/>
+ <param name="right" type="GLfixed"/>
+ <param name="bottom" type="GLfixed"/>
+ <param name="top" type="GLfixed"/>
+ <param name="zNear" type="GLfixed"/>
+ <param name="zFar" type="GLfixed"/>
+ </function>
+
+ <function name="LightModelx" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="LightModelxv" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="Lightx" offset="assign">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="Lightxv" offset="assign">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="LineWidthx" offset="assign">
+ <param name="width" type="GLfixed"/>
+ </function>
+
+ <function name="LoadMatrixx" offset="assign">
+ <param name="m" type="const GLfixed *" count="16"/>
+ </function>
+
+ <function name="Materialx" offset="assign">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="Materialxv" offset="assign">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="MultMatrixx" offset="assign">
+ <param name="m" type="const GLfixed *" count="16"/>
+ </function>
+
+ <function name="MultiTexCoord4x" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLfixed"/>
+ <param name="t" type="GLfixed"/>
+ <param name="r" type="GLfixed"/>
+ <param name="q" type="GLfixed"/>
+ </function>
+
+ <function name="Normal3x" offset="assign">
+ <param name="nx" type="GLfixed"/>
+ <param name="ny" type="GLfixed"/>
+ <param name="nz" type="GLfixed"/>
+ </function>
+
+ <function name="Orthox" offset="assign">
+ <param name="left" type="GLfixed"/>
+ <param name="right" type="GLfixed"/>
+ <param name="bottom" type="GLfixed"/>
+ <param name="top" type="GLfixed"/>
+ <param name="zNear" type="GLfixed"/>
+ <param name="zFar" type="GLfixed"/>
+ </function>
+
+ <function name="PointSizex" offset="assign">
+ <param name="size" type="GLfixed"/>
+ </function>
+
+ <function name="PolygonOffsetx" offset="assign">
+ <param name="factor" type="GLfixed"/>
+ <param name="units" type="GLfixed"/>
+ </function>
+
+ <function name="Rotatex" offset="assign">
+ <param name="angle" type="GLfixed"/>
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <function name="SampleCoveragex" offset="assign">
+ <param name="value" type="GLclampx"/>
+ <param name="invert" type="GLboolean"/>
+ </function>
+
+ <function name="Scalex" offset="assign">
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <function name="TexEnvx" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="TexEnvxv" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="TexParameterx" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="Translatex" offset="assign">
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <!-- from GL_OES_single_precision -->
+ <function name="ClearDepthf" offset="assign">
+ <param name="depth" type="GLclampf"/>
+ </function>
+
+ <function name="DepthRangef" offset="assign">
+ <param name="zNear" type="GLclampf"/>
+ <param name="zFar" type="GLclampf"/>
+ </function>
+
+ <function name="Frustumf" offset="assign">
+ <param name="left" type="GLfloat"/>
+ <param name="right" type="GLfloat"/>
+ <param name="bottom" type="GLfloat"/>
+ <param name="top" type="GLfloat"/>
+ <param name="zNear" type="GLfloat"/>
+ <param name="zFar" type="GLfloat"/>
+ </function>
+
+ <function name="Orthof" offset="assign">
+ <param name="left" type="GLfloat"/>
+ <param name="right" type="GLfloat"/>
+ <param name="bottom" type="GLfloat"/>
+ <param name="top" type="GLfloat"/>
+ <param name="zNear" type="GLfloat"/>
+ <param name="zFar" type="GLfloat"/>
+ </function>
+</category>
+
+<!-- OpenGL ES 1.1 -->
+<category name="es1.1">
+ <!-- addition to core1.1 -->
+
+ <!-- from GL_OES_fixed_point -->
+ <function name="ClipPlanex" offset="assign">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="const GLfixed *" count="4"/>
+ </function>
+
+ <function name="GetClipPlanex" offset="assign">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="GLfixed *" output="true" count="4"/>
+ </function>
+
+ <function name="GetFixedv" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetLightxv" offset="assign">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetMaterialxv" offset="assign">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetTexEnvxv" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetTexParameterxv" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="PointParameterx" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="PointParameterxv" offset="assign">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *"/>
+ </function>
+
+ <function name="TexParameterxv" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <!-- from GL_OES_matrix_get -->
+ <enum name="MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898D"/>
+ <enum name="PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898E"/>
+ <enum name="TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898F"/>
+
+ <!-- from GL_OES_single_precision -->
+ <function name="ClipPlanef" offset="assign">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="const GLfloat *" count="4"/>
+ </function>
+
+ <function name="GetClipPlanef" offset="assign">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="GLfloat *" output="true" count="4"/>
+ </function>
+</category>
+
+<xi:include href="es1_EXT.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="es1_COMPAT.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/es1_COMPAT.xml b/src/mesa/es/glapi/es1_COMPAT.xml
new file mode 100644
index 00000000000..4fc9223cc06
--- /dev/null
+++ b/src/mesa/es/glapi/es1_COMPAT.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<OpenGLAPI>
+
+<!-- This file defines the functions that are needed by Mesa. It
+ makes sure the generated glapi headers are compatible with Mesa.
+ It mainly consists of missing functions and aliases in OpenGL ES.
+-->
+
+<xi:include href="es_COMPAT.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- except for those defined by es_COMPAT.xml, these are also needed -->
+<category name="compat">
+ <!-- OpenGL 1.0 -->
+ <function name="TexGenf" alias="TexGenfOES" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="117"/>
+ </function>
+
+ <function name="TexGenfv" alias="TexGenfvOES" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="118"/>
+ </function>
+
+ <function name="TexGeni" alias="TexGeniOES" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="119"/>
+ </function>
+
+ <function name="TexGeniv" alias="TexGenivOES" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="120"/>
+ </function>
+
+ <function name="GetTexGenfv" alias="GetTexGenfvOES" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="133"/>
+ </function>
+
+ <function name="GetTexGeniv" alias="GetTexGenivOES" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="134"/>
+ </function>
+
+ <!-- OpenGL 1.2 -->
+ <function name="BlendColor" offset="336" static_dispatch="false">
+ <param name="red" type="GLclampf"/>
+ <param name="green" type="GLclampf"/>
+ <param name="blue" type="GLclampf"/>
+ <param name="alpha" type="GLclampf"/>
+ <glx rop="4096"/>
+ </function>
+
+ <function name="BlendEquation" alias="BlendEquationOES" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="4097"/>
+ </function>
+
+ <function name="TexImage3D" offset="371" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_depth="depth" img_format="format" img_type="type" img_target="target" img_null_flag="true" img_pad_dimensions="true"/>
+ <glx rop="4114" large="true"/>
+ </function>
+
+ <function name="TexSubImage3D" offset="372" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="UNUSED" type="GLuint" padding="true"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_depth="depth" img_xoff="xoffset" img_yoff="yoffset" img_zoff="zoffset" img_format="format" img_type="type" img_target="target" img_pad_dimensions="true"/>
+ <glx rop="4115" large="true"/>
+ </function>
+
+ <function name="CopyTexSubImage3D" offset="373" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="4123"/>
+ </function>
+
+ <!-- GL_ARB_multitexture -->
+ <function name="ActiveTextureARB" alias="ActiveTexture" static_dispatch="false">
+ <param name="texture" type="GLenum"/>
+ <glx rop="197"/>
+ </function>
+
+ <function name="ClientActiveTextureARB" alias="ClientActiveTexture" static_dispatch="false">
+ <param name="texture" type="GLenum"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="MultiTexCoord4fARB" alias="MultiTexCoord4f" vectorequiv="MultiTexCoord4fvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLfloat"/>
+ <param name="t" type="GLfloat"/>
+ <param name="r" type="GLfloat"/>
+ <param name="q" type="GLfloat"/>
+ </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/es1_EXT.xml b/src/mesa/es/glapi/es1_EXT.xml
new file mode 100644
index 00000000000..de4868cfd4d
--- /dev/null
+++ b/src/mesa/es/glapi/es1_EXT.xml
@@ -0,0 +1,699 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<!-- OpenGL ES 1.x extensions -->
+
+<OpenGLAPI>
+
+<xi:include href="es_EXT.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- part of es1.1 extension pack -->
+<category name="GL_OES_blend_equation_separate" number="1">
+ <enum name="BLEND_EQUATION_RGB_OES" count="1" value="0x8009">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_EQUATION_ALPHA_OES" count="1" value="0x883D">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="BlendEquationSeparateOES" offset="assign">
+ <param name="modeRGB" type="GLenum"/>
+ <param name="modeA" type="GLenum"/>
+ <glx rop="4228"/>
+ </function>
+</category>
+
+<!-- part of es1.1 extension pack -->
+<category name="GL_OES_blend_func_separate" number="2">
+ <enum name="BLEND_DST_RGB_OES" count="1" value="0x80C8">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_SRC_RGB_OES" count="1" value="0x80C9">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_DST_ALPHA_OES" count="1" value="0x80CA">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_SRC_ALPHA_OES" count="1" value="0x80CB">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <function name="BlendFuncSeparateOES" offset="assign">
+ <param name="sfactorRGB" type="GLenum"/>
+ <param name="dfactorRGB" type="GLenum"/>
+ <param name="sfactorAlpha" type="GLenum"/>
+ <param name="dfactorAlpha" type="GLenum"/>
+ <glx rop="4134"/>
+ </function>
+</category>
+
+<!-- part of es1.1 extension pack -->
+<category name="GL_OES_blend_subtract" number="3">
+ <enum name="FUNC_ADD_OES" value="0x8006"/>
+ <enum name="BLEND_EQUATION_OES" count="1" value="0x8009">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FUNC_SUBTRACT_OES" value="0x800A"/>
+ <enum name="FUNC_REVERSE_SUBTRACT_OES" value="0x800B"/>
+
+ <function name="BlendEquationOES" offset="337">
+ <param name="mode" type="GLenum"/>
+ <glx rop="4097"/>
+ </function>
+</category>
+
+<!-- core addition to es1.0 and later -->
+<category name="GL_OES_byte_coordinates" number="4">
+ <enum name="BYTE" value="0x1400"/>
+</category>
+
+<!-- optional for es1.1 -->
+<category name="GL_OES_draw_texture" number="7">
+ <enum name="TEXTURE_CROP_RECT_OES" value="0x8B9D"/>
+
+ <function name="DrawTexiOES" offset="assign">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="z" type="GLint"/>
+ <param name="width" type="GLint"/>
+ <param name="height" type="GLint"/>
+ </function>
+
+ <function name="DrawTexivOES" offset="assign">
+ <param name="coords" type="const GLint *" count="5"/>
+ </function>
+
+ <function name="DrawTexfOES" offset="assign">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <param name="width" type="GLfloat"/>
+ <param name="height" type="GLfloat"/>
+ </function>
+
+ <function name="DrawTexfvOES" offset="assign">
+ <param name="coords" type="const GLfloat *" count="5"/>
+ </function>
+
+ <function name="DrawTexsOES" offset="assign">
+ <param name="x" type="GLshort"/>
+ <param name="y" type="GLshort"/>
+ <param name="z" type="GLshort"/>
+ <param name="width" type="GLshort"/>
+ <param name="height" type="GLshort"/>
+ </function>
+
+ <function name="DrawTexsvOES" offset="assign">
+ <param name="coords" type="const GLshort *" count="5"/>
+ </function>
+
+ <function name="DrawTexxOES" offset="assign">
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ <param name="width" type="GLfixed"/>
+ <param name="height" type="GLfixed"/>
+ </function>
+
+ <function name="DrawTexxvOES" offset="assign">
+ <param name="coords" type="const GLfixed *" count="5"/>
+ </function>
+
+ <!-- TexParameter{ifx}v is skipped here -->
+</category>
+
+<!-- core addition to es1.0 and later -->
+<category name="GL_OES_fixed_point" number="9">
+ <enum name="FIXED_OES" value="0x140C"/>
+
+ <!-- additon to es1.0 -->
+ <function name="AlphaFuncxOES" alias="AlphaFuncx">
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLclampx"/>
+ </function>
+
+ <function name="ClearColorxOES" alias="ClearColorx">
+ <param name="red" type="GLclampx"/>
+ <param name="green" type="GLclampx"/>
+ <param name="blue" type="GLclampx"/>
+ <param name="alpha" type="GLclampx"/>
+ </function>
+
+ <function name="ClearDepthxOES" alias="ClearDepthx">
+ <param name="depth" type="GLclampx"/>
+ </function>
+
+ <function name="Color4xOES" alias="Color4x">
+ <param name="red" type="GLfixed"/>
+ <param name="green" type="GLfixed"/>
+ <param name="blue" type="GLfixed"/>
+ <param name="alpha" type="GLfixed"/>
+ </function>
+
+ <function name="DepthRangexOES" alias="DepthRangex">
+ <param name="zNear" type="GLclampx"/>
+ <param name="zFar" type="GLclampx"/>
+ </function>
+
+ <function name="FogxOES" alias="Fogx">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="FogxvOES" alias="Fogxv">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="FrustumxOES" alias="Frustumx">
+ <param name="left" type="GLfixed"/>
+ <param name="right" type="GLfixed"/>
+ <param name="bottom" type="GLfixed"/>
+ <param name="top" type="GLfixed"/>
+ <param name="zNear" type="GLfixed"/>
+ <param name="zFar" type="GLfixed"/>
+ </function>
+
+ <function name="LightModelxOES" alias="LightModelx">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="LightModelxvOES" alias="LightModelxv">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="LightxOES" alias="Lightx">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="LightxvOES" alias="Lightxv">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="LineWidthxOES" alias="LineWidthx">
+ <param name="width" type="GLfixed"/>
+ </function>
+
+ <function name="LoadMatrixxOES" alias="LoadMatrixx">
+ <param name="m" type="const GLfixed *" count="16"/>
+ </function>
+
+ <function name="MaterialxOES" alias="Materialx">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="MaterialxvOES" alias="Materialxv">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="MultiTexCoord4xOES" alias="MultiTexCoord4x">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLfixed"/>
+ <param name="t" type="GLfixed"/>
+ <param name="r" type="GLfixed"/>
+ <param name="q" type="GLfixed"/>
+ </function>
+
+ <function name="MultMatrixxOES" alias="MultMatrixx">
+ <param name="m" type="const GLfixed *" count="16"/>
+ </function>
+
+ <function name="Normal3xOES" alias="Normal3x">
+ <param name="nx" type="GLfixed"/>
+ <param name="ny" type="GLfixed"/>
+ <param name="nz" type="GLfixed"/>
+ </function>
+
+ <function name="OrthoxOES" alias="Orthox">
+ <param name="left" type="GLfixed"/>
+ <param name="right" type="GLfixed"/>
+ <param name="bottom" type="GLfixed"/>
+ <param name="top" type="GLfixed"/>
+ <param name="zNear" type="GLfixed"/>
+ <param name="zFar" type="GLfixed"/>
+ </function>
+
+ <function name="PointSizexOES" alias="PointSizex">
+ <param name="size" type="GLfixed"/>
+ </function>
+
+ <function name="PolygonOffsetxOES" alias="PolygonOffsetx">
+ <param name="factor" type="GLfixed"/>
+ <param name="units" type="GLfixed"/>
+ </function>
+
+ <function name="RotatexOES" alias="Rotatex">
+ <param name="angle" type="GLfixed"/>
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <function name="SampleCoveragexOES" alias="SampleCoveragex">
+ <param name="value" type="GLclampx"/>
+ <param name="invert" type="GLboolean"/>
+ </function>
+
+ <function name="ScalexOES" alias="Scalex">
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <function name="TexEnvxOES" alias="TexEnvx">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="TexEnvxvOES" alias="TexEnvxv">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+
+ <function name="TexParameterxOES" alias="TexParameterx">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="TranslatexOES" alias="Translatex">
+ <param name="x" type="GLfixed"/>
+ <param name="y" type="GLfixed"/>
+ <param name="z" type="GLfixed"/>
+ </function>
+
+ <!-- additon to es1.1 -->
+ <function name="ClipPlanexOES" alias="ClipPlanex">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="const GLfixed *" count="4"/>
+ </function>
+
+ <function name="GetClipPlanexOES" alias="GetClipPlanex">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="GLfixed *" output="true" count="4"/>
+ </function>
+
+ <function name="GetFixedvOES" alias="GetFixedv">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetLightxvOES" alias="GetLightxv">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetMaterialxvOES" alias="GetMaterialxv">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetTexEnvxvOES" alias="GetTexEnvxv">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="GetTexParameterxvOES" alias="GetTexParameterxv">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="PointParameterxOES" alias="PointParameterx">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfixed"/>
+ </function>
+
+ <function name="PointParameterxvOES" alias="PointParameterxv">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *"/>
+ </function>
+
+ <function name="TexParameterxvOES" alias="TexParameterxv">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+</category>
+
+<!-- part of es1.1 extension pack -->
+<category name="GL_OES_framebuffer_object" number="10">
+ <enum name="NONE_OES" value="0"/>
+ <enum name="INVALID_FRAMEBUFFER_OPERATION_OES" value="0x0506"/>
+ <enum name="RGBA4_OES" value="0x8056"/>
+ <enum name="RGB5_A1_OES" value="0x8057"/>
+ <enum name="DEPTH_COMPONENT16_OES" value="0x81A5"/>
+
+ <enum name="MAX_RENDERBUFFER_SIZE_OES" value="0x84E8"/>
+ <enum name="FRAMEBUFFER_BINDING_OES" value="0x8CA6"/>
+ <enum name="RENDERBUFFER_BINDING_OES" value="0x8CA7"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES" value="0x8CD0"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES" value="0x8CD1"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES" value="0x8CD2"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES" value="0x8CD3"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES" value="0x8CD4"/>
+ <enum name="FRAMEBUFFER_COMPLETE_OES" value="0x8CD5"/>
+ <enum name="FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES" value="0x8CD6"/>
+ <enum name="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES" value="0x8CD7"/>
+ <enum name="FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES" value="0x8CD9"/>
+ <enum name="FRAMEBUFFER_INCOMPLETE_FORMATS_OES" value="0x8CDA"/>
+ <enum name="FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES" value="0x8CDB"/>
+ <enum name="FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES" value="0x8CDC"/>
+ <enum name="FRAMEBUFFER_UNSUPPORTED_OES" value="0x8CDD"/>
+ <enum name="COLOR_ATTACHMENT0_OES" value="0x8CE0"/>
+ <enum name="DEPTH_ATTACHMENT_OES" value="0x8D00"/>
+ <enum name="STENCIL_ATTACHMENT_OES" value="0x8D20"/>
+ <enum name="FRAMEBUFFER_OES" value="0x8D40"/>
+ <enum name="RENDERBUFFER_OES" value="0x8D41"/>
+ <enum name="RENDERBUFFER_WIDTH_OES" value="0x8D42"/>
+ <enum name="RENDERBUFFER_HEIGHT_OES" value="0x8D43"/>
+ <enum name="RENDERBUFFER_INTERNAL_FORMAT_OES" value="0x8D44"/>
+ <enum name="STENCIL_INDEX1_OES" value="0x8D46"/>
+ <enum name="STENCIL_INDEX4_OES" value="0x8D47"/>
+ <enum name="STENCIL_INDEX8_OES" value="0x8D48"/>
+ <enum name="RENDERBUFFER_RED_SIZE_OES" value="0x8D50"/>
+ <enum name="RENDERBUFFER_GREEN_SIZE_OES" value="0x8D51"/>
+ <enum name="RENDERBUFFER_BLUE_SIZE_OES" value="0x8D52"/>
+ <enum name="RENDERBUFFER_ALPHA_SIZE_OES" value="0x8D53"/>
+ <enum name="RENDERBUFFER_DEPTH_SIZE_OES" value="0x8D54"/>
+ <enum name="RENDERBUFFER_STENCIL_SIZE_OES" value="0x8D55"/>
+ <enum name="RGB565_OES" value="0x8D62"/>
+
+ <function name="BindFramebufferOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="framebuffer" type="GLuint"/>
+ </function>
+
+ <function name="BindRenderbufferOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </function>
+
+ <function name="CheckFramebufferStatusOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <return type="GLenum"/>
+ </function>
+
+ <function name="DeleteFramebuffersOES" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="framebuffers" type="const GLuint *" count="n"/>
+ </function>
+
+ <function name="DeleteRenderbuffersOES" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="renderbuffers" type="const GLuint *" count="n"/>
+ </function>
+
+ <function name="FramebufferRenderbufferOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="renderbuffertarget" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </function>
+
+ <function name="FramebufferTexture2DOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="textarget" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ </function>
+
+ <function name="GenerateMipmapOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ </function>
+
+ <function name="GenFramebuffersOES" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="framebuffers" type="GLuint *" count="n" output="true"/>
+ </function>
+
+ <function name="GenRenderbuffersOES" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="renderbuffers" type="GLuint *" count="n" output="true"/>
+ </function>
+
+ <function name="GetFramebufferAttachmentParameterivOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true"/>
+ </function>
+
+ <function name="GetRenderbufferParameterivOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true"/>
+ </function>
+
+ <function name="IsFramebufferOES" offset="assign">
+ <param name="framebuffer" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+
+ <function name="IsRenderbufferOES" offset="assign">
+ <param name="renderbuffer" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+
+ <function name="RenderbufferStorageOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </function>
+</category>
+
+<!-- core addition to es1.1 -->
+<category name="GL_OES_matrix_get" number="11">
+ <enum name="MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898D"/>
+ <enum name="PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898E"/>
+ <enum name="TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES" value="0x898F"/>
+</category>
+
+<!-- optional for es1.1 -->
+<category name="GL_OES_matrix_palette" number="12">
+ <enum name="MAX_VERTEX_UNITS_OES" value="0x86A4"/>
+ <enum name="WEIGHT_ARRAY_TYPE_OES" value="0x86A9"/>
+ <enum name="WEIGHT_ARRAY_STRIDE_OES" value="0x86AA"/>
+ <enum name="WEIGHT_ARRAY_SIZE_OES" value="0x86AB"/>
+ <enum name="WEIGHT_ARRAY_POINTER_OES" value="0x86AC"/>
+ <enum name="WEIGHT_ARRAY_OES" value="0x86AD"/>
+ <enum name="MATRIX_PALETTE_OES" value="0x8840"/>
+ <enum name="MAX_PALETTE_MATRICES_OES" value="0x8842"/>
+ <enum name="CURRENT_PALETTE_MATRIX_OES" value="0x8843"/>
+ <enum name="MATRIX_INDEX_ARRAY_OES" value="0x8844"/>
+ <enum name="MATRIX_INDEX_ARRAY_SIZE_OES" value="0x8846"/>
+ <enum name="MATRIX_INDEX_ARRAY_TYPE_OES" value="0x8847"/>
+ <enum name="MATRIX_INDEX_ARRAY_STRIDE_OES" value="0x8848"/>
+ <enum name="MATRIX_INDEX_ARRAY_POINTER_OES" value="0x8849"/>
+ <enum name="WEIGHT_ARRAY_BUFFER_BINDING_OES" value="0x889E"/>
+ <enum name="MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES" value="0x8B9E"/>
+
+ <function name="CurrentPaletteMatrixOES">
+ <param name="matrixpaletteindex" type="GLuint"/>
+ </function>
+
+ <function name="LoadPaletteFromModelViewMatrixOES">
+ </function>
+
+ <function name="MatrixIndexPointerOES">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </function>
+
+ <function name="WeightPointerOES">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </function>
+</category>
+
+<!-- required for es1.1 -->
+<category name="GL_OES_point_size_array" number="14">
+ <enum name="POINT_SIZE_ARRAY_TYPE_OES" value="0x898A"/>
+ <enum name="POINT_SIZE_ARRAY_STRIDE_OES" value="0x898B"/>
+ <enum name="POINT_SIZE_ARRAY_POINTER_OES" value="0x898C"/>
+ <enum name="POINT_SIZE_ARRAY_OES" value="0x8B9C"/>
+ <enum name="POINT_SIZE_ARRAY_BUFFER_BINDING_OES" value="0x8B9F"/>
+
+ <function name="PointSizePointerOES" offset="assign">
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </function>
+</category>
+
+<!-- required for es1.1 -->
+<category name="GL_OES_point_sprite" number="15">
+ <enum name="POINT_SPRITE_OES" value="0x8861"/>
+ <enum name="COORD_REPLACE_OES" value="0x8862"/>
+</category>
+
+<!-- optional for es1.0 -->
+<category name="GL_OES_query_matrix" number="16">
+ <function name="QueryMatrixxOES" offset="assign">
+ <param name="mantissa" type="GLfixed *" count="16" />
+ <param name="exponent" type="GLint *" count="16" />
+ <return type="GLbitfield"/>
+ </function>
+</category>
+
+<!-- required for es1.0 and later -->
+<category name="GL_OES_read_format" number="17">
+ <enum name="IMPLEMENTATION_COLOR_READ_TYPE_OES" value="0x8B9A"/>
+ <enum name="IMPLEMENTATION_COLOR_READ_FORMAT_OES" value="0x8B9B"/>
+</category>
+
+<!-- core addition to es1.0 and later -->
+<category name="GL_OES_single_precision" number="18">
+ <!-- additon to es1.0 -->
+ <function name="ClearDepthfOES" alias="ClearDepthf">
+ <param name="depth" type="GLclampf"/>
+ </function>
+
+ <function name="DepthRangefOES" alias="DepthRangef">
+ <param name="zNear" type="GLclampf"/>
+ <param name="zFar" type="GLclampf"/>
+ </function>
+
+ <function name="FrustumfOES" alias="Frustumf">
+ <param name="left" type="GLfloat"/>
+ <param name="right" type="GLfloat"/>
+ <param name="bottom" type="GLfloat"/>
+ <param name="top" type="GLfloat"/>
+ <param name="zNear" type="GLfloat"/>
+ <param name="zFar" type="GLfloat"/>
+ </function>
+
+ <function name="OrthofOES" alias="Orthof">
+ <param name="left" type="GLfloat"/>
+ <param name="right" type="GLfloat"/>
+ <param name="bottom" type="GLfloat"/>
+ <param name="top" type="GLfloat"/>
+ <param name="zNear" type="GLfloat"/>
+ <param name="zFar" type="GLfloat"/>
+ </function>
+
+ <!-- additon to es1.1 -->
+ <function name="ClipPlanefOES" alias="ClipPlanef">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="const GLfloat *" count="4"/>
+ </function>
+
+ <function name="GetClipPlanefOES" alias="GetClipPlanef">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="GLfloat *" output="true" count="4"/>
+ </function>
+</category>
+
+<!-- part of es1.1 extension pack -->
+<category name="GL_OES_texture_cube_map" number="20">
+ <enum name="TEXTURE_GEN_MODE_OES" value="0x2500"/>
+ <enum name="NORMAL_MAP_OES" value="0x8511"/>
+ <enum name="REFLECTION_MAP_OES" value="0x8512"/>
+ <enum name="TEXTURE_CUBE_MAP_OES" value="0x8513"/>
+ <enum name="TEXTURE_BINDING_CUBE_MAP_OES" value="0x8514"/>
+ <enum name="TEXTURE_CUBE_MAP_POSITIVE_X_OES" value="0x8515"/>
+ <enum name="TEXTURE_CUBE_MAP_NEGATIVE_X_OES" value="0x8516"/>
+ <enum name="TEXTURE_CUBE_MAP_POSITIVE_Y_OES" value="0x8517"/>
+ <enum name="TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" value="0x8518"/>
+ <enum name="TEXTURE_CUBE_MAP_POSITIVE_Z_OES" value="0x8519"/>
+ <enum name="TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" value="0x851A"/>
+ <enum name="MAX_CUBE_MAP_TEXTURE_SIZE_OES" value="0x851C"/>
+ <enum name="TEXTURE_GEN_STR_OES" value="0x8D60"/>
+
+ <function name="GetTexGenfvOES" offset="279">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="133"/>
+ </function>
+
+ <function name="GetTexGenivOES" offset="280">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="134"/>
+ </function>
+
+ <function name="GetTexGenxvOES" offset="assign">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfixed *" output="true" variable_param="pname"/>
+ </function>
+
+ <function name="TexGenfOES" offset="190">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="117"/>
+ </function>
+
+ <function name="TexGenfvOES" offset="191">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="118"/>
+ </function>
+
+ <function name="TexGeniOES" offset="192">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="119"/>
+ </function>
+
+ <function name="TexGenivOES" offset="193">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="120"/>
+ </function>
+
+ <function name="TexGenxOES" offset="assign">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ </function>
+
+ <function name="TexGenxvOES" offset="assign">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfixed *" variable_param="pname"/>
+ </function>
+</category>
+
+<category name="GL_OES_texture_env_crossbar" number="21">
+ <!-- No new functions, types, enums. -->
+</category>
+
+<category name="GL_OES_texture_mirrored_repeat" number="22">
+ <!-- No new functions, types, enums. -->
+</category>
+
+<category name="GL_EXT_texture_lod_bias" number="60">
+ <enum name="TEXTURE_FILTER_CONTROL_EXT" value="0x8500"/>
+ <enum name="TEXTURE_LOD_BIAS_EXT" value="0x8501"/>
+ <enum name="MAX_TEXTURE_LOD_BIAS_EXT" value="0x84FD"/>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/es2_API.xml b/src/mesa/es/glapi/es2_API.xml
new file mode 100644
index 00000000000..266c07613ce
--- /dev/null
+++ b/src/mesa/es/glapi/es2_API.xml
@@ -0,0 +1,294 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<!-- OpenGL ES 2.x API -->
+
+<OpenGLAPI>
+
+<xi:include href="base2_API.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- core subset of OpenGL 2.0 defined in OpenGL ES 2.0 -->
+<category name="core2.0">
+ <!-- addition to base1.0 -->
+ <enum name="NONE" value="0x0"/>
+ <enum name="INT" count="4" value="0x1404">
+ <size name="CallLists"/>
+ </enum>
+ <enum name="UNSIGNED_INT" count="4" value="0x1405">
+ <size name="CallLists"/>
+ </enum>
+ <enum name="STENCIL_INDEX" value="0x1901"/>
+ <enum name="DEPTH_COMPONENT" value="0x1902"/>
+
+ <function name="TexImage2D" offset="183">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLint"/> <!-- XXX the actual type is GLenum... -->
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_format="format" img_type="type" img_target="target" img_send_null="true" img_pad_dimensions="true"/>
+ <glx rop="110" large="true"/>
+ </function>
+
+ <!-- addition to base1.1 -->
+ <enum name="RGBA4" value="0x8056"/>
+ <enum name="RGB5_A1" value="0x8057"/>
+
+ <!-- addition to base1.2 -->
+ <enum name="CONSTANT_COLOR" value="0x8001"/>
+ <enum name="ONE_MINUS_CONSTANT_COLOR" value="0x8002"/>
+ <enum name="CONSTANT_ALPHA" value="0x8003"/>
+ <enum name="ONE_MINUS_CONSTANT_ALPHA" value="0x8004"/>
+ <enum name="BLEND_COLOR" count="4" value="0x8005">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FUNC_ADD" value="0x8006"/>
+ <enum name="BLEND_EQUATION" count="1" value="0x8009">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="FUNC_SUBTRACT" value="0x800A"/>
+ <enum name="FUNC_REVERSE_SUBTRACT" value="0x800B"/>
+
+ <function name="BlendColor" offset="336">
+ <param name="red" type="GLclampf"/>
+ <param name="green" type="GLclampf"/>
+ <param name="blue" type="GLclampf"/>
+ <param name="alpha" type="GLclampf"/>
+ <glx rop="4096"/>
+ </function>
+
+ <function name="BlendEquation" offset="337">
+ <param name="mode" type="GLenum"/>
+ <glx rop="4097"/>
+ </function>
+
+ <!-- addition to base1.3 -->
+ <enum name="TEXTURE_CUBE_MAP" count="1" value="0x8513">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_BINDING_CUBE_MAP" count="1" value="0x8514">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="TEXTURE_CUBE_MAP_POSITIVE_X" value="0x8515"/>
+ <enum name="TEXTURE_CUBE_MAP_NEGATIVE_X" value="0x8516"/>
+ <enum name="TEXTURE_CUBE_MAP_POSITIVE_Y" value="0x8517"/>
+ <enum name="TEXTURE_CUBE_MAP_NEGATIVE_Y" value="0x8518"/>
+ <enum name="TEXTURE_CUBE_MAP_POSITIVE_Z" value="0x8519"/>
+ <enum name="TEXTURE_CUBE_MAP_NEGATIVE_Z" value="0x851A"/>
+ <enum name="MAX_CUBE_MAP_TEXTURE_SIZE" count="1" value="0x851C">
+ <size name="Get" mode="get"/>
+ </enum>
+
+ <!-- addition to base1.4 -->
+ <enum name="BLEND_DST_RGB" count="1" value="0x80C8">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_SRC_RGB" count="1" value="0x80C9">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_DST_ALPHA" count="1" value="0x80CA">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="BLEND_SRC_ALPHA" count="1" value="0x80CB">
+ <size name="Get" mode="get"/>
+ </enum>
+ <enum name="DEPTH_COMPONENT16" value="0x81A5"/>
+ <enum name="MIRRORED_REPEAT" value="0x8370"/>
+ <enum name="INCR_WRAP" value="0x8507"/>
+ <enum name="DECR_WRAP" value="0x8508"/>
+
+ <function name="BlendFuncSeparate" offset="assign">
+ <param name="sfactorRGB" type="GLenum"/>
+ <param name="dfactorRGB" type="GLenum"/>
+ <param name="sfactorAlpha" type="GLenum"/>
+ <param name="dfactorAlpha" type="GLenum"/>
+ <glx rop="4134"/>
+ </function>
+
+ <!-- addition to base1.5 -->
+ <enum name="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING" count="1" value="0x889F">
+ <size name="GetVertexAttribdv" mode="get"/>
+ <size name="GetVertexAttribfv" mode="get"/>
+ <size name="GetVertexAttribiv" mode="get"/>
+ </enum>
+ <enum name="STREAM_DRAW" value="0x88E0"/>
+
+ <!-- addition to base2.0 -->
+ <!-- base2.0 should have everything defined -->
+</category>
+
+<!-- OpenGL ES 2.0 -->
+<category name="es2.0">
+ <!-- addition to core2.0 -->
+ <enum name="LOW_FLOAT" value="0x8DF0"/>
+ <enum name="MEDIUM_FLOAT" value="0x8DF1"/>
+ <enum name="HIGH_FLOAT" value="0x8DF2"/>
+ <enum name="LOW_INT" value="0x8DF3"/>
+ <enum name="MEDIUM_INT" value="0x8DF4"/>
+ <enum name="HIGH_INT" value="0x8DF5"/>
+ <enum name="SHADER_BINARY_FORMATS" value="0x8DF8"/>
+ <enum name="NUM_SHADER_BINARY_FORMATS" value="0x8DF9"/>
+ <enum name="SHADER_COMPILER" value="0x8DFA"/>
+ <enum name="MAX_VERTEX_UNIFORM_VECTORS" value="0x8DFB"/>
+ <enum name="MAX_VARYING_VECTORS" value="0x8DFC"/>
+ <enum name="MAX_FRAGMENT_UNIFORM_VECTORS" value="0x8DFD"/>
+
+ <function name="GetShaderPrecisionFormat" offset="assign">
+ <param name="shadertype" type="GLenum"/>
+ <param name="precisiontype" type="GLenum"/>
+ <param name="range" type="GLint *"/>
+ <param name="precision" type="GLint *"/>
+ </function>
+
+ <function name="ReleaseShaderCompiler" offset="assign">
+ </function>
+
+ <function name="ShaderBinary" offset="assign">
+ <param name="n" type="GLsizei"/>
+ <param name="shaders" type="const GLuint *"/>
+ <param name="binaryformat" type="GLenum"/>
+ <param name="binary" type="const GLvoid *"/>
+ <param name="length" type="GLsizei"/>
+ </function>
+
+ <!-- from GL_OES_fixed_point -->
+ <enum name="FIXED" value="0x140C"/>
+ <type name="fixed" size="4" />
+
+ <!-- from GL_OES_framebuffer_object -->
+ <enum name="INVALID_FRAMEBUFFER_OPERATION" value="0x0506"/>
+ <enum name="MAX_RENDERBUFFER_SIZE" value="0x84E8"/>
+ <enum name="FRAMEBUFFER_BINDING" value="0x8CA6"/>
+ <enum name="RENDERBUFFER_BINDING" value="0x8CA7"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE" value="0x8CD0"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME" value="0x8CD1"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL" value="0x8CD2"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE" value="0x8CD3"/>
+ <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_DIMENSIONS" value="0x8CD9"/>
+ <enum name="FRAMEBUFFER_UNSUPPORTED" value="0x8CDD"/>
+ <enum name="COLOR_ATTACHMENT0" value="0x8CE0"/>
+ <enum name="DEPTH_ATTACHMENT" value="0x8D00"/>
+ <enum name="STENCIL_ATTACHMENT" value="0x8D20"/>
+ <enum name="FRAMEBUFFER" value="0x8D40"/>
+ <enum name="RENDERBUFFER" value="0x8D41"/>
+ <enum name="RENDERBUFFER_WIDTH" value="0x8D42"/>
+ <enum name="RENDERBUFFER_HEIGHT" value="0x8D43"/>
+ <enum name="RENDERBUFFER_INTERNAL_FORMAT" value="0x8D44"/>
+ <enum name="STENCIL_INDEX8" value="0x8D48"/>
+ <enum name="RENDERBUFFER_RED_SIZE" value="0x8D50"/>
+ <enum name="RENDERBUFFER_GREEN_SIZE" value="0x8D51"/>
+ <enum name="RENDERBUFFER_BLUE_SIZE" value="0x8D52"/>
+ <enum name="RENDERBUFFER_ALPHA_SIZE" value="0x8D53"/>
+ <enum name="RENDERBUFFER_DEPTH_SIZE" value="0x8D54"/>
+ <enum name="RENDERBUFFER_STENCIL_SIZE" value="0x8D55"/>
+ <enum name="RGB565" value="0x8D62"/>
+
+ <function name="BindFramebuffer" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="framebuffer" type="GLuint"/>
+ </function>
+
+ <function name="BindRenderbuffer" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </function>
+
+ <function name="CheckFramebufferStatus" offset="assign">
+ <param name="target" type="GLenum"/>
+ <return type="GLenum"/>
+ </function>
+
+ <function name="DeleteFramebuffers" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="framebuffers" type="const GLuint *" count="n"/>
+ </function>
+
+ <function name="DeleteRenderbuffers" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="renderbuffers" type="const GLuint *" count="n"/>
+ </function>
+
+ <function name="FramebufferRenderbuffer" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="renderbuffertarget" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </function>
+
+ <function name="FramebufferTexture2D" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="textarget" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ </function>
+
+ <function name="GenerateMipmap" offset="assign">
+ <param name="target" type="GLenum"/>
+ </function>
+
+ <function name="GenFramebuffers" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="framebuffers" type="GLuint *" count="n" output="true"/>
+ </function>
+
+ <function name="GenRenderbuffers" offset="assign">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="renderbuffers" type="GLuint *" count="n" output="true"/>
+ </function>
+
+ <function name="GetFramebufferAttachmentParameteriv" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true"/>
+ </function>
+
+ <function name="GetRenderbufferParameteriv" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true"/>
+ </function>
+
+ <function name="IsFramebuffer" offset="assign">
+ <param name="framebuffer" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+
+ <function name="IsRenderbuffer" offset="assign">
+ <param name="renderbuffer" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+
+ <function name="RenderbufferStorage" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </function>
+
+ <!-- from GL_OES_read_format -->
+ <enum name="IMPLEMENTATION_COLOR_READ_TYPE" value="0x8B9A"/>
+ <enum name="IMPLEMENTATION_COLOR_READ_FORMAT" value="0x8B9B"/>
+
+ <!-- from GL_OES_single_precision -->
+ <function name="ClearDepthf" offset="assign">
+ <param name="depth" type="GLclampf"/>
+ </function>
+
+ <function name="DepthRangef" offset="assign">
+ <param name="zNear" type="GLclampf"/>
+ <param name="zFar" type="GLclampf"/>
+ </function>
+</category>
+
+<xi:include href="es2_EXT.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="es2_COMPAT.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/es2_COMPAT.xml b/src/mesa/es/glapi/es2_COMPAT.xml
new file mode 100644
index 00000000000..61f11a604e2
--- /dev/null
+++ b/src/mesa/es/glapi/es2_COMPAT.xml
@@ -0,0 +1,368 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<OpenGLAPI>
+
+<!-- This file defines the functions that are needed by Mesa. It
+ makes sure the generated glapi headers are compatible with Mesa.
+ It mainly consists of missing functions and aliases in OpenGL ES.
+-->
+
+<xi:include href="es_COMPAT.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<!-- except for those defined by es_COMPAT.xml, these are also needed -->
+<category name="compat">
+ <!-- OpenGL 1.0 -->
+ <function name="Color4f" offset="29" vectorequiv="Color4fv" static_dispatch="false">
+ <param name="red" type="GLfloat"/>
+ <param name="green" type="GLfloat"/>
+ <param name="blue" type="GLfloat"/>
+ <param name="alpha" type="GLfloat"/>
+ </function>
+
+ <function name="Color4ub" offset="35" vectorequiv="Color4ubv" static_dispatch="false">
+ <param name="red" type="GLubyte"/>
+ <param name="green" type="GLubyte"/>
+ <param name="blue" type="GLubyte"/>
+ <param name="alpha" type="GLubyte"/>
+ </function>
+
+ <function name="Normal3f" offset="56" vectorequiv="Normal3fv" static_dispatch="false">
+ <param name="nx" type="GLfloat"/>
+ <param name="ny" type="GLfloat"/>
+ <param name="nz" type="GLfloat"/>
+ </function>
+
+ <function name="Fogf" offset="153" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="80"/>
+ </function>
+
+ <function name="Fogfv" offset="154" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="81"/>
+ </function>
+
+ <function name="Lightf" offset="159" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="86"/>
+ </function>
+
+ <function name="Lightfv" offset="160" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="87"/>
+ </function>
+
+ <function name="LightModelf" offset="163" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="90"/>
+ </function>
+
+ <function name="LightModelfv" offset="164" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="91"/>
+ </function>
+
+ <function name="Materialf" offset="169" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="96"/>
+ </function>
+
+ <function name="Materialfv" offset="170" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="97"/>
+ </function>
+
+ <function name="PointSize" offset="173" static_dispatch="false">
+ <param name="size" type="GLfloat"/>
+ <glx rop="100"/>
+ </function>
+
+ <function name="ShadeModel" offset="177" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="104"/>
+ </function>
+
+ <function name="TexEnvf" offset="184" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="111"/>
+ </function>
+
+ <function name="TexEnvfv" offset="185" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="112"/>
+ </function>
+
+ <function name="TexEnvi" offset="186" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="113"/>
+ </function>
+
+ <function name="TexEnviv" offset="187" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="114"/>
+ </function>
+
+ <function name="TexGenf" offset="190" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="117"/>
+ </function>
+
+ <function name="TexGenfv" offset="191" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="118"/>
+ </function>
+
+ <function name="TexGeni" offset="192" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="119"/>
+ </function>
+
+ <function name="TexGeniv" offset="193" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="120"/>
+ </function>
+
+ <function name="AlphaFunc" offset="240" static_dispatch="false">
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLclampf"/>
+ <glx rop="159"/>
+ </function>
+
+ <function name="LogicOp" offset="242" static_dispatch="false">
+ <param name="opcode" type="GLenum"/>
+ <glx rop="161"/>
+ </function>
+
+ <function name="GetLightfv" offset="264" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="118"/>
+ </function>
+
+ <function name="GetMaterialfv" offset="269" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="123"/>
+ </function>
+
+ <function name="GetTexEnvfv" offset="276" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="130"/>
+ </function>
+
+ <function name="GetTexEnviv" offset="277" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="131"/>
+ </function>
+
+ <function name="GetTexGenfv" offset="279" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="133"/>
+ </function>
+
+ <function name="GetTexGeniv" offset="280" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="134"/>
+ </function>
+
+ <function name="LoadIdentity" offset="290" static_dispatch="false">
+ <glx rop="176"/>
+ </function>
+
+ <function name="LoadMatrixf" offset="291" static_dispatch="false">
+ <param name="m" type="const GLfloat *" count="16"/>
+ <glx rop="177"/>
+ </function>
+
+ <function name="MatrixMode" offset="293" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="179"/>
+ </function>
+
+ <function name="MultMatrixf" offset="294" static_dispatch="false">
+ <param name="m" type="const GLfloat *" count="16"/>
+ <glx rop="180"/>
+ </function>
+
+ <function name="PopMatrix" offset="297" static_dispatch="false">
+ <glx rop="183"/>
+ </function>
+
+ <function name="PushMatrix" offset="298" static_dispatch="false">
+ <glx rop="184"/>
+ </function>
+
+ <function name="Rotatef" offset="300" static_dispatch="false">
+ <param name="angle" type="GLfloat"/>
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <glx rop="186"/>
+ </function>
+
+ <function name="Scalef" offset="302" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <glx rop="188"/>
+ </function>
+
+ <function name="Translatef" offset="304" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <glx rop="190"/>
+ </function>
+
+ <!-- OpenGL 1.1 -->
+ <function name="ColorPointer" offset="308" static_dispatch="false">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="DisableClientState" offset="309" static_dispatch="false">
+ <param name="array" type="GLenum"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="EnableClientState" offset="313" static_dispatch="false">
+ <param name="array" type="GLenum"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="NormalPointer" offset="318" static_dispatch="false">
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="TexCoordPointer" offset="320" static_dispatch="false">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="VertexPointer" offset="321" static_dispatch="false">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="GetPointerv" offset="329" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLvoid **" output="true"/>
+ <glx handcode="true"/>
+ </function>
+
+ <!-- OpenGL 1.2 -->
+ <function name="TexImage3D" alias="TexImage3DOES" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_depth="depth" img_format="format" img_type="type" img_target="target" img_null_flag="true" img_pad_dimensions="true"/>
+ <glx rop="4114" large="true"/>
+ </function>
+
+ <function name="TexSubImage3D" alias="TexSubImage3DOES" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="UNUSED" type="GLuint" padding="true"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_depth="depth" img_xoff="xoffset" img_yoff="yoffset" img_zoff="zoffset" img_format="format" img_type="type" img_target="target" img_pad_dimensions="true"/>
+ <glx rop="4115" large="true"/>
+ </function>
+
+ <function name="CopyTexSubImage3D" alias="CopyTexSubImage3DOES" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="4123"/>
+ </function>
+
+ <!-- GL_ARB_multitexture -->
+ <function name="ActiveTextureARB" alias="ActiveTexture" static_dispatch="false">
+ <param name="texture" type="GLenum"/>
+ <glx rop="197"/>
+ </function>
+
+ <function name="ClientActiveTextureARB" offset="375" static_dispatch="false">
+ <param name="texture" type="GLenum"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="MultiTexCoord4fARB" offset="402" vectorequiv="MultiTexCoord4fvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLfloat"/>
+ <param name="t" type="GLfloat"/>
+ <param name="r" type="GLfloat"/>
+ <param name="q" type="GLfloat"/>
+ </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/es2_EXT.xml b/src/mesa/es/glapi/es2_EXT.xml
new file mode 100644
index 00000000000..3615772b56f
--- /dev/null
+++ b/src/mesa/es/glapi/es2_EXT.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<!-- OpenGL ES 2.x extensions -->
+
+<OpenGLAPI>
+
+<xi:include href="es_EXT.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+<category name="GL_OES_texture_3D" number="34">
+ <enum name="TEXTURE_BINDING_3D_OES" value="0x806A"/>
+ <enum name="TEXTURE_3D_OES" value="0x806F"/>
+ <enum name="TEXTURE_WRAP_R_OES" value="0x8072"/>
+ <enum name="MAX_3D_TEXTURE_SIZE_OES" value="0x8073"/>
+ <enum name="SAMPLER_3D_OES" value="0x8B5F"/>
+ <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES" value="0x8CD4"/>
+
+ <function name="CompressedTexImage3DOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="imageSize" type="GLsizei" counter="true"/>
+ <param name="data" type="const GLvoid *" count="imageSize"/>
+ <glx rop="216" handcode="client"/>
+ </function>
+
+ <function name="CompressedTexSubImage3DOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="imageSize" type="GLsizei" counter="true"/>
+ <param name="data" type="const GLvoid *" count="imageSize"/>
+ <glx rop="219" handcode="client"/>
+ </function>
+
+ <function name="CopyTexSubImage3DOES" offset="373">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="4123"/>
+ </function>
+
+ <function name="FramebufferTexture3DOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="textarget" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <glx rop="4323"/>
+ </function>
+
+ <function name="TexImage3DOES" offset="371">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_depth="depth" img_format="format" img_type="type" img_target="target" img_null_flag="true" img_pad_dimensions="true"/>
+ <glx rop="4114" large="true"/>
+ </function>
+
+ <function name="TexSubImage3DOES" offset="372">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="UNUSED" type="GLuint" padding="true"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_depth="depth" img_xoff="xoffset" img_yoff="yoffset" img_zoff="zoffset" img_format="format" img_type="type" img_target="target" img_pad_dimensions="true"/>
+ <glx rop="4115" large="true"/>
+ </function>
+</category>
+
+<!-- the other name is OES_texture_float_linear -->
+<category name="OES_texture_half_float_linear" number="35">
+ <!-- No new functions, types, enums. -->
+</category>
+
+<!-- the other name is OES_texture_float -->
+<category name="OES_texture_half_float" number="36">
+ <enum name="HALF_FLOAT_OES" value="0x8D61"/>
+</category>
+
+<category name="GL_OES_texture_npot" number="37">
+ <!-- No new functions, types, enums. -->
+</category>
+
+<category name="GL_OES_vertex_half_float" number="38">
+ <enum name="HALF_FLOAT_OES" value="0x8D61"/>
+</category>
+
+<category name="GL_EXT_texture_type_2_10_10_10_REV" number="42">
+ <enum name="UNSIGNED_INT_2_10_10_10_REV_EXT" value="0x8368"/>
+</category>
+
+<category name="GL_OES_packed_depth_stencil" number="43">
+ <enum name="DEPTH_STENCIL_OES" value="0x84F9"/>
+ <enum name="UNSIGNED_INT_24_8_OES" value="0x84FA"/>
+ <enum name="DEPTH24_STENCIL8_OES" value="0x88F0"/>
+</category>
+
+<category name="GL_OES_depth_texture" number="44">
+ <!-- No new functions, types, enums. -->
+</category>
+
+<category name="GL_OES_standard_derivatives" number="45">
+ <enum name="FRAGMENT_SHADER_DERIVATIVE_HINT_OES" value="0x8B8B"/>
+</category>
+
+<category name="GL_OES_vertex_type_10_10_10_2" number="46">
+ <enum name="UNSIGNED_INT_10_10_10_2_OES" value="0x8DF6"/>
+ <enum name="INT_10_10_10_2_OES" value="0x8DF7"/>
+</category>
+
+<category name="GL_OES_get_program_binary" number="47">
+ <enum name="PROGRAM_BINARY_LENGTH_OES" value="0x8741"/>
+ <enum name="NUM_PROGRAM_BINARY_FORMATS_OES" value="0x87FE"/>
+ <enum name="PROGRAM_BINARY_FORMATS_OES" value="0x87FF"/>
+
+ <function name="GetProgramBinaryOES" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="binaryFormat" type="GLenum *"/>
+ <param name="binary" type="GLvoid *"/>
+ </function>
+
+ <function name="ProgramBinaryOES" offset="assign">
+ <param name="program" type="GLuint"/>
+ <param name="binaryFormat" type="GLenum"/>
+ <param name="binary" type="const GLvoid *"/>
+ <param name="length" type="GLint"/>
+ </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/es_COMPAT.xml b/src/mesa/es/glapi/es_COMPAT.xml
new file mode 100644
index 00000000000..bb6d28db83d
--- /dev/null
+++ b/src/mesa/es/glapi/es_COMPAT.xml
@@ -0,0 +1,2646 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<OpenGLAPI>
+
+<!-- This file defines the following categories
+
+ a subset of 1.0
+ a subset of 1.1
+ a subset of 1.2
+ a subset of GL_ARB_multitexture
+ GL_APPLE_vertex_array_object
+
+ to make sure the generated glapi headers are compatible with Mesa.
+ It is included by es1_COMPAT.xml and es2_COMPAT.xml.
+-->
+
+<category name="1.0">
+ <type name="double" size="8" float="true" glx_name="FLOAT64"/>
+ <type name="clampd" size="8" float="true" glx_name="FLOAT64"/>
+
+ <type name="float" size="4" float="true" glx_name="FLOAT32"/>
+ <type name="clampf" size="4" float="true" glx_name="FLOAT32"/>
+
+ <type name="int" size="4" glx_name="CARD32"/>
+ <type name="uint" size="4" unsigned="true" glx_name="CARD32"/>
+ <type name="sizei" size="4" unsigned="true" glx_name="CARD32"/>
+ <type name="enum" size="4" unsigned="true" glx_name="ENUM"/>
+ <type name="bitfield" size="4" unsigned="true" glx_name="CARD32"/>
+
+ <type name="short" size="2" glx_name="CARD16"/>
+ <type name="ushort" size="2" unsigned="true" glx_name="CARD16"/>
+
+ <type name="byte" size="1" glx_name="CARD8"/>
+ <type name="ubyte" size="1" unsigned="true" glx_name="CARD8"/>
+ <type name="boolean" size="1" unsigned="true" glx_name="CARD8"/>
+
+ <type name="void" size="1"/>
+
+ <function name="NewList" offset="0" static_dispatch="false">
+ <param name="list" type="GLuint"/>
+ <param name="mode" type="GLenum"/>
+ <glx sop="101"/>
+ </function>
+
+ <function name="EndList" offset="1" static_dispatch="false">
+ <glx sop="102"/>
+ </function>
+
+ <function name="CallList" offset="2" static_dispatch="false">
+ <param name="list" type="GLuint"/>
+ <glx rop="1"/>
+ </function>
+
+ <function name="CallLists" offset="3" static_dispatch="false">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="type" type="GLenum"/>
+ <param name="lists" type="const GLvoid *" variable_param="type" count="n"/>
+ <glx rop="2" large="true"/>
+ </function>
+
+ <function name="DeleteLists" offset="4" static_dispatch="false">
+ <param name="list" type="GLuint"/>
+ <param name="range" type="GLsizei"/>
+ <glx sop="103"/>
+ </function>
+
+ <function name="GenLists" offset="5" static_dispatch="false">
+ <param name="range" type="GLsizei"/>
+ <return type="GLuint"/>
+ <glx sop="104"/>
+ </function>
+
+ <function name="ListBase" offset="6" static_dispatch="false">
+ <param name="base" type="GLuint"/>
+ <glx rop="3"/>
+ </function>
+
+ <function name="Begin" offset="7" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="4"/>
+ </function>
+
+ <function name="Bitmap" offset="8" static_dispatch="false">
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="xorig" type="GLfloat"/>
+ <param name="yorig" type="GLfloat"/>
+ <param name="xmove" type="GLfloat"/>
+ <param name="ymove" type="GLfloat"/>
+ <param name="bitmap" type="const GLubyte *" img_width="width" img_height="height" img_format="GL_COLOR_INDEX" img_type="GL_BITMAP" img_target="0" img_pad_dimensions="false"/>
+ <glx rop="5" large="true"/>
+ </function>
+
+ <function name="Color3b" offset="9" vectorequiv="Color3bv" static_dispatch="false">
+ <param name="red" type="GLbyte"/>
+ <param name="green" type="GLbyte"/>
+ <param name="blue" type="GLbyte"/>
+ </function>
+
+ <function name="Color3bv" offset="10" static_dispatch="false">
+ <param name="v" type="const GLbyte *" count="3"/>
+ <glx rop="6"/>
+ </function>
+
+ <function name="Color3d" offset="11" vectorequiv="Color3dv" static_dispatch="false">
+ <param name="red" type="GLdouble"/>
+ <param name="green" type="GLdouble"/>
+ <param name="blue" type="GLdouble"/>
+ </function>
+
+ <function name="Color3dv" offset="12" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="3"/>
+ <glx rop="7"/>
+ </function>
+
+ <function name="Color3f" offset="13" vectorequiv="Color3fv" static_dispatch="false">
+ <param name="red" type="GLfloat"/>
+ <param name="green" type="GLfloat"/>
+ <param name="blue" type="GLfloat"/>
+ </function>
+
+ <function name="Color3fv" offset="14" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="3"/>
+ <glx rop="8"/>
+ </function>
+
+ <function name="Color3i" offset="15" vectorequiv="Color3iv" static_dispatch="false">
+ <param name="red" type="GLint"/>
+ <param name="green" type="GLint"/>
+ <param name="blue" type="GLint"/>
+ </function>
+
+ <function name="Color3iv" offset="16" static_dispatch="false">
+ <param name="v" type="const GLint *" count="3"/>
+ <glx rop="9"/>
+ </function>
+
+ <function name="Color3s" offset="17" vectorequiv="Color3sv" static_dispatch="false">
+ <param name="red" type="GLshort"/>
+ <param name="green" type="GLshort"/>
+ <param name="blue" type="GLshort"/>
+ </function>
+
+ <function name="Color3sv" offset="18" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="3"/>
+ <glx rop="10"/>
+ </function>
+
+ <function name="Color3ub" offset="19" vectorequiv="Color3ubv" static_dispatch="false">
+ <param name="red" type="GLubyte"/>
+ <param name="green" type="GLubyte"/>
+ <param name="blue" type="GLubyte"/>
+ </function>
+
+ <function name="Color3ubv" offset="20" static_dispatch="false">
+ <param name="v" type="const GLubyte *" count="3"/>
+ <glx rop="11"/>
+ </function>
+
+ <function name="Color3ui" offset="21" vectorequiv="Color3uiv" static_dispatch="false">
+ <param name="red" type="GLuint"/>
+ <param name="green" type="GLuint"/>
+ <param name="blue" type="GLuint"/>
+ </function>
+
+ <function name="Color3uiv" offset="22" static_dispatch="false">
+ <param name="v" type="const GLuint *" count="3"/>
+ <glx rop="12"/>
+ </function>
+
+ <function name="Color3us" offset="23" vectorequiv="Color3usv" static_dispatch="false">
+ <param name="red" type="GLushort"/>
+ <param name="green" type="GLushort"/>
+ <param name="blue" type="GLushort"/>
+ </function>
+
+ <function name="Color3usv" offset="24" static_dispatch="false">
+ <param name="v" type="const GLushort *" count="3"/>
+ <glx rop="13"/>
+ </function>
+
+ <function name="Color4b" offset="25" vectorequiv="Color4bv" static_dispatch="false">
+ <param name="red" type="GLbyte"/>
+ <param name="green" type="GLbyte"/>
+ <param name="blue" type="GLbyte"/>
+ <param name="alpha" type="GLbyte"/>
+ </function>
+
+ <function name="Color4bv" offset="26" static_dispatch="false">
+ <param name="v" type="const GLbyte *" count="4"/>
+ <glx rop="14"/>
+ </function>
+
+ <function name="Color4d" offset="27" vectorequiv="Color4dv" static_dispatch="false">
+ <param name="red" type="GLdouble"/>
+ <param name="green" type="GLdouble"/>
+ <param name="blue" type="GLdouble"/>
+ <param name="alpha" type="GLdouble"/>
+ </function>
+
+ <function name="Color4dv" offset="28" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="4"/>
+ <glx rop="15"/>
+ </function>
+
+ <!--function name="Color4f" offset="29" vectorequiv="Color4fv" static_dispatch="false">
+ <param name="red" type="GLfloat"/>
+ <param name="green" type="GLfloat"/>
+ <param name="blue" type="GLfloat"/>
+ <param name="alpha" type="GLfloat"/>
+ </function-->
+
+ <function name="Color4fv" offset="30" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="4"/>
+ <glx rop="16"/>
+ </function>
+
+ <function name="Color4i" offset="31" vectorequiv="Color4iv" static_dispatch="false">
+ <param name="red" type="GLint"/>
+ <param name="green" type="GLint"/>
+ <param name="blue" type="GLint"/>
+ <param name="alpha" type="GLint"/>
+ </function>
+
+ <function name="Color4iv" offset="32" static_dispatch="false">
+ <param name="v" type="const GLint *" count="4"/>
+ <glx rop="17"/>
+ </function>
+
+ <function name="Color4s" offset="33" vectorequiv="Color4sv" static_dispatch="false">
+ <param name="red" type="GLshort"/>
+ <param name="green" type="GLshort"/>
+ <param name="blue" type="GLshort"/>
+ <param name="alpha" type="GLshort"/>
+ </function>
+
+ <function name="Color4sv" offset="34" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="4"/>
+ <glx rop="18"/>
+ </function>
+
+ <!--function name="Color4ub" offset="35" vectorequiv="Color4ubv" static_dispatch="false">
+ <param name="red" type="GLubyte"/>
+ <param name="green" type="GLubyte"/>
+ <param name="blue" type="GLubyte"/>
+ <param name="alpha" type="GLubyte"/>
+ </function-->
+
+ <function name="Color4ubv" offset="36" static_dispatch="false">
+ <param name="v" type="const GLubyte *" count="4"/>
+ <glx rop="19"/>
+ </function>
+
+ <function name="Color4ui" offset="37" vectorequiv="Color4uiv" static_dispatch="false">
+ <param name="red" type="GLuint"/>
+ <param name="green" type="GLuint"/>
+ <param name="blue" type="GLuint"/>
+ <param name="alpha" type="GLuint"/>
+ </function>
+
+ <function name="Color4uiv" offset="38" static_dispatch="false">
+ <param name="v" type="const GLuint *" count="4"/>
+ <glx rop="20"/>
+ </function>
+
+ <function name="Color4us" offset="39" vectorequiv="Color4usv" static_dispatch="false">
+ <param name="red" type="GLushort"/>
+ <param name="green" type="GLushort"/>
+ <param name="blue" type="GLushort"/>
+ <param name="alpha" type="GLushort"/>
+ </function>
+
+ <function name="Color4usv" offset="40" static_dispatch="false">
+ <param name="v" type="const GLushort *" count="4"/>
+ <glx rop="21"/>
+ </function>
+
+ <function name="EdgeFlag" offset="41" vectorequiv="EdgeFlagv" static_dispatch="false">
+ <param name="flag" type="GLboolean"/>
+ </function>
+
+ <function name="EdgeFlagv" offset="42" static_dispatch="false">
+ <param name="flag" type="const GLboolean *" count="1"/>
+ <glx rop="22"/>
+ </function>
+
+ <function name="End" offset="43" static_dispatch="false">
+ <glx rop="23"/>
+ </function>
+
+ <function name="Indexd" offset="44" vectorequiv="Indexdv" static_dispatch="false">
+ <param name="c" type="GLdouble"/>
+ </function>
+
+ <function name="Indexdv" offset="45" static_dispatch="false">
+ <param name="c" type="const GLdouble *" count="1"/>
+ <glx rop="24"/>
+ </function>
+
+ <function name="Indexf" offset="46" vectorequiv="Indexfv" static_dispatch="false">
+ <param name="c" type="GLfloat"/>
+ </function>
+
+ <function name="Indexfv" offset="47" static_dispatch="false">
+ <param name="c" type="const GLfloat *" count="1"/>
+ <glx rop="25"/>
+ </function>
+
+ <function name="Indexi" offset="48" vectorequiv="Indexiv" static_dispatch="false">
+ <param name="c" type="GLint"/>
+ </function>
+
+ <function name="Indexiv" offset="49" static_dispatch="false">
+ <param name="c" type="const GLint *" count="1"/>
+ <glx rop="26"/>
+ </function>
+
+ <function name="Indexs" offset="50" vectorequiv="Indexsv" static_dispatch="false">
+ <param name="c" type="GLshort"/>
+ </function>
+
+ <function name="Indexsv" offset="51" static_dispatch="false">
+ <param name="c" type="const GLshort *" count="1"/>
+ <glx rop="27"/>
+ </function>
+
+ <function name="Normal3b" offset="52" vectorequiv="Normal3bv" static_dispatch="false">
+ <param name="nx" type="GLbyte"/>
+ <param name="ny" type="GLbyte"/>
+ <param name="nz" type="GLbyte"/>
+ </function>
+
+ <function name="Normal3bv" offset="53" static_dispatch="false">
+ <param name="v" type="const GLbyte *" count="3"/>
+ <glx rop="28"/>
+ </function>
+
+ <function name="Normal3d" offset="54" vectorequiv="Normal3dv" static_dispatch="false">
+ <param name="nx" type="GLdouble"/>
+ <param name="ny" type="GLdouble"/>
+ <param name="nz" type="GLdouble"/>
+ </function>
+
+ <function name="Normal3dv" offset="55" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="3"/>
+ <glx rop="29"/>
+ </function>
+
+ <!--function name="Normal3f" offset="56" vectorequiv="Normal3fv" static_dispatch="false">
+ <param name="nx" type="GLfloat"/>
+ <param name="ny" type="GLfloat"/>
+ <param name="nz" type="GLfloat"/>
+ </function-->
+
+ <function name="Normal3fv" offset="57" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="3"/>
+ <glx rop="30"/>
+ </function>
+
+ <function name="Normal3i" offset="58" vectorequiv="Normal3iv" static_dispatch="false">
+ <param name="nx" type="GLint"/>
+ <param name="ny" type="GLint"/>
+ <param name="nz" type="GLint"/>
+ </function>
+
+ <function name="Normal3iv" offset="59" static_dispatch="false">
+ <param name="v" type="const GLint *" count="3"/>
+ <glx rop="31"/>
+ </function>
+
+ <function name="Normal3s" offset="60" vectorequiv="Normal3sv" static_dispatch="false">
+ <param name="nx" type="GLshort"/>
+ <param name="ny" type="GLshort"/>
+ <param name="nz" type="GLshort"/>
+ </function>
+
+ <function name="Normal3sv" offset="61" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="3"/>
+ <glx rop="32"/>
+ </function>
+
+ <function name="RasterPos2d" offset="62" vectorequiv="RasterPos2dv" static_dispatch="false">
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ </function>
+
+ <function name="RasterPos2dv" offset="63" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="2"/>
+ <glx rop="33"/>
+ </function>
+
+ <function name="RasterPos2f" offset="64" vectorequiv="RasterPos2fv" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ </function>
+
+ <function name="RasterPos2fv" offset="65" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="2"/>
+ <glx rop="34"/>
+ </function>
+
+ <function name="RasterPos2i" offset="66" vectorequiv="RasterPos2iv" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ </function>
+
+ <function name="RasterPos2iv" offset="67" static_dispatch="false">
+ <param name="v" type="const GLint *" count="2"/>
+ <glx rop="35"/>
+ </function>
+
+ <function name="RasterPos2s" offset="68" vectorequiv="RasterPos2sv" static_dispatch="false">
+ <param name="x" type="GLshort"/>
+ <param name="y" type="GLshort"/>
+ </function>
+
+ <function name="RasterPos2sv" offset="69" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="2"/>
+ <glx rop="36"/>
+ </function>
+
+ <function name="RasterPos3d" offset="70" vectorequiv="RasterPos3dv" static_dispatch="false">
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ <param name="z" type="GLdouble"/>
+ </function>
+
+ <function name="RasterPos3dv" offset="71" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="3"/>
+ <glx rop="37"/>
+ </function>
+
+ <function name="RasterPos3f" offset="72" vectorequiv="RasterPos3fv" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ </function>
+
+ <function name="RasterPos3fv" offset="73" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="3"/>
+ <glx rop="38"/>
+ </function>
+
+ <function name="RasterPos3i" offset="74" vectorequiv="RasterPos3iv" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="z" type="GLint"/>
+ </function>
+
+ <function name="RasterPos3iv" offset="75" static_dispatch="false">
+ <param name="v" type="const GLint *" count="3"/>
+ <glx rop="39"/>
+ </function>
+
+ <function name="RasterPos3s" offset="76" vectorequiv="RasterPos3sv" static_dispatch="false">
+ <param name="x" type="GLshort"/>
+ <param name="y" type="GLshort"/>
+ <param name="z" type="GLshort"/>
+ </function>
+
+ <function name="RasterPos3sv" offset="77" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="3"/>
+ <glx rop="40"/>
+ </function>
+
+ <function name="RasterPos4d" offset="78" vectorequiv="RasterPos4dv" static_dispatch="false">
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ <param name="z" type="GLdouble"/>
+ <param name="w" type="GLdouble"/>
+ </function>
+
+ <function name="RasterPos4dv" offset="79" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="4"/>
+ <glx rop="41"/>
+ </function>
+
+ <function name="RasterPos4f" offset="80" vectorequiv="RasterPos4fv" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <param name="w" type="GLfloat"/>
+ </function>
+
+ <function name="RasterPos4fv" offset="81" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="4"/>
+ <glx rop="42"/>
+ </function>
+
+ <function name="RasterPos4i" offset="82" vectorequiv="RasterPos4iv" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="z" type="GLint"/>
+ <param name="w" type="GLint"/>
+ </function>
+
+ <function name="RasterPos4iv" offset="83" static_dispatch="false">
+ <param name="v" type="const GLint *" count="4"/>
+ <glx rop="43"/>
+ </function>
+
+ <function name="RasterPos4s" offset="84" vectorequiv="RasterPos4sv" static_dispatch="false">
+ <param name="x" type="GLshort"/>
+ <param name="y" type="GLshort"/>
+ <param name="z" type="GLshort"/>
+ <param name="w" type="GLshort"/>
+ </function>
+
+ <function name="RasterPos4sv" offset="85" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="4"/>
+ <glx rop="44"/>
+ </function>
+
+ <function name="Rectd" offset="86" vectorequiv="Rectdv" static_dispatch="false">
+ <param name="x1" type="GLdouble"/>
+ <param name="y1" type="GLdouble"/>
+ <param name="x2" type="GLdouble"/>
+ <param name="y2" type="GLdouble"/>
+ </function>
+
+ <function name="Rectdv" offset="87" static_dispatch="false">
+ <param name="v1" type="const GLdouble *" count="2"/>
+ <param name="v2" type="const GLdouble *" count="2"/>
+ <glx rop="45"/>
+ </function>
+
+ <function name="Rectf" offset="88" vectorequiv="Rectfv" static_dispatch="false">
+ <param name="x1" type="GLfloat"/>
+ <param name="y1" type="GLfloat"/>
+ <param name="x2" type="GLfloat"/>
+ <param name="y2" type="GLfloat"/>
+ </function>
+
+ <function name="Rectfv" offset="89" static_dispatch="false">
+ <param name="v1" type="const GLfloat *" count="2"/>
+ <param name="v2" type="const GLfloat *" count="2"/>
+ <glx rop="46"/>
+ </function>
+
+ <function name="Recti" offset="90" vectorequiv="Rectiv" static_dispatch="false">
+ <param name="x1" type="GLint"/>
+ <param name="y1" type="GLint"/>
+ <param name="x2" type="GLint"/>
+ <param name="y2" type="GLint"/>
+ </function>
+
+ <function name="Rectiv" offset="91" static_dispatch="false">
+ <param name="v1" type="const GLint *" count="2"/>
+ <param name="v2" type="const GLint *" count="2"/>
+ <glx rop="47"/>
+ </function>
+
+ <function name="Rects" offset="92" vectorequiv="Rectsv" static_dispatch="false">
+ <param name="x1" type="GLshort"/>
+ <param name="y1" type="GLshort"/>
+ <param name="x2" type="GLshort"/>
+ <param name="y2" type="GLshort"/>
+ </function>
+
+ <function name="Rectsv" offset="93" static_dispatch="false">
+ <param name="v1" type="const GLshort *" count="2"/>
+ <param name="v2" type="const GLshort *" count="2"/>
+ <glx rop="48"/>
+ </function>
+
+ <function name="TexCoord1d" offset="94" vectorequiv="TexCoord1dv" static_dispatch="false">
+ <param name="s" type="GLdouble"/>
+ </function>
+
+ <function name="TexCoord1dv" offset="95" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="1"/>
+ <glx rop="49"/>
+ </function>
+
+ <function name="TexCoord1f" offset="96" vectorequiv="TexCoord1fv" static_dispatch="false">
+ <param name="s" type="GLfloat"/>
+ </function>
+
+ <function name="TexCoord1fv" offset="97" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="1"/>
+ <glx rop="50"/>
+ </function>
+
+ <function name="TexCoord1i" offset="98" vectorequiv="TexCoord1iv" static_dispatch="false">
+ <param name="s" type="GLint"/>
+ </function>
+
+ <function name="TexCoord1iv" offset="99" static_dispatch="false">
+ <param name="v" type="const GLint *" count="1"/>
+ <glx rop="51"/>
+ </function>
+
+ <function name="TexCoord1s" offset="100" vectorequiv="TexCoord1sv" static_dispatch="false">
+ <param name="s" type="GLshort"/>
+ </function>
+
+ <function name="TexCoord1sv" offset="101" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="1"/>
+ <glx rop="52"/>
+ </function>
+
+ <function name="TexCoord2d" offset="102" vectorequiv="TexCoord2dv" static_dispatch="false">
+ <param name="s" type="GLdouble"/>
+ <param name="t" type="GLdouble"/>
+ </function>
+
+ <function name="TexCoord2dv" offset="103" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="2"/>
+ <glx rop="53"/>
+ </function>
+
+ <function name="TexCoord2f" offset="104" vectorequiv="TexCoord2fv" static_dispatch="false">
+ <param name="s" type="GLfloat"/>
+ <param name="t" type="GLfloat"/>
+ </function>
+
+ <function name="TexCoord2fv" offset="105" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="2"/>
+ <glx rop="54"/>
+ </function>
+
+ <function name="TexCoord2i" offset="106" vectorequiv="TexCoord2iv" static_dispatch="false">
+ <param name="s" type="GLint"/>
+ <param name="t" type="GLint"/>
+ </function>
+
+ <function name="TexCoord2iv" offset="107" static_dispatch="false">
+ <param name="v" type="const GLint *" count="2"/>
+ <glx rop="55"/>
+ </function>
+
+ <function name="TexCoord2s" offset="108" vectorequiv="TexCoord2sv" static_dispatch="false">
+ <param name="s" type="GLshort"/>
+ <param name="t" type="GLshort"/>
+ </function>
+
+ <function name="TexCoord2sv" offset="109" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="2"/>
+ <glx rop="56"/>
+ </function>
+
+ <function name="TexCoord3d" offset="110" vectorequiv="TexCoord3dv" static_dispatch="false">
+ <param name="s" type="GLdouble"/>
+ <param name="t" type="GLdouble"/>
+ <param name="r" type="GLdouble"/>
+ </function>
+
+ <function name="TexCoord3dv" offset="111" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="3"/>
+ <glx rop="57"/>
+ </function>
+
+ <function name="TexCoord3f" offset="112" vectorequiv="TexCoord3fv" static_dispatch="false">
+ <param name="s" type="GLfloat"/>
+ <param name="t" type="GLfloat"/>
+ <param name="r" type="GLfloat"/>
+ </function>
+
+ <function name="TexCoord3fv" offset="113" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="3"/>
+ <glx rop="58"/>
+ </function>
+
+ <function name="TexCoord3i" offset="114" vectorequiv="TexCoord3iv" static_dispatch="false">
+ <param name="s" type="GLint"/>
+ <param name="t" type="GLint"/>
+ <param name="r" type="GLint"/>
+ </function>
+
+ <function name="TexCoord3iv" offset="115" static_dispatch="false">
+ <param name="v" type="const GLint *" count="3"/>
+ <glx rop="59"/>
+ </function>
+
+ <function name="TexCoord3s" offset="116" vectorequiv="TexCoord3sv" static_dispatch="false">
+ <param name="s" type="GLshort"/>
+ <param name="t" type="GLshort"/>
+ <param name="r" type="GLshort"/>
+ </function>
+
+ <function name="TexCoord3sv" offset="117" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="3"/>
+ <glx rop="60"/>
+ </function>
+
+ <function name="TexCoord4d" offset="118" vectorequiv="TexCoord4dv" static_dispatch="false">
+ <param name="s" type="GLdouble"/>
+ <param name="t" type="GLdouble"/>
+ <param name="r" type="GLdouble"/>
+ <param name="q" type="GLdouble"/>
+ </function>
+
+ <function name="TexCoord4dv" offset="119" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="4"/>
+ <glx rop="61"/>
+ </function>
+
+ <function name="TexCoord4f" offset="120" vectorequiv="TexCoord4fv" static_dispatch="false">
+ <param name="s" type="GLfloat"/>
+ <param name="t" type="GLfloat"/>
+ <param name="r" type="GLfloat"/>
+ <param name="q" type="GLfloat"/>
+ </function>
+
+ <function name="TexCoord4fv" offset="121" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="4"/>
+ <glx rop="62"/>
+ </function>
+
+ <function name="TexCoord4i" offset="122" vectorequiv="TexCoord4iv" static_dispatch="false">
+ <param name="s" type="GLint"/>
+ <param name="t" type="GLint"/>
+ <param name="r" type="GLint"/>
+ <param name="q" type="GLint"/>
+ </function>
+
+ <function name="TexCoord4iv" offset="123" static_dispatch="false">
+ <param name="v" type="const GLint *" count="4"/>
+ <glx rop="63"/>
+ </function>
+
+ <function name="TexCoord4s" offset="124" vectorequiv="TexCoord4sv" static_dispatch="false">
+ <param name="s" type="GLshort"/>
+ <param name="t" type="GLshort"/>
+ <param name="r" type="GLshort"/>
+ <param name="q" type="GLshort"/>
+ </function>
+
+ <function name="TexCoord4sv" offset="125" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="4"/>
+ <glx rop="64"/>
+ </function>
+
+ <function name="Vertex2d" offset="126" vectorequiv="Vertex2dv" static_dispatch="false">
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ </function>
+
+ <function name="Vertex2dv" offset="127" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="2"/>
+ <glx rop="65"/>
+ </function>
+
+ <function name="Vertex2f" offset="128" vectorequiv="Vertex2fv" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ </function>
+
+ <function name="Vertex2fv" offset="129" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="2"/>
+ <glx rop="66"/>
+ </function>
+
+ <function name="Vertex2i" offset="130" vectorequiv="Vertex2iv" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ </function>
+
+ <function name="Vertex2iv" offset="131" static_dispatch="false">
+ <param name="v" type="const GLint *" count="2"/>
+ <glx rop="67"/>
+ </function>
+
+ <function name="Vertex2s" offset="132" vectorequiv="Vertex2sv" static_dispatch="false">
+ <param name="x" type="GLshort"/>
+ <param name="y" type="GLshort"/>
+ </function>
+
+ <function name="Vertex2sv" offset="133" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="2"/>
+ <glx rop="68"/>
+ </function>
+
+ <function name="Vertex3d" offset="134" vectorequiv="Vertex3dv" static_dispatch="false">
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ <param name="z" type="GLdouble"/>
+ </function>
+
+ <function name="Vertex3dv" offset="135" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="3"/>
+ <glx rop="69"/>
+ </function>
+
+ <function name="Vertex3f" offset="136" vectorequiv="Vertex3fv" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ </function>
+
+ <function name="Vertex3fv" offset="137" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="3"/>
+ <glx rop="70"/>
+ </function>
+
+ <function name="Vertex3i" offset="138" vectorequiv="Vertex3iv" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="z" type="GLint"/>
+ </function>
+
+ <function name="Vertex3iv" offset="139" static_dispatch="false">
+ <param name="v" type="const GLint *" count="3"/>
+ <glx rop="71"/>
+ </function>
+
+ <function name="Vertex3s" offset="140" vectorequiv="Vertex3sv" static_dispatch="false">
+ <param name="x" type="GLshort"/>
+ <param name="y" type="GLshort"/>
+ <param name="z" type="GLshort"/>
+ </function>
+
+ <function name="Vertex3sv" offset="141" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="3"/>
+ <glx rop="72"/>
+ </function>
+
+ <function name="Vertex4d" offset="142" vectorequiv="Vertex4dv" static_dispatch="false">
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ <param name="z" type="GLdouble"/>
+ <param name="w" type="GLdouble"/>
+ </function>
+
+ <function name="Vertex4dv" offset="143" static_dispatch="false">
+ <param name="v" type="const GLdouble *" count="4"/>
+ <glx rop="73"/>
+ </function>
+
+ <function name="Vertex4f" offset="144" vectorequiv="Vertex4fv" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <param name="w" type="GLfloat"/>
+ </function>
+
+ <function name="Vertex4fv" offset="145" static_dispatch="false">
+ <param name="v" type="const GLfloat *" count="4"/>
+ <glx rop="74"/>
+ </function>
+
+ <function name="Vertex4i" offset="146" vectorequiv="Vertex4iv" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="z" type="GLint"/>
+ <param name="w" type="GLint"/>
+ </function>
+
+ <function name="Vertex4iv" offset="147" static_dispatch="false">
+ <param name="v" type="const GLint *" count="4"/>
+ <glx rop="75"/>
+ </function>
+
+ <function name="Vertex4s" offset="148" vectorequiv="Vertex4sv" static_dispatch="false">
+ <param name="x" type="GLshort"/>
+ <param name="y" type="GLshort"/>
+ <param name="z" type="GLshort"/>
+ <param name="w" type="GLshort"/>
+ </function>
+
+ <function name="Vertex4sv" offset="149" static_dispatch="false">
+ <param name="v" type="const GLshort *" count="4"/>
+ <glx rop="76"/>
+ </function>
+
+ <function name="ClipPlane" offset="150" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="const GLdouble *" count="4"/>
+ <glx rop="77"/>
+ </function>
+
+ <function name="ColorMaterial" offset="151" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="mode" type="GLenum"/>
+ <glx rop="78"/>
+ </function>
+
+ <!--function name="CullFace" offset="152" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="79"/>
+ </function>
+
+ <function name="Fogf" offset="153" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="80"/>
+ </function>
+
+ <function name="Fogfv" offset="154" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="81"/>
+ </function-->
+
+ <function name="Fogi" offset="155" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="82"/>
+ </function>
+
+ <function name="Fogiv" offset="156" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="83"/>
+ </function>
+
+ <!--function name="FrontFace" offset="157" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="84"/>
+ </function>
+
+ <function name="Hint" offset="158" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="mode" type="GLenum"/>
+ <glx rop="85"/>
+ </function>
+
+ <function name="Lightf" offset="159" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="86"/>
+ </function>
+
+ <function name="Lightfv" offset="160" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="87"/>
+ </function-->
+
+ <function name="Lighti" offset="161" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="88"/>
+ </function>
+
+ <function name="Lightiv" offset="162" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="89"/>
+ </function>
+
+ <!--function name="LightModelf" offset="163" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="90"/>
+ </function>
+
+ <function name="LightModelfv" offset="164" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="91"/>
+ </function-->
+
+ <function name="LightModeli" offset="165" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="92"/>
+ </function>
+
+ <function name="LightModeliv" offset="166" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="93"/>
+ </function>
+
+ <function name="LineStipple" offset="167" static_dispatch="false">
+ <param name="factor" type="GLint"/>
+ <param name="pattern" type="GLushort"/>
+ <glx rop="94"/>
+ </function>
+
+ <!--function name="LineWidth" offset="168" static_dispatch="false">
+ <param name="width" type="GLfloat"/>
+ <glx rop="95"/>
+ </function>
+
+ <function name="Materialf" offset="169" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="96"/>
+ </function>
+
+ <function name="Materialfv" offset="170" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="97"/>
+ </function-->
+
+ <function name="Materiali" offset="171" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="98"/>
+ </function>
+
+ <function name="Materialiv" offset="172" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="99"/>
+ </function>
+
+ <!--function name="PointSize" offset="173" static_dispatch="false">
+ <param name="size" type="GLfloat"/>
+ <glx rop="100"/>
+ </function-->
+
+ <function name="PolygonMode" offset="174" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="mode" type="GLenum"/>
+ <glx rop="101"/>
+ </function>
+
+ <function name="PolygonStipple" offset="175" static_dispatch="false">
+ <param name="mask" type="const GLubyte *" img_width="32" img_height="32" img_format="GL_COLOR_INDEX" img_type="GL_BITMAP" img_target="0" img_pad_dimensions="false"/>
+ <glx rop="102"/>
+ </function>
+
+ <!--function name="Scissor" offset="176" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="103"/>
+ </function>
+
+ <function name="ShadeModel" offset="177" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="104"/>
+ </function>
+
+ <function name="TexParameterf" offset="178" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="105"/>
+ </function>
+
+ <function name="TexParameterfv" offset="179" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="106"/>
+ </function>
+
+ <function name="TexParameteri" offset="180" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="107"/>
+ </function>
+
+ <function name="TexParameteriv" offset="181" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="108"/>
+ </function-->
+
+ <function name="TexImage1D" offset="182" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_format="format" img_type="type" img_target="target" img_send_null="true" img_pad_dimensions="true"/>
+ <glx rop="109" large="true"/>
+ </function>
+
+ <!--function name="TexImage2D" offset="183" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_format="format" img_type="type" img_target="target" img_send_null="true" img_pad_dimensions="true"/>
+ <glx rop="110" large="true"/>
+ </function>
+
+ <function name="TexEnvf" offset="184" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="111"/>
+ </function>
+
+ <function name="TexEnvfv" offset="185" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="112"/>
+ </function>
+
+ <function name="TexEnvi" offset="186" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="113"/>
+ </function>
+
+ <function name="TexEnviv" offset="187" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="114"/>
+ </function-->
+
+ <function name="TexGend" offset="188" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLdouble"/>
+ <glx rop="115"/>
+ </function>
+
+ <function name="TexGendv" offset="189" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLdouble *" variable_param="pname"/>
+ <glx rop="116"/>
+ </function>
+
+ <!--function name="TexGenf" offset="190" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="117"/>
+ </function>
+
+ <function name="TexGenfv" offset="191" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="118"/>
+ </function>
+
+ <function name="TexGeni" offset="192" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="119"/>
+ </function>
+
+ <function name="TexGeniv" offset="193" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="120"/>
+ </function-->
+
+ <function name="FeedbackBuffer" offset="194" static_dispatch="false">
+ <param name="size" type="GLsizei"/>
+ <param name="type" type="GLenum"/>
+ <param name="buffer" type="GLfloat *" output="true"/>
+ <glx sop="105" handcode="true"/>
+ </function>
+
+ <function name="SelectBuffer" offset="195" static_dispatch="false">
+ <param name="size" type="GLsizei"/>
+ <param name="buffer" type="GLuint *" output="true"/>
+ <glx sop="106" handcode="true"/>
+ </function>
+
+ <function name="RenderMode" offset="196" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <return type="GLint"/>
+ <glx sop="107" handcode="true"/>
+ </function>
+
+ <function name="InitNames" offset="197" static_dispatch="false">
+ <glx rop="121"/>
+ </function>
+
+ <function name="LoadName" offset="198" static_dispatch="false">
+ <param name="name" type="GLuint"/>
+ <glx rop="122"/>
+ </function>
+
+ <function name="PassThrough" offset="199" static_dispatch="false">
+ <param name="token" type="GLfloat"/>
+ <glx rop="123"/>
+ </function>
+
+ <function name="PopName" offset="200" static_dispatch="false">
+ <glx rop="124"/>
+ </function>
+
+ <function name="PushName" offset="201" static_dispatch="false">
+ <param name="name" type="GLuint"/>
+ <glx rop="125"/>
+ </function>
+
+ <function name="DrawBuffer" offset="202" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="126"/>
+ </function>
+
+ <!--function name="Clear" offset="203" static_dispatch="false">
+ <param name="mask" type="GLbitfield"/>
+ <glx rop="127"/>
+ </function-->
+
+ <function name="ClearAccum" offset="204" static_dispatch="false">
+ <param name="red" type="GLfloat"/>
+ <param name="green" type="GLfloat"/>
+ <param name="blue" type="GLfloat"/>
+ <param name="alpha" type="GLfloat"/>
+ <glx rop="128"/>
+ </function>
+
+ <function name="ClearIndex" offset="205" static_dispatch="false">
+ <param name="c" type="GLfloat"/>
+ <glx rop="129"/>
+ </function>
+
+ <!--function name="ClearColor" offset="206" static_dispatch="false">
+ <param name="red" type="GLclampf"/>
+ <param name="green" type="GLclampf"/>
+ <param name="blue" type="GLclampf"/>
+ <param name="alpha" type="GLclampf"/>
+ <glx rop="130"/>
+ </function>
+
+ <function name="ClearStencil" offset="207" static_dispatch="false">
+ <param name="s" type="GLint"/>
+ <glx rop="131"/>
+ </function-->
+
+ <function name="ClearDepth" offset="208" static_dispatch="false">
+ <param name="depth" type="GLclampd"/>
+ <glx rop="132"/>
+ </function>
+
+ <!--function name="StencilMask" offset="209" static_dispatch="false">
+ <param name="mask" type="GLuint"/>
+ <glx rop="133"/>
+ </function>
+
+ <function name="ColorMask" offset="210" static_dispatch="false">
+ <param name="red" type="GLboolean"/>
+ <param name="green" type="GLboolean"/>
+ <param name="blue" type="GLboolean"/>
+ <param name="alpha" type="GLboolean"/>
+ <glx rop="134"/>
+ </function>
+
+ <function name="DepthMask" offset="211" static_dispatch="false">
+ <param name="flag" type="GLboolean"/>
+ <glx rop="135"/>
+ </function-->
+
+ <function name="IndexMask" offset="212" static_dispatch="false">
+ <param name="mask" type="GLuint"/>
+ <glx rop="136"/>
+ </function>
+
+ <function name="Accum" offset="213" static_dispatch="false">
+ <param name="op" type="GLenum"/>
+ <param name="value" type="GLfloat"/>
+ <glx rop="137"/>
+ </function>
+
+ <!--function name="Disable" offset="214" static_dispatch="false">
+ <param name="cap" type="GLenum"/>
+ <glx rop="138" handcode="client"/>
+ </function>
+
+ <function name="Enable" offset="215" static_dispatch="false">
+ <param name="cap" type="GLenum"/>
+ <glx rop="139" handcode="client"/>
+ </function>
+
+ <function name="Finish" offset="216" static_dispatch="false">
+ <glx sop="108" handcode="true"/>
+ </function>
+
+ <function name="Flush" offset="217" static_dispatch="false">
+ <glx sop="142" handcode="true"/>
+ </function-->
+
+ <function name="PopAttrib" offset="218" static_dispatch="false">
+ <glx rop="141"/>
+ </function>
+
+ <function name="PushAttrib" offset="219" static_dispatch="false">
+ <param name="mask" type="GLbitfield"/>
+ <glx rop="142"/>
+ </function>
+
+ <function name="Map1d" offset="220" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="u1" type="GLdouble"/>
+ <param name="u2" type="GLdouble"/>
+ <param name="stride" type="GLint" client_only="true"/>
+ <param name="order" type="GLint"/>
+ <param name="points" type="const GLdouble *" variable_param="order"/>
+ <glx rop="143" handcode="true"/>
+ </function>
+
+ <function name="Map1f" offset="221" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="u1" type="GLfloat"/>
+ <param name="u2" type="GLfloat"/>
+ <param name="stride" type="GLint" client_only="true"/>
+ <param name="order" type="GLint"/>
+ <param name="points" type="const GLfloat *" variable_param="order"/>
+ <glx rop="144" handcode="true"/>
+ </function>
+
+ <function name="Map2d" offset="222" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="u1" type="GLdouble"/>
+ <param name="u2" type="GLdouble"/>
+ <param name="ustride" type="GLint" client_only="true"/>
+ <param name="uorder" type="GLint"/>
+ <param name="v1" type="GLdouble"/>
+ <param name="v2" type="GLdouble"/>
+ <param name="vstride" type="GLint" client_only="true"/>
+ <param name="vorder" type="GLint"/>
+ <param name="points" type="const GLdouble *" variable_param="uorder"/>
+ <glx rop="145" handcode="true"/>
+ </function>
+
+ <function name="Map2f" offset="223" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="u1" type="GLfloat"/>
+ <param name="u2" type="GLfloat"/>
+ <param name="ustride" type="GLint" client_only="true"/>
+ <param name="uorder" type="GLint"/>
+ <param name="v1" type="GLfloat"/>
+ <param name="v2" type="GLfloat"/>
+ <param name="vstride" type="GLint" client_only="true"/>
+ <param name="vorder" type="GLint"/>
+ <param name="points" type="const GLfloat *" variable_param="uorder"/>
+ <glx rop="146" handcode="true"/>
+ </function>
+
+ <function name="MapGrid1d" offset="224" static_dispatch="false">
+ <param name="un" type="GLint"/>
+ <param name="u1" type="GLdouble"/>
+ <param name="u2" type="GLdouble"/>
+ <glx rop="147"/>
+ </function>
+
+ <function name="MapGrid1f" offset="225" static_dispatch="false">
+ <param name="un" type="GLint"/>
+ <param name="u1" type="GLfloat"/>
+ <param name="u2" type="GLfloat"/>
+ <glx rop="148"/>
+ </function>
+
+ <function name="MapGrid2d" offset="226" static_dispatch="false">
+ <param name="un" type="GLint"/>
+ <param name="u1" type="GLdouble"/>
+ <param name="u2" type="GLdouble"/>
+ <param name="vn" type="GLint"/>
+ <param name="v1" type="GLdouble"/>
+ <param name="v2" type="GLdouble"/>
+ <glx rop="149"/>
+ </function>
+
+ <function name="MapGrid2f" offset="227" static_dispatch="false">
+ <param name="un" type="GLint"/>
+ <param name="u1" type="GLfloat"/>
+ <param name="u2" type="GLfloat"/>
+ <param name="vn" type="GLint"/>
+ <param name="v1" type="GLfloat"/>
+ <param name="v2" type="GLfloat"/>
+ <glx rop="150"/>
+ </function>
+
+ <function name="EvalCoord1d" offset="228" vectorequiv="EvalCoord1dv" static_dispatch="false">
+ <param name="u" type="GLdouble"/>
+ </function>
+
+ <function name="EvalCoord1dv" offset="229" static_dispatch="false">
+ <param name="u" type="const GLdouble *" count="1"/>
+ <glx rop="151"/>
+ </function>
+
+ <function name="EvalCoord1f" offset="230" vectorequiv="EvalCoord1fv" static_dispatch="false">
+ <param name="u" type="GLfloat"/>
+ </function>
+
+ <function name="EvalCoord1fv" offset="231" static_dispatch="false">
+ <param name="u" type="const GLfloat *" count="1"/>
+ <glx rop="152"/>
+ </function>
+
+ <function name="EvalCoord2d" offset="232" vectorequiv="EvalCoord2dv" static_dispatch="false">
+ <param name="u" type="GLdouble"/>
+ <param name="v" type="GLdouble"/>
+ </function>
+
+ <function name="EvalCoord2dv" offset="233" static_dispatch="false">
+ <param name="u" type="const GLdouble *" count="2"/>
+ <glx rop="153"/>
+ </function>
+
+ <function name="EvalCoord2f" offset="234" vectorequiv="EvalCoord2fv" static_dispatch="false">
+ <param name="u" type="GLfloat"/>
+ <param name="v" type="GLfloat"/>
+ </function>
+
+ <function name="EvalCoord2fv" offset="235" static_dispatch="false">
+ <param name="u" type="const GLfloat *" count="2"/>
+ <glx rop="154"/>
+ </function>
+
+ <function name="EvalMesh1" offset="236" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <param name="i1" type="GLint"/>
+ <param name="i2" type="GLint"/>
+ <glx rop="155"/>
+ </function>
+
+ <function name="EvalPoint1" offset="237" static_dispatch="false">
+ <param name="i" type="GLint"/>
+ <glx rop="156"/>
+ </function>
+
+ <function name="EvalMesh2" offset="238" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <param name="i1" type="GLint"/>
+ <param name="i2" type="GLint"/>
+ <param name="j1" type="GLint"/>
+ <param name="j2" type="GLint"/>
+ <glx rop="157"/>
+ </function>
+
+ <function name="EvalPoint2" offset="239" static_dispatch="false">
+ <param name="i" type="GLint"/>
+ <param name="j" type="GLint"/>
+ <glx rop="158"/>
+ </function>
+
+ <!--function name="AlphaFunc" offset="240" static_dispatch="false">
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLclampf"/>
+ <glx rop="159"/>
+ </function>
+
+ <function name="BlendFunc" offset="241" static_dispatch="false">
+ <param name="sfactor" type="GLenum"/>
+ <param name="dfactor" type="GLenum"/>
+ <glx rop="160"/>
+ </function>
+
+ <function name="LogicOp" offset="242" static_dispatch="false">
+ <param name="opcode" type="GLenum"/>
+ <glx rop="161"/>
+ </function>
+
+ <function name="StencilFunc" offset="243" static_dispatch="false">
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLint"/>
+ <param name="mask" type="GLuint"/>
+ <glx rop="162"/>
+ </function>
+
+ <function name="StencilOp" offset="244" static_dispatch="false">
+ <param name="fail" type="GLenum"/>
+ <param name="zfail" type="GLenum"/>
+ <param name="zpass" type="GLenum"/>
+ <glx rop="163"/>
+ </function>
+
+ <function name="DepthFunc" offset="245" static_dispatch="false">
+ <param name="func" type="GLenum"/>
+ <glx rop="164"/>
+ </function-->
+
+ <function name="PixelZoom" offset="246" static_dispatch="false">
+ <param name="xfactor" type="GLfloat"/>
+ <param name="yfactor" type="GLfloat"/>
+ <glx rop="165"/>
+ </function>
+
+ <function name="PixelTransferf" offset="247" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx rop="166"/>
+ </function>
+
+ <function name="PixelTransferi" offset="248" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx rop="167"/>
+ </function>
+
+ <function name="PixelStoref" offset="249" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLfloat"/>
+ <glx sop="109" handcode="client"/>
+ </function>
+
+ <!--function name="PixelStorei" offset="250" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLint"/>
+ <glx sop="110" handcode="client"/>
+ </function-->
+
+ <function name="PixelMapfv" offset="251" static_dispatch="false">
+ <param name="map" type="GLenum"/>
+ <param name="mapsize" type="GLsizei" counter="true"/>
+ <param name="values" type="const GLfloat *" count="mapsize"/>
+ <glx rop="168" large="true"/>
+ </function>
+
+ <function name="PixelMapuiv" offset="252" static_dispatch="false">
+ <param name="map" type="GLenum"/>
+ <param name="mapsize" type="GLsizei" counter="true"/>
+ <param name="values" type="const GLuint *" count="mapsize"/>
+ <glx rop="169" large="true"/>
+ </function>
+
+ <function name="PixelMapusv" offset="253" static_dispatch="false">
+ <param name="map" type="GLenum"/>
+ <param name="mapsize" type="GLsizei" counter="true"/>
+ <param name="values" type="const GLushort *" count="mapsize"/>
+ <glx rop="170" large="true"/>
+ </function>
+
+ <function name="ReadBuffer" offset="254" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="171"/>
+ </function>
+
+ <function name="CopyPixels" offset="255" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="type" type="GLenum"/>
+ <glx rop="172"/>
+ </function>
+
+ <!--function name="ReadPixels" offset="256" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="GLvoid *" output="true" img_width="width" img_height="height" img_format="format" img_type="type" img_target="0"/>
+ <glx sop="111"/>
+ </function-->
+
+ <function name="DrawPixels" offset="257" static_dispatch="false">
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_format="format" img_type="type" img_target="0" img_pad_dimensions="false"/>
+ <glx rop="173" large="true"/>
+ </function>
+
+ <!--function name="GetBooleanv" offset="258" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLboolean *" output="true" variable_param="pname"/>
+ <glx sop="112" handcode="client"/>
+ </function-->
+
+ <function name="GetClipPlane" offset="259" static_dispatch="false">
+ <param name="plane" type="GLenum"/>
+ <param name="equation" type="GLdouble *" output="true" count="4"/>
+ <glx sop="113" always_array="true"/>
+ </function>
+
+ <function name="GetDoublev" offset="260" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLdouble *" output="true" variable_param="pname"/>
+ <glx sop="114" handcode="client"/>
+ </function>
+
+ <!--function name="GetError" offset="261" static_dispatch="false">
+ <return type="GLenum"/>
+ <glx sop="115" handcode="client"/>
+ </function>
+
+ <function name="GetFloatv" offset="262" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="116" handcode="client"/>
+ </function>
+
+ <function name="GetIntegerv" offset="263" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="117" handcode="client"/>
+ </function>
+
+ <function name="GetLightfv" offset="264" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="118"/>
+ </function-->
+
+ <function name="GetLightiv" offset="265" static_dispatch="false">
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="119"/>
+ </function>
+
+ <function name="GetMapdv" offset="266" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="query" type="GLenum"/>
+ <param name="v" type="GLdouble *" output="true" variable_param="target query"/>
+ <glx sop="120"/>
+ </function>
+
+ <function name="GetMapfv" offset="267" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="query" type="GLenum"/>
+ <param name="v" type="GLfloat *" output="true" variable_param="target query"/>
+ <glx sop="121"/>
+ </function>
+
+ <function name="GetMapiv" offset="268" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="query" type="GLenum"/>
+ <param name="v" type="GLint *" output="true" variable_param="target query"/>
+ <glx sop="122"/>
+ </function>
+
+ <!--function name="GetMaterialfv" offset="269" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="123"/>
+ </function-->
+
+ <function name="GetMaterialiv" offset="270" static_dispatch="false">
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="124"/>
+ </function>
+
+ <function name="GetPixelMapfv" offset="271" static_dispatch="false">
+ <param name="map" type="GLenum"/>
+ <param name="values" type="GLfloat *" output="true" variable_param="map"/>
+ <glx sop="125"/>
+ </function>
+
+ <function name="GetPixelMapuiv" offset="272" static_dispatch="false">
+ <param name="map" type="GLenum"/>
+ <param name="values" type="GLuint *" output="true" variable_param="map"/>
+ <glx sop="126"/>
+ </function>
+
+ <function name="GetPixelMapusv" offset="273" static_dispatch="false">
+ <param name="map" type="GLenum"/>
+ <param name="values" type="GLushort *" output="true" variable_param="map"/>
+ <glx sop="127"/>
+ </function>
+
+ <function name="GetPolygonStipple" offset="274" static_dispatch="false">
+ <param name="mask" type="GLubyte *" output="true" img_width="32" img_height="32" img_format="GL_COLOR_INDEX" img_type="GL_BITMAP"/>
+ <glx sop="128"/>
+ </function>
+
+ <!--function name="GetString" offset="275" static_dispatch="false">
+ <param name="name" type="GLenum"/>
+ <return type="const GLubyte *"/>
+ <glx sop="129" handcode="true"/>
+ </function>
+
+ <function name="GetTexEnvfv" offset="276" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="130"/>
+ </function>
+
+ <function name="GetTexEnviv" offset="277" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="131"/>
+ </function-->
+
+ <function name="GetTexGendv" offset="278" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLdouble *" output="true" variable_param="pname"/>
+ <glx sop="132"/>
+ </function>
+
+ <!--function name="GetTexGenfv" offset="279" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="133"/>
+ </function>
+
+ <function name="GetTexGeniv" offset="280" static_dispatch="false">
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="134"/>
+ </function-->
+
+ <function name="GetTexImage" offset="281" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="GLvoid *" output="true" img_width="width" img_height="height" img_depth="depth" img_format="format" img_type="type"/>
+ <glx sop="135" dimensions_in_reply="true"/>
+ </function>
+
+ <!--function name="GetTexParameterfv" offset="282" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="136"/>
+ </function>
+
+ <function name="GetTexParameteriv" offset="283" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="137"/>
+ </function-->
+
+ <function name="GetTexLevelParameterfv" offset="284" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="138"/>
+ </function>
+
+ <function name="GetTexLevelParameteriv" offset="285" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="139"/>
+ </function>
+
+ <!--function name="IsEnabled" offset="286" static_dispatch="false">
+ <param name="cap" type="GLenum"/>
+ <return type="GLboolean"/>
+ <glx sop="140" handcode="client"/>
+ </function-->
+
+ <function name="IsList" offset="287" static_dispatch="false">
+ <param name="list" type="GLuint"/>
+ <return type="GLboolean"/>
+ <glx sop="141"/>
+ </function>
+
+ <function name="DepthRange" offset="288" static_dispatch="false">
+ <param name="zNear" type="GLclampd"/>
+ <param name="zFar" type="GLclampd"/>
+ <glx rop="174"/>
+ </function>
+
+ <function name="Frustum" offset="289" static_dispatch="false">
+ <param name="left" type="GLdouble"/>
+ <param name="right" type="GLdouble"/>
+ <param name="bottom" type="GLdouble"/>
+ <param name="top" type="GLdouble"/>
+ <param name="zNear" type="GLdouble"/>
+ <param name="zFar" type="GLdouble"/>
+ <glx rop="175"/>
+ </function>
+
+ <!--function name="LoadIdentity" offset="290" static_dispatch="false">
+ <glx rop="176"/>
+ </function>
+
+ <function name="LoadMatrixf" offset="291" static_dispatch="false">
+ <param name="m" type="const GLfloat *" count="16"/>
+ <glx rop="177"/>
+ </function-->
+
+ <function name="LoadMatrixd" offset="292" static_dispatch="false">
+ <param name="m" type="const GLdouble *" count="16"/>
+ <glx rop="178"/>
+ </function>
+
+ <!--function name="MatrixMode" offset="293" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="179"/>
+ </function>
+
+ <function name="MultMatrixf" offset="294" static_dispatch="false">
+ <param name="m" type="const GLfloat *" count="16"/>
+ <glx rop="180"/>
+ </function-->
+
+ <function name="MultMatrixd" offset="295" static_dispatch="false">
+ <param name="m" type="const GLdouble *" count="16"/>
+ <glx rop="181"/>
+ </function>
+
+ <function name="Ortho" offset="296" static_dispatch="false">
+ <param name="left" type="GLdouble"/>
+ <param name="right" type="GLdouble"/>
+ <param name="bottom" type="GLdouble"/>
+ <param name="top" type="GLdouble"/>
+ <param name="zNear" type="GLdouble"/>
+ <param name="zFar" type="GLdouble"/>
+ <glx rop="182"/>
+ </function>
+
+ <!--function name="PopMatrix" offset="297" static_dispatch="false">
+ <glx rop="183"/>
+ </function>
+
+ <function name="PushMatrix" offset="298" static_dispatch="false">
+ <glx rop="184"/>
+ </function-->
+
+ <function name="Rotated" offset="299" static_dispatch="false">
+ <param name="angle" type="GLdouble"/>
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ <param name="z" type="GLdouble"/>
+ <glx rop="185"/>
+ </function>
+
+ <!--function name="Rotatef" offset="300" static_dispatch="false">
+ <param name="angle" type="GLfloat"/>
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <glx rop="186"/>
+ </function-->
+
+ <function name="Scaled" offset="301" static_dispatch="false">
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ <param name="z" type="GLdouble"/>
+ <glx rop="187"/>
+ </function>
+
+ <!--function name="Scalef" offset="302" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <glx rop="188"/>
+ </function-->
+
+ <function name="Translated" offset="303" static_dispatch="false">
+ <param name="x" type="GLdouble"/>
+ <param name="y" type="GLdouble"/>
+ <param name="z" type="GLdouble"/>
+ <glx rop="189"/>
+ </function>
+
+ <!--function name="Translatef" offset="304" static_dispatch="false">
+ <param name="x" type="GLfloat"/>
+ <param name="y" type="GLfloat"/>
+ <param name="z" type="GLfloat"/>
+ <glx rop="190"/>
+ </function>
+
+ <function name="Viewport" offset="305" static_dispatch="false">
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="191"/>
+ </function-->
+</category>
+
+<category name="1.1">
+ <function name="ArrayElement" offset="306" static_dispatch="false">
+ <param name="i" type="GLint"/>
+ <glx handcode="true"/>
+ </function>
+
+ <!--function name="ColorPointer" offset="308" static_dispatch="false">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="DisableClientState" offset="309" static_dispatch="false">
+ <param name="array" type="GLenum"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="DrawArrays" offset="310" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <param name="first" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <glx rop="193" handcode="true"/>
+ </function>
+
+ <function name="DrawElements" offset="311" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <param name="count" type="GLsizei"/>
+ <param name="type" type="GLenum"/>
+ <param name="indices" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function-->
+
+ <function name="EdgeFlagPointer" offset="312" static_dispatch="false">
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <!--function name="EnableClientState" offset="313" static_dispatch="false">
+ <param name="array" type="GLenum"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="GetPointerv" offset="329" static_dispatch="false">
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLvoid **" output="true"/>
+ <glx handcode="true"/>
+ </function-->
+
+ <function name="IndexPointer" offset="314" static_dispatch="false">
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="InterleavedArrays" offset="317" static_dispatch="false">
+ <param name="format" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <!--function name="NormalPointer" offset="318" static_dispatch="false">
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="TexCoordPointer" offset="320" static_dispatch="false">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="VertexPointer" offset="321" static_dispatch="false">
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="PolygonOffset" offset="319" static_dispatch="false">
+ <param name="factor" type="GLfloat"/>
+ <param name="units" type="GLfloat"/>
+ <glx rop="192"/>
+ </function-->
+
+ <function name="CopyTexImage1D" offset="323" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <glx rop="4119"/>
+ </function>
+
+ <!--function name="CopyTexImage2D" offset="324" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <glx rop="4120"/>
+ </function-->
+
+ <function name="CopyTexSubImage1D" offset="325" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <glx rop="4121"/>
+ </function>
+
+ <!--function name="CopyTexSubImage2D" offset="326" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="4122"/>
+ </function-->
+
+ <function name="TexSubImage1D" offset="332" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="UNUSED" type="GLuint" padding="true"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_xoff="xoffset" img_format="format" img_type="type" img_target="target" img_pad_dimensions="true"/>
+ <glx rop="4099" large="true"/>
+ </function>
+
+ <!--function name="TexSubImage2D" offset="333" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="UNUSED" type="GLuint" padding="true"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_xoff="xoffset" img_yoff="yoffset" img_format="format" img_type="type" img_target="target" img_pad_dimensions="true"/>
+ <glx rop="4100" large="true"/>
+ </function-->
+
+ <function name="AreTexturesResident" offset="322" static_dispatch="false">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="textures" type="const GLuint *" count="n"/>
+ <param name="residences" type="GLboolean *" output="true" count="n"/>
+ <return type="GLboolean"/>
+ <glx sop="143" handcode="client" always_array="true"/>
+ </function>
+
+ <!--function name="BindTexture" offset="307" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ <glx rop="4117"/>
+ </function>
+
+ <function name="DeleteTextures" offset="327" static_dispatch="false">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="textures" type="const GLuint *" count="n"/>
+ <glx sop="144"/>
+ </function>
+
+ <function name="GenTextures" offset="328" static_dispatch="false">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="textures" type="GLuint *" output="true" count="n"/>
+ <glx sop="145" always_array="true"/>
+ </function>
+
+ <function name="IsTexture" offset="330" static_dispatch="false">
+ <param name="texture" type="GLuint"/>
+ <return type="GLboolean"/>
+ <glx sop="146"/>
+ </function-->
+
+ <function name="PrioritizeTextures" offset="331" static_dispatch="false">
+ <param name="n" type="GLsizei" counter="true"/>
+ <param name="textures" type="const GLuint *" count="n"/>
+ <param name="priorities" type="const GLclampf *" count="n"/>
+ <glx rop="4118"/>
+ </function>
+
+ <function name="Indexub" offset="315" vectorequiv="Indexubv" static_dispatch="false">
+ <param name="c" type="GLubyte"/>
+ </function>
+
+ <function name="Indexubv" offset="316" static_dispatch="false">
+ <param name="c" type="const GLubyte *" count="1"/>
+ <glx rop="194"/>
+ </function>
+
+ <function name="PopClientAttrib" offset="334" static_dispatch="false">
+ <glx handcode="true"/>
+ </function>
+
+ <function name="PushClientAttrib" offset="335" static_dispatch="false">
+ <param name="mask" type="GLbitfield"/>
+ <glx handcode="true"/>
+ </function>
+</category>
+
+<category name="1.2">
+ <!--function name="BlendColor" offset="336" static_dispatch="false">
+ <param name="red" type="GLclampf"/>
+ <param name="green" type="GLclampf"/>
+ <param name="blue" type="GLclampf"/>
+ <param name="alpha" type="GLclampf"/>
+ <glx rop="4096"/>
+ </function>
+
+ <function name="BlendEquation" offset="337" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <glx rop="4097"/>
+ </function-->
+
+ <function name="DrawRangeElements" offset="338" static_dispatch="false">
+ <param name="mode" type="GLenum"/>
+ <param name="start" type="GLuint"/>
+ <param name="end" type="GLuint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="type" type="GLenum"/>
+ <param name="indices" type="const GLvoid *"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="ColorTable" offset="339" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="table" type="const GLvoid *" img_width="width" img_pad_dimensions="false" img_format="format" img_type="type" img_target="target"/>
+ <glx rop="2053" large="true"/>
+ </function>
+
+ <function name="ColorTableParameterfv" offset="340" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="2054"/>
+ </function>
+
+ <function name="ColorTableParameteriv" offset="341" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="2055"/>
+ </function>
+
+ <function name="CopyColorTable" offset="342" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <glx rop="2056"/>
+ </function>
+
+ <function name="GetColorTable" offset="343" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="table" type="GLvoid *" output="true" img_width="width" img_format="format" img_type="type"/>
+ <glx sop="147" dimensions_in_reply="true"/>
+ </function>
+
+ <function name="GetColorTableParameterfv" offset="344" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="148"/>
+ </function>
+
+ <function name="GetColorTableParameteriv" offset="345" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="149"/>
+ </function>
+
+ <function name="ColorSubTable" offset="346" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="start" type="GLsizei"/>
+ <param name="count" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="data" type="const GLvoid *" img_width="count" img_pad_dimensions="false" img_format="format" img_type="type" img_target="target"/>
+ <glx rop="195" large="true"/>
+ </function>
+
+ <function name="CopyColorSubTable" offset="347" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="start" type="GLsizei"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <glx rop="196"/>
+ </function>
+
+ <function name="ConvolutionFilter1D" offset="348" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="image" type="const GLvoid *" img_width="width" img_format="format" img_type="type" img_target="target" img_pad_dimensions="true"/>
+ <glx rop="4101" large="true"/>
+ </function>
+
+ <function name="ConvolutionFilter2D" offset="349" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="image" type="const GLvoid *" img_width="width" img_height="height" img_format="format" img_type="type" img_target="target" img_pad_dimensions="true"/>
+ <glx rop="4102" large="true"/>
+ </function>
+
+ <function name="ConvolutionParameterf" offset="350" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat"/>
+ <glx rop="4103"/>
+ </function>
+
+ <function name="ConvolutionParameterfv" offset="351" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLfloat *" variable_param="pname"/>
+ <glx rop="4104"/>
+ </function>
+
+ <function name="ConvolutionParameteri" offset="352" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint"/>
+ <glx rop="4105"/>
+ </function>
+
+ <function name="ConvolutionParameteriv" offset="353" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="const GLint *" variable_param="pname"/>
+ <glx rop="4106"/>
+ </function>
+
+ <function name="CopyConvolutionFilter1D" offset="354" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <glx rop="4107"/>
+ </function>
+
+ <function name="CopyConvolutionFilter2D" offset="355" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="4108"/>
+ </function>
+
+ <function name="GetConvolutionFilter" offset="356" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="image" type="GLvoid *" output="true" img_width="width" img_height="height" img_format="format" img_type="type"/>
+ <glx sop="150" dimensions_in_reply="true"/>
+ </function>
+
+ <function name="GetConvolutionParameterfv" offset="357" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="151"/>
+ </function>
+
+ <function name="GetConvolutionParameteriv" offset="358" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="152"/>
+ </function>
+
+ <function name="GetSeparableFilter" offset="359" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="row" type="GLvoid *" output="true"/>
+ <param name="column" type="GLvoid *" output="true"/>
+ <param name="span" type="GLvoid *" output="true"/>
+ <glx sop="153" handcode="true"/>
+ </function>
+
+ <function name="SeparableFilter2D" offset="360" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="row" type="const GLvoid *"/>
+ <param name="column" type="const GLvoid *"/>
+ <glx rop="4109" handcode="true"/>
+ </function>
+
+ <function name="GetHistogram" offset="361" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="reset" type="GLboolean"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="values" type="GLvoid *" output="true" img_width="width" img_format="format" img_type="type"/>
+ <glx sop="154" dimensions_in_reply="true" img_reset="reset"/>
+ </function>
+
+ <function name="GetHistogramParameterfv" offset="362" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="155"/>
+ </function>
+
+ <function name="GetHistogramParameteriv" offset="363" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="156"/>
+ </function>
+
+ <function name="GetMinmax" offset="364" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="reset" type="GLboolean"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="values" type="GLvoid *" output="true" img_width="2" img_format="format" img_type="type"/>
+ <glx sop="157" img_reset="reset"/>
+ </function>
+
+ <function name="GetMinmaxParameterfv" offset="365" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLfloat *" output="true" variable_param="pname"/>
+ <glx sop="158"/>
+ </function>
+
+ <function name="GetMinmaxParameteriv" offset="366" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLint *" output="true" variable_param="pname"/>
+ <glx sop="159"/>
+ </function>
+
+ <function name="Histogram" offset="367" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="sink" type="GLboolean"/>
+ <glx rop="4110"/>
+ </function>
+
+ <function name="Minmax" offset="368" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="internalformat" type="GLenum"/>
+ <param name="sink" type="GLboolean"/>
+ <glx rop="4111"/>
+ </function>
+
+ <function name="ResetHistogram" offset="369" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <glx rop="4112"/>
+ </function>
+
+ <function name="ResetMinmax" offset="370" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <glx rop="4113"/>
+ </function>
+
+ <!--function name="TexImage3D" offset="371" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalformat" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_depth="depth" img_format="format" img_type="type" img_target="target" img_null_flag="true" img_pad_dimensions="true"/>
+ <glx rop="4114" large="true"/>
+ </function>
+
+ <function name="TexSubImage3D" offset="372" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="UNUSED" type="GLuint" padding="true"/>
+ <param name="pixels" type="const GLvoid *" img_width="width" img_height="height" img_depth="depth" img_xoff="xoffset" img_yoff="yoffset" img_zoff="zoffset" img_format="format" img_type="type" img_target="target" img_pad_dimensions="true"/>
+ <glx rop="4115" large="true"/>
+ </function>
+
+ <function name="CopyTexSubImage3D" offset="373" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <glx rop="4123"/>
+ </function-->
+</category>
+
+<category name="GL_ARB_multitexture" number="1">
+ <!--function name="ActiveTextureARB" offset="374" static_dispatch="false">
+ <param name="texture" type="GLenum"/>
+ <glx rop="197"/>
+ </function>
+
+ <function name="ClientActiveTextureARB" offset="375" static_dispatch="false">
+ <param name="texture" type="GLenum"/>
+ <glx handcode="true"/>
+ </function-->
+
+ <function name="MultiTexCoord1dARB" offset="376" vectorequiv="MultiTexCoord1dvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLdouble"/>
+ </function>
+
+ <function name="MultiTexCoord1dvARB" offset="377" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLdouble *" count="1"/>
+ <glx rop="198"/>
+ </function>
+
+ <function name="MultiTexCoord1fARB" offset="378" vectorequiv="MultiTexCoord1fvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLfloat"/>
+ </function>
+
+ <function name="MultiTexCoord1fvARB" offset="379" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLfloat *" count="1"/>
+ <glx rop="199"/>
+ </function>
+
+ <function name="MultiTexCoord1iARB" offset="380" vectorequiv="MultiTexCoord1ivARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLint"/>
+ </function>
+
+ <function name="MultiTexCoord1ivARB" offset="381" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLint *" count="1"/>
+ <glx rop="200"/>
+ </function>
+
+ <function name="MultiTexCoord1sARB" offset="382" vectorequiv="MultiTexCoord1svARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLshort"/>
+ </function>
+
+ <function name="MultiTexCoord1svARB" offset="383" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLshort *" count="1"/>
+ <glx rop="201"/>
+ </function>
+
+ <function name="MultiTexCoord2dARB" offset="384" vectorequiv="MultiTexCoord2dvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLdouble"/>
+ <param name="t" type="GLdouble"/>
+ </function>
+
+ <function name="MultiTexCoord2dvARB" offset="385" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLdouble *" count="2"/>
+ <glx rop="202"/>
+ </function>
+
+ <function name="MultiTexCoord2fARB" offset="386" vectorequiv="MultiTexCoord2fvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLfloat"/>
+ <param name="t" type="GLfloat"/>
+ </function>
+
+ <function name="MultiTexCoord2fvARB" offset="387" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLfloat *" count="2"/>
+ <glx rop="203"/>
+ </function>
+
+ <function name="MultiTexCoord2iARB" offset="388" vectorequiv="MultiTexCoord2ivARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLint"/>
+ <param name="t" type="GLint"/>
+ </function>
+
+ <function name="MultiTexCoord2ivARB" offset="389" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLint *" count="2"/>
+ <glx rop="204"/>
+ </function>
+
+ <function name="MultiTexCoord2sARB" offset="390" vectorequiv="MultiTexCoord2svARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLshort"/>
+ <param name="t" type="GLshort"/>
+ </function>
+
+ <function name="MultiTexCoord2svARB" offset="391" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLshort *" count="2"/>
+ <glx rop="205"/>
+ </function>
+
+ <function name="MultiTexCoord3dARB" offset="392" vectorequiv="MultiTexCoord3dvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLdouble"/>
+ <param name="t" type="GLdouble"/>
+ <param name="r" type="GLdouble"/>
+ </function>
+
+ <function name="MultiTexCoord3dvARB" offset="393" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLdouble *" count="3"/>
+ <glx rop="206"/>
+ </function>
+
+ <function name="MultiTexCoord3fARB" offset="394" vectorequiv="MultiTexCoord3fvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLfloat"/>
+ <param name="t" type="GLfloat"/>
+ <param name="r" type="GLfloat"/>
+ </function>
+
+ <function name="MultiTexCoord3fvARB" offset="395" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLfloat *" count="3"/>
+ <glx rop="207"/>
+ </function>
+
+ <function name="MultiTexCoord3iARB" offset="396" vectorequiv="MultiTexCoord3ivARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLint"/>
+ <param name="t" type="GLint"/>
+ <param name="r" type="GLint"/>
+ </function>
+
+ <function name="MultiTexCoord3ivARB" offset="397" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLint *" count="3"/>
+ <glx rop="208"/>
+ </function>
+
+ <function name="MultiTexCoord3sARB" offset="398" vectorequiv="MultiTexCoord3svARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLshort"/>
+ <param name="t" type="GLshort"/>
+ <param name="r" type="GLshort"/>
+ </function>
+
+ <function name="MultiTexCoord3svARB" offset="399" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLshort *" count="3"/>
+ <glx rop="209"/>
+ </function>
+
+ <function name="MultiTexCoord4dARB" offset="400" vectorequiv="MultiTexCoord4dvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLdouble"/>
+ <param name="t" type="GLdouble"/>
+ <param name="r" type="GLdouble"/>
+ <param name="q" type="GLdouble"/>
+ </function>
+
+ <function name="MultiTexCoord4dvARB" offset="401" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLdouble *" count="4"/>
+ <glx rop="210"/>
+ </function>
+
+ <!--function name="MultiTexCoord4fARB" offset="402" vectorequiv="MultiTexCoord4fvARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLfloat"/>
+ <param name="t" type="GLfloat"/>
+ <param name="r" type="GLfloat"/>
+ <param name="q" type="GLfloat"/>
+ </function-->
+
+ <function name="MultiTexCoord4fvARB" offset="403" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLfloat *" count="4"/>
+ <glx rop="211"/>
+ </function>
+
+ <function name="MultiTexCoord4iARB" offset="404" vectorequiv="MultiTexCoord4ivARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLint"/>
+ <param name="t" type="GLint"/>
+ <param name="r" type="GLint"/>
+ <param name="q" type="GLint"/>
+ </function>
+
+ <function name="MultiTexCoord4ivARB" offset="405" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLint *" count="4"/>
+ <glx rop="212"/>
+ </function>
+
+ <function name="MultiTexCoord4sARB" offset="406" vectorequiv="MultiTexCoord4svARB" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="s" type="GLshort"/>
+ <param name="t" type="GLshort"/>
+ <param name="r" type="GLshort"/>
+ <param name="q" type="GLshort"/>
+ </function>
+
+ <function name="MultiTexCoord4svARB" offset="407" static_dispatch="false">
+ <param name="target" type="GLenum"/>
+ <param name="v" type="const GLshort *" count="4"/>
+ <glx rop="213"/>
+ </function>
+</category>
+
+<xi:include href="../../glapi/APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/es_EXT.xml b/src/mesa/es/glapi/es_EXT.xml
new file mode 100644
index 00000000000..b76cda929ae
--- /dev/null
+++ b/src/mesa/es/glapi/es_EXT.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gl_API.dtd">
+
+<!-- OpenGL ES extensions -->
+
+<OpenGLAPI>
+
+<category name="GL_OES_compressed_paletted_texture" number="6">
+ <enum name="PALETTE4_RGB8_OES" value="0x8B90"/>
+ <enum name="PALETTE4_RGBA8_OES" value="0x8B91"/>
+ <enum name="PALETTE4_R5_G6_B5_OES" value="0x8B92"/>
+ <enum name="PALETTE4_RGBA4_OES" value="0x8B93"/>
+ <enum name="PALETTE4_RGB5_A1_OES" value="0x8B94"/>
+ <enum name="PALETTE8_RGB8_OES" value="0x8B95"/>
+ <enum name="PALETTE8_RGBA8_OES" value="0x8B96"/>
+ <enum name="PALETTE8_R5_G6_B5_OES" value="0x8B97"/>
+ <enum name="PALETTE8_RGBA4_OES" value="0x8B98"/>
+ <enum name="PALETTE8_RGB5_A1_OES" value="0x8B99"/>
+</category>
+
+<category name="GL_OES_depth24" number="24">
+ <enum name="DEPTH_COMPONENT24_OES" value="0x81A6"/>
+</category>
+
+<category name="GL_OES_depth32" number="25">
+ <enum name="DEPTH_COMPONENT32_OES" value="0x81A7"/>
+</category>
+
+<category name="GL_OES_element_index_uint" number="26">
+ <!-- No new functions, types, enums. -->
+</category>
+
+<category name="GL_OES_fbo_render_mipmap" number="27">
+ <!-- No new functions, types, enums. -->
+</category>
+
+<category name="GL_OES_mapbuffer" number="29">
+ <enum name="WRITE_ONLY_OES" value="0x88B9"/>
+ <enum name="BUFFER_ACCESS_OES" value="0x88BB"/>
+ <enum name="BUFFER_MAPPED_OES" value="0x88BC"/>
+ <enum name="BUFFER_MAP_POINTER_OES" value="0x88BD"/>
+
+ <function name="GetBufferPointervOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <param name="params" type="GLvoid **"/>
+ </function>
+
+ <function name="MapBufferOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="access" type="GLenum"/>
+ <return type="GLvoid *"/>
+ </function>
+
+ <function name="UnmapBufferOES" offset="assign">
+ <param name="target" type="GLenum"/>
+ <return type="GLboolean"/>
+ </function>
+</category>
+
+<category name="GL_OES_rgb8_rgba8" number="30">
+ <enum name="RGB8_OES" value="0x8051"/>
+ <enum name="RGBA8_OES" value="0x8058"/>
+</category>
+
+<category name="GL_OES_stencil1" number="31">
+ <enum name="STENCIL_INDEX1_OES" value="0x8D46"/>
+</category>
+
+<category name="GL_OES_stencil4" number="32">
+ <enum name="STENCIL_INDEX4_OES" value="0x8D47"/>
+</category>
+
+<category name="GL_OES_stencil8" number="33">
+ <enum name="STENCIL_INDEX8_OES" value="0x8D48"/>
+</category>
+
+<category name="GL_EXT_texture_filter_anisotropic" number="41">
+ <enum name="TEXTURE_MAX_ANISOTROPY_EXT" value="0x84FE"/>
+ <enum name="MAX_TEXTURE_MAX_ANISOTROPY_EXT" value="0x84FF"/>
+</category>
+
+<category name="GL_EXT_texture_compression_dxt1" number="49">
+ <enum name="COMPRESSED_RGB_S3TC_DXT1_EXT" value="0x83F0"/>
+ <enum name="COMPRESSED_RGBA_S3TC_DXT1_EXT" value="0x83F1"/>
+</category>
+
+<category name="GL_EXT_texture_format_BGRA8888" number="51">
+ <enum name="BGRA_EXT" value="0x80E1"/>
+</category>
+
+<category name="GL_EXT_blend_minmax" number="65">
+ <enum name="MIN_EXT" value="0x8007"/>
+ <enum name="MAX_EXT" value="0x8008"/>
+</category>
+
+<category name="GL_EXT_read_format_bgra" number="66">
+ <enum name="BGRA_EXT" value="0x80E1"/>
+ <enum name="UNSIGNED_SHORT_4_4_4_4_REV_EXT" value="0x8365"/>
+ <enum name="UNSIGNED_SHORT_1_5_5_5_REV_EXT" value="0x8366"/>
+</category>
+
+<category name="GL_EXT_multi_draw_arrays" number="69">
+ <function name="MultiDrawArraysEXT" offset="assign">
+ <param name="mode" type="GLenum"/>
+ <param name="first" type="GLint *"/> <!-- Spec bug. Should be const. -->
+ <param name="count" type="GLsizei *"/> <!-- Spec bug. Should be const. -->
+ <param name="primcount" type="GLsizei"/>
+ <glx handcode="true"/>
+ </function>
+
+ <function name="MultiDrawElementsEXT" offset="assign">
+ <param name="mode" type="GLenum"/>
+ <param name="count" type="const GLsizei *"/>
+ <param name="type" type="GLenum"/>
+ <param name="indices" type="const GLvoid **"/>
+ <param name="primcount" type="GLsizei"/>
+ <glx handcode="true"/>
+ </function>
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/es/glapi/gl_compare.py b/src/mesa/es/glapi/gl_compare.py
new file mode 100644
index 00000000000..7a2148cb1fc
--- /dev/null
+++ b/src/mesa/es/glapi/gl_compare.py
@@ -0,0 +1,354 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# on the rights to use, copy, modify, merge, publish, distribute, sub
+# license, and/or sell copies of the Software, and to permit persons to whom
+# the Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+import sys
+import os.path
+import getopt
+
+GLAPI = "../../glapi"
+sys.path.append(GLAPI)
+
+import gl_XML
+import glX_XML
+
+class ApiSet(object):
+ def __init__(self, api, elts=["enum", "type", "function"]):
+ self.api = api
+ self.elts = elts
+
+ def _check_enum(self, e1, e2, strict=True):
+ if e1.name != e2.name:
+ raise ValueError("%s: name mismatch" % e1.name)
+ if e1.value != e2.value:
+ raise ValueError("%s: value 0x%04x != 0x%04x"
+ % (e1.name, e1.value, e2.value))
+
+ def _check_type(self, t1, t2, strict=True):
+ if t1.name != t2.name:
+ raise ValueError("%s: name mismatch" % t1.name)
+ if t1.type_expr.string() != t2.type_expr.string():
+ raise ValueError("%s: type %s != %s"
+ % (t1.name, t1.type_expr.string(), t2.type_expr.string()))
+
+ def _check_function(self, f1, f2, strict=True):
+ if f1.name != f2.name:
+ raise ValueError("%s: name mismatch" % f1.name)
+ if f1.return_type != f2.return_type:
+ raise ValueError("%s: return type %s != %s"
+ % (f1.name, f1.return_type, f2.return_type))
+ # there might be padded parameters
+ if strict and len(f1.parameters) != len(f2.parameters):
+ raise ValueError("%s: parameter length %d != %d"
+ % (f1.name, len(f1.parameters), len(f2.parameters)))
+ if f1.assign_offset != f2.assign_offset:
+ if ((f1.assign_offset and f2.offset < 0) or
+ (f2.assign_offset and f1.offset < 0)):
+ raise ValueError("%s: assign offset %d != %d"
+ % (f1.name, f1.assign_offset, f2.assign_offset))
+ elif not f1.assign_offset:
+ if f1.offset != f2.offset:
+ raise ValueError("%s: offset %d != %d"
+ % (f1.name, f1.offset, f2.offset))
+
+ if strict:
+ l1 = f1.entry_points
+ l2 = f2.entry_points
+ l1.sort()
+ l2.sort()
+ if l1 != l2:
+ raise ValueError("%s: entry points %s != %s"
+ % (f1.name, l1, l2))
+
+ l1 = f1.static_entry_points
+ l2 = f2.static_entry_points
+ l1.sort()
+ l2.sort()
+ if l1 != l2:
+ raise ValueError("%s: static entry points %s != %s"
+ % (f1.name, l1, l2))
+
+ pad = 0
+ for i in xrange(len(f1.parameters)):
+ p1 = f1.parameters[i]
+ p2 = f2.parameters[i + pad]
+
+ if not strict and p1.is_padding != p2.is_padding:
+ if p1.is_padding:
+ pad -= 1
+ continue
+ else:
+ pad += 1
+ p2 = f2.parameters[i + pad]
+
+ if strict and p1.name != p2.name:
+ raise ValueError("%s: parameter %d name %s != %s"
+ % (f1.name, i, p1.name, p2.name))
+ if p1.type_expr.string() != p2.type_expr.string():
+ if (strict or
+ # special case
+ f1.name == "TexImage2D" and p1.name != "internalformat"):
+ raise ValueError("%s: parameter %s type %s != %s"
+ % (f1.name, p1.name, p1.type_expr.string(),
+ p2.type_expr.string()))
+
+ def union(self, other):
+ union = gl_XML.gl_api(None)
+
+ if "enum" in self.elts:
+ union.enums_by_name = other.enums_by_name.copy()
+ for key, val in self.api.enums_by_name.iteritems():
+ if key not in union.enums_by_name:
+ union.enums_by_name[key] = val
+ else:
+ self._check_enum(val, other.enums_by_name[key])
+
+ if "type" in self.elts:
+ union.types_by_name = other.types_by_name.copy()
+ for key, val in self.api.types_by_name.iteritems():
+ if key not in union.types_by_name:
+ union.types_by_name[key] = val
+ else:
+ self._check_type(val, other.types_by_name[key])
+
+ if "function" in self.elts:
+ union.functions_by_name = other.functions_by_name.copy()
+ for key, val in self.api.functions_by_name.iteritems():
+ if key not in union.functions_by_name:
+ union.functions_by_name[key] = val
+ else:
+ self._check_function(val, other.functions_by_name[key])
+
+ return union
+
+ def intersection(self, other):
+ intersection = gl_XML.gl_api(None)
+
+ if "enum" in self.elts:
+ for key, val in self.api.enums_by_name.iteritems():
+ if key in other.enums_by_name:
+ self._check_enum(val, other.enums_by_name[key])
+ intersection.enums_by_name[key] = val
+
+ if "type" in self.elts:
+ for key, val in self.api.types_by_name.iteritems():
+ if key in other.types_by_name:
+ self._check_type(val, other.types_by_name[key])
+ intersection.types_by_name[key] = val
+
+ if "function" in self.elts:
+ for key, val in self.api.functions_by_name.iteritems():
+ if key in other.functions_by_name:
+ self._check_function(val, other.functions_by_name[key])
+ intersection.functions_by_name[key] = val
+
+ return intersection
+
+ def difference(self, other):
+ difference = gl_XML.gl_api(None)
+
+ if "enum" in self.elts:
+ for key, val in self.api.enums_by_name.iteritems():
+ if key not in other.enums_by_name:
+ difference.enums_by_name[key] = val
+ else:
+ self._check_enum(val, other.enums_by_name[key])
+
+ if "type" in self.elts:
+ for key, val in self.api.types_by_name.iteritems():
+ if key not in other.types_by_name:
+ difference.types_by_name[key] = val
+ else:
+ self._check_type(val, other.types_by_name[key])
+
+ if "function" in self.elts:
+ for key, val in self.api.functions_by_name.iteritems():
+ if key not in other.functions_by_name:
+ difference.functions_by_name[key] = val
+ else:
+ self._check_function(val, other.functions_by_name[key], False)
+
+ return difference
+
+def cmp_enum(e1, e2):
+ if e1.value < e2.value:
+ return -1
+ elif e1.value > e2.value:
+ return 1
+ else:
+ return 0
+
+def cmp_type(t1, t2):
+ return t1.size - t2.size
+
+def cmp_function(f1, f2):
+ if f1.name > f2.name:
+ return 1
+ elif f1.name < f2.name:
+ return -1
+ else:
+ return 0
+
+def spaces(n, str=""):
+ spaces = n - len(str)
+ if spaces < 1:
+ spaces = 1
+ return " " * spaces
+
+def output_enum(e, indent=0):
+ attrs = 'name="%s"' % e.name
+ if e.default_count > 0:
+ tab = spaces(37, attrs)
+ attrs += '%scount="%d"' % (tab, e.default_count)
+ tab = spaces(48, attrs)
+ val = "%04x" % e.value
+ val = "0x" + val.upper()
+ attrs += '%svalue="%s"' % (tab, val)
+
+ # no child
+ if not e.functions:
+ print '%s<enum %s/>' % (spaces(indent), attrs)
+ return
+
+ print '%s<enum %s>' % (spaces(indent), attrs)
+ for key, val in e.functions.iteritems():
+ attrs = 'name="%s"' % key
+ if val[0] != e.default_count:
+ attrs += ' count="%d"' % val[0]
+ if not val[1]:
+ attrs += ' mode="get"'
+
+ print '%s<size %s/>' % (spaces(indent * 2), attrs)
+
+ print '%s</enum>' % spaces(indent)
+
+def output_type(t, indent=0):
+ tab = spaces(16, t.name)
+ attrs = 'name="%s"%ssize="%d"' % (t.name, tab, t.size)
+ ctype = t.type_expr.string()
+ if ctype.find("unsigned") != -1:
+ attrs += ' unsigned="true"'
+ elif ctype.find("signed") == -1:
+ attrs += ' float="true"'
+ print '%s<type %s/>' % (spaces(indent), attrs)
+
+def output_function(f, indent=0):
+ attrs = 'name="%s"' % f.name
+ if f.offset > 0:
+ if f.assign_offset:
+ attrs += ' offset="assign"'
+ else:
+ attrs += ' offset="%d"' % f.offset
+ print '%s<function %s>' % (spaces(indent), attrs)
+
+ for p in f.parameters:
+ attrs = 'name="%s" type="%s"' \
+ % (p.name, p.type_expr.original_string)
+ print '%s<param %s/>' % (spaces(indent * 2), attrs)
+ if f.return_type != "void":
+ attrs = 'type="%s"' % f.return_type
+ print '%s<return %s/>' % (spaces(indent * 2), attrs)
+
+ print '%s</function>' % spaces(indent)
+
+def output_category(api, indent=0):
+ enums = api.enums_by_name.values()
+ enums.sort(cmp_enum)
+ types = api.types_by_name.values()
+ types.sort(cmp_type)
+ functions = api.functions_by_name.values()
+ functions.sort(cmp_function)
+
+ for e in enums:
+ output_enum(e, indent)
+ if enums and types:
+ print
+ for t in types:
+ output_type(t, indent)
+ if enums or types:
+ print
+ for f in functions:
+ output_function(f, indent)
+ if f != functions[-1]:
+ print
+
+def is_api_empty(api):
+ return bool(not api.enums_by_name and
+ not api.types_by_name and
+ not api.functions_by_name)
+
+def show_usage(ops):
+ print "Usage: %s [-k elts] <%s> <file1> <file2>" % (sys.argv[0], "|".join(ops))
+ print " -k elts A comma separated string of types of elements to"
+ print " skip. Possible types are enum, type, and function."
+ sys.exit(1)
+
+def main():
+ ops = ["union", "intersection", "difference"]
+ elts = ["enum", "type", "function"]
+
+ try:
+ options, args = getopt.getopt(sys.argv[1:], "k:")
+ except Exception, e:
+ show_usage(ops)
+
+ if len(args) != 3:
+ show_usage(ops)
+ op, file1, file2 = args
+ if op not in ops:
+ show_usage(ops)
+
+ skips = []
+ for opt, val in options:
+ if opt == "-k":
+ skips = val.split(",")
+
+ for elt in skips:
+ try:
+ elts.remove(elt)
+ except ValueError:
+ show_usage(ops)
+
+ api1 = gl_XML.parse_GL_API(file1, glX_XML.glx_item_factory())
+ api2 = gl_XML.parse_GL_API(file2, glX_XML.glx_item_factory())
+
+ set = ApiSet(api1, elts)
+ func = getattr(set, op)
+ result = func(api2)
+
+ if not is_api_empty(result):
+ cat_name = "%s_of_%s_and_%s" \
+ % (op, os.path.basename(file1), os.path.basename(file2))
+
+ print '<?xml version="1.0"?>'
+ print '<!DOCTYPE OpenGLAPI SYSTEM "%s/gl_API.dtd">' % GLAPI
+ print
+ print '<OpenGLAPI>'
+ print
+ print '<category name="%s">' % (cat_name)
+ output_category(result, 4)
+ print '</category>'
+ print
+ print '</OpenGLAPI>'
+
+if __name__ == "__main__":
+ main()
diff --git a/src/mesa/es/glapi/gl_parse_header.py b/src/mesa/es/glapi/gl_parse_header.py
new file mode 100644
index 00000000000..8b8d16b3951
--- /dev/null
+++ b/src/mesa/es/glapi/gl_parse_header.py
@@ -0,0 +1,450 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# on the rights to use, copy, modify, merge, publish, distribute, sub
+# license, and/or sell copies of the Software, and to permit persons to whom
+# the Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+import sys
+import os.path
+import getopt
+import re
+
+GLAPI = "../../glapi"
+sys.path.append(GLAPI)
+
+class HeaderParser(object):
+ """Parser for GL header files."""
+
+ def __init__(self, verbose=0):
+ # match #if and #ifdef
+ self.IFDEF = re.compile('#\s*if(n?def\s+(?P<ifdef>\w+)|\s+(?P<if>.+))')
+ # match #endif
+ self.ENDIF = re.compile('#\s*endif')
+ # match typedef abc def;
+ self.TYPEDEF = re.compile('typedef\s+(?P<from>[\w ]+)\s+(?P<to>\w+);')
+ # match #define XYZ VAL
+ self.DEFINE = re.compile('#\s*define\s+(?P<key>\w+)(?P<value>\s+[\w"]*)?')
+ # match GLAPI
+ self.GLAPI = re.compile('^GL_?API(CALL)?\s+(?P<return>[\w\s*]+[\w*])\s+(GL)?_?APIENTRY\s+(?P<name>\w+)\s*\((?P<params>[\w\s(,*\[\])]+)\)\s*;')
+
+ self.split_params = re.compile('\s*,\s*')
+ self.split_ctype = re.compile('(\W)')
+ # ignore GL_VERSION_X_Y
+ self.ignore_enum = re.compile('GL(_ES)?_VERSION(_ES_C[ML])?_\d_\d')
+
+ self.verbose = verbose
+ self._reset()
+
+ def _reset(self):
+ """Reset to initial state."""
+ self.ifdef_levels = []
+ self.need_char = False
+
+ # use typeexpr?
+ def _format_ctype(self, ctype, fix=True):
+ """Format a ctype string, optionally fix it."""
+ # split the type string
+ tmp = self.split_ctype.split(ctype)
+ tmp = [s for s in tmp if s and s != " "]
+
+ pretty = ""
+ for i in xrange(len(tmp)):
+ # add missing GL prefix
+ if (fix and tmp[i] != "const" and tmp[i] != "*" and
+ not tmp[i].startswith("GL")):
+ tmp[i] = "GL" + tmp[i]
+
+ if i == 0:
+ pretty = tmp[i]
+ else:
+ sep = " "
+ if tmp[i - 1] == "*":
+ sep = ""
+ pretty += sep + tmp[i]
+ return pretty
+
+ # use typeexpr?
+ def _get_ctype_attrs(self, ctype):
+ """Get the attributes of a ctype."""
+ is_float = (ctype.find("float") != -1 or ctype.find("double") != -1)
+ is_signed = not (ctype.find("unsigned") != -1)
+
+ size = 0
+ if ctype.find("char") != -1:
+ size = 1
+ elif ctype.find("short") != -1:
+ size = 2
+ elif ctype.find("int") != -1:
+ size = 4
+ elif is_float:
+ if ctype.find("float") != -1:
+ size = 4
+ else:
+ size = 8
+
+ return (size, is_float, is_signed)
+
+ def _parse_define(self, line):
+ """Parse a #define line for an <enum>."""
+ m = self.DEFINE.search(line)
+ if not m:
+ if self.verbose and line.find("#define") >= 0:
+ print "ignore %s" % (line)
+ return None
+
+ key = m.group("key").strip()
+ val = m.group("value").strip()
+
+ # enum must begin with GL_ and be all uppercase
+ if ((not (key.startswith("GL_") and key.isupper())) or
+ (self.ignore_enum.match(key) and val == "1")):
+ if self.verbose:
+ print "ignore enum %s" % (key)
+ return None
+
+ return (key, val)
+
+ def _parse_typedef(self, line):
+ """Parse a typedef line for a <type>."""
+ m = self.TYPEDEF.search(line)
+ if not m:
+ if self.verbose and line.find("typedef") >= 0:
+ print "ignore %s" % (line)
+ return None
+
+ f = m.group("from").strip()
+ t = m.group("to").strip()
+ if not t.startswith("GL"):
+ if self.verbose:
+ print "ignore type %s" % (t)
+ return None
+ attrs = self._get_ctype_attrs(f)
+
+ return (f, t, attrs)
+
+ def _parse_gl_api(self, line):
+ """Parse a GLAPI line for a <function>."""
+ m = self.GLAPI.search(line)
+ if not m:
+ if self.verbose and line.find("APIENTRY") >= 0:
+ print "ignore %s" % (line)
+ return None
+
+ rettype = m.group("return")
+ rettype = self._format_ctype(rettype)
+ if rettype == "GLvoid":
+ rettype = ""
+
+ name = m.group("name")
+
+ param_str = m.group("params")
+ chunks = self.split_params.split(param_str)
+ chunks = [s.strip() for s in chunks]
+ if len(chunks) == 1 and (chunks[0] == "void" or chunks[0] == "GLvoid"):
+ chunks = []
+
+ params = []
+ for c in chunks:
+ # split type and variable name
+ idx = c.rfind("*")
+ if idx < 0:
+ idx = c.rfind(" ")
+ if idx >= 0:
+ idx += 1
+ ctype = c[:idx]
+ var = c[idx:]
+ else:
+ ctype = c
+ var = "unnamed"
+
+ # convert array to pointer
+ idx = var.find("[")
+ if idx >= 0:
+ var = var[:idx]
+ ctype += "*"
+
+ ctype = self._format_ctype(ctype)
+ var = var.strip()
+
+ if not self.need_char and ctype.find("GLchar") >= 0:
+ self.need_char = True
+
+ params.append((ctype, var))
+
+ return (rettype, name, params)
+
+ def _change_level(self, line):
+ """Parse a #ifdef line and change level."""
+ m = self.IFDEF.search(line)
+ if m:
+ ifdef = m.group("ifdef")
+ if not ifdef:
+ ifdef = m.group("if")
+ self.ifdef_levels.append(ifdef)
+ return True
+ m = self.ENDIF.search(line)
+ if m:
+ self.ifdef_levels.pop()
+ return True
+ return False
+
+ def _read_header(self, header):
+ """Open a header file and read its contents."""
+ lines = []
+ try:
+ fp = open(header, "rb")
+ lines = fp.readlines()
+ fp.close()
+ except IOError, e:
+ print "failed to read %s: %s" % (header, e)
+ return lines
+
+ def _cmp_enum(self, enum1, enum2):
+ """Compare two enums."""
+ # sort by length of the values as strings
+ val1 = enum1[1]
+ val2 = enum2[1]
+ ret = len(val1) - len(val2)
+ # sort by the values
+ if not ret:
+ val1 = int(val1, 16)
+ val2 = int(val2, 16)
+ ret = val1 - val2
+ # in case int cannot hold the result
+ if ret > 0:
+ ret = 1
+ elif ret < 0:
+ ret = -1
+ # sort by the names
+ if not ret:
+ if enum1[0] < enum2[0]:
+ ret = -1
+ elif enum1[0] > enum2[0]:
+ ret = 1
+ return ret
+
+ def _cmp_type(self, type1, type2):
+ """Compare two types."""
+ attrs1 = type1[2]
+ attrs2 = type2[2]
+ # sort by type size
+ ret = attrs1[0] - attrs2[0]
+ # float is larger
+ if not ret:
+ ret = attrs1[1] - attrs2[1]
+ # signed is larger
+ if not ret:
+ ret = attrs1[2] - attrs2[2]
+ # reverse
+ ret = -ret
+ return ret
+
+ def _cmp_function(self, func1, func2):
+ """Compare two functions."""
+ name1 = func1[1]
+ name2 = func2[1]
+ ret = 0
+ # sort by the names
+ if name1 < name2:
+ ret = -1
+ elif name1 > name2:
+ ret = 1
+ return ret
+
+ def _postprocess_dict(self, hdict):
+ """Post-process a header dict and return an ordered list."""
+ hlist = []
+ largest = 0
+ for key, cat in hdict.iteritems():
+ size = len(cat["enums"]) + len(cat["types"]) + len(cat["functions"])
+ # ignore empty category
+ if not size:
+ continue
+
+ cat["enums"].sort(self._cmp_enum)
+ # remove duplicates
+ dup = []
+ for i in xrange(1, len(cat["enums"])):
+ if cat["enums"][i] == cat["enums"][i - 1]:
+ dup.insert(0, i)
+ for i in dup:
+ e = cat["enums"].pop(i)
+ if self.verbose:
+ print "remove duplicate enum %s" % e[0]
+
+ cat["types"].sort(self._cmp_type)
+ cat["functions"].sort(self._cmp_function)
+
+ # largest category comes first
+ if size > largest:
+ hlist.insert(0, (key, cat))
+ largest = size
+ else:
+ hlist.append((key, cat))
+ return hlist
+
+ def parse(self, header):
+ """Parse a header file."""
+ self._reset()
+
+ if self.verbose:
+ print "Parsing %s" % (header)
+
+ hdict = {}
+ lines = self._read_header(header)
+ for line in lines:
+ if self._change_level(line):
+ continue
+
+ # skip until the first ifdef (i.e. __gl_h_)
+ if not self.ifdef_levels:
+ continue
+
+ cat_name = os.path.basename(header)
+ # check if we are in an extension
+ if (len(self.ifdef_levels) > 1 and
+ self.ifdef_levels[-1].startswith("GL_")):
+ cat_name = self.ifdef_levels[-1]
+
+ try:
+ cat = hdict[cat_name]
+ except KeyError:
+ cat = {
+ "enums": [],
+ "types": [],
+ "functions": []
+ }
+ hdict[cat_name] = cat
+
+ key = "enums"
+ elem = self._parse_define(line)
+ if not elem:
+ key = "types"
+ elem = self._parse_typedef(line)
+ if not elem:
+ key = "functions"
+ elem = self._parse_gl_api(line)
+
+ if elem:
+ cat[key].append(elem)
+
+ if self.need_char:
+ if self.verbose:
+ print "define GLchar"
+ elem = self._parse_typedef("typedef char GLchar;")
+ cat["types"].append(elem)
+ return self._postprocess_dict(hdict)
+
+def spaces(n, str=""):
+ spaces = n - len(str)
+ if spaces < 1:
+ spaces = 1
+ return " " * spaces
+
+def output_xml(name, hlist):
+ """Output a parsed header in OpenGLAPI XML."""
+
+ for i in xrange(len(hlist)):
+ cat_name, cat = hlist[i]
+
+ print '<category name="%s">' % (cat_name)
+ indent = 4
+
+ for enum in cat["enums"]:
+ name = enum[0][3:]
+ value = enum[1]
+ tab = spaces(41, name)
+ attrs = 'name="%s"%svalue="%s"' % (name, tab, value)
+ print '%s<enum %s/>' % (spaces(indent), attrs)
+
+ if cat["enums"] and cat["types"]:
+ print
+
+ for type in cat["types"]:
+ ctype = type[0]
+ size, is_float, is_signed = type[2]
+
+ attrs = 'name="%s"' % (type[1][2:])
+ attrs += spaces(16, attrs) + 'size="%d"' % (size)
+ if is_float:
+ attrs += ' float="true"'
+ elif not is_signed:
+ attrs += ' unsigned="true"'
+
+ print '%s<type %s/>' % (spaces(indent), attrs)
+
+ for func in cat["functions"]:
+ print
+ ret = func[0]
+ name = func[1][2:]
+ params = func[2]
+
+ attrs = 'name="%s" offset="assign"' % name
+ print '%s<function %s>' % (spaces(indent), attrs)
+
+ for param in params:
+ attrs = 'name="%s" type="%s"' % (param[1], param[0])
+ print '%s<param %s/>' % (spaces(indent * 2), attrs)
+ if ret:
+ attrs = 'type="%s"' % ret
+ print '%s<return %s/>' % (spaces(indent * 2), attrs)
+
+ print '%s</function>' % spaces(indent)
+
+ print '</category>'
+ print
+
+def show_usage():
+ print "Usage: %s [-v] <header> ..." % sys.argv[0]
+ sys.exit(1)
+
+def main():
+ try:
+ args, headers = getopt.getopt(sys.argv[1:], "v")
+ except Exception, e:
+ show_usage()
+ if not headers:
+ show_usage()
+
+ verbose = 0
+ for arg in args:
+ if arg[0] == "-v":
+ verbose += 1
+
+ need_xml_header = True
+ parser = HeaderParser(verbose)
+ for h in headers:
+ h = os.path.abspath(h)
+ hlist = parser.parse(h)
+
+ if need_xml_header:
+ print '<?xml version="1.0"?>'
+ print '<!DOCTYPE OpenGLAPI SYSTEM "%s/gl_API.dtd">' % GLAPI
+ need_xml_header = False
+
+ print
+ print '<!-- %s -->' % (h)
+ print '<OpenGLAPI>'
+ print
+ output_xml(h, hlist)
+ print '</OpenGLAPI>'
+
+if __name__ == '__main__':
+ main()
diff --git a/src/mesa/es/main/APIspec.dtd b/src/mesa/es/main/APIspec.dtd
new file mode 100644
index 00000000000..efcfa31f10e
--- /dev/null
+++ b/src/mesa/es/main/APIspec.dtd
@@ -0,0 +1,52 @@
+<!ELEMENT apispec (template|api)+>
+
+<!ELEMENT api (category*, function*)>
+<!ELEMENT category EMPTY>
+<!ELEMENT function EMPTY>
+
+<!ELEMENT template (proto, desc*)>
+<!ELEMENT proto (return, (param|vector)*)>
+<!ELEMENT return EMPTY>
+<!ELEMENT param EMPTY>
+<!ELEMENT vector (param*)>
+<!ELEMENT desc ((value|range)*, desc*)>
+<!ELEMENT value EMPTY>
+<!ELEMENT range EMPTY>
+
+<!ATTLIST api name NMTOKEN #REQUIRED
+ implementation (true | false) "false">
+<!ATTLIST category name NMTOKEN #REQUIRED>
+<!ATTLIST function name NMTOKEN #REQUIRED
+ default_prefix NMTOKEN "_mesa_"
+ external (true | false) "false"
+ template NMTOKEN #REQUIRED
+ gltype CDATA #IMPLIED
+ vector_size NMTOKEN #IMPLIED
+ expand_vector (true | false) "false"
+ skip_desc (true | false) "false">
+
+<!ATTLIST template name NMTOKEN #REQUIRED
+ direction (set | get) "set">
+
+<!ATTLIST return type CDATA #REQUIRED>
+<!ATTLIST param name NMTOKEN #REQUIRED
+ type CDATA #REQUIRED
+ hide_if_expanded (true | false) "false"
+ category NMTOKEN #IMPLIED>
+<!ATTLIST vector name NMTOKEN #REQUIRED
+ type CDATA #REQUIRED
+ size NMTOKEN #REQUIRED
+ category NMTOKEN #IMPLIED>
+
+<!ATTLIST desc name NMTOKEN #REQUIRED
+ vector_size CDATA #IMPLIED
+ convert (true | false) #IMPLIED
+ error NMTOKEN "GL_INVALID_ENUM"
+ category NMTOKEN #IMPLIED>
+
+<!ATTLIST value name CDATA #REQUIRED
+ category NMTOKEN #IMPLIED>
+<!ATTLIST range from NMTOKEN #REQUIRED
+ to NMTOKEN #REQUIRED
+ base NMTOKEN #IMPLIED
+ category NMTOKEN #IMPLIED>
diff --git a/src/mesa/es/main/APIspec.py b/src/mesa/es/main/APIspec.py
new file mode 100644
index 00000000000..6947f7301cd
--- /dev/null
+++ b/src/mesa/es/main/APIspec.py
@@ -0,0 +1,617 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# on the rights to use, copy, modify, merge, publish, distribute, sub
+# license, and/or sell copies of the Software, and to permit persons to whom
+# the Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+"""
+A parser for APIspec.
+"""
+
+class SpecError(Exception):
+ """Error in the spec file."""
+
+
+class Spec(object):
+ """A Spec is an abstraction of the API spec."""
+
+ def __init__(self, doc):
+ self.doc = doc
+
+ self.spec_node = doc.getRootElement()
+ self.tmpl_nodes = {}
+ self.api_nodes = {}
+ self.impl_node = None
+
+ # parse <apispec>
+ node = self.spec_node.children
+ while node:
+ if node.type == "element":
+ if node.name == "template":
+ self.tmpl_nodes[node.prop("name")] = node
+ elif node.name == "api":
+ self.api_nodes[node.prop("name")] = node
+ else:
+ raise SpecError("unexpected node %s in apispec" %
+ node.name)
+ node = node.next
+
+ # find an implementation
+ for name, node in self.api_nodes.iteritems():
+ if node.prop("implementation") == "true":
+ self.impl_node = node
+ break
+ if not self.impl_node:
+ raise SpecError("unable to find an implementation")
+
+ def get_impl(self):
+ """Return the implementation."""
+ return API(self, self.impl_node)
+
+ def get_api(self, name):
+ """Return an API."""
+ return API(self, self.api_nodes[name])
+
+
+class API(object):
+ """An API consists of categories and functions."""
+
+ def __init__(self, spec, api_node):
+ self.name = api_node.prop("name")
+ self.is_impl = (api_node.prop("implementation") == "true")
+
+ self.categories = []
+ self.functions = []
+
+ # parse <api>
+ func_nodes = []
+ node = api_node.children
+ while node:
+ if node.type == "element":
+ if node.name == "category":
+ cat = node.prop("name")
+ self.categories.append(cat)
+ elif node.name == "function":
+ func_nodes.append(node)
+ else:
+ raise SpecError("unexpected node %s in api" % node.name)
+ node = node.next
+
+ # realize functions
+ for func_node in func_nodes:
+ tmpl_node = spec.tmpl_nodes[func_node.prop("template")]
+ try:
+ func = Function(tmpl_node, func_node, self.is_impl,
+ self.categories)
+ except SpecError, e:
+ func_name = func_node.prop("name")
+ raise SpecError("failed to parse %s: %s" % (func_name, e))
+ self.functions.append(func)
+
+ def match(self, func, conversions={}):
+ """Find a matching function in the API."""
+ match = None
+ need_conv = False
+ for f in self.functions:
+ matched, conv = f.match(func, conversions)
+ if matched:
+ match = f
+ need_conv = conv
+ # exact match
+ if not need_conv:
+ break
+ return (match, need_conv)
+
+
+class Function(object):
+ """Parse and realize a <template> node."""
+
+ def __init__(self, tmpl_node, func_node, force_skip_desc=False, categories=[]):
+ self.tmpl_name = tmpl_node.prop("name")
+ self.direction = tmpl_node.prop("direction")
+
+ self.name = func_node.prop("name")
+ self.prefix = func_node.prop("default_prefix")
+ self.is_external = (func_node.prop("external") == "true")
+
+ if force_skip_desc:
+ self._skip_desc = True
+ else:
+ self._skip_desc = (func_node.prop("skip_desc") == "true")
+
+ self._categories = categories
+
+ # these attributes decide how the template is realized
+ self._gltype = func_node.prop("gltype")
+ if func_node.hasProp("vector_size"):
+ self._vector_size = int(func_node.prop("vector_size"))
+ else:
+ self._vector_size = 0
+ self._expand_vector = (func_node.prop("expand_vector") == "true")
+
+ self.return_type = "void"
+ param_nodes = []
+
+ # find <proto>
+ proto_node = tmpl_node.children
+ while proto_node:
+ if proto_node.type == "element" and proto_node.name == "proto":
+ break
+ proto_node = proto_node.next
+ if not proto_node:
+ raise SpecError("no proto")
+ # and parse it
+ node = proto_node.children
+ while node:
+ if node.type == "element":
+ if node.name == "return":
+ self.return_type = node.prop("type")
+ elif node.name == "param" or node.name == "vector":
+ if self.support_node(node):
+ # make sure the node is not hidden
+ if not (self._expand_vector and
+ (node.prop("hide_if_expanded") == "true")):
+ param_nodes.append(node)
+ else:
+ raise SpecError("unexpected node %s in proto" % node.name)
+ node = node.next
+
+ self._init_params(param_nodes)
+ self._init_descs(tmpl_node, param_nodes)
+
+ def __str__(self):
+ return "%s %s%s(%s)" % (self.return_type, self.prefix, self.name,
+ self.param_string(True))
+
+ def _init_params(self, param_nodes):
+ """Parse and initialize parameters."""
+ self.params = []
+
+ for param_node in param_nodes:
+ size = self.param_node_size(param_node)
+ # when no expansion, vector is just like param
+ if param_node.name == "param" or not self._expand_vector:
+ param = Parameter(param_node, self._gltype, size)
+ self.params.append(param)
+ continue
+
+ if not size or size > param_node.lsCountNode():
+ raise SpecError("could not expand %s with unknown or "
+ "mismatch sizes" % param.name)
+
+ # expand the vector
+ expanded_params = []
+ child = param_node.children
+ while child:
+ if (child.type == "element" and child.name == "param" and
+ self.support_node(child)):
+ expanded_params.append(Parameter(child, self._gltype))
+ if len(expanded_params) == size:
+ break
+ child = child.next
+ # just in case that lsCountNode counts unknown nodes
+ if len(expanded_params) < size:
+ raise SpecError("not enough named parameters")
+
+ self.params.extend(expanded_params)
+
+ def _init_descs(self, tmpl_node, param_nodes):
+ """Parse and initialize parameter descriptions."""
+ self.checker = Checker()
+ if self._skip_desc:
+ return
+
+ node = tmpl_node.children
+ while node:
+ if node.type == "element" and node.name == "desc":
+ if self.support_node(node):
+ # parse <desc>
+ desc = Description(node, self._categories)
+ self.checker.add_desc(desc)
+ node = node.next
+
+ self.checker.validate(self, param_nodes)
+
+ def support_node(self, node):
+ """Return true if a node is in the supported category."""
+ return (not node.hasProp("category") or
+ node.prop("category") in self._categories)
+
+ def get_param(self, name):
+ """Return the named parameter."""
+ for param in self.params:
+ if param.name == name:
+ return param
+ return None
+
+ def param_node_size(self, param):
+ """Return the size of a vector."""
+ if param.name != "vector":
+ return 0
+
+ size = param.prop("size")
+ if size.isdigit():
+ size = int(size)
+ else:
+ size = 0
+ if not size:
+ size = self._vector_size
+ if not size and self._expand_vector:
+ # return the number of named parameters
+ size = param.lsCountNode()
+ return size
+
+ def param_string(self, declaration):
+ """Return the C code of the parameters."""
+ args = []
+ if declaration:
+ for param in self.params:
+ sep = "" if param.type.endswith("*") else " "
+ args.append("%s%s%s" % (param.type, sep, param.name))
+ if not args:
+ args.append("void")
+ else:
+ for param in self.params:
+ args.append(param.name)
+ return ", ".join(args)
+
+ def match(self, other, conversions={}):
+ """Return true if the functions match, probably with a conversion."""
+ if (self.tmpl_name != other.tmpl_name or
+ self.return_type != other.return_type or
+ len(self.params) != len(other.params)):
+ return (False, False)
+
+ need_conv = False
+ for i in xrange(len(self.params)):
+ src = other.params[i]
+ dst = self.params[i]
+ if (src.is_vector != dst.is_vector or src.size != dst.size):
+ return (False, False)
+ if src.type != dst.type:
+ if dst.base_type() in conversions.get(src.base_type(), []):
+ need_conv = True
+ else:
+ # unable to convert
+ return (False, False)
+
+ return (True, need_conv)
+
+
+class Parameter(object):
+ """A parameter of a function."""
+
+ def __init__(self, param_node, gltype=None, size=0):
+ self.is_vector = (param_node.name == "vector")
+
+ self.name = param_node.prop("name")
+ self.size = size
+
+ type = param_node.prop("type")
+ if gltype:
+ type = type.replace("GLtype", gltype)
+ elif type.find("GLtype") != -1:
+ raise SpecError("parameter %s has unresolved type" % self.name)
+
+ self.type = type
+
+ def base_type(self):
+ """Return the base GL type by stripping qualifiers."""
+ return [t for t in self.type.split(" ") if t.startswith("GL")][0]
+
+
+class Checker(object):
+ """A checker is the collection of all descriptions on the same level.
+ Descriptions of the same parameter are concatenated.
+ """
+
+ def __init__(self):
+ self.switches = {}
+ self.switch_constants = {}
+
+ def add_desc(self, desc):
+ """Add a description."""
+ # TODO allow index to vary
+ const_attrs = ["index", "error", "convert", "size_str"]
+ if desc.name not in self.switches:
+ self.switches[desc.name] = []
+ self.switch_constants[desc.name] = {}
+ for attr in const_attrs:
+ self.switch_constants[desc.name][attr] = None
+
+ # some attributes, like error code, should be the same for all descs
+ consts = self.switch_constants[desc.name]
+ for attr in const_attrs:
+ if getattr(desc, attr) is not None:
+ if (consts[attr] is not None and
+ consts[attr] != getattr(desc, attr)):
+ raise SpecError("mismatch %s for %s" % (attr, desc.name))
+ consts[attr] = getattr(desc, attr)
+
+ self.switches[desc.name].append(desc)
+
+ def validate(self, func, param_nodes):
+ """Validate the checker against a function."""
+ tmp = Checker()
+
+ for switch in self.switches.itervalues():
+ valid_descs = []
+ for desc in switch:
+ if desc.validate(func, param_nodes):
+ valid_descs.append(desc)
+ # no possible values
+ if not valid_descs:
+ return False
+ for desc in valid_descs:
+ if not desc._is_noop:
+ tmp.add_desc(desc)
+
+ self.switches = tmp.switches
+ self.switch_constants = tmp.switch_constants
+ return True
+
+ def flatten(self, name=None):
+ """Return a flat list of all descriptions of the named parameter."""
+ flat_list = []
+ for switch in self.switches.itervalues():
+ for desc in switch:
+ if not name or desc.name == name:
+ flat_list.append(desc)
+ flat_list.extend(desc.checker.flatten(name))
+ return flat_list
+
+ def always_check(self, name):
+ """Return true if the parameter is checked in all possible pathes."""
+ if name in self.switches:
+ return True
+
+ # a param is always checked if any of the switch always checks it
+ for switch in self.switches.itervalues():
+ # a switch always checks it if all of the descs always check it
+ always = True
+ for desc in switch:
+ if not desc.checker.always_check(name):
+ always = False
+ break
+ if always:
+ return True
+ return False
+
+ def _c_switch(self, name, indent="\t"):
+ """Output C switch-statement for the named parameter, for debug."""
+ switch = self.switches.get(name, [])
+ # make sure there are valid values
+ need_switch = False
+ for desc in switch:
+ if desc.values:
+ need_switch = True
+ if not need_switch:
+ return []
+
+ stmts = []
+ var = switch[0].name
+ if switch[0].index >= 0:
+ var += "[%d]" % switch[0].index
+ stmts.append("switch (%s) { /* assume GLenum */" % var)
+
+ for desc in switch:
+ if desc.values:
+ for val in desc.values:
+ stmts.append("case %s:" % val)
+ for dep_name in desc.checker.switches.iterkeys():
+ dep_stmts = [indent + s for s in desc.checker._c_switch(dep_name, indent)]
+ stmts.extend(dep_stmts)
+ stmts.append(indent + "break;")
+
+ stmts.append("default:")
+ stmts.append(indent + "ON_ERROR(%s);" % switch[0].error);
+ stmts.append(indent + "break;")
+ stmts.append("}")
+
+ return stmts
+
+ def dump(self, indent="\t"):
+ """Dump the descriptions in C code."""
+ stmts = []
+ for name in self.switches.iterkeys():
+ c_switch = self._c_switch(name)
+ print "\n".join(c_switch)
+
+
+class Description(object):
+ """A description desribes a parameter and its relationship with other
+ parameters.
+ """
+
+ def __init__(self, desc_node, categories=[]):
+ self._categories = categories
+ self._is_noop = False
+
+ self.name = desc_node.prop("name")
+ self.index = -1
+
+ self.error = desc_node.prop("error") or "GL_INVALID_ENUM"
+ # vector_size may be C code
+ self.size_str = desc_node.prop("vector_size")
+
+ self._has_enum = False
+ self.values = []
+ dep_nodes = []
+
+ # parse <desc>
+ valid_names = ["value", "range", "desc"]
+ node = desc_node.children
+ while node:
+ if node.type == "element":
+ if node.name in valid_names:
+ # ignore nodes that require unsupported categories
+ if (node.prop("category") and
+ node.prop("category") not in self._categories):
+ node = node.next
+ continue
+ else:
+ raise SpecError("unexpected node %s in desc" % node.name)
+
+ if node.name == "value":
+ val = node.prop("name")
+ if not self._has_enum and val.startswith("GL_"):
+ self._has_enum = True
+ self.values.append(val)
+ elif node.name == "range":
+ first = int(node.prop("from"))
+ last = int(node.prop("to"))
+ base = node.prop("base") or ""
+ if not self._has_enum and base.startswith("GL_"):
+ self._has_enum = True
+ # expand range
+ for i in xrange(first, last + 1):
+ self.values.append("%s%d" % (base, i))
+ else: # dependent desc
+ dep_nodes.append(node)
+ node = node.next
+
+ # default to convert if there is no enum
+ self.convert = not self._has_enum
+ if desc_node.hasProp("convert"):
+ self.convert = (desc_node.prop("convert") == "true")
+
+ self._init_deps(dep_nodes)
+
+ def _init_deps(self, dep_nodes):
+ """Parse and initialize dependents."""
+ self.checker = Checker()
+
+ for dep_node in dep_nodes:
+ # recursion!
+ dep = Description(dep_node, self._categories)
+ self.checker.add_desc(dep)
+
+ def _search_param_node(self, param_nodes, name=None):
+ """Search the template parameters for the named node."""
+ param_node = None
+ param_index = -1
+
+ if not name:
+ name = self.name
+ for node in param_nodes:
+ if name == node.prop("name"):
+ param_node = node
+ elif node.name == "vector":
+ child = node.children
+ idx = 0
+ while child:
+ if child.type == "element" and child.name == "param":
+ if name == child.prop("name"):
+ param_node = node
+ param_index = idx
+ break
+ idx += 1
+ child = child.next
+ if param_node:
+ break
+ return (param_node, param_index)
+
+ def _find_final(self, func, param_nodes):
+ """Find the final parameter."""
+ param = func.get_param(self.name)
+ param_index = -1
+
+ # the described param is not in the final function
+ if not param:
+ # search the template parameters
+ node, index = self._search_param_node(param_nodes)
+ if not node:
+ raise SpecError("invalid desc %s in %s" %
+ (self.name, func.name))
+
+ # a named parameter of a vector
+ if index >= 0:
+ param = func.get_param(node.prop("name"))
+ param_index = index
+ elif node.name == "vector":
+ # must be an expanded vector, check its size
+ if self.size_str and self.size_str.isdigit():
+ size = int(self.size_str)
+ expanded_size = func.param_node_size(node)
+ if size != expanded_size:
+ return (False, None, -1)
+ # otherwise, it is a valid, but no-op, description
+
+ return (True, param, param_index)
+
+ def validate(self, func, param_nodes):
+ """Validate a description against certain function."""
+ if self.checker.switches and not self.values:
+ raise SpecError("no valid values for %s" % self.name)
+
+ valid, param, param_index = self._find_final(func, param_nodes)
+ if not valid:
+ return False
+
+ # the description is valid, but the param is gone
+ # mark it no-op so that it will be skipped
+ if not param:
+ self._is_noop = True
+ return True
+
+ if param.is_vector:
+ # if param was known, this should have been done in __init__
+ if self._has_enum:
+ self.size_str = "1"
+ # size mismatch
+ if (param.size and self.size_str and self.size_str.isdigit() and
+ param.size != int(self.size_str)):
+ return False
+ elif self.size_str:
+ # only vector accepts vector_size
+ raise SpecError("vector_size is invalid for %s" % param.name)
+
+ if not self.checker.validate(func, param_nodes):
+ return False
+
+ # update the description
+ self.name = param.name
+ self.index = param_index
+
+ return True
+
+
+def main():
+ import libxml2
+
+ filename = "APIspec.xml"
+ apinames = ["GLES1.1", "GLES2.0"]
+
+ doc = libxml2.readFile(filename, None,
+ libxml2.XML_PARSE_DTDLOAD +
+ libxml2.XML_PARSE_DTDVALID +
+ libxml2.XML_PARSE_NOBLANKS)
+
+ spec = Spec(doc)
+ impl = spec.get_impl()
+ for apiname in apinames:
+ spec.get_api(apiname)
+
+ doc.freeDoc()
+
+ print "%s is successfully parsed" % filename
+
+
+if __name__ == "__main__":
+ main()
diff --git a/src/mesa/es/main/APIspec.xml b/src/mesa/es/main/APIspec.xml
new file mode 100644
index 00000000000..f6f33130b15
--- /dev/null
+++ b/src/mesa/es/main/APIspec.xml
@@ -0,0 +1,4297 @@
+<?xml version="1.0"?>
+<!DOCTYPE apispec SYSTEM "APIspec.dtd">
+
+<!-- A function is generated from a template. Multiple functions can be
+ generated from a single template with different arguments. For example,
+ glColor3f can be generated from
+
+ <function name="Color3f" template="Color" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+
+ and glColor4iv can be generated from
+
+ <function name="Color4iv" template="Color" gltype="GLint" vector_size="4"/>
+
+ In a template, there are <desc>s that describe the properties of
+ parameters. A <desc> can enumerate the valid values of a parameter. It
+ can also specify the error code when an invalid value is given, and etc.
+ By nesting <desc>s, they can create dependency between parameters.
+
+ A function can be marked as external. It means that the function cannot
+ be dispatched to the corresponding mesa function, if one exists, directly,
+ and requires an external implementation.
+-->
+
+<apispec>
+
+<template name="Color">
+ <proto>
+ <return type="void"/>
+ <vector name="v" type="const GLtype *" size="dynamic">
+ <param name="red" type="GLtype"/>
+ <param name="green" type="GLtype"/>
+ <param name="blue" type="GLtype"/>
+ <param name="alpha" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="ClipPlane">
+ <proto>
+ <return type="void"/>
+ <param name="plane" type="GLenum"/>
+ <vector name="equation" type="const GLtype *" size="4"/>
+ </proto>
+
+ <desc name="plane">
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+ </desc>
+</template>
+
+<template name="CullFace">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+</template>
+
+<template name="Fog">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_FOG_MODE"/>
+ <desc name="param">
+ <value name="GL_EXP"/>
+ <value name="GL_EXP2"/>
+ <value name="GL_LINEAR"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_FOG_COLOR"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_FOG_DENSITY"/>
+ <value name="GL_FOG_START"/>
+ <value name="GL_FOG_END"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+</template>
+
+<template name="FrontFace">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_CW"/>
+ <value name="GL_CCW"/>
+ </desc>
+</template>
+
+<template name="Hint">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="target" category="GLES1.1">
+ <value name="GL_FOG_HINT"/>
+ <value name="GL_LINE_SMOOTH_HINT"/>
+ <value name="GL_PERSPECTIVE_CORRECTION_HINT"/>
+ <value name="GL_POINT_SMOOTH_HINT"/>
+ </desc>
+ <desc name="target" category="OES_standard_derivatives">
+ <value name="GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES"/>
+ </desc>
+ <desc name="target">
+ <value name="GL_GENERATE_MIPMAP_HINT"/>
+ </desc>
+
+ <desc name="mode">
+ <value name="GL_FASTEST"/>
+ <value name="GL_NICEST"/>
+ <value name="GL_DONT_CARE"/>
+ </desc>
+</template>
+
+<template name="Light">
+ <proto>
+ <return type="void"/>
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="light">
+ <range base="GL_LIGHT" from="0" to="7"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_AMBIENT"/>
+ <value name="GL_DIFFUSE"/>
+ <value name="GL_SPECULAR"/>
+ <value name="GL_POSITION"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SPOT_DIRECTION"/>
+
+ <desc name="params" vector_size="3"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SPOT_EXPONENT"/>
+ <value name="GL_SPOT_CUTOFF"/>
+ <value name="GL_CONSTANT_ATTENUATION"/>
+ <value name="GL_LINEAR_ATTENUATION"/>
+ <value name="GL_QUADRATIC_ATTENUATION"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+</template>
+
+<template name="LightModel">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_LIGHT_MODEL_AMBIENT"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_LIGHT_MODEL_TWO_SIDE"/>
+ <desc name="param">
+ <value name="GL_TRUE"/>
+ <value name="GL_FALSE"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="LineWidth">
+ <proto>
+ <return type="void"/>
+ <param name="width" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Material">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_AMBIENT"/>
+ <value name="GL_DIFFUSE"/>
+ <value name="GL_AMBIENT_AND_DIFFUSE"/>
+ <value name="GL_SPECULAR"/>
+ <value name="GL_EMISSION"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SHININESS"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+</template>
+
+<template name="PointSize">
+ <proto>
+ <return type="void"/>
+ <param name="size" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="PointSizePointer">
+ <proto>
+ <return type="void"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="type">
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ </desc>
+</template>
+
+<template name="Scissor">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+</template>
+
+<template name="ShadeModel">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_FLAT"/>
+ <value name="GL_SMOOTH"/>
+ </desc>
+</template>
+
+<template name="TexParameter">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_WRAP_S"/>
+ <value name="GL_TEXTURE_WRAP_T"/>
+ <value name="GL_TEXTURE_WRAP_R_OES" category="OES_texture_3D"/>
+
+ <desc name="param">
+ <value name="GL_CLAMP_TO_EDGE"/>
+ <value name="GL_REPEAT"/>
+ <value name="GL_MIRRORED_REPEAT" category="GLES2.0"/>
+ <value name="GL_MIRRORED_REPEAT_OES" category="OES_texture_mirrored_repeat"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_MIN_FILTER"/>
+
+ <desc name="param">
+ <value name="GL_NEAREST"/>
+ <value name="GL_LINEAR"/>
+ <value name="GL_NEAREST_MIPMAP_NEAREST"/>
+ <value name="GL_NEAREST_MIPMAP_LINEAR"/>
+ <value name="GL_LINEAR_MIPMAP_NEAREST"/>
+ <value name="GL_LINEAR_MIPMAP_LINEAR"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_MAG_FILTER"/>
+
+ <desc name="param">
+ <value name="GL_NEAREST"/>
+ <value name="GL_LINEAR"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="GLES1.1">
+ <value name="GL_GENERATE_MIPMAP"/>
+
+ <desc name="param">
+ <value name="GL_TRUE"/>
+ <value name="GL_FALSE"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="EXT_texture_filter_anisotropic">
+ <value name="GL_TEXTURE_MAX_ANISOTROPY_EXT"/>
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="pname" category="OES_draw_texture">
+ <value name="GL_TEXTURE_CROP_RECT_OES"/>
+ <desc name="params" vector_size="4"/>
+ </desc>
+</template>
+
+<template name="TexImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLint"/> <!-- should be GLenum -->
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="internalFormat" error="GL_INVALID_VALUE">
+ <value name="GL_ALPHA"/>
+ <value name="GL_RGB"/>
+ <value name="GL_RGBA"/>
+ <value name="GL_LUMINANCE"/>
+ <value name="GL_LUMINANCE_ALPHA"/>
+ <value name="GL_DEPTH_COMPONENT" category="OES_depth_texture"/>
+ <value name="GL_DEPTH_STENCIL_OES" category="OES_packed_depth_stencil"/>
+ </desc>
+
+ <desc name="border" error="GL_INVALID_VALUE">
+ <value name="0"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ <value name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT" category="EXT_texture_type_2_10_10_10_REV"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="OES_depth_texture">
+ <value name="GL_DEPTH_COMPONENT"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_SHORT"/>
+ <value name="GL_UNSIGNED_INT"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="OES_packed_depth_stencil">
+ <value name="GL_DEPTH_STENCIL_OES"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_INT_24_8_OES"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="TexEnv">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="target" category="OES_point_sprite">
+ <value name="GL_POINT_SPRITE_OES"/>
+
+ <desc name="pname">
+ <value name="GL_COORD_REPLACE_OES"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="OES_point_sprite">
+ <value name="GL_COORD_REPLACE_OES"/>
+
+ <desc name="param">
+ <value name="GL_TRUE"/>
+ <value name="GL_FALSE"/>
+ </desc>
+ </desc>
+
+ <desc name="target" category="EXT_texture_lod_bias">
+ <value name="GL_TEXTURE_FILTER_CONTROL_EXT"/>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="EXT_texture_lod_bias">
+ <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_ENV"/>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_MODE"/>
+ <value name="GL_COMBINE_RGB"/>
+ <value name="GL_COMBINE_ALPHA"/>
+ <value name="GL_RGB_SCALE"/>
+ <value name="GL_ALPHA_SCALE"/>
+ <value name="GL_SRC0_RGB"/>
+ <value name="GL_SRC1_RGB"/>
+ <value name="GL_SRC2_RGB"/>
+ <value name="GL_SRC0_ALPHA"/>
+ <value name="GL_SRC1_ALPHA"/>
+ <value name="GL_SRC2_ALPHA"/>
+ <value name="GL_OPERAND0_RGB"/>
+ <value name="GL_OPERAND1_RGB"/>
+ <value name="GL_OPERAND2_RGB"/>
+ <value name="GL_OPERAND0_ALPHA"/>
+ <value name="GL_OPERAND1_ALPHA"/>
+ <value name="GL_OPERAND2_ALPHA"/>
+ <value name="GL_TEXTURE_ENV_COLOR"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_MODE"/>
+
+ <desc name="param">
+ <value name="GL_REPLACE"/>
+ <value name="GL_MODULATE"/>
+ <value name="GL_DECAL"/>
+ <value name="GL_BLEND"/>
+ <value name="GL_ADD"/>
+ <value name="GL_COMBINE"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_COMBINE_RGB"/>
+
+ <desc name="param">
+ <value name="GL_REPLACE"/>
+ <value name="GL_MODULATE"/>
+ <value name="GL_ADD"/>
+ <value name="GL_ADD_SIGNED"/>
+ <value name="GL_INTERPOLATE"/>
+ <value name="GL_SUBTRACT"/>
+ <value name="GL_DOT3_RGB"/>
+ <value name="GL_DOT3_RGBA"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_COMBINE_ALPHA"/>
+
+ <desc name="param">
+ <value name="GL_REPLACE"/>
+ <value name="GL_MODULATE"/>
+ <value name="GL_ADD"/>
+ <value name="GL_ADD_SIGNED"/>
+ <value name="GL_INTERPOLATE"/>
+ <value name="GL_SUBTRACT"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_RGB_SCALE"/>
+ <value name="GL_ALPHA_SCALE"/>
+
+ <desc name="param" convert="true" error="GL_INVALID_VALUE">
+ <value name="1.0"/>
+ <value name="2.0"/>
+ <value name="4.0"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SRC0_RGB"/>
+ <value name="GL_SRC1_RGB"/>
+ <value name="GL_SRC2_RGB"/>
+ <value name="GL_SRC0_ALPHA"/>
+ <value name="GL_SRC1_ALPHA"/>
+ <value name="GL_SRC2_ALPHA"/>
+
+ <desc name="param">
+ <value name="GL_TEXTURE"/>
+ <value name="GL_CONSTANT"/>
+ <value name="GL_PRIMARY_COLOR"/>
+ <value name="GL_PREVIOUS"/>
+
+ <range base="GL_TEXTURE" from="0" to="31" category="OES_texture_env_crossbar"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_OPERAND0_RGB"/>
+ <value name="GL_OPERAND1_RGB"/>
+ <value name="GL_OPERAND2_RGB"/>
+
+ <desc name="param">
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_OPERAND0_ALPHA"/>
+ <value name="GL_OPERAND1_ALPHA"/>
+ <value name="GL_OPERAND2_ALPHA"/>
+
+ <desc name="param">
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_COLOR"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+</template>
+
+<template name="TexGen">
+ <proto>
+ <return type="void"/>
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="coord" category="OES_texture_cube_map">
+ <value name="GL_TEXTURE_GEN_STR_OES"/>
+ </desc>
+
+ <desc name="pname" category="OES_texture_cube_map">
+ <value name="GL_TEXTURE_GEN_MODE_OES"/>
+
+ <desc name="param">
+ <value name="GL_NORMAL_MAP_OES"/>
+ <value name="GL_REFLECTION_MAP_OES"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="Clear">
+ <proto>
+ <return type="void"/>
+ <param name="mask" type="GLbitfield"/>
+ </proto>
+
+ <desc name="mask" error="GL_INVALID_VALUE">
+ <value name="0"/>
+ <value name="(GL_COLOR_BUFFER_BIT)"/>
+ <value name="(GL_DEPTH_BUFFER_BIT)"/>
+ <value name="(GL_STENCIL_BUFFER_BIT)"/>
+ <value name="(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)"/>
+ <value name="(GL_COLOR_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)"/>
+ <value name="(GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)"/>
+ <value name="(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT)"/>
+ </desc>
+</template>
+
+<template name="ClearColor">
+ <proto>
+ <return type="void"/>
+ <param name="red" type="GLtype"/>
+ <param name="green" type="GLtype"/>
+ <param name="blue" type="GLtype"/>
+ <param name="alpha" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="ClearStencil">
+ <proto>
+ <return type="void"/>
+ <param name="s" type="GLint"/>
+ </proto>
+</template>
+
+<template name="ClearDepth">
+ <proto>
+ <return type="void"/>
+ <param name="depth" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="StencilMask">
+ <proto>
+ <return type="void"/>
+ <param name="mask" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="StencilMaskSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="mask" type="GLuint"/>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+</template>
+
+<template name="ColorMask">
+ <proto>
+ <return type="void"/>
+ <param name="red" type="GLboolean"/>
+ <param name="green" type="GLboolean"/>
+ <param name="blue" type="GLboolean"/>
+ <param name="alpha" type="GLboolean"/>
+ </proto>
+</template>
+
+<template name="DepthMask">
+ <proto>
+ <return type="void"/>
+ <param name="flag" type="GLboolean"/>
+ </proto>
+</template>
+
+<template name="Disable">
+ <proto>
+ <return type="void"/>
+ <param name="cap" type="GLenum"/>
+ </proto>
+
+ <desc name="cap" category="GLES1.1">
+ <value name="GL_NORMALIZE"/>
+ <value name="GL_RESCALE_NORMAL"/>
+
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+
+ <value name="GL_FOG"/>
+ <value name="GL_LIGHTING"/>
+ <value name="GL_COLOR_MATERIAL"/>
+
+ <range base="GL_LIGHT" from="0" to="7"/>
+
+ <value name="GL_POINT_SMOOTH"/>
+ <value name="GL_LINE_SMOOTH"/>
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_MULTISAMPLE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_ONE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_ALPHA_TEST"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_BLEND"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_COLOR_LOGIC_OP"/>
+
+ <value name="GL_POINT_SPRITE_OES" category="OES_point_sprite"/>
+ <value name="GL_MATRIX_PALETTE_OES" category="OES_matrix_palette"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_GEN_STR_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="cap" category="GLES2.0">
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_BLEND"/>
+ </desc>
+</template>
+
+<!-- it is exactly the same as Disable -->
+<template name="Enable">
+ <proto>
+ <return type="void"/>
+ <param name="cap" type="GLenum"/>
+ </proto>
+
+ <desc name="cap" category="GLES1.1">
+ <value name="GL_NORMALIZE"/>
+ <value name="GL_RESCALE_NORMAL"/>
+
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+
+ <value name="GL_FOG"/>
+ <value name="GL_LIGHTING"/>
+ <value name="GL_COLOR_MATERIAL"/>
+
+ <range base="GL_LIGHT" from="0" to="7"/>
+
+ <value name="GL_POINT_SMOOTH"/>
+ <value name="GL_LINE_SMOOTH"/>
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_MULTISAMPLE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_ONE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_ALPHA_TEST"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_BLEND"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_COLOR_LOGIC_OP"/>
+
+ <value name="GL_POINT_SPRITE_OES" category="OES_point_sprite"/>
+ <value name="GL_MATRIX_PALETTE_OES" category="OES_matrix_palette"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_GEN_STR_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="cap" category="GLES2.0">
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_BLEND"/>
+ </desc>
+</template>
+
+<template name="Finish">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="Flush">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="AlphaFunc">
+ <proto>
+ <return type="void"/>
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLtype"/>
+ </proto>
+ <desc name="func">
+ <value name="GL_NEVER"/>
+ <value name="GL_LESS"/>
+ <value name="GL_EQUAL"/>
+ <value name="GL_LEQUAL"/>
+ <value name="GL_GREATER"/>
+ <value name="GL_NOTEQUAL"/>
+ <value name="GL_GEQUAL"/>
+ <value name="GL_ALWAYS"/>
+ </desc>
+</template>
+
+<template name="BlendFunc">
+ <proto>
+ <return type="void"/>
+ <param name="sfactor" type="GLenum"/>
+ <param name="dfactor" type="GLenum"/>
+ </proto>
+
+ <desc name="sfactor">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+ <value name="GL_SRC_ALPHA_SATURATE"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+
+ <desc name="dfactor">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="LogicOp">
+ <proto>
+ <return type="void"/>
+ <param name="opcode" type="GLenum"/>
+ </proto>
+
+ <desc name="opcode">
+ <value name="GL_CLEAR"/>
+ <value name="GL_SET"/>
+ <value name="GL_COPY"/>
+ <value name="GL_COPY_INVERTED"/>
+ <value name="GL_NOOP"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_AND"/>
+ <value name="GL_NAND"/>
+ <value name="GL_OR"/>
+ <value name="GL_NOR"/>
+ <value name="GL_XOR"/>
+ <value name="GL_EQUIV"/>
+ <value name="GL_AND_REVERSE"/>
+ <value name="GL_AND_INVERTED"/>
+ <value name="GL_OR_REVERSE"/>
+ <value name="GL_OR_INVERTED"/>
+ </desc>
+</template>
+
+<template name="StencilFunc">
+ <proto>
+ <return type="void"/>
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLint"/>
+ <param name="mask" type="GLuint"/>
+ </proto>
+
+ <desc name="func">
+ <value name="GL_NEVER"/>
+ <value name="GL_LESS"/>
+ <value name="GL_LEQUAL"/>
+ <value name="GL_GREATER"/>
+ <value name="GL_GEQUAL"/>
+ <value name="GL_EQUAL"/>
+ <value name="GL_NOTEQUAL"/>
+ <value name="GL_ALWAYS"/>
+ </desc>
+</template>
+
+<template name="StencilFuncSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="func" type="GLenum"/>
+ <param name="ref" type="GLint"/>
+ <param name="mask" type="GLuint"/>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+
+ <desc name="func">
+ <value name="GL_NEVER"/>
+ <value name="GL_LESS"/>
+ <value name="GL_LEQUAL"/>
+ <value name="GL_GREATER"/>
+ <value name="GL_GEQUAL"/>
+ <value name="GL_EQUAL"/>
+ <value name="GL_NOTEQUAL"/>
+ <value name="GL_ALWAYS"/>
+ </desc>
+</template>
+
+<template name="StencilOp">
+ <proto>
+ <return type="void"/>
+ <param name="fail" type="GLenum"/>
+ <param name="zfail" type="GLenum"/>
+ <param name="zpass" type="GLenum"/>
+ </proto>
+
+ <desc name="fail">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP" category="GLES2.0"/>
+ <value name="GL_DECR_WRAP" category="GLES2.0"/>
+ <value name="GL_INCR_WRAP_OES" category="OES_stencil_wrap"/>
+ <value name="GL_DECR_WRAP_OES" category="OES_stencil_wrap"/>
+ </desc>
+
+ <desc name="zfail">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP" category="GLES2.0"/>
+ <value name="GL_DECR_WRAP" category="GLES2.0"/>
+ <value name="GL_INCR_WRAP_OES" category="OES_stencil_wrap"/>
+ <value name="GL_DECR_WRAP_OES" category="OES_stencil_wrap"/>
+ </desc>
+
+ <desc name="zpass">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP" category="GLES2.0"/>
+ <value name="GL_DECR_WRAP" category="GLES2.0"/>
+ <value name="GL_INCR_WRAP_OES" category="OES_stencil_wrap"/>
+ <value name="GL_DECR_WRAP_OES" category="OES_stencil_wrap"/>
+ </desc>
+</template>
+
+<template name="StencilOpSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="fail" type="GLenum"/>
+ <param name="zfail" type="GLenum"/>
+ <param name="zpass" type="GLenum"/>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ <value name="GL_FRONT_AND_BACK"/>
+ </desc>
+
+ <desc name="fail">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP"/>
+ <value name="GL_DECR_WRAP"/>
+ </desc>
+
+ <desc name="zfail">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP"/>
+ <value name="GL_DECR_WRAP"/>
+ </desc>
+
+ <desc name="zpass">
+ <value name="GL_KEEP"/>
+ <value name="GL_ZERO"/>
+ <value name="GL_REPLACE"/>
+ <value name="GL_INCR"/>
+ <value name="GL_DECR"/>
+ <value name="GL_INVERT"/>
+ <value name="GL_INCR_WRAP"/>
+ <value name="GL_DECR_WRAP"/>
+ </desc>
+</template>
+
+<template name="DepthFunc">
+ <proto>
+ <return type="void"/>
+ <param name="func" type="GLenum"/>
+ </proto>
+
+ <desc name="func">
+ <value name="GL_NEVER"/>
+ <value name="GL_LESS"/>
+ <value name="GL_EQUAL"/>
+ <value name="GL_LEQUAL"/>
+ <value name="GL_GREATER"/>
+ <value name="GL_NOTEQUAL"/>
+ <value name="GL_GEQUAL"/>
+ <value name="GL_ALWAYS"/>
+ </desc>
+</template>
+
+<template name="PixelStore">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <param name="param" type="GLtype"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_PACK_ALIGNMENT"/>
+ <value name="GL_UNPACK_ALIGNMENT"/>
+ </desc>
+
+ <desc name="param" error="GL_INVALID_VALUE">
+ <value name="1"/>
+ <value name="2"/>
+ <value name="4"/>
+ <value name="8"/>
+ </desc>
+</template>
+
+<template name="ReadPixels" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="GLvoid *"/>
+ </proto>
+
+ <!-- Technically, only two combinations are actually allowed:
+ GL_RGBA/GL_UNSIGNED_BYTE, and some implementation-specific
+ internal preferred combination. I don't know what that is, so I'm
+ allowing any valid combination for now; the underlying support
+ should fail when necessary.-->
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="EXT_read_format_bgra">
+ <value name="GL_BGRA_EXT"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT"/>
+ <value name="GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="GetClipPlane" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="plane" type="GLenum"/>
+ <vector name="equation" type="GLtype *" size="4"/>
+ </proto>
+
+ <desc name="plane">
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+ </desc>
+</template>
+
+<template name="GetError" direction="get">
+ <proto>
+ <return type="GLenum"/>
+ </proto>
+</template>
+
+<!-- template for GetFloatv, GetIntegerv, GetBoolean, and GetFixedv -->
+<template name="GetState" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+ <!-- param checking is done in mesa -->
+</template>
+
+<template name="GetLight" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="light" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="light">
+ <range base="GL_LIGHT" from="0" to="7"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_AMBIENT"/>
+ <value name="GL_DIFFUSE"/>
+ <value name="GL_SPECULAR"/>
+ <value name="GL_POSITION"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SPOT_DIRECTION"/>
+
+ <desc name="params" vector_size="3"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SPOT_EXPONENT"/>
+ <value name="GL_SPOT_CUTOFF"/>
+ <value name="GL_CONSTANT_ATTENUATION"/>
+ <value name="GL_LINEAR_ATTENUATION"/>
+ <value name="GL_QUADRATIC_ATTENUATION"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+</template>
+
+<template name="GetMaterial" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="face" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="face">
+ <value name="GL_FRONT"/>
+ <value name="GL_BACK"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_SHININESS"/>
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_AMBIENT"/>
+ <value name="GL_DIFFUSE"/>
+ <value name="GL_AMBIENT_AND_DIFFUSE"/>
+ <value name="GL_SPECULAR"/>
+ <value name="GL_EMISSION"/>
+
+ <desc name="params" vector_size="4"/>
+ </desc>
+</template>
+
+<template name="GetString" direction="get">
+ <proto>
+ <return type="const GLubyte *"/>
+ <param name="name" type="GLenum"/>
+ </proto>
+
+ <desc name="name">
+ <value name="GL_VENDOR"/>
+ <value name="GL_RENDERER"/>
+ <value name="GL_VERSION"/>
+ <value name="GL_EXTENSIONS"/>
+ <value name="GL_SHADING_LANGUAGE_VERSION" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="GetTexEnv" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target" category="OES_point_sprite">
+ <value name="GL_POINT_SPRITE_OES"/>
+ <desc name="pname">
+ <value name="GL_COORD_REPLACE_OES"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="OES_point_sprite">
+ <value name="GL_COORD_REPLACE_OES"/>
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+
+ <desc name="target" category="EXT_texture_lod_bias">
+ <value name="GL_TEXTURE_FILTER_CONTROL_EXT"/>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+ </desc>
+ </desc>
+
+ <desc name="pname" category="EXT_texture_lod_bias">
+ <value name="GL_TEXTURE_LOD_BIAS_EXT"/>
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_ENV"/>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_COLOR"/>
+ <value name="GL_RGB_SCALE"/>
+ <value name="GL_ALPHA_SCALE"/>
+ <value name="GL_TEXTURE_ENV_MODE"/>
+ <value name="GL_COMBINE_RGB"/>
+ <value name="GL_COMBINE_ALPHA"/>
+ <value name="GL_SRC0_RGB"/>
+ <value name="GL_SRC1_RGB"/>
+ <value name="GL_SRC2_RGB"/>
+ <value name="GL_SRC0_ALPHA"/>
+ <value name="GL_SRC1_ALPHA"/>
+ <value name="GL_SRC2_ALPHA"/>
+ <value name="GL_OPERAND0_RGB"/>
+ <value name="GL_OPERAND1_RGB"/>
+ <value name="GL_OPERAND2_RGB"/>
+ <value name="GL_OPERAND0_ALPHA"/>
+ <value name="GL_OPERAND1_ALPHA"/>
+ <value name="GL_OPERAND2_ALPHA"/>
+ </desc>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_COLOR"/>
+ <desc name="params" vector_size="4"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_RGB_SCALE"/>
+ <value name="GL_ALPHA_SCALE"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_ENV_MODE"/>
+ <value name="GL_COMBINE_RGB"/>
+ <value name="GL_COMBINE_ALPHA"/>
+ <value name="GL_SRC0_RGB"/>
+ <value name="GL_SRC1_RGB"/>
+ <value name="GL_SRC2_RGB"/>
+ <value name="GL_SRC0_ALPHA"/>
+ <value name="GL_SRC1_ALPHA"/>
+ <value name="GL_SRC2_ALPHA"/>
+ <value name="GL_OPERAND0_RGB"/>
+ <value name="GL_OPERAND1_RGB"/>
+ <value name="GL_OPERAND2_RGB"/>
+ <value name="GL_OPERAND0_ALPHA"/>
+ <value name="GL_OPERAND1_ALPHA"/>
+ <value name="GL_OPERAND2_ALPHA"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetTexGen" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="coord" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="coord">
+ <value name="GL_TEXTURE_GEN_STR_OES"/>
+ </desc>
+ <desc name="pname">
+ <value name="GL_TEXTURE_GEN_MODE_OES"/>
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetTexParameter" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_TEXTURE_WRAP_S"/>
+ <value name="GL_TEXTURE_WRAP_T"/>
+ <value name="GL_TEXTURE_WRAP_R_OES" category="OES_texture_3D"/>
+ <value name="GL_TEXTURE_MIN_FILTER"/>
+ <value name="GL_TEXTURE_MAG_FILTER"/>
+ <value name="GL_GENERATE_MIPMAP" category="GLES1.1"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+
+ <desc name="pname" category="OES_draw_texture">
+ <value name="GL_TEXTURE_CROP_RECT_OES"/>
+ <desc name="params" vector_size="4"/>
+ </desc>
+</template>
+
+<template name="IsEnabled" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="cap" type="GLenum"/>
+ </proto>
+
+ <desc name="cap" category="GLES1.1">
+ <value name="GL_NORMALIZE"/>
+ <value name="GL_RESCALE_NORMAL"/>
+
+ <range base="GL_CLIP_PLANE" from="0" to="5"/>
+
+ <value name="GL_FOG"/>
+ <value name="GL_LIGHTING"/>
+ <value name="GL_COLOR_MATERIAL"/>
+
+ <range base="GL_LIGHT" from="0" to="7"/>
+
+ <value name="GL_POINT_SMOOTH"/>
+ <value name="GL_LINE_SMOOTH"/>
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_MULTISAMPLE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_ALPHA_TO_ONE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_ALPHA_TEST"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_BLEND"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_COLOR_LOGIC_OP"/>
+
+ <value name="GL_POINT_SPRITE_OES" category="OES_point_sprite"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_GEN_STR_OES" category="OES_texture_cube_map"/>
+
+ <value name="GL_VERTEX_ARRAY"/>
+ <value name="GL_NORMAL_ARRAY"/>
+ <value name="GL_COLOR_ARRAY"/>
+ <value name="GL_TEXTURE_COORD_ARRAY"/>
+ <value name="GL_MATRIX_INDEX_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_WEIGHT_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_POINT_SIZE_ARRAY_OES" category="OES_point_size_array"/>
+ </desc>
+
+ <desc name="cap" category="GLES2.0">
+ <value name="GL_CULL_FACE"/>
+ <value name="GL_SCISSOR_TEST"/>
+ <value name="GL_POLYGON_OFFSET_FILL"/>
+ <value name="GL_SAMPLE_ALPHA_TO_COVERAGE"/>
+ <value name="GL_SAMPLE_COVERAGE"/>
+ <value name="GL_STENCIL_TEST"/>
+ <value name="GL_DEPTH_TEST"/>
+ <value name="GL_DITHER"/>
+ <value name="GL_BLEND"/>
+ </desc>
+</template>
+
+<template name="DepthRange">
+ <proto>
+ <return type="void"/>
+ <param name="zNear" type="GLtype"/>
+ <param name="zFar" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Frustum">
+ <proto>
+ <return type="void"/>
+ <param name="left" type="GLtype"/>
+ <param name="right" type="GLtype"/>
+ <param name="bottom" type="GLtype"/>
+ <param name="top" type="GLtype"/>
+ <param name="zNear" type="GLtype"/>
+ <param name="zFar" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="LoadIdentity">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="LoadMatrix">
+ <proto>
+ <return type="void"/>
+ <vector name="m" type="const GLtype *" size="16"/>
+ </proto>
+</template>
+
+<template name="MatrixMode">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_MODELVIEW"/>
+ <value name="GL_PROJECTION"/>
+ <value name="GL_TEXTURE"/>
+ <value name="GL_MATRIX_PALETTE_OES" category="OES_matrix_palette"/>
+ </desc>
+</template>
+
+<template name="MultMatrix">
+ <proto>
+ <return type="void"/>
+ <vector name="m" type="const GLtype *" size="16"/>
+ </proto>
+</template>
+
+<template name="Ortho">
+ <proto>
+ <return type="void"/>
+ <param name="left" type="GLtype"/>
+ <param name="right" type="GLtype"/>
+ <param name="bottom" type="GLtype"/>
+ <param name="top" type="GLtype"/>
+ <param name="zNear" type="GLtype"/>
+ <param name="zFar" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="PopMatrix">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="PushMatrix">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="Rotate">
+ <proto>
+ <return type="void"/>
+ <param name="angle" type="GLtype"/>
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Scale">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Translate">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="Viewport">
+ <proto>
+ <return type="void"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+</template>
+
+<template name="ColorPointer">
+ <proto>
+ <return type="void"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="size" error="GL_INVALID_VALUE">
+ <value name="4"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ </desc>
+</template>
+
+<template name="DisableClientState">
+ <proto>
+ <return type="void"/>
+ <param name="array" type="GLenum"/>
+ </proto>
+
+ <desc name="array">
+ <value name="GL_VERTEX_ARRAY"/>
+ <value name="GL_NORMAL_ARRAY"/>
+ <value name="GL_COLOR_ARRAY"/>
+ <value name="GL_TEXTURE_COORD_ARRAY"/>
+ <value name="GL_MATRIX_INDEX_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_WEIGHT_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_POINT_SIZE_ARRAY_OES" category="OES_point_size_array"/>
+ </desc>
+</template>
+
+<template name="DrawArrays">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ <param name="first" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_POINTS"/>
+ <value name="GL_LINES"/>
+ <value name="GL_LINE_LOOP"/>
+ <value name="GL_LINE_STRIP"/>
+ <value name="GL_TRIANGLES"/>
+ <value name="GL_TRIANGLE_STRIP"/>
+ <value name="GL_TRIANGLE_FAN"/>
+ </desc>
+</template>
+
+<template name="DrawElements">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ <param name="count" type="GLsizei"/>
+ <param name="type" type="GLenum"/>
+ <param name="indices" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_POINTS"/>
+ <value name="GL_LINES"/>
+ <value name="GL_LINE_LOOP"/>
+ <value name="GL_LINE_STRIP"/>
+ <value name="GL_TRIANGLES"/>
+ <value name="GL_TRIANGLE_STRIP"/>
+ <value name="GL_TRIANGLE_FAN"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT"/>
+ <!-- GL_UNSIGNED_INT is not defined in GLES1.1 headers -->
+ <value name="(0x1405 /* GL_UNSIGNED_INT */)" category="OES_element_index_uint"/>
+ </desc>
+</template>
+
+<template name="EnableClientState">
+ <proto>
+ <return type="void"/>
+ <param name="array" type="GLenum"/>
+ </proto>
+
+ <desc name="array">
+ <value name="GL_VERTEX_ARRAY"/>
+ <value name="GL_NORMAL_ARRAY"/>
+ <value name="GL_COLOR_ARRAY"/>
+ <value name="GL_TEXTURE_COORD_ARRAY"/>
+ <value name="GL_MATRIX_INDEX_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_WEIGHT_ARRAY_OES" category="OES_matrix_palette"/>
+ <value name="GL_POINT_SIZE_ARRAY_OES" category="OES_point_size_array"/>
+ </desc>
+</template>
+
+<template name="GetPointer" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLvoid **" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_VERTEX_ARRAY_POINTER"/>
+ <value name="GL_NORMAL_ARRAY_POINTER"/>
+ <value name="GL_COLOR_ARRAY_POINTER"/>
+ <value name="GL_TEXTURE_COORD_ARRAY_POINTER"/>
+ <value name="GL_MATRIX_INDEX_ARRAY_POINTER_OES" category="OES_matrix_palette"/>
+ <value name="GL_WEIGHT_ARRAY_POINTER_OES" category="OES_matrix_palette"/>
+ <value name="GL_POINT_SIZE_ARRAY_POINTER_OES" category="OES_point_size_array"/>
+ </desc>
+</template>
+
+<template name="Normal">
+ <proto>
+ <return type="void"/>
+ <vector name="v" type="const GLtype *" size="3">
+ <param name="nx" type="GLtype"/>
+ <param name="ny" type="GLtype"/>
+ <param name="nz" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="NormalPointer">
+ <proto>
+ <return type="void"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="type">
+ <value name="GL_BYTE"/>
+ <value name="GL_SHORT"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ </desc>
+</template>
+
+<template name="TexCoordPointer">
+ <proto>
+ <return type="void"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="size" error="GL_INVALID_VALUE">
+ <value name="2"/>
+ <value name="3"/>
+ <value name="4"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_BYTE"/>
+ <value name="GL_SHORT"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ </desc>
+</template>
+
+<template name="VertexPointer">
+ <proto>
+ <return type="void"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="size" error="GL_INVALID_VALUE">
+ <value name="2"/>
+ <value name="3"/>
+ <value name="4"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_BYTE"/>
+ <value name="GL_SHORT"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ </desc>
+</template>
+
+<template name="PolygonOffset">
+ <proto>
+ <return type="void"/>
+ <param name="factor" type="GLtype"/>
+ <param name="units" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="CopyTexImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="internalFormat" error="GL_INVALID_VALUE">
+ <value name="GL_ALPHA"/>
+ <value name="GL_RGB"/>
+ <value name="GL_RGBA"/>
+ <value name="GL_LUMINANCE"/>
+ <value name="GL_LUMINANCE_ALPHA"/>
+ </desc>
+
+ <desc name="border" error="GL_INVALID_VALUE">
+ <value name="0"/>
+ </desc>
+</template>
+
+<template name="CopyTexSubImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+</template>
+
+<template name="TexSubImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ <value name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT" category="EXT_texture_type_2_10_10_10_REV"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="OES_depth_texture">
+ <value name="GL_DEPTH_COMPONENT"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_SHORT"/>
+ <value name="GL_UNSIGNED_INT"/>
+ </desc>
+ </desc>
+
+ <desc name="format" category="OES_packed_depth_stencil">
+ <value name="GL_DEPTH_STENCIL_OES"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_INT_24_8_OES"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="BindTexture">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+</template>
+
+<template name="DeleteTextures">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="textures" type="const GLuint *"/>
+ </proto>
+</template>
+
+<template name="GenTextures" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="textures" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="IsTexture" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="texture" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="BlendColor">
+ <proto>
+ <return type="void"/>
+ <param name="red" type="GLtype"/>
+ <param name="green" type="GLtype"/>
+ <param name="blue" type="GLtype"/>
+ <param name="alpha" type="GLtype"/>
+ </proto>
+</template>
+
+<template name="BlendEquation">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_FUNC_ADD" category="GLES2.0"/>
+ <value name="GL_FUNC_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_ADD_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_SUBTRACT_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT_OES" category="OES_blend_subtract"/>
+
+ <value name="GL_MIN_EXT" category="EXT_blend_minmax"/>
+ <value name="GL_MAX_EXT" category="EXT_blend_minmax"/>
+ </desc>
+</template>
+
+<template name="BlendEquationSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="modeRGB" type="GLenum"/>
+ <param name="modeAlpha" type="GLenum"/>
+ </proto>
+
+ <desc name="modeRGB">
+ <value name="GL_FUNC_ADD" category="GLES2.0"/>
+ <value name="GL_FUNC_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_ADD_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_SUBTRACT_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT_OES" category="OES_blend_subtract"/>
+
+ <value name="GL_MIN_EXT" category="EXT_blend_minmax"/>
+ <value name="GL_MAX_EXT" category="EXT_blend_minmax"/>
+ </desc>
+
+ <desc name="modeAlpha">
+ <value name="GL_FUNC_ADD" category="GLES2.0"/>
+ <value name="GL_FUNC_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT" category="GLES2.0"/>
+ <value name="GL_FUNC_ADD_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_SUBTRACT_OES" category="OES_blend_subtract"/>
+ <value name="GL_FUNC_REVERSE_SUBTRACT_OES" category="OES_blend_subtract"/>
+
+ <value name="GL_MIN_EXT" category="EXT_blend_minmax"/>
+ <value name="GL_MAX_EXT" category="EXT_blend_minmax"/>
+ </desc>
+</template>
+
+<template name="TexImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+
+ <desc name="internalFormat">
+ <value name="GL_ALPHA"/>
+ <value name="GL_RGB"/>
+ <value name="GL_RGBA"/>
+ <value name="GL_LUMINANCE"/>
+ <value name="GL_LUMINANCE_ALPHA"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ <value name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT" category="EXT_texture_type_2_10_10_10_REV"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="TexSubImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="type" type="GLenum"/>
+ <param name="pixels" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGB"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_5_6_5"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_RGBA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT_4_4_4_4"/>
+ <value name="GL_UNSIGNED_SHORT_5_5_5_1"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ <value name="GL_UNSIGNED_INT_2_10_10_10_REV_EXT" category="EXT_texture_type_2_10_10_10_REV"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_LUMINANCE_ALPHA"/>
+
+ <desc name="type" error="GL_INVALID_OPERATION">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_FLOAT" category="OES_texture_float"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_texture_half_float"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="CopyTexSubImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="x" type="GLint"/>
+ <param name="y" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+</template>
+
+<template name="MultiTexCoord">
+ <proto>
+ <return type="void"/>
+ <param name="texture" type="GLenum"/>
+ <vector name="v" type="const GLtype *" size="dynamic">
+ <param name="s" type="GLtype"/>
+ <param name="t" type="GLtype"/>
+ <param name="r" type="GLtype"/>
+ <param name="q" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="texture">
+ <range base="GL_TEXTURE" from="0" to="31"/>
+ </desc>
+</template>
+
+<template name="CompressedTexImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="imagesize" type="GLsizei"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+
+ <desc name="internalFormat">
+ <value name="GL_3DC_X_AMD" category="AMD_compressed_3DC_texture"/>
+ <value name="GL_3DC_XY_AMD" category="AMD_compressed_3DC_texture"/>
+ <value name="GL_ATC_RGB_AMD" category="AMD_compressed_ATC_texture"/>
+ <value name="GL_ATC_RGBA_EXPLICIT_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
+ <value name="GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
+ </desc>
+</template>
+
+<template name="CompressedTexSubImage3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="depth" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="imagesize" type="GLsizei"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_3D_OES"/>
+ </desc>
+</template>
+
+<template name="ActiveTexture">
+ <proto>
+ <return type="void"/>
+ <param name="texture" type="GLenum"/>
+ </proto>
+
+ <desc name="texture">
+ <range base="GL_TEXTURE" from="0" to="31"/>
+ </desc>
+</template>
+
+<template name="ClientActiveTexture">
+ <proto>
+ <return type="void"/>
+ <param name="texture" type="GLenum"/>
+ </proto>
+
+ <desc name="texture">
+ <range base="GL_TEXTURE" from="0" to="31"/>
+ </desc>
+</template>
+
+<template name="SampleCoverage">
+ <proto>
+ <return type="void"/>
+ <param name="value" type="GLtype"/>
+ <param name="invert" type="GLboolean"/>
+ </proto>
+</template>
+
+<template name="CompressedTexImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="border" type="GLint"/>
+ <param name="imageSize" type="GLsizei"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="internalFormat">
+ <value name="GL_ETC1_RGB8_OES" category="OES_compressed_ETC1_RGB8_texture"/>
+
+ <value name="GL_PALETTE4_RGB8_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE4_RGBA8_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE4_R5_G6_B5_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE4_RGBA4_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE4_RGB5_A1_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_RGB8_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_RGBA8_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_R5_G6_B5_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_RGBA4_OES" category="OES_compressed_paletted_texture"/>
+ <value name="GL_PALETTE8_RGB5_A1_OES" category="OES_compressed_paletted_texture"/>
+
+ <value name="GL_3DC_X_AMD" category="AMD_compressed_3DC_texture"/>
+ <value name="GL_3DC_XY_AMD" category="AMD_compressed_3DC_texture"/>
+
+ <value name="GL_ATC_RGB_AMD" category="AMD_compressed_ATC_texture"/>
+ <value name="GL_ATC_RGBA_EXPLICIT_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
+ <value name="GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD" category="AMD_compressed_ATC_texture"/>
+
+ <value name="GL_COMPRESSED_RGB_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
+ <value name="GL_COMPRESSED_RGBA_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
+ </desc>
+
+ <desc name="border" error="GL_INVALID_VALUE">
+ <value name="0"/>
+ </desc>
+</template>
+
+<template name="CompressedTexSubImage2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="level" type="GLint"/>
+ <param name="xoffset" type="GLint"/>
+ <param name="yoffset" type="GLint"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ <param name="format" type="GLenum"/>
+ <param name="imageSize" type="GLsizei"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+
+ <desc name="format">
+ <value name="GL_COMPRESSED_RGB_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
+ <value name="GL_COMPRESSED_RGBA_S3TC_DXT1_EXT" category="EXT_texture_compression_dxt1"/>
+ </desc>
+</template>
+
+<template name="BlendFuncSeparate">
+ <proto>
+ <return type="void"/>
+ <param name="srcRGB" type="GLenum"/>
+ <param name="dstRGB" type="GLenum"/>
+ <param name="srcAlpha" type="GLenum"/>
+ <param name="dstAlpha" type="GLenum"/>
+ </proto>
+
+ <desc name="srcRGB">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+ <value name="GL_SRC_ALPHA_SATURATE"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+
+ <desc name="dstRGB">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+
+ <desc name="srcAlpha">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+ <value name="GL_SRC_ALPHA_SATURATE"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+
+ <desc name="dstAlpha">
+ <value name="GL_ZERO"/>
+ <value name="GL_ONE"/>
+ <value name="GL_SRC_COLOR"/>
+ <value name="GL_ONE_MINUS_SRC_COLOR"/>
+ <value name="GL_SRC_ALPHA"/>
+ <value name="GL_ONE_MINUS_SRC_ALPHA"/>
+ <value name="GL_DST_ALPHA"/>
+ <value name="GL_ONE_MINUS_DST_ALPHA"/>
+ <value name="GL_DST_COLOR"/>
+ <value name="GL_ONE_MINUS_DST_COLOR"/>
+
+ <value name="GL_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_COLOR" category="GLES2.0"/>
+ <value name="GL_CONSTANT_ALPHA" category="GLES2.0"/>
+ <value name="GL_ONE_MINUS_CONSTANT_ALPHA" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="PointParameter">
+ <proto>
+ <return type="void"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="const GLtype *" size="dynamic">
+ <param name="param" type="GLtype"/>
+ </vector>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_POINT_SIZE_MIN"/>
+ <value name="GL_POINT_SIZE_MAX"/>
+ <value name="GL_POINT_FADE_THRESHOLD_SIZE"/>
+
+ <desc name="params" vector_size="1"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_POINT_DISTANCE_ATTENUATION"/>
+ <desc name="params" vector_size="3"/>
+ </desc>
+</template>
+
+<template name="VertexAttrib">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ <vector name="v" type="const GLtype *" size="dynamic">
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ <param name="w" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="VertexAttribPointer">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ <param name="size" type="GLint"/>
+ <param name="type" type="GLenum"/>
+ <param name="normalized" type="GLboolean"/>
+ <param name="stride" type="GLsizei"/>
+ <param name="pointer" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="size" error="GL_INVALID_VALUE">
+ <value name="1"/>
+ <value name="2"/>
+ <value name="3"/>
+ <value name="4"/>
+ </desc>
+
+ <desc name="type" error="GL_INVALID_VALUE">
+ <value name="GL_BYTE"/>
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_SHORT"/>
+ <value name="GL_UNSIGNED_SHORT"/>
+ <value name="GL_FLOAT"/>
+ <value name="GL_FIXED"/>
+ <value name="GL_HALF_FLOAT_OES" category="OES_vertex_half_float"/>
+ <value name="GL_UNSIGNED_INT_10_10_10_2_OES" category="OES_vertex_type_10_10_10_2"/>
+ <value name="GL_INT_10_10_10_2_OES" category="OES_vertex_type_10_10_10_2"/>
+ </desc>
+
+ <desc name="type" category="OES_vertex_type_10_10_10_2">
+ <value name="GL_UNSIGNED_INT_10_10_10_2_OES"/>
+ <value name="GL_INT_10_10_10_2_OES"/>
+
+ <desc name="size">
+ <value name="3"/>
+ <value name="4"/>
+ </desc>
+ </desc>
+</template>
+
+<template name="EnableVertexAttribArray">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="DisableVertexAttribArray">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="IsProgram" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="GetProgram" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_DELETE_STATUS"/>
+ <value name="GL_LINK_STATUS"/>
+ <value name="GL_VALIDATE_STATUS"/>
+ <value name="GL_INFO_LOG_LENGTH"/>
+ <value name="GL_ATTACHED_SHADERS"/>
+ <value name="GL_ACTIVE_ATTRIBUTES"/>
+ <value name="GL_ACTIVE_ATTRIBUTE_MAX_LENGTH"/>
+ <value name="GL_ACTIVE_UNIFORMS"/>
+ <value name="GL_ACTIVE_UNIFORM_MAX_LENGTH"/>
+ <value name="GL_PROGRAM_BINARY_LENGTH_OES" category="OES_get_program_binary"/>
+
+ <desc name="params" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetVertexAttrib" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_VERTEX_ATTRIB_ARRAY_ENABLED"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_SIZE"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_STRIDE"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_TYPE"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_NORMALIZED"/>
+ <value name="GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_CURRENT_VERTEX_ATTRIB"/>
+ <desc name="params" vector_size="16?" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetVertexAttribPointer" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="index" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="pointer" type="GLvoid **" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_VERTEX_ATTRIB_ARRAY_POINTER"/>
+ </desc>
+</template>
+
+<template name="GetBufferPointer" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLvoid **" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_BUFFER_MAP_POINTER_OES"/>
+ </desc>
+</template>
+
+<template name="MapBuffer" direction="get">
+ <proto>
+ <return type="void *"/>
+ <param name="target" type="GLenum"/>
+ <param name="access" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+
+ <desc name="access">
+ <value name="GL_WRITE_ONLY_OES"/>
+ </desc>
+</template>
+
+<template name="UnmapBuffer" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="target" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+</template>
+
+<template name="BindBuffer">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="buffer" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+</template>
+
+<template name="BufferData">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="size" type="GLsizeiptr"/>
+ <param name="data" type="const GLvoid *"/>
+ <param name="usage" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+
+ <desc name="usage">
+ <value name="GL_STATIC_DRAW"/>
+ <value name="GL_DYNAMIC_DRAW"/>
+ <value name="GL_STREAM_DRAW" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="BufferSubData">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="offset" type="GLintptr"/>
+ <param name="size" type="GLsizeiptr"/>
+ <param name="data" type="const GLvoid *"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+</template>
+
+<template name="DeleteBuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="buffer" type="const GLuint *"/>
+ </proto>
+</template>
+
+<template name="GenBuffers" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="buffer" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="GetBufferParameter" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_ARRAY_BUFFER"/>
+ <value name="GL_ELEMENT_ARRAY_BUFFER"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_BUFFER_SIZE"/>
+ <value name="GL_BUFFER_USAGE"/>
+ <value name="GL_BUFFER_ACCESS_OES" category="OES_mapbuffer"/>
+ <value name="GL_BUFFER_MAPPED_OES" category="OES_mapbuffer"/>
+ </desc>
+</template>
+
+<template name="IsBuffer" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="buffer" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="CreateShader">
+ <proto>
+ <return type="GLuint"/>
+ <param name="type" type="GLenum"/>
+ </proto>
+
+ <desc name="type">
+ <value name="GL_VERTEX_SHADER"/>
+ <value name="GL_FRAGMENT_SHADER"/>
+ </desc>
+</template>
+
+<template name="ShaderSource">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="string" type="const GLchar **"/>
+ <param name="length" type="const int *"/>
+ </proto>
+</template>
+
+<template name="CompileShader">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="ReleaseShaderCompiler">
+ <proto>
+ <return type="void"/>
+ </proto>
+</template>
+
+<template name="DeleteShader">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="ShaderBinary">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="shaders" type="const GLuint *"/>
+ <param name="binaryformat" type="GLenum"/>
+ <param name="binary" type="const GLvoid *"/>
+ <param name="length" type="GLsizei"/>
+ </proto>
+</template>
+
+<template name="CreateProgram">
+ <proto>
+ <return type="GLuint"/>
+ </proto>
+</template>
+
+<template name="AttachShader">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="DetachShader">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="LinkProgram">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="UseProgram">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="DeleteProgram">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="GetActiveAttrib" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="index" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="size" type="GLint *"/>
+ <param name="type" type="GLenum *"/>
+ <param name="name" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="GetAttribLocation" direction="get">
+ <proto>
+ <return type="GLint"/>
+ <param name="program" type="GLuint"/>
+ <param name="name" type="const char *"/>
+ </proto>
+</template>
+
+<template name="BindAttribLocation">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="index" type="GLuint"/>
+ <param name="name" type="const char *"/>
+ </proto>
+</template>
+
+<template name="GetUniformLocation" direction="get">
+ <proto>
+ <return type="GLint"/>
+ <param name="program" type="GLuint"/>
+ <param name="name" type="const char *"/>
+ </proto>
+</template>
+
+<template name="GetActiveUniform" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="index" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="size" type="GLint *"/>
+ <param name="type" type="GLenum *"/>
+ <param name="name" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="Uniform">
+ <proto>
+ <return type="void"/>
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei" hide_if_expanded="true"/>
+ <vector name="values" type="const GLtype *" size="dynamic">
+ <param name="v0" type="GLtype"/>
+ <param name="v1" type="GLtype"/>
+ <param name="v2" type="GLtype"/>
+ <param name="v3" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="UniformMatrix">
+ <proto>
+ <return type="void"/>
+ <param name="location" type="GLint"/>
+ <param name="count" type="GLsizei"/>
+ <param name="transpose" type="GLboolean"/>
+ <vector name="value" type="const GLtype *" size="dynamic"/>
+ </proto>
+</template>
+
+<template name="ValidateProgram">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="GenerateMipmap">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+</template>
+
+<template name="BindFramebuffer">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="framebuffer" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="DeleteFramebuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="framebuffers" type="const GLuint *"/>
+ </proto>
+</template>
+
+<template name="GenFramebuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="ids" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="BindRenderbuffer">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="DeleteRenderbuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="renderbuffers" type="const GLuint *"/>
+ </proto>
+</template>
+
+<template name="GenRenderbuffers">
+ <proto>
+ <return type="void"/>
+ <param name="n" type="GLsizei"/>
+ <param name="renderbuffers" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="RenderbufferStorage">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="internalFormat" type="GLenum"/>
+ <param name="width" type="GLsizei"/>
+ <param name="height" type="GLsizei"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="internalFormat">
+ <value name="GL_DEPTH_COMPONENT16_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RGBA4_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RGB5_A1_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RGB565_OES" category="OES_framebuffer_object"/>
+ <value name="GL_STENCIL_INDEX8_OES" category="OES_stencil8"/>
+
+ <value name="GL_DEPTH_COMPONENT16" category="GLES2.0"/>
+ <value name="GL_RGBA4" category="GLES2.0"/>
+ <value name="GL_RGB5_A1" category="GLES2.0"/>
+ <value name="GL_RGB565" category="GLES2.0"/>
+ <value name="GL_STENCIL_INDEX8" category="GLES2.0"/>
+
+ <value name="GL_DEPTH_COMPONENT24_OES" category="OES_depth24"/>
+ <value name="GL_DEPTH_COMPONENT32_OES" category="OES_depth32"/>
+ <value name="GL_RGB8_OES" category="OES_rgb8_rgba8"/>
+ <value name="GL_RGBA8_OES" category="OES_rgb8_rgba8"/>
+ <value name="GL_STENCIL_INDEX1_OES" category="OES_stencil1"/>
+ <value name="GL_STENCIL_INDEX4_OES" category="OES_stencil4"/>
+ <value name="GL_DEPTH24_STENCIL8_OES" category="OES_packed_depth_stencil"/>
+ </desc>
+</template>
+
+<template name="FramebufferRenderbuffer">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="renderbuffertarget" type="GLenum"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="attachment">
+ <value name="GL_COLOR_ATTACHMENT0_OES" category="OES_framebuffer_object"/>
+ <value name="GL_DEPTH_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_STENCIL_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_COLOR_ATTACHMENT0" category="GLES2.0"/>
+ <value name="GL_DEPTH_ATTACHMENT" category="GLES2.0"/>
+ <value name="GL_STENCIL_ATTACHMENT" category="GLES2.0"/>
+ </desc>
+
+ <desc name="renderbuffertarget">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="FramebufferTexture2D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="textarget" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="attachment">
+ <value name="GL_COLOR_ATTACHMENT0_OES" category="OES_framebuffer_object"/>
+ <value name="GL_DEPTH_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_STENCIL_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_COLOR_ATTACHMENT0" category="GLES2.0"/>
+ <value name="GL_DEPTH_ATTACHMENT" category="GLES2.0"/>
+ <value name="GL_STENCIL_ATTACHMENT" category="GLES2.0"/>
+ </desc>
+
+ <desc name="textarget" error="GL_INVALID_OPERATION">
+ <value name="GL_TEXTURE_2D"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" category="GLES2.0"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES" category="OES_texture_cube_map"/>
+ <value name="GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES" category="OES_texture_cube_map"/>
+ </desc>
+ <!-- According to the base specification, "level" must be 0. But
+ extension GL_OES_fbo_render_mipmap lifts that restriction,
+ so no restriction is placed here. -->
+</template>
+
+<template name="FramebufferTexture3D">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="textarget" type="GLenum"/>
+ <param name="texture" type="GLuint"/>
+ <param name="level" type="GLint"/>
+ <param name="zoffset" type="GLint"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="attachment">
+ <value name="GL_COLOR_ATTACHMENT0_OES" category="OES_framebuffer_object"/>
+ <value name="GL_DEPTH_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_STENCIL_ATTACHMENT_OES" category="OES_framebuffer_object"/>
+ <value name="GL_COLOR_ATTACHMENT0" category="GLES2.0"/>
+ <value name="GL_DEPTH_ATTACHMENT" category="GLES2.0"/>
+ <value name="GL_STENCIL_ATTACHMENT" category="GLES2.0"/>
+ </desc>
+
+ <desc name="textarget" error="GL_INVALID_OPERATION">
+ <value name="GL_TEXTURE_3D_OES" category="OES_texture_3D"/>
+ </desc>
+</template>
+
+<template name="CheckFramebufferStatus" direction="get">
+ <proto>
+ <return type="GLenum"/>
+ <param name="target" type="GLenum"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+</template>
+
+<template name="GetFramebufferAttachmentParameter" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="attachment" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_FRAMEBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="pname">
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES" category="OES_framebuffer_object"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES" category="OES_framebuffer_object"/>
+
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE" category="GLES2.0"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME" category="GLES2.0"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL" category="GLES2.0"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE" category="GLES2.0"/>
+ <value name="GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES" category="OES_texture_3D"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+</template>
+
+<template name="GetRenderbufferParameter" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="target" type="GLenum"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="target">
+ <value name="GL_RENDERBUFFER_OES" category="OES_framebuffer_object"/>
+ <value name="GL_RENDERBUFFER" category="GLES2.0"/>
+ </desc>
+
+ <desc name="pname" category="OES_framebuffer_object">
+ <value name="GL_RENDERBUFFER_WIDTH_OES"/>
+ <value name="GL_RENDERBUFFER_HEIGHT_OES"/>
+ <value name="GL_RENDERBUFFER_INTERNAL_FORMAT_OES"/>
+ <value name="GL_RENDERBUFFER_RED_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_GREEN_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_BLUE_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_ALPHA_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_DEPTH_SIZE_OES"/>
+ <value name="GL_RENDERBUFFER_STENCIL_SIZE_OES"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+
+ <desc name="pname" category="GLES2.0">
+ <value name="GL_RENDERBUFFER_WIDTH"/>
+ <value name="GL_RENDERBUFFER_HEIGHT"/>
+ <value name="GL_RENDERBUFFER_INTERNAL_FORMAT"/>
+ <value name="GL_RENDERBUFFER_RED_SIZE"/>
+ <value name="GL_RENDERBUFFER_GREEN_SIZE"/>
+ <value name="GL_RENDERBUFFER_BLUE_SIZE"/>
+ <value name="GL_RENDERBUFFER_ALPHA_SIZE"/>
+ <value name="GL_RENDERBUFFER_DEPTH_SIZE"/>
+ <value name="GL_RENDERBUFFER_STENCIL_SIZE"/>
+
+ <desc name="params" vector_size="1" convert="false"/>
+ </desc>
+</template>
+
+<template name="IsRenderbuffer" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="renderbuffer" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="IsFramebuffer" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="framebuffer" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="IsShader" direction="get">
+ <proto>
+ <return type="GLboolean"/>
+ <param name="shader" type="GLuint"/>
+ </proto>
+</template>
+
+<template name="GetShader" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ <param name="pname" type="GLenum"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+
+ <desc name="pname">
+ <value name="GL_SHADER_TYPE"/>
+ <value name="GL_COMPILE_STATUS"/>
+ <value name="GL_DELETE_STATUS"/>
+ <value name="GL_INFO_LOG_LENGTH"/>
+ <value name="GL_SHADER_SOURCE_LENGTH"/>
+ </desc>
+</template>
+
+<template name="GetAttachedShaders" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="maxCount" type="GLsizei"/>
+ <param name="count" type="GLsizei *"/>
+ <param name="shaders" type="GLuint *"/>
+ </proto>
+</template>
+
+<template name="GetShaderInfoLog" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="infoLog" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="GetProgramInfoLog" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="infoLog" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="GetShaderSource" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="shader" type="GLuint"/>
+ <param name="bufSize" type="GLsizei"/>
+ <param name="length" type="GLsizei *"/>
+ <param name="source" type="GLchar *"/>
+ </proto>
+</template>
+
+<template name="GetShaderPrecisionFormat" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="shadertype" type="GLenum"/>
+ <param name="precisiontype" type="GLenum"/>
+ <param name="range" type="GLint *"/>
+ <param name="precision" type="GLint *"/>
+ </proto>
+
+ <desc name="shadertype">
+ <value name="GL_VERTEX_SHADER"/>
+ <value name="GL_FRAGMENT_SHADER"/>
+ </desc>
+
+ <desc name="precisiontype">
+ <value name="GL_LOW_FLOAT"/>
+ <value name="GL_MEDIUM_FLOAT"/>
+ <value name="GL_HIGH_FLOAT"/>
+ <value name="GL_LOW_INT"/>
+ <value name="GL_MEDIUM_INT"/>
+ <value name="GL_HIGH_INT"/>
+ </desc>
+</template>
+
+<template name="GetUniform" direction="get">
+ <proto>
+ <return type="void"/>
+ <param name="program" type="GLuint"/>
+ <param name="location" type="GLint"/>
+ <vector name="params" type="GLtype *" size="dynamic"/>
+ </proto>
+</template>
+
+<template name="QueryMatrix" direction="get">
+ <proto>
+ <return type="GLbitfield"/>
+ <vector name="mantissa" type="GLtype *" size="16"/>
+ <vector name="exponent" type="GLint *" size="16"/>
+ </proto>
+</template>
+
+<template name="DrawTex">
+ <proto>
+ <return type="void"/>
+ <vector name="coords" type="const GLtype *" size="5">
+ <param name="x" type="GLtype"/>
+ <param name="y" type="GLtype"/>
+ <param name="z" type="GLtype"/>
+ <param name="w" type="GLtype"/>
+ <param name="h" type="GLtype"/>
+ </vector>
+ </proto>
+</template>
+
+<template name="MultiDrawArrays">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ <param name="first" type="GLint *"/>
+ <param name="count" type="GLsizei *"/>
+ <param name="primcount" type="GLsizei"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_POINTS"/>
+ <value name="GL_LINES"/>
+ <value name="GL_LINE_LOOP"/>
+ <value name="GL_LINE_STRIP"/>
+ <value name="GL_TRIANGLES"/>
+ <value name="GL_TRIANGLE_STRIP"/>
+ <value name="GL_TRIANGLE_FAN"/>
+ </desc>
+</template>
+
+<template name="MultiDrawElements">
+ <proto>
+ <return type="void"/>
+ <param name="mode" type="GLenum"/>
+ <param name="count" type="const GLsizei *"/>
+ <param name="type" type="GLenum"/>
+ <param name="indices" type="const GLvoid **"/>
+ <param name="primcount" type="GLsizei"/>
+ </proto>
+
+ <desc name="mode">
+ <value name="GL_POINTS"/>
+ <value name="GL_LINES"/>
+ <value name="GL_LINE_LOOP"/>
+ <value name="GL_LINE_STRIP"/>
+ <value name="GL_TRIANGLES"/>
+ <value name="GL_TRIANGLE_STRIP"/>
+ <value name="GL_TRIANGLE_FAN"/>
+ </desc>
+
+ <desc name="type">
+ <value name="GL_UNSIGNED_BYTE"/>
+ <value name="GL_UNSIGNED_SHORT"/>
+ <!-- GL_UNSIGNED_INT is not defined in GLES1.1 headers -->
+ <value name="(0x1405 /* GL_UNSIGNED_INT */)" category="OES_element_index_uint"/>
+ </desc>
+</template>
+
+<api name="mesa" implementation="true">
+ <category name="MESA"/>
+
+ <function name="Color4f" default_prefix="_vbo_" template="Color" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="ClipPlane" template="ClipPlane" gltype="GLdouble"/>
+ <function name="CullFace" template="CullFace"/>
+
+ <function name="Fogf" template="Fog" gltype="GLfloat" expand_vector="true"/>
+ <function name="Fogfv" template="Fog" gltype="GLfloat"/>
+
+ <function name="FrontFace" template="FrontFace"/>
+ <function name="Hint" template="Hint"/>
+
+ <function name="Lightf" template="Light" gltype="GLfloat" expand_vector="true"/>
+ <function name="Lightfv" template="Light" gltype="GLfloat"/>
+
+ <function name="LightModelf" template="LightModel" gltype="GLfloat" expand_vector="true"/>
+ <function name="LightModelfv" template="LightModel" gltype="GLfloat"/>
+
+ <function name="LineWidth" template="LineWidth" gltype="GLfloat"/>
+
+ <function name="Materialf" default_prefix="_vbo_" template="Material" gltype="GLfloat" expand_vector="true"/>
+ <function name="Materialfv" default_prefix="_vbo_" template="Material" gltype="GLfloat"/>
+
+ <function name="PointSize" template="PointSize" gltype="GLfloat"/>
+ <function name="PointSizePointer" template="PointSizePointer"/>
+
+ <function name="Scissor" template="Scissor"/>
+ <function name="ShadeModel" template="ShadeModel"/>
+
+ <function name="TexParameterf" template="TexParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexParameterfv" template="TexParameter" gltype="GLfloat"/>
+ <function name="TexParameteri" template="TexParameter" gltype="GLint" expand_vector="true"/>
+ <function name="TexParameteriv" template="TexParameter" gltype="GLint"/>
+
+ <function name="TexImage2D" template="TexImage2D"/>
+
+ <function name="TexEnvf" template="TexEnv" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexEnvi" template="TexEnv" gltype="GLint" expand_vector="true"/>
+ <function name="TexEnvfv" template="TexEnv" gltype="GLfloat"/>
+ <function name="TexEnviv" template="TexEnv" gltype="GLint"/>
+
+ <function name="TexGenf" template="TexGen" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexGenfv" template="TexGen" gltype="GLfloat"/>
+
+ <function name="Clear" template="Clear"/>
+ <function name="ClearColor" template="ClearColor" gltype="GLclampf"/>
+ <function name="ClearStencil" template="ClearStencil"/>
+ <function name="ClearDepth" template="ClearDepth" gltype="GLclampd"/>
+
+ <function name="StencilMask" template="StencilMask"/>
+ <function name="StencilMaskSeparate" template="StencilMaskSeparate"/>
+ <function name="ColorMask" template="ColorMask"/>
+ <function name="DepthMask" template="DepthMask"/>
+ <function name="Disable" template="Disable"/>
+ <function name="Enable" template="Enable"/>
+ <function name="Finish" template="Finish"/>
+ <function name="Flush" template="Flush"/>
+
+ <function name="AlphaFunc" template="AlphaFunc" gltype="GLclampf"/>
+
+ <function name="BlendFunc" template="BlendFunc"/>
+ <function name="LogicOp" template="LogicOp"/>
+ <function name="StencilFunc" template="StencilFunc"/>
+ <function name="StencilFuncSeparate" template="StencilFuncSeparate"/>
+ <function name="StencilOp" template="StencilOp"/>
+ <function name="StencilOpSeparate" template="StencilOpSeparate"/>
+ <function name="DepthFunc" template="DepthFunc"/>
+ <function name="PixelStorei" template="PixelStore" gltype="GLint"/>
+
+ <function name="ReadPixels" template="ReadPixels"/>
+ <function name="GetBooleanv" template="GetState" gltype="GLboolean"/>
+ <function name="GetClipPlane" template="GetClipPlane" gltype="GLdouble"/>
+ <function name="GetError" template="GetError"/>
+ <function name="GetFloatv" template="GetState" gltype="GLfloat"/>
+ <function name="GetFixedv" template="GetState" gltype="GLfixed"/>
+ <function name="GetIntegerv" template="GetState" gltype="GLint"/>
+
+ <function name="GetLightfv" template="GetLight" gltype="GLfloat"/>
+ <function name="GetMaterialfv" template="GetMaterial" gltype="GLfloat"/>
+ <function name="GetMaterialiv" template="GetMaterial" gltype="GLint"/>
+
+ <function name="GetString" template="GetString"/>
+
+ <function name="GetTexEnvfv" template="GetTexEnv" gltype="GLfloat"/>
+ <function name="GetTexEnviv" template="GetTexEnv" gltype="GLint"/>
+ <function name="GetTexGenfv" template="GetTexGen" gltype="GLfloat"/>
+ <function name="GetTexParameterfv" template="GetTexParameter" gltype="GLfloat"/>
+ <function name="GetTexParameteriv" template="GetTexParameter" gltype="GLint"/>
+
+ <function name="IsEnabled" template="IsEnabled"/>
+
+ <function name="DepthRange" template="DepthRange" gltype="GLclampd"/>
+ <function name="Frustum" template="Frustum" gltype="GLdouble"/>
+
+ <function name="LoadIdentity" template="LoadIdentity"/>
+ <function name="LoadMatrixf" template="LoadMatrix" gltype="GLfloat"/>
+ <function name="MatrixMode" template="MatrixMode"/>
+
+ <function name="MultMatrixf" template="MultMatrix" gltype="GLfloat"/>
+ <function name="Ortho" template="Ortho" gltype="GLdouble"/>
+ <function name="PopMatrix" template="PopMatrix"/>
+ <function name="PushMatrix" template="PushMatrix"/>
+
+ <function name="Rotatef" template="Rotate" gltype="GLfloat"/>
+ <function name="Scalef" template="Scale" gltype="GLfloat"/>
+ <function name="Translatef" template="Translate" gltype="GLfloat"/>
+
+ <function name="Viewport" template="Viewport"/>
+
+ <function name="ColorPointer" template="ColorPointer"/>
+ <function name="DisableClientState" template="DisableClientState"/>
+ <function name="DrawArrays" template="DrawArrays"/>
+ <function name="DrawElements" template="DrawElements"/>
+ <function name="EnableClientState" template="EnableClientState"/>
+
+ <function name="GetPointerv" template="GetPointer"/>
+ <function name="Normal3f" default_prefix="_vbo_" template="Normal" gltype="GLfloat" expand_vector="true"/>
+ <function name="NormalPointer" template="NormalPointer"/>
+ <function name="TexCoordPointer" template="TexCoordPointer"/>
+ <function name="VertexPointer" template="VertexPointer"/>
+
+ <function name="PolygonOffset" template="PolygonOffset" gltype="GLfloat"/>
+ <function name="CopyTexImage2D" template="CopyTexImage2D"/>
+ <function name="CopyTexSubImage2D" template="CopyTexSubImage2D"/>
+ <function name="TexSubImage2D" template="TexSubImage2D"/>
+
+ <function name="BindTexture" template="BindTexture"/>
+ <function name="DeleteTextures" template="DeleteTextures"/>
+ <function name="GenTextures" template="GenTextures"/>
+ <function name="IsTexture" template="IsTexture"/>
+
+ <function name="BlendColor" template="BlendColor" gltype="GLclampf"/>
+ <function name="BlendEquation" template="BlendEquation"/>
+ <function name="BlendEquationSeparateEXT" template="BlendEquationSeparate"/>
+
+ <function name="TexImage3D" template="TexImage3D"/>
+ <function name="TexSubImage3D" template="TexSubImage3D"/>
+ <function name="CopyTexSubImage3D" template="CopyTexSubImage3D"/>
+
+ <function name="CompressedTexImage3DARB" template="CompressedTexImage3D"/>
+ <function name="CompressedTexSubImage3DARB" template="CompressedTexSubImage3D"/>
+
+ <function name="ActiveTextureARB" template="ActiveTexture"/>
+ <function name="ClientActiveTextureARB" template="ClientActiveTexture"/>
+
+ <function name="MultiTexCoord4f" default_prefix="_vbo_" template="MultiTexCoord" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+
+ <function name="SampleCoverageARB" template="SampleCoverage" gltype="GLclampf"/>
+
+ <function name="CompressedTexImage2DARB" template="CompressedTexImage2D"/>
+ <function name="CompressedTexSubImage2DARB" template="CompressedTexSubImage2D"/>
+
+ <function name="BlendFuncSeparateEXT" template="BlendFuncSeparate"/>
+
+ <function name="PointParameterf" template="PointParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="PointParameterfv" template="PointParameter" gltype="GLfloat"/>
+
+ <function name="VertexAttrib1f" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="1" expand_vector="true"/>
+ <function name="VertexAttrib2f" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="2" expand_vector="true"/>
+ <function name="VertexAttrib3f" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+ <function name="VertexAttrib4f" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="VertexAttrib1fv" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="1"/>
+ <function name="VertexAttrib2fv" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="2"/>
+ <function name="VertexAttrib3fv" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="3"/>
+ <function name="VertexAttrib4fv" default_prefix="_vbo_" template="VertexAttrib" gltype="GLfloat" vector_size="4"/>
+
+ <function name="VertexAttribPointerARB" template="VertexAttribPointer"/>
+ <function name="EnableVertexAttribArrayARB" template="EnableVertexAttribArray"/>
+ <function name="DisableVertexAttribArrayARB" template="DisableVertexAttribArray"/>
+
+ <function name="IsProgram" template="IsProgram"/>
+ <function name="GetProgramiv" template="GetProgram" gltype="GLint"/>
+
+ <function name="GetVertexAttribfvARB" template="GetVertexAttrib" gltype="GLfloat"/>
+ <function name="GetVertexAttribivARB" template="GetVertexAttrib" gltype="GLint"/>
+ <function name="GetVertexAttribPointervARB" template="GetVertexAttribPointer"/>
+
+ <function name="GetBufferPointervARB" template="GetBufferPointer"/>
+ <function name="MapBufferARB" template="MapBuffer"/>
+ <function name="UnmapBufferARB" template="UnmapBuffer"/>
+ <function name="BindBufferARB" template="BindBuffer"/>
+ <function name="BufferDataARB" template="BufferData"/>
+ <function name="BufferSubDataARB" template="BufferSubData"/>
+ <function name="DeleteBuffersARB" template="DeleteBuffers"/>
+ <function name="GenBuffersARB" template="GenBuffers"/>
+ <function name="GetBufferParameterivARB" template="GetBufferParameter" gltype="GLint"/>
+ <function name="IsBufferARB" template="IsBuffer"/>
+
+ <function name="CreateShader" template="CreateShader"/>
+ <function name="ShaderSourceARB" template="ShaderSource"/>
+ <function name="CompileShaderARB" template="CompileShader"/>
+ <function name="ReleaseShaderCompiler" template="ReleaseShaderCompiler"/>
+ <function name="DeleteShader" template="DeleteShader"/>
+ <function name="ShaderBinary" template="ShaderBinary"/>
+ <function name="CreateProgram" template="CreateProgram"/>
+ <function name="AttachShader" template="AttachShader"/>
+ <function name="DetachShader" template="DetachShader"/>
+ <function name="LinkProgramARB" template="LinkProgram"/>
+ <function name="UseProgramObjectARB" template="UseProgram"/>
+ <function name="DeleteProgram" template="DeleteProgram"/>
+
+ <function name="GetActiveAttribARB" template="GetActiveAttrib"/>
+ <function name="GetAttribLocationARB" template="GetAttribLocation"/>
+ <function name="BindAttribLocationARB" template="BindAttribLocation"/>
+ <function name="GetUniformLocationARB" template="GetUniformLocation"/>
+ <function name="GetActiveUniformARB" template="GetActiveUniform"/>
+
+ <function name="Uniform1fARB" template="Uniform" gltype="GLfloat" vector_size="1" expand_vector="true"/>
+ <function name="Uniform2fARB" template="Uniform" gltype="GLfloat" vector_size="2" expand_vector="true"/>
+ <function name="Uniform3fARB" template="Uniform" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+ <function name="Uniform4fARB" template="Uniform" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="Uniform1iARB" template="Uniform" gltype="GLint" vector_size="1" expand_vector="true"/>
+ <function name="Uniform2iARB" template="Uniform" gltype="GLint" vector_size="2" expand_vector="true"/>
+ <function name="Uniform3iARB" template="Uniform" gltype="GLint" vector_size="3" expand_vector="true"/>
+ <function name="Uniform4iARB" template="Uniform" gltype="GLint" vector_size="4" expand_vector="true"/>
+ <function name="Uniform1fvARB" template="Uniform" gltype="GLfloat" vector_size="1"/>
+ <function name="Uniform2fvARB" template="Uniform" gltype="GLfloat" vector_size="2"/>
+ <function name="Uniform3fvARB" template="Uniform" gltype="GLfloat" vector_size="3"/>
+ <function name="Uniform4fvARB" template="Uniform" gltype="GLfloat" vector_size="4"/>
+ <function name="Uniform1ivARB" template="Uniform" gltype="GLint" vector_size="1"/>
+ <function name="Uniform2ivARB" template="Uniform" gltype="GLint" vector_size="2"/>
+ <function name="Uniform3ivARB" template="Uniform" gltype="GLint" vector_size="3"/>
+ <function name="Uniform4ivARB" template="Uniform" gltype="GLint" vector_size="4"/>
+
+ <function name="UniformMatrix2fvARB" template="UniformMatrix" gltype="GLfloat" vector_size="2"/>
+ <function name="UniformMatrix3fvARB" template="UniformMatrix" gltype="GLfloat" vector_size="3"/>
+ <function name="UniformMatrix4fvARB" template="UniformMatrix" gltype="GLfloat" vector_size="4"/>
+
+ <function name="ValidateProgramARB" template="ValidateProgram"/>
+
+ <function name="GenerateMipmapEXT" template="GenerateMipmap"/>
+ <function name="BindFramebufferEXT" template="BindFramebuffer"/>
+ <function name="DeleteFramebuffersEXT" template="DeleteFramebuffers"/>
+ <function name="GenFramebuffersEXT" template="GenFramebuffers"/>
+ <function name="BindRenderbufferEXT" template="BindRenderbuffer"/>
+ <function name="DeleteRenderbuffersEXT" template="DeleteRenderbuffers"/>
+ <function name="GenRenderbuffersEXT" template="GenRenderbuffers"/>
+ <function name="RenderbufferStorageEXT" template="RenderbufferStorage"/>
+ <function name="FramebufferRenderbufferEXT" template="FramebufferRenderbuffer"/>
+ <function name="FramebufferTexture2DEXT" template="FramebufferTexture2D"/>
+ <function name="FramebufferTexture3DEXT" template="FramebufferTexture3D"/>
+ <function name="CheckFramebufferStatusEXT" template="CheckFramebufferStatus"/>
+ <function name="GetFramebufferAttachmentParameterivEXT" template="GetFramebufferAttachmentParameter" gltype="GLint"/>
+ <function name="GetRenderbufferParameterivEXT" template="GetRenderbufferParameter" gltype="GLint"/>
+ <function name="IsRenderbufferEXT" template="IsRenderbuffer"/>
+ <function name="IsFramebufferEXT" template="IsFramebuffer"/>
+
+ <function name="IsShader" template="IsShader"/>
+ <function name="GetShaderiv" template="GetShader" gltype="GLint"/>
+ <function name="GetAttachedShaders" template="GetAttachedShaders"/>
+ <function name="GetShaderInfoLog" template="GetShaderInfoLog"/>
+ <function name="GetProgramInfoLog" template="GetProgramInfoLog"/>
+ <function name="GetShaderSourceARB" template="GetShaderSource"/>
+ <function name="GetShaderPrecisionFormat" template="GetShaderPrecisionFormat"/>
+ <function name="GetUniformfvARB" template="GetUniform" gltype="GLfloat"/>
+ <function name="GetUniformivARB" template="GetUniform" gltype="GLint"/>
+
+ <function name="DrawTexf" template="DrawTex" gltype="GLfloat" expand_vector="true"/>
+ <function name="DrawTexfv" template="DrawTex" gltype="GLfloat"/>
+ <function name="DrawTexi" template="DrawTex" gltype="GLint" expand_vector="true"/>
+ <function name="DrawTexiv" template="DrawTex" gltype="GLint"/>
+ <function name="DrawTexs" template="DrawTex" gltype="GLshort" expand_vector="true"/>
+ <function name="DrawTexsv" template="DrawTex" gltype="GLshort"/>
+
+ <!-- EXT_multi_draw_arrays -->
+ <function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
+ <function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+</api>
+
+<api name="GLES1.1">
+ <category name="GLES1.1"/>
+
+ <category name="OES_byte_coordinates"/>
+ <category name="OES_fixed_point"/>
+ <category name="OES_single_precision"/>
+ <category name="OES_matrix_get"/>
+ <category name="OES_read_format"/>
+ <category name="OES_compressed_paletted_texture"/>
+ <category name="OES_point_size_array"/>
+ <category name="OES_point_sprite"/>
+ <category name="OES_query_matrix"/>
+ <category name="OES_draw_texture"/>
+ <category name="OES_blend_equation_separate"/>
+ <category name="OES_blend_func_separate"/>
+ <category name="OES_blend_subtract"/>
+ <category name="OES_stencil_wrap"/>
+ <category name="OES_texture_cube_map"/>
+ <category name="OES_texture_env_crossbar"/>
+ <category name="OES_texture_mirrored_repeat"/>
+ <category name="OES_framebuffer_object"/>
+ <category name="OES_depth24"/>
+ <category name="OES_depth32"/>
+ <category name="OES_fbo_render_mipmap"/>
+ <category name="OES_rgb8_rgba8"/>
+ <category name="OES_stencil1"/>
+ <category name="OES_stencil4"/>
+ <category name="OES_stencil8"/>
+ <category name="OES_element_index_uint"/>
+ <category name="OES_mapbuffer"/>
+ <category name="EXT_texture_filter_anisotropic"/>
+
+ <category name="ARB_texture_non_power_of_two"/>
+ <!-- disabled due to missing enums
+ <category name="EXT_texture_compression_dxt1"/>
+ <category name="EXT_texture_lod_bias"/>
+ <category name="EXT_blend_minmax"/>
+ -->
+ <category name="EXT_multi_draw_arrays"/>
+
+ <category name="OES_matrix_palette"/>
+
+ <function name="Color4f" template="Color" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="Color4ub" template="Color" gltype="GLubyte" vector_size="4" expand_vector="true"/>
+ <function name="Color4x" template="Color" gltype="GLfixed" vector_size="4" expand_vector="true"/>
+
+ <function name="ClipPlanef" template="ClipPlane" gltype="GLfloat"/>
+ <function name="ClipPlanex" template="ClipPlane" gltype="GLfixed"/>
+
+ <function name="CullFace" template="CullFace"/>
+
+ <function name="Fogf" template="Fog" gltype="GLfloat" expand_vector="true"/>
+ <function name="Fogx" template="Fog" gltype="GLfixed" expand_vector="true"/>
+ <function name="Fogfv" template="Fog" gltype="GLfloat"/>
+ <function name="Fogxv" template="Fog" gltype="GLfixed"/>
+
+ <function name="FrontFace" template="FrontFace"/>
+ <function name="Hint" template="Hint"/>
+
+ <function name="Lightf" template="Light" gltype="GLfloat" expand_vector="true"/>
+ <function name="Lightx" template="Light" gltype="GLfixed" expand_vector="true"/>
+ <function name="Lightfv" template="Light" gltype="GLfloat"/>
+ <function name="Lightxv" template="Light" gltype="GLfixed"/>
+
+ <function name="LightModelf" template="LightModel" gltype="GLfloat" expand_vector="true"/>
+ <function name="LightModelx" template="LightModel" gltype="GLfixed" expand_vector="true"/>
+ <function name="LightModelfv" template="LightModel" gltype="GLfloat"/>
+ <function name="LightModelxv" template="LightModel" gltype="GLfixed"/>
+
+ <function name="LineWidth" template="LineWidth" gltype="GLfloat"/>
+ <function name="LineWidthx" template="LineWidth" gltype="GLfixed"/>
+
+ <function name="Materialf" template="Material" gltype="GLfloat" expand_vector="true"/>
+ <function name="Materialfv" template="Material" gltype="GLfloat"/>
+ <function name="Materialx" template="Material" gltype="GLfixed" expand_vector="true"/>
+ <function name="Materialxv" template="Material" gltype="GLfixed"/>
+
+ <function name="PointSize" template="PointSize" gltype="GLfloat"/>
+ <function name="PointSizex" template="PointSize" gltype="GLfixed"/>
+ <function name="PointSizePointerOES" template="PointSizePointer"/>
+
+ <function name="Scissor" template="Scissor"/>
+ <function name="ShadeModel" template="ShadeModel"/>
+
+ <function name="TexParameterf" template="TexParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexParameterfv" template="TexParameter" gltype="GLfloat"/>
+ <function name="TexParameteri" template="TexParameter" gltype="GLint" expand_vector="true"/>
+ <function name="TexParameteriv" template="TexParameter" gltype="GLint"/>
+ <function name="TexParameterx" template="TexParameter" gltype="GLfixed" expand_vector="true"/>
+ <function name="TexParameterxv" template="TexParameter" gltype="GLfixed"/>
+
+ <function name="TexImage2D" template="TexImage2D"/>
+
+ <function name="TexEnvf" template="TexEnv" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexEnvfv" template="TexEnv" gltype="GLfloat"/>
+ <function name="TexEnvi" template="TexEnv" gltype="GLint" expand_vector="true"/>
+ <function name="TexEnviv" template="TexEnv" gltype="GLint"/>
+ <function name="TexEnvx" template="TexEnv" gltype="GLfixed" expand_vector="true"/>
+ <function name="TexEnvxv" template="TexEnv" gltype="GLfixed"/>
+
+ <function name="TexGenfOES" external="true" template="TexGen" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexGenfvOES" external="true" template="TexGen" gltype="GLfloat"/>
+ <function name="TexGeniOES" external="true" template="TexGen" gltype="GLint" expand_vector="true"/>
+ <function name="TexGenivOES" external="true" template="TexGen" gltype="GLint"/>
+ <function name="TexGenxOES" external="true" template="TexGen" gltype="GLfixed" expand_vector="true"/>
+ <function name="TexGenxvOES" external="true" template="TexGen" gltype="GLfixed"/>
+
+ <function name="Clear" template="Clear"/>
+ <function name="ClearColor" template="ClearColor" gltype="GLclampf"/>
+ <function name="ClearColorx" template="ClearColor" gltype="GLclampx"/>
+
+ <function name="ClearStencil" template="ClearStencil"/>
+ <function name="ClearDepthf" template="ClearDepth" gltype="GLclampf"/>
+ <function name="ClearDepthx" template="ClearDepth" gltype="GLclampx"/>
+
+ <function name="StencilMask" template="StencilMask"/>
+ <function name="ColorMask" template="ColorMask"/>
+ <function name="DepthMask" template="DepthMask"/>
+
+ <function name="Disable" external="true" template="Disable"/>
+ <function name="Enable" external="true" template="Enable"/>
+ <function name="Finish" template="Finish"/>
+ <function name="Flush" template="Flush"/>
+
+ <function name="AlphaFunc" template="AlphaFunc" gltype="GLclampf"/>
+ <function name="AlphaFuncx" template="AlphaFunc" gltype="GLclampx"/>
+
+ <function name="BlendFunc" template="BlendFunc"/>
+ <function name="LogicOp" template="LogicOp"/>
+ <function name="StencilFunc" template="StencilFunc"/>
+
+ <function name="StencilOp" template="StencilOp"/>
+ <function name="DepthFunc" template="DepthFunc"/>
+
+ <function name="PixelStorei" template="PixelStore" gltype="GLint"/>
+ <function name="ReadPixels" template="ReadPixels"/>
+
+ <function name="GetBooleanv" template="GetState" gltype="GLboolean"/>
+
+ <function name="GetClipPlanef" template="GetClipPlane" gltype="GLfloat"/>
+ <function name="GetClipPlanex" template="GetClipPlane" gltype="GLfixed"/>
+
+ <function name="GetError" template="GetError"/>
+ <function name="GetFloatv" template="GetState" gltype="GLfloat"/>
+ <function name="GetFixedv" template="GetState" gltype="GLfixed"/>
+ <function name="GetIntegerv" template="GetState" gltype="GLint"/>
+
+ <function name="GetLightfv" template="GetLight" gltype="GLfloat"/>
+ <function name="GetLightxv" template="GetLight" gltype="GLfixed"/>
+
+ <function name="GetMaterialfv" template="GetMaterial" gltype="GLfloat"/>
+ <function name="GetMaterialxv" template="GetMaterial" gltype="GLfixed"/>
+
+ <function name="GetString" external="true" template="GetString"/>
+
+ <function name="GetTexEnvfv" template="GetTexEnv" gltype="GLfloat"/>
+ <function name="GetTexEnviv" template="GetTexEnv" gltype="GLint"/>
+ <function name="GetTexEnvxv" template="GetTexEnv" gltype="GLfixed"/>
+
+ <function name="GetTexGenfvOES" external="true" template="GetTexGen" gltype="GLfloat"/>
+ <function name="GetTexGenivOES" external="true" template="GetTexGen" gltype="GLint"/>
+ <function name="GetTexGenxvOES" external="true" template="GetTexGen" gltype="GLfixed"/>
+
+ <function name="GetTexParameterfv" template="GetTexParameter" gltype="GLfloat"/>
+ <function name="GetTexParameteriv" template="GetTexParameter" gltype="GLint"/>
+ <function name="GetTexParameterxv" template="GetTexParameter" gltype="GLfixed"/>
+
+ <function name="IsEnabled" external="true" template="IsEnabled"/>
+
+ <function name="DepthRangef" template="DepthRange" gltype="GLclampf"/>
+ <function name="DepthRangex" template="DepthRange" gltype="GLclampx"/>
+
+ <function name="Frustumf" template="Frustum" gltype="GLfloat"/>
+ <function name="Frustumx" template="Frustum" gltype="GLfixed"/>
+
+ <function name="LoadIdentity" template="LoadIdentity"/>
+ <function name="LoadMatrixf" template="LoadMatrix" gltype="GLfloat"/>
+ <function name="LoadMatrixx" template="LoadMatrix" gltype="GLfixed"/>
+ <function name="MatrixMode" template="MatrixMode"/>
+
+ <function name="MultMatrixf" template="MultMatrix" gltype="GLfloat"/>
+ <function name="MultMatrixx" template="MultMatrix" gltype="GLfixed"/>
+ <function name="Orthof" template="Ortho" gltype="GLfloat"/>
+ <function name="Orthox" template="Ortho" gltype="GLfixed"/>
+
+ <function name="PopMatrix" template="PopMatrix"/>
+ <function name="PushMatrix" template="PushMatrix"/>
+
+ <function name="Rotatef" template="Rotate" gltype="GLfloat"/>
+ <function name="Rotatex" template="Rotate" gltype="GLfixed"/>
+ <function name="Scalef" template="Scale" gltype="GLfloat"/>
+ <function name="Scalex" template="Scale" gltype="GLfixed"/>
+ <function name="Translatef" template="Translate" gltype="GLfloat"/>
+ <function name="Translatex" template="Translate" gltype="GLfixed"/>
+
+ <function name="Viewport" template="Viewport"/>
+ <function name="ColorPointer" template="ColorPointer"/>
+ <function name="DisableClientState" template="DisableClientState"/>
+ <function name="DrawArrays" template="DrawArrays"/>
+ <function name="DrawElements" template="DrawElements"/>
+ <function name="EnableClientState" template="EnableClientState"/>
+
+ <function name="GetPointerv" template="GetPointer"/>
+
+ <function name="Normal3f" template="Normal" gltype="GLfloat" expand_vector="true"/>
+ <function name="Normal3x" template="Normal" gltype="GLfixed" expand_vector="true"/>
+ <function name="NormalPointer" template="NormalPointer"/>
+ <function name="TexCoordPointer" template="TexCoordPointer"/>
+ <function name="VertexPointer" template="VertexPointer"/>
+
+ <function name="PolygonOffset" template="PolygonOffset" gltype="GLfloat"/>
+ <function name="PolygonOffsetx" template="PolygonOffset" gltype="GLfixed"/>
+
+ <function name="CopyTexImage2D" template="CopyTexImage2D"/>
+ <function name="CopyTexSubImage2D" template="CopyTexSubImage2D"/>
+
+ <function name="TexSubImage2D" template="TexSubImage2D"/>
+
+ <function name="BindTexture" template="BindTexture"/>
+ <function name="DeleteTextures" template="DeleteTextures"/>
+ <function name="GenTextures" template="GenTextures"/>
+ <function name="IsTexture" template="IsTexture"/>
+
+ <function name="BlendEquationOES" template="BlendEquation"/>
+ <function name="BlendEquationSeparateOES" template="BlendEquationSeparate"/>
+
+ <function name="MultiTexCoord4x" template="MultiTexCoord" gltype="GLfixed" vector_size="4" expand_vector="true"/>
+
+ <function name="ActiveTexture" template="ActiveTexture"/>
+ <function name="ClientActiveTexture" template="ClientActiveTexture"/>
+
+ <function name="MultiTexCoord4f" template="MultiTexCoord" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+
+ <function name="SampleCoverage" template="SampleCoverage" gltype="GLclampf"/>
+ <function name="SampleCoveragex" template="SampleCoverage" gltype="GLclampx"/>
+
+ <!-- CompressedTexImage2D calls out to two different functions based on
+ whether the image is a paletted image or not -->
+ <function name="CompressedTexImage2D" external="true" template="CompressedTexImage2D"/>
+ <function name="CompressedTexSubImage2D" template="CompressedTexSubImage2D"/>
+
+ <function name="BlendFuncSeparateOES" template="BlendFuncSeparate"/>
+
+ <function name="PointParameterf" template="PointParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="PointParameterfv" template="PointParameter" gltype="GLfloat"/>
+ <function name="PointParameterx" template="PointParameter" gltype="GLfixed" expand_vector="true"/>
+ <function name="PointParameterxv" template="PointParameter" gltype="GLfixed"/>
+
+ <!-- OES_mapbuffer -->
+ <function name="GetBufferPointervOES" template="GetBufferPointer"/>
+ <function name="MapBufferOES" template="MapBuffer"/>
+ <function name="UnmapBufferOES" template="UnmapBuffer"/>
+
+ <function name="BindBuffer" template="BindBuffer"/>
+ <function name="BufferData" template="BufferData"/>
+ <function name="BufferSubData" template="BufferSubData"/>
+ <function name="DeleteBuffers" template="DeleteBuffers"/>
+ <function name="GenBuffers" template="GenBuffers"/>
+ <function name="GetBufferParameteriv" template="GetBufferParameter" gltype="GLint"/>
+ <function name="IsBuffer" template="IsBuffer"/>
+
+ <!-- OES_framebuffer_object -->
+ <function name="GenerateMipmapOES" template="GenerateMipmap"/>
+ <function name="BindFramebufferOES" template="BindFramebuffer"/>
+ <function name="DeleteFramebuffersOES" template="DeleteFramebuffers"/>
+ <function name="GenFramebuffersOES" template="GenFramebuffers"/>
+ <function name="BindRenderbufferOES" template="BindRenderbuffer"/>
+ <function name="DeleteRenderbuffersOES" template="DeleteRenderbuffers"/>
+ <function name="GenRenderbuffersOES" template="GenRenderbuffers"/>
+ <function name="RenderbufferStorageOES" external="true" template="RenderbufferStorage"/>
+ <function name="FramebufferRenderbufferOES" template="FramebufferRenderbuffer"/>
+ <function name="FramebufferTexture2DOES" template="FramebufferTexture2D"/>
+ <function name="CheckFramebufferStatusOES" template="CheckFramebufferStatus"/>
+ <function name="GetFramebufferAttachmentParameterivOES" template="GetFramebufferAttachmentParameter" gltype="GLint"/>
+ <function name="GetRenderbufferParameterivOES" template="GetRenderbufferParameter" gltype="GLint"/>
+ <function name="IsRenderbufferOES" template="IsRenderbuffer"/>
+ <function name="IsFramebufferOES" template="IsFramebuffer"/>
+
+ <!-- OES_query_matrix -->
+ <!-- QueryMatrixx returns values in an unusual, decomposed, fixed-value
+ form; it has its own code for this -->
+ <function name="QueryMatrixxOES" external="true" template="QueryMatrix" gltype="GLfixed"/>
+
+ <!-- OES_draw_texture -->
+ <function name="DrawTexfOES" template="DrawTex" gltype="GLfloat" expand_vector="true"/>
+ <function name="DrawTexiOES" template="DrawTex" gltype="GLint" expand_vector="true"/>
+ <function name="DrawTexsOES" template="DrawTex" gltype="GLshort" expand_vector="true"/>
+ <function name="DrawTexxOES" template="DrawTex" gltype="GLfixed" expand_vector="true"/>
+ <function name="DrawTexfvOES" template="DrawTex" gltype="GLfloat"/>
+ <function name="DrawTexivOES" template="DrawTex" gltype="GLint"/>
+ <function name="DrawTexsvOES" template="DrawTex" gltype="GLshort"/>
+ <function name="DrawTexxvOES" template="DrawTex" gltype="GLfixed"/>
+
+ <!-- EXT_multi_draw_arrays -->
+ <function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
+ <function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+</api>
+
+<api name="GLES2.0">
+ <category name="GLES2.0"/>
+
+ <category name="OES_compressed_paletted_texture"/>
+ <category name="OES_depth24"/>
+ <category name="OES_depth32"/>
+ <category name="OES_fbo_render_mipmap"/>
+ <category name="OES_rgb8_rgba8"/>
+ <category name="OES_stencil1"/>
+ <category name="OES_stencil4"/>
+ <category name="OES_element_index_uint"/>
+ <category name="OES_mapbuffer"/>
+ <category name="OES_texture_3D"/>
+ <category name="OES_texture_npot"/>
+ <category name="EXT_texture_filter_anisotropic"/>
+ <category name="EXT_texture_type_2_10_10_10_REV"/>
+ <category name="OES_depth_texture"/>
+ <category name="OES_packed_depth_stencil"/>
+ <category name="OES_standard_derivatives"/>
+
+ <!-- disabled due to missing enums
+ <category name="EXT_texture_compression_dxt1"/>
+ <category name="EXT_blend_minmax"/>
+ -->
+ <category name="EXT_multi_draw_arrays"/>
+
+ <function name="CullFace" template="CullFace"/>
+
+ <function name="FrontFace" template="FrontFace"/>
+ <function name="Hint" template="Hint"/>
+
+ <function name="LineWidth" template="LineWidth" gltype="GLfloat"/>
+
+ <function name="Scissor" template="Scissor"/>
+
+ <function name="TexParameterf" template="TexParameter" gltype="GLfloat" expand_vector="true"/>
+ <function name="TexParameterfv" template="TexParameter" gltype="GLfloat"/>
+ <function name="TexParameteri" template="TexParameter" gltype="GLint" expand_vector="true"/>
+ <function name="TexParameteriv" template="TexParameter" gltype="GLint"/>
+
+ <function name="TexImage2D" template="TexImage2D"/>
+
+ <function name="Clear" template="Clear"/>
+ <function name="ClearColor" template="ClearColor" gltype="GLclampf"/>
+ <function name="ClearStencil" template="ClearStencil"/>
+ <function name="ClearDepthf" template="ClearDepth" gltype="GLclampf"/>
+
+ <function name="StencilMask" template="StencilMask"/>
+ <function name="StencilMaskSeparate" template="StencilMaskSeparate"/>
+ <function name="ColorMask" template="ColorMask"/>
+ <function name="DepthMask" template="DepthMask"/>
+ <function name="Disable" template="Disable"/>
+ <function name="Enable" template="Enable"/>
+ <function name="Finish" template="Finish"/>
+ <function name="Flush" template="Flush"/>
+
+ <function name="BlendFunc" template="BlendFunc"/>
+
+ <function name="StencilFunc" template="StencilFunc"/>
+ <function name="StencilFuncSeparate" template="StencilFuncSeparate"/>
+ <function name="StencilOp" template="StencilOp"/>
+ <function name="StencilOpSeparate" template="StencilOpSeparate"/>
+
+ <function name="DepthFunc" template="DepthFunc"/>
+
+ <function name="PixelStorei" template="PixelStore" gltype="GLint"/>
+ <function name="ReadPixels" template="ReadPixels"/>
+
+ <function name="GetBooleanv" template="GetState" gltype="GLboolean"/>
+ <function name="GetError" template="GetError"/>
+ <function name="GetFloatv" template="GetState" gltype="GLfloat"/>
+ <function name="GetIntegerv" template="GetState" gltype="GLint"/>
+
+ <function name="GetString" external="true" template="GetString"/>
+
+ <function name="GetTexParameterfv" template="GetTexParameter" gltype="GLfloat"/>
+ <function name="GetTexParameteriv" template="GetTexParameter" gltype="GLint"/>
+
+ <function name="IsEnabled" template="IsEnabled"/>
+
+ <function name="DepthRangef" template="DepthRange" gltype="GLclampf"/>
+
+ <function name="Viewport" template="Viewport"/>
+
+ <function name="DrawArrays" template="DrawArrays"/>
+ <function name="DrawElements" template="DrawElements"/>
+
+ <function name="PolygonOffset" template="PolygonOffset" gltype="GLfloat"/>
+ <function name="CopyTexImage2D" template="CopyTexImage2D"/>
+ <function name="CopyTexSubImage2D" template="CopyTexSubImage2D"/>
+ <function name="TexSubImage2D" template="TexSubImage2D"/>
+
+ <function name="BindTexture" template="BindTexture"/>
+ <function name="DeleteTextures" template="DeleteTextures"/>
+ <function name="GenTextures" template="GenTextures"/>
+ <function name="IsTexture" template="IsTexture"/>
+
+ <function name="BlendColor" template="BlendColor" gltype="GLclampf"/>
+ <function name="BlendEquation" template="BlendEquation"/>
+ <function name="BlendEquationSeparate" template="BlendEquationSeparate"/>
+
+ <function name="TexImage3DOES" template="TexImage3D"/>
+ <function name="TexSubImage3DOES" template="TexSubImage3D"/>
+ <function name="CopyTexSubImage3DOES" template="CopyTexSubImage3D"/>
+
+ <function name="CompressedTexImage3DOES" template="CompressedTexImage3D"/>
+ <function name="CompressedTexSubImage3DOES" template="CompressedTexSubImage3D"/>
+
+ <function name="ActiveTexture" template="ActiveTexture"/>
+
+ <function name="SampleCoverage" template="SampleCoverage" gltype="GLclampf"/>
+
+ <function name="CompressedTexImage2D" external="true" template="CompressedTexImage2D"/>
+ <function name="CompressedTexSubImage2D" template="CompressedTexSubImage2D"/>
+
+ <function name="BlendFuncSeparate" template="BlendFuncSeparate"/>
+
+ <function name="VertexAttrib1f" template="VertexAttrib" gltype="GLfloat" vector_size="1" expand_vector="true"/>
+ <function name="VertexAttrib2f" template="VertexAttrib" gltype="GLfloat" vector_size="2" expand_vector="true"/>
+ <function name="VertexAttrib3f" template="VertexAttrib" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+ <function name="VertexAttrib4f" template="VertexAttrib" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="VertexAttrib1fv" template="VertexAttrib" gltype="GLfloat" vector_size="1"/>
+ <function name="VertexAttrib2fv" template="VertexAttrib" gltype="GLfloat" vector_size="2"/>
+ <function name="VertexAttrib3fv" template="VertexAttrib" gltype="GLfloat" vector_size="3"/>
+ <function name="VertexAttrib4fv" template="VertexAttrib" gltype="GLfloat" vector_size="4"/>
+
+ <function name="VertexAttribPointer" template="VertexAttribPointer"/>
+
+ <function name="EnableVertexAttribArray" template="EnableVertexAttribArray"/>
+ <function name="DisableVertexAttribArray" template="DisableVertexAttribArray"/>
+
+ <function name="IsProgram" template="IsProgram"/>
+ <function name="GetProgramiv" template="GetProgram" gltype="GLint"/>
+
+ <function name="GetVertexAttribfv" template="GetVertexAttrib" gltype="GLfloat"/>
+ <function name="GetVertexAttribiv" template="GetVertexAttrib" gltype="GLint"/>
+ <function name="GetVertexAttribPointerv" template="GetVertexAttribPointer"/>
+
+ <function name="GetBufferPointervOES" template="GetBufferPointer"/>
+ <function name="MapBufferOES" template="MapBuffer"/>
+ <function name="UnmapBufferOES" template="UnmapBuffer"/>
+ <function name="BindBuffer" template="BindBuffer"/>
+ <function name="BufferData" template="BufferData"/>
+ <function name="BufferSubData" template="BufferSubData"/>
+ <function name="DeleteBuffers" template="DeleteBuffers"/>
+ <function name="GenBuffers" template="GenBuffers"/>
+ <function name="GetBufferParameteriv" template="GetBufferParameter" gltype="GLint"/>
+ <function name="IsBuffer" template="IsBuffer"/>
+
+ <function name="CreateShader" template="CreateShader"/>
+ <function name="ShaderSource" template="ShaderSource"/>
+ <function name="CompileShader" template="CompileShader"/>
+ <function name="ReleaseShaderCompiler" template="ReleaseShaderCompiler"/>
+ <function name="DeleteShader" template="DeleteShader"/>
+ <function name="ShaderBinary" template="ShaderBinary"/>
+ <function name="CreateProgram" template="CreateProgram"/>
+ <function name="AttachShader" template="AttachShader"/>
+ <function name="DetachShader" template="DetachShader"/>
+ <function name="LinkProgram" template="LinkProgram"/>
+ <function name="UseProgram" template="UseProgram"/>
+ <function name="DeleteProgram" template="DeleteProgram"/>
+
+ <function name="GetActiveAttrib" template="GetActiveAttrib"/>
+ <function name="GetAttribLocation" template="GetAttribLocation"/>
+ <function name="BindAttribLocation" template="BindAttribLocation"/>
+ <function name="GetUniformLocation" template="GetUniformLocation"/>
+ <function name="GetActiveUniform" template="GetActiveUniform"/>
+
+ <function name="Uniform1f" template="Uniform" gltype="GLfloat" vector_size="1" expand_vector="true"/>
+ <function name="Uniform2f" template="Uniform" gltype="GLfloat" vector_size="2" expand_vector="true"/>
+ <function name="Uniform3f" template="Uniform" gltype="GLfloat" vector_size="3" expand_vector="true"/>
+ <function name="Uniform4f" template="Uniform" gltype="GLfloat" vector_size="4" expand_vector="true"/>
+ <function name="Uniform1i" template="Uniform" gltype="GLint" vector_size="1" expand_vector="true"/>
+ <function name="Uniform2i" template="Uniform" gltype="GLint" vector_size="2" expand_vector="true"/>
+ <function name="Uniform3i" template="Uniform" gltype="GLint" vector_size="3" expand_vector="true"/>
+ <function name="Uniform4i" template="Uniform" gltype="GLint" vector_size="4" expand_vector="true"/>
+
+ <function name="Uniform1fv" template="Uniform" gltype="GLfloat" vector_size="1"/>
+ <function name="Uniform2fv" template="Uniform" gltype="GLfloat" vector_size="2"/>
+ <function name="Uniform3fv" template="Uniform" gltype="GLfloat" vector_size="3"/>
+ <function name="Uniform4fv" template="Uniform" gltype="GLfloat" vector_size="4"/>
+ <function name="Uniform1iv" template="Uniform" gltype="GLint" vector_size="1"/>
+ <function name="Uniform2iv" template="Uniform" gltype="GLint" vector_size="2"/>
+ <function name="Uniform3iv" template="Uniform" gltype="GLint" vector_size="3"/>
+ <function name="Uniform4iv" template="Uniform" gltype="GLint" vector_size="4"/>
+
+ <function name="UniformMatrix2fv" template="UniformMatrix" gltype="GLfloat" vector_size="2"/>
+ <function name="UniformMatrix3fv" template="UniformMatrix" gltype="GLfloat" vector_size="3"/>
+ <function name="UniformMatrix4fv" template="UniformMatrix" gltype="GLfloat" vector_size="4"/>
+
+ <function name="ValidateProgram" template="ValidateProgram"/>
+
+ <function name="GenerateMipmap" template="GenerateMipmap"/>
+ <function name="BindFramebuffer" template="BindFramebuffer"/>
+ <function name="DeleteFramebuffers" template="DeleteFramebuffers"/>
+ <function name="GenFramebuffers" template="GenFramebuffers"/>
+ <function name="BindRenderbuffer" template="BindRenderbuffer"/>
+ <function name="DeleteRenderbuffers" template="DeleteRenderbuffers"/>
+ <function name="GenRenderbuffers" template="GenRenderbuffers"/>
+ <function name="RenderbufferStorage" external="true" template="RenderbufferStorage"/>
+ <function name="FramebufferRenderbuffer" template="FramebufferRenderbuffer"/>
+ <function name="FramebufferTexture2D" template="FramebufferTexture2D"/>
+ <function name="FramebufferTexture3DOES" template="FramebufferTexture3D"/>
+ <function name="CheckFramebufferStatus" template="CheckFramebufferStatus"/>
+ <function name="GetFramebufferAttachmentParameteriv" template="GetFramebufferAttachmentParameter" gltype="GLint"/>
+ <function name="GetRenderbufferParameteriv" template="GetRenderbufferParameter" gltype="GLint"/>
+ <function name="IsRenderbuffer" template="IsRenderbuffer"/>
+ <function name="IsFramebuffer" template="IsFramebuffer"/>
+
+ <function name="IsShader" template="IsShader"/>
+ <function name="GetShaderiv" template="GetShader" gltype="GLint"/>
+ <function name="GetAttachedShaders" template="GetAttachedShaders"/>
+ <function name="GetShaderInfoLog" template="GetShaderInfoLog"/>
+ <function name="GetProgramInfoLog" template="GetProgramInfoLog"/>
+ <function name="GetShaderSource" template="GetShaderSource"/>
+ <function name="GetShaderPrecisionFormat" template="GetShaderPrecisionFormat"/>
+ <function name="GetUniformfv" template="GetUniform" gltype="GLfloat"/>
+ <function name="GetUniformiv" template="GetUniform" gltype="GLint"/>
+
+ <!-- EXT_multi_draw_arrays -->
+ <function name="MultiDrawArraysEXT" template="MultiDrawArrays"/>
+ <function name="MultiDrawElementsEXT" template="MultiDrawElements"/>
+</api>
+
+</apispec>
diff --git a/src/mesa/es/main/APIspecutil.py b/src/mesa/es/main/APIspecutil.py
new file mode 100644
index 00000000000..27a8fe8a6d4
--- /dev/null
+++ b/src/mesa/es/main/APIspecutil.py
@@ -0,0 +1,265 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# on the rights to use, copy, modify, merge, publish, distribute, sub
+# license, and/or sell copies of the Software, and to permit persons to whom
+# the Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+"""
+Minimal apiutil.py interface for use by es_generator.py.
+"""
+
+import sys
+import libxml2
+
+import APIspec
+
+__spec = {}
+__functions = {}
+__aliases = {}
+
+def _ParseXML(filename, apiname):
+ conversions = {
+ # from to
+ 'GLfloat': [ 'GLdouble' ],
+ 'GLclampf': [ 'GLclampd' ],
+ 'GLubyte': [ 'GLfloat', 'GLdouble' ],
+ 'GLint': [ 'GLfloat', 'GLdouble' ],
+ 'GLfixed': [ 'GLfloat', 'GLdouble' ],
+ 'GLclampx': [ 'GLclampf', 'GLclampd' ],
+ }
+
+ doc = libxml2.readFile(filename, None,
+ libxml2.XML_PARSE_DTDLOAD +
+ libxml2.XML_PARSE_DTDVALID +
+ libxml2.XML_PARSE_NOBLANKS)
+ spec = APIspec.Spec(doc)
+ impl = spec.get_impl()
+ api = spec.get_api(apiname)
+ doc.freeDoc()
+
+ __spec["impl"] = impl
+ __spec["api"] = api
+
+ for func in api.functions:
+ alias, need_conv = impl.match(func, conversions)
+ if not alias:
+ # external functions are manually dispatched
+ if not func.is_external:
+ print >>sys.stderr, "Error: unable to dispatch %s" % func.name
+ alias = func
+ need_conv = False
+
+ __functions[func.name] = func
+ __aliases[func.name] = (alias, need_conv)
+
+
+def AllSpecials(notused=None):
+ """Return a list of all external functions in the API."""
+ api = __spec["api"]
+
+ specials = []
+ for func in api.functions:
+ if func.is_external:
+ specials.append(func.name)
+
+ return specials
+
+
+def GetAllFunctions(filename, api):
+ """Return sorted list of all functions in the API."""
+ if not __spec:
+ _ParseXML(filename, api)
+
+ api = __spec["api"]
+ names = []
+ for func in api.functions:
+ names.append(func.name)
+ names.sort()
+ return names
+
+
+def ReturnType(funcname):
+ """Return the C return type of named function."""
+ func = __functions[funcname]
+ return func.return_type
+
+
+def Properties(funcname):
+ """Return list of properties of the named GL function."""
+ func = __functions[funcname]
+ return [func.direction]
+
+
+def _ValidValues(func, param):
+ """Return the valid values of a parameter."""
+ valid_values = []
+ switch = func.checker.switches.get(param.name, [])
+ for desc in switch:
+ # no dependent vector
+ if not desc.checker.switches:
+ for val in desc.values:
+ valid_values.append((val, None, None, [], desc.error, None))
+ continue
+
+ items = desc.checker.switches.items()
+ if len(items) > 1:
+ print >>sys.stderr, "%s: more than one parameter depend on %s" % \
+ (func.name, desc.name)
+ dep_name, dep_switch = items[0]
+
+ for dep_desc in dep_switch:
+ if dep_desc.index >= 0 and dep_desc.index != 0:
+ print >>sys.stderr, "%s: not first element of a vector" % func.name
+ if dep_desc.checker.switches:
+ print >>sys.stderr, "%s: deep nested dependence" % func.name
+
+ convert = None if dep_desc.convert else "noconvert"
+ for val in desc.values:
+ valid_values.append((val, dep_desc.size_str, dep_desc.name,
+ dep_desc.values, dep_desc.error, convert))
+ return valid_values
+
+
+def _Conversion(func, src_param):
+ """Return the destination type of the conversion, or None."""
+ alias, need_conv = __aliases[func.name]
+ if need_conv:
+ dst_param = alias.get_param(src_param.name)
+ if src_param.type == dst_param.type:
+ need_conv = False
+ if not need_conv:
+ return (None, "none")
+
+ converts = { True: 0, False: 0 }
+
+ # In Fogx, for example, pname may be GL_FOG_DENSITY/GL_FOG_START/GL_FOG_END
+ # or GL_FOG_MODE. In the former three cases, param is not checked and the
+ # default is to convert.
+ if not func.checker.always_check(src_param.name):
+ converts[True] += 1
+
+ for desc in func.checker.flatten(src_param.name):
+ converts[desc.convert] += 1
+ if converts[True] and converts[False]:
+ break
+
+ # it should be "never", "sometimes", and "always"...
+ if converts[False]:
+ if converts[True]:
+ conversion = "some"
+ else:
+ conversion = "none"
+ else:
+ conversion = "all"
+
+ return (dst_param.base_type(), conversion)
+
+
+def _MaxVecSize(func, param):
+ """Return the largest possible size of a vector."""
+ if not param.is_vector:
+ return 0
+ if param.size:
+ return param.size
+
+ # need to look at all descriptions
+ size = 0
+ for desc in func.checker.flatten(param.name):
+ if desc.size_str and desc.size_str.isdigit():
+ s = int(desc.size_str)
+ if s > size:
+ size = s
+ if not size:
+ need_conv = __aliases[func.name][1]
+ if need_conv:
+ print >>sys.stderr, \
+ "Error: unable to dicide the max size of %s in %s" % \
+ (param.name, func.name)
+ return size
+
+
+def _ParameterTuple(func, param):
+ """Return a parameter tuple.
+
+ [0] -- parameter name
+ [1] -- parameter type
+ [2] -- max vector size or 0
+ [3] -- dest type the parameter converts to, or None
+ [4] -- valid values
+ [5] -- how often does the conversion happen
+
+ """
+ vec_size = _MaxVecSize(func, param)
+ dst_type, conversion = _Conversion(func, param)
+ valid_values = _ValidValues(func, param)
+
+ return (param.name, param.type, vec_size, dst_type, valid_values, conversion)
+
+
+def Parameters(funcname):
+ """Return list of tuples of function parameters."""
+ func = __functions[funcname]
+ params = []
+ for param in func.params:
+ params.append(_ParameterTuple(func, param))
+
+ return params
+
+
+def FindParamIndex(params, paramname):
+ """Find the index of a named parameter."""
+ for i in xrange(len(params)):
+ if params[i][0] == paramname:
+ return i
+ return None
+
+
+def MakeDeclarationString(params):
+ """Return a C-style parameter declaration string."""
+ string = []
+ for p in params:
+ sep = "" if p[1].endswith("*") else " "
+ string.append("%s%s%s" % (p[1], sep, p[0]))
+ if not string:
+ return "void"
+ return ", ".join(string)
+
+
+def AliasPrefix(funcname):
+ """Return the prefix of the function the named function is an alias of."""
+ alias = __aliases[funcname][0]
+ return alias.prefix
+
+
+def Alias(funcname):
+ """Return the name of the function the named function is an alias of."""
+ alias, need_conv = __aliases[funcname]
+ return alias.name if not need_conv else None
+
+
+def ConversionFunction(funcname):
+ """Return the name of the function the named function converts to."""
+ alias, need_conv = __aliases[funcname]
+ return alias.name if need_conv else None
+
+
+def Categories(funcname):
+ """Return all the categories of the named GL function."""
+ api = __spec["api"]
+ return [api.name]
diff --git a/src/mesa/es/main/drawtex.c b/src/mesa/es/main/drawtex.c
new file mode 100644
index 00000000000..cbd41ca9759
--- /dev/null
+++ b/src/mesa/es/main/drawtex.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "drawtex.h"
+#include "main/state.h"
+#include "main/imports.h"
+
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_OES_draw_texture
+
+
+static void
+draw_texture(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
+ GLfloat width, GLfloat height)
+{
+ if (!ctx->Extensions.OES_draw_texture) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glDrawTex(unsupported)");
+ return;
+ }
+ if (width <= 0.0f || height <= 0.0f) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glDrawTex(width or height <= 0)");
+ return;
+ }
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+
+ ASSERT(ctx->Driver.DrawTex);
+ ctx->Driver.DrawTex(ctx, x, y, z, width, height);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, x, y, z, width, height);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexfv(const GLfloat *coords)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, coords[0], coords[1], coords[2], coords[3], coords[4]);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexi(GLint x, GLint y, GLint z, GLint width, GLint height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, (GLfloat) x, (GLfloat) y, (GLfloat) z,
+ (GLfloat) width, (GLfloat) height);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexiv(const GLint *coords)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, (GLfloat) coords[0], (GLfloat) coords[1],
+ (GLfloat) coords[2], (GLfloat) coords[3], (GLfloat) coords[4]);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexs(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, (GLfloat) x, (GLfloat) y, (GLfloat) z,
+ (GLfloat) width, (GLfloat) height);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexsv(const GLshort *coords)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx, (GLfloat) coords[0], (GLfloat) coords[1],
+ (GLfloat) coords[2], (GLfloat) coords[3], (GLfloat) coords[4]);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexx(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx,
+ (GLfloat) x / 65536.0f,
+ (GLfloat) y / 65536.0f,
+ (GLfloat) z / 65536.0f,
+ (GLfloat) width / 65536.0f,
+ (GLfloat) height / 65536.0f);
+}
+
+
+void GLAPIENTRY
+_mesa_DrawTexxv(const GLfixed *coords)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ draw_texture(ctx,
+ (GLfloat) coords[0] / 65536.0f,
+ (GLfloat) coords[1] / 65536.0f,
+ (GLfloat) coords[2] / 65536.0f,
+ (GLfloat) coords[3] / 65536.0f,
+ (GLfloat) coords[4] / 65536.0f);
+}
+
+
+void
+_mesa_init_drawtex_dispatch(struct _glapi_table *disp)
+{
+ SET_DrawTexfOES(disp, _mesa_DrawTexf);
+ SET_DrawTexfvOES(disp, _mesa_DrawTexfv);
+ SET_DrawTexiOES(disp, _mesa_DrawTexi);
+ SET_DrawTexivOES(disp, _mesa_DrawTexiv);
+ SET_DrawTexsOES(disp, _mesa_DrawTexs);
+ SET_DrawTexsvOES(disp, _mesa_DrawTexsv);
+ SET_DrawTexxOES(disp, _mesa_DrawTexx);
+ SET_DrawTexxvOES(disp, _mesa_DrawTexxv);
+}
+
+
+#endif /* FEATURE_OES_draw_texture */
diff --git a/src/mesa/es/main/drawtex.h b/src/mesa/es/main/drawtex.h
new file mode 100644
index 00000000000..0f3bac38c77
--- /dev/null
+++ b/src/mesa/es/main/drawtex.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef DRAWTEX_H
+#define DRAWTEX_H
+
+
+#include "main/mtypes.h"
+
+
+#if FEATURE_OES_draw_texture
+
+#define _MESA_INIT_DRAWTEX_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->DrawTex = impl ## DrawTex; \
+ } while (0)
+
+extern void GLAPIENTRY
+_mesa_DrawTexf(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height);
+
+extern void GLAPIENTRY
+_mesa_DrawTexfv(const GLfloat *coords);
+
+extern void GLAPIENTRY
+_mesa_DrawTexi(GLint x, GLint y, GLint z, GLint width, GLint height);
+
+extern void GLAPIENTRY
+_mesa_DrawTexiv(const GLint *coords);
+
+extern void GLAPIENTRY
+_mesa_DrawTexs(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height);
+
+extern void GLAPIENTRY
+_mesa_DrawTexsv(const GLshort *coords);
+
+extern void GLAPIENTRY
+_mesa_DrawTexx(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height);
+
+extern void GLAPIENTRY
+_mesa_DrawTexxv(const GLfixed *coords);
+
+extern void
+_mesa_init_drawtex_dispatch(struct _glapi_table *disp);
+
+#else /* FEATURE_OES_draw_texture */
+
+#define _MESA_INIT_DRAWTEX_FUNCTIONS(driver, impl) do { } while (0)
+
+static INLINE void
+_mesa_init_drawtex_dispatch(struct _glapi_table *disp)
+{
+}
+
+#endif /* FEATURE_OES_draw_texture */
+
+
+#endif /* DRAWTEX_H */
diff --git a/src/mesa/es/main/es_cpaltex.c b/src/mesa/es/main/es_cpaltex.c
new file mode 100644
index 00000000000..0c497774ff8
--- /dev/null
+++ b/src/mesa/es/main/es_cpaltex.c
@@ -0,0 +1,231 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ **************************************************************************/
+
+
+/**
+ * Code to convert compressed/paletted texture images to ordinary images.
+ * See the GL_OES_compressed_paletted_texture spec at
+ * http://khronos.org/registry/gles/extensions/OES/OES_compressed_paletted_texture.txt
+ *
+ * XXX this makes it impossible to add hardware support...
+ */
+
+
+#include "GLES/gl.h"
+#include "GLES/glext.h"
+
+#include "main/compiler.h" /* for ASSERT */
+
+
+void GL_APIENTRY _es_CompressedTexImage2DARB(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+
+void GL_APIENTRY _mesa_GetIntegerv(GLenum pname, GLint *params);
+void GL_APIENTRY _mesa_PixelStorei(GLenum pname, GLint param);
+void GL_APIENTRY _mesa_TexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+void GL_APIENTRY _mesa_CompressedTexImage2DARB(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+
+void *_mesa_get_current_context(void);
+void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... );
+
+
+static const struct cpal_format_info {
+ GLenum cpal_format;
+ GLenum format;
+ GLenum type;
+ GLuint palette_size;
+ GLuint size;
+} formats[] = {
+ { GL_PALETTE4_RGB8_OES, GL_RGB, GL_UNSIGNED_BYTE, 16, 3 },
+ { GL_PALETTE4_RGBA8_OES, GL_RGBA, GL_UNSIGNED_BYTE, 16, 4 },
+ { GL_PALETTE4_R5_G6_B5_OES, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 16, 2 },
+ { GL_PALETTE4_RGBA4_OES, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, 16, 2 },
+ { GL_PALETTE4_RGB5_A1_OES, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, 16, 2 },
+ { GL_PALETTE8_RGB8_OES, GL_RGB, GL_UNSIGNED_BYTE, 256, 3 },
+ { GL_PALETTE8_RGBA8_OES, GL_RGBA, GL_UNSIGNED_BYTE, 256, 4 },
+ { GL_PALETTE8_R5_G6_B5_OES, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, 256, 2 },
+ { GL_PALETTE8_RGBA4_OES, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, 256, 2 },
+ { GL_PALETTE8_RGB5_A1_OES, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, 256, 2 }
+};
+
+
+/**
+ * Get a color/entry from the palette.
+ */
+static GLuint
+get_palette_entry(const struct cpal_format_info *info, const GLubyte *palette,
+ GLuint index, GLubyte *pixel)
+{
+ memcpy(pixel, palette + info->size * index, info->size);
+ return info->size;
+}
+
+
+/**
+ * Convert paletted texture to color texture.
+ */
+static void
+paletted_to_color(const struct cpal_format_info *info, const GLubyte *palette,
+ const void *indices, GLuint num_pixels, GLubyte *image)
+{
+ GLubyte *pix = image;
+ GLuint remain, i;
+
+ if (info->palette_size == 16) {
+ /* 4 bits per index */
+ const GLubyte *ind = (const GLubyte *) indices;
+
+ /* two pixels per iteration */
+ remain = num_pixels % 2;
+ for (i = 0; i < num_pixels / 2; i++) {
+ pix += get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix);
+ pix += get_palette_entry(info, palette, ind[i] & 0xf, pix);
+ }
+ if (remain) {
+ get_palette_entry(info, palette, (ind[i] >> 4) & 0xf, pix);
+ }
+ }
+ else {
+ /* 8 bits per index */
+ const GLubyte *ind = (const GLubyte *) indices;
+ for (i = 0; i < num_pixels; i++)
+ pix += get_palette_entry(info, palette, ind[i], pix);
+ }
+}
+
+
+static const struct cpal_format_info *
+cpal_get_info(GLint level, GLenum internalFormat,
+ GLsizei width, GLsizei height, GLsizei imageSize)
+{
+ const struct cpal_format_info *info;
+ GLint lvl, num_levels;
+ GLsizei w, h, expect_size;
+
+ info = &formats[internalFormat - GL_PALETTE4_RGB8_OES];
+ ASSERT(info->cpal_format == internalFormat);
+
+ if (level > 0) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE,
+ "glCompressedTexImage2D(level=%d)", level);
+ return NULL;
+ }
+
+ num_levels = -level + 1;
+ expect_size = info->palette_size * info->size;
+ for (lvl = 0; lvl < num_levels; lvl++) {
+ w = width >> lvl;
+ if (!w)
+ w = 1;
+ h = height >> lvl;
+ if (!h)
+ h = 1;
+
+ if (info->palette_size == 16)
+ expect_size += (w * h + 1) / 2;
+ else
+ expect_size += w * h;
+ }
+ if (expect_size > imageSize) {
+ _mesa_error(_mesa_get_current_context(), GL_INVALID_VALUE,
+ "glCompressedTexImage2D(imageSize=%d)", imageSize);
+ return NULL;
+ }
+ return info;
+}
+
+/**
+ * Convert a call to glCompressedTexImage2D() where internalFormat is a
+ * compressed palette format into a regular GLubyte/RGBA glTexImage2D() call.
+ */
+static void
+cpal_compressed_teximage2d(GLenum target, GLint level, GLenum internalFormat,
+ GLsizei width, GLsizei height, GLsizei imageSize,
+ const void *palette)
+{
+ const struct cpal_format_info *info;
+ GLint lvl, num_levels;
+ const GLubyte *indices;
+ GLint saved_align, align;
+
+ info = cpal_get_info(level, internalFormat, width, height, imageSize);
+ if (!info)
+ return;
+
+ info = &formats[internalFormat - GL_PALETTE4_RGB8_OES];
+ ASSERT(info->cpal_format == internalFormat);
+ num_levels = -level + 1;
+
+ /* first image follows the palette */
+ indices = (const GLubyte *) palette + info->palette_size * info->size;
+
+ _mesa_GetIntegerv(GL_UNPACK_ALIGNMENT, &saved_align);
+ align = saved_align;
+
+ for (lvl = 0; lvl < num_levels; lvl++) {
+ GLsizei w, h;
+ GLuint num_texels;
+ GLubyte *image = NULL;
+
+ w = width >> lvl;
+ if (!w)
+ w = 1;
+ h = height >> lvl;
+ if (!h)
+ h = 1;
+ num_texels = w * h;
+ if (w * info->size % align) {
+ _mesa_PixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ align = 1;
+ }
+
+ /* allocate and fill dest image buffer */
+ if (palette) {
+ image = (GLubyte *) malloc(num_texels * info->size);
+ paletted_to_color(info, palette, indices, num_texels, image);
+ }
+
+ _mesa_TexImage2D(target, lvl, info->format, w, h, 0,
+ info->format, info->type, image);
+ if (image)
+ free(image);
+
+ /* advance index pointer to point to next src mipmap */
+ if (info->palette_size == 16)
+ indices += (num_texels + 1) / 2;
+ else
+ indices += num_texels;
+ }
+
+ if (saved_align != align)
+ _mesa_PixelStorei(GL_UNPACK_ALIGNMENT, saved_align);
+}
+
+
+void GL_APIENTRY
+_es_CompressedTexImage2DARB(GLenum target, GLint level, GLenum internalFormat,
+ GLsizei width, GLsizei height, GLint border,
+ GLsizei imageSize, const GLvoid *data)
+{
+ switch (internalFormat) {
+ case GL_PALETTE4_RGB8_OES:
+ case GL_PALETTE4_RGBA8_OES:
+ case GL_PALETTE4_R5_G6_B5_OES:
+ case GL_PALETTE4_RGBA4_OES:
+ case GL_PALETTE4_RGB5_A1_OES:
+ case GL_PALETTE8_RGB8_OES:
+ case GL_PALETTE8_RGBA8_OES:
+ case GL_PALETTE8_R5_G6_B5_OES:
+ case GL_PALETTE8_RGBA4_OES:
+ case GL_PALETTE8_RGB5_A1_OES:
+ cpal_compressed_teximage2d(target, level, internalFormat,
+ width, height, imageSize, data);
+ break;
+ default:
+ _mesa_CompressedTexImage2DARB(target, level, internalFormat,
+ width, height, border, imageSize, data);
+ }
+}
diff --git a/src/mesa/es/main/es_enable.c b/src/mesa/es/main/es_enable.c
new file mode 100644
index 00000000000..351caacd776
--- /dev/null
+++ b/src/mesa/es/main/es_enable.c
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "GLES/gl.h"
+#include "GLES/glext.h"
+
+#include "main/compiler.h" /* for ASSERT */
+
+
+#ifndef GL_TEXTURE_GEN_S
+#define GL_TEXTURE_GEN_S 0x0C60
+#define GL_TEXTURE_GEN_T 0x0C61
+#define GL_TEXTURE_GEN_R 0x0C62
+#endif
+
+
+extern void GL_APIENTRY _es_Disable(GLenum cap);
+extern void GL_APIENTRY _es_Enable(GLenum cap);
+extern GLboolean GL_APIENTRY _es_IsEnabled(GLenum cap);
+
+extern void GL_APIENTRY _mesa_Disable(GLenum cap);
+extern void GL_APIENTRY _mesa_Enable(GLenum cap);
+extern GLboolean GL_APIENTRY _mesa_IsEnabled(GLenum cap);
+
+
+void GL_APIENTRY
+_es_Disable(GLenum cap)
+{
+ switch (cap) {
+ case GL_TEXTURE_GEN_STR_OES:
+ /* disable S, T, and R at the same time */
+ _mesa_Disable(GL_TEXTURE_GEN_S);
+ _mesa_Disable(GL_TEXTURE_GEN_T);
+ _mesa_Disable(GL_TEXTURE_GEN_R);
+ break;
+ default:
+ _mesa_Disable(cap);
+ break;
+ }
+}
+
+
+void GL_APIENTRY
+_es_Enable(GLenum cap)
+{
+ switch (cap) {
+ case GL_TEXTURE_GEN_STR_OES:
+ /* enable S, T, and R at the same time */
+ _mesa_Enable(GL_TEXTURE_GEN_S);
+ _mesa_Enable(GL_TEXTURE_GEN_T);
+ _mesa_Enable(GL_TEXTURE_GEN_R);
+ break;
+ default:
+ _mesa_Enable(cap);
+ break;
+ }
+}
+
+
+GLboolean GL_APIENTRY
+_es_IsEnabled(GLenum cap)
+{
+ switch (cap) {
+ case GL_TEXTURE_GEN_STR_OES:
+ cap = GL_TEXTURE_GEN_S;
+ default:
+ break;
+ }
+
+ return _mesa_IsEnabled(cap);
+}
diff --git a/src/mesa/es/main/es_fbo.c b/src/mesa/es/main/es_fbo.c
new file mode 100644
index 00000000000..18036378304
--- /dev/null
+++ b/src/mesa/es/main/es_fbo.c
@@ -0,0 +1,37 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ **************************************************************************/
+
+
+#include "GLES2/gl2.h"
+#include "GLES2/gl2ext.h"
+
+
+#ifndef GL_RGB5
+#define GL_RGB5 0x8050
+#endif
+
+
+extern void GL_APIENTRY _es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height);
+
+extern void GL_APIENTRY _mesa_RenderbufferStorageEXT(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height);
+
+
+void GL_APIENTRY
+_es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height)
+{
+ switch (internalFormat) {
+ case GL_RGB565:
+ /* XXX this confuses GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
+ /* choose a closest format */
+ internalFormat = GL_RGB5;
+ break;
+ default:
+ break;
+ }
+ _mesa_RenderbufferStorageEXT(target, internalFormat, width, height);
+}
diff --git a/src/mesa/es/main/es_generator.py b/src/mesa/es/main/es_generator.py
new file mode 100644
index 00000000000..590f5940a7b
--- /dev/null
+++ b/src/mesa/es/main/es_generator.py
@@ -0,0 +1,685 @@
+#*************************************************************************
+# Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+# All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# TUNGSTEN GRAPHICS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+# OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#*************************************************************************
+
+
+import sys, os
+import APIspecutil as apiutil
+
+# These dictionary entries are used for automatic conversion.
+# The string will be used as a format string with the conversion
+# variable.
+Converters = {
+ 'GLfloat': {
+ 'GLdouble': "(GLdouble) (%s)",
+ 'GLfixed' : "(GLint) (%s * 65536)",
+ },
+ 'GLfixed': {
+ 'GLfloat': "(GLfloat) (%s / 65536.0f)",
+ 'GLdouble': "(GLdouble) (%s / 65536.0)",
+ },
+ 'GLdouble': {
+ 'GLfloat': "(GLfloat) (%s)",
+ 'GLfixed': "(GLfixed) (%s * 65536)",
+ },
+ 'GLclampf': {
+ 'GLclampd': "(GLclampd) (%s)",
+ 'GLclampx': "(GLclampx) (%s * 65536)",
+ },
+ 'GLclampx': {
+ 'GLclampf': "(GLclampf) (%s / 65536.0f)",
+ 'GLclampd': "(GLclampd) (%s / 65536.0)",
+ },
+ 'GLubyte': {
+ 'GLfloat': "(GLfloat) (%s / 255.0f)",
+ },
+}
+
+def GetBaseType(type):
+ typeTokens = type.split(' ')
+ baseType = None
+ typeModifiers = []
+ for t in typeTokens:
+ if t in ['const', '*']:
+ typeModifiers.append(t)
+ else:
+ baseType = t
+ return (baseType, typeModifiers)
+
+def ConvertValue(value, fromType, toType):
+ """Returns a string that represents the given parameter string,
+ type-converted if necessary."""
+
+ if not Converters.has_key(fromType):
+ print >> sys.stderr, "No base converter for type '%s' found. Ignoring." % fromType
+ return value
+
+ if not Converters[fromType].has_key(toType):
+ print >> sys.stderr, "No converter found for type '%s' to type '%s'. Ignoring." % (fromType, toType)
+ return value
+
+ # This part is simple. Return the proper conversion.
+ conversionString = Converters[fromType][toType]
+ return conversionString % value
+
+FormatStrings = {
+ 'GLenum' : '0x%x',
+ 'GLfloat' : '%f',
+ 'GLint' : '%d',
+ 'GLbitfield' : '0x%x',
+}
+def GetFormatString(type):
+ if FormatStrings.has_key(type):
+ return FormatStrings[type]
+ else:
+ return None
+
+
+######################################################################
+# Version-specific values to be used in the main script
+# header: which header file to include
+# api: what text specifies an API-level function
+VersionSpecificValues = {
+ 'GLES1.1' : {
+ 'description' : 'GLES1.1 functions',
+ 'header' : 'GLES/gl.h',
+ 'extheader' : 'GLES/glext.h',
+ },
+ 'GLES2.0': {
+ 'description' : 'GLES2.0 functions',
+ 'header' : 'GLES2/gl2.h',
+ 'extheader' : 'GLES2/gl2ext.h',
+ }
+}
+
+
+######################################################################
+# Main code for the script begins here.
+
+# Get the name of the program (without the directory part) for use in
+# error messages.
+program = os.path.basename(sys.argv[0])
+
+# Set default values
+verbose = 0
+functionList = "APIspec.xml"
+version = "GLES1.1"
+
+# Allow for command-line switches
+import getopt, time
+options = "hvV:S:"
+try:
+ optlist, args = getopt.getopt(sys.argv[1:], options)
+except getopt.GetoptError, message:
+ sys.stderr.write("%s: %s. Use -h for help.\n" % (program, message))
+ sys.exit(1)
+
+for option, optarg in optlist:
+ if option == "-h":
+ sys.stderr.write("Usage: %s [-%s]\n" % (program, options))
+ sys.stderr.write("Parse an API specification file and generate wrapper functions for a given GLES version\n")
+ sys.stderr.write("-h gives help\n")
+ sys.stderr.write("-v is verbose\n")
+ sys.stderr.write("-V specifies GLES version to generate [%s]:\n" % version)
+ for key in VersionSpecificValues.keys():
+ sys.stderr.write(" %s - %s\n" % (key, VersionSpecificValues[key]['description']))
+ sys.stderr.write("-S specifies API specification file to use [%s]\n" % functionList)
+ sys.exit(1)
+ elif option == "-v":
+ verbose += 1
+ elif option == "-V":
+ version = optarg
+ elif option == "-S":
+ functionList = optarg
+
+# Beyond switches, we support no further command-line arguments
+if len(args) > 0:
+ sys.stderr.write("%s: only switch arguments are supported - use -h for help\n" % program)
+ sys.exit(1)
+
+# If we don't have a valid version, abort.
+if not VersionSpecificValues.has_key(version):
+ sys.stderr.write("%s: version '%s' is not valid - use -h for help\n" % (program, version))
+ sys.exit(1)
+
+# Grab the version-specific items we need to use
+versionHeader = VersionSpecificValues[version]['header']
+versionExtHeader = VersionSpecificValues[version]['extheader']
+
+# If we get to here, we're good to go. The "version" parameter
+# directs GetDispatchedFunctions to only allow functions from
+# that "category" (version in our parlance). This allows
+# functions with different declarations in different categories
+# to exist (glTexImage2D, for example, is different between
+# GLES1 and GLES2).
+keys = apiutil.GetAllFunctions(functionList, version)
+
+allSpecials = apiutil.AllSpecials()
+
+print """/* DO NOT EDIT *************************************************
+ * THIS FILE AUTOMATICALLY GENERATED BY THE %s SCRIPT
+ * API specification file: %s
+ * GLES version: %s
+ * date: %s
+ */
+""" % (program, functionList, version, time.strftime("%Y-%m-%d %H:%M:%S"))
+
+# The headers we choose are version-specific.
+print """
+#include "%s"
+#include "%s"
+""" % (versionHeader, versionExtHeader)
+
+# Everyone needs these types.
+print """
+/* These types are needed for the Mesa veneer, but are not defined in
+ * the standard GLES headers.
+ */
+typedef double GLdouble;
+typedef double GLclampd;
+
+/* This type is normally in glext.h, but needed here */
+typedef char GLchar;
+
+/* Mesa error handling requires these */
+extern void *_mesa_get_current_context(void);
+extern void _mesa_error(void *ctx, GLenum error, const char *fmtString, ... );
+
+#include "main/compiler.h"
+#include "main/api_exec.h"
+
+#include "glapi/dispatch.h"
+
+typedef void (*_glapi_proc)(void); /* generic function pointer */
+"""
+
+# Finally we get to the all-important functions
+print """/*************************************************************
+ * Generated functions begin here
+ */
+"""
+for funcName in keys:
+ if verbose > 0: sys.stderr.write("%s: processing function %s\n" % (program, funcName))
+
+ # start figuring out what this function will look like.
+ returnType = apiutil.ReturnType(funcName)
+ props = apiutil.Properties(funcName)
+ params = apiutil.Parameters(funcName)
+ declarationString = apiutil.MakeDeclarationString(params)
+
+ # In case of error, a function may have to return. Make
+ # sure we have valid return values in this case.
+ if returnType == "void":
+ errorReturn = "return"
+ elif returnType == "GLboolean":
+ errorReturn = "return GL_FALSE"
+ else:
+ errorReturn = "return (%s) 0" % returnType
+
+ # These are the output of this large calculation block.
+ # passthroughDeclarationString: a typed set of parameters that
+ # will be used to create the "extern" reference for the
+ # underlying Mesa or support function. Note that as generated
+ # these have an extra ", " at the beginning, which will be
+ # removed before use.
+ #
+ # passthroughDeclarationString: an untyped list of parameters
+ # that will be used to call the underlying Mesa or support
+ # function (including references to converted parameters).
+ # This will also be generated with an extra ", " at the
+ # beginning, which will be removed before use.
+ #
+ # variables: C code to create any local variables determined to
+ # be necessary.
+ # conversionCodeOutgoing: C code to convert application parameters
+ # to a necessary type before calling the underlying support code.
+ # May be empty if no conversion is required.
+ # conversionCodeIncoming: C code to do the converse: convert
+ # values returned by underlying Mesa code to the types needed
+ # by the application.
+ # Note that *either* the conversionCodeIncoming will be used (for
+ # generated query functions), *or* the conversionCodeOutgoing will
+ # be used (for generated non-query functions), never both.
+ passthroughFuncName = ""
+ passthroughDeclarationString = ""
+ passthroughCallString = ""
+ variables = []
+ conversionCodeOutgoing = []
+ conversionCodeIncoming = []
+ switchCode = []
+
+ # Calculate the name of the underlying support function to call.
+ # By default, the passthrough function is named _mesa_<funcName>.
+ # We're allowed to override the prefix and/or the function name
+ # for each function record, though. The "ConversionFunction"
+ # utility is poorly named, BTW...
+ if funcName in allSpecials:
+ # perform checks and pass through
+ funcPrefix = "_check_"
+ aliasprefix = "_es_"
+ else:
+ funcPrefix = "_es_"
+ aliasprefix = apiutil.AliasPrefix(funcName)
+ alias = apiutil.ConversionFunction(funcName)
+ if not alias:
+ # There may still be a Mesa alias for the function
+ if apiutil.Alias(funcName):
+ passthroughFuncName = "%s%s" % (aliasprefix, apiutil.Alias(funcName))
+ else:
+ passthroughFuncName = "%s%s" % (aliasprefix, funcName)
+ else: # a specific alias is provided
+ passthroughFuncName = "%s%s" % (aliasprefix, alias)
+
+ # Look at every parameter: each one may have only specific
+ # allowed values, or dependent parameters to check, or
+ # variant-sized vector arrays to calculate
+ for (paramName, paramType, paramMaxVecSize, paramConvertToType, paramValidValues, paramValueConversion) in params:
+ # We'll need this below if we're doing conversions
+ (paramBaseType, paramTypeModifiers) = GetBaseType(paramType)
+
+ # Conversion management.
+ # We'll handle three cases, easiest to hardest: a parameter
+ # that doesn't require conversion, a scalar parameter that
+ # requires conversion, and a vector parameter that requires
+ # conversion.
+ if paramConvertToType == None:
+ # Unconverted parameters are easy, whether they're vector
+ # or scalar - just add them to the call list. No conversions
+ # or anything to worry about.
+ passthroughDeclarationString += ", %s %s" % (paramType, paramName)
+ passthroughCallString += ", %s" % paramName
+
+ elif paramMaxVecSize == 0: # a scalar parameter that needs conversion
+ # A scalar to hold a converted parameter
+ variables.append(" %s converted_%s;" % (paramConvertToType, paramName))
+
+ # Outgoing conversion depends on whether we have to conditionally
+ # perform value conversion.
+ if paramValueConversion == "none":
+ conversionCodeOutgoing.append(" converted_%s = (%s) %s;" % (paramName, paramConvertToType, paramName))
+ elif paramValueConversion == "some":
+ # We'll need a conditional variable to keep track of
+ # whether we're converting values or not.
+ if (" int convert_%s_value = 1;" % paramName) not in variables:
+ variables.append(" int convert_%s_value = 1;" % paramName)
+
+ # Write code based on that conditional.
+ conversionCodeOutgoing.append(" if (convert_%s_value) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s = %s;" % (paramName, ConvertValue(paramName, paramBaseType, paramConvertToType)))
+ conversionCodeOutgoing.append(" } else {")
+ conversionCodeOutgoing.append(" converted_%s = (%s) %s;" % (paramName, paramConvertToType, paramName))
+ conversionCodeOutgoing.append(" }")
+ else: # paramValueConversion == "all"
+ conversionCodeOutgoing.append(" converted_%s = %s;" % (paramName, ConvertValue(paramName, paramBaseType, paramConvertToType)))
+
+ # Note that there can be no incoming conversion for a
+ # scalar parameter; changing the scalar will only change
+ # the local value, and won't ultimately change anything
+ # that passes back to the application.
+
+ # Call strings. The unusual " ".join() call will join the
+ # array of parameter modifiers with spaces as separators.
+ passthroughDeclarationString += ", %s %s %s" % (paramConvertToType, " ".join(paramTypeModifiers), paramName)
+ passthroughCallString += ", converted_%s" % paramName
+
+ else: # a vector parameter that needs conversion
+ # We'll need an index variable for conversions
+ if " register unsigned int i;" not in variables:
+ variables.append(" register unsigned int i;")
+
+ # This variable will hold the (possibly variant) size of
+ # this array needing conversion. By default, we'll set
+ # it to the maximal size (which is correct for functions
+ # with a constant-sized vector parameter); for true
+ # variant arrays, we'll modify it with other code.
+ variables.append(" unsigned int n_%s = %d;" % (paramName, paramMaxVecSize))
+
+ # This array will hold the actual converted values.
+ variables.append(" %s converted_%s[%d];" % (paramConvertToType, paramName, paramMaxVecSize))
+
+ # Again, we choose the conversion code based on whether we
+ # have to always convert values, never convert values, or
+ # conditionally convert values.
+ if paramValueConversion == "none":
+ conversionCodeOutgoing.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s[i] = (%s) %s[i];" % (paramName, paramConvertToType, paramName))
+ conversionCodeOutgoing.append(" }")
+ elif paramValueConversion == "some":
+ # We'll need a conditional variable to keep track of
+ # whether we're converting values or not.
+ if (" int convert_%s_value = 1;" % paramName) not in variables:
+ variables.append(" int convert_%s_value = 1;" % paramName)
+ # Write code based on that conditional.
+ conversionCodeOutgoing.append(" if (convert_%s_value) {" % paramName)
+ conversionCodeOutgoing.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s[i] = %s;" % (paramName, ConvertValue("%s[i]" % paramName, paramBaseType, paramConvertToType)))
+ conversionCodeOutgoing.append(" }")
+ conversionCodeOutgoing.append(" } else {")
+ conversionCodeOutgoing.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s[i] = (%s) %s[i];" % (paramName, paramConvertToType, paramName))
+ conversionCodeOutgoing.append(" }")
+ conversionCodeOutgoing.append(" }")
+ else: # paramValueConversion == "all"
+ conversionCodeOutgoing.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeOutgoing.append(" converted_%s[i] = %s;" % (paramName, ConvertValue("%s[i]" % paramName, paramBaseType, paramConvertToType)))
+
+ conversionCodeOutgoing.append(" }")
+
+ # If instead we need an incoming conversion (i.e. results
+ # from Mesa have to be converted before handing back
+ # to the application), this is it. Fortunately, we don't
+ # have to worry about conditional value conversion - the
+ # functions that do (e.g. glGetFixedv()) are handled
+ # specially, outside this code generation.
+ #
+ # Whether we use incoming conversion or outgoing conversion
+ # is determined later - we only ever use one or the other.
+
+ if paramValueConversion == "none":
+ conversionCodeIncoming.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeIncoming.append(" %s[i] = (%s) converted_%s[i];" % (paramName, paramConvertToType, paramName))
+ conversionCodeIncoming.append(" }")
+ elif paramValueConversion == "some":
+ # We'll need a conditional variable to keep track of
+ # whether we're converting values or not.
+ if (" int convert_%s_value = 1;" % paramName) not in variables:
+ variables.append(" int convert_%s_value = 1;" % paramName)
+
+ # Write code based on that conditional.
+ conversionCodeIncoming.append(" if (convert_%s_value) {" % paramName)
+ conversionCodeIncoming.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeIncoming.append(" %s[i] = %s;" % (paramName, ConvertValue("converted_%s[i]" % paramName, paramConvertToType, paramBaseType)))
+ conversionCodeIncoming.append(" }")
+ conversionCodeIncoming.append(" } else {")
+ conversionCodeIncoming.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeIncoming.append(" %s[i] = (%s) converted_%s[i];" % (paramName, paramBaseType, paramName))
+ conversionCodeIncoming.append(" }")
+ conversionCodeIncoming.append(" }")
+ else: # paramValueConversion == "all"
+ conversionCodeIncoming.append(" for (i = 0; i < n_%s; i++) {" % paramName)
+ conversionCodeIncoming.append(" %s[i] = %s;" % (paramName, ConvertValue("converted_%s[i]" % paramName, paramConvertToType, paramBaseType)))
+ conversionCodeIncoming.append(" }")
+
+ # Call strings. The unusual " ".join() call will join the
+ # array of parameter modifiers with spaces as separators.
+ passthroughDeclarationString += ", %s %s %s" % (paramConvertToType, " ".join(paramTypeModifiers), paramName)
+ passthroughCallString += ", converted_%s" % paramName
+
+ # endif conversion management
+
+ # Parameter checking. If the parameter has a specific list of
+ # valid values, we have to make sure that the passed-in values
+ # match these, or we make an error.
+ if len(paramValidValues) > 0:
+ # We're about to make a big switch statement with an
+ # error at the end. By default, the error is GL_INVALID_ENUM,
+ # unless we find a "case" statement in the middle with a
+ # non-GLenum value.
+ errorDefaultCase = "GL_INVALID_ENUM"
+
+ # This parameter has specific valid values. Make a big
+ # switch statement to handle it. Note that the original
+ # parameters are always what is checked, not the
+ # converted parameters.
+ switchCode.append(" switch(%s) {" % paramName)
+
+ for valueIndex in range(len(paramValidValues)):
+ (paramValue, dependentVecSize, dependentParamName, dependentValidValues, errorCode, valueConvert) = paramValidValues[valueIndex]
+
+ # We're going to need information on the dependent param
+ # as well.
+ if dependentParamName:
+ depParamIndex = apiutil.FindParamIndex(params, dependentParamName)
+ if depParamIndex == None:
+ sys.stderr.write("%s: can't find dependent param '%s' for function '%s'\n" % (program, dependentParamName, funcName))
+
+ (depParamName, depParamType, depParamMaxVecSize, depParamConvertToType, depParamValidValues, depParamValueConversion) = params[depParamIndex]
+ else:
+ (depParamName, depParamType, depParamMaxVecSize, depParamConvertToType, depParamValidValues, depParamValueConversion) = (None, None, None, None, [], None)
+
+ # This is a sneaky trick. It's valid syntax for a parameter
+ # that is *not* going to be converted to be declared
+ # with a dependent vector size; but in this case, the
+ # dependent vector size is unused and unnecessary.
+ # So check for this and ignore the dependent vector size
+ # if the parameter is not going to be converted.
+ if depParamConvertToType:
+ usedDependentVecSize = dependentVecSize
+ else:
+ usedDependentVecSize = None
+
+ # We'll peek ahead at the next parameter, to see whether
+ # we can combine cases
+ if valueIndex + 1 < len(paramValidValues) :
+ (nextParamValue, nextDependentVecSize, nextDependentParamName, nextDependentValidValues, nextErrorCode, nextValueConvert) = paramValidValues[valueIndex + 1]
+ if depParamConvertToType:
+ usedNextDependentVecSize = nextDependentVecSize
+ else:
+ usedNextDependentVecSize = None
+
+ # Create a case for this value. As a mnemonic,
+ # if we have a dependent vector size that we're ignoring,
+ # add it as a comment.
+ if usedDependentVecSize == None and dependentVecSize != None:
+ switchCode.append(" case %s: /* size %s */" % (paramValue, dependentVecSize))
+ else:
+ switchCode.append(" case %s:" % paramValue)
+
+ # If this is not a GLenum case, then switch our error
+ # if no value is matched to be GL_INVALID_VALUE instead
+ # of GL_INVALID_ENUM. (Yes, this does get confused
+ # if there are both values and GLenums in the same
+ # switch statement, which shouldn't happen.)
+ if paramValue[0:3] != "GL_":
+ errorDefaultCase = "GL_INVALID_VALUE"
+
+ # If all the remaining parameters are identical to the
+ # next set, then we're done - we'll just create the
+ # official code on the next pass through, and the two
+ # cases will share the code.
+ if valueIndex + 1 < len(paramValidValues) and usedDependentVecSize == usedNextDependentVecSize and dependentParamName == nextDependentParamName and dependentValidValues == nextDependentValidValues and errorCode == nextErrorCode and valueConvert == nextValueConvert:
+ continue
+
+ # Otherwise, we'll have to generate code for this case.
+ # Start off with a check: if there is a dependent parameter,
+ # and a list of valid values for that parameter, we need
+ # to generate an error if something other than one
+ # of those values is passed.
+ if len(dependentValidValues) > 0:
+ conditional=""
+
+ # If the parameter being checked is actually an array,
+ # check only its first element.
+ if depParamMaxVecSize == 0:
+ valueToCheck = dependentParamName
+ else:
+ valueToCheck = "%s[0]" % dependentParamName
+
+ for v in dependentValidValues:
+ conditional += " && %s != %s" % (valueToCheck, v)
+ switchCode.append(" if (%s) {" % conditional[4:])
+ if errorCode == None:
+ errorCode = "GL_INVALID_ENUM"
+ switchCode.append(' _mesa_error(_mesa_get_current_context(), %s, "gl%s(%s=0x%s)", %s);' % (errorCode, funcName, paramName, "%x", paramName))
+ switchCode.append(" %s;" % errorReturn)
+ switchCode.append(" }")
+ # endif there are dependent valid values
+
+ # The dependent parameter may require conditional
+ # value conversion. If it does, and we don't want
+ # to convert values, we'll have to generate code for that
+ if depParamValueConversion == "some" and valueConvert == "noconvert":
+ switchCode.append(" convert_%s_value = 0;" % dependentParamName)
+
+ # If there's a dependent vector size for this parameter
+ # that we're actually going to use (i.e. we need conversion),
+ # mark it.
+ if usedDependentVecSize:
+ switchCode.append(" n_%s = %s;" % (dependentParamName, dependentVecSize))
+
+ # In all cases, break out of the switch if any valid
+ # value is found.
+ switchCode.append(" break;")
+
+
+ # Need a default case to catch all the other, invalid
+ # parameter values. These will all generate errors.
+ switchCode.append(" default:")
+ if errorCode == None:
+ errorCode = "GL_INVALID_ENUM"
+ formatString = GetFormatString(paramType)
+ if formatString == None:
+ switchCode.append(' _mesa_error(_mesa_get_current_context(), %s, "gl%s(%s)");' % (errorCode, funcName, paramName))
+ else:
+ switchCode.append(' _mesa_error(_mesa_get_current_context(), %s, "gl%s(%s=%s)", %s);' % (errorCode, funcName, paramName, formatString, paramName))
+ switchCode.append(" %s;" % errorReturn)
+
+ # End of our switch code.
+ switchCode.append(" }")
+
+ # endfor every recognized parameter value
+
+ # endfor every param
+
+ # Here, the passthroughDeclarationString and passthroughCallString
+ # are complete; remove the extra ", " at the front of each.
+ passthroughDeclarationString = passthroughDeclarationString[2:]
+ passthroughCallString = passthroughCallString[2:]
+
+ # The Mesa functions are scattered across all the Mesa
+ # header files. The easiest way to manage declarations
+ # is to create them ourselves.
+ if funcName in allSpecials:
+ print "/* this function is special and is defined elsewhere */"
+ print "extern %s GLAPIENTRY %s(%s);" % (returnType, passthroughFuncName, passthroughDeclarationString)
+
+ # A function may be a core function (i.e. it exists in
+ # the core specification), a core addition (extension
+ # functions added officially to the core), a required
+ # extension (usually an extension for an earlier version
+ # that has been officially adopted), or an optional extension.
+ #
+ # Core functions have a simple category (e.g. "GLES1.1");
+ # we generate only a simple callback for them.
+ #
+ # Core additions have two category listings, one simple
+ # and one compound (e.g. ["GLES1.1", "GLES1.1:OES_fixed_point"]).
+ # We generate the core function, and also an extension function.
+ #
+ # Required extensions and implemented optional extensions
+ # have a single compound category "GLES1.1:OES_point_size_array".
+ # For these we generate just the extension function.
+ for categorySpec in apiutil.Categories(funcName):
+ compoundCategory = categorySpec.split(":")
+
+ # This category isn't for us, if the base category doesn't match
+ # our version
+ if compoundCategory[0] != version:
+ continue
+
+ # Otherwise, determine if we're writing code for a core
+ # function (no suffix) or an extension function.
+ if len(compoundCategory) == 1:
+ # This is a core function
+ extensionName = None
+ extensionSuffix = ""
+ else:
+ # This is an extension function. We'll need to append
+ # the extension suffix.
+ extensionName = compoundCategory[1]
+ extensionSuffix = extensionName.split("_")[0]
+ fullFuncName = funcPrefix + funcName + extensionSuffix
+
+ # Now the generated function. The text used to mark an API-level
+ # function, oddly, is version-specific.
+ if extensionName:
+ print "/* Extension %s */" % extensionName
+
+ if (not variables and
+ not switchCode and
+ not conversionCodeOutgoing and
+ not conversionCodeIncoming):
+ # pass through directly
+ print "#define %s %s" % (fullFuncName, passthroughFuncName)
+ print
+ continue
+
+ print "static %s %s(%s)" % (returnType, fullFuncName, declarationString)
+ print "{"
+
+ # Start printing our code pieces. Start with any local
+ # variables we need. This unusual syntax joins the
+ # lines in the variables[] array with the "\n" separator.
+ if len(variables) > 0:
+ print "\n".join(variables) + "\n"
+
+ # If there's any sort of parameter checking or variable
+ # array sizing, the switch code will contain it.
+ if len(switchCode) > 0:
+ print "\n".join(switchCode) + "\n"
+
+ # In the case of an outgoing conversion (i.e. parameters must
+ # be converted before calling the underlying Mesa function),
+ # use the appropriate code.
+ if "get" not in props and len(conversionCodeOutgoing) > 0:
+ print "\n".join(conversionCodeOutgoing) + "\n"
+
+ # Call the Mesa function. Note that there are very few functions
+ # that return a value (i.e. returnType is not "void"), and that
+ # none of them require incoming translation; so we're safe
+ # to generate code that directly returns in those cases,
+ # even though it's not completely independent.
+
+ if returnType == "void":
+ print " %s(%s);" % (passthroughFuncName, passthroughCallString)
+ else:
+ print " return %s(%s);" % (passthroughFuncName, passthroughCallString)
+
+ # If the function is one that returns values (i.e. "get" in props),
+ # it might return values of a different type than we need, that
+ # require conversion before passing back to the application.
+ if "get" in props and len(conversionCodeIncoming) > 0:
+ print "\n".join(conversionCodeIncoming)
+
+ # All done.
+ print "}"
+ print
+ # end for each category provided for a function
+
+# end for each function
+
+print "void"
+print "_mesa_init_exec_table(struct _glapi_table *exec)"
+print "{"
+for func in keys:
+ prefix = "_es_" if func not in allSpecials else "_check_"
+ for spec in apiutil.Categories(func):
+ ext = spec.split(":")
+ # version does not match
+ if ext.pop(0) != version:
+ continue
+ entry = func
+ if ext:
+ suffix = ext[0].split("_")[0]
+ entry += suffix
+ print " SET_%s(exec, %s%s);" % (entry, prefix, entry)
+print "}"
diff --git a/src/mesa/es/main/es_query_matrix.c b/src/mesa/es/main/es_query_matrix.c
new file mode 100644
index 00000000000..82b6fe7ab9f
--- /dev/null
+++ b/src/mesa/es/main/es_query_matrix.c
@@ -0,0 +1,199 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ **************************************************************************/
+
+
+/**
+ * Code to implement GL_OES_query_matrix. See the spec at:
+ * http://www.khronos.org/registry/gles/extensions/OES/OES_query_matrix.txt
+ */
+
+
+#include <stdlib.h>
+#include <math.h>
+#include "GLES/gl.h"
+#include "GLES/glext.h"
+
+
+/**
+ * This is from the GL_OES_query_matrix extension specification:
+ *
+ * GLbitfield glQueryMatrixxOES( GLfixed mantissa[16],
+ * GLint exponent[16] )
+ * mantissa[16] contains the contents of the current matrix in GLfixed
+ * format. exponent[16] contains the unbiased exponents applied to the
+ * matrix components, so that the internal representation of component i
+ * is close to mantissa[i] * 2^exponent[i]. The function returns a status
+ * word which is zero if all the components are valid. If
+ * status & (1<<i) != 0, the component i is invalid (e.g., NaN, Inf).
+ * The implementations are not required to keep track of overflows. In
+ * that case, the invalid bits are never set.
+ */
+
+#define INT_TO_FIXED(x) ((GLfixed) ((x) << 16))
+#define FLOAT_TO_FIXED(x) ((GLfixed) ((x) * 65536.0))
+
+#if defined(WIN32) || defined(_WIN32_WCE)
+/* Oddly, the fpclassify() function doesn't exist in such a form
+ * on Windows. This is an implementation using slightly different
+ * lower-level Windows functions.
+ */
+#include <float.h>
+
+enum {FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL}
+fpclassify(double x)
+{
+ switch(_fpclass(x)) {
+ case _FPCLASS_SNAN: /* signaling NaN */
+ case _FPCLASS_QNAN: /* quiet NaN */
+ return FP_NAN;
+ case _FPCLASS_NINF: /* negative infinity */
+ case _FPCLASS_PINF: /* positive infinity */
+ return FP_INFINITE;
+ case _FPCLASS_NN: /* negative normal */
+ case _FPCLASS_PN: /* positive normal */
+ return FP_NORMAL;
+ case _FPCLASS_ND: /* negative denormalized */
+ case _FPCLASS_PD: /* positive denormalized */
+ return FP_SUBNORMAL;
+ case _FPCLASS_NZ: /* negative zero */
+ case _FPCLASS_PZ: /* positive zero */
+ return FP_ZERO;
+ default:
+ /* Should never get here; but if we do, this will guarantee
+ * that the pattern is not treated like a number.
+ */
+ return FP_NAN;
+ }
+}
+#endif
+
+extern GLbitfield GL_APIENTRY _es_QueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]);
+
+/* The Mesa functions we'll need */
+extern void GL_APIENTRY _mesa_GetIntegerv(GLenum pname, GLint *params);
+extern void GL_APIENTRY _mesa_GetFloatv(GLenum pname, GLfloat *params);
+
+GLbitfield GL_APIENTRY _es_QueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16])
+{
+ GLfloat matrix[16];
+ GLint tmp;
+ GLenum currentMode = GL_FALSE;
+ GLenum desiredMatrix = GL_FALSE;
+ /* The bitfield returns 1 for each component that is invalid (i.e.
+ * NaN or Inf). In case of error, everything is invalid.
+ */
+ GLbitfield rv;
+ register unsigned int i;
+ unsigned int bit;
+
+ /* This data structure defines the mapping between the current matrix
+ * mode and the desired matrix identifier.
+ */
+ static struct {
+ GLenum currentMode;
+ GLenum desiredMatrix;
+ } modes[] = {
+ {GL_MODELVIEW, GL_MODELVIEW_MATRIX},
+ {GL_PROJECTION, GL_PROJECTION_MATRIX},
+ {GL_TEXTURE, GL_TEXTURE_MATRIX},
+#if 0
+ /* this doesn't exist in GLES */
+ {GL_COLOR, GL_COLOR_MATRIX},
+#endif
+ };
+
+ /* Call Mesa to get the current matrix in floating-point form. First,
+ * we have to figure out what the current matrix mode is.
+ */
+ _mesa_GetIntegerv(GL_MATRIX_MODE, &tmp);
+ currentMode = (GLenum) tmp;
+
+ /* The mode is either GL_FALSE, if for some reason we failed to query
+ * the mode, or a given mode from the above table. Search for the
+ * returned mode to get the desired matrix; if we don't find it,
+ * we can return immediately, as _mesa_GetInteger() will have
+ * logged the necessary error already.
+ */
+ for (i = 0; i < sizeof(modes)/sizeof(modes[0]); i++) {
+ if (modes[i].currentMode == currentMode) {
+ desiredMatrix = modes[i].desiredMatrix;
+ break;
+ }
+ }
+ if (desiredMatrix == GL_FALSE) {
+ /* Early error means all values are invalid. */
+ return 0xffff;
+ }
+
+ /* Now pull the matrix itself. */
+ _mesa_GetFloatv(desiredMatrix, matrix);
+
+ rv = 0;
+ for (i = 0, bit = 1; i < 16; i++, bit<<=1) {
+ float normalizedFraction;
+ int exp;
+
+ switch (fpclassify(matrix[i])) {
+ /* A "subnormal" or denormalized number is too small to be
+ * represented in normal format; but despite that it's a
+ * valid floating point number. FP_ZERO and FP_NORMAL
+ * are both valid as well. We should be fine treating
+ * these three cases as legitimate floating-point numbers.
+ */
+ case FP_SUBNORMAL:
+ case FP_NORMAL:
+ case FP_ZERO:
+ normalizedFraction = (GLfloat)frexp(matrix[i], &exp);
+ mantissa[i] = FLOAT_TO_FIXED(normalizedFraction);
+ exponent[i] = (GLint) exp;
+ break;
+
+ /* If the entry is not-a-number or an infinity, then the
+ * matrix component is invalid. The invalid flag for
+ * the component is already set; might as well set the
+ * other return values to known values. We'll set
+ * distinct values so that a savvy end user could determine
+ * whether the matrix component was a NaN or an infinity,
+ * but this is more useful for debugging than anything else
+ * since the standard doesn't specify any such magic
+ * values to return.
+ */
+ case FP_NAN:
+ mantissa[i] = INT_TO_FIXED(0);
+ exponent[i] = (GLint) 0;
+ rv |= bit;
+ break;
+
+ case FP_INFINITE:
+ /* Return +/- 1 based on whether it's a positive or
+ * negative infinity.
+ */
+ if (matrix[i] > 0) {
+ mantissa[i] = INT_TO_FIXED(1);
+ }
+ else {
+ mantissa[i] = -INT_TO_FIXED(1);
+ }
+ exponent[i] = (GLint) 0;
+ rv |= bit;
+ break;
+
+ /* We should never get here; but here's a catching case
+ * in case fpclassify() is returnings something unexpected.
+ */
+ default:
+ mantissa[i] = INT_TO_FIXED(2);
+ exponent[i] = (GLint) 0;
+ rv |= bit;
+ break;
+ }
+
+ } /* for each component */
+
+ /* All done */
+ return rv;
+}
diff --git a/src/mesa/es/main/es_texgen.c b/src/mesa/es/main/es_texgen.c
new file mode 100644
index 00000000000..c29a0a7f138
--- /dev/null
+++ b/src/mesa/es/main/es_texgen.c
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include "GLES/gl.h"
+#include "GLES/glext.h"
+
+#include "main/compiler.h" /* for ASSERT */
+
+
+#ifndef GL_S
+#define GL_S 0x2000
+#define GL_T 0x2001
+#define GL_R 0x2002
+#endif
+
+
+extern void GL_APIENTRY _es_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params);
+extern void GL_APIENTRY _es_TexGenf(GLenum coord, GLenum pname, GLfloat param);
+extern void GL_APIENTRY _es_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params);
+
+extern void GL_APIENTRY _mesa_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params);
+extern void GL_APIENTRY _mesa_TexGenf(GLenum coord, GLenum pname, GLfloat param);
+extern void GL_APIENTRY _mesa_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params);
+
+
+void GL_APIENTRY
+_es_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
+{
+ ASSERT(coord == GL_TEXTURE_GEN_STR_OES);
+ _mesa_GetTexGenfv(GL_S, pname, params);
+}
+
+
+void GL_APIENTRY
+_es_TexGenf(GLenum coord, GLenum pname, GLfloat param)
+{
+ ASSERT(coord == GL_TEXTURE_GEN_STR_OES);
+ /* set S, T, and R at the same time */
+ _mesa_TexGenf(GL_S, pname, param);
+ _mesa_TexGenf(GL_T, pname, param);
+ _mesa_TexGenf(GL_R, pname, param);
+}
+
+
+void GL_APIENTRY
+_es_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
+{
+ ASSERT(coord == GL_TEXTURE_GEN_STR_OES);
+ /* set S, T, and R at the same time */
+ _mesa_TexGenfv(GL_S, pname, params);
+ _mesa_TexGenfv(GL_T, pname, params);
+ _mesa_TexGenfv(GL_R, pname, params);
+}
diff --git a/src/mesa/es/main/get_gen.py b/src/mesa/es/main/get_gen.py
new file mode 100644
index 00000000000..b820157be0c
--- /dev/null
+++ b/src/mesa/es/main/get_gen.py
@@ -0,0 +1,810 @@
+#!/usr/bin/env python
+
+# Mesa 3-D graphics library
+#
+# Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+# This script is used to generate the get.c file:
+# python get_gen.py > get.c
+
+
+import string
+import sys
+
+
+GLint = 1
+GLenum = 2
+GLfloat = 3
+GLdouble = 4
+GLboolean = 5
+GLfloatN = 6 # A normalized value, such as a color or depth range
+GLfixed = 7
+
+
+TypeStrings = {
+ GLint : "GLint",
+ GLenum : "GLenum",
+ GLfloat : "GLfloat",
+ GLdouble : "GLdouble",
+ GLboolean : "GLboolean",
+ GLfixed : "GLfixed"
+}
+
+
+# Each entry is a tuple of:
+# - the GL state name, such as GL_CURRENT_COLOR
+# - the state datatype, one of GLint, GLfloat, GLboolean or GLenum
+# - list of code fragments to get the state, such as ["ctx->Foo.Bar"]
+# - optional extra code or empty string
+# - optional extensions to check, or None
+#
+
+# Present in ES 1.x and 2.x:
+StateVars_common = [
+ ( "GL_ALPHA_BITS", GLint, ["ctx->DrawBuffer->Visual.alphaBits"],
+ "", None ),
+ ( "GL_BLEND", GLboolean, ["ctx->Color.BlendEnabled"], "", None ),
+ ( "GL_BLEND_SRC", GLenum, ["ctx->Color.BlendSrcRGB"], "", None ),
+ ( "GL_BLUE_BITS", GLint, ["ctx->DrawBuffer->Visual.blueBits"], "", None ),
+ ( "GL_COLOR_CLEAR_VALUE", GLfloatN,
+ [ "ctx->Color.ClearColor[0]",
+ "ctx->Color.ClearColor[1]",
+ "ctx->Color.ClearColor[2]",
+ "ctx->Color.ClearColor[3]" ], "", None ),
+ ( "GL_COLOR_WRITEMASK", GLint,
+ [ "ctx->Color.ColorMask[RCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[GCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[BCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[ACOMP] ? 1 : 0" ], "", None ),
+ ( "GL_CULL_FACE", GLboolean, ["ctx->Polygon.CullFlag"], "", None ),
+ ( "GL_CULL_FACE_MODE", GLenum, ["ctx->Polygon.CullFaceMode"], "", None ),
+ ( "GL_DEPTH_BITS", GLint, ["ctx->DrawBuffer->Visual.depthBits"],
+ "", None ),
+ ( "GL_DEPTH_CLEAR_VALUE", GLfloatN, ["ctx->Depth.Clear"], "", None ),
+ ( "GL_DEPTH_FUNC", GLenum, ["ctx->Depth.Func"], "", None ),
+ ( "GL_DEPTH_RANGE", GLfloatN,
+ [ "ctx->Viewport.Near", "ctx->Viewport.Far" ], "", None ),
+ ( "GL_DEPTH_TEST", GLboolean, ["ctx->Depth.Test"], "", None ),
+ ( "GL_DEPTH_WRITEMASK", GLboolean, ["ctx->Depth.Mask"], "", None ),
+ ( "GL_DITHER", GLboolean, ["ctx->Color.DitherFlag"], "", None ),
+ ( "GL_FRONT_FACE", GLenum, ["ctx->Polygon.FrontFace"], "", None ),
+ ( "GL_GREEN_BITS", GLint, ["ctx->DrawBuffer->Visual.greenBits"],
+ "", None ),
+ ( "GL_LINE_WIDTH", GLfloat, ["ctx->Line.Width"], "", None ),
+ ( "GL_ALIASED_LINE_WIDTH_RANGE", GLfloat,
+ ["ctx->Const.MinLineWidth",
+ "ctx->Const.MaxLineWidth"], "", None ),
+ ( "GL_MAX_ELEMENTS_INDICES", GLint, ["ctx->Const.MaxArrayLockSize"], "", None ),
+ ( "GL_MAX_ELEMENTS_VERTICES", GLint, ["ctx->Const.MaxArrayLockSize"], "", None ),
+
+ ( "GL_MAX_TEXTURE_SIZE", GLint, ["1 << (ctx->Const.MaxTextureLevels - 1)"], "", None ),
+ ( "GL_MAX_VIEWPORT_DIMS", GLint,
+ ["ctx->Const.MaxViewportWidth", "ctx->Const.MaxViewportHeight"],
+ "", None ),
+ ( "GL_PACK_ALIGNMENT", GLint, ["ctx->Pack.Alignment"], "", None ),
+ ( "GL_ALIASED_POINT_SIZE_RANGE", GLfloat,
+ ["ctx->Const.MinPointSize",
+ "ctx->Const.MaxPointSize"], "", None ),
+ ( "GL_POLYGON_OFFSET_FACTOR", GLfloat, ["ctx->Polygon.OffsetFactor "], "", None ),
+ ( "GL_POLYGON_OFFSET_UNITS", GLfloat, ["ctx->Polygon.OffsetUnits "], "", None ),
+ ( "GL_RED_BITS", GLint, ["ctx->DrawBuffer->Visual.redBits"], "", None ),
+ ( "GL_SCISSOR_BOX", GLint,
+ ["ctx->Scissor.X",
+ "ctx->Scissor.Y",
+ "ctx->Scissor.Width",
+ "ctx->Scissor.Height"], "", None ),
+ ( "GL_SCISSOR_TEST", GLboolean, ["ctx->Scissor.Enabled"], "", None ),
+ ( "GL_STENCIL_BITS", GLint, ["ctx->DrawBuffer->Visual.stencilBits"], "", None ),
+ ( "GL_STENCIL_CLEAR_VALUE", GLint, ["ctx->Stencil.Clear"], "", None ),
+ ( "GL_STENCIL_FAIL", GLenum,
+ ["ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]"], "", None ),
+ ( "GL_STENCIL_FUNC", GLenum,
+ ["ctx->Stencil.Function[ctx->Stencil.ActiveFace]"], "", None ),
+ ( "GL_STENCIL_PASS_DEPTH_FAIL", GLenum,
+ ["ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]"], "", None ),
+ ( "GL_STENCIL_PASS_DEPTH_PASS", GLenum,
+ ["ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]"], "", None ),
+ ( "GL_STENCIL_REF", GLint,
+ ["ctx->Stencil.Ref[ctx->Stencil.ActiveFace]"], "", None ),
+ ( "GL_STENCIL_TEST", GLboolean, ["ctx->Stencil.Enabled"], "", None ),
+ ( "GL_STENCIL_VALUE_MASK", GLint,
+ ["ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]"], "", None ),
+ ( "GL_STENCIL_WRITEMASK", GLint,
+ ["ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]"], "", None ),
+ ( "GL_SUBPIXEL_BITS", GLint, ["ctx->Const.SubPixelBits"], "", None ),
+ ( "GL_TEXTURE_BINDING_2D", GLint,
+ ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_2D_INDEX]->Name"], "", None ),
+ ( "GL_UNPACK_ALIGNMENT", GLint, ["ctx->Unpack.Alignment"], "", None ),
+ ( "GL_VIEWPORT", GLint, [ "ctx->Viewport.X", "ctx->Viewport.Y",
+ "ctx->Viewport.Width", "ctx->Viewport.Height" ], "", None ),
+
+ # GL_ARB_multitexture
+ ( "GL_ACTIVE_TEXTURE_ARB", GLint,
+ [ "GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit"], "", ["ARB_multitexture"] ),
+
+ # Note that all the OES_* extensions require that the Mesa
+ # "struct gl_extensions" include a member with the name of
+ # the extension. That structure does not yet include OES
+ # extensions (and we're not sure whether it will). If
+ # it does, all the OES_* extensions below should mark the
+ # dependency.
+
+ # OES_texture_cube_map
+ ( "GL_TEXTURE_BINDING_CUBE_MAP_ARB", GLint,
+ ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_CUBE_INDEX]->Name"],
+ "", None),
+ ( "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB", GLint,
+ ["(1 << (ctx->Const.MaxCubeTextureLevels - 1))"],
+ "", None),
+
+ # OES_blend_subtract
+ ( "GL_BLEND_SRC_RGB_EXT", GLenum, ["ctx->Color.BlendSrcRGB"], "", None),
+ ( "GL_BLEND_DST_RGB_EXT", GLenum, ["ctx->Color.BlendDstRGB"], "", None),
+ ( "GL_BLEND_SRC_ALPHA_EXT", GLenum, ["ctx->Color.BlendSrcA"], "", None),
+ ( "GL_BLEND_DST_ALPHA_EXT", GLenum, ["ctx->Color.BlendDstA"], "", None),
+
+ # GL_BLEND_EQUATION_RGB, which is what we're really after,
+ # is defined identically to GL_BLEND_EQUATION.
+ ( "GL_BLEND_EQUATION", GLenum, ["ctx->Color.BlendEquationRGB "], "", None),
+ ( "GL_BLEND_EQUATION_ALPHA_EXT", GLenum, ["ctx->Color.BlendEquationA "],
+ "", None),
+
+ # GL_ARB_texture_compression */
+# ( "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB", GLint,
+# ["_mesa_get_compressed_formats(ctx, NULL, GL_FALSE)"],
+# "", ["ARB_texture_compression"] ),
+# ( "GL_COMPRESSED_TEXTURE_FORMATS_ARB", GLenum,
+# [],
+# """GLint formats[100];
+# GLuint i, n = _mesa_get_compressed_formats(ctx, formats, GL_FALSE);
+# ASSERT(n <= 100);
+# for (i = 0; i < n; i++)
+# params[i] = ENUM_TO_INT(formats[i]);""",
+# ["ARB_texture_compression"] ),
+
+ # GL_ARB_multisample
+ ( "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB", GLboolean,
+ ["ctx->Multisample.SampleAlphaToCoverage"], "", ["ARB_multisample"] ),
+ ( "GL_SAMPLE_COVERAGE_ARB", GLboolean,
+ ["ctx->Multisample.SampleCoverage"], "", ["ARB_multisample"] ),
+ ( "GL_SAMPLE_COVERAGE_VALUE_ARB", GLfloat,
+ ["ctx->Multisample.SampleCoverageValue"], "", ["ARB_multisample"] ),
+ ( "GL_SAMPLE_COVERAGE_INVERT_ARB", GLboolean,
+ ["ctx->Multisample.SampleCoverageInvert"], "", ["ARB_multisample"] ),
+ ( "GL_SAMPLE_BUFFERS_ARB", GLint,
+ ["ctx->DrawBuffer->Visual.sampleBuffers"], "", ["ARB_multisample"] ),
+ ( "GL_SAMPLES_ARB", GLint,
+ ["ctx->DrawBuffer->Visual.samples"], "", ["ARB_multisample"] ),
+
+
+ # GL_SGIS_generate_mipmap
+ ( "GL_GENERATE_MIPMAP_HINT_SGIS", GLenum, ["ctx->Hint.GenerateMipmap"],
+ "", ["SGIS_generate_mipmap"] ),
+
+ # GL_ARB_vertex_buffer_object
+ ( "GL_ARRAY_BUFFER_BINDING_ARB", GLint,
+ ["ctx->Array.ArrayBufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
+ # GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB - not supported
+ ( "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB", GLint,
+ ["ctx->Array.ElementArrayBufferObj->Name"],
+ "", ["ARB_vertex_buffer_object"] ),
+
+ # GL_OES_read_format
+ ( "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES", GLint,
+ ["_mesa_get_color_read_type(ctx)"], "", ["OES_read_format"] ),
+ ( "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES", GLint,
+ ["_mesa_get_color_read_format(ctx)"], "", ["OES_read_format"] ),
+
+ # GL_OES_framebuffer_object
+ ( "GL_FRAMEBUFFER_BINDING_EXT", GLint, ["ctx->DrawBuffer->Name"], "",
+ None),
+ ( "GL_RENDERBUFFER_BINDING_EXT", GLint,
+ ["ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0"], "",
+ None),
+ ( "GL_MAX_RENDERBUFFER_SIZE_EXT", GLint,
+ ["ctx->Const.MaxRenderbufferSize"], "",
+ None),
+
+ # OpenGL ES 1/2 special:
+ ( "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB", GLint,
+ [ "ARRAY_SIZE(compressed_formats)" ],
+ "",
+ None ),
+
+ ("GL_COMPRESSED_TEXTURE_FORMATS_ARB", GLint,
+ [],
+ """
+ int i;
+ for (i = 0; i < ARRAY_SIZE(compressed_formats); i++) {
+ params[i] = compressed_formats[i];
+ }""",
+ None ),
+
+ ( "GL_POLYGON_OFFSET_FILL", GLboolean, ["ctx->Polygon.OffsetFill"], "", None ),
+
+]
+
+# Only present in ES 1.x:
+StateVars_es1 = [
+ ( "GL_MAX_LIGHTS", GLint, ["ctx->Const.MaxLights"], "", None ),
+ ( "GL_LIGHT0", GLboolean, ["ctx->Light.Light[0].Enabled"], "", None ),
+ ( "GL_LIGHT1", GLboolean, ["ctx->Light.Light[1].Enabled"], "", None ),
+ ( "GL_LIGHT2", GLboolean, ["ctx->Light.Light[2].Enabled"], "", None ),
+ ( "GL_LIGHT3", GLboolean, ["ctx->Light.Light[3].Enabled"], "", None ),
+ ( "GL_LIGHT4", GLboolean, ["ctx->Light.Light[4].Enabled"], "", None ),
+ ( "GL_LIGHT5", GLboolean, ["ctx->Light.Light[5].Enabled"], "", None ),
+ ( "GL_LIGHT6", GLboolean, ["ctx->Light.Light[6].Enabled"], "", None ),
+ ( "GL_LIGHT7", GLboolean, ["ctx->Light.Light[7].Enabled"], "", None ),
+ ( "GL_LIGHTING", GLboolean, ["ctx->Light.Enabled"], "", None ),
+ ( "GL_LIGHT_MODEL_AMBIENT", GLfloatN,
+ ["ctx->Light.Model.Ambient[0]",
+ "ctx->Light.Model.Ambient[1]",
+ "ctx->Light.Model.Ambient[2]",
+ "ctx->Light.Model.Ambient[3]"], "", None ),
+ ( "GL_LIGHT_MODEL_TWO_SIDE", GLboolean, ["ctx->Light.Model.TwoSide"], "", None ),
+ ( "GL_ALPHA_TEST", GLboolean, ["ctx->Color.AlphaEnabled"], "", None ),
+ ( "GL_ALPHA_TEST_FUNC", GLenum, ["ctx->Color.AlphaFunc"], "", None ),
+ ( "GL_ALPHA_TEST_REF", GLfloatN, ["ctx->Color.AlphaRef"], "", None ),
+ ( "GL_BLEND_DST", GLenum, ["ctx->Color.BlendDstRGB"], "", None ),
+ ( "GL_MAX_CLIP_PLANES", GLint, ["ctx->Const.MaxClipPlanes"], "", None ),
+ ( "GL_CLIP_PLANE0", GLboolean,
+ [ "(ctx->Transform.ClipPlanesEnabled >> 0) & 1" ], "", None ),
+ ( "GL_CLIP_PLANE1", GLboolean,
+ [ "(ctx->Transform.ClipPlanesEnabled >> 1) & 1" ], "", None ),
+ ( "GL_CLIP_PLANE2", GLboolean,
+ [ "(ctx->Transform.ClipPlanesEnabled >> 2) & 1" ], "", None ),
+ ( "GL_CLIP_PLANE3", GLboolean,
+ [ "(ctx->Transform.ClipPlanesEnabled >> 3) & 1" ], "", None ),
+ ( "GL_CLIP_PLANE4", GLboolean,
+ [ "(ctx->Transform.ClipPlanesEnabled >> 4) & 1" ], "", None ),
+ ( "GL_CLIP_PLANE5", GLboolean,
+ [ "(ctx->Transform.ClipPlanesEnabled >> 5) & 1" ], "", None ),
+ ( "GL_COLOR_MATERIAL", GLboolean,
+ ["ctx->Light.ColorMaterialEnabled"], "", None ),
+ ( "GL_CURRENT_COLOR", GLfloatN,
+ [ "ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0]",
+ "ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1]",
+ "ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2]",
+ "ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3]" ],
+ "FLUSH_CURRENT(ctx, 0);", None ),
+ ( "GL_CURRENT_NORMAL", GLfloatN,
+ [ "ctx->Current.Attrib[VERT_ATTRIB_NORMAL][0]",
+ "ctx->Current.Attrib[VERT_ATTRIB_NORMAL][1]",
+ "ctx->Current.Attrib[VERT_ATTRIB_NORMAL][2]"],
+ "FLUSH_CURRENT(ctx, 0);", None ),
+ ( "GL_CURRENT_TEXTURE_COORDS", GLfloat,
+ ["ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][0]",
+ "ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][1]",
+ "ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][2]",
+ "ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texUnit][3]"],
+ "const GLuint texUnit = ctx->Texture.CurrentUnit;", None ),
+ ( "GL_DISTANCE_ATTENUATION_EXT", GLfloat,
+ ["ctx->Point.Params[0]",
+ "ctx->Point.Params[1]",
+ "ctx->Point.Params[2]"], "", None ),
+ ( "GL_FOG", GLboolean, ["ctx->Fog.Enabled"], "", None ),
+ ( "GL_FOG_COLOR", GLfloatN,
+ [ "ctx->Fog.Color[0]",
+ "ctx->Fog.Color[1]",
+ "ctx->Fog.Color[2]",
+ "ctx->Fog.Color[3]" ], "", None ),
+ ( "GL_FOG_DENSITY", GLfloat, ["ctx->Fog.Density"], "", None ),
+ ( "GL_FOG_END", GLfloat, ["ctx->Fog.End"], "", None ),
+ ( "GL_FOG_HINT", GLenum, ["ctx->Hint.Fog"], "", None ),
+ ( "GL_FOG_MODE", GLenum, ["ctx->Fog.Mode"], "", None ),
+ ( "GL_FOG_START", GLfloat, ["ctx->Fog.Start"], "", None ),
+ ( "GL_LINE_SMOOTH", GLboolean, ["ctx->Line.SmoothFlag"], "", None ),
+ ( "GL_LINE_SMOOTH_HINT", GLenum, ["ctx->Hint.LineSmooth"], "", None ),
+ ( "GL_LINE_WIDTH_RANGE", GLfloat,
+ ["ctx->Const.MinLineWidthAA",
+ "ctx->Const.MaxLineWidthAA"], "", None ),
+ ( "GL_COLOR_LOGIC_OP", GLboolean, ["ctx->Color.ColorLogicOpEnabled"], "", None ),
+ ( "GL_LOGIC_OP_MODE", GLenum, ["ctx->Color.LogicOp"], "", None ),
+ ( "GL_MATRIX_MODE", GLenum, ["ctx->Transform.MatrixMode"], "", None ),
+
+ ( "GL_MAX_MODELVIEW_STACK_DEPTH", GLint, ["MAX_MODELVIEW_STACK_DEPTH"], "", None ),
+ ( "GL_MAX_PROJECTION_STACK_DEPTH", GLint, ["MAX_PROJECTION_STACK_DEPTH"], "", None ),
+ ( "GL_MAX_TEXTURE_STACK_DEPTH", GLint, ["MAX_TEXTURE_STACK_DEPTH"], "", None ),
+ ( "GL_MODELVIEW_MATRIX", GLfloat,
+ [ "matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]",
+ "matrix[4]", "matrix[5]", "matrix[6]", "matrix[7]",
+ "matrix[8]", "matrix[9]", "matrix[10]", "matrix[11]",
+ "matrix[12]", "matrix[13]", "matrix[14]", "matrix[15]" ],
+ "const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;", None ),
+ ( "GL_MODELVIEW_STACK_DEPTH", GLint, ["ctx->ModelviewMatrixStack.Depth + 1"], "", None ),
+ ( "GL_NORMALIZE", GLboolean, ["ctx->Transform.Normalize"], "", None ),
+ ( "GL_PACK_SKIP_IMAGES_EXT", GLint, ["ctx->Pack.SkipImages"], "", None ),
+ ( "GL_PERSPECTIVE_CORRECTION_HINT", GLenum,
+ ["ctx->Hint.PerspectiveCorrection"], "", None ),
+ ( "GL_POINT_SIZE", GLfloat, ["ctx->Point.Size"], "", None ),
+ ( "GL_POINT_SIZE_RANGE", GLfloat,
+ ["ctx->Const.MinPointSizeAA",
+ "ctx->Const.MaxPointSizeAA"], "", None ),
+ ( "GL_POINT_SMOOTH", GLboolean, ["ctx->Point.SmoothFlag"], "", None ),
+ ( "GL_POINT_SMOOTH_HINT", GLenum, ["ctx->Hint.PointSmooth"], "", None ),
+ ( "GL_POINT_SIZE_MIN_EXT", GLfloat, ["ctx->Point.MinSize"], "", None ),
+ ( "GL_POINT_SIZE_MAX_EXT", GLfloat, ["ctx->Point.MaxSize"], "", None ),
+ ( "GL_POINT_FADE_THRESHOLD_SIZE_EXT", GLfloat,
+ ["ctx->Point.Threshold"], "", None ),
+ ( "GL_PROJECTION_MATRIX", GLfloat,
+ [ "matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]",
+ "matrix[4]", "matrix[5]", "matrix[6]", "matrix[7]",
+ "matrix[8]", "matrix[9]", "matrix[10]", "matrix[11]",
+ "matrix[12]", "matrix[13]", "matrix[14]", "matrix[15]" ],
+ "const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;", None ),
+ ( "GL_PROJECTION_STACK_DEPTH", GLint,
+ ["ctx->ProjectionMatrixStack.Depth + 1"], "", None ),
+ ( "GL_RESCALE_NORMAL", GLboolean,
+ ["ctx->Transform.RescaleNormals"], "", None ),
+ ( "GL_SHADE_MODEL", GLenum, ["ctx->Light.ShadeModel"], "", None ),
+ ( "GL_TEXTURE_2D", GLboolean, ["_mesa_IsEnabled(GL_TEXTURE_2D)"], "", None ),
+ ( "GL_TEXTURE_MATRIX", GLfloat,
+ ["matrix[0]", "matrix[1]", "matrix[2]", "matrix[3]",
+ "matrix[4]", "matrix[5]", "matrix[6]", "matrix[7]",
+ "matrix[8]", "matrix[9]", "matrix[10]", "matrix[11]",
+ "matrix[12]", "matrix[13]", "matrix[14]", "matrix[15]" ],
+ "const GLfloat *matrix = ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;", None ),
+ ( "GL_TEXTURE_STACK_DEPTH", GLint,
+ ["ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Depth + 1"], "", None ),
+ ( "GL_VERTEX_ARRAY", GLboolean, ["ctx->Array.ArrayObj->Vertex.Enabled"], "", None ),
+ ( "GL_VERTEX_ARRAY_SIZE", GLint, ["ctx->Array.ArrayObj->Vertex.Size"], "", None ),
+ ( "GL_VERTEX_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Vertex.Type"], "", None ),
+ ( "GL_VERTEX_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Vertex.Stride"], "", None ),
+ ( "GL_NORMAL_ARRAY", GLenum, ["ctx->Array.ArrayObj->Normal.Enabled"], "", None ),
+ ( "GL_NORMAL_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Normal.Type"], "", None ),
+ ( "GL_NORMAL_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Normal.Stride"], "", None ),
+ ( "GL_COLOR_ARRAY", GLboolean, ["ctx->Array.ArrayObj->Color.Enabled"], "", None ),
+ ( "GL_COLOR_ARRAY_SIZE", GLint, ["ctx->Array.ArrayObj->Color.Size"], "", None ),
+ ( "GL_COLOR_ARRAY_TYPE", GLenum, ["ctx->Array.ArrayObj->Color.Type"], "", None ),
+ ( "GL_COLOR_ARRAY_STRIDE", GLint, ["ctx->Array.ArrayObj->Color.Stride"], "", None ),
+ ( "GL_TEXTURE_COORD_ARRAY", GLboolean,
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Enabled"], "", None ),
+ ( "GL_TEXTURE_COORD_ARRAY_SIZE", GLint,
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Size"], "", None ),
+ ( "GL_TEXTURE_COORD_ARRAY_TYPE", GLenum,
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Type"], "", None ),
+ ( "GL_TEXTURE_COORD_ARRAY_STRIDE", GLint,
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].Stride"], "", None ),
+ # GL_ARB_multitexture
+ ( "GL_MAX_TEXTURE_UNITS_ARB", GLint,
+ ["ctx->Const.MaxTextureUnits"], "", ["ARB_multitexture"] ),
+ ( "GL_CLIENT_ACTIVE_TEXTURE_ARB", GLint,
+ ["GL_TEXTURE0_ARB + ctx->Array.ActiveTexture"], "", ["ARB_multitexture"] ),
+ # OES_texture_cube_map
+ ( "GL_TEXTURE_CUBE_MAP_ARB", GLboolean,
+ ["_mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB)"], "", None),
+ ( "GL_TEXTURE_GEN_STR_OES", GLboolean,
+ # S, T, and R are always set at the same time
+ ["((ctx->Texture.Unit[ctx->Texture.CurrentUnit].TexGenEnabled & S_BIT) ? 1 : 0)"], "", None),
+ # ARB_multisample
+ ( "GL_MULTISAMPLE_ARB", GLboolean,
+ ["ctx->Multisample.Enabled"], "", ["ARB_multisample"] ),
+ ( "GL_SAMPLE_ALPHA_TO_ONE_ARB", GLboolean,
+ ["ctx->Multisample.SampleAlphaToOne"], "", ["ARB_multisample"] ),
+
+ ( "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB", GLint,
+ ["ctx->Array.ArrayObj->Vertex.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
+ ( "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB", GLint,
+ ["ctx->Array.ArrayObj->Normal.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
+ ( "GL_COLOR_ARRAY_BUFFER_BINDING_ARB", GLint,
+ ["ctx->Array.ArrayObj->Color.BufferObj->Name"], "", ["ARB_vertex_buffer_object"] ),
+ ( "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB", GLint,
+ ["ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name"],
+ "", ["ARB_vertex_buffer_object"] ),
+
+ # OES_point_sprite
+ ( "GL_POINT_SPRITE_NV", GLboolean, ["ctx->Point.PointSprite"], # == GL_POINT_SPRITE_ARB
+ "", None),
+
+ # GL_ARB_fragment_shader
+ ( "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB", GLint,
+ ["ctx->Const.FragmentProgram.MaxUniformComponents"], "",
+ ["ARB_fragment_shader"] ),
+
+ # GL_ARB_vertex_shader
+ ( "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB", GLint,
+ ["ctx->Const.VertexProgram.MaxUniformComponents"], "",
+ ["ARB_vertex_shader"] ),
+ ( "GL_MAX_VARYING_FLOATS_ARB", GLint,
+ ["ctx->Const.MaxVarying * 4"], "", ["ARB_vertex_shader"] ),
+
+ # OES_matrix_get
+ ( "GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES", GLint, [],
+ """
+ /* See GL_OES_matrix_get */
+ {
+ const GLfloat *matrix = ctx->ModelviewMatrixStack.Top->m;
+ memcpy(params, matrix, 16 * sizeof(GLint));
+ }""",
+ None),
+
+ ( "GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES", GLint, [],
+ """
+ /* See GL_OES_matrix_get */
+ {
+ const GLfloat *matrix = ctx->ProjectionMatrixStack.Top->m;
+ memcpy(params, matrix, 16 * sizeof(GLint));
+ }""",
+ None),
+
+ ( "GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES", GLint, [],
+ """
+ /* See GL_OES_matrix_get */
+ {
+ const GLfloat *matrix =
+ ctx->TextureMatrixStack[ctx->Texture.CurrentUnit].Top->m;
+ memcpy(params, matrix, 16 * sizeof(GLint));
+ }""",
+ None),
+
+ # OES_point_size_array
+ ("GL_POINT_SIZE_ARRAY_OES", GLboolean,
+ ["ctx->Array.ArrayObj->PointSize.Enabled"], "", None),
+ ("GL_POINT_SIZE_ARRAY_TYPE_OES", GLenum,
+ ["ctx->Array.ArrayObj->PointSize.Type"], "", None),
+ ("GL_POINT_SIZE_ARRAY_STRIDE_OES", GLint,
+ ["ctx->Array.ArrayObj->PointSize.Stride"], "", None),
+ ("GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES", GLint,
+ ["ctx->Array.ArrayObj->PointSize.BufferObj->Name"], "", None),
+
+ # GL_EXT_texture_lod_bias
+ ( "GL_MAX_TEXTURE_LOD_BIAS_EXT", GLfloat,
+ ["ctx->Const.MaxTextureLodBias"], "", ["EXT_texture_lod_bias"]),
+
+ # GL_EXT_texture_filter_anisotropic
+ ( "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT", GLfloat,
+ ["ctx->Const.MaxTextureMaxAnisotropy"], "", ["EXT_texture_filter_anisotropic"]),
+
+]
+
+# Only present in ES 2.x:
+StateVars_es2 = [
+ # XXX These entries are not spec'ed for GLES 2, but are
+ # needed for Mesa's GLSL:
+ ( "GL_MAX_LIGHTS", GLint, ["ctx->Const.MaxLights"], "", None ),
+ ( "GL_MAX_CLIP_PLANES", GLint, ["ctx->Const.MaxClipPlanes"], "", None ),
+ ( "GL_MAX_TEXTURE_COORDS_ARB", GLint, # == GL_MAX_TEXTURE_COORDS_NV
+ ["ctx->Const.MaxTextureCoordUnits"], "",
+ ["ARB_fragment_program", "NV_fragment_program"] ),
+ ( "GL_MAX_DRAW_BUFFERS_ARB", GLint,
+ ["ctx->Const.MaxDrawBuffers"], "", ["ARB_draw_buffers"] ),
+ ( "GL_BLEND_COLOR_EXT", GLfloatN,
+ [ "ctx->Color.BlendColor[0]",
+ "ctx->Color.BlendColor[1]",
+ "ctx->Color.BlendColor[2]",
+ "ctx->Color.BlendColor[3]"], "", None ),
+
+ # This is required for GLES2, but also needed for GLSL:
+ ( "GL_MAX_TEXTURE_IMAGE_UNITS_ARB", GLint, # == GL_MAX_TEXTURE_IMAGE_UNI
+ ["ctx->Const.MaxTextureImageUnits"], "",
+ ["ARB_fragment_program", "NV_fragment_program"] ),
+
+ ( "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"] ),
+
+ # GL_ARB_shader_objects
+ # Actually, this token isn't part of GL_ARB_shader_objects, but is
+ # close enough for now.
+ ( "GL_CURRENT_PROGRAM", GLint,
+ ["ctx->Shader.CurrentProgram ? ctx->Shader.CurrentProgram->Name : 0"],
+ "", ["ARB_shader_objects"] ),
+
+ # OpenGL 2.0
+ ( "GL_STENCIL_BACK_FUNC", GLenum, ["ctx->Stencil.Function[1]"], "", None ),
+ ( "GL_STENCIL_BACK_VALUE_MASK", GLint, ["ctx->Stencil.ValueMask[1]"], "", None ),
+ ( "GL_STENCIL_BACK_WRITEMASK", GLint, ["ctx->Stencil.WriteMask[1]"], "", None ),
+ ( "GL_STENCIL_BACK_REF", GLint, ["ctx->Stencil.Ref[1]"], "", None ),
+ ( "GL_STENCIL_BACK_FAIL", GLenum, ["ctx->Stencil.FailFunc[1]"], "", None ),
+ ( "GL_STENCIL_BACK_PASS_DEPTH_FAIL", GLenum, ["ctx->Stencil.ZFailFunc[1]"], "", None ),
+ ( "GL_STENCIL_BACK_PASS_DEPTH_PASS", GLenum, ["ctx->Stencil.ZPassFunc[1]"], "", None ),
+
+ ( "GL_MAX_VERTEX_ATTRIBS_ARB", GLint,
+ ["ctx->Const.VertexProgram.MaxAttribs"], "", ["ARB_vertex_program"] ),
+
+ # OES_texture_3D
+ ( "GL_TEXTURE_BINDING_3D", GLint,
+ ["ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentTex[TEXTURE_3D_INDEX]->Name"], "", None),
+ ( "GL_MAX_3D_TEXTURE_SIZE", GLint, ["1 << (ctx->Const.Max3DTextureLevels - 1)"], "", None),
+
+ # OES_standard_derivatives
+ ( "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB", GLenum,
+ ["ctx->Hint.FragmentShaderDerivative"], "", ["ARB_fragment_shader"] ),
+
+ # Unique to ES 2 (not in full GL)
+ ( "GL_MAX_FRAGMENT_UNIFORM_VECTORS", GLint,
+ ["ctx->Const.FragmentProgram.MaxUniformComponents / 4"], "", None),
+ ( "GL_MAX_VARYING_VECTORS", GLint,
+ ["ctx->Const.MaxVarying"], "", None),
+ ( "GL_MAX_VERTEX_UNIFORM_VECTORS", GLint,
+ ["ctx->Const.VertexProgram.MaxUniformComponents / 4"], "", None),
+ ( "GL_SHADER_COMPILER", GLint, ["1"], "", None),
+ # OES_get_program_binary
+ ( "GL_NUM_SHADER_BINARY_FORMATS", GLint, ["0"], "", None),
+ ( "GL_SHADER_BINARY_FORMATS", GLint, [], "", None),
+]
+
+
+
+def ConversionFunc(fromType, toType):
+ """Return the name of the macro to convert between two data types."""
+ if fromType == toType:
+ return ""
+ elif fromType == GLfloat and toType == GLint:
+ return "IROUND"
+ elif fromType == GLfloatN and toType == GLfloat:
+ return ""
+ elif fromType == GLint and toType == GLfloat: # but not GLfloatN!
+ return "(GLfloat)"
+ else:
+ if fromType == GLfloatN:
+ fromType = GLfloat
+ fromStr = TypeStrings[fromType]
+ fromStr = string.upper(fromStr[2:])
+ toStr = TypeStrings[toType]
+ toStr = string.upper(toStr[2:])
+ return fromStr + "_TO_" + toStr
+
+
+def EmitGetFunction(stateVars, returnType):
+ """Emit the code to implement glGetBooleanv, glGetIntegerv or glGetFloatv."""
+ assert (returnType == GLboolean or
+ returnType == GLint or
+ returnType == GLfloat or
+ returnType == GLfixed)
+
+ strType = TypeStrings[returnType]
+ # Capitalize first letter of return type
+ if returnType == GLint:
+ function = "_mesa_GetIntegerv"
+ elif returnType == GLboolean:
+ function = "_mesa_GetBooleanv"
+ elif returnType == GLfloat:
+ function = "_mesa_GetFloatv"
+ elif returnType == GLfixed:
+ function = "_mesa_GetFixedv"
+ else:
+ abort()
+
+ print "void GLAPIENTRY"
+ print "%s( GLenum pname, %s *params )" % (function, strType)
+ print "{"
+ print " GET_CURRENT_CONTEXT(ctx);"
+ print " ASSERT_OUTSIDE_BEGIN_END(ctx);"
+ print ""
+ print " if (!params)"
+ print " return;"
+ print ""
+ print " if (ctx->NewState)"
+ print " _mesa_update_state(ctx);"
+ print ""
+ print " switch (pname) {"
+
+ for (name, varType, state, optionalCode, extensions) in stateVars:
+ print " case " + name + ":"
+ if extensions:
+ if len(extensions) == 1:
+ print (' CHECK_EXT1(%s, "%s");' %
+ (extensions[0], function))
+ elif len(extensions) == 2:
+ print (' CHECK_EXT2(%s, %s, "%s");' %
+ (extensions[0], extensions[1], function))
+ elif len(extensions) == 3:
+ print (' CHECK_EXT3(%s, %s, %s, "%s");' %
+ (extensions[0], extensions[1], extensions[2], function))
+ else:
+ assert len(extensions) == 4
+ print (' CHECK_EXT4(%s, %s, %s, %s, "%s");' %
+ (extensions[0], extensions[1], extensions[2], extensions[3], function))
+ if optionalCode:
+ print " {"
+ print " " + optionalCode
+ conversion = ConversionFunc(varType, returnType)
+ n = len(state)
+ for i in range(n):
+ if conversion:
+ print " params[%d] = %s(%s);" % (i, conversion, state[i])
+ else:
+ print " params[%d] = %s;" % (i, state[i])
+ if optionalCode:
+ print " }"
+ print " break;"
+
+ print " default:"
+ print ' _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(pname=0x%%x)", pname);' % function
+ print " }"
+ print "}"
+ print ""
+ return
+
+
+
+def EmitHeader():
+ """Print the get.c file header."""
+ print """
+/***
+ *** NOTE!!! DO NOT EDIT THIS FILE!!! IT IS GENERATED BY get_gen.py
+ ***/
+
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/enable.h"
+#include "main/extensions.h"
+#include "main/fbobject.h"
+#include "main/get.h"
+#include "main/macros.h"
+#include "main/mtypes.h"
+#include "main/state.h"
+#include "main/texcompress.h"
+#include "main/framebuffer.h"
+
+
+/* ES1 tokens that should be in gl.h but aren't */
+#define GL_MAX_ELEMENTS_INDICES 0x80E9
+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
+
+
+/* ES2 special tokens */
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
+#define GL_MAX_VARYING_VECTORS 0x8DFC
+#define GL_MAX_VARYING_VECTORS 0x8DFC
+#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
+#define GL_SHADER_COMPILER 0x8DFA
+#define GL_PLATFORM_BINARY 0x8D63
+#define GL_SHADER_BINARY_FORMATS 0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
+
+
+#ifndef GL_OES_matrix_get
+#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D
+#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E
+#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F
+#endif
+
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_PALETTE4_RGB8_OES 0x8B90
+#define GL_PALETTE4_RGBA8_OES 0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
+#define GL_PALETTE4_RGBA4_OES 0x8B93
+#define GL_PALETTE4_RGB5_A1_OES 0x8B94
+#define GL_PALETTE8_RGB8_OES 0x8B95
+#define GL_PALETTE8_RGBA8_OES 0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
+#define GL_PALETTE8_RGBA4_OES 0x8B98
+#define GL_PALETTE8_RGB5_A1_OES 0x8B99
+#endif
+
+/* GL_OES_texture_cube_map */
+#ifndef GL_OES_texture_cube_map
+#define GL_TEXTURE_GEN_STR_OES 0x8D60
+#endif
+
+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
+#define FLOAT_TO_FIXED(F) ( ((F) * 65536.0f > INT_MAX) ? INT_MAX : \\
+ ((F) * 65536.0f < INT_MIN) ? INT_MIN : \\
+ (GLint) ((F) * 65536.0f) )
+
+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
+#define INT_TO_FIXED(I) ( ((I) > SHRT_MAX) ? INT_MAX : \\
+ ((I) < SHRT_MIN) ? INT_MIN : \\
+ (GLint) ((I) * 65536) )
+
+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
+#define BOOLEAN_TO_FIXED(B) ( (GLint) ((B) ? 1 : 0) << 16 )
+
+#define ENUM_TO_FIXED(E) (E)
+
+
+/*
+ * Check if named extension is enabled, if not generate error and return.
+ */
+#define CHECK_EXT1(EXT1, FUNC) \\
+ if (!ctx->Extensions.EXT1) { \\
+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \\
+ return; \\
+ }
+
+/*
+ * Check if either of two extensions is enabled.
+ */
+#define CHECK_EXT2(EXT1, EXT2, FUNC) \\
+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \\
+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \\
+ return; \\
+ }
+
+/*
+ * Check if either of three extensions is enabled.
+ */
+#define CHECK_EXT3(EXT1, EXT2, EXT3, FUNC) \\
+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \\
+ !ctx->Extensions.EXT3) { \\
+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \\
+ return; \\
+ }
+
+/*
+ * Check if either of four extensions is enabled.
+ */
+#define CHECK_EXT4(EXT1, EXT2, EXT3, EXT4, FUNC) \\
+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2 && \\
+ !ctx->Extensions.EXT3 && !ctx->Extensions.EXT4) { \\
+ _mesa_error(ctx, GL_INVALID_ENUM, FUNC "(0x%x)", (int) pname); \\
+ return; \\
+ }
+
+
+
+/**
+ * List of compressed texture formats supported by ES.
+ */
+static GLenum compressed_formats[] = {
+ GL_PALETTE4_RGB8_OES,
+ GL_PALETTE4_RGBA8_OES,
+ GL_PALETTE4_R5_G6_B5_OES,
+ GL_PALETTE4_RGBA4_OES,
+ GL_PALETTE4_RGB5_A1_OES,
+ GL_PALETTE8_RGB8_OES,
+ GL_PALETTE8_RGBA8_OES,
+ GL_PALETTE8_R5_G6_B5_OES,
+ GL_PALETTE8_RGBA4_OES,
+ GL_PALETTE8_RGB5_A1_OES
+};
+
+#define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0]))
+
+void GLAPIENTRY
+_mesa_GetFixedv( GLenum pname, GLfixed *params );
+
+"""
+ return
+
+
+def EmitAll(stateVars, API):
+ EmitHeader()
+ EmitGetFunction(stateVars, GLboolean)
+ EmitGetFunction(stateVars, GLfloat)
+ EmitGetFunction(stateVars, GLint)
+ if API == 1:
+ EmitGetFunction(stateVars, GLfixed)
+
+
+def main(args):
+ # Determine whether to generate ES1 or ES2 queries
+ if len(args) > 1 and args[1] == "1":
+ API = 1
+ elif len(args) > 1 and args[1] == "2":
+ API = 2
+ else:
+ API = 1
+ #print "len args = %d API = %d" % (len(args), API)
+
+ if API == 1:
+ vars = StateVars_common + StateVars_es1
+ else:
+ vars = StateVars_common + StateVars_es2
+
+ EmitAll(vars, API)
+
+
+main(sys.argv)
diff --git a/src/mesa/es/main/mfeatures_es1.h b/src/mesa/es/main/mfeatures_es1.h
new file mode 100644
index 00000000000..6c2ece26080
--- /dev/null
+++ b/src/mesa/es/main/mfeatures_es1.h
@@ -0,0 +1,116 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * \file mfeatures.h
+ *
+ * The #defines in this file enable/disable Mesa features needed
+ * for OpenGL ES 1.1.
+ */
+
+
+#ifndef MFEATURES_ES1_H
+#define MFEATURES_ES1_H
+
+/* this file replaces main/mfeatures.h */
+#ifdef FEATURES_H
+#error "main/mfeatures.h was wrongly included"
+#endif
+#define FEATURES_H
+
+#define ASSERT_NO_FEATURE() ASSERT(0)
+
+/*
+ * Enable/disable features (blocks of code) by setting FEATURE_xyz to 0 or 1.
+ */
+#ifndef _HAVE_FULL_GL
+#define _HAVE_FULL_GL 1
+#endif
+
+#ifdef IN_DRI_DRIVER
+#define FEATURE_remap_table 1
+#else
+#define FEATURE_remap_table 0
+#endif
+
+#define FEATURE_accum 0
+#define FEATURE_arrayelt 0
+#define FEATURE_attrib 0
+#define FEATURE_beginend 0
+#define FEATURE_colortable 0
+#define FEATURE_convolve 0
+#define FEATURE_dispatch 1
+#define FEATURE_dlist 0
+#define FEATURE_draw_read_buffer 0
+#define FEATURE_drawpix 0
+#define FEATURE_eval 0
+#define FEATURE_feedback 0
+#define FEATURE_fixedpt 1
+#define FEATURE_histogram 0
+#define FEATURE_pixel 0
+#define FEATURE_point_size_array 1
+#define FEATURE_queryobj 0
+#define FEATURE_rastpos 0
+#define FEATURE_texgen 1
+#define FEATURE_texture_fxt1 0
+#define FEATURE_texture_s3tc 0
+#define FEATURE_userclip 1
+#define FEATURE_vertex_array_byte 1
+#define FEATURE_es2_glsl 0
+
+#define FEATURE_ARB_fragment_program _HAVE_FULL_GL
+#define FEATURE_ARB_vertex_buffer_object _HAVE_FULL_GL
+#define FEATURE_ARB_vertex_program _HAVE_FULL_GL
+
+#define FEATURE_ARB_vertex_shader _HAVE_FULL_GL
+#define FEATURE_ARB_fragment_shader _HAVE_FULL_GL
+#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader)
+#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects
+#define FEATURE_ARB_shading_language_120 FEATURE_ARB_shader_objects
+
+#define FEATURE_EXT_framebuffer_blit 0
+#define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL
+#define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL
+#define FEATURE_EXT_texture_sRGB 0
+#define FEATURE_ATI_fragment_shader 0
+#define FEATURE_MESA_program_debug _HAVE_FULL_GL
+#define FEATURE_NV_fence 0
+#define FEATURE_NV_fragment_program 0
+#define FEATURE_NV_vertex_program 0
+
+#define FEATURE_OES_framebuffer_object 1
+#define FEATURE_OES_draw_texture 1
+#define FEATURE_OES_mapbuffer 1
+
+#define FEATURE_extra_context_init 1
+
+/*@}*/
+
+
+
+
+#endif /* MFEATURES_ES1_H */
diff --git a/src/mesa/es/main/mfeatures_es2.h b/src/mesa/es/main/mfeatures_es2.h
new file mode 100644
index 00000000000..f34782fedb9
--- /dev/null
+++ b/src/mesa/es/main/mfeatures_es2.h
@@ -0,0 +1,116 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+/**
+ * \file mfeatures.h
+ *
+ * The #defines in this file enable/disable Mesa features needed
+ * for OpenGL ES 2.0.
+ */
+
+
+#ifndef MFEATURES_ES2_H
+#define MFEATURES_ES2_H
+
+/* this file replaces main/mfeatures.h */
+#ifdef FEATURES_H
+#error "main/mfeatures.h was wrongly included"
+#endif
+#define FEATURES_H
+
+#define ASSERT_NO_FEATURE() ASSERT(0)
+
+/*
+ * Enable/disable features (blocks of code) by setting FEATURE_xyz to 0 or 1.
+ */
+#ifndef _HAVE_FULL_GL
+#define _HAVE_FULL_GL 1
+#endif
+
+#ifdef IN_DRI_DRIVER
+#define FEATURE_remap_table 1
+#else
+#define FEATURE_remap_table 0
+#endif
+
+#define FEATURE_accum 0
+#define FEATURE_arrayelt 0
+#define FEATURE_attrib 0
+#define FEATURE_beginend 0
+#define FEATURE_colortable 0
+#define FEATURE_convolve 0
+#define FEATURE_dispatch 1
+#define FEATURE_dlist 0
+#define FEATURE_draw_read_buffer 0
+#define FEATURE_drawpix 0
+#define FEATURE_eval 0
+#define FEATURE_feedback 0
+#define FEATURE_fixedpt 1
+#define FEATURE_histogram 0
+#define FEATURE_pixel 0
+#define FEATURE_point_size_array 1
+#define FEATURE_queryobj 0
+#define FEATURE_rastpos 0
+#define FEATURE_texgen 1
+#define FEATURE_texture_fxt1 0
+#define FEATURE_texture_s3tc 0
+#define FEATURE_userclip 1
+#define FEATURE_vertex_array_byte 1
+#define FEATURE_es2_glsl 1
+
+#define FEATURE_ARB_fragment_program _HAVE_FULL_GL
+#define FEATURE_ARB_vertex_buffer_object _HAVE_FULL_GL
+#define FEATURE_ARB_vertex_program _HAVE_FULL_GL
+
+#define FEATURE_ARB_vertex_shader _HAVE_FULL_GL
+#define FEATURE_ARB_fragment_shader _HAVE_FULL_GL
+#define FEATURE_ARB_shader_objects (FEATURE_ARB_vertex_shader || FEATURE_ARB_fragment_shader)
+#define FEATURE_ARB_shading_language_100 FEATURE_ARB_shader_objects
+#define FEATURE_ARB_shading_language_120 FEATURE_ARB_shader_objects
+
+#define FEATURE_EXT_framebuffer_blit 0
+#define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL
+#define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL
+#define FEATURE_EXT_texture_sRGB 0
+#define FEATURE_ATI_fragment_shader 0
+#define FEATURE_MESA_program_debug _HAVE_FULL_GL
+#define FEATURE_NV_fence 0
+#define FEATURE_NV_fragment_program 0
+#define FEATURE_NV_vertex_program 0
+
+#define FEATURE_OES_framebuffer_object 1
+#define FEATURE_OES_draw_texture 0
+#define FEATURE_OES_mapbuffer 1
+
+#define FEATURE_extra_context_init 1
+
+/*@}*/
+
+
+
+
+#endif /* MFEATURES_ES2_H */
diff --git a/src/mesa/es/main/specials_es1.c b/src/mesa/es/main/specials_es1.c
new file mode 100644
index 00000000000..a4f14490f31
--- /dev/null
+++ b/src/mesa/es/main/specials_es1.c
@@ -0,0 +1,213 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * TUNGSTEN GRAPHICS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ **************************************************************************/
+
+
+#include "main/mtypes.h"
+#include "main/context.h"
+#include "main/imports.h"
+#include "main/get.h"
+
+
+extern const GLubyte * GLAPIENTRY _es_GetString(GLenum name);
+
+
+static const GLubyte *
+compute_es_version(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ static const char es_1_0[] = "OpenGL ES-CM 1.0";
+ static const char es_1_1[] = "OpenGL ES-CM 1.1";
+ /* OpenGL ES 1.0 is derived from OpenGL 1.3 */
+ const GLboolean ver_1_0 = (ctx->Extensions.ARB_multisample &&
+ ctx->Extensions.ARB_multitexture &&
+ ctx->Extensions.ARB_texture_compression &&
+ ctx->Extensions.EXT_texture_env_add &&
+ ctx->Extensions.ARB_texture_env_combine &&
+ ctx->Extensions.ARB_texture_env_dot3);
+ /* OpenGL ES 1.1 is derived from OpenGL 1.5 */
+ const GLboolean ver_1_1 = (ver_1_0 &&
+ ctx->Extensions.EXT_point_parameters &&
+ ctx->Extensions.SGIS_generate_mipmap &&
+ ctx->Extensions.ARB_vertex_buffer_object);
+ if (ver_1_1)
+ return (const GLubyte *) es_1_1;
+
+ if (!ver_1_0)
+ _mesa_problem(ctx, "Incomplete OpenGL ES 1.0 support.");
+ return (const GLubyte *) es_1_0;
+}
+
+
+static size_t
+append_extension(char **str, const char *ext)
+{
+ char *s = *str;
+ size_t len = strlen(ext);
+
+ if (s) {
+ memcpy(s, ext, len);
+ s[len++] = ' ';
+ s[len] = '\0';
+
+ *str += len;
+ }
+ else {
+ len++;
+ }
+
+ return len;
+}
+
+
+static size_t
+make_extension_string(const GLcontext *ctx, char *str)
+{
+ size_t len = 0;
+
+ /* Core additions */
+ len += append_extension(&str, "GL_OES_byte_coordinates");
+ len += append_extension(&str, "GL_OES_fixed_point");
+ len += append_extension(&str, "GL_OES_single_precision");
+ len += append_extension(&str, "GL_OES_matrix_get");
+
+ /* 1.1 required extensions */
+ len += append_extension(&str, "GL_OES_read_format");
+ len += append_extension(&str, "GL_OES_compressed_paletted_texture");
+ len += append_extension(&str, "GL_OES_point_size_array");
+ len += append_extension(&str, "GL_OES_point_sprite");
+
+ /* 1.1 deprecated extensions */
+ len += append_extension(&str, "GL_OES_query_matrix");
+
+#if FEATURE_OES_draw_texture
+ if (ctx->Extensions.OES_draw_texture)
+ len += append_extension(&str, "GL_OES_draw_texture");
+#endif
+
+ if (ctx->Extensions.EXT_blend_equation_separate)
+ len += append_extension(&str, "GL_OES_blend_equation_separate");
+ if (ctx->Extensions.EXT_blend_func_separate)
+ len += append_extension(&str, "GL_OES_blend_func_separate");
+ if (ctx->Extensions.EXT_blend_subtract)
+ len += append_extension(&str, "GL_OES_blend_subtract");
+
+ if (ctx->Extensions.EXT_stencil_wrap)
+ len += append_extension(&str, "GL_OES_stencil_wrap");
+
+ if (ctx->Extensions.ARB_texture_cube_map)
+ len += append_extension(&str, "GL_OES_texture_cube_map");
+ if (ctx->Extensions.ARB_texture_env_crossbar)
+ len += append_extension(&str, "GL_OES_texture_env_crossbar");
+ if (ctx->Extensions.ARB_texture_mirrored_repeat)
+ len += append_extension(&str, "GL_OES_texture_mirrored_repeat");
+
+ if (ctx->Extensions.ARB_framebuffer_object) {
+ len += append_extension(&str, "GL_OES_framebuffer_object");
+ len += append_extension(&str, "GL_OES_depth24");
+ len += append_extension(&str, "GL_OES_depth32");
+ len += append_extension(&str, "GL_OES_fbo_render_mipmap");
+ len += append_extension(&str, "GL_OES_rgb8_rgba8");
+ len += append_extension(&str, "GL_OES_stencil1");
+ len += append_extension(&str, "GL_OES_stencil4");
+ len += append_extension(&str, "GL_OES_stencil8");
+ }
+
+ if (ctx->Extensions.EXT_vertex_array)
+ len += append_extension(&str, "GL_OES_element_index_uint");
+ if (ctx->Extensions.ARB_vertex_buffer_object)
+ len += append_extension(&str, "GL_OES_mapbuffer");
+ if (ctx->Extensions.EXT_texture_filter_anisotropic)
+ len += append_extension(&str, "GL_EXT_texture_filter_anisotropic");
+
+ /* some applications check this for NPOT support */
+ if (ctx->Extensions.ARB_texture_non_power_of_two)
+ len += append_extension(&str, "GL_ARB_texture_non_power_of_two");
+
+ if (ctx->Extensions.EXT_texture_compression_s3tc)
+ len += append_extension(&str, "GL_EXT_texture_compression_dxt1");
+ if (ctx->Extensions.EXT_texture_lod_bias)
+ len += append_extension(&str, "GL_EXT_texture_lod_bias");
+ if (ctx->Extensions.EXT_blend_minmax)
+ len += append_extension(&str, "GL_EXT_blend_minmax");
+ if (ctx->Extensions.EXT_multi_draw_arrays)
+ len += append_extension(&str, "GL_EXT_multi_draw_arrays");
+
+ return len;
+}
+
+
+static const GLubyte *
+compute_es_extensions(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (!ctx->Extensions.String) {
+ char *s;
+ unsigned int len;
+
+ len = make_extension_string(ctx, NULL);
+ s = (char *) _mesa_malloc(len + 1);
+ if (!s)
+ return NULL;
+ make_extension_string(ctx, s);
+ ctx->Extensions.String = (const GLubyte *) s;
+ }
+
+ return ctx->Extensions.String;
+}
+
+
+const GLubyte * GLAPIENTRY
+_es_GetString(GLenum name)
+{
+ switch (name) {
+ case GL_VERSION:
+ return compute_es_version();
+ case GL_EXTENSIONS:
+ return compute_es_extensions();
+ default:
+ return _mesa_GetString(name);
+ }
+}
+
+
+void
+_mesa_initialize_context_extra(GLcontext *ctx)
+{
+ GLuint i;
+
+ /**
+ * GL_OES_texture_cube_map says
+ * "Initially all texture generation modes are set to REFLECTION_MAP_OES"
+ */
+ for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
+ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
+ texUnit->GenS.Mode = GL_REFLECTION_MAP_NV;
+ texUnit->GenT.Mode = GL_REFLECTION_MAP_NV;
+ texUnit->GenR.Mode = GL_REFLECTION_MAP_NV;
+ texUnit->GenS._ModeBit = TEXGEN_REFLECTION_MAP_NV;
+ texUnit->GenT._ModeBit = TEXGEN_REFLECTION_MAP_NV;
+ texUnit->GenR._ModeBit = TEXGEN_REFLECTION_MAP_NV;
+ }
+}
diff --git a/src/mesa/es/main/specials_es2.c b/src/mesa/es/main/specials_es2.c
new file mode 100644
index 00000000000..e11ade9b948
--- /dev/null
+++ b/src/mesa/es/main/specials_es2.c
@@ -0,0 +1,174 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * TUNGSTEN GRAPHICS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ **************************************************************************/
+
+
+#include "main/mtypes.h"
+#include "main/context.h"
+#include "main/imports.h"
+#include "main/get.h"
+
+
+const GLubyte * GLAPIENTRY _es_GetString(GLenum name);
+
+
+static const GLubyte *
+compute_es_version(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ static const char es_2_0[] = "OpenGL ES 2.0";
+ /* OpenGL ES 2.0 is derived from OpenGL 2.0 */
+ const GLboolean ver_2_0 = (ctx->Extensions.ARB_multisample &&
+ ctx->Extensions.ARB_multitexture &&
+ ctx->Extensions.ARB_texture_compression &&
+ ctx->Extensions.ARB_texture_cube_map &&
+ ctx->Extensions.ARB_texture_mirrored_repeat &&
+ ctx->Extensions.EXT_blend_color &&
+ ctx->Extensions.EXT_blend_func_separate &&
+ ctx->Extensions.EXT_blend_minmax &&
+ ctx->Extensions.EXT_blend_subtract &&
+ ctx->Extensions.EXT_stencil_wrap &&
+ ctx->Extensions.ARB_vertex_buffer_object &&
+ ctx->Extensions.ARB_shader_objects &&
+ ctx->Extensions.ARB_vertex_shader &&
+ ctx->Extensions.ARB_fragment_shader &&
+ ctx->Extensions.ARB_texture_non_power_of_two &&
+ ctx->Extensions.EXT_blend_equation_separate);
+ if (!ver_2_0)
+ _mesa_problem(ctx, "Incomplete OpenGL ES 2.0 support.");
+ return (const GLubyte *) es_2_0;
+}
+
+
+static size_t
+append_extension(char **str, const char *ext)
+{
+ char *s = *str;
+ size_t len = strlen(ext);
+
+ if (s) {
+ memcpy(s, ext, len);
+ s[len++] = ' ';
+ s[len] = '\0';
+
+ *str += len;
+ }
+ else {
+ len++;
+ }
+
+ return len;
+}
+
+
+static size_t
+make_extension_string(const GLcontext *ctx, char *str)
+{
+ size_t len = 0;
+
+ len += append_extension(&str, "GL_OES_compressed_paletted_texture");
+
+ if (ctx->Extensions.ARB_framebuffer_object) {
+ len += append_extension(&str, "GL_OES_depth24");
+ len += append_extension(&str, "GL_OES_depth32");
+ len += append_extension(&str, "GL_OES_fbo_render_mipmap");
+ len += append_extension(&str, "GL_OES_rgb8_rgba8");
+ len += append_extension(&str, "GL_OES_stencil1");
+ len += append_extension(&str, "GL_OES_stencil4");
+ }
+
+ if (ctx->Extensions.EXT_vertex_array)
+ len += append_extension(&str, "GL_OES_element_index_uint");
+ if (ctx->Extensions.ARB_vertex_buffer_object)
+ len += append_extension(&str, "GL_OES_mapbuffer");
+
+ if (ctx->Extensions.EXT_texture3D)
+ len += append_extension(&str, "GL_OES_texture_3D");
+ if (ctx->Extensions.ARB_texture_non_power_of_two)
+ len += append_extension(&str, "GL_OES_texture_npot");
+ if (ctx->Extensions.EXT_texture_filter_anisotropic)
+ len += append_extension(&str, "GL_EXT_texture_filter_anisotropic");
+
+ len += append_extension(&str, "GL_EXT_texture_type_2_10_10_10_REV");
+ if (ctx->Extensions.ARB_depth_texture)
+ len += append_extension(&str, "GL_OES_depth_texture");
+ if (ctx->Extensions.EXT_packed_depth_stencil)
+ len += append_extension(&str, "GL_OES_packed_depth_stencil");
+ if (ctx->Extensions.ARB_fragment_shader)
+ len += append_extension(&str, "GL_OES_standard_derivatives");
+
+ if (ctx->Extensions.EXT_texture_compression_s3tc)
+ len += append_extension(&str, "GL_EXT_texture_compression_dxt1");
+ if (ctx->Extensions.EXT_blend_minmax)
+ len += append_extension(&str, "GL_EXT_blend_minmax");
+ if (ctx->Extensions.EXT_multi_draw_arrays)
+ len += append_extension(&str, "GL_EXT_multi_draw_arrays");
+
+ return len;
+}
+
+
+static const GLubyte *
+compute_es_extensions(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (!ctx->Extensions.String) {
+ char *s;
+ unsigned int len;
+
+ len = make_extension_string(ctx, NULL);
+ s = (char *) _mesa_malloc(len + 1);
+ if (!s)
+ return NULL;
+ make_extension_string(ctx, s);
+ ctx->Extensions.String = (const GLubyte *) s;
+ }
+
+ return ctx->Extensions.String;
+}
+
+const GLubyte * GLAPIENTRY
+_es_GetString(GLenum name)
+{
+ switch (name) {
+ case GL_VERSION:
+ return compute_es_version();
+ case GL_SHADING_LANGUAGE_VERSION:
+ return (const GLubyte *) "OpenGL ES GLSL ES 1.0.16";
+ case GL_EXTENSIONS:
+ return compute_es_extensions();
+ default:
+ return _mesa_GetString(name);
+ }
+}
+
+
+void
+_mesa_initialize_context_extra(GLcontext *ctx)
+{
+ ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
+ ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
+
+ ctx->Point.PointSprite = GL_TRUE; /* always on for ES 2.x */
+}
diff --git a/src/mesa/es/main/stubs.c b/src/mesa/es/main/stubs.c
new file mode 100644
index 00000000000..e7b8bc780f8
--- /dev/null
+++ b/src/mesa/es/main/stubs.c
@@ -0,0 +1,138 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * TUNGSTEN GRAPHICS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ **************************************************************************/
+
+
+/**
+ * Temporary stubs for "missing" mesa functions.
+ */
+
+
+#include "main/mtypes.h"
+#include "main/imports.h"
+#include "vbo/vbo.h"
+
+#define NEED_IMPLEMENT() do { \
+ GET_CURRENT_CONTEXT(ctx); \
+ _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__); \
+ } while (0)
+
+#if FEATURE_accum
+/* This is a sanity check that to be sure we're using the correct mfeatures.h
+ * header. We don't want to accidentally use the one from mainline Mesa.
+ */
+#error "The wrong mfeatures.h file is being included!"
+#endif
+
+
+/* silence compiler warnings */
+extern void GLAPIENTRY _vbo_Materialf(GLenum face, GLenum pname, GLfloat param);
+extern void GLAPIENTRY _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+extern void GLAPIENTRY _mesa_ReleaseShaderCompiler(void);
+extern void GLAPIENTRY _mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
+extern void GLAPIENTRY _vbo_VertexAttrib1f(GLuint indx, GLfloat x);
+extern void GLAPIENTRY _vbo_VertexAttrib1fv(GLuint indx, const GLfloat* values);
+extern void GLAPIENTRY _vbo_VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
+extern void GLAPIENTRY _vbo_VertexAttrib2fv(GLuint indx, const GLfloat* values);
+extern void GLAPIENTRY _vbo_VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+extern void GLAPIENTRY _vbo_VertexAttrib3fv(GLuint indx, const GLfloat* values);
+extern void GLAPIENTRY _vbo_VertexAttrib4fv(GLuint indx, const GLfloat* values);
+
+
+void GLAPIENTRY
+_vbo_Materialf(GLenum face, GLenum pname, GLfloat param)
+{
+ _vbo_Materialfv(face, pname, &param);
+}
+
+
+void GLAPIENTRY
+_mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
+ GLint* range, GLint* precision)
+{
+ NEED_IMPLEMENT();
+}
+
+
+void GLAPIENTRY
+_mesa_ReleaseShaderCompiler(void)
+{
+ NEED_IMPLEMENT();
+}
+
+
+void GLAPIENTRY
+_mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
+ const void* binary, GLint length)
+{
+ NEED_IMPLEMENT();
+}
+
+
+void GLAPIENTRY
+_vbo_VertexAttrib1f(GLuint indx, GLfloat x)
+{
+ _vbo_VertexAttrib4f(indx, x, 0.0, 0.0, 1.0f);
+}
+
+
+void GLAPIENTRY
+_vbo_VertexAttrib1fv(GLuint indx, const GLfloat* values)
+{
+ _vbo_VertexAttrib4f(indx, values[0], 0.0, 0.0, 1.0f);
+}
+
+
+void GLAPIENTRY
+_vbo_VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
+{
+ _vbo_VertexAttrib4f(indx, x, y, 0.0, 1.0f);
+}
+
+
+void GLAPIENTRY
+_vbo_VertexAttrib2fv(GLuint indx, const GLfloat* values)
+{
+ _vbo_VertexAttrib4f(indx, values[0], values[1], 0.0, 1.0f);
+}
+
+
+void GLAPIENTRY
+_vbo_VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
+{
+ _vbo_VertexAttrib4f(indx, x, y, z, 1.0f);
+}
+
+
+void GLAPIENTRY
+_vbo_VertexAttrib3fv(GLuint indx, const GLfloat* values)
+{
+ _vbo_VertexAttrib4f(indx, values[0], values[1], values[2], 1.0f);
+}
+
+
+void GLAPIENTRY
+_vbo_VertexAttrib4fv(GLuint indx, const GLfloat* values)
+{
+ _vbo_VertexAttrib4f(indx, values[0], values[1], values[2], values[3]);
+}
diff --git a/src/mesa/es/sources.mak b/src/mesa/es/sources.mak
new file mode 100644
index 00000000000..55bb31b80dd
--- /dev/null
+++ b/src/mesa/es/sources.mak
@@ -0,0 +1,166 @@
+include $(MESA)/sources.mak
+
+# LOCAL sources
+
+LOCAL_ES1_SOURCES := \
+ main/api_exec_es1.c \
+ main/get_es1.c \
+ main/specials_es1.c \
+ main/drawtex.c \
+ main/es_cpaltex.c \
+ main/es_enable.c \
+ main/es_fbo.c \
+ main/es_query_matrix.c \
+ main/es_texgen.c \
+ main/stubs.c \
+ glapi/glapi-es1/main/enums.c
+
+LOCAL_ES1_GALLIUM_SOURCES := \
+ $(LOCAL_ES1_SOURCES) \
+ state_tracker/st_cb_drawtex.c
+
+# always use local version of GLAPI_ASM_SOURCES
+LOCAL_ES1_API_ASM := $(addprefix glapi/glapi-es1/, $(GLAPI_ASM_SOURCES))
+
+LOCAL_ES1_INCLUDES := \
+ -I. \
+ -I./glapi/glapi-es1 \
+ -I./state_tracker \
+ -I$(MESA)/state_tracker
+
+LOCAL_ES2_SOURCES := \
+ main/api_exec_es2.c \
+ main/get_es2.c \
+ main/specials_es2.c \
+ main/es_cpaltex.c \
+ main/es_fbo.c \
+ main/stubs.c \
+ glapi/glapi-es2/main/enums.c
+
+LOCAL_ES2_GALLIUM_SOURCES := \
+ $(LOCAL_ES2_SOURCES)
+
+LOCAL_ES2_API_ASM := $(subst es1,es2, $(LOCAL_ES1_API_ASM))
+LOCAL_ES2_INCLUDES := $(subst es1,es2, $(LOCAL_ES1_INCLUDES))
+
+# MESA sources
+# Ideally, the omit list should be replaced by features.
+
+MAIN_OMITTED := \
+ main/api_exec.c \
+ main/condrender.c \
+ main/dlopen.c \
+ main/enums.c \
+ main/get.c
+MAIN_SOURCES := $(filter-out $(MAIN_OMITTED), $(MAIN_SOURCES))
+
+VBO_OMITTED := \
+ vbo/vbo_save.c \
+ vbo/vbo_save_api.c \
+ vbo/vbo_save_draw.c \
+ vbo/vbo_save_loopback.c
+VBO_SOURCES := $(filter-out $(VBO_OMITTED), $(VBO_SOURCES))
+
+STATETRACKER_OMITTED := \
+ state_tracker/st_api.c \
+ state_tracker/st_cb_drawpixels.c \
+ state_tracker/st_cb_feedback.c \
+ state_tracker/st_cb_rasterpos.c \
+ state_tracker/st_draw_feedback.c
+STATETRACKER_SOURCES := $(filter-out $(STATETRACKER_OMITTED), $(STATETRACKER_SOURCES))
+
+SHADER_OMITTED := \
+ shader/atifragshader.c
+SHADER_SOURCES := $(filter-out $(SHADER_OMITTED), $(SHADER_SOURCES))
+
+MESA_ES1_SOURCES := \
+ $(MAIN_SOURCES) \
+ $(MATH_SOURCES) \
+ $(MATH_XFORM_SOURCES) \
+ $(VBO_SOURCES) \
+ $(TNL_SOURCES) \
+ $(SHADER_SOURCES) \
+ $(SWRAST_SOURCES) \
+ $(SWRAST_SETUP_SOURCES) \
+ $(COMMON_DRIVER_SOURCES) \
+ $(ASM_C_SOURCES) \
+ $(SLANG_SOURCES)
+
+MESA_ES1_GALLIUM_SOURCES := \
+ $(MAIN_SOURCES) \
+ $(MATH_SOURCES) \
+ $(VBO_SOURCES) \
+ $(STATETRACKER_SOURCES) \
+ $(SHADER_SOURCES) \
+ ppc/common_ppc.c \
+ x86/common_x86.c \
+ $(SLANG_SOURCES)
+
+MESA_ES1_API_SOURCES := \
+ $(GLAPI_SOURCES)
+
+MESA_ES1_INCLUDES := $(INCLUDE_DIRS)
+
+# remove LOCAL sources from MESA sources
+MESA_ES1_SOURCES := $(filter-out $(LOCAL_ES1_SOURCES), $(MESA_ES1_SOURCES))
+MESA_ES1_GALLIUM_SOURCES := $(filter-out $(LOCAL_ES1_GALLIUM_SOURCES), $(MESA_ES1_GALLIUM_SOURCES))
+
+# right now es2 and es1 share MESA sources
+MESA_ES2_SOURCES := $(MESA_ES1_SOURCES)
+MESA_ES2_GALLIUM_SOURCES := $(MESA_ES1_GALLIUM_SOURCES)
+MESA_ES2_API_SOURCES := $(MESA_ES1_API_SOURCES)
+
+MESA_ES2_INCLUDES := $(MESA_ES1_INCLUDES)
+
+# asm is shared by any ES version and any library
+MESA_ES_ASM := $(MESA_ASM_SOURCES)
+
+# collect sources, adjust the pathes
+ES1_SOURCES := $(LOCAL_ES1_SOURCES) $(addprefix $(MESA)/,$(MESA_ES1_SOURCES))
+ES1_GALLIUM_SOURCES := $(LOCAL_ES1_GALLIUM_SOURCES) $(addprefix $(MESA)/,$(MESA_ES1_GALLIUM_SOURCES))
+ES1_API_SOURCES := $(addprefix $(MESA)/,$(MESA_ES1_API_SOURCES))
+
+ES2_SOURCES := $(LOCAL_ES2_SOURCES) $(addprefix $(MESA)/,$(MESA_ES2_SOURCES))
+ES2_GALLIUM_SOURCES := $(LOCAL_ES2_GALLIUM_SOURCES) $(addprefix $(MESA)/,$(MESA_ES2_GALLIUM_SOURCES))
+ES2_API_SOURCES := $(addprefix $(MESA)/,$(MESA_ES2_API_SOURCES))
+
+# collect includes
+ES1_INCLUDES := $(LOCAL_ES1_INCLUDES) $(MESA_ES1_INCLUDES)
+ES2_INCLUDES := $(LOCAL_ES2_INCLUDES) $(MESA_ES2_INCLUDES)
+
+# collect objects, including asm
+ES1_OBJECTS := \
+ $(LOCAL_ES1_SOURCES:.c=.o) \
+ $(MESA_ES1_SOURCES:.c=.o) \
+ $(MESA_ES_ASM:.S=.o)
+
+ES1_GALLIUM_OBJECTS := \
+ $(LOCAL_ES1_GALLIUM_SOURCES:.c=.o) \
+ $(MESA_ES1_GALLIUM_SOURCES:.c=.o) \
+ $(MESA_ES_ASM:.S=.o)
+
+ES1_API_OBJECTS := \
+ $(LOCAL_ES1_API_ASM:.S=.o) \
+ $(MESA_ES1_API_SOURCES:.c=.o)
+
+ES2_OBJECTS := \
+ $(LOCAL_ES2_SOURCES:.c=.o) \
+ $(MESA_ES2_SOURCES:.c=.o) \
+ $(MESA_ES_ASM:.S=.o)
+
+ES2_GALLIUM_OBJECTS := \
+ $(LOCAL_ES2_GALLIUM_SOURCES:.c=.o) \
+ $(MESA_ES2_GALLIUM_SOURCES:.c=.o) \
+ $(MESA_ES_ASM:.S=.o)
+
+ES2_API_OBJECTS := \
+ $(LOCAL_ES2_API_ASM:.S=.o) \
+ $(MESA_ES2_API_SOURCES:.c=.o)
+
+# collect sources for makedepend
+ES1_ALL_SOURCES := $(ES1_SOURCES) $(ES1_GALLIUM_SOURCES) $(ES1_API_SOURCES)
+ES2_ALL_SOURCES := $(ES2_SOURCES) $(ES2_GALLIUM_SOURCES) $(ES2_API_SOURCES)
+
+# sort to remove duplicates
+ES1_ALL_SOURCES := $(sort $(ES1_ALL_SOURCES))
+ES2_ALL_SOURCES := $(sort $(ES2_ALL_SOURCES))
diff --git a/src/mesa/es/state_tracker/st_cb_drawtex.c b/src/mesa/es/state_tracker/st_cb_drawtex.c
new file mode 100644
index 00000000000..3b98b9c40b3
--- /dev/null
+++ b/src/mesa/es/state_tracker/st_cb_drawtex.c
@@ -0,0 +1,297 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ **************************************************************************/
+
+
+/**
+ * Implementation of glDrawTex() for GL_OES_draw_tex
+ */
+
+
+
+#include "main/imports.h"
+#include "main/image.h"
+#include "main/bufferobj.h"
+#include "main/drawtex.h"
+#include "main/macros.h"
+#include "main/state.h"
+#include "main/texformat.h"
+#include "shader/program.h"
+#include "shader/prog_parameter.h"
+#include "shader/prog_print.h"
+
+#include "st_context.h"
+#include "st_atom.h"
+#include "st_atom_constbuf.h"
+#include "st_draw.h"
+#include "st_cb_drawtex.h"
+
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "pipe/p_inlines.h"
+#include "pipe/p_shader_tokens.h"
+#include "util/u_tile.h"
+#include "util/u_draw_quad.h"
+#include "util/u_simple_shaders.h"
+
+#include "cso_cache/cso_context.h"
+
+
+struct cached_shader
+{
+ //struct pipe_shader_state shader;
+ void *handle;
+
+ uint num_attribs;
+ uint semantic_names[2 + MAX_TEXTURE_UNITS];
+ uint semantic_indexes[2 + MAX_TEXTURE_UNITS];
+};
+
+#define MAX_SHADERS (2 * MAX_TEXTURE_UNITS)
+
+/**
+ * Simple linear list cache.
+ * Most of the time there'll only be one cached shader.
+ */
+static struct cached_shader CachedShaders[MAX_SHADERS];
+static GLuint NumCachedShaders = 0;
+
+
+#if FEATURE_OES_draw_texture
+
+
+static void *
+lookup_shader(struct pipe_context *pipe,
+ uint num_attribs,
+ const uint *semantic_names,
+ const uint *semantic_indexes)
+{
+ GLuint i, j;
+
+ /* look for existing shader with same attributes */
+ for (i = 0; i < NumCachedShaders; i++) {
+ if (CachedShaders[i].num_attribs == num_attribs) {
+ GLboolean match = GL_TRUE;
+ for (j = 0; j < num_attribs; j++) {
+ if (semantic_names[j] != CachedShaders[i].semantic_names[j] ||
+ semantic_indexes[j] != CachedShaders[i].semantic_indexes[j]) {
+ match = GL_FALSE;
+ break;
+ }
+ }
+ if (match)
+ return CachedShaders[i].handle;
+ }
+ }
+
+ /* not found - create new one now */
+ if (NumCachedShaders >= MAX_SHADERS) {
+ return NULL;
+ }
+
+ CachedShaders[i].num_attribs = num_attribs;
+ for (j = 0; j < num_attribs; j++) {
+ CachedShaders[i].semantic_names[j] = semantic_names[j];
+ CachedShaders[i].semantic_indexes[j] = semantic_indexes[j];
+ }
+
+ CachedShaders[i].handle =
+ util_make_vertex_passthrough_shader(pipe,
+ num_attribs,
+ semantic_names,
+ semantic_indexes);
+ NumCachedShaders++;
+
+ return CachedShaders[i].handle;
+}
+
+static void
+st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
+ GLfloat width, GLfloat height)
+{
+ struct st_context *st = ctx->st;
+ struct pipe_context *pipe = st->pipe;
+ struct cso_context *cso = ctx->st->cso_context;
+ struct pipe_buffer *vbuffer;
+ GLuint i, numTexCoords, numAttribs;
+ GLboolean emitColor;
+ uint semantic_names[2 + MAX_TEXTURE_UNITS];
+ uint semantic_indexes[2 + MAX_TEXTURE_UNITS];
+ GLbitfield inputs = VERT_BIT_POS;
+
+ /* determine if we need vertex color */
+ if (ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_COL0)
+ emitColor = GL_TRUE;
+ else
+ emitColor = GL_FALSE;
+
+ /* determine how many enabled sets of texcoords */
+ numTexCoords = 0;
+ for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+ if (ctx->Texture.Unit[i]._ReallyEnabled & TEXTURE_2D_BIT) {
+ inputs |= VERT_BIT_TEX(i);
+ numTexCoords++;
+ }
+ }
+
+ /* total number of attributes per vertex */
+ numAttribs = 1 + emitColor + numTexCoords;
+
+
+ /* create the vertex buffer */
+ vbuffer = pipe_buffer_create(pipe->screen, 32, PIPE_BUFFER_USAGE_VERTEX,
+ numAttribs * 4 * 4 * sizeof(GLfloat));
+
+ /* load vertex buffer */
+ {
+#define SET_ATTRIB(VERT, ATTR, X, Y, Z, W) \
+ do { \
+ GLuint k = (((VERT) * numAttribs + (ATTR)) * 4); \
+ assert(k < 4 * 4 * numAttribs); \
+ vbuf[k + 0] = X; \
+ vbuf[k + 1] = Y; \
+ vbuf[k + 2] = Z; \
+ vbuf[k + 3] = W; \
+ } while (0)
+
+ const GLfloat x0 = x, y0 = y, x1 = x + width, y1 = y + height;
+ GLfloat *vbuf = (GLfloat *) pipe_buffer_map(pipe->screen, vbuffer,
+ PIPE_BUFFER_USAGE_CPU_WRITE);
+ GLuint attr;
+
+ z = CLAMP(z, 0.0f, 1.0f);
+
+ /* positions (in clip coords) */
+ {
+ const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
+ const GLfloat fb_width = (GLfloat)fb->Width;
+ const GLfloat fb_height = (GLfloat)fb->Height;
+
+ const GLfloat clip_x0 = (GLfloat)(x0 / fb_width * 2.0 - 1.0);
+ const GLfloat clip_y0 = (GLfloat)(y0 / fb_height * 2.0 - 1.0);
+ const GLfloat clip_x1 = (GLfloat)(x1 / fb_width * 2.0 - 1.0);
+ const GLfloat clip_y1 = (GLfloat)(y1 / fb_height * 2.0 - 1.0);
+
+ SET_ATTRIB(0, 0, clip_x0, clip_y0, z, 1.0f); /* lower left */
+ SET_ATTRIB(1, 0, clip_x1, clip_y0, z, 1.0f); /* lower right */
+ SET_ATTRIB(2, 0, clip_x1, clip_y1, z, 1.0f); /* upper right */
+ SET_ATTRIB(3, 0, clip_x0, clip_y1, z, 1.0f); /* upper left */
+
+ semantic_names[0] = TGSI_SEMANTIC_POSITION;
+ semantic_indexes[0] = 0;
+ }
+
+ /* colors */
+ if (emitColor) {
+ const GLfloat *c = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
+ SET_ATTRIB(0, 1, c[0], c[1], c[2], c[3]);
+ SET_ATTRIB(1, 1, c[0], c[1], c[2], c[3]);
+ SET_ATTRIB(2, 1, c[0], c[1], c[2], c[3]);
+ SET_ATTRIB(3, 1, c[0], c[1], c[2], c[3]);
+ semantic_names[1] = TGSI_SEMANTIC_COLOR;
+ semantic_indexes[1] = 0;
+ attr = 2;
+ }
+ else {
+ attr = 1;
+ }
+
+ /* texcoords */
+ for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+ if (ctx->Texture.Unit[i]._ReallyEnabled & TEXTURE_2D_BIT) {
+ struct gl_texture_object *obj = ctx->Texture.Unit[i]._Current;
+ struct gl_texture_image *img = obj->Image[0][obj->BaseLevel];
+ const GLfloat wt = (GLfloat) img->Width;
+ const GLfloat ht = (GLfloat) img->Height;
+ const GLfloat s0 = obj->CropRect[0] / wt;
+ const GLfloat t0 = obj->CropRect[1] / ht;
+ const GLfloat s1 = (obj->CropRect[0] + obj->CropRect[2]) / wt;
+ const GLfloat t1 = (obj->CropRect[1] + obj->CropRect[3]) / ht;
+
+ /*printf("crop texcoords: %g, %g .. %g, %g\n", s0, t0, s1, t1);*/
+ SET_ATTRIB(0, attr, s0, t0, 0.0f, 1.0f); /* lower left */
+ SET_ATTRIB(1, attr, s1, t0, 0.0f, 1.0f); /* lower right */
+ SET_ATTRIB(2, attr, s1, t1, 0.0f, 1.0f); /* upper right */
+ SET_ATTRIB(3, attr, s0, t1, 0.0f, 1.0f); /* upper left */
+
+ semantic_names[attr] = TGSI_SEMANTIC_GENERIC;
+ semantic_indexes[attr] = 0;
+
+ attr++;
+ }
+ }
+
+ pipe_buffer_unmap(pipe->screen, vbuffer);
+
+#undef SET_ATTRIB
+ }
+
+
+ cso_save_viewport(cso);
+ cso_save_vertex_shader(cso);
+
+ {
+ void *vs = lookup_shader(pipe, numAttribs,
+ semantic_names, semantic_indexes);
+ cso_set_vertex_shader_handle(cso, vs);
+ }
+
+ /* viewport state: viewport matching window dims */
+ {
+ const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
+ const GLboolean invert = (st_fb_orientation(fb) == Y_0_TOP);
+ const GLfloat width = (GLfloat)fb->Width;
+ const GLfloat height = (GLfloat)fb->Height;
+ struct pipe_viewport_state vp;
+ vp.scale[0] = 0.5f * width;
+ vp.scale[1] = height * (invert ? -0.5f : 0.5f);
+ vp.scale[2] = 1.0f;
+ vp.scale[3] = 1.0f;
+ vp.translate[0] = 0.5f * width;
+ vp.translate[1] = 0.5f * height;
+ vp.translate[2] = 0.0f;
+ vp.translate[3] = 0.0f;
+ cso_set_viewport(cso, &vp);
+ }
+
+
+ util_draw_vertex_buffer(pipe, vbuffer,
+ 0, /* offset */
+ PIPE_PRIM_TRIANGLE_FAN,
+ 4, /* verts */
+ numAttribs); /* attribs/vert */
+
+
+ pipe_buffer_reference(&vbuffer, NULL);
+
+ /* restore state */
+ cso_restore_viewport(cso);
+ cso_restore_vertex_shader(cso);
+}
+
+
+#endif /* FEATURE_OES_draw_texture */
+
+
+void
+st_init_drawtex_functions(struct dd_function_table *functions)
+{
+ _MESA_INIT_DRAWTEX_FUNCTIONS(functions, st_);
+}
+
+
+/**
+ * Free any cached shaders
+ */
+void
+st_destroy_drawtex(struct st_context *st)
+{
+ GLuint i;
+ for (i = 0; i < NumCachedShaders; i++) {
+ cso_delete_vertex_shader(st->cso_context, CachedShaders[i].handle);
+ }
+ NumCachedShaders = 0;
+}
diff --git a/src/mesa/es/state_tracker/st_cb_drawtex.h b/src/mesa/es/state_tracker/st_cb_drawtex.h
new file mode 100644
index 00000000000..7b0da702798
--- /dev/null
+++ b/src/mesa/es/state_tracker/st_cb_drawtex.h
@@ -0,0 +1,18 @@
+/**************************************************************************
+ *
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ **************************************************************************/
+
+
+#ifndef ST_CB_DRAWTEX_H
+#define ST_CB_DRAWTEX_H
+
+extern void
+st_init_drawtex_functions(struct dd_function_table *functions);
+
+extern void
+st_destroy_drawtex(struct st_context *st);
+
+#endif /* ST_CB_DRAWTEX_H */
diff --git a/src/mesa/glapi/EXT_draw_buffers2.xml b/src/mesa/glapi/EXT_draw_buffers2.xml
new file mode 100644
index 00000000000..efbe61f74ed
--- /dev/null
+++ b/src/mesa/glapi/EXT_draw_buffers2.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="GL_EXT_draw_buffers2" number="340">
+
+ <function name="ColorMaskIndexedEXT" offset="assign">
+ <param name="buf" type="GLuint"/>
+ <param name="r" type="GLboolean"/>
+ <param name="g" type="GLboolean"/>
+ <param name="b" type="GLboolean"/>
+ <param name="a" type="GLboolean"/>
+ </function>
+
+ <function name="GetBooleanIndexedvEXT" offset="assign">
+ <param name="value" type="GLenum"/>
+ <param name="index" type="GLuint"/>
+ <param name="data" type="GLboolean *"/>
+ </function>
+
+ <function name="GetIntegerIndexedvEXT" offset="assign">
+ <param name="value" type="GLenum"/>
+ <param name="index" type="GLuint"/>
+ <param name="data" type="GLint *"/>
+ </function>
+
+ <function name="EnableIndexedEXT" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="index" type="GLuint"/>
+ </function>
+
+ <function name="DisableIndexedEXT" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="index" type="GLuint"/>
+ </function>
+
+ <function name ="IsEnabledIndexedEXT" offset="assign">
+ <param name="target" type="GLenum"/>
+ <param name="index" type="GLuint"/>
+ <return type="GLboolean"/>
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile
index 71bef68ea5f..bfc3db4313c 100644
--- a/src/mesa/glapi/Makefile
+++ b/src/mesa/glapi/Makefile
@@ -25,6 +25,7 @@ GLX_DIR = $(XORG_BASE)/glx
SERVER_GLAPI_FILES = \
$(GLX_DIR)/glapi.h \
$(GLX_DIR)/glapi.c \
+ $(GLX_DIR)/glapi_nop.c \
$(GLX_DIR)/glthread.c \
$(GLX_DIR)/glthread.h
@@ -43,7 +44,6 @@ SERVER_OUTPUTS = \
$(GLX_DIR)/glapioffsets.h \
$(GLX_DIR)/glapidispatch.h \
$(GLX_DIR)/glprocs.h \
- $(GLX_DIR)/dispatch.h \
$(SERVER_GLAPI_FILES)
API_XML = gl_API.xml \
@@ -56,10 +56,12 @@ API_XML = gl_API.xml \
ARB_sync.xml \
ARB_vertex_array_object.xml \
APPLE_vertex_array_object.xml \
+ EXT_draw_buffers2.xml \
EXT_framebuffer_object.xml \
EXT_packed_depth_stencil.xml \
EXT_provoking_vertex.xml \
- EXT_texture_array.xml
+ EXT_texture_array.xml \
+ NV_conditional_render.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/NV_conditional_render.xml b/src/mesa/glapi/NV_conditional_render.xml
new file mode 100644
index 00000000000..8bb31dd1fc9
--- /dev/null
+++ b/src/mesa/glapi/NV_conditional_render.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="GL_NV_condtitional_render" number="346">
+
+ <enum name="QUERY_WAIT_NV" value="0x8E13"/>
+ <enum name="QUERY_NO_WAIT_NV" value="0x8E14"/>
+ <enum name="QUERY_BY_REGION_WAIT_NV" value="0x8E15"/>
+ <enum name="QUERY_BY_REGION_NO_WAIT_NV" value="0x8E16"/>
+
+ <function name="BeginConditionalRenderNV" offset="assign">
+ <param name="query" type="GLuint"/>
+ <param name="mode" type="GLenum"/>
+ </function>
+
+ <function name="EndConditionalRenderNV" offset="assign">
+ </function>
+
+</category>
+
+</OpenGLAPI>
diff --git a/src/mesa/glapi/dispatch.h b/src/mesa/glapi/dispatch.h
index 6623d524692..27f80a50629 100644
--- a/src/mesa/glapi/dispatch.h
+++ b/src/mesa/glapi/dispatch.h
@@ -30,8 +30,8 @@
#define _GLAPI_USE_REMAP_TABLE
#endif
-#include "glapitable.h"
-#include "glapioffsets.h"
-#include "glapidispatch.h"
+#include "glapi/glapitable.h"
+#include "glapi/glapioffsets.h"
+#include "glapi/glapidispatch.h"
#endif /* _DISPATCH_H */
diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml
index 34c7746e1ba..fbf8b0c3e4a 100644
--- a/src/mesa/glapi/gl_API.xml
+++ b/src/mesa/glapi/gl_API.xml
@@ -866,6 +866,9 @@
<enum name="4_BYTES" count="4" value="0x1409">
<size name="CallLists"/>
</enum>
+ <enum name="HALF_FLOAT" count="2" value="0x140B">
+ <size name="CallLists"/>
+ </enum>
<enum name="CLEAR" value="0x1500"/>
<enum name="AND" value="0x1501"/>
<enum name="AND_REVERSE" value="0x1502"/>
@@ -7962,6 +7965,8 @@
<xi:include href="ARB_draw_elements_base_vertex.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="NV_conditional_render.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
<!-- Non-ARB extensions sorted by extension number. -->
@@ -12242,6 +12247,9 @@
<xi:include href="EXT_provoking_vertex.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+<xi:include href="EXT_draw_buffers2.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">
<size name="GetBufferParameteriv" mode="get"/>
diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py
index b98919134fb..a10a35e513c 100644
--- a/src/mesa/glapi/gl_XML.py
+++ b/src/mesa/glapi/gl_XML.py
@@ -184,7 +184,7 @@ class gl_print_base:
The name is also added to the file's undef_list.
"""
self.undef_list.append("PURE")
- print """# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+ print """# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PURE __attribute__((pure))
# else
# define PURE
@@ -224,7 +224,7 @@ class gl_print_base:
"""
self.undef_list.append(S)
- print """# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+ print """# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
# define %s __attribute__((visibility("%s")))
# else
# define %s
@@ -244,7 +244,7 @@ class gl_print_base:
"""
self.undef_list.append("NOINLINE")
- print """# if defined(__GNUC__)
+ print """# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define NOINLINE __attribute__((noinline))
# else
# define NOINLINE
@@ -738,6 +738,9 @@ class gl_function( gl_item ):
return p_string
+ def is_abi(self):
+ return (self.offset >= 0 and not self.assign_offset)
+
def is_static_entry_point(self, name):
return name in self.static_entry_points
diff --git a/src/mesa/glapi/gl_apitemp.py b/src/mesa/glapi/gl_apitemp.py
index a37c08d6ce1..41a40fbeb68 100644
--- a/src/mesa/glapi/gl_apitemp.py
+++ b/src/mesa/glapi/gl_apitemp.py
@@ -30,7 +30,7 @@ import license
import sys, getopt
class PrintGlOffsets(gl_XML.gl_print_base):
- def __init__(self):
+ def __init__(self, es=False):
gl_XML.gl_print_base.__init__(self)
self.name = "gl_apitemp.py (from Mesa)"
@@ -38,6 +38,8 @@ class PrintGlOffsets(gl_XML.gl_print_base):
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
+ self.es = es
+
self.undef_list.append( "KEYWORD1" )
self.undef_list.append( "KEYWORD1_ALT" )
self.undef_list.append( "KEYWORD2" )
@@ -82,10 +84,14 @@ class PrintGlOffsets(gl_XML.gl_print_base):
else:
dispatch = "DISPATCH"
- if f.has_different_protocol(name):
- print '#ifndef GLX_INDIRECT_RENDERING'
-
+ need_proto = False
if not f.is_static_entry_point(name):
+ need_proto = True
+ elif self.es:
+ cat, num = api.get_category_for_name(name)
+ if (cat.startswith("es") or cat.startswith("GL_OES")):
+ need_proto = True
+ if need_proto:
print '%s %s KEYWORD2 NAME(%s)(%s);' % (keyword, f.return_type, n, f.get_parameter_string(name))
print ''
@@ -98,8 +104,6 @@ class PrintGlOffsets(gl_XML.gl_print_base):
print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \
% (dispatch, f.name, p_string, name, t_string, o_string)
print '}'
- if f.has_different_protocol(name):
- print '#endif /* GLX_INDIRECT_RENDERING */'
print ''
return
@@ -172,7 +176,11 @@ class PrintGlOffsets(gl_XML.gl_print_base):
#error TABLE_ENTRY must be defined
#endif
-static _glapi_proc DISPATCH_TABLE_NAME[] = {"""
+#ifdef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
+#error _GLAPI_SKIP_NORMAL_ENTRY_POINTS must not be defined
+#endif
+
+_glapi_proc DISPATCH_TABLE_NAME[] = {"""
for f in api.functionIterateByOffset():
print ' TABLE_ENTRY(%s),' % (f.dispatch_name())
@@ -196,35 +204,90 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {"""
* We list the functions which are not otherwise used.
*/
#ifdef UNUSED_TABLE_NAME
-static _glapi_proc UNUSED_TABLE_NAME[] = {"""
+_glapi_proc UNUSED_TABLE_NAME[] = {"""
+ normal_entries = []
+ proto_entries = []
for f in api.functionIterateByOffset():
- for n in f.entry_points:
- if n != f.name:
- if f.is_static_entry_point(n):
- text = ' TABLE_ENTRY(%s),' % (n)
-
- if f.has_different_protocol(n):
- print '#ifndef GLX_INDIRECT_RENDERING'
- print text
- print '#endif'
- else:
- print text
+ normal_ents, proto_ents = self.classifyEntryPoints(f)
+
+ # exclude f.name
+ if f.name in normal_ents:
+ normal_ents.remove(f.name)
+ elif f.name in proto_ents:
+ proto_ents.remove(f.name)
+
+ normal_ents = [f.static_name(ent) for ent in normal_ents]
+ proto_ents = [f.static_name(ent) for ent in proto_ents]
+
+ normal_entries.extend(normal_ents)
+ proto_entries.extend(proto_ents)
+
+ print '#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS'
+ for ent in normal_entries:
+ print ' TABLE_ENTRY(%s),' % (ent)
+ print '#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */'
+ print '#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS'
+ for ent in proto_entries:
+ print ' TABLE_ENTRY(%s),' % (ent)
+ print '#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */'
+
print '};'
print '#endif /*UNUSED_TABLE_NAME*/'
print ''
return
+ def classifyEntryPoints(self, func):
+ normal_names = []
+ normal_stubs = []
+ proto_names = []
+ proto_stubs = []
+ # classify the entry points
+ for name in func.entry_points:
+ if func.has_different_protocol(name):
+ if func.is_static_entry_point(name):
+ proto_names.append(name)
+ else:
+ proto_stubs.append(name)
+ else:
+ if func.is_static_entry_point(name):
+ normal_names.append(name)
+ else:
+ normal_stubs.append(name)
+ # there can be at most one stub for a function
+ if normal_stubs:
+ normal_names.append(normal_stubs[0])
+ elif proto_stubs:
+ proto_names.append(proto_stubs[0])
+
+ return (normal_names, proto_names)
+
def printBody(self, api):
+ normal_entry_points = []
+ proto_entry_points = []
for func in api.functionIterateByOffset():
- got_stub = 0
- for n in func.entry_points:
- if func.is_static_entry_point(n):
- self.printFunction(func, n)
- elif not got_stub:
- self.printFunction(func, n)
- got_stub = 1
+ normal_ents, proto_ents = self.classifyEntryPoints(func)
+ normal_entry_points.append((func, normal_ents))
+ proto_entry_points.append((func, proto_ents))
+
+ print '#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS'
+ print ''
+ for func, ents in normal_entry_points:
+ for ent in ents:
+ self.printFunction(func, ent)
+ print ''
+ print '#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */'
+ print ''
+ print '/* these entry points might require different protocols */'
+ print '#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS'
+ print ''
+ for func, ents in proto_entry_points:
+ for ent in ents:
+ self.printFunction(func, ent)
+ print ''
+ print '#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */'
+ print ''
self.printInitDispatch(api)
self.printAliasedTable(api)
@@ -232,22 +295,26 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {"""
def show_usage():
- print "Usage: %s [-f input_file_name]" % sys.argv[0]
+ print "Usage: %s [-f input_file_name] [-c]" % sys.argv[0]
+ print "-c Enable compatibility with OpenGL ES."
sys.exit(1)
if __name__ == '__main__':
file_name = "gl_API.xml"
try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:")
+ (args, trail) = getopt.getopt(sys.argv[1:], "f:c")
except Exception,e:
show_usage()
+ es = False
for (arg,val) in args:
if arg == "-f":
file_name = val
+ elif arg == "-c":
+ es = True
api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory())
- printer = PrintGlOffsets()
+ printer = PrintGlOffsets(es)
printer.Print(api)
diff --git a/src/mesa/glapi/gl_enums.py b/src/mesa/glapi/gl_enums.py
index 27ab119537e..acaa06ab37e 100644
--- a/src/mesa/glapi/gl_enums.py
+++ b/src/mesa/glapi/gl_enums.py
@@ -42,10 +42,10 @@ class PrintGlEnums(gl_XML.gl_print_base):
def printRealHeader(self):
- print '#include "glheader.h"'
- print '#include "mfeatures.h"'
- print '#include "enums.h"'
- print '#include "imports.h"'
+ print '#include "main/glheader.h"'
+ print '#include "main/mfeatures.h"'
+ print '#include "main/enums.h"'
+ print '#include "main/imports.h"'
print ''
print 'typedef struct {'
print ' size_t offset;'
diff --git a/src/mesa/glapi/gl_offsets.py b/src/mesa/glapi/gl_offsets.py
index ca6c90ffd8e..54867b34634 100644
--- a/src/mesa/glapi/gl_offsets.py
+++ b/src/mesa/glapi/gl_offsets.py
@@ -30,9 +30,10 @@ import license
import sys, getopt
class PrintGlOffsets(gl_XML.gl_print_base):
- def __init__(self):
+ def __init__(self, es=False):
gl_XML.gl_print_base.__init__(self)
+ self.es = es
self.name = "gl_offsets.py (from Mesa)"
self.header_tag = '_GLAPI_OFFSETS_H_'
self.license = license.bsd_license_template % ( \
@@ -41,22 +42,24 @@ class PrintGlOffsets(gl_XML.gl_print_base):
return
def printBody(self, api):
- abi = [ "1.0", "1.1", "1.2", "GL_ARB_multitexture" ]
-
print '/* this file should not be included directly in mesa */'
print ''
functions = []
abi_functions = []
+ alias_functions = []
count = 0
for f in api.functionIterateByOffset():
- [category, num] = api.get_category_for_name( f.name )
- if category not in abi:
+ if not f.is_abi():
functions.append( [f, count] )
count += 1
else:
abi_functions.append( f )
+ if self.es:
+ # remember functions with aliases
+ if len(f.entry_points) > 1:
+ alias_functions.append(f)
for f in abi_functions:
print '#define _gloffset_%s %d' % (f.name, f.offset)
@@ -81,26 +84,37 @@ class PrintGlOffsets(gl_XML.gl_print_base):
print ''
print '#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */'
+ if alias_functions:
+ print ''
+ print '/* define aliases for compatibility */'
+ for f in alias_functions:
+ for name in f.entry_points:
+ if name != f.name:
+ print '#define _gloffset_%s _gloffset_%s' % (name, f.name)
return
def show_usage():
- print "Usage: %s [-f input_file_name]" % sys.argv[0]
+ print "Usage: %s [-f input_file_name] [-c]" % sys.argv[0]
+ print " -c Enable compatibility with OpenGL ES."
sys.exit(1)
if __name__ == '__main__':
file_name = "gl_API.xml"
try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:")
+ (args, trail) = getopt.getopt(sys.argv[1:], "f:c")
except Exception,e:
show_usage()
+ es = False
for (arg,val) in args:
if arg == "-f":
file_name = val
+ elif arg == "-c":
+ es = True
api = gl_XML.parse_GL_API( file_name )
- printer = PrintGlOffsets()
+ printer = PrintGlOffsets(es)
printer.Print( api )
diff --git a/src/mesa/glapi/gl_procs.py b/src/mesa/glapi/gl_procs.py
index cd1a68cee17..5de61fbdfe9 100644
--- a/src/mesa/glapi/gl_procs.py
+++ b/src/mesa/glapi/gl_procs.py
@@ -30,9 +30,10 @@ import gl_XML, glX_XML
import sys, getopt
class PrintGlProcs(gl_XML.gl_print_base):
- def __init__(self, long_strings):
+ def __init__(self, long_strings, es=False):
gl_XML.gl_print_base.__init__(self)
+ self.es = es
self.long_strings = long_strings
self.name = "gl_procs.py (from Mesa)"
self.license = license.bsd_license_template % ( \
@@ -141,6 +142,28 @@ typedef struct {
print '%s GLAPIENTRY gl_dispatch_stub_%u(%s);' % (func.return_type, func.offset, func.get_parameter_string())
break
+ if self.es:
+ categories = {}
+ for func in api.functionIterateByOffset():
+ for n in func.entry_points:
+ cat, num = api.get_category_for_name(n)
+ if (cat.startswith("es") or cat.startswith("GL_OES")):
+ if not categories.has_key(cat):
+ categories[cat] = []
+ proto = 'GLAPI %s GLAPIENTRY %s(%s);' \
+ % (func.return_type, "gl" + n, func.get_parameter_string(n))
+ categories[cat].append(proto)
+ if categories:
+ print ''
+ print '/* OpenGL ES specific prototypes */'
+ print ''
+ keys = categories.keys()
+ keys.sort()
+ for key in keys:
+ print '/* category %s */' % key
+ print "\n".join(categories[key])
+ print ''
+
print '#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */'
print ''
@@ -155,8 +178,9 @@ typedef struct {
def show_usage():
- print "Usage: %s [-f input_file_name] [-m mode]" % sys.argv[0]
- print "mode can be one of:"
+ print "Usage: %s [-f input_file_name] [-m mode] [-c]" % sys.argv[0]
+ print "-c Enable compatibility with OpenGL ES."
+ print "-m mode mode can be one of:"
print " long - Create code for compilers that can handle very"
print " long string constants. (default)"
print " short - Create code for compilers that can only handle"
@@ -167,11 +191,12 @@ if __name__ == '__main__':
file_name = "gl_API.xml"
try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:m:")
+ (args, trail) = getopt.getopt(sys.argv[1:], "f:m:c")
except Exception,e:
show_usage()
long_string = 1
+ es = False
for (arg,val) in args:
if arg == "-f":
file_name = val
@@ -182,7 +207,9 @@ if __name__ == '__main__':
long_string = 1
else:
show_usage()
+ elif arg == "-c":
+ es = True
api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory())
- printer = PrintGlProcs(long_string)
+ printer = PrintGlProcs(long_string, es)
printer.Print(api)
diff --git a/src/mesa/glapi/gl_table.py b/src/mesa/glapi/gl_table.py
index 0e05b3431a1..3bd7569e92a 100644
--- a/src/mesa/glapi/gl_table.py
+++ b/src/mesa/glapi/gl_table.py
@@ -30,9 +30,10 @@ import license
import sys, getopt
class PrintGlTable(gl_XML.gl_print_base):
- def __init__(self):
+ def __init__(self, es=False):
gl_XML.gl_print_base.__init__(self)
+ self.es = es
self.header_tag = '_GLAPI_TABLE_H_'
self.name = "gl_table.py (from Mesa)"
self.license = license.bsd_license_template % ( \
@@ -68,9 +69,10 @@ class PrintGlTable(gl_XML.gl_print_base):
class PrintRemapTable(gl_XML.gl_print_base):
- def __init__(self):
+ def __init__(self, es=False):
gl_XML.gl_print_base.__init__(self)
+ self.es = es
self.header_tag = '_GLAPI_DISPATCH_H_'
self.name = "gl_table.py (from Mesa)"
self.license = license.bsd_license_template % ("(C) Copyright IBM Corporation 2005", "IBM")
@@ -113,19 +115,22 @@ class PrintRemapTable(gl_XML.gl_print_base):
print ' } while(0)'
print ''
- abi = [ "1.0", "1.1", "1.2", "GL_ARB_multitexture" ]
-
functions = []
abi_functions = []
+ alias_functions = []
count = 0
for f in api.functionIterateByOffset():
- [category, num] = api.get_category_for_name( f.name )
- if category not in abi:
+ if not f.is_abi():
functions.append( [f, count] )
count += 1
else:
abi_functions.append( f )
+ if self.es:
+ # remember functions with aliases
+ if len(f.entry_points) > 1:
+ alias_functions.append(f)
+
for f in abi_functions:
print '#define CALL_%s(disp, parameters) (*((disp)->%s)) parameters' % (f.name, f.name)
@@ -165,33 +170,57 @@ class PrintRemapTable(gl_XML.gl_print_base):
print ''
print '#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */'
+
+ if alias_functions:
+ print ''
+ print '/* define aliases for compatibility */'
+ for f in alias_functions:
+ for name in f.entry_points:
+ if name != f.name:
+ print '#define CALL_%s(disp, parameters) CALL_%s(disp, parameters)' % (name, f.name)
+ print '#define GET_%s(disp) GET_%s(disp)' % (name, f.name)
+ print '#define SET_%s(disp, fn) SET_%s(disp, fn)' % (name, f.name)
+ print ''
+
+ print '#if defined(_GLAPI_USE_REMAP_TABLE)'
+ for f in alias_functions:
+ for name in f.entry_points:
+ if name != f.name:
+ print '#define %s_remap_index %s_remap_index' % (name, f.name)
+ print '#endif /* defined(_GLAPI_USE_REMAP_TABLE) */'
+ print ''
+
return
def show_usage():
- print "Usage: %s [-f input_file_name] [-m mode]" % sys.argv[0]
+ print "Usage: %s [-f input_file_name] [-m mode] [-c]" % sys.argv[0]
print " -m mode Mode can be 'table' or 'remap_table'."
+ print " -c Enable compatibility with OpenGL ES."
sys.exit(1)
if __name__ == '__main__':
file_name = "gl_API.xml"
try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:m:")
+ (args, trail) = getopt.getopt(sys.argv[1:], "f:m:c")
except Exception,e:
show_usage()
mode = "table"
+ es = False
for (arg,val) in args:
if arg == "-f":
file_name = val
elif arg == "-m":
mode = val
+ elif arg == "-c":
+ es = True
if mode == "table":
- printer = PrintGlTable()
+ printer = PrintGlTable(es)
elif mode == "remap_table":
- printer = PrintRemapTable()
+ printer = PrintRemapTable(es)
else:
show_usage()
diff --git a/src/mesa/glapi/gl_x86-64_asm.py b/src/mesa/glapi/gl_x86-64_asm.py
index f36ad3a5d82..31c1a2b93a8 100644
--- a/src/mesa/glapi/gl_x86-64_asm.py
+++ b/src/mesa/glapi/gl_x86-64_asm.py
@@ -122,7 +122,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print " * the symbol visibility mode to 'default'."
print ' */'
print ''
- print '#include "../x86/assyntax.h"'
+ print '#include "x86/assyntax.h"'
print ''
print '#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303'
print '# pragma GCC visibility push(default)'
diff --git a/src/mesa/glapi/gl_x86_asm.py b/src/mesa/glapi/gl_x86_asm.py
index 3bc955dfe5b..d210f3a2481 100644
--- a/src/mesa/glapi/gl_x86_asm.py
+++ b/src/mesa/glapi/gl_x86_asm.py
@@ -53,7 +53,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
def printRealHeader(self):
- print '#include "assyntax.h"'
+ print '#include "x86/assyntax.h"'
print '#include "glapi/glapioffsets.h"'
print ''
print '#if defined(STDCALL_API)'
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index e36fccb354c..469523d57cf 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -69,86 +69,11 @@
#include <assert.h>
#endif
-#include "glapi.h"
-#include "glapioffsets.h"
-#include "glapitable.h"
-
-
-/***** BEGIN NO-OP DISPATCH *****/
-
-static GLboolean WarnFlag = GL_FALSE;
-static _glapi_warning_func warning_func;
-
-/*
- * Enable/disable printing of warning messages.
- */
-PUBLIC void
-_glapi_noop_enable_warnings(GLboolean enable)
-{
- WarnFlag = enable;
-}
-
-/*
- * Register a callback function for reporting errors.
- */
-PUBLIC void
-_glapi_set_warning_func( _glapi_warning_func func )
-{
- warning_func = func;
-}
-
-static GLboolean
-warn(void)
-{
-#if !defined(_WIN32_WCE)
- if ((WarnFlag || getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG"))
- && warning_func) {
- return GL_TRUE;
- }
- else {
- return GL_FALSE;
- }
-#else
- return GL_FALSE;
-#endif
-}
-
-
-#define KEYWORD1 static
-#define KEYWORD1_ALT static
-#define KEYWORD2 GLAPIENTRY
-#define NAME(func) NoOp##func
-
-#define F NULL
-
-#define DISPATCH(func, args, msg) \
- if (warn()) { \
- warning_func(NULL, "GL User Error: called without context: %s", #func); \
- }
-
-#define RETURN_DISPATCH(func, args, msg) \
- if (warn()) { \
- warning_func(NULL, "GL User Error: called without context: %s", #func); \
- } \
- return 0
-
-#define DISPATCH_TABLE_NAME __glapi_noop_table
-#define UNUSED_TABLE_NAME __unused_noop_functions
-
-#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
-
-static GLint NoOpUnused(void)
-{
- if (warn()) {
- warning_func(NULL, "GL User Error: calling extension function without a current context\n");
- }
- return 0;
-}
-
-#include "glapitemp.h"
-
-/***** END NO-OP DISPATCH *****/
+#include "glapi/glapi.h"
+#include "glapi/glapioffsets.h"
+#include "glapi/glapitable.h"
+extern _glapi_proc __glapi_noop_table[];
/**
@@ -237,7 +162,7 @@ PUBLIC void *_glapi_Context = NULL;
* We should call this periodically from a function such as glXMakeCurrent
* in order to test if multiple threads are being used.
*/
-void
+PUBLIC void
_glapi_check_multithread(void)
{
#if defined(THREADS) && !defined(GLX_USE_TLS)
@@ -275,7 +200,6 @@ _glapi_check_multithread(void)
PUBLIC void
_glapi_set_context(void *context)
{
- (void) __unused_noop_functions; /* silence a warning */
#if defined(GLX_USE_TLS)
_glapi_tls_Context = context;
#elif defined(THREADS)
diff --git a/src/mesa/glapi/glapi.h b/src/mesa/glapi/glapi.h
index 5fb5401229a..47ea23e92b5 100644
--- a/src/mesa/glapi/glapi.h
+++ b/src/mesa/glapi/glapi.h
@@ -55,8 +55,6 @@ struct _glapi_table;
typedef void (*_glapi_proc)(void); /* generic function pointer */
-typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
-
#if defined(USE_MGL_NAMESPACE)
#define _glapi_set_dispatch _mglapi_set_dispatch
@@ -107,12 +105,6 @@ extern struct _glapi_table *_glapi_Dispatch;
**/
extern void
-_glapi_noop_enable_warnings(GLboolean enable);
-
-extern void
-_glapi_set_warning_func(_glapi_warning_func func);
-
-extern void
_glapi_check_multithread(void);
diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c
index ed443c12c89..eecfb9c1ae1 100644
--- a/src/mesa/glapi/glapi_getproc.c
+++ b/src/mesa/glapi/glapi_getproc.c
@@ -34,9 +34,9 @@
#include <string.h>
#include "main/glheader.h"
#include "main/compiler.h"
-#include "glapi.h"
-#include "glapioffsets.h"
-#include "glapitable.h"
+#include "glapi/glapi.h"
+#include "glapi/glapioffsets.h"
+#include "glapi/glapitable.h"
static void
@@ -75,7 +75,7 @@ str_dup(const char *str)
#endif
/* The code in this file is auto-generated with Python */
-#include "glprocs.h"
+#include "glapi/glprocs.h"
/**
@@ -530,7 +530,7 @@ _glapi_get_proc_offset(const char *funcName)
* in the name of static functions, try generating a new API entrypoint on
* the fly with assembly language.
*/
-_glapi_proc
+PUBLIC _glapi_proc
_glapi_get_proc_address(const char *funcName)
{
struct _glapi_function * entry;
diff --git a/src/mesa/glapi/glapi_nop.c b/src/mesa/glapi/glapi_nop.c
new file mode 100644
index 00000000000..5d2769c0738
--- /dev/null
+++ b/src/mesa/glapi/glapi_nop.c
@@ -0,0 +1,91 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.8
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2010 VMWare, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/**
+ * No-op dispatch table.
+ *
+ * This file defines a special dispatch table which is loaded with no-op
+ * functions.
+ *
+ * When there's no current rendering context, calling a GL function like
+ * glBegin() is a no-op. Apps should never normally do this. So as a
+ * debugging aid, each of the no-op functions will emit a warning to
+ * stderr if the MESA_DEBUG or LIBGL_DEBUG env var is set.
+ */
+
+
+
+#include "main/compiler.h"
+#include "main/glheader.h"
+#include "glapi/glapi.h"
+
+
+/**
+ * Called by each of the no-op GL entrypoints.
+ */
+static int
+Warn(const char *func)
+{
+#if !defined(_WIN32_WCE)
+ if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) {
+ fprintf(stderr, "GL User Error: gl%s called without a rendering context\n",
+ func);
+ }
+#endif
+ return 0;
+}
+
+
+/**
+ * This is called if the user somehow calls an unassigned GL dispatch function.
+ */
+static GLint
+NoOpUnused(void)
+{
+ return Warn(" function");
+}
+
+
+/*
+ * Defines for the glapitemp.h functions.
+ */
+#define KEYWORD1 static
+#define KEYWORD1_ALT static
+#define KEYWORD2 GLAPIENTRY
+#define NAME(func) NoOp##func
+#define DISPATCH(func, args, msg) Warn(#func);
+#define RETURN_DISPATCH(func, args, msg) Warn(#func); return 0
+
+
+/*
+ * Defines for the table of no-op entry points.
+ */
+#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name
+#define DISPATCH_TABLE_NAME __glapi_noop_table
+#define UNUSED_TABLE_NAME __unused_noop_functions
+
+
+#include "glapi/glapitemp.h"
diff --git a/src/mesa/glapi/glapidispatch.h b/src/mesa/glapi/glapidispatch.h
index d6ba92824a1..51ae7feaf6f 100644
--- a/src/mesa/glapi/glapidispatch.h
+++ b/src/mesa/glapi/glapidispatch.h
@@ -2422,6 +2422,30 @@
#define CALL_FramebufferTextureLayerEXT(disp, parameters) (*((disp)->FramebufferTextureLayerEXT)) parameters
#define GET_FramebufferTextureLayerEXT(disp) ((disp)->FramebufferTextureLayerEXT)
#define SET_FramebufferTextureLayerEXT(disp, fn) ((disp)->FramebufferTextureLayerEXT = fn)
+#define CALL_ColorMaskIndexedEXT(disp, parameters) (*((disp)->ColorMaskIndexedEXT)) parameters
+#define GET_ColorMaskIndexedEXT(disp) ((disp)->ColorMaskIndexedEXT)
+#define SET_ColorMaskIndexedEXT(disp, fn) ((disp)->ColorMaskIndexedEXT = fn)
+#define CALL_DisableIndexedEXT(disp, parameters) (*((disp)->DisableIndexedEXT)) parameters
+#define GET_DisableIndexedEXT(disp) ((disp)->DisableIndexedEXT)
+#define SET_DisableIndexedEXT(disp, fn) ((disp)->DisableIndexedEXT = fn)
+#define CALL_EnableIndexedEXT(disp, parameters) (*((disp)->EnableIndexedEXT)) parameters
+#define GET_EnableIndexedEXT(disp) ((disp)->EnableIndexedEXT)
+#define SET_EnableIndexedEXT(disp, fn) ((disp)->EnableIndexedEXT = fn)
+#define CALL_GetBooleanIndexedvEXT(disp, parameters) (*((disp)->GetBooleanIndexedvEXT)) parameters
+#define GET_GetBooleanIndexedvEXT(disp) ((disp)->GetBooleanIndexedvEXT)
+#define SET_GetBooleanIndexedvEXT(disp, fn) ((disp)->GetBooleanIndexedvEXT = fn)
+#define CALL_GetIntegerIndexedvEXT(disp, parameters) (*((disp)->GetIntegerIndexedvEXT)) parameters
+#define GET_GetIntegerIndexedvEXT(disp) ((disp)->GetIntegerIndexedvEXT)
+#define SET_GetIntegerIndexedvEXT(disp, fn) ((disp)->GetIntegerIndexedvEXT = fn)
+#define CALL_IsEnabledIndexedEXT(disp, parameters) (*((disp)->IsEnabledIndexedEXT)) parameters
+#define GET_IsEnabledIndexedEXT(disp) ((disp)->IsEnabledIndexedEXT)
+#define SET_IsEnabledIndexedEXT(disp, fn) ((disp)->IsEnabledIndexedEXT = fn)
+#define CALL_BeginConditionalRenderNV(disp, parameters) (*((disp)->BeginConditionalRenderNV)) parameters
+#define GET_BeginConditionalRenderNV(disp) ((disp)->BeginConditionalRenderNV)
+#define SET_BeginConditionalRenderNV(disp, fn) ((disp)->BeginConditionalRenderNV = fn)
+#define CALL_EndConditionalRenderNV(disp, parameters) (*((disp)->EndConditionalRenderNV)) parameters
+#define GET_EndConditionalRenderNV(disp) ((disp)->EndConditionalRenderNV)
+#define SET_EndConditionalRenderNV(disp, fn) ((disp)->EndConditionalRenderNV = fn)
#define CALL_ProvokingVertexEXT(disp, parameters) (*((disp)->ProvokingVertexEXT)) parameters
#define GET_ProvokingVertexEXT(disp) ((disp)->ProvokingVertexEXT)
#define SET_ProvokingVertexEXT(disp, fn) ((disp)->ProvokingVertexEXT = fn)
@@ -2449,7 +2473,7 @@
#else
-#define driDispatchRemapTable_size 387
+#define driDispatchRemapTable_size 395
extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define AttachShader_remap_index 0
@@ -2831,14 +2855,22 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define BufferParameteriAPPLE_remap_index 376
#define FlushMappedBufferRangeAPPLE_remap_index 377
#define FramebufferTextureLayerEXT_remap_index 378
-#define ProvokingVertexEXT_remap_index 379
-#define GetTexParameterPointervAPPLE_remap_index 380
-#define TextureRangeAPPLE_remap_index 381
-#define StencilFuncSeparateATI_remap_index 382
-#define ProgramEnvParameters4fvEXT_remap_index 383
-#define ProgramLocalParameters4fvEXT_remap_index 384
-#define GetQueryObjecti64vEXT_remap_index 385
-#define GetQueryObjectui64vEXT_remap_index 386
+#define ColorMaskIndexedEXT_remap_index 379
+#define DisableIndexedEXT_remap_index 380
+#define EnableIndexedEXT_remap_index 381
+#define GetBooleanIndexedvEXT_remap_index 382
+#define GetIntegerIndexedvEXT_remap_index 383
+#define IsEnabledIndexedEXT_remap_index 384
+#define BeginConditionalRenderNV_remap_index 385
+#define EndConditionalRenderNV_remap_index 386
+#define ProvokingVertexEXT_remap_index 387
+#define GetTexParameterPointervAPPLE_remap_index 388
+#define TextureRangeAPPLE_remap_index 389
+#define StencilFuncSeparateATI_remap_index 390
+#define ProgramEnvParameters4fvEXT_remap_index 391
+#define ProgramLocalParameters4fvEXT_remap_index 392
+#define GetQueryObjecti64vEXT_remap_index 393
+#define GetQueryObjectui64vEXT_remap_index 394
#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), driDispatchRemapTable[AttachShader_remap_index], parameters)
#define GET_AttachShader(disp) GET_by_offset(disp, driDispatchRemapTable[AttachShader_remap_index])
@@ -3977,6 +4009,30 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
#define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index], parameters)
#define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index])
#define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index], fn)
+#define CALL_ColorMaskIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)), driDispatchRemapTable[ColorMaskIndexedEXT_remap_index], parameters)
+#define GET_ColorMaskIndexedEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ColorMaskIndexedEXT_remap_index])
+#define SET_ColorMaskIndexedEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ColorMaskIndexedEXT_remap_index], fn)
+#define CALL_DisableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[DisableIndexedEXT_remap_index], parameters)
+#define GET_DisableIndexedEXT(disp) GET_by_offset(disp, driDispatchRemapTable[DisableIndexedEXT_remap_index])
+#define SET_DisableIndexedEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[DisableIndexedEXT_remap_index], fn)
+#define CALL_EnableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[EnableIndexedEXT_remap_index], parameters)
+#define GET_EnableIndexedEXT(disp) GET_by_offset(disp, driDispatchRemapTable[EnableIndexedEXT_remap_index])
+#define SET_EnableIndexedEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EnableIndexedEXT_remap_index], fn)
+#define CALL_GetBooleanIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLboolean *)), driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index], parameters)
+#define GET_GetBooleanIndexedvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index])
+#define SET_GetBooleanIndexedvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index], fn)
+#define CALL_GetIntegerIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint *)), driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index], parameters)
+#define GET_GetIntegerIndexedvEXT(disp) GET_by_offset(disp, driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index])
+#define SET_GetIntegerIndexedvEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index], fn)
+#define CALL_IsEnabledIndexedEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum, GLuint)), driDispatchRemapTable[IsEnabledIndexedEXT_remap_index], parameters)
+#define GET_IsEnabledIndexedEXT(disp) GET_by_offset(disp, driDispatchRemapTable[IsEnabledIndexedEXT_remap_index])
+#define SET_IsEnabledIndexedEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[IsEnabledIndexedEXT_remap_index], fn)
+#define CALL_BeginConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), driDispatchRemapTable[BeginConditionalRenderNV_remap_index], parameters)
+#define GET_BeginConditionalRenderNV(disp) GET_by_offset(disp, driDispatchRemapTable[BeginConditionalRenderNV_remap_index])
+#define SET_BeginConditionalRenderNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[BeginConditionalRenderNV_remap_index], fn)
+#define CALL_EndConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), driDispatchRemapTable[EndConditionalRenderNV_remap_index], parameters)
+#define GET_EndConditionalRenderNV(disp) GET_by_offset(disp, driDispatchRemapTable[EndConditionalRenderNV_remap_index])
+#define SET_EndConditionalRenderNV(disp, fn) SET_by_offset(disp, driDispatchRemapTable[EndConditionalRenderNV_remap_index], fn)
#define CALL_ProvokingVertexEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), driDispatchRemapTable[ProvokingVertexEXT_remap_index], parameters)
#define GET_ProvokingVertexEXT(disp) GET_by_offset(disp, driDispatchRemapTable[ProvokingVertexEXT_remap_index])
#define SET_ProvokingVertexEXT(disp, fn) SET_by_offset(disp, driDispatchRemapTable[ProvokingVertexEXT_remap_index], fn)
diff --git a/src/mesa/glapi/glapioffsets.h b/src/mesa/glapi/glapioffsets.h
index 3d10260a057..c5d367f6f29 100644
--- a/src/mesa/glapi/glapioffsets.h
+++ b/src/mesa/glapi/glapioffsets.h
@@ -821,15 +821,23 @@
#define _gloffset_BufferParameteriAPPLE 784
#define _gloffset_FlushMappedBufferRangeAPPLE 785
#define _gloffset_FramebufferTextureLayerEXT 786
-#define _gloffset_ProvokingVertexEXT 787
-#define _gloffset_GetTexParameterPointervAPPLE 788
-#define _gloffset_TextureRangeAPPLE 789
-#define _gloffset_StencilFuncSeparateATI 790
-#define _gloffset_ProgramEnvParameters4fvEXT 791
-#define _gloffset_ProgramLocalParameters4fvEXT 792
-#define _gloffset_GetQueryObjecti64vEXT 793
-#define _gloffset_GetQueryObjectui64vEXT 794
-#define _gloffset_FIRST_DYNAMIC 795
+#define _gloffset_ColorMaskIndexedEXT 787
+#define _gloffset_DisableIndexedEXT 788
+#define _gloffset_EnableIndexedEXT 789
+#define _gloffset_GetBooleanIndexedvEXT 790
+#define _gloffset_GetIntegerIndexedvEXT 791
+#define _gloffset_IsEnabledIndexedEXT 792
+#define _gloffset_BeginConditionalRenderNV 793
+#define _gloffset_EndConditionalRenderNV 794
+#define _gloffset_ProvokingVertexEXT 795
+#define _gloffset_GetTexParameterPointervAPPLE 796
+#define _gloffset_TextureRangeAPPLE 797
+#define _gloffset_StencilFuncSeparateATI 798
+#define _gloffset_ProgramEnvParameters4fvEXT 799
+#define _gloffset_ProgramLocalParameters4fvEXT 800
+#define _gloffset_GetQueryObjecti64vEXT 801
+#define _gloffset_GetQueryObjectui64vEXT 802
+#define _gloffset_FIRST_DYNAMIC 803
#else
@@ -1212,6 +1220,14 @@
#define _gloffset_BufferParameteriAPPLE driDispatchRemapTable[BufferParameteriAPPLE_remap_index]
#define _gloffset_FlushMappedBufferRangeAPPLE driDispatchRemapTable[FlushMappedBufferRangeAPPLE_remap_index]
#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index]
+#define _gloffset_ColorMaskIndexedEXT driDispatchRemapTable[ColorMaskIndexedEXT_remap_index]
+#define _gloffset_DisableIndexedEXT driDispatchRemapTable[DisableIndexedEXT_remap_index]
+#define _gloffset_EnableIndexedEXT driDispatchRemapTable[EnableIndexedEXT_remap_index]
+#define _gloffset_GetBooleanIndexedvEXT driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index]
+#define _gloffset_GetIntegerIndexedvEXT driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index]
+#define _gloffset_IsEnabledIndexedEXT driDispatchRemapTable[IsEnabledIndexedEXT_remap_index]
+#define _gloffset_BeginConditionalRenderNV driDispatchRemapTable[BeginConditionalRenderNV_remap_index]
+#define _gloffset_EndConditionalRenderNV driDispatchRemapTable[EndConditionalRenderNV_remap_index]
#define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index]
#define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index]
#define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index]
diff --git a/src/mesa/glapi/glapitable.h b/src/mesa/glapi/glapitable.h
index 4f9e53b62d6..0c5b46d04b4 100644
--- a/src/mesa/glapi/glapitable.h
+++ b/src/mesa/glapi/glapitable.h
@@ -827,14 +827,22 @@ struct _glapi_table
void (GLAPIENTRYP BufferParameteriAPPLE)(GLenum target, GLenum pname, GLint param); /* 784 */
void (GLAPIENTRYP FlushMappedBufferRangeAPPLE)(GLenum target, GLintptr offset, GLsizeiptr size); /* 785 */
void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 786 */
- void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 787 */
- void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 788 */
- void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 789 */
- void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 790 */
- void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 791 */
- void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 792 */
- void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 793 */
- void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 794 */
+ void (GLAPIENTRYP ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); /* 787 */
+ void (GLAPIENTRYP DisableIndexedEXT)(GLenum target, GLuint index); /* 788 */
+ void (GLAPIENTRYP EnableIndexedEXT)(GLenum target, GLuint index); /* 789 */
+ void (GLAPIENTRYP GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data); /* 790 */
+ void (GLAPIENTRYP GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data); /* 791 */
+ GLboolean (GLAPIENTRYP IsEnabledIndexedEXT)(GLenum target, GLuint index); /* 792 */
+ void (GLAPIENTRYP BeginConditionalRenderNV)(GLuint query, GLenum mode); /* 793 */
+ void (GLAPIENTRYP EndConditionalRenderNV)(void); /* 794 */
+ void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 795 */
+ void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 796 */
+ void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 797 */
+ void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 798 */
+ void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 799 */
+ void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 800 */
+ void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 801 */
+ void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 802 */
};
#endif /* !defined( _GLAPI_TABLE_H_ ) */
diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h
index 319a4ab55bd..2540ef64657 100644
--- a/src/mesa/glapi/glapitemp.h
+++ b/src/mesa/glapi/glapitemp.h
@@ -27,7 +27,7 @@
*/
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) && defined(__ELF__)
# define HIDDEN __attribute__((visibility("hidden")))
# else
# define HIDDEN
@@ -80,6 +80,8 @@
#endif
+#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
+
KEYWORD1 void KEYWORD2 NAME(NewList)(GLuint list, GLenum mode)
{
DISPATCH(NewList, (list, mode), (F, "glNewList(%d, 0x%x);\n", list, mode));
@@ -1710,13 +1712,6 @@ KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResident)(GLsizei n, const GLuint *
RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences)
-{
- RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
{
DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border));
@@ -1762,25 +1757,11 @@ KEYWORD1 void KEYWORD2 NAME(DeleteTextures)(GLsizei n, const GLuint * textures)
DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTextures(%d, %p);\n", n, (const void *) textures));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures)
-{
- DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GenTextures)(GLsizei n, GLuint * textures)
{
DISPATCH(GenTextures, (n, textures), (F, "glGenTextures(%d, %p);\n", n, (const void *) textures));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures)
-{
- DISPATCH(GenTextures, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetPointerv)(GLenum pname, GLvoid ** params)
{
DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params));
@@ -1796,13 +1777,6 @@ KEYWORD1 GLboolean KEYWORD2 NAME(IsTexture)(GLuint texture)
RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTexture(%d);\n", texture));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture)
-{
- RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTextureEXT(%d);\n", texture));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities)
{
DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTextures(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities));
@@ -1878,6 +1852,11 @@ KEYWORD1 void KEYWORD2 NAME(ColorTable)(GLenum target, GLenum internalformat, GL
DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTable(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
}
+KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
+{
+ DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
+}
+
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table);
KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
@@ -1885,11 +1864,6 @@ KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum intern
DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableSGI(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
}
-KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table)
-{
- DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table));
-}
-
KEYWORD1 void KEYWORD2 NAME(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params)
{
DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
@@ -1931,64 +1905,16 @@ KEYWORD1 void KEYWORD2 NAME(GetColorTable)(GLenum target, GLenum format, GLenum
DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTable(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table)
-{
- DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * table)
-{
- DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params)
{
DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params)
{
DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data)
{
DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTable(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data));
@@ -2114,57 +2040,21 @@ KEYWORD1 void KEYWORD2 NAME(GetConvolutionFilter)(GLenum target, GLenum format,
DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilter(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image)
-{
- DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params)
{
DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params)
{
DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span)
{
DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilter(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span)
-{
- DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column)
{
DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column));
@@ -2182,85 +2072,31 @@ KEYWORD1 void KEYWORD2 NAME(GetHistogram)(GLenum target, GLboolean reset, GLenum
DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogram(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
-{
- DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params)
{
DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params)
{
DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
{
DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmax(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
-{
- DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params)
{
DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params)
-{
- DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params)
{
DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-#ifndef GLX_INDIRECT_RENDERING
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params);
-
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params)
-{
- DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
-}
-#endif /* GLX_INDIRECT_RENDERING */
-
KEYWORD1 void KEYWORD2 NAME(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
{
DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogram(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink));
@@ -5677,6 +5513,46 @@ KEYWORD1 void KEYWORD2 NAME(FramebufferTextureLayerEXT)(GLenum target, GLenum at
DISPATCH(FramebufferTextureLayerEXT, (target, attachment, texture, level, layer), (F, "glFramebufferTextureLayerEXT(0x%x, 0x%x, %d, %d, %d);\n", target, attachment, texture, level, layer));
}
+KEYWORD1 void KEYWORD2 NAME(ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
+{
+ DISPATCH(ColorMaskIndexedEXT, (buf, r, g, b, a), (F, "glColorMaskIndexedEXT(%d, %d, %d, %d, %d);\n", buf, r, g, b, a));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DisableIndexedEXT)(GLenum target, GLuint index)
+{
+ DISPATCH(DisableIndexedEXT, (target, index), (F, "glDisableIndexedEXT(0x%x, %d);\n", target, index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(EnableIndexedEXT)(GLenum target, GLuint index)
+{
+ DISPATCH(EnableIndexedEXT, (target, index), (F, "glEnableIndexedEXT(0x%x, %d);\n", target, index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data)
+{
+ DISPATCH(GetBooleanIndexedvEXT, (value, index, data), (F, "glGetBooleanIndexedvEXT(0x%x, %d, %p);\n", value, index, (const void *) data));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data)
+{
+ DISPATCH(GetIntegerIndexedvEXT, (value, index, data), (F, "glGetIntegerIndexedvEXT(0x%x, %d, %p);\n", value, index, (const void *) data));
+}
+
+KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabledIndexedEXT)(GLenum target, GLuint index)
+{
+ RETURN_DISPATCH(IsEnabledIndexedEXT, (target, index), (F, "glIsEnabledIndexedEXT(0x%x, %d);\n", target, index));
+}
+
+KEYWORD1 void KEYWORD2 NAME(BeginConditionalRenderNV)(GLuint query, GLenum mode)
+{
+ DISPATCH(BeginConditionalRenderNV, (query, mode), (F, "glBeginConditionalRenderNV(%d, 0x%x);\n", query, mode));
+}
+
+KEYWORD1 void KEYWORD2 NAME(EndConditionalRenderNV)(void)
+{
+ DISPATCH(EndConditionalRenderNV, (), (F, "glEndConditionalRenderNV();\n"));
+}
+
KEYWORD1 void KEYWORD2 NAME(ProvokingVertexEXT)(GLenum mode)
{
DISPATCH(ProvokingVertexEXT, (mode), (F, "glProvokingVertexEXT(0x%x);\n", mode));
@@ -5687,56 +5563,191 @@ KEYWORD1 void KEYWORD2 NAME(ProvokingVertex)(GLenum mode)
DISPATCH(ProvokingVertexEXT, (mode), (F, "glProvokingVertex(0x%x);\n", mode));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_788)(GLenum target, GLenum pname, GLvoid ** params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_796)(GLenum target, GLenum pname, GLvoid ** params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_788)(GLenum target, GLenum pname, GLvoid ** params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_796)(GLenum target, GLenum pname, GLvoid ** params)
{
DISPATCH(GetTexParameterPointervAPPLE, (target, pname, params), (F, "glGetTexParameterPointervAPPLE(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_789)(GLenum target, GLsizei length, GLvoid * pointer);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLenum target, GLsizei length, GLvoid * pointer);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_789)(GLenum target, GLsizei length, GLvoid * pointer)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_797)(GLenum target, GLsizei length, GLvoid * pointer)
{
DISPATCH(TextureRangeAPPLE, (target, length, pointer), (F, "glTextureRangeAPPLE(0x%x, %d, %p);\n", target, length, (const void *) pointer));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_790)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_790)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_798)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask)
{
DISPATCH(StencilFuncSeparateATI, (frontfunc, backfunc, ref, mask), (F, "glStencilFuncSeparateATI(0x%x, 0x%x, %d, %d);\n", frontfunc, backfunc, ref, mask));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_791)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_799)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_791)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_799)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_792)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_800)(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_792)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_800)(GLenum target, GLuint index, GLsizei count, const GLfloat * params)
{
DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_793)(GLuint id, GLenum pname, GLint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLuint id, GLenum pname, GLint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_793)(GLuint id, GLenum pname, GLint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_801)(GLuint id, GLenum pname, GLint64EXT * params)
{
DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_794)(GLuint id, GLenum pname, GLuint64EXT * params);
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLuint id, GLenum pname, GLuint64EXT * params);
-KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_794)(GLuint id, GLenum pname, GLuint64EXT * params)
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_802)(GLuint id, GLenum pname, GLuint64EXT * params)
{
DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params));
}
+#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */
+
+/* these entry points might require different protocols */
+#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS
+
+KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences)
+{
+ RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences));
+}
+
+KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures)
+{
+ DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures)
+{
+ DISPATCH(GenTextures, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures));
+}
+
+KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture)
+{
+ RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTextureEXT(%d);\n", texture));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * table)
+{
+ DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table)
+{
+ DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image)
+{
+ DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span)
+{
+ DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
+{
+ DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values)
+{
+ DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params)
+{
+ DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params);
+
+KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params)
+{
+ DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params));
+}
+
+
+#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */
+
+
#endif /* defined( NAME ) */
/*
@@ -5749,7 +5760,11 @@ KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_794)(GLuint id, GLenum pname, GLu
#error TABLE_ENTRY must be defined
#endif
-static _glapi_proc DISPATCH_TABLE_NAME[] = {
+#ifdef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
+#error _GLAPI_SKIP_NORMAL_ENTRY_POINTS must not be defined
+#endif
+
+_glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(NewList),
TABLE_ENTRY(EndList),
TABLE_ENTRY(CallList),
@@ -6537,14 +6552,22 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
TABLE_ENTRY(_dispatch_stub_784),
TABLE_ENTRY(_dispatch_stub_785),
TABLE_ENTRY(FramebufferTextureLayerEXT),
+ TABLE_ENTRY(ColorMaskIndexedEXT),
+ TABLE_ENTRY(DisableIndexedEXT),
+ TABLE_ENTRY(EnableIndexedEXT),
+ TABLE_ENTRY(GetBooleanIndexedvEXT),
+ TABLE_ENTRY(GetIntegerIndexedvEXT),
+ TABLE_ENTRY(IsEnabledIndexedEXT),
+ TABLE_ENTRY(BeginConditionalRenderNV),
+ TABLE_ENTRY(EndConditionalRenderNV),
TABLE_ENTRY(ProvokingVertexEXT),
- TABLE_ENTRY(_dispatch_stub_788),
- TABLE_ENTRY(_dispatch_stub_789),
- TABLE_ENTRY(_dispatch_stub_790),
- TABLE_ENTRY(_dispatch_stub_791),
- TABLE_ENTRY(_dispatch_stub_792),
- TABLE_ENTRY(_dispatch_stub_793),
- TABLE_ENTRY(_dispatch_stub_794),
+ TABLE_ENTRY(_dispatch_stub_796),
+ TABLE_ENTRY(_dispatch_stub_797),
+ TABLE_ENTRY(_dispatch_stub_798),
+ TABLE_ENTRY(_dispatch_stub_799),
+ TABLE_ENTRY(_dispatch_stub_800),
+ TABLE_ENTRY(_dispatch_stub_801),
+ TABLE_ENTRY(_dispatch_stub_802),
/* A whole bunch of no-op functions. These might be called
* when someone tries to call a dynamically-registered
* extension function without a current rendering context.
@@ -6657,27 +6680,16 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {
* We list the functions which are not otherwise used.
*/
#ifdef UNUSED_TABLE_NAME
-static _glapi_proc UNUSED_TABLE_NAME[] = {
+_glapi_proc UNUSED_TABLE_NAME[] = {
+#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS
TABLE_ENTRY(ArrayElementEXT),
TABLE_ENTRY(BindTextureEXT),
TABLE_ENTRY(DrawArraysEXT),
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(AreTexturesResidentEXT),
-#endif
TABLE_ENTRY(CopyTexImage1DEXT),
TABLE_ENTRY(CopyTexImage2DEXT),
TABLE_ENTRY(CopyTexSubImage1DEXT),
TABLE_ENTRY(CopyTexSubImage2DEXT),
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(DeleteTexturesEXT),
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(GenTexturesEXT),
-#endif
TABLE_ENTRY(GetPointervEXT),
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(IsTextureEXT),
-#endif
TABLE_ENTRY(PrioritizeTexturesEXT),
TABLE_ENTRY(TexSubImage1DEXT),
TABLE_ENTRY(TexSubImage2DEXT),
@@ -6685,15 +6697,25 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(BlendEquationEXT),
TABLE_ENTRY(DrawRangeElementsEXT),
TABLE_ENTRY(ColorTableEXT),
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(GetColorTableEXT),
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(GetColorTableParameterfvEXT),
-#endif
-#ifndef GLX_INDIRECT_RENDERING
- TABLE_ENTRY(GetColorTableParameterivEXT),
-#endif
+ TABLE_ENTRY(_dispatch_stub_339),
+ TABLE_ENTRY(_dispatch_stub_340),
+ TABLE_ENTRY(_dispatch_stub_341),
+ TABLE_ENTRY(_dispatch_stub_342),
+ TABLE_ENTRY(_dispatch_stub_346),
+ TABLE_ENTRY(_dispatch_stub_347),
+ TABLE_ENTRY(_dispatch_stub_348),
+ TABLE_ENTRY(_dispatch_stub_349),
+ TABLE_ENTRY(_dispatch_stub_350),
+ TABLE_ENTRY(_dispatch_stub_351),
+ TABLE_ENTRY(_dispatch_stub_352),
+ TABLE_ENTRY(_dispatch_stub_353),
+ TABLE_ENTRY(_dispatch_stub_354),
+ TABLE_ENTRY(_dispatch_stub_355),
+ TABLE_ENTRY(_dispatch_stub_360),
+ TABLE_ENTRY(_dispatch_stub_367),
+ TABLE_ENTRY(_dispatch_stub_368),
+ TABLE_ENTRY(_dispatch_stub_369),
+ TABLE_ENTRY(_dispatch_stub_370),
TABLE_ENTRY(TexImage3DEXT),
TABLE_ENTRY(TexSubImage3DEXT),
TABLE_ENTRY(CopyTexSubImage3DEXT),
@@ -6731,6 +6753,7 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(MultiTexCoord4iv),
TABLE_ENTRY(MultiTexCoord4s),
TABLE_ENTRY(MultiTexCoord4sv),
+ TABLE_ENTRY(_dispatch_stub_423),
TABLE_ENTRY(LoadTransposeMatrixd),
TABLE_ENTRY(LoadTransposeMatrixf),
TABLE_ENTRY(MultTransposeMatrixd),
@@ -6845,8 +6868,10 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(RenderbufferStorageMultisampleEXT),
TABLE_ENTRY(PointParameterf),
TABLE_ENTRY(PointParameterfARB),
+ TABLE_ENTRY(_dispatch_stub_592),
TABLE_ENTRY(PointParameterfv),
TABLE_ENTRY(PointParameterfvARB),
+ TABLE_ENTRY(_dispatch_stub_593),
TABLE_ENTRY(SecondaryColor3b),
TABLE_ENTRY(SecondaryColor3bv),
TABLE_ENTRY(SecondaryColor3d),
@@ -6872,6 +6897,7 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(FogCoordf),
TABLE_ENTRY(FogCoordfv),
TABLE_ENTRY(BlendFuncSeparate),
+ TABLE_ENTRY(_dispatch_stub_623),
TABLE_ENTRY(WindowPos2d),
TABLE_ENTRY(WindowPos2dARB),
TABLE_ENTRY(WindowPos2dv),
@@ -6935,6 +6961,29 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(BlitFramebuffer),
TABLE_ENTRY(FramebufferTextureLayer),
TABLE_ENTRY(ProvokingVertex),
+#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */
+#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS
+ TABLE_ENTRY(AreTexturesResidentEXT),
+ TABLE_ENTRY(DeleteTexturesEXT),
+ TABLE_ENTRY(GenTexturesEXT),
+ TABLE_ENTRY(IsTextureEXT),
+ TABLE_ENTRY(GetColorTableEXT),
+ TABLE_ENTRY(_dispatch_stub_343),
+ TABLE_ENTRY(GetColorTableParameterfvEXT),
+ TABLE_ENTRY(_dispatch_stub_344),
+ TABLE_ENTRY(GetColorTableParameterivEXT),
+ TABLE_ENTRY(_dispatch_stub_345),
+ TABLE_ENTRY(_dispatch_stub_356),
+ TABLE_ENTRY(_dispatch_stub_357),
+ TABLE_ENTRY(_dispatch_stub_358),
+ TABLE_ENTRY(_dispatch_stub_359),
+ TABLE_ENTRY(_dispatch_stub_361),
+ TABLE_ENTRY(_dispatch_stub_362),
+ TABLE_ENTRY(_dispatch_stub_363),
+ TABLE_ENTRY(_dispatch_stub_364),
+ TABLE_ENTRY(_dispatch_stub_365),
+ TABLE_ENTRY(_dispatch_stub_366),
+#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */
};
#endif /*UNUSED_TABLE_NAME*/
diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h
index 1ad7e843370..b590a7c41d1 100644
--- a/src/mesa/glapi/glprocs.h
+++ b/src/mesa/glapi/glprocs.h
@@ -839,6 +839,14 @@ static const char gl_string_table[] =
"glBufferParameteriAPPLE\0"
"glFlushMappedBufferRangeAPPLE\0"
"glFramebufferTextureLayerEXT\0"
+ "glColorMaskIndexedEXT\0"
+ "glDisableIndexedEXT\0"
+ "glEnableIndexedEXT\0"
+ "glGetBooleanIndexedvEXT\0"
+ "glGetIntegerIndexedvEXT\0"
+ "glIsEnabledIndexedEXT\0"
+ "glBeginConditionalRenderNV\0"
+ "glEndConditionalRenderNV\0"
"glProvokingVertexEXT\0"
"glGetTexParameterPointervAPPLE\0"
"glTextureRangeAPPLE\0"
@@ -1196,13 +1204,13 @@ static const char gl_string_table[] =
#define gl_dispatch_stub_783 mgl_dispatch_stub_783
#define gl_dispatch_stub_784 mgl_dispatch_stub_784
#define gl_dispatch_stub_785 mgl_dispatch_stub_785
-#define gl_dispatch_stub_788 mgl_dispatch_stub_788
-#define gl_dispatch_stub_789 mgl_dispatch_stub_789
-#define gl_dispatch_stub_790 mgl_dispatch_stub_790
-#define gl_dispatch_stub_791 mgl_dispatch_stub_791
-#define gl_dispatch_stub_792 mgl_dispatch_stub_792
-#define gl_dispatch_stub_793 mgl_dispatch_stub_793
-#define gl_dispatch_stub_794 mgl_dispatch_stub_794
+#define gl_dispatch_stub_796 mgl_dispatch_stub_796
+#define gl_dispatch_stub_797 mgl_dispatch_stub_797
+#define gl_dispatch_stub_798 mgl_dispatch_stub_798
+#define gl_dispatch_stub_799 mgl_dispatch_stub_799
+#define gl_dispatch_stub_800 mgl_dispatch_stub_800
+#define gl_dispatch_stub_801 mgl_dispatch_stub_801
+#define gl_dispatch_stub_802 mgl_dispatch_stub_802
#endif /* USE_MGL_NAMESPACE */
@@ -1250,13 +1258,13 @@ void GLAPIENTRY gl_dispatch_stub_765(GLenum modeRGB, GLenum modeA);
void GLAPIENTRY gl_dispatch_stub_783(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
void GLAPIENTRY gl_dispatch_stub_784(GLenum target, GLenum pname, GLint param);
void GLAPIENTRY gl_dispatch_stub_785(GLenum target, GLintptr offset, GLsizeiptr size);
-void GLAPIENTRY gl_dispatch_stub_788(GLenum target, GLenum pname, GLvoid ** params);
-void GLAPIENTRY gl_dispatch_stub_789(GLenum target, GLsizei length, GLvoid * pointer);
-void GLAPIENTRY gl_dispatch_stub_790(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
-void GLAPIENTRY gl_dispatch_stub_791(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_792(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
-void GLAPIENTRY gl_dispatch_stub_793(GLuint id, GLenum pname, GLint64EXT * params);
-void GLAPIENTRY gl_dispatch_stub_794(GLuint id, GLenum pname, GLuint64EXT * params);
+void GLAPIENTRY gl_dispatch_stub_796(GLenum target, GLenum pname, GLvoid ** params);
+void GLAPIENTRY gl_dispatch_stub_797(GLenum target, GLsizei length, GLvoid * pointer);
+void GLAPIENTRY gl_dispatch_stub_798(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+void GLAPIENTRY gl_dispatch_stub_799(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_800(GLenum target, GLuint index, GLsizei count, const GLfloat * params);
+void GLAPIENTRY gl_dispatch_stub_801(GLuint id, GLenum pname, GLint64EXT * params);
+void GLAPIENTRY gl_dispatch_stub_802(GLuint id, GLenum pname, GLuint64EXT * params);
#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */
static const glprocs_table_t static_functions[] = {
@@ -2047,316 +2055,324 @@ static const glprocs_table_t static_functions[] = {
NAME_FUNC_OFFSET(13784, gl_dispatch_stub_784, gl_dispatch_stub_784, NULL, _gloffset_BufferParameteriAPPLE),
NAME_FUNC_OFFSET(13808, gl_dispatch_stub_785, gl_dispatch_stub_785, NULL, _gloffset_FlushMappedBufferRangeAPPLE),
NAME_FUNC_OFFSET(13838, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT),
- NAME_FUNC_OFFSET(13867, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
- NAME_FUNC_OFFSET(13888, gl_dispatch_stub_788, gl_dispatch_stub_788, NULL, _gloffset_GetTexParameterPointervAPPLE),
- NAME_FUNC_OFFSET(13919, gl_dispatch_stub_789, gl_dispatch_stub_789, NULL, _gloffset_TextureRangeAPPLE),
- NAME_FUNC_OFFSET(13939, gl_dispatch_stub_790, gl_dispatch_stub_790, NULL, _gloffset_StencilFuncSeparateATI),
- NAME_FUNC_OFFSET(13964, gl_dispatch_stub_791, gl_dispatch_stub_791, NULL, _gloffset_ProgramEnvParameters4fvEXT),
- NAME_FUNC_OFFSET(13993, gl_dispatch_stub_792, gl_dispatch_stub_792, NULL, _gloffset_ProgramLocalParameters4fvEXT),
- NAME_FUNC_OFFSET(14024, gl_dispatch_stub_793, gl_dispatch_stub_793, NULL, _gloffset_GetQueryObjecti64vEXT),
- NAME_FUNC_OFFSET(14048, gl_dispatch_stub_794, gl_dispatch_stub_794, NULL, _gloffset_GetQueryObjectui64vEXT),
- NAME_FUNC_OFFSET(14073, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
- NAME_FUNC_OFFSET(14091, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
- NAME_FUNC_OFFSET(14108, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
- NAME_FUNC_OFFSET(14124, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident),
- NAME_FUNC_OFFSET(14149, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
- NAME_FUNC_OFFSET(14169, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
- NAME_FUNC_OFFSET(14189, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
- NAME_FUNC_OFFSET(14212, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
- NAME_FUNC_OFFSET(14235, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures),
- NAME_FUNC_OFFSET(14255, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures),
- NAME_FUNC_OFFSET(14272, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
- NAME_FUNC_OFFSET(14289, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture),
- NAME_FUNC_OFFSET(14304, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
- NAME_FUNC_OFFSET(14328, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
- NAME_FUNC_OFFSET(14347, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
- NAME_FUNC_OFFSET(14366, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
- NAME_FUNC_OFFSET(14382, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
- NAME_FUNC_OFFSET(14401, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
- NAME_FUNC_OFFSET(14424, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
- NAME_FUNC_OFFSET(14440, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
- NAME_FUNC_OFFSET(14456, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
- NAME_FUNC_OFFSET(14483, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
- NAME_FUNC_OFFSET(14510, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
- NAME_FUNC_OFFSET(14530, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
- NAME_FUNC_OFFSET(14549, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
- NAME_FUNC_OFFSET(14568, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
- NAME_FUNC_OFFSET(14598, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
- NAME_FUNC_OFFSET(14628, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
- NAME_FUNC_OFFSET(14658, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
- NAME_FUNC_OFFSET(14688, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
- NAME_FUNC_OFFSET(14707, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
- NAME_FUNC_OFFSET(14730, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
- NAME_FUNC_OFFSET(14755, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
- NAME_FUNC_OFFSET(14780, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
- NAME_FUNC_OFFSET(14807, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
- NAME_FUNC_OFFSET(14835, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
- NAME_FUNC_OFFSET(14862, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
- NAME_FUNC_OFFSET(14890, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
- NAME_FUNC_OFFSET(14919, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
- NAME_FUNC_OFFSET(14948, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter),
- NAME_FUNC_OFFSET(14974, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv),
- NAME_FUNC_OFFSET(15005, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv),
- NAME_FUNC_OFFSET(15036, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter),
- NAME_FUNC_OFFSET(15060, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
- NAME_FUNC_OFFSET(15083, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram),
- NAME_FUNC_OFFSET(15101, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv),
- NAME_FUNC_OFFSET(15130, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv),
- NAME_FUNC_OFFSET(15159, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax),
- NAME_FUNC_OFFSET(15174, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv),
- NAME_FUNC_OFFSET(15200, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv),
- NAME_FUNC_OFFSET(15226, glHistogram, glHistogram, NULL, _gloffset_Histogram),
- NAME_FUNC_OFFSET(15241, glMinmax, glMinmax, NULL, _gloffset_Minmax),
- NAME_FUNC_OFFSET(15253, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
- NAME_FUNC_OFFSET(15273, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
- NAME_FUNC_OFFSET(15290, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
- NAME_FUNC_OFFSET(15306, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
- NAME_FUNC_OFFSET(15325, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
- NAME_FUNC_OFFSET(15348, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
- NAME_FUNC_OFFSET(15364, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
- NAME_FUNC_OFFSET(15386, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
- NAME_FUNC_OFFSET(15404, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
- NAME_FUNC_OFFSET(15423, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
- NAME_FUNC_OFFSET(15441, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
- NAME_FUNC_OFFSET(15460, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
- NAME_FUNC_OFFSET(15478, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
- NAME_FUNC_OFFSET(15497, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
- NAME_FUNC_OFFSET(15515, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
- NAME_FUNC_OFFSET(15534, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
- NAME_FUNC_OFFSET(15552, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
- NAME_FUNC_OFFSET(15571, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
- NAME_FUNC_OFFSET(15589, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
- NAME_FUNC_OFFSET(15608, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
- NAME_FUNC_OFFSET(15626, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
- NAME_FUNC_OFFSET(15645, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
- NAME_FUNC_OFFSET(15663, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
- NAME_FUNC_OFFSET(15682, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
- NAME_FUNC_OFFSET(15700, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
- NAME_FUNC_OFFSET(15719, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
- NAME_FUNC_OFFSET(15737, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
- NAME_FUNC_OFFSET(15756, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
- NAME_FUNC_OFFSET(15774, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
- NAME_FUNC_OFFSET(15793, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
- NAME_FUNC_OFFSET(15811, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
- NAME_FUNC_OFFSET(15830, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
- NAME_FUNC_OFFSET(15848, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
- NAME_FUNC_OFFSET(15867, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
- NAME_FUNC_OFFSET(15885, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
- NAME_FUNC_OFFSET(15904, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
- NAME_FUNC_OFFSET(15922, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
- NAME_FUNC_OFFSET(15941, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
- NAME_FUNC_OFFSET(15959, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
- NAME_FUNC_OFFSET(15978, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate),
- NAME_FUNC_OFFSET(16001, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
- NAME_FUNC_OFFSET(16024, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
- NAME_FUNC_OFFSET(16047, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
- NAME_FUNC_OFFSET(16070, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
- NAME_FUNC_OFFSET(16093, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
- NAME_FUNC_OFFSET(16110, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
- NAME_FUNC_OFFSET(16133, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
- NAME_FUNC_OFFSET(16156, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
- NAME_FUNC_OFFSET(16179, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
- NAME_FUNC_OFFSET(16205, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
- NAME_FUNC_OFFSET(16231, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
- NAME_FUNC_OFFSET(16257, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
- NAME_FUNC_OFFSET(16281, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
- NAME_FUNC_OFFSET(16308, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
- NAME_FUNC_OFFSET(16334, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
- NAME_FUNC_OFFSET(16354, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
- NAME_FUNC_OFFSET(16374, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
- NAME_FUNC_OFFSET(16394, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB),
- NAME_FUNC_OFFSET(16417, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB),
- NAME_FUNC_OFFSET(16441, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB),
- NAME_FUNC_OFFSET(16464, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB),
- NAME_FUNC_OFFSET(16488, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
- NAME_FUNC_OFFSET(16505, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
- NAME_FUNC_OFFSET(16523, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
- NAME_FUNC_OFFSET(16540, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
- NAME_FUNC_OFFSET(16558, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
- NAME_FUNC_OFFSET(16575, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
- NAME_FUNC_OFFSET(16593, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
- NAME_FUNC_OFFSET(16610, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
- NAME_FUNC_OFFSET(16628, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
- NAME_FUNC_OFFSET(16645, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
- NAME_FUNC_OFFSET(16663, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
- NAME_FUNC_OFFSET(16680, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
- NAME_FUNC_OFFSET(16698, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
- NAME_FUNC_OFFSET(16715, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
- NAME_FUNC_OFFSET(16733, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
- NAME_FUNC_OFFSET(16750, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
- NAME_FUNC_OFFSET(16768, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
- NAME_FUNC_OFFSET(16785, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
- NAME_FUNC_OFFSET(16803, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
- NAME_FUNC_OFFSET(16822, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
- NAME_FUNC_OFFSET(16841, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
- NAME_FUNC_OFFSET(16860, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
- NAME_FUNC_OFFSET(16879, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
- NAME_FUNC_OFFSET(16899, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
- NAME_FUNC_OFFSET(16919, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
- NAME_FUNC_OFFSET(16939, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
- NAME_FUNC_OFFSET(16957, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
- NAME_FUNC_OFFSET(16974, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
- NAME_FUNC_OFFSET(16992, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
- NAME_FUNC_OFFSET(17009, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
- NAME_FUNC_OFFSET(17027, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
- NAME_FUNC_OFFSET(17045, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
- NAME_FUNC_OFFSET(17062, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
- NAME_FUNC_OFFSET(17080, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
- NAME_FUNC_OFFSET(17099, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
- NAME_FUNC_OFFSET(17118, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
- NAME_FUNC_OFFSET(17137, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
- NAME_FUNC_OFFSET(17159, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
- NAME_FUNC_OFFSET(17172, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
- NAME_FUNC_OFFSET(17185, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
- NAME_FUNC_OFFSET(17201, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
- NAME_FUNC_OFFSET(17217, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
- NAME_FUNC_OFFSET(17230, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
- NAME_FUNC_OFFSET(17253, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
- NAME_FUNC_OFFSET(17273, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
- NAME_FUNC_OFFSET(17292, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
- NAME_FUNC_OFFSET(17303, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
- NAME_FUNC_OFFSET(17315, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
- NAME_FUNC_OFFSET(17329, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
- NAME_FUNC_OFFSET(17342, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
- NAME_FUNC_OFFSET(17358, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
- NAME_FUNC_OFFSET(17369, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
- NAME_FUNC_OFFSET(17382, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
- NAME_FUNC_OFFSET(17401, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
- NAME_FUNC_OFFSET(17421, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
- NAME_FUNC_OFFSET(17434, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
- NAME_FUNC_OFFSET(17444, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
- NAME_FUNC_OFFSET(17460, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
- NAME_FUNC_OFFSET(17479, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
- NAME_FUNC_OFFSET(17497, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
- NAME_FUNC_OFFSET(17518, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
- NAME_FUNC_OFFSET(17533, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
- NAME_FUNC_OFFSET(17548, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
- NAME_FUNC_OFFSET(17562, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
- NAME_FUNC_OFFSET(17577, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
- NAME_FUNC_OFFSET(17589, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
- NAME_FUNC_OFFSET(17602, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
- NAME_FUNC_OFFSET(17614, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
- NAME_FUNC_OFFSET(17627, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
- NAME_FUNC_OFFSET(17639, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
- NAME_FUNC_OFFSET(17652, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
- NAME_FUNC_OFFSET(17664, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
- NAME_FUNC_OFFSET(17677, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
- NAME_FUNC_OFFSET(17689, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
- NAME_FUNC_OFFSET(17702, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
- NAME_FUNC_OFFSET(17714, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
- NAME_FUNC_OFFSET(17727, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
- NAME_FUNC_OFFSET(17739, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
- NAME_FUNC_OFFSET(17752, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
- NAME_FUNC_OFFSET(17764, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
- NAME_FUNC_OFFSET(17777, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
- NAME_FUNC_OFFSET(17796, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
- NAME_FUNC_OFFSET(17815, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
- NAME_FUNC_OFFSET(17834, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
- NAME_FUNC_OFFSET(17847, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
- NAME_FUNC_OFFSET(17865, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
- NAME_FUNC_OFFSET(17886, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
- 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, 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(13867, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, _gloffset_ColorMaskIndexedEXT),
+ NAME_FUNC_OFFSET(13889, glDisableIndexedEXT, glDisableIndexedEXT, NULL, _gloffset_DisableIndexedEXT),
+ NAME_FUNC_OFFSET(13909, glEnableIndexedEXT, glEnableIndexedEXT, NULL, _gloffset_EnableIndexedEXT),
+ NAME_FUNC_OFFSET(13928, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, _gloffset_GetBooleanIndexedvEXT),
+ NAME_FUNC_OFFSET(13952, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, _gloffset_GetIntegerIndexedvEXT),
+ NAME_FUNC_OFFSET(13976, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, _gloffset_IsEnabledIndexedEXT),
+ NAME_FUNC_OFFSET(13998, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, _gloffset_BeginConditionalRenderNV),
+ NAME_FUNC_OFFSET(14025, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, _gloffset_EndConditionalRenderNV),
+ NAME_FUNC_OFFSET(14050, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
+ NAME_FUNC_OFFSET(14071, gl_dispatch_stub_796, gl_dispatch_stub_796, NULL, _gloffset_GetTexParameterPointervAPPLE),
+ NAME_FUNC_OFFSET(14102, gl_dispatch_stub_797, gl_dispatch_stub_797, NULL, _gloffset_TextureRangeAPPLE),
+ NAME_FUNC_OFFSET(14122, gl_dispatch_stub_798, gl_dispatch_stub_798, NULL, _gloffset_StencilFuncSeparateATI),
+ NAME_FUNC_OFFSET(14147, gl_dispatch_stub_799, gl_dispatch_stub_799, NULL, _gloffset_ProgramEnvParameters4fvEXT),
+ NAME_FUNC_OFFSET(14176, gl_dispatch_stub_800, gl_dispatch_stub_800, NULL, _gloffset_ProgramLocalParameters4fvEXT),
+ NAME_FUNC_OFFSET(14207, gl_dispatch_stub_801, gl_dispatch_stub_801, NULL, _gloffset_GetQueryObjecti64vEXT),
+ NAME_FUNC_OFFSET(14231, gl_dispatch_stub_802, gl_dispatch_stub_802, NULL, _gloffset_GetQueryObjectui64vEXT),
+ NAME_FUNC_OFFSET(14256, glArrayElement, glArrayElement, NULL, _gloffset_ArrayElement),
+ NAME_FUNC_OFFSET(14274, glBindTexture, glBindTexture, NULL, _gloffset_BindTexture),
+ NAME_FUNC_OFFSET(14291, glDrawArrays, glDrawArrays, NULL, _gloffset_DrawArrays),
+ NAME_FUNC_OFFSET(14307, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, _gloffset_AreTexturesResident),
+ NAME_FUNC_OFFSET(14332, glCopyTexImage1D, glCopyTexImage1D, NULL, _gloffset_CopyTexImage1D),
+ NAME_FUNC_OFFSET(14352, glCopyTexImage2D, glCopyTexImage2D, NULL, _gloffset_CopyTexImage2D),
+ NAME_FUNC_OFFSET(14372, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, _gloffset_CopyTexSubImage1D),
+ NAME_FUNC_OFFSET(14395, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, _gloffset_CopyTexSubImage2D),
+ NAME_FUNC_OFFSET(14418, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, _gloffset_DeleteTextures),
+ NAME_FUNC_OFFSET(14438, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, _gloffset_GenTextures),
+ NAME_FUNC_OFFSET(14455, glGetPointerv, glGetPointerv, NULL, _gloffset_GetPointerv),
+ NAME_FUNC_OFFSET(14472, glIsTexture, glIsTextureEXT, glIsTextureEXT, _gloffset_IsTexture),
+ NAME_FUNC_OFFSET(14487, glPrioritizeTextures, glPrioritizeTextures, NULL, _gloffset_PrioritizeTextures),
+ NAME_FUNC_OFFSET(14511, glTexSubImage1D, glTexSubImage1D, NULL, _gloffset_TexSubImage1D),
+ NAME_FUNC_OFFSET(14530, glTexSubImage2D, glTexSubImage2D, NULL, _gloffset_TexSubImage2D),
+ NAME_FUNC_OFFSET(14549, glBlendColor, glBlendColor, NULL, _gloffset_BlendColor),
+ NAME_FUNC_OFFSET(14565, glBlendEquation, glBlendEquation, NULL, _gloffset_BlendEquation),
+ NAME_FUNC_OFFSET(14584, glDrawRangeElements, glDrawRangeElements, NULL, _gloffset_DrawRangeElements),
+ NAME_FUNC_OFFSET(14607, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
+ NAME_FUNC_OFFSET(14623, glColorTable, glColorTable, NULL, _gloffset_ColorTable),
+ NAME_FUNC_OFFSET(14639, glColorTableParameterfv, glColorTableParameterfv, NULL, _gloffset_ColorTableParameterfv),
+ NAME_FUNC_OFFSET(14666, glColorTableParameteriv, glColorTableParameteriv, NULL, _gloffset_ColorTableParameteriv),
+ NAME_FUNC_OFFSET(14693, glCopyColorTable, glCopyColorTable, NULL, _gloffset_CopyColorTable),
+ NAME_FUNC_OFFSET(14713, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
+ NAME_FUNC_OFFSET(14732, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, _gloffset_GetColorTable),
+ NAME_FUNC_OFFSET(14751, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
+ NAME_FUNC_OFFSET(14781, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv),
+ NAME_FUNC_OFFSET(14811, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
+ NAME_FUNC_OFFSET(14841, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv),
+ NAME_FUNC_OFFSET(14871, glColorSubTable, glColorSubTable, NULL, _gloffset_ColorSubTable),
+ NAME_FUNC_OFFSET(14890, glCopyColorSubTable, glCopyColorSubTable, NULL, _gloffset_CopyColorSubTable),
+ NAME_FUNC_OFFSET(14913, glConvolutionFilter1D, glConvolutionFilter1D, NULL, _gloffset_ConvolutionFilter1D),
+ NAME_FUNC_OFFSET(14938, glConvolutionFilter2D, glConvolutionFilter2D, NULL, _gloffset_ConvolutionFilter2D),
+ NAME_FUNC_OFFSET(14963, glConvolutionParameterf, glConvolutionParameterf, NULL, _gloffset_ConvolutionParameterf),
+ NAME_FUNC_OFFSET(14990, glConvolutionParameterfv, glConvolutionParameterfv, NULL, _gloffset_ConvolutionParameterfv),
+ NAME_FUNC_OFFSET(15018, glConvolutionParameteri, glConvolutionParameteri, NULL, _gloffset_ConvolutionParameteri),
+ NAME_FUNC_OFFSET(15045, glConvolutionParameteriv, glConvolutionParameteriv, NULL, _gloffset_ConvolutionParameteriv),
+ NAME_FUNC_OFFSET(15073, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, _gloffset_CopyConvolutionFilter1D),
+ NAME_FUNC_OFFSET(15102, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, _gloffset_CopyConvolutionFilter2D),
+ NAME_FUNC_OFFSET(15131, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, _gloffset_GetConvolutionFilter),
+ NAME_FUNC_OFFSET(15157, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, _gloffset_GetConvolutionParameterfv),
+ NAME_FUNC_OFFSET(15188, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, _gloffset_GetConvolutionParameteriv),
+ NAME_FUNC_OFFSET(15219, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, _gloffset_GetSeparableFilter),
+ NAME_FUNC_OFFSET(15243, glSeparableFilter2D, glSeparableFilter2D, NULL, _gloffset_SeparableFilter2D),
+ NAME_FUNC_OFFSET(15266, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, _gloffset_GetHistogram),
+ NAME_FUNC_OFFSET(15284, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, _gloffset_GetHistogramParameterfv),
+ NAME_FUNC_OFFSET(15313, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, _gloffset_GetHistogramParameteriv),
+ NAME_FUNC_OFFSET(15342, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, _gloffset_GetMinmax),
+ NAME_FUNC_OFFSET(15357, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, _gloffset_GetMinmaxParameterfv),
+ NAME_FUNC_OFFSET(15383, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, _gloffset_GetMinmaxParameteriv),
+ NAME_FUNC_OFFSET(15409, glHistogram, glHistogram, NULL, _gloffset_Histogram),
+ NAME_FUNC_OFFSET(15424, glMinmax, glMinmax, NULL, _gloffset_Minmax),
+ NAME_FUNC_OFFSET(15436, glResetHistogram, glResetHistogram, NULL, _gloffset_ResetHistogram),
+ NAME_FUNC_OFFSET(15456, glResetMinmax, glResetMinmax, NULL, _gloffset_ResetMinmax),
+ NAME_FUNC_OFFSET(15473, glTexImage3D, glTexImage3D, NULL, _gloffset_TexImage3D),
+ NAME_FUNC_OFFSET(15489, glTexSubImage3D, glTexSubImage3D, NULL, _gloffset_TexSubImage3D),
+ NAME_FUNC_OFFSET(15508, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, _gloffset_CopyTexSubImage3D),
+ NAME_FUNC_OFFSET(15531, glActiveTextureARB, glActiveTextureARB, NULL, _gloffset_ActiveTextureARB),
+ NAME_FUNC_OFFSET(15547, glClientActiveTextureARB, glClientActiveTextureARB, NULL, _gloffset_ClientActiveTextureARB),
+ NAME_FUNC_OFFSET(15569, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, _gloffset_MultiTexCoord1dARB),
+ NAME_FUNC_OFFSET(15587, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, _gloffset_MultiTexCoord1dvARB),
+ NAME_FUNC_OFFSET(15606, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, _gloffset_MultiTexCoord1fARB),
+ NAME_FUNC_OFFSET(15624, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, _gloffset_MultiTexCoord1fvARB),
+ NAME_FUNC_OFFSET(15643, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, _gloffset_MultiTexCoord1iARB),
+ NAME_FUNC_OFFSET(15661, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, _gloffset_MultiTexCoord1ivARB),
+ NAME_FUNC_OFFSET(15680, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, _gloffset_MultiTexCoord1sARB),
+ NAME_FUNC_OFFSET(15698, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, _gloffset_MultiTexCoord1svARB),
+ NAME_FUNC_OFFSET(15717, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, _gloffset_MultiTexCoord2dARB),
+ NAME_FUNC_OFFSET(15735, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, _gloffset_MultiTexCoord2dvARB),
+ NAME_FUNC_OFFSET(15754, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, _gloffset_MultiTexCoord2fARB),
+ NAME_FUNC_OFFSET(15772, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, _gloffset_MultiTexCoord2fvARB),
+ NAME_FUNC_OFFSET(15791, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, _gloffset_MultiTexCoord2iARB),
+ NAME_FUNC_OFFSET(15809, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, _gloffset_MultiTexCoord2ivARB),
+ NAME_FUNC_OFFSET(15828, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, _gloffset_MultiTexCoord2sARB),
+ NAME_FUNC_OFFSET(15846, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, _gloffset_MultiTexCoord2svARB),
+ NAME_FUNC_OFFSET(15865, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, _gloffset_MultiTexCoord3dARB),
+ NAME_FUNC_OFFSET(15883, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, _gloffset_MultiTexCoord3dvARB),
+ NAME_FUNC_OFFSET(15902, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, _gloffset_MultiTexCoord3fARB),
+ NAME_FUNC_OFFSET(15920, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, _gloffset_MultiTexCoord3fvARB),
+ NAME_FUNC_OFFSET(15939, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, _gloffset_MultiTexCoord3iARB),
+ NAME_FUNC_OFFSET(15957, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, _gloffset_MultiTexCoord3ivARB),
+ NAME_FUNC_OFFSET(15976, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, _gloffset_MultiTexCoord3sARB),
+ NAME_FUNC_OFFSET(15994, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, _gloffset_MultiTexCoord3svARB),
+ NAME_FUNC_OFFSET(16013, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, _gloffset_MultiTexCoord4dARB),
+ NAME_FUNC_OFFSET(16031, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, _gloffset_MultiTexCoord4dvARB),
+ NAME_FUNC_OFFSET(16050, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, _gloffset_MultiTexCoord4fARB),
+ NAME_FUNC_OFFSET(16068, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, _gloffset_MultiTexCoord4fvARB),
+ NAME_FUNC_OFFSET(16087, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, _gloffset_MultiTexCoord4iARB),
+ NAME_FUNC_OFFSET(16105, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, _gloffset_MultiTexCoord4ivARB),
+ NAME_FUNC_OFFSET(16124, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, _gloffset_MultiTexCoord4sARB),
+ NAME_FUNC_OFFSET(16142, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, _gloffset_MultiTexCoord4svARB),
+ NAME_FUNC_OFFSET(16161, glStencilOpSeparate, glStencilOpSeparate, NULL, _gloffset_StencilOpSeparate),
+ NAME_FUNC_OFFSET(16184, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, _gloffset_LoadTransposeMatrixdARB),
+ NAME_FUNC_OFFSET(16207, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, _gloffset_LoadTransposeMatrixfARB),
+ NAME_FUNC_OFFSET(16230, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, _gloffset_MultTransposeMatrixdARB),
+ NAME_FUNC_OFFSET(16253, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, _gloffset_MultTransposeMatrixfARB),
+ NAME_FUNC_OFFSET(16276, glSampleCoverageARB, glSampleCoverageARB, NULL, _gloffset_SampleCoverageARB),
+ NAME_FUNC_OFFSET(16293, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, _gloffset_CompressedTexImage1DARB),
+ NAME_FUNC_OFFSET(16316, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, _gloffset_CompressedTexImage2DARB),
+ NAME_FUNC_OFFSET(16339, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, _gloffset_CompressedTexImage3DARB),
+ NAME_FUNC_OFFSET(16362, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, _gloffset_CompressedTexSubImage1DARB),
+ NAME_FUNC_OFFSET(16388, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, _gloffset_CompressedTexSubImage2DARB),
+ NAME_FUNC_OFFSET(16414, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, _gloffset_CompressedTexSubImage3DARB),
+ NAME_FUNC_OFFSET(16440, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, _gloffset_GetCompressedTexImageARB),
+ NAME_FUNC_OFFSET(16464, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, _gloffset_DisableVertexAttribArrayARB),
+ NAME_FUNC_OFFSET(16491, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, _gloffset_EnableVertexAttribArrayARB),
+ NAME_FUNC_OFFSET(16517, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, _gloffset_GetVertexAttribdvARB),
+ NAME_FUNC_OFFSET(16537, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, _gloffset_GetVertexAttribfvARB),
+ NAME_FUNC_OFFSET(16557, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, _gloffset_GetVertexAttribivARB),
+ NAME_FUNC_OFFSET(16577, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, _gloffset_ProgramEnvParameter4dARB),
+ NAME_FUNC_OFFSET(16600, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, _gloffset_ProgramEnvParameter4dvARB),
+ NAME_FUNC_OFFSET(16624, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, _gloffset_ProgramEnvParameter4fARB),
+ NAME_FUNC_OFFSET(16647, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, _gloffset_ProgramEnvParameter4fvARB),
+ NAME_FUNC_OFFSET(16671, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, _gloffset_VertexAttrib1dARB),
+ NAME_FUNC_OFFSET(16688, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, _gloffset_VertexAttrib1dvARB),
+ NAME_FUNC_OFFSET(16706, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, _gloffset_VertexAttrib1fARB),
+ NAME_FUNC_OFFSET(16723, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, _gloffset_VertexAttrib1fvARB),
+ NAME_FUNC_OFFSET(16741, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, _gloffset_VertexAttrib1sARB),
+ NAME_FUNC_OFFSET(16758, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, _gloffset_VertexAttrib1svARB),
+ NAME_FUNC_OFFSET(16776, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, _gloffset_VertexAttrib2dARB),
+ NAME_FUNC_OFFSET(16793, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, _gloffset_VertexAttrib2dvARB),
+ NAME_FUNC_OFFSET(16811, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, _gloffset_VertexAttrib2fARB),
+ NAME_FUNC_OFFSET(16828, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, _gloffset_VertexAttrib2fvARB),
+ NAME_FUNC_OFFSET(16846, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, _gloffset_VertexAttrib2sARB),
+ NAME_FUNC_OFFSET(16863, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, _gloffset_VertexAttrib2svARB),
+ NAME_FUNC_OFFSET(16881, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, _gloffset_VertexAttrib3dARB),
+ NAME_FUNC_OFFSET(16898, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, _gloffset_VertexAttrib3dvARB),
+ NAME_FUNC_OFFSET(16916, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, _gloffset_VertexAttrib3fARB),
+ NAME_FUNC_OFFSET(16933, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, _gloffset_VertexAttrib3fvARB),
+ NAME_FUNC_OFFSET(16951, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, _gloffset_VertexAttrib3sARB),
+ NAME_FUNC_OFFSET(16968, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, _gloffset_VertexAttrib3svARB),
+ NAME_FUNC_OFFSET(16986, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, _gloffset_VertexAttrib4NbvARB),
+ NAME_FUNC_OFFSET(17005, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, _gloffset_VertexAttrib4NivARB),
+ NAME_FUNC_OFFSET(17024, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, _gloffset_VertexAttrib4NsvARB),
+ NAME_FUNC_OFFSET(17043, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, _gloffset_VertexAttrib4NubARB),
+ NAME_FUNC_OFFSET(17062, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
+ NAME_FUNC_OFFSET(17082, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
+ NAME_FUNC_OFFSET(17102, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
+ NAME_FUNC_OFFSET(17122, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
+ NAME_FUNC_OFFSET(17140, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
+ NAME_FUNC_OFFSET(17157, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
+ NAME_FUNC_OFFSET(17175, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
+ NAME_FUNC_OFFSET(17192, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
+ NAME_FUNC_OFFSET(17210, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
+ NAME_FUNC_OFFSET(17228, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
+ NAME_FUNC_OFFSET(17245, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
+ NAME_FUNC_OFFSET(17263, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
+ NAME_FUNC_OFFSET(17282, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
+ NAME_FUNC_OFFSET(17301, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
+ NAME_FUNC_OFFSET(17320, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
+ NAME_FUNC_OFFSET(17342, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
+ NAME_FUNC_OFFSET(17355, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
+ NAME_FUNC_OFFSET(17368, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
+ NAME_FUNC_OFFSET(17384, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
+ NAME_FUNC_OFFSET(17400, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
+ NAME_FUNC_OFFSET(17413, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
+ NAME_FUNC_OFFSET(17436, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
+ NAME_FUNC_OFFSET(17456, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
+ NAME_FUNC_OFFSET(17475, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
+ NAME_FUNC_OFFSET(17486, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
+ NAME_FUNC_OFFSET(17498, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
+ NAME_FUNC_OFFSET(17512, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
+ NAME_FUNC_OFFSET(17525, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
+ NAME_FUNC_OFFSET(17541, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
+ NAME_FUNC_OFFSET(17552, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
+ NAME_FUNC_OFFSET(17565, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
+ NAME_FUNC_OFFSET(17584, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
+ NAME_FUNC_OFFSET(17604, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
+ NAME_FUNC_OFFSET(17617, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
+ NAME_FUNC_OFFSET(17627, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
+ NAME_FUNC_OFFSET(17643, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
+ NAME_FUNC_OFFSET(17662, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
+ NAME_FUNC_OFFSET(17680, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
+ NAME_FUNC_OFFSET(17701, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
+ NAME_FUNC_OFFSET(17716, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
+ NAME_FUNC_OFFSET(17731, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
+ NAME_FUNC_OFFSET(17745, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
+ NAME_FUNC_OFFSET(17760, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
+ NAME_FUNC_OFFSET(17772, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
+ NAME_FUNC_OFFSET(17785, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
+ NAME_FUNC_OFFSET(17797, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
+ NAME_FUNC_OFFSET(17810, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
+ NAME_FUNC_OFFSET(17822, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
+ NAME_FUNC_OFFSET(17835, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
+ NAME_FUNC_OFFSET(17847, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
+ NAME_FUNC_OFFSET(17860, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
+ NAME_FUNC_OFFSET(17872, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
+ NAME_FUNC_OFFSET(17885, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
+ NAME_FUNC_OFFSET(17897, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
+ NAME_FUNC_OFFSET(17910, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
+ NAME_FUNC_OFFSET(17922, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
+ NAME_FUNC_OFFSET(17935, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
+ NAME_FUNC_OFFSET(17947, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
+ NAME_FUNC_OFFSET(17960, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
+ NAME_FUNC_OFFSET(17979, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
+ NAME_FUNC_OFFSET(17998, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
+ NAME_FUNC_OFFSET(18017, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
+ NAME_FUNC_OFFSET(18030, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
+ NAME_FUNC_OFFSET(18048, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
+ NAME_FUNC_OFFSET(18069, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
+ NAME_FUNC_OFFSET(18087, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
+ NAME_FUNC_OFFSET(18107, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
+ NAME_FUNC_OFFSET(18121, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
+ NAME_FUNC_OFFSET(18138, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, _gloffset_RenderbufferStorageMultisample),
+ NAME_FUNC_OFFSET(18174, gl_dispatch_stub_584, gl_dispatch_stub_584, NULL, _gloffset_SampleMaskSGIS),
+ NAME_FUNC_OFFSET(18190, gl_dispatch_stub_585, gl_dispatch_stub_585, NULL, _gloffset_SamplePatternSGIS),
+ NAME_FUNC_OFFSET(18209, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18227, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18248, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(18270, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18289, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18311, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(18334, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
+ NAME_FUNC_OFFSET(18353, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
+ NAME_FUNC_OFFSET(18373, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
+ NAME_FUNC_OFFSET(18392, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
+ NAME_FUNC_OFFSET(18412, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
+ NAME_FUNC_OFFSET(18431, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
+ NAME_FUNC_OFFSET(18451, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
+ NAME_FUNC_OFFSET(18470, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
+ NAME_FUNC_OFFSET(18490, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
+ NAME_FUNC_OFFSET(18509, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
+ NAME_FUNC_OFFSET(18529, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
+ NAME_FUNC_OFFSET(18549, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
+ NAME_FUNC_OFFSET(18570, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
+ NAME_FUNC_OFFSET(18590, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
+ NAME_FUNC_OFFSET(18611, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
+ NAME_FUNC_OFFSET(18631, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
+ NAME_FUNC_OFFSET(18652, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
+ NAME_FUNC_OFFSET(18676, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
+ NAME_FUNC_OFFSET(18694, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
+ NAME_FUNC_OFFSET(18714, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
+ NAME_FUNC_OFFSET(18732, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
+ NAME_FUNC_OFFSET(18744, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
+ NAME_FUNC_OFFSET(18757, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
+ NAME_FUNC_OFFSET(18769, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
+ NAME_FUNC_OFFSET(18782, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(18802, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(18826, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(18840, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(18857, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(18872, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(18890, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(18904, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(18921, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(18936, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(18954, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(18968, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(18985, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(19000, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(19018, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(19032, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(19049, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(19064, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(19082, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(19096, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(19113, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(19128, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(19146, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(19160, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(19177, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(19192, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(19210, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(19224, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(19241, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(19256, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(19274, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(19288, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(19305, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(19320, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(19338, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
+ NAME_FUNC_OFFSET(19355, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
+ NAME_FUNC_OFFSET(19375, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
+ NAME_FUNC_OFFSET(19392, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(19418, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(19447, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
+ NAME_FUNC_OFFSET(19462, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
+ NAME_FUNC_OFFSET(19480, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
+ NAME_FUNC_OFFSET(19499, gl_dispatch_stub_755, gl_dispatch_stub_755, NULL, _gloffset_DeleteVertexArraysAPPLE),
+ NAME_FUNC_OFFSET(19520, gl_dispatch_stub_757, gl_dispatch_stub_757, NULL, _gloffset_IsVertexArrayAPPLE),
+ NAME_FUNC_OFFSET(19536, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(19560, gl_dispatch_stub_765, gl_dispatch_stub_765, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(19587, glBindFramebufferEXT, glBindFramebufferEXT, NULL, _gloffset_BindFramebufferEXT),
+ NAME_FUNC_OFFSET(19605, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, _gloffset_BindRenderbufferEXT),
+ NAME_FUNC_OFFSET(19624, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, _gloffset_CheckFramebufferStatusEXT),
+ NAME_FUNC_OFFSET(19649, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, _gloffset_DeleteFramebuffersEXT),
+ NAME_FUNC_OFFSET(19670, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, _gloffset_DeleteRenderbuffersEXT),
+ NAME_FUNC_OFFSET(19692, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, _gloffset_FramebufferRenderbufferEXT),
+ NAME_FUNC_OFFSET(19718, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, _gloffset_FramebufferTexture1DEXT),
+ NAME_FUNC_OFFSET(19741, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, _gloffset_FramebufferTexture2DEXT),
+ NAME_FUNC_OFFSET(19764, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, _gloffset_FramebufferTexture3DEXT),
+ NAME_FUNC_OFFSET(19787, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, _gloffset_GenFramebuffersEXT),
+ NAME_FUNC_OFFSET(19805, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, _gloffset_GenRenderbuffersEXT),
+ NAME_FUNC_OFFSET(19824, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, _gloffset_GenerateMipmapEXT),
+ NAME_FUNC_OFFSET(19841, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, _gloffset_GetFramebufferAttachmentParameterivEXT),
+ NAME_FUNC_OFFSET(19879, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, _gloffset_GetRenderbufferParameterivEXT),
+ NAME_FUNC_OFFSET(19908, glIsFramebufferEXT, glIsFramebufferEXT, NULL, _gloffset_IsFramebufferEXT),
+ NAME_FUNC_OFFSET(19924, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, _gloffset_IsRenderbufferEXT),
+ NAME_FUNC_OFFSET(19941, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, _gloffset_RenderbufferStorageEXT),
+ NAME_FUNC_OFFSET(19963, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, _gloffset_BlitFramebufferEXT),
+ NAME_FUNC_OFFSET(19981, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, _gloffset_FramebufferTextureLayerEXT),
+ NAME_FUNC_OFFSET(20007, glProvokingVertexEXT, glProvokingVertexEXT, NULL, _gloffset_ProvokingVertexEXT),
NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
};
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c
index 737fd4d6a84..1c2c3865716 100644
--- a/src/mesa/glapi/glthread.c
+++ b/src/mesa/glapi/glthread.c
@@ -33,7 +33,7 @@
#endif
#include "main/compiler.h"
-#include "glthread.h"
+#include "glapi/glthread.h"
/*
@@ -69,7 +69,7 @@
*/
#ifdef PTHREADS
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return (unsigned long) pthread_self();
@@ -123,7 +123,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
#define USE_LOCK_FOR_KEY /* undef this to try a version without
lock for the global key... */
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
abort(); /* XXX not implemented yet */
@@ -201,7 +201,7 @@ void InsteadOf_exit(int nCode)
DWORD dwErr=GetLastError();
}
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return GetCurrentThreadId();
@@ -251,7 +251,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
*/
#ifdef BEOS_THREADS
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return (unsigned long) find_thread(NULL);
@@ -293,7 +293,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
* no-op functions
*/
-unsigned long
+PUBLIC unsigned long
_glthread_GetID(void)
{
return 0;
diff --git a/src/mesa/glapi/remap_helper.py b/src/mesa/glapi/remap_helper.py
index e47583a5d3f..d93c7a42855 100644
--- a/src/mesa/glapi/remap_helper.py
+++ b/src/mesa/glapi/remap_helper.py
@@ -123,18 +123,26 @@ class PrintGlRemap(gl_XML.gl_print_base):
print '};'
print ''
- abi = [ "1.0", "1.1", "1.2", "GL_ARB_multitexture" ]
+ # collect functions by versions/extensions
extension_functions = {}
-
- # collect non-ABI functions
+ abi_extensions = []
for f in api.functionIterateAll():
for n in f.entry_points:
category, num = api.get_category_for_name(n)
- if category not in abi:
- c = gl_XML.real_category_name(category)
+ # consider only GL_VERSION_X_Y or extensions
+ c = gl_XML.real_category_name(category)
+ if c.startswith("GL_"):
if not extension_functions.has_key(c):
extension_functions[c] = []
extension_functions[c].append(f)
+ # remember the ext names of the ABI
+ if (f.is_abi() and n == f.name and
+ c not in abi_extensions):
+ abi_extensions.append(c)
+ # ignore the ABI itself
+ for ext in abi_extensions:
+ extension_functions.pop(ext)
+
extensions = extension_functions.keys()
extensions.sort()
@@ -144,8 +152,8 @@ class PrintGlRemap(gl_XML.gl_print_base):
for ext in extensions:
funcs = []
for f in extension_functions[ext]:
- # test if the function is in the ABI
- if not f.assign_offset and f.offset >= 0:
+ # test if the function is in the ABI and has alt names
+ if f.is_abi() and len(f.entry_points) > 1:
funcs.append(f)
if not funcs:
continue
@@ -171,7 +179,7 @@ class PrintGlRemap(gl_XML.gl_print_base):
remapped.append(f)
else:
# these functions are either in the
- # abi, or have offset -1
+ # abi, or have offset -1
funcs.append(f)
print '#if defined(need_%s)' % (ext)
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 1559984f43a..c2d8a7fb972 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -51,6 +51,7 @@
#include "clear.h"
#include "clip.h"
#include "colortab.h"
+#include "condrender.h"
#include "context.h"
#include "convolve.h"
#include "depth.h"
@@ -746,4 +747,16 @@ _mesa_init_exec_table(struct _glapi_table *exec)
/* GL_ARB_vertex_array_object */
SET_BindVertexArray(exec, _mesa_BindVertexArray);
SET_GenVertexArrays(exec, _mesa_GenVertexArrays);
+
+ /* GL_EXT_draw_buffers2 */
+ SET_ColorMaskIndexedEXT(exec, _mesa_ColorMaskIndexed);
+ SET_GetBooleanIndexedvEXT(exec, _mesa_GetBooleanIndexedv);
+ SET_GetIntegerIndexedvEXT(exec, _mesa_GetIntegerIndexedv);
+ SET_EnableIndexedEXT(exec, _mesa_EnableIndexed);
+ SET_DisableIndexedEXT(exec, _mesa_DisableIndexed);
+ SET_IsEnabledIndexedEXT(exec, _mesa_IsEnabledIndexed);
+
+ /* GL_NV_conditional_render */
+ SET_BeginConditionalRenderNV(exec, _mesa_BeginConditionalRender);
+ SET_EndConditionalRenderNV(exec, _mesa_EndConditionalRender);
}
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 7adb2e2eac7..3fbdba2b3fe 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -498,7 +498,17 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
}
TEST_AND_UPDATE(ctx->Color.AlphaEnabled, enable->AlphaTest, GL_ALPHA_TEST);
- TEST_AND_UPDATE(ctx->Color.BlendEnabled, enable->Blend, GL_BLEND);
+ if (ctx->Color.BlendEnabled != enable->Blend) {
+ if (ctx->Extensions.EXT_draw_buffers2) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ _mesa_set_enablei(ctx, GL_BLEND, i, (enable->Blend >> i) & 1);
+ }
+ }
+ else {
+ _mesa_set_enable(ctx, GL_BLEND, (enable->Blend & 1));
+ }
+ }
for (i=0;i<MAX_CLIP_PLANES;i++) {
const GLuint mask = 1 << i;
@@ -824,7 +834,7 @@ pop_texture_group(GLcontext *ctx, struct texture_state *texstate)
_mesa_BindTexture(target, obj->Name);
- _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, obj->BorderColor);
+ _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, obj->BorderColor.f);
_mesa_TexParameterf(target, GL_TEXTURE_PRIORITY, obj->Priority);
_mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, obj->WrapS);
_mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, obj->WrapT);
@@ -905,6 +915,7 @@ _mesa_PopAttrib(void)
case GL_COLOR_BUFFER_BIT:
{
const struct gl_colorbuffer_attrib *color;
+
color = (const struct gl_colorbuffer_attrib *) attr->data;
_mesa_ClearIndex((GLfloat) color->ClearIndex);
_mesa_ClearColor(color->ClearColor[0],
@@ -912,10 +923,22 @@ _mesa_PopAttrib(void)
color->ClearColor[2],
color->ClearColor[3]);
_mesa_IndexMask(color->IndexMask);
- _mesa_ColorMask((GLboolean) (color->ColorMask[0] != 0),
- (GLboolean) (color->ColorMask[1] != 0),
- (GLboolean) (color->ColorMask[2] != 0),
- (GLboolean) (color->ColorMask[3] != 0));
+ if (!ctx->Extensions.EXT_draw_buffers2) {
+ _mesa_ColorMask((GLboolean) (color->ColorMask[0][0] != 0),
+ (GLboolean) (color->ColorMask[0][1] != 0),
+ (GLboolean) (color->ColorMask[0][2] != 0),
+ (GLboolean) (color->ColorMask[0][3] != 0));
+ }
+ else {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ _mesa_ColorMaskIndexed(i,
+ (GLboolean) (color->ColorMask[i][0] != 0),
+ (GLboolean) (color->ColorMask[i][1] != 0),
+ (GLboolean) (color->ColorMask[i][2] != 0),
+ (GLboolean) (color->ColorMask[i][3] != 0));
+ }
+ }
{
/* Need to determine if more than one color output is
* specified. If so, call glDrawBuffersARB, else call
@@ -947,7 +970,18 @@ _mesa_PopAttrib(void)
}
_mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled);
_mesa_AlphaFunc(color->AlphaFunc, color->AlphaRef);
- _mesa_set_enable(ctx, GL_BLEND, color->BlendEnabled);
+ if (ctx->Color.BlendEnabled != color->BlendEnabled) {
+ if (ctx->Extensions.EXT_draw_buffers2) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ _mesa_set_enablei(ctx, GL_BLEND, i,
+ (color->BlendEnabled >> i) & 1);
+ }
+ }
+ else {
+ _mesa_set_enable(ctx, GL_BLEND, (color->BlendEnabled & 1));
+ }
+ }
_mesa_BlendFuncSeparateEXT(color->BlendSrcRGB,
color->BlendDstRGB,
color->BlendSrcA,
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 0b6ff1a0349..de60031cc80 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -483,6 +483,8 @@ _mesa_ColorMask( GLboolean red, GLboolean green,
{
GET_CURRENT_CONTEXT(ctx);
GLubyte tmp[4];
+ GLuint i;
+ GLboolean flushed;
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (MESA_VERBOSE & VERBOSE_API)
@@ -496,14 +498,58 @@ _mesa_ColorMask( GLboolean red, GLboolean green,
tmp[BCOMP] = blue ? 0xff : 0x0;
tmp[ACOMP] = alpha ? 0xff : 0x0;
- if (TEST_EQ_4UBV(tmp, ctx->Color.ColorMask))
+ flushed = GL_FALSE;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ if (!TEST_EQ_4V(tmp, ctx->Color.ColorMask[i])) {
+ if (!flushed) {
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+ }
+ flushed = GL_TRUE;
+ COPY_4UBV(ctx->Color.ColorMask[i], tmp);
+ }
+ }
+
+ if (ctx->Driver.ColorMask)
+ ctx->Driver.ColorMask( ctx, red, green, blue, alpha );
+}
+
+
+/**
+ * For GL_EXT_draw_buffers2 and GL3
+ */
+void GLAPIENTRY
+_mesa_ColorMaskIndexed( GLuint buf, GLboolean red, GLboolean green,
+ GLboolean blue, GLboolean alpha )
+{
+ GLubyte tmp[4];
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glColorMaskIndexed %u %d %d %d %d\n",
+ buf, red, green, blue, alpha);
+
+ if (buf >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glColorMaskIndexed(buf=%u)", buf);
+ return;
+ }
+
+ /* Shouldn't have any information about channel depth in core mesa
+ * -- should probably store these as the native booleans:
+ */
+ tmp[RCOMP] = red ? 0xff : 0x0;
+ tmp[GCOMP] = green ? 0xff : 0x0;
+ tmp[BCOMP] = blue ? 0xff : 0x0;
+ tmp[ACOMP] = alpha ? 0xff : 0x0;
+
+ if (TEST_EQ_4V(tmp, ctx->Color.ColorMask[buf]))
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
- COPY_4UBV(ctx->Color.ColorMask, tmp);
+ COPY_4UBV(ctx->Color.ColorMask[buf], tmp);
- if (ctx->Driver.ColorMask)
- ctx->Driver.ColorMask( ctx, red, green, blue, alpha );
+ if (ctx->Driver.ColorMaskIndexed)
+ ctx->Driver.ColorMaskIndexed(ctx, buf, red, green, blue, alpha);
}
@@ -554,16 +600,13 @@ void _mesa_init_color( GLcontext * ctx )
{
/* Color buffer group */
ctx->Color.IndexMask = ~0u;
- ctx->Color.ColorMask[0] = 0xff;
- ctx->Color.ColorMask[1] = 0xff;
- ctx->Color.ColorMask[2] = 0xff;
- ctx->Color.ColorMask[3] = 0xff;
+ memset(ctx->Color.ColorMask, 0xff, sizeof(ctx->Color.ColorMask));
ctx->Color.ClearIndex = 0;
ASSIGN_4V( ctx->Color.ClearColor, 0, 0, 0, 0 );
ctx->Color.AlphaEnabled = GL_FALSE;
ctx->Color.AlphaFunc = GL_ALWAYS;
ctx->Color.AlphaRef = 0;
- ctx->Color.BlendEnabled = GL_FALSE;
+ ctx->Color.BlendEnabled = 0x0;
ctx->Color.BlendSrcRGB = GL_ONE;
ctx->Color.BlendDstRGB = GL_ZERO;
ctx->Color.BlendSrcA = GL_ONE;
diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h
index 5c0f2783a73..b4fd7470ebe 100644
--- a/src/mesa/main/blend.h
+++ b/src/mesa/main/blend.h
@@ -72,6 +72,10 @@ extern void GLAPIENTRY
_mesa_ColorMask( GLboolean red, GLboolean green,
GLboolean blue, GLboolean alpha );
+extern void GLAPIENTRY
+_mesa_ColorMaskIndexed( GLuint buf, GLboolean red, GLboolean green,
+ GLboolean blue, GLboolean alpha );
+
extern void GLAPIENTRY
_mesa_ClampColorARB(GLenum target, GLenum clamp);
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 52c4995b0ad..9e765b21d2f 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1389,6 +1389,48 @@ _mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params)
}
+/**
+ * New in GL 3.2
+ * This is pretty much a duplicate of GetBufferParameteriv() but the
+ * GL_BUFFER_SIZE_ARB attribute will be 64-bits on a 64-bit system.
+ */
+void GLAPIENTRY
+_mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_buffer_object *bufObj;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ bufObj = get_buffer(ctx, target);
+ if (!bufObj) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "GetBufferParameteri64v(target)" );
+ return;
+ }
+ if (!_mesa_is_bufferobj(bufObj)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "GetBufferParameteri64v" );
+ return;
+ }
+
+ switch (pname) {
+ case GL_BUFFER_SIZE_ARB:
+ *params = bufObj->Size;
+ break;
+ case GL_BUFFER_USAGE_ARB:
+ *params = bufObj->Usage;
+ break;
+ case GL_BUFFER_ACCESS_ARB:
+ *params = simplified_access_mode(bufObj->AccessFlags);
+ break;
+ case GL_BUFFER_MAPPED_ARB:
+ *params = _mesa_bufferobj_mapped(bufObj);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameteri64v(pname)");
+ return;
+ }
+}
+
+
void GLAPIENTRY
_mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params)
{
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index 9f732ec0c07..2931962ac08 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -155,6 +155,9 @@ extern void GLAPIENTRY
_mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params);
extern void GLAPIENTRY
+_mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params);
+
+extern void GLAPIENTRY
_mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params);
extern void GLAPIENTRY
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index 63388f42ee4..4a3c1116586 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -34,6 +34,7 @@
#include "clear.h"
#include "context.h"
#include "colormac.h"
+#include "enums.h"
#include "state.h"
@@ -182,3 +183,346 @@ _mesa_Clear( GLbitfield mask )
ctx->Driver.Clear(ctx, bufferMask);
}
}
+
+
+/** Returned by make_color_buffer_mask() for errors */
+#define INVALID_MASK ~0x0
+
+
+/**
+ * Convert the glClearBuffer 'drawbuffer' parameter into a bitmask of
+ * BUFFER_BIT_x values.
+ * Return INVALID_MASK if the drawbuffer value is invalid.
+ */
+static GLbitfield
+make_color_buffer_mask(GLcontext *ctx, GLint drawbuffer)
+{
+ const struct gl_renderbuffer_attachment *att = ctx->DrawBuffer->Attachment;
+ GLbitfield mask = 0x0;
+
+ switch (drawbuffer) {
+ case GL_FRONT:
+ if (att[BUFFER_FRONT_LEFT].Renderbuffer)
+ mask |= BUFFER_BIT_FRONT_LEFT;
+ if (att[BUFFER_FRONT_RIGHT].Renderbuffer)
+ mask |= BUFFER_BIT_FRONT_RIGHT;
+ break;
+ case GL_BACK:
+ if (att[BUFFER_BACK_LEFT].Renderbuffer)
+ mask |= BUFFER_BIT_BACK_LEFT;
+ if (att[BUFFER_BACK_RIGHT].Renderbuffer)
+ mask |= BUFFER_BIT_BACK_RIGHT;
+ break;
+ case GL_LEFT:
+ if (att[BUFFER_FRONT_LEFT].Renderbuffer)
+ mask |= BUFFER_BIT_FRONT_LEFT;
+ if (att[BUFFER_BACK_LEFT].Renderbuffer)
+ mask |= BUFFER_BIT_BACK_LEFT;
+ break;
+ case GL_RIGHT:
+ if (att[BUFFER_FRONT_RIGHT].Renderbuffer)
+ mask |= BUFFER_BIT_FRONT_RIGHT;
+ if (att[BUFFER_BACK_RIGHT].Renderbuffer)
+ mask |= BUFFER_BIT_BACK_RIGHT;
+ break;
+ case GL_FRONT_AND_BACK:
+ if (att[BUFFER_FRONT_LEFT].Renderbuffer)
+ mask |= BUFFER_BIT_FRONT_LEFT;
+ if (att[BUFFER_BACK_LEFT].Renderbuffer)
+ mask |= BUFFER_BIT_BACK_LEFT;
+ if (att[BUFFER_FRONT_RIGHT].Renderbuffer)
+ mask |= BUFFER_BIT_FRONT_RIGHT;
+ if (att[BUFFER_BACK_RIGHT].Renderbuffer)
+ mask |= BUFFER_BIT_BACK_RIGHT;
+ break;
+ default:
+ if (drawbuffer < 0 || drawbuffer >= ctx->Const.MaxDrawBuffers) {
+ mask = INVALID_MASK;
+ }
+ else if (att[BUFFER_COLOR0 + drawbuffer].Renderbuffer) {
+ mask |= (BUFFER_BIT_COLOR0 << drawbuffer);
+ }
+ }
+
+ return mask;
+}
+
+
+
+/**
+ * New in GL 3.0
+ * Clear signed integer color buffer or stencil buffer (not depth).
+ */
+void GLAPIENTRY
+_mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_CURRENT(ctx, 0);
+
+ if (!ctx->DrawBuffer->Visual.rgbMode) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferiv()");
+ return;
+ }
+
+ if (ctx->NewState) {
+ _mesa_update_state( ctx );
+ }
+
+ switch (buffer) {
+ case GL_STENCIL:
+ if (drawbuffer != 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)",
+ drawbuffer);
+ return;
+ }
+ else {
+ /* Save current stencil clear value, set to 'value', do the
+ * stencil clear and restore the clear value.
+ * XXX in the future we may have a new ctx->Driver.ClearBuffer()
+ * hook instead.
+ */
+ const GLuint clearSave = ctx->Stencil.Clear;
+ ctx->Stencil.Clear = *value;
+ if (ctx->Driver.ClearStencil)
+ ctx->Driver.ClearStencil(ctx, *value);
+ ctx->Driver.Clear(ctx, BUFFER_BIT_STENCIL);
+ ctx->Stencil.Clear = clearSave;
+ if (ctx->Driver.ClearStencil)
+ ctx->Driver.ClearStencil(ctx, clearSave);
+ }
+ break;
+ case GL_COLOR:
+ {
+ const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer);
+ if (mask == INVALID_MASK) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)",
+ drawbuffer);
+ return;
+ }
+ else if (mask) {
+ /* XXX note: we're putting the integer clear values into the
+ * floating point state var. This will not always work. We'll
+ * need a new ctx->Driver.ClearBuffer() hook....
+ */
+ GLfloat clearSave[4];
+ /* save color */
+ COPY_4V(clearSave, ctx->Color.ClearColor);
+ /* set color */
+ COPY_4V(ctx->Color.ClearColor, value);
+ if (ctx->Driver.ClearColor)
+ ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
+ /* clear buffer(s) */
+ ctx->Driver.Clear(ctx, mask);
+ /* restore color */
+ COPY_4V(ctx->Color.ClearColor, clearSave);
+ if (ctx->Driver.ClearColor)
+ ctx->Driver.ClearColor(ctx, clearSave);
+ }
+ }
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferiv(buffer=%s)",
+ _mesa_lookup_enum_by_nr(buffer));
+ return;
+ }
+}
+
+
+/**
+ * New in GL 3.0
+ * Clear unsigned integer color buffer (not depth, not stencil).
+ */
+void GLAPIENTRY
+_mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_CURRENT(ctx, 0);
+
+ if (!ctx->DrawBuffer->Visual.rgbMode) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferuiv()");
+ return;
+ }
+
+ if (ctx->NewState) {
+ _mesa_update_state( ctx );
+ }
+
+ switch (buffer) {
+ case GL_COLOR:
+ {
+ const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer);
+ if (mask == INVALID_MASK) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferiv(drawbuffer=%d)",
+ drawbuffer);
+ return;
+ }
+ else if (mask) {
+ /* XXX note: we're putting the uint clear values into the
+ * floating point state var. This will not always work. We'll
+ * need a new ctx->Driver.ClearBuffer() hook....
+ */
+ GLfloat clearSave[4];
+ /* save color */
+ COPY_4V(clearSave, ctx->Color.ClearColor);
+ /* set color */
+ COPY_4V(ctx->Color.ClearColor, value);
+ if (ctx->Driver.ClearColor)
+ ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
+ /* clear buffer(s) */
+ ctx->Driver.Clear(ctx, mask);
+ /* restore color */
+ COPY_4V(ctx->Color.ClearColor, clearSave);
+ if (ctx->Driver.ClearColor)
+ ctx->Driver.ClearColor(ctx, clearSave);
+ }
+ }
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferuiv(buffer=%s)",
+ _mesa_lookup_enum_by_nr(buffer));
+ return;
+ }
+}
+
+
+/**
+ * New in GL 3.0
+ * Clear fixed-pt or float color buffer or depth buffer (not stencil).
+ */
+void GLAPIENTRY
+_mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_CURRENT(ctx, 0);
+
+ if (!ctx->DrawBuffer->Visual.rgbMode) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferfv()");
+ return;
+ }
+
+ if (ctx->NewState) {
+ _mesa_update_state( ctx );
+ }
+
+ switch (buffer) {
+ case GL_DEPTH:
+ if (drawbuffer != 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfv(drawbuffer=%d)",
+ drawbuffer);
+ return;
+ }
+ else {
+ /* Save current depth clear value, set to 'value', do the
+ * depth clear and restore the clear value.
+ * XXX in the future we may have a new ctx->Driver.ClearBuffer()
+ * hook instead.
+ */
+ const GLfloat clearSave = ctx->Depth.Clear;
+ ctx->Depth.Clear = *value;
+ if (ctx->Driver.ClearDepth)
+ ctx->Driver.ClearDepth(ctx, *value);
+ ctx->Driver.Clear(ctx, BUFFER_BIT_DEPTH);
+ ctx->Depth.Clear = clearSave;
+ if (ctx->Driver.ClearDepth)
+ ctx->Driver.ClearDepth(ctx, clearSave);
+ }
+ /* clear depth buffer to value */
+ break;
+ case GL_COLOR:
+ {
+ const GLbitfield mask = make_color_buffer_mask(ctx, drawbuffer);
+ if (mask == INVALID_MASK) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfv(drawbuffer=%d)",
+ drawbuffer);
+ return;
+ }
+ else if (mask) {
+ GLfloat clearSave[4];
+ /* save color */
+ COPY_4V(clearSave, ctx->Color.ClearColor);
+ /* set color */
+ COPY_4V(ctx->Color.ClearColor, value);
+ if (ctx->Driver.ClearColor)
+ ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor);
+ /* clear buffer(s) */
+ ctx->Driver.Clear(ctx, mask);
+ /* restore color */
+ COPY_4V(ctx->Color.ClearColor, clearSave);
+ if (ctx->Driver.ClearColor)
+ ctx->Driver.ClearColor(ctx, clearSave);
+ }
+ }
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfv(buffer=%s)",
+ _mesa_lookup_enum_by_nr(buffer));
+ return;
+ }
+}
+
+
+/**
+ * New in GL 3.0
+ * Clear depth/stencil buffer only.
+ */
+void GLAPIENTRY
+_mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer,
+ GLfloat depth, GLint stencil)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ FLUSH_CURRENT(ctx, 0);
+
+ if (!ctx->DrawBuffer->Visual.rgbMode) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glClearBufferfi()");
+ return;
+ }
+
+ if (buffer != GL_DEPTH_STENCIL) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfi(buffer=%s)",
+ _mesa_lookup_enum_by_nr(buffer));
+ return;
+ }
+
+ if (drawbuffer != 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfi(drawbuffer=%d)",
+ drawbuffer);
+ return;
+ }
+
+ if (ctx->NewState) {
+ _mesa_update_state( ctx );
+ }
+
+ {
+ /* save current clear values */
+ const GLfloat clearDepthSave = ctx->Depth.Clear;
+ const GLuint clearStencilSave = ctx->Stencil.Clear;
+
+ /* set new clear values */
+ ctx->Depth.Clear = depth;
+ ctx->Stencil.Clear = stencil;
+ if (ctx->Driver.ClearDepth)
+ ctx->Driver.ClearDepth(ctx, depth);
+ if (ctx->Driver.ClearStencil)
+ ctx->Driver.ClearStencil(ctx, stencil);
+
+ /* clear buffers */
+ ctx->Driver.Clear(ctx, BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL);
+
+ /* restore */
+ ctx->Depth.Clear = clearDepthSave;
+ ctx->Stencil.Clear = clearStencilSave;
+ if (ctx->Driver.ClearDepth)
+ ctx->Driver.ClearDepth(ctx, clearDepthSave);
+ if (ctx->Driver.ClearStencil)
+ ctx->Driver.ClearStencil(ctx, clearStencilSave);
+ }
+}
diff --git a/src/mesa/main/clear.h b/src/mesa/main/clear.h
index 9a54ba14bcc..4c78eeda488 100644
--- a/src/mesa/main/clear.h
+++ b/src/mesa/main/clear.h
@@ -41,4 +41,17 @@ extern void GLAPIENTRY
_mesa_Clear( GLbitfield mask );
+extern void GLAPIENTRY
+_mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value);
+
+extern void GLAPIENTRY
+_mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value);
+
+extern void GLAPIENTRY
+_mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value);
+
+extern void GLAPIENTRY
+_mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer,
+ GLfloat depth, GLint stencil);
+
#endif
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 4eb249b4af1..9cef99f67a5 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -173,7 +173,8 @@ extern "C" {
* We also need to define a USED attribute, so the optimizer doesn't
* inline a static function that we later use in an alias. - ajax
*/
-#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
+#if (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \
+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
# define PUBLIC __attribute__((visibility("default")))
# define USED __attribute__((used))
#else
@@ -222,8 +223,8 @@ extern "C" {
/**
- * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN.
- * Do not use them unless absolutely necessary!
+ * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN, and CPU_TO_LE32.
+ * Do not use these unless absolutely necessary!
* Try to use a runtime test instead.
* For now, only used by some DRI hardware drivers for color/texel packing.
*/
@@ -235,10 +236,13 @@ extern "C" {
#include <CoreFoundation/CFByteOrder.h>
#define CPU_TO_LE32( x ) CFSwapInt32HostToLittle( x )
#elif (defined(_AIX) || defined(__blrts))
-#define CPU_TO_LE32( x ) x = ((x & 0x000000ff) << 24) | \
- ((x & 0x0000ff00) << 8) | \
- ((x & 0x00ff0000) >> 8) | \
- ((x & 0xff000000) >> 24);
+static INLINE GLuint CPU_TO_LE32(GLuint x)
+{
+ return (((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 )
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
new file mode 100644
index 00000000000..8d9a91d5478
--- /dev/null
+++ b/src/mesa/main/condrender.c
@@ -0,0 +1,147 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.8
+ *
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file condrender.c
+ * Conditional rendering functions
+ *
+ * \author Brian Paul
+ */
+
+#include "glheader.h"
+#include "condrender.h"
+#include "enums.h"
+#include "queryobj.h"
+
+
+void GLAPIENTRY
+_mesa_BeginConditionalRender(GLuint queryId, GLenum mode)
+{
+ struct gl_query_object *q;
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (!ctx->Extensions.NV_conditional_render || ctx->Query.CondRenderQuery) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()");
+ return;
+ }
+
+ ASSERT(ctx->Query.CondRenderMode == GL_NONE);
+
+ switch (mode) {
+ case GL_QUERY_WAIT:
+ case GL_QUERY_NO_WAIT:
+ case GL_QUERY_BY_REGION_WAIT:
+ case GL_QUERY_BY_REGION_NO_WAIT:
+ /* OK */
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBeginConditionalRender(mode=%s)",
+ _mesa_lookup_enum_by_nr(mode));
+ return;
+ }
+
+ q = _mesa_lookup_query_object(ctx, queryId);
+ if (!q) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glBeginConditionalRender(bad queryId=%u)", queryId);
+ return;
+ }
+ ASSERT(q->Id == queryId);
+
+ if (q->Target != GL_SAMPLES_PASSED) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBeginConditionalRender()");
+ return;
+ }
+
+ ctx->Query.CondRenderQuery = q;
+ ctx->Query.CondRenderMode = mode;
+
+ if (ctx->Driver.BeginConditionalRender)
+ ctx->Driver.BeginConditionalRender(ctx, q, mode);
+}
+
+
+void APIENTRY
+_mesa_EndConditionalRender(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ FLUSH_VERTICES(ctx, 0x0);
+
+ if (!ctx->Extensions.NV_conditional_render || !ctx->Query.CondRenderQuery) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glEndConditionalRender()");
+ return;
+ }
+
+ if (ctx->Driver.EndConditionalRender)
+ ctx->Driver.EndConditionalRender(ctx, ctx->Query.CondRenderQuery);
+
+ ctx->Query.CondRenderQuery = NULL;
+ ctx->Query.CondRenderMode = GL_NONE;
+}
+
+
+/**
+ * This function is called by software rendering commands (all point,
+ * line triangle drawing, glClear, glDrawPixels, glCopyPixels, and
+ * glBitmap, glBlitFramebuffer) to determine if subsequent drawing
+ * commands should be
+ * executed or discarded depending on the current conditional
+ * rendering state. Ideally, this check would be implemented by the
+ * GPU when doing hardware rendering. XXX should this function be
+ * called via a new driver hook?
+ *
+ * \return GL_TRUE if we should render, GL_FALSE if we should discard
+ */
+GLboolean
+_mesa_check_conditional_render(GLcontext *ctx)
+{
+ struct gl_query_object *q = ctx->Query.CondRenderQuery;
+
+ if (!q) {
+ /* no query in progress - draw normally */
+ return GL_TRUE;
+ }
+
+ switch (ctx->Query.CondRenderMode) {
+ case GL_QUERY_BY_REGION_WAIT:
+ /* fall-through */
+ case GL_QUERY_WAIT:
+ if (!q->Ready) {
+ ctx->Driver.WaitQuery(ctx, q);
+ }
+ return q->Result > 0;
+ case GL_QUERY_BY_REGION_NO_WAIT:
+ /* fall-through */
+ case GL_QUERY_NO_WAIT:
+ return q->Ready ? (q->Result > 0) : GL_TRUE;
+ default:
+ _mesa_problem(ctx, "Bad cond render mode %s in "
+ " _mesa_check_conditional_render()",
+ _mesa_lookup_enum_by_nr(ctx->Query.CondRenderMode));
+ return GL_TRUE;
+ }
+}
diff --git a/src/mesa/main/condrender.h b/src/mesa/main/condrender.h
new file mode 100644
index 00000000000..d55e9805fe9
--- /dev/null
+++ b/src/mesa/main/condrender.h
@@ -0,0 +1,45 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.8
+ *
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CONDRENDER_H
+#define CONDRENDER_H
+
+
+#include "glheader.h"
+#include "context.h"
+
+
+extern void GLAPIENTRY
+_mesa_BeginConditionalRender(GLuint queryId, GLenum mode);
+
+extern void APIENTRY
+_mesa_EndConditionalRender(void);
+
+extern GLboolean
+_mesa_check_conditional_render(GLcontext *ctx);
+
+
+#endif /* CONDRENDER_H */
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index c5048970cca..2eac1cc2ed9 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -243,7 +243,8 @@
/*@{*/
#define MAX_VERTEX_GENERIC_ATTRIBS 16
#define MAX_VERTEX_TEXTURE_IMAGE_UNITS MAX_TEXTURE_IMAGE_UNITS
-#define MAX_COMBINED_TEXTURE_IMAGE_UNITS MAX_TEXTURE_IMAGE_UNITS
+#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_VERTEX_TEXTURE_IMAGE_UNITS + \
+ MAX_TEXTURE_IMAGE_UNITS)
/*@}*/
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 87eae966392..a570506d57b 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -415,14 +415,6 @@ one_time_init( GLcontext *ctx )
_mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F;
}
- if (_mesa_getenv("MESA_DEBUG")) {
- _glapi_noop_enable_warnings(GL_TRUE);
- _glapi_set_warning_func( (_glapi_warning_func) _mesa_warning );
- }
- else {
- _glapi_noop_enable_warnings(GL_FALSE);
- }
-
#if defined(DEBUG) && defined(__DATE__) && defined(__TIME__)
_mesa_debug(ctx, "Mesa %s DEBUG build %s %s\n",
MESA_VERSION_STRING, __DATE__, __TIME__);
@@ -571,6 +563,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
@@ -1014,6 +1007,9 @@ _mesa_free_context_data( GLcontext *ctx )
if (ctx->Extensions.String)
_mesa_free((void *) ctx->Extensions.String);
+ if (ctx->VersionString)
+ _mesa_free(ctx->VersionString);
+
/* unbind the context if it's currently bound */
if (ctx == _mesa_get_current_context()) {
_mesa_make_current(NULL, NULL, NULL);
@@ -1373,6 +1369,8 @@ _mesa_make_current( GLcontext *newCtx, GLframebuffer *drawBuffer,
}
if (newCtx->FirstTimeCurrent) {
+ _mesa_compute_version(newCtx);
+
check_context_limits(newCtx);
/* We can use this to help debug user's problems. Tell them to set
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 27ed921761c..6705c901dd5 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -182,7 +182,7 @@ struct dd_function_table {
*
* This is called by the \c _mesa_store_tex[sub]image[123]d() fallback
* functions. The driver should examine \p internalFormat and return a
- * pointer to an appropriate gl_texture_format.
+ * gl_format value.
*/
GLuint (*ChooseTextureFormat)( GLcontext *ctx, GLint internalFormat,
GLenum srcFormat, GLenum srcType );
@@ -538,11 +538,6 @@ struct dd_function_table {
struct gl_texture_object *t );
/**
- * Called by glActiveTextureARB() to set current texture unit.
- */
- void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber );
-
- /**
* Called when the texture's color lookup table is changed.
*
* If \p tObj is NULL then the shared texture palette
@@ -630,6 +625,8 @@ struct dd_function_table {
/** Enable and disable writing of frame buffer color components */
void (*ColorMask)(GLcontext *ctx, GLboolean rmask, GLboolean gmask,
GLboolean bmask, GLboolean amask );
+ void (*ColorMaskIndexed)(GLcontext *ctx, GLuint buf, GLboolean rmask,
+ GLboolean gmask, GLboolean bmask, GLboolean amask);
/** Cause a material color to track the current color */
void (*ColorMaterial)(GLcontext *ctx, GLenum face, GLenum mode);
/** Specify whether front- or back-facing facets can be culled */
@@ -766,13 +763,13 @@ struct dd_function_table {
/* May return NULL if MESA_MAP_NOWAIT_BIT is set in access:
*/
- void * (*MapBufferRange)( GLcontext *ctx, GLenum target,
- GLintptr offset, GLsizeiptr length, GLbitfield access,
+ void * (*MapBufferRange)( GLcontext *ctx, GLenum target, GLintptr offset,
+ GLsizeiptr length, GLbitfield access,
struct gl_buffer_object *obj);
- void (*FlushMappedBufferRange) (GLcontext *ctx, GLenum target,
- GLintptr offset, GLsizeiptr length,
- struct gl_buffer_object *obj);
+ void (*FlushMappedBufferRange)(GLcontext *ctx, GLenum target,
+ GLintptr offset, GLsizeiptr length,
+ struct gl_buffer_object *obj);
GLboolean (*UnmapBuffer)( GLcontext *ctx, GLenum target,
struct gl_buffer_object *obj );
@@ -787,7 +784,8 @@ struct dd_function_table {
struct gl_framebuffer * (*NewFramebuffer)(GLcontext *ctx, GLuint name);
struct gl_renderbuffer * (*NewRenderbuffer)(GLcontext *ctx, GLuint name);
void (*BindFramebuffer)(GLcontext *ctx, GLenum target,
- struct gl_framebuffer *fb, struct gl_framebuffer *fbread);
+ struct gl_framebuffer *drawFb,
+ struct gl_framebuffer *readFb);
void (*FramebufferRenderbuffer)(GLcontext *ctx,
struct gl_framebuffer *fb,
GLenum attachment,
@@ -1018,6 +1016,21 @@ struct dd_function_table {
GLbitfield, GLuint64);
/*@}*/
#endif
+
+ /** GL_NV_conditional_render */
+ void (*BeginConditionalRender)(GLcontext *ctx, struct gl_query_object *q,
+ GLenum mode);
+ void (*EndConditionalRender)(GLcontext *ctx, struct gl_query_object *q);
+
+#if FEATURE_OES_draw_texture
+ /**
+ * \name GL_OES_draw_texture interface
+ */
+ /*@{*/
+ void (*DrawTex)(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
+ GLfloat width, GLfloat height);
+ /*@}*/
+#endif
};
diff --git a/src/mesa/main/dispatch.c b/src/mesa/main/dispatch.c
index eb0d1ff8a7b..a6a57020cc7 100644
--- a/src/mesa/main/dispatch.c
+++ b/src/mesa/main/dispatch.c
@@ -87,6 +87,10 @@
#define GLAPIENTRY
#endif
+#ifdef GLX_INDIRECT_RENDERING
+/* those link to libglapi.a should provide the entry points */
+#define _GLAPI_SKIP_PROTO_ENTRY_POINTS
+#endif
#include "glapi/glapitemp.h"
#endif /* USE_X86_ASM */
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index a90bb6c5fb6..7db686c0aef 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -197,8 +197,13 @@ typedef enum
OPCODE_CLEAR_DEPTH,
OPCODE_CLEAR_INDEX,
OPCODE_CLEAR_STENCIL,
+ OPCODE_CLEAR_BUFFER_IV,
+ OPCODE_CLEAR_BUFFER_UIV,
+ OPCODE_CLEAR_BUFFER_FV,
+ OPCODE_CLEAR_BUFFER_FI,
OPCODE_CLIP_PLANE,
OPCODE_COLOR_MASK,
+ OPCODE_COLOR_MASK_INDEXED,
OPCODE_COLOR_MATERIAL,
OPCODE_COLOR_TABLE,
OPCODE_COLOR_TABLE_PARAMETER_FV,
@@ -223,9 +228,11 @@ typedef enum
OPCODE_DEPTH_MASK,
OPCODE_DEPTH_RANGE,
OPCODE_DISABLE,
+ OPCODE_DISABLE_INDEXED,
OPCODE_DRAW_BUFFER,
OPCODE_DRAW_PIXELS,
OPCODE_ENABLE,
+ OPCODE_ENABLE_INDEXED,
OPCODE_EVALMESH1,
OPCODE_EVALMESH2,
OPCODE_FOG,
@@ -1210,6 +1217,110 @@ save_Clear(GLbitfield mask)
static void GLAPIENTRY
+save_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_IV, 6);
+ if (n) {
+ n[1].e = buffer;
+ n[2].i = drawbuffer;
+ n[3].i = value[0];
+ if (buffer == GL_COLOR) {
+ n[4].i = value[1];
+ n[5].i = value[2];
+ n[6].i = value[3];
+ }
+ else {
+ n[4].i = 0;
+ n[5].i = 0;
+ n[6].i = 0;
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_ClearBufferiv(ctx->Exec, (buffer, drawbuffer, value));*/
+ }
+}
+
+
+static void GLAPIENTRY
+save_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_UIV, 6);
+ if (n) {
+ n[1].e = buffer;
+ n[2].i = drawbuffer;
+ n[3].ui = value[0];
+ if (buffer == GL_COLOR) {
+ n[4].ui = value[1];
+ n[5].ui = value[2];
+ n[6].ui = value[3];
+ }
+ else {
+ n[4].ui = 0;
+ n[5].ui = 0;
+ n[6].ui = 0;
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_ClearBufferuiv(ctx->Exec, (buffer, drawbuffer, value));*/
+ }
+}
+
+
+static void GLAPIENTRY
+save_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_FV, 6);
+ if (n) {
+ n[1].e = buffer;
+ n[2].i = drawbuffer;
+ n[3].f = value[0];
+ if (buffer == GL_COLOR) {
+ n[4].f = value[1];
+ n[5].f = value[2];
+ n[6].f = value[3];
+ }
+ else {
+ n[4].f = 0.0F;
+ n[5].f = 0.0F;
+ n[6].f = 0.0F;
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_ClearBufferuiv(ctx->Exec, (buffer, drawbuffer, value));*/
+ }
+}
+
+
+static void GLAPIENTRY
+save_ClearBufferfi(GLenum buffer, GLint drawbuffer,
+ GLfloat depth, GLint stencil)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_FI, 4);
+ if (n) {
+ n[1].e = buffer;
+ n[2].i = drawbuffer;
+ n[3].f = depth;
+ n[4].i = stencil;
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_ClearBufferfi(ctx->Exec, (buffer, drawbuffer, depth, stencil));*/
+ }
+}
+
+
+static void GLAPIENTRY
save_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
{
GET_CURRENT_CONTEXT(ctx);
@@ -1337,6 +1448,27 @@ save_ColorMask(GLboolean red, GLboolean green,
static void GLAPIENTRY
+save_ColorMaskIndexed(GLuint buf, GLboolean red, GLboolean green,
+ GLboolean blue, GLboolean alpha)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_COLOR_MASK_INDEXED, 5);
+ if (n) {
+ n[1].ui = buf;
+ n[2].b = red;
+ n[3].b = green;
+ n[4].b = blue;
+ n[5].b = alpha;
+ }
+ if (ctx->ExecuteFlag) {
+ /*CALL_ColorMaskIndexedEXT(ctx->Exec, (buf, red, green, blue, alpha));*/
+ }
+}
+
+
+static void GLAPIENTRY
save_ColorMaterial(GLenum face, GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
@@ -1895,6 +2027,23 @@ save_Disable(GLenum cap)
static void GLAPIENTRY
+save_DisableIndexed(GLuint index, GLenum cap)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_DISABLE_INDEXED, 2);
+ if (n) {
+ n[1].ui = index;
+ n[2].e = cap;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_DisableIndexedEXT(ctx->Exec, (index, cap));
+ }
+}
+
+
+static void GLAPIENTRY
save_DrawBuffer(GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
@@ -1953,6 +2102,24 @@ save_Enable(GLenum cap)
static void GLAPIENTRY
+save_EnableIndexed(GLuint index, GLenum cap)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_ENABLE_INDEXED, 2);
+ if (n) {
+ n[1].ui = index;
+ n[2].e = cap;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_EnableIndexedEXT(ctx->Exec, (index, cap));
+ }
+}
+
+
+
+static void GLAPIENTRY
save_EvalMesh1(GLenum mode, GLint i1, GLint i2)
{
GET_CURRENT_CONTEXT(ctx);
@@ -6575,6 +6742,39 @@ execute_list(GLcontext *ctx, GLuint list)
case OPCODE_CLEAR:
CALL_Clear(ctx->Exec, (n[1].bf));
break;
+ case OPCODE_CLEAR_BUFFER_IV:
+ {
+ GLint value[4];
+ value[0] = n[3].i;
+ value[1] = n[4].i;
+ value[2] = n[5].i;
+ value[3] = n[6].i;
+ /*CALL_ClearBufferiv(ctx->Exec, (n[1].e, n[2].i, value));*/
+ }
+ break;
+ case OPCODE_CLEAR_BUFFER_UIV:
+ {
+ GLuint value[4];
+ value[0] = n[3].ui;
+ value[1] = n[4].ui;
+ value[2] = n[5].ui;
+ value[3] = n[6].ui;
+ /*CALL_ClearBufferiv(ctx->Exec, (n[1].e, n[2].i, value));*/
+ }
+ break;
+ case OPCODE_CLEAR_BUFFER_FV:
+ {
+ GLfloat value[4];
+ value[0] = n[3].f;
+ value[1] = n[4].f;
+ value[2] = n[5].f;
+ value[3] = n[6].f;
+ /*CALL_ClearBufferfv(ctx->Exec, (n[1].e, n[2].i, value));*/
+ }
+ break;
+ case OPCODE_CLEAR_BUFFER_FI:
+ /*CALL_ClearBufferfi(ctx->Exec, (n[1].e, n[2].i, n[3].f, n[4].i));*/
+ break;
case OPCODE_CLEAR_COLOR:
CALL_ClearColor(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f));
break;
@@ -6603,6 +6803,10 @@ execute_list(GLcontext *ctx, GLuint list)
case OPCODE_COLOR_MASK:
CALL_ColorMask(ctx->Exec, (n[1].b, n[2].b, n[3].b, n[4].b));
break;
+ case OPCODE_COLOR_MASK_INDEXED:
+ CALL_ColorMaskIndexedEXT(ctx->Exec, (n[1].ui, n[2].b, n[3].b,
+ n[4].b, n[5].b));
+ break;
case OPCODE_COLOR_MATERIAL:
CALL_ColorMaterial(ctx->Exec, (n[1].e, n[2].e));
break;
@@ -6745,6 +6949,9 @@ execute_list(GLcontext *ctx, GLuint list)
case OPCODE_DISABLE:
CALL_Disable(ctx->Exec, (n[1].e));
break;
+ case OPCODE_DISABLE_INDEXED:
+ CALL_DisableIndexedEXT(ctx->Exec, (n[1].ui, n[2].e));
+ break;
case OPCODE_DRAW_BUFFER:
CALL_DrawBuffer(ctx->Exec, (n[1].e));
break;
@@ -6760,6 +6967,9 @@ execute_list(GLcontext *ctx, GLuint list)
case OPCODE_ENABLE:
CALL_Enable(ctx->Exec, (n[1].e));
break;
+ case OPCODE_ENABLE_INDEXED:
+ CALL_EnableIndexedEXT(ctx->Exec, (n[1].ui, n[2].e));
+ break;
case OPCODE_EVALMESH1:
CALL_EvalMesh1(ctx->Exec, (n[1].e, n[2].i, n[3].i));
break;
@@ -8519,6 +8729,7 @@ _mesa_init_save_table(struct _glapi_table *table)
SET_ClearStencil(table, save_ClearStencil);
SET_ClipPlane(table, save_ClipPlane);
SET_ColorMask(table, save_ColorMask);
+ SET_ColorMaskIndexedEXT(table, save_ColorMaskIndexed);
SET_ColorMaterial(table, save_ColorMaterial);
SET_CopyPixels(table, save_CopyPixels);
SET_CullFace(table, save_CullFace);
@@ -8527,9 +8738,11 @@ _mesa_init_save_table(struct _glapi_table *table)
SET_DepthMask(table, save_DepthMask);
SET_DepthRange(table, save_DepthRange);
SET_Disable(table, save_Disable);
+ SET_DisableIndexedEXT(table, save_DisableIndexed);
SET_DrawBuffer(table, save_DrawBuffer);
SET_DrawPixels(table, save_DrawPixels);
SET_Enable(table, save_Enable);
+ SET_EnableIndexedEXT(table, save_EnableIndexed);
SET_EndList(table, _mesa_EndList);
SET_EvalMesh1(table, save_EvalMesh1);
SET_EvalMesh2(table, save_EvalMesh2);
@@ -9073,6 +9286,19 @@ _mesa_init_save_table(struct _glapi_table *table)
/* 364. GL_EXT_provoking_vertex */
SET_ProvokingVertexEXT(table, save_ProvokingVertexEXT);
+
+ /* GL 3.0 */
+#if 0
+ SET_ClearBufferiv(table, save_ClearBufferiv);
+ SET_ClearBufferuiv(table, save_ClearBufferuiv);
+ SET_ClearBufferfv(table, save_ClearBufferfv);
+ SET_ClearBufferfi(table, save_ClearBufferfi);
+#else
+ (void) save_ClearBufferiv;
+ (void) save_ClearBufferuiv;
+ (void) save_ClearBufferfv;
+ (void) save_ClearBufferfi;
+#endif
}
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 1573bc27ce2..f5c88a63e6e 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -277,10 +277,13 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
ctx->Eval.AutoNormal = state;
break;
case GL_BLEND:
- if (ctx->Color.BlendEnabled == state)
- return;
- FLUSH_VERTICES(ctx, _NEW_COLOR);
- ctx->Color.BlendEnabled = state;
+ {
+ GLbitfield newEnabled = state * ((1 << ctx->Const.MaxDrawBuffers) - 1);
+ if (newEnabled != ctx->Color.BlendEnabled) {
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+ ctx->Color.BlendEnabled = newEnabled;
+ }
+ }
break;
#if FEATURE_userclip
case GL_CLIP_PLANE0:
@@ -1019,6 +1022,84 @@ _mesa_Disable( GLenum cap )
}
+
+/**
+ * Enable/disable an indexed state var.
+ */
+void
+_mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state)
+{
+ ASSERT(state == 0 || state == 1);
+ switch (cap) {
+ case GL_BLEND:
+ if (!ctx->Extensions.EXT_draw_buffers2) {
+ goto bad_cap_error;
+ }
+ if (index >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)",
+ state ? "glEnableIndexed" : "glDisableIndexed", index);
+ return;
+ }
+ if (((ctx->Color.BlendEnabled >> index) & 1) != state) {
+ FLUSH_VERTICES(ctx, _NEW_COLOR);
+ if (state)
+ ctx->Color.BlendEnabled |= (1 << index);
+ else
+ ctx->Color.BlendEnabled &= ~(1 << index);
+ }
+ break;
+ default:
+ goto bad_cap_error;
+ }
+ return;
+
+bad_cap_error:
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(cap=%s)",
+ state ? "glEnablei" : "glDisablei",
+ _mesa_lookup_enum_by_nr(cap));
+}
+
+
+void GLAPIENTRY
+_mesa_DisableIndexed( GLenum cap, GLuint index )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+ _mesa_set_enablei(ctx, cap, index, GL_FALSE);
+}
+
+
+void GLAPIENTRY
+_mesa_EnableIndexed( GLenum cap, GLuint index )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+ _mesa_set_enablei(ctx, cap, index, GL_TRUE);
+}
+
+
+GLboolean GLAPIENTRY
+_mesa_IsEnabledIndexed( GLenum cap, GLuint index )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ switch (cap) {
+ case GL_BLEND:
+ if (index >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glIsEnabledIndexed(index=%u)",
+ index);
+ return GL_FALSE;
+ }
+ return (ctx->Color.BlendEnabled >> index) & 1;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabledIndexed(cap=%s)",
+ _mesa_lookup_enum_by_nr(cap));
+ return GL_FALSE;
+ }
+}
+
+
+
+
#undef CHECK_EXTENSION
#define CHECK_EXTENSION(EXTNAME) \
if (!ctx->Extensions.EXTNAME) { \
@@ -1065,7 +1146,7 @@ _mesa_IsEnabled( GLenum cap )
case GL_AUTO_NORMAL:
return ctx->Eval.AutoNormal;
case GL_BLEND:
- return ctx->Color.BlendEnabled;
+ return ctx->Color.BlendEnabled & 1; /* return state for buffer[0] */
case GL_CLIP_PLANE0:
case GL_CLIP_PLANE1:
case GL_CLIP_PLANE2:
diff --git a/src/mesa/main/enable.h b/src/mesa/main/enable.h
index 25c90b0275a..24e3181a8ba 100644
--- a/src/mesa/main/enable.h
+++ b/src/mesa/main/enable.h
@@ -47,6 +47,18 @@ _mesa_Enable( GLenum cap );
extern GLboolean GLAPIENTRY
_mesa_IsEnabled( GLenum cap );
+extern void
+_mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state);
+
+extern void GLAPIENTRY
+_mesa_DisableIndexed( GLenum cap, GLuint index );
+
+extern void GLAPIENTRY
+_mesa_EnableIndexed( GLenum cap, GLuint index );
+
+extern GLboolean GLAPIENTRY
+_mesa_IsEnabledIndexed( GLenum cap, GLuint index );
+
extern void GLAPIENTRY
_mesa_EnableClientState( GLenum cap );
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 8a39401371f..1d495b7ae58 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -25,10 +25,10 @@
* SOFTWARE.
*/
-#include "glheader.h"
-#include "mfeatures.h"
-#include "enums.h"
-#include "imports.h"
+#include "main/glheader.h"
+#include "main/mfeatures.h"
+#include "main/enums.h"
+#include "main/imports.h"
typedef struct {
size_t offset;
@@ -640,6 +640,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_GREEN_BIAS\0"
"GL_GREEN_BITS\0"
"GL_GREEN_SCALE\0"
+ "GL_HALF_FLOAT\0"
"GL_HINT_BIT\0"
"GL_HISTOGRAM\0"
"GL_HISTOGRAM_ALPHA_SIZE\0"
@@ -1326,12 +1327,16 @@ LONGSTRING static const char enum_string_table[] =
"GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT\0"
"GL_QUAD_MESH_SUN\0"
"GL_QUAD_STRIP\0"
+ "GL_QUERY_BY_REGION_NO_WAIT_NV\0"
+ "GL_QUERY_BY_REGION_WAIT_NV\0"
"GL_QUERY_COUNTER_BITS\0"
"GL_QUERY_COUNTER_BITS_ARB\0"
+ "GL_QUERY_NO_WAIT_NV\0"
"GL_QUERY_RESULT\0"
"GL_QUERY_RESULT_ARB\0"
"GL_QUERY_RESULT_AVAILABLE\0"
"GL_QUERY_RESULT_AVAILABLE_ARB\0"
+ "GL_QUERY_WAIT_NV\0"
"GL_R\0"
"GL_R3_G3_B2\0"
"GL_RASTER_POSITION_UNCLIPPED_IBM\0"
@@ -1918,7 +1923,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[1880] =
+static const enum_elt all_enums[1885] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -2524,1361 +2529,1366 @@ static const enum_elt all_enums[1880] =
{ 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, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 37761, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 37780, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 37809, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 37826, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 37852, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 37882, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 37914, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 37944, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 37978, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 37994, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 38025, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 38060, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 38088, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 38120, 0x00000004 }, /* GL_TRIANGLES */
- { 38133, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 38149, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 38170, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 38188, 0x00000001 }, /* GL_TRUE */
- { 38196, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 38216, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 38239, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 38259, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 38280, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 38302, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 38324, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 38344, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 38365, 0x00009118 }, /* GL_UNSIGNALED */
- { 38379, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 38396, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 38423, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 38446, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 38462, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 38489, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
- { 38510, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
- { 38535, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 38559, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 38590, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 38614, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 38642, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
- { 38665, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 38683, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 38713, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 38739, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 38769, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 38795, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 38819, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 38847, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 38875, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 38902, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 38934, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 38965, 0x00008CA2 }, /* GL_UPPER_LEFT */
- { 38979, 0x00002A20 }, /* GL_V2F */
- { 38986, 0x00002A21 }, /* GL_V3F */
- { 38993, 0x00008B83 }, /* GL_VALIDATE_STATUS */
- { 39012, 0x00001F00 }, /* GL_VENDOR */
- { 39022, 0x00001F02 }, /* GL_VERSION */
- { 39033, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 39049, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
- { 39073, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 39103, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 39134, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 39169, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 39193, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 39214, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 39237, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 39258, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 39285, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 39313, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 39341, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 39369, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 39397, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 39425, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 39453, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 39480, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 39507, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 39534, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 39561, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 39588, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 39615, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 39642, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 39669, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 39696, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 39734, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 39776, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 39807, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 39842, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 39876, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 39914, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 39945, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 39980, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 40008, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 40040, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 40070, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 40104, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 40132, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 40164, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 40184, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 40206, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 40235, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 40256, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 40285, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 40318, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 40350, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 40377, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 40408, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 40438, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 40455, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 40476, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 40503, 0x00000BA2 }, /* GL_VIEWPORT */
- { 40515, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 40531, 0x0000911D }, /* GL_WAIT_FAILED */
- { 40546, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 40566, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 40597, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 40632, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 40660, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 40685, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 40712, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 40737, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 40761, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 40780, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 40794, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 40812, 0x00001506 }, /* GL_XOR */
- { 40819, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 40838, 0x00008757 }, /* GL_YCBCR_MESA */
- { 40852, 0x00000000 }, /* GL_ZERO */
- { 40860, 0x00000D16 }, /* GL_ZOOM_X */
- { 40870, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 12812, 0x0000140B }, /* GL_HALF_FLOAT */
+ { 12826, 0x00008000 }, /* GL_HINT_BIT */
+ { 12838, 0x00008024 }, /* GL_HISTOGRAM */
+ { 12851, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+ { 12875, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+ { 12903, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+ { 12926, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+ { 12953, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+ { 12970, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+ { 12990, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+ { 13014, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+ { 13038, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+ { 13066, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ { 13094, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+ { 13126, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+ { 13148, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+ { 13174, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+ { 13192, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+ { 13214, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+ { 13233, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+ { 13256, 0x0000862A }, /* GL_IDENTITY_NV */
+ { 13271, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+ { 13291, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ { 13331, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ { 13369, 0x00001E02 }, /* GL_INCR */
+ { 13377, 0x00008507 }, /* GL_INCR_WRAP */
+ { 13390, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+ { 13407, 0x00008222 }, /* GL_INDEX */
+ { 13416, 0x00008077 }, /* GL_INDEX_ARRAY */
+ { 13431, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ { 13461, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+ { 13495, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+ { 13518, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+ { 13540, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+ { 13560, 0x00000D51 }, /* GL_INDEX_BITS */
+ { 13574, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+ { 13595, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+ { 13613, 0x00000C30 }, /* GL_INDEX_MODE */
+ { 13627, 0x00000D13 }, /* GL_INDEX_OFFSET */
+ { 13643, 0x00000D12 }, /* GL_INDEX_SHIFT */
+ { 13658, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+ { 13677, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+ { 13696, 0x00001404 }, /* GL_INT */
+ { 13703, 0x00008049 }, /* GL_INTENSITY */
+ { 13716, 0x0000804C }, /* GL_INTENSITY12 */
+ { 13731, 0x0000804C }, /* GL_INTENSITY12_EXT */
+ { 13750, 0x0000804D }, /* GL_INTENSITY16 */
+ { 13765, 0x0000804D }, /* GL_INTENSITY16_EXT */
+ { 13784, 0x0000804A }, /* GL_INTENSITY4 */
+ { 13798, 0x0000804A }, /* GL_INTENSITY4_EXT */
+ { 13816, 0x0000804B }, /* GL_INTENSITY8 */
+ { 13830, 0x0000804B }, /* GL_INTENSITY8_EXT */
+ { 13848, 0x00008049 }, /* GL_INTENSITY_EXT */
+ { 13865, 0x00008575 }, /* GL_INTERPOLATE */
+ { 13880, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+ { 13899, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+ { 13918, 0x00008B53 }, /* GL_INT_VEC2 */
+ { 13930, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+ { 13946, 0x00008B54 }, /* GL_INT_VEC3 */
+ { 13958, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+ { 13974, 0x00008B55 }, /* GL_INT_VEC4 */
+ { 13986, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+ { 14002, 0x00000500 }, /* GL_INVALID_ENUM */
+ { 14018, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ { 14051, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ { 14088, 0x00000502 }, /* GL_INVALID_OPERATION */
+ { 14109, 0x00000501 }, /* GL_INVALID_VALUE */
+ { 14126, 0x0000862B }, /* GL_INVERSE_NV */
+ { 14140, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+ { 14164, 0x0000150A }, /* GL_INVERT */
+ { 14174, 0x00001E00 }, /* GL_KEEP */
+ { 14182, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
+ { 14208, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
+ { 14238, 0x00000406 }, /* GL_LEFT */
+ { 14246, 0x00000203 }, /* GL_LEQUAL */
+ { 14256, 0x00000201 }, /* GL_LESS */
+ { 14264, 0x00004000 }, /* GL_LIGHT0 */
+ { 14274, 0x00004001 }, /* GL_LIGHT1 */
+ { 14284, 0x00004002 }, /* GL_LIGHT2 */
+ { 14294, 0x00004003 }, /* GL_LIGHT3 */
+ { 14304, 0x00004004 }, /* GL_LIGHT4 */
+ { 14314, 0x00004005 }, /* GL_LIGHT5 */
+ { 14324, 0x00004006 }, /* GL_LIGHT6 */
+ { 14334, 0x00004007 }, /* GL_LIGHT7 */
+ { 14344, 0x00000B50 }, /* GL_LIGHTING */
+ { 14356, 0x00000040 }, /* GL_LIGHTING_BIT */
+ { 14372, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+ { 14395, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ { 14424, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+ { 14457, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ { 14485, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+ { 14509, 0x00001B01 }, /* GL_LINE */
+ { 14517, 0x00002601 }, /* GL_LINEAR */
+ { 14527, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+ { 14549, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ { 14579, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ { 14610, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+ { 14634, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+ { 14659, 0x00000001 }, /* GL_LINES */
+ { 14668, 0x00000004 }, /* GL_LINE_BIT */
+ { 14680, 0x00000002 }, /* GL_LINE_LOOP */
+ { 14693, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+ { 14713, 0x00000B20 }, /* GL_LINE_SMOOTH */
+ { 14728, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+ { 14748, 0x00000B24 }, /* GL_LINE_STIPPLE */
+ { 14764, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+ { 14788, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+ { 14811, 0x00000003 }, /* GL_LINE_STRIP */
+ { 14825, 0x00000702 }, /* GL_LINE_TOKEN */
+ { 14839, 0x00000B21 }, /* GL_LINE_WIDTH */
+ { 14853, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+ { 14879, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+ { 14899, 0x00008B82 }, /* GL_LINK_STATUS */
+ { 14914, 0x00000B32 }, /* GL_LIST_BASE */
+ { 14927, 0x00020000 }, /* GL_LIST_BIT */
+ { 14939, 0x00000B33 }, /* GL_LIST_INDEX */
+ { 14953, 0x00000B30 }, /* GL_LIST_MODE */
+ { 14966, 0x00000101 }, /* GL_LOAD */
+ { 14974, 0x00000BF1 }, /* GL_LOGIC_OP */
+ { 14986, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+ { 15003, 0x00008CA1 }, /* GL_LOWER_LEFT */
+ { 15017, 0x00001909 }, /* GL_LUMINANCE */
+ { 15030, 0x00008041 }, /* GL_LUMINANCE12 */
+ { 15045, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+ { 15068, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+ { 15095, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+ { 15117, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+ { 15143, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+ { 15162, 0x00008042 }, /* GL_LUMINANCE16 */
+ { 15177, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+ { 15200, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+ { 15227, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+ { 15246, 0x0000803F }, /* GL_LUMINANCE4 */
+ { 15260, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+ { 15281, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+ { 15306, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+ { 15324, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+ { 15345, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+ { 15370, 0x00008040 }, /* GL_LUMINANCE8 */
+ { 15384, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+ { 15405, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+ { 15430, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+ { 15448, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+ { 15467, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+ { 15483, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+ { 15503, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+ { 15525, 0x00000D91 }, /* GL_MAP1_INDEX */
+ { 15539, 0x00000D92 }, /* GL_MAP1_NORMAL */
+ { 15554, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+ { 15578, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+ { 15602, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+ { 15626, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+ { 15650, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+ { 15667, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+ { 15684, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ { 15712, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ { 15741, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ { 15770, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ { 15799, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ { 15828, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ { 15857, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ { 15886, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ { 15914, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ { 15942, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ { 15970, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ { 15998, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ { 16026, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ { 16054, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ { 16082, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ { 16110, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ { 16138, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+ { 16154, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+ { 16174, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+ { 16196, 0x00000DB1 }, /* GL_MAP2_INDEX */
+ { 16210, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+ { 16225, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+ { 16249, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+ { 16273, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+ { 16297, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+ { 16321, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+ { 16338, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+ { 16355, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ { 16383, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ { 16412, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ { 16441, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ { 16470, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ { 16499, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ { 16528, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ { 16557, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ { 16585, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ { 16613, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ { 16641, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ { 16669, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ { 16697, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ { 16725, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+ { 16753, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ { 16781, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ { 16809, 0x00000D10 }, /* GL_MAP_COLOR */
+ { 16822, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
+ { 16848, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
+ { 16877, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
+ { 16905, 0x00000001 }, /* GL_MAP_READ_BIT */
+ { 16921, 0x00000D11 }, /* GL_MAP_STENCIL */
+ { 16936, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
+ { 16962, 0x00000002 }, /* GL_MAP_WRITE_BIT */
+ { 16979, 0x000088C0 }, /* GL_MATRIX0_ARB */
+ { 16994, 0x00008630 }, /* GL_MATRIX0_NV */
+ { 17008, 0x000088CA }, /* GL_MATRIX10_ARB */
+ { 17024, 0x000088CB }, /* GL_MATRIX11_ARB */
+ { 17040, 0x000088CC }, /* GL_MATRIX12_ARB */
+ { 17056, 0x000088CD }, /* GL_MATRIX13_ARB */
+ { 17072, 0x000088CE }, /* GL_MATRIX14_ARB */
+ { 17088, 0x000088CF }, /* GL_MATRIX15_ARB */
+ { 17104, 0x000088D0 }, /* GL_MATRIX16_ARB */
+ { 17120, 0x000088D1 }, /* GL_MATRIX17_ARB */
+ { 17136, 0x000088D2 }, /* GL_MATRIX18_ARB */
+ { 17152, 0x000088D3 }, /* GL_MATRIX19_ARB */
+ { 17168, 0x000088C1 }, /* GL_MATRIX1_ARB */
+ { 17183, 0x00008631 }, /* GL_MATRIX1_NV */
+ { 17197, 0x000088D4 }, /* GL_MATRIX20_ARB */
+ { 17213, 0x000088D5 }, /* GL_MATRIX21_ARB */
+ { 17229, 0x000088D6 }, /* GL_MATRIX22_ARB */
+ { 17245, 0x000088D7 }, /* GL_MATRIX23_ARB */
+ { 17261, 0x000088D8 }, /* GL_MATRIX24_ARB */
+ { 17277, 0x000088D9 }, /* GL_MATRIX25_ARB */
+ { 17293, 0x000088DA }, /* GL_MATRIX26_ARB */
+ { 17309, 0x000088DB }, /* GL_MATRIX27_ARB */
+ { 17325, 0x000088DC }, /* GL_MATRIX28_ARB */
+ { 17341, 0x000088DD }, /* GL_MATRIX29_ARB */
+ { 17357, 0x000088C2 }, /* GL_MATRIX2_ARB */
+ { 17372, 0x00008632 }, /* GL_MATRIX2_NV */
+ { 17386, 0x000088DE }, /* GL_MATRIX30_ARB */
+ { 17402, 0x000088DF }, /* GL_MATRIX31_ARB */
+ { 17418, 0x000088C3 }, /* GL_MATRIX3_ARB */
+ { 17433, 0x00008633 }, /* GL_MATRIX3_NV */
+ { 17447, 0x000088C4 }, /* GL_MATRIX4_ARB */
+ { 17462, 0x00008634 }, /* GL_MATRIX4_NV */
+ { 17476, 0x000088C5 }, /* GL_MATRIX5_ARB */
+ { 17491, 0x00008635 }, /* GL_MATRIX5_NV */
+ { 17505, 0x000088C6 }, /* GL_MATRIX6_ARB */
+ { 17520, 0x00008636 }, /* GL_MATRIX6_NV */
+ { 17534, 0x000088C7 }, /* GL_MATRIX7_ARB */
+ { 17549, 0x00008637 }, /* GL_MATRIX7_NV */
+ { 17563, 0x000088C8 }, /* GL_MATRIX8_ARB */
+ { 17578, 0x000088C9 }, /* GL_MATRIX9_ARB */
+ { 17593, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ { 17619, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ { 17653, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ { 17684, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ { 17717, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ { 17748, 0x00000BA0 }, /* GL_MATRIX_MODE */
+ { 17763, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+ { 17785, 0x00008008 }, /* GL_MAX */
+ { 17792, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+ { 17815, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ { 17847, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ { 17873, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ { 17906, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ { 17932, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 17966, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+ { 17985, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
+ { 18010, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ { 18039, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ { 18071, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 18107, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ { 18143, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+ { 18183, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+ { 18209, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+ { 18239, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+ { 18264, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+ { 18293, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ { 18322, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+ { 18355, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+ { 18375, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+ { 18399, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+ { 18423, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+ { 18447, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+ { 18472, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+ { 18490, 0x00008008 }, /* GL_MAX_EXT */
+ { 18501, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ { 18536, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+ { 18575, 0x00000D31 }, /* GL_MAX_LIGHTS */
+ { 18589, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+ { 18609, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ { 18647, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ { 18676, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+ { 18700, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+ { 18728, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+ { 18751, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 18788, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 18824, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ { 18851, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ { 18880, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ { 18914, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ { 18950, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ { 18977, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ { 19009, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ { 19045, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ { 19074, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ { 19103, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ { 19131, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ { 19169, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 19213, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 19256, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 19290, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 19329, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 19366, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 19404, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 19447, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 19490, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ { 19520, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ { 19551, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 19587, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 19623, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ { 19653, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ { 19687, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+ { 19720, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
+ { 19745, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ { 19774, 0x00008D57 }, /* GL_MAX_SAMPLES */
+ { 19789, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
+ { 19808, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ { 19835, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+ { 19855, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+ { 19879, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+ { 19901, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+ { 19927, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ { 19954, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+ { 19985, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+ { 20009, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 20043, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+ { 20063, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ { 20090, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+ { 20111, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+ { 20136, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+ { 20161, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ { 20196, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+ { 20218, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+ { 20244, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+ { 20266, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+ { 20292, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ { 20326, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+ { 20364, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ { 20397, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+ { 20434, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+ { 20458, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+ { 20479, 0x00008007 }, /* GL_MIN */
+ { 20486, 0x0000802E }, /* GL_MINMAX */
+ { 20496, 0x0000802E }, /* GL_MINMAX_EXT */
+ { 20510, 0x0000802F }, /* GL_MINMAX_FORMAT */
+ { 20527, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+ { 20548, 0x00008030 }, /* GL_MINMAX_SINK */
+ { 20563, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+ { 20582, 0x00008007 }, /* GL_MIN_EXT */
+ { 20593, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+ { 20612, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+ { 20635, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+ { 20658, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+ { 20678, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+ { 20698, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ { 20728, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+ { 20756, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ { 20784, 0x00001700 }, /* GL_MODELVIEW */
+ { 20797, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+ { 20815, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+ { 20834, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+ { 20853, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+ { 20872, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+ { 20891, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+ { 20910, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+ { 20929, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+ { 20948, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+ { 20967, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+ { 20986, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+ { 21005, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+ { 21023, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+ { 21042, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+ { 21061, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+ { 21080, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+ { 21099, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+ { 21118, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+ { 21137, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+ { 21156, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+ { 21175, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+ { 21194, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+ { 21213, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+ { 21231, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+ { 21250, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+ { 21269, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+ { 21287, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+ { 21305, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+ { 21323, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+ { 21341, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+ { 21359, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+ { 21377, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+ { 21395, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+ { 21415, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+ { 21442, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+ { 21467, 0x00002100 }, /* GL_MODULATE */
+ { 21479, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+ { 21499, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+ { 21526, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+ { 21551, 0x00000103 }, /* GL_MULT */
+ { 21559, 0x0000809D }, /* GL_MULTISAMPLE */
+ { 21574, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+ { 21594, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+ { 21613, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+ { 21632, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+ { 21656, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+ { 21679, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ { 21709, 0x00002A25 }, /* GL_N3F_V3F */
+ { 21720, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+ { 21740, 0x0000150E }, /* GL_NAND */
+ { 21748, 0x00002600 }, /* GL_NEAREST */
+ { 21759, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ { 21790, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ { 21822, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+ { 21847, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+ { 21873, 0x00000200 }, /* GL_NEVER */
+ { 21882, 0x00001102 }, /* GL_NICEST */
+ { 21892, 0x00000000 }, /* GL_NONE */
+ { 21900, 0x00001505 }, /* GL_NOOP */
+ { 21908, 0x00001508 }, /* GL_NOR */
+ { 21915, 0x00000BA1 }, /* GL_NORMALIZE */
+ { 21928, 0x00008075 }, /* GL_NORMAL_ARRAY */
+ { 21944, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ { 21975, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+ { 22010, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+ { 22034, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+ { 22057, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+ { 22078, 0x00008511 }, /* GL_NORMAL_MAP */
+ { 22092, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+ { 22110, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+ { 22127, 0x00000205 }, /* GL_NOTEQUAL */
+ { 22139, 0x00000000 }, /* GL_NO_ERROR */
+ { 22151, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ { 22185, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
+ { 22223, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+ { 22255, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+ { 22297, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+ { 22327, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+ { 22367, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+ { 22398, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+ { 22427, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+ { 22455, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+ { 22485, 0x00002401 }, /* GL_OBJECT_LINEAR */
+ { 22502, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+ { 22528, 0x00002501 }, /* GL_OBJECT_PLANE */
+ { 22544, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+ { 22579, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+ { 22601, 0x00009112 }, /* GL_OBJECT_TYPE */
+ { 22616, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+ { 22635, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+ { 22665, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+ { 22686, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+ { 22714, 0x00000001 }, /* GL_ONE */
+ { 22721, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ { 22749, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+ { 22781, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ { 22809, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+ { 22841, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+ { 22864, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+ { 22887, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+ { 22910, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+ { 22933, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+ { 22951, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+ { 22973, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+ { 22995, 0x00008590 }, /* GL_OPERAND0_RGB */
+ { 23011, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+ { 23031, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+ { 23051, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+ { 23069, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+ { 23091, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+ { 23113, 0x00008591 }, /* GL_OPERAND1_RGB */
+ { 23129, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+ { 23149, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+ { 23169, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+ { 23187, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+ { 23209, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+ { 23231, 0x00008592 }, /* GL_OPERAND2_RGB */
+ { 23247, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+ { 23267, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+ { 23287, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+ { 23308, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+ { 23327, 0x00001507 }, /* GL_OR */
+ { 23333, 0x00000A01 }, /* GL_ORDER */
+ { 23342, 0x0000150D }, /* GL_OR_INVERTED */
+ { 23357, 0x0000150B }, /* GL_OR_REVERSE */
+ { 23371, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+ { 23388, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+ { 23406, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+ { 23427, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+ { 23447, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+ { 23465, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+ { 23484, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+ { 23504, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+ { 23524, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+ { 23542, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+ { 23561, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+ { 23586, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+ { 23610, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+ { 23631, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+ { 23653, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+ { 23675, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+ { 23700, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+ { 23724, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+ { 23745, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+ { 23767, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+ { 23789, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+ { 23811, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ { 23842, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+ { 23862, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ { 23887, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+ { 23907, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ { 23932, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+ { 23952, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ { 23977, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+ { 23997, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ { 24022, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+ { 24042, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ { 24067, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+ { 24087, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ { 24112, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+ { 24132, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ { 24157, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+ { 24177, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ { 24202, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+ { 24222, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ { 24247, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+ { 24267, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ { 24292, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+ { 24310, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
+ { 24331, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ { 24360, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+ { 24393, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+ { 24418, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
+ { 24441, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ { 24472, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+ { 24507, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+ { 24534, 0x00001B00 }, /* GL_POINT */
+ { 24543, 0x00000000 }, /* GL_POINTS */
+ { 24553, 0x00000002 }, /* GL_POINT_BIT */
+ { 24566, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+ { 24596, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+ { 24630, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+ { 24664, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+ { 24699, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ { 24728, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+ { 24761, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+ { 24794, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+ { 24828, 0x00000B11 }, /* GL_POINT_SIZE */
+ { 24842, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+ { 24868, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+ { 24886, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+ { 24908, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+ { 24930, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+ { 24953, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+ { 24971, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+ { 24993, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+ { 25015, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+ { 25038, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+ { 25058, 0x00000B10 }, /* GL_POINT_SMOOTH */
+ { 25074, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+ { 25095, 0x00008861 }, /* GL_POINT_SPRITE */
+ { 25111, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+ { 25131, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ { 25160, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+ { 25179, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+ { 25205, 0x00000701 }, /* GL_POINT_TOKEN */
+ { 25220, 0x00000009 }, /* GL_POLYGON */
+ { 25231, 0x00000008 }, /* GL_POLYGON_BIT */
+ { 25246, 0x00000B40 }, /* GL_POLYGON_MODE */
+ { 25262, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+ { 25285, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+ { 25310, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+ { 25333, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+ { 25356, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+ { 25380, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+ { 25404, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+ { 25422, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+ { 25445, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+ { 25464, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+ { 25487, 0x00000703 }, /* GL_POLYGON_TOKEN */
+ { 25504, 0x00001203 }, /* GL_POSITION */
+ { 25516, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ { 25548, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+ { 25584, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ { 25617, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+ { 25654, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ { 25685, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+ { 25720, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ { 25752, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+ { 25788, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 25821, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ { 25853, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+ { 25889, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ { 25922, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+ { 25959, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ { 25989, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+ { 26023, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ { 26054, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+ { 26089, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ { 26120, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+ { 26155, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ { 26187, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+ { 26223, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ { 26253, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+ { 26287, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ { 26318, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+ { 26353, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ { 26385, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ { 26416, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+ { 26451, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ { 26483, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+ { 26519, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+ { 26548, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+ { 26581, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+ { 26611, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+ { 26645, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ { 26684, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ { 26717, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ { 26757, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ { 26791, 0x00008578 }, /* GL_PREVIOUS */
+ { 26803, 0x00008578 }, /* GL_PREVIOUS_ARB */
+ { 26819, 0x00008578 }, /* GL_PREVIOUS_EXT */
+ { 26835, 0x00008577 }, /* GL_PRIMARY_COLOR */
+ { 26852, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+ { 26873, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+ { 26894, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 26927, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 26959, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+ { 26982, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+ { 27005, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ { 27035, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+ { 27064, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+ { 27092, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+ { 27114, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ { 27142, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ { 27170, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+ { 27192, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+ { 27213, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 27253, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 27292, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 27322, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 27357, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 27390, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 27424, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 27463, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 27502, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+ { 27524, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+ { 27550, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+ { 27574, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+ { 27597, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+ { 27619, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+ { 27640, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+ { 27661, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+ { 27688, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 27720, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 27752, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ { 27787, 0x00001701 }, /* GL_PROJECTION */
+ { 27801, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+ { 27822, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+ { 27848, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
+ { 27868, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
+ { 27892, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+ { 27913, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+ { 27932, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+ { 27955, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 27994, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ { 28032, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+ { 28052, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ { 28082, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+ { 28106, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+ { 28126, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ { 28156, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+ { 28180, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+ { 28200, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ { 28233, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ { 28259, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+ { 28289, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ { 28320, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+ { 28350, 0x00002003 }, /* GL_Q */
+ { 28355, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+ { 28380, 0x00000007 }, /* GL_QUADS */
+ { 28389, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ { 28433, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
+ { 28481, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+ { 28498, 0x00000008 }, /* GL_QUAD_STRIP */
+ { 28512, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ { 28542, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
+ { 28569, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+ { 28591, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+ { 28617, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
+ { 28637, 0x00008866 }, /* GL_QUERY_RESULT */
+ { 28653, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+ { 28673, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+ { 28699, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+ { 28729, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
+ { 28746, 0x00002002 }, /* GL_R */
+ { 28751, 0x00002A10 }, /* GL_R3_G3_B2 */
+ { 28763, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ { 28796, 0x00000C02 }, /* GL_READ_BUFFER */
+ { 28811, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
+ { 28831, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
+ { 28859, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ { 28891, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+ { 28915, 0x000088B8 }, /* GL_READ_ONLY */
+ { 28928, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+ { 28945, 0x000088BA }, /* GL_READ_WRITE */
+ { 28959, 0x000088BA }, /* GL_READ_WRITE_ARB */
+ { 28977, 0x00001903 }, /* GL_RED */
+ { 28984, 0x00008016 }, /* GL_REDUCE */
+ { 28994, 0x00008016 }, /* GL_REDUCE_EXT */
+ { 29008, 0x00000D15 }, /* GL_RED_BIAS */
+ { 29020, 0x00000D52 }, /* GL_RED_BITS */
+ { 29032, 0x00000D14 }, /* GL_RED_SCALE */
+ { 29045, 0x00008512 }, /* GL_REFLECTION_MAP */
+ { 29063, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+ { 29085, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+ { 29106, 0x00001C00 }, /* GL_RENDER */
+ { 29116, 0x00008D41 }, /* GL_RENDERBUFFER */
+ { 29132, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ { 29159, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
+ { 29183, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+ { 29211, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
+ { 29237, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ { 29264, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+ { 29284, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
+ { 29311, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
+ { 29334, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ { 29361, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ { 29393, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ { 29429, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
+ { 29454, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
+ { 29478, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
+ { 29506, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ { 29535, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
+ { 29557, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+ { 29583, 0x00001F01 }, /* GL_RENDERER */
+ { 29595, 0x00000C40 }, /* GL_RENDER_MODE */
+ { 29610, 0x00002901 }, /* GL_REPEAT */
+ { 29620, 0x00001E01 }, /* GL_REPLACE */
+ { 29631, 0x00008062 }, /* GL_REPLACE_EXT */
+ { 29646, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+ { 29669, 0x0000803A }, /* GL_RESCALE_NORMAL */
+ { 29687, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+ { 29709, 0x00000102 }, /* GL_RETURN */
+ { 29719, 0x00001907 }, /* GL_RGB */
+ { 29726, 0x00008052 }, /* GL_RGB10 */
+ { 29735, 0x00008059 }, /* GL_RGB10_A2 */
+ { 29747, 0x00008059 }, /* GL_RGB10_A2_EXT */
+ { 29763, 0x00008052 }, /* GL_RGB10_EXT */
+ { 29776, 0x00008053 }, /* GL_RGB12 */
+ { 29785, 0x00008053 }, /* GL_RGB12_EXT */
+ { 29798, 0x00008054 }, /* GL_RGB16 */
+ { 29807, 0x00008054 }, /* GL_RGB16_EXT */
+ { 29820, 0x0000804E }, /* GL_RGB2_EXT */
+ { 29832, 0x0000804F }, /* GL_RGB4 */
+ { 29840, 0x0000804F }, /* GL_RGB4_EXT */
+ { 29852, 0x000083A1 }, /* GL_RGB4_S3TC */
+ { 29865, 0x00008050 }, /* GL_RGB5 */
+ { 29873, 0x00008057 }, /* GL_RGB5_A1 */
+ { 29884, 0x00008057 }, /* GL_RGB5_A1_EXT */
+ { 29899, 0x00008050 }, /* GL_RGB5_EXT */
+ { 29911, 0x00008051 }, /* GL_RGB8 */
+ { 29919, 0x00008051 }, /* GL_RGB8_EXT */
+ { 29931, 0x00001908 }, /* GL_RGBA */
+ { 29939, 0x0000805A }, /* GL_RGBA12 */
+ { 29949, 0x0000805A }, /* GL_RGBA12_EXT */
+ { 29963, 0x0000805B }, /* GL_RGBA16 */
+ { 29973, 0x0000805B }, /* GL_RGBA16_EXT */
+ { 29987, 0x00008055 }, /* GL_RGBA2 */
+ { 29996, 0x00008055 }, /* GL_RGBA2_EXT */
+ { 30009, 0x00008056 }, /* GL_RGBA4 */
+ { 30018, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+ { 30037, 0x00008056 }, /* GL_RGBA4_EXT */
+ { 30050, 0x000083A3 }, /* GL_RGBA4_S3TC */
+ { 30064, 0x00008058 }, /* GL_RGBA8 */
+ { 30073, 0x00008058 }, /* GL_RGBA8_EXT */
+ { 30086, 0x00008F97 }, /* GL_RGBA8_SNORM */
+ { 30101, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+ { 30119, 0x00000C31 }, /* GL_RGBA_MODE */
+ { 30132, 0x000083A2 }, /* GL_RGBA_S3TC */
+ { 30145, 0x00008F93 }, /* GL_RGBA_SNORM */
+ { 30159, 0x000083A0 }, /* GL_RGB_S3TC */
+ { 30171, 0x00008573 }, /* GL_RGB_SCALE */
+ { 30184, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+ { 30201, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+ { 30218, 0x00000407 }, /* GL_RIGHT */
+ { 30227, 0x00002000 }, /* GL_S */
+ { 30232, 0x00008B5D }, /* GL_SAMPLER_1D */
+ { 30246, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+ { 30267, 0x00008B5E }, /* GL_SAMPLER_2D */
+ { 30281, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+ { 30302, 0x00008B5F }, /* GL_SAMPLER_3D */
+ { 30316, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+ { 30332, 0x000080A9 }, /* GL_SAMPLES */
+ { 30343, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+ { 30359, 0x000080A9 }, /* GL_SAMPLES_ARB */
+ { 30374, 0x00008914 }, /* GL_SAMPLES_PASSED */
+ { 30392, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+ { 30414, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ { 30442, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+ { 30474, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+ { 30497, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+ { 30524, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+ { 30542, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+ { 30565, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+ { 30587, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+ { 30606, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+ { 30629, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+ { 30655, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+ { 30685, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+ { 30710, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+ { 30739, 0x00080000 }, /* GL_SCISSOR_BIT */
+ { 30754, 0x00000C10 }, /* GL_SCISSOR_BOX */
+ { 30769, 0x00000C11 }, /* GL_SCISSOR_TEST */
+ { 30785, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+ { 30810, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ { 30850, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 30894, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ { 30927, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ { 30957, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ { 30989, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ { 31019, 0x00001C02 }, /* GL_SELECT */
+ { 31029, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+ { 31057, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+ { 31082, 0x00008012 }, /* GL_SEPARABLE_2D */
+ { 31098, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+ { 31125, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+ { 31156, 0x0000150F }, /* GL_SET */
+ { 31163, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+ { 31184, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+ { 31208, 0x00008B4F }, /* GL_SHADER_TYPE */
+ { 31223, 0x00000B54 }, /* GL_SHADE_MODEL */
+ { 31238, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+ { 31266, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+ { 31289, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ { 31319, 0x00001601 }, /* GL_SHININESS */
+ { 31332, 0x00001402 }, /* GL_SHORT */
+ { 31341, 0x00009119 }, /* GL_SIGNALED */
+ { 31353, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
+ { 31374, 0x000081F9 }, /* GL_SINGLE_COLOR */
+ { 31390, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+ { 31410, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+ { 31429, 0x00008C46 }, /* GL_SLUMINANCE */
+ { 31443, 0x00008C47 }, /* GL_SLUMINANCE8 */
+ { 31458, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
+ { 31480, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
+ { 31500, 0x00001D01 }, /* GL_SMOOTH */
+ { 31510, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+ { 31543, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+ { 31570, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+ { 31603, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+ { 31630, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+ { 31647, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+ { 31668, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+ { 31689, 0x00008580 }, /* GL_SOURCE0_RGB */
+ { 31704, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+ { 31723, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+ { 31742, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+ { 31759, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+ { 31780, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+ { 31801, 0x00008581 }, /* GL_SOURCE1_RGB */
+ { 31816, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+ { 31835, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+ { 31854, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+ { 31871, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+ { 31892, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+ { 31913, 0x00008582 }, /* GL_SOURCE2_RGB */
+ { 31928, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+ { 31947, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+ { 31966, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+ { 31986, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+ { 32004, 0x00001202 }, /* GL_SPECULAR */
+ { 32016, 0x00002402 }, /* GL_SPHERE_MAP */
+ { 32030, 0x00001206 }, /* GL_SPOT_CUTOFF */
+ { 32045, 0x00001204 }, /* GL_SPOT_DIRECTION */
+ { 32063, 0x00001205 }, /* GL_SPOT_EXPONENT */
+ { 32080, 0x00008588 }, /* GL_SRC0_ALPHA */
+ { 32094, 0x00008580 }, /* GL_SRC0_RGB */
+ { 32106, 0x00008589 }, /* GL_SRC1_ALPHA */
+ { 32120, 0x00008581 }, /* GL_SRC1_RGB */
+ { 32132, 0x0000858A }, /* GL_SRC2_ALPHA */
+ { 32146, 0x00008582 }, /* GL_SRC2_RGB */
+ { 32158, 0x00000302 }, /* GL_SRC_ALPHA */
+ { 32171, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+ { 32193, 0x00000300 }, /* GL_SRC_COLOR */
+ { 32206, 0x00008C40 }, /* GL_SRGB */
+ { 32214, 0x00008C41 }, /* GL_SRGB8 */
+ { 32223, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
+ { 32239, 0x00008C42 }, /* GL_SRGB_ALPHA */
+ { 32253, 0x00000503 }, /* GL_STACK_OVERFLOW */
+ { 32271, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+ { 32290, 0x000088E6 }, /* GL_STATIC_COPY */
+ { 32305, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+ { 32324, 0x000088E4 }, /* GL_STATIC_DRAW */
+ { 32339, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+ { 32358, 0x000088E5 }, /* GL_STATIC_READ */
+ { 32373, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+ { 32392, 0x00001802 }, /* GL_STENCIL */
+ { 32403, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
+ { 32425, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+ { 32451, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+ { 32472, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
+ { 32497, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+ { 32518, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
+ { 32543, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ { 32575, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
+ { 32611, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ { 32643, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
+ { 32679, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+ { 32699, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+ { 32726, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+ { 32752, 0x00000D57 }, /* GL_STENCIL_BITS */
+ { 32768, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+ { 32790, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+ { 32813, 0x00000B94 }, /* GL_STENCIL_FAIL */
+ { 32829, 0x00000B92 }, /* GL_STENCIL_FUNC */
+ { 32845, 0x00001901 }, /* GL_STENCIL_INDEX */
+ { 32862, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
+ { 32880, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
+ { 32899, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+ { 32922, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+ { 32944, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
+ { 32962, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+ { 32984, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
+ { 33002, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+ { 33024, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+ { 33045, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ { 33072, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+ { 33099, 0x00000B97 }, /* GL_STENCIL_REF */
+ { 33114, 0x00000B90 }, /* GL_STENCIL_TEST */
+ { 33130, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ { 33159, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+ { 33181, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+ { 33202, 0x00000C33 }, /* GL_STEREO */
+ { 33212, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
+ { 33236, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
+ { 33261, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
+ { 33285, 0x000088E2 }, /* GL_STREAM_COPY */
+ { 33300, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+ { 33319, 0x000088E0 }, /* GL_STREAM_DRAW */
+ { 33334, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+ { 33353, 0x000088E1 }, /* GL_STREAM_READ */
+ { 33368, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+ { 33387, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+ { 33404, 0x000084E7 }, /* GL_SUBTRACT */
+ { 33416, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+ { 33432, 0x00009113 }, /* GL_SYNC_CONDITION */
+ { 33450, 0x00009116 }, /* GL_SYNC_FENCE */
+ { 33464, 0x00009115 }, /* GL_SYNC_FLAGS */
+ { 33478, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
+ { 33505, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ { 33535, 0x00009114 }, /* GL_SYNC_STATUS */
+ { 33550, 0x00002001 }, /* GL_T */
+ { 33555, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+ { 33570, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+ { 33589, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+ { 33605, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+ { 33620, 0x00002A27 }, /* GL_T2F_V3F */
+ { 33631, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+ { 33650, 0x00002A28 }, /* GL_T4F_V4F */
+ { 33661, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+ { 33684, 0x00001702 }, /* GL_TEXTURE */
+ { 33695, 0x000084C0 }, /* GL_TEXTURE0 */
+ { 33707, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+ { 33723, 0x000084C1 }, /* GL_TEXTURE1 */
+ { 33735, 0x000084CA }, /* GL_TEXTURE10 */
+ { 33748, 0x000084CA }, /* GL_TEXTURE10_ARB */
+ { 33765, 0x000084CB }, /* GL_TEXTURE11 */
+ { 33778, 0x000084CB }, /* GL_TEXTURE11_ARB */
+ { 33795, 0x000084CC }, /* GL_TEXTURE12 */
+ { 33808, 0x000084CC }, /* GL_TEXTURE12_ARB */
+ { 33825, 0x000084CD }, /* GL_TEXTURE13 */
+ { 33838, 0x000084CD }, /* GL_TEXTURE13_ARB */
+ { 33855, 0x000084CE }, /* GL_TEXTURE14 */
+ { 33868, 0x000084CE }, /* GL_TEXTURE14_ARB */
+ { 33885, 0x000084CF }, /* GL_TEXTURE15 */
+ { 33898, 0x000084CF }, /* GL_TEXTURE15_ARB */
+ { 33915, 0x000084D0 }, /* GL_TEXTURE16 */
+ { 33928, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+ { 33945, 0x000084D1 }, /* GL_TEXTURE17 */
+ { 33958, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+ { 33975, 0x000084D2 }, /* GL_TEXTURE18 */
+ { 33988, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+ { 34005, 0x000084D3 }, /* GL_TEXTURE19 */
+ { 34018, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+ { 34035, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+ { 34051, 0x000084C2 }, /* GL_TEXTURE2 */
+ { 34063, 0x000084D4 }, /* GL_TEXTURE20 */
+ { 34076, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+ { 34093, 0x000084D5 }, /* GL_TEXTURE21 */
+ { 34106, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+ { 34123, 0x000084D6 }, /* GL_TEXTURE22 */
+ { 34136, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+ { 34153, 0x000084D7 }, /* GL_TEXTURE23 */
+ { 34166, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+ { 34183, 0x000084D8 }, /* GL_TEXTURE24 */
+ { 34196, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+ { 34213, 0x000084D9 }, /* GL_TEXTURE25 */
+ { 34226, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+ { 34243, 0x000084DA }, /* GL_TEXTURE26 */
+ { 34256, 0x000084DA }, /* GL_TEXTURE26_ARB */
+ { 34273, 0x000084DB }, /* GL_TEXTURE27 */
+ { 34286, 0x000084DB }, /* GL_TEXTURE27_ARB */
+ { 34303, 0x000084DC }, /* GL_TEXTURE28 */
+ { 34316, 0x000084DC }, /* GL_TEXTURE28_ARB */
+ { 34333, 0x000084DD }, /* GL_TEXTURE29 */
+ { 34346, 0x000084DD }, /* GL_TEXTURE29_ARB */
+ { 34363, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+ { 34379, 0x000084C3 }, /* GL_TEXTURE3 */
+ { 34391, 0x000084DE }, /* GL_TEXTURE30 */
+ { 34404, 0x000084DE }, /* GL_TEXTURE30_ARB */
+ { 34421, 0x000084DF }, /* GL_TEXTURE31 */
+ { 34434, 0x000084DF }, /* GL_TEXTURE31_ARB */
+ { 34451, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+ { 34467, 0x000084C4 }, /* GL_TEXTURE4 */
+ { 34479, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+ { 34495, 0x000084C5 }, /* GL_TEXTURE5 */
+ { 34507, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+ { 34523, 0x000084C6 }, /* GL_TEXTURE6 */
+ { 34535, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+ { 34551, 0x000084C7 }, /* GL_TEXTURE7 */
+ { 34563, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+ { 34579, 0x000084C8 }, /* GL_TEXTURE8 */
+ { 34591, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+ { 34607, 0x000084C9 }, /* GL_TEXTURE9 */
+ { 34619, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+ { 34635, 0x00000DE0 }, /* GL_TEXTURE_1D */
+ { 34649, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
+ { 34673, 0x00000DE1 }, /* GL_TEXTURE_2D */
+ { 34687, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
+ { 34711, 0x0000806F }, /* GL_TEXTURE_3D */
+ { 34725, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+ { 34747, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+ { 34773, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+ { 34795, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+ { 34817, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ { 34849, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+ { 34871, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ { 34903, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+ { 34925, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ { 34953, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+ { 34985, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ { 35018, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+ { 35050, 0x00040000 }, /* GL_TEXTURE_BIT */
+ { 35065, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+ { 35086, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+ { 35111, 0x00001005 }, /* GL_TEXTURE_BORDER */
+ { 35129, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+ { 35153, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ { 35184, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ { 35214, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ { 35244, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ { 35279, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ { 35310, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 35348, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ { 35375, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ { 35407, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ { 35441, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+ { 35465, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+ { 35493, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+ { 35517, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+ { 35545, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ { 35578, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+ { 35602, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+ { 35624, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+ { 35646, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+ { 35672, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 35706, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ { 35739, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+ { 35776, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+ { 35804, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+ { 35836, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+ { 35859, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ { 35897, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+ { 35939, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ { 35970, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ { 35998, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ { 36028, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ { 36056, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+ { 36076, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+ { 36100, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ { 36131, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+ { 36166, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ { 36197, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+ { 36232, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ { 36263, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+ { 36298, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ { 36329, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+ { 36364, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ { 36395, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+ { 36430, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ { 36461, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+ { 36496, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ { 36525, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+ { 36542, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+ { 36564, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+ { 36590, 0x00002300 }, /* GL_TEXTURE_ENV */
+ { 36605, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+ { 36626, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+ { 36646, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+ { 36672, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+ { 36692, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+ { 36709, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+ { 36726, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+ { 36743, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+ { 36760, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ { 36785, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+ { 36807, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+ { 36833, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+ { 36851, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ { 36877, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+ { 36903, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+ { 36933, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+ { 36960, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ { 36985, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+ { 37005, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+ { 37029, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ { 37056, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ { 37083, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ { 37110, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+ { 37136, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+ { 37166, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+ { 37188, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+ { 37206, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 37236, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ { 37264, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ { 37292, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ { 37320, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+ { 37341, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+ { 37360, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+ { 37382, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+ { 37401, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+ { 37421, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ { 37451, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ { 37482, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+ { 37507, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+ { 37531, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+ { 37551, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+ { 37575, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+ { 37595, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+ { 37618, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
+ { 37642, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
+ { 37670, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ { 37700, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+ { 37725, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ { 37759, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+ { 37776, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+ { 37794, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+ { 37812, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+ { 37830, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
+ { 37849, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 37869, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 37888, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 37917, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 37934, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 37960, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 37990, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 38022, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 38052, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 38086, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 38102, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 38133, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 38168, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 38196, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 38228, 0x00000004 }, /* GL_TRIANGLES */
+ { 38241, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 38257, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 38278, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 38296, 0x00000001 }, /* GL_TRUE */
+ { 38304, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 38324, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 38347, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 38367, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 38388, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 38410, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 38432, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 38452, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 38473, 0x00009118 }, /* GL_UNSIGNALED */
+ { 38487, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 38504, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 38531, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 38554, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 38570, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 38597, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
+ { 38618, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
+ { 38643, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 38667, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 38698, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 38722, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 38750, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
+ { 38773, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 38791, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 38821, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 38847, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 38877, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 38903, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 38927, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 38955, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 38983, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 39010, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 39042, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 39073, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 39087, 0x00002A20 }, /* GL_V2F */
+ { 39094, 0x00002A21 }, /* GL_V3F */
+ { 39101, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 39120, 0x00001F00 }, /* GL_VENDOR */
+ { 39130, 0x00001F02 }, /* GL_VERSION */
+ { 39141, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 39157, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
+ { 39181, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 39211, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 39242, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 39277, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 39301, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 39322, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 39345, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 39366, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 39393, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 39421, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 39449, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 39477, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 39505, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 39533, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 39561, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 39588, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 39615, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 39642, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 39669, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 39696, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 39723, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 39750, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 39777, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 39804, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 39842, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 39884, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 39915, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 39950, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 39984, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 40022, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 40053, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 40088, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 40116, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 40148, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 40178, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 40212, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 40240, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 40272, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 40292, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 40314, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 40343, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 40364, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 40393, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 40426, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 40458, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 40485, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 40516, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 40546, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 40563, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 40584, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 40611, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 40623, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 40639, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 40654, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 40674, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 40705, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 40740, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 40768, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 40793, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 40820, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 40845, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 40869, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 40888, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 40902, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 40920, 0x00001506 }, /* GL_XOR */
+ { 40927, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 40946, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 40960, 0x00000000 }, /* GL_ZERO */
+ { 40968, 0x00000D16 }, /* GL_ZOOM_X */
+ { 40978, 0x00000D17 }, /* GL_ZOOM_Y */
};
-static const unsigned reduced_enums[1346] =
+static const unsigned reduced_enums[1351] =
{
479, /* GL_FALSE */
- 701, /* GL_LINES */
- 703, /* GL_LINE_LOOP */
- 710, /* GL_LINE_STRIP */
- 1765, /* GL_TRIANGLES */
- 1768, /* GL_TRIANGLE_STRIP */
- 1766, /* 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 */
+ 702, /* GL_LINES */
+ 704, /* GL_LINE_LOOP */
+ 711, /* GL_LINE_STRIP */
+ 1770, /* GL_TRIANGLES */
+ 1773, /* GL_TRIANGLE_STRIP */
+ 1771, /* GL_TRIANGLE_FAN */
+ 1286, /* GL_QUADS */
+ 1290, /* GL_QUAD_STRIP */
+ 1172, /* GL_POLYGON */
+ 1184, /* GL_POLYGON_STIPPLE_BIT */
+ 1133, /* GL_PIXEL_MODE_BIT */
+ 689, /* GL_LIGHTING_BIT */
509, /* GL_FOG_BIT */
8, /* GL_ACCUM */
- 720, /* GL_LOAD */
- 1344, /* GL_RETURN */
- 1004, /* GL_MULT */
+ 721, /* GL_LOAD */
+ 1349, /* GL_RETURN */
+ 1005, /* GL_MULT */
23, /* GL_ADD */
- 1020, /* GL_NEVER */
- 678, /* GL_LESS */
+ 1021, /* GL_NEVER */
+ 679, /* GL_LESS */
469, /* GL_EQUAL */
- 677, /* GL_LEQUAL */
+ 678, /* GL_LEQUAL */
599, /* GL_GREATER */
- 1035, /* GL_NOTEQUAL */
+ 1036, /* GL_NOTEQUAL */
598, /* GL_GEQUAL */
47, /* GL_ALWAYS */
- 1485, /* GL_SRC_COLOR */
- 1065, /* GL_ONE_MINUS_SRC_COLOR */
- 1483, /* GL_SRC_ALPHA */
- 1064, /* GL_ONE_MINUS_SRC_ALPHA */
+ 1490, /* GL_SRC_COLOR */
+ 1066, /* GL_ONE_MINUS_SRC_COLOR */
+ 1488, /* GL_SRC_ALPHA */
+ 1065, /* GL_ONE_MINUS_SRC_ALPHA */
448, /* GL_DST_ALPHA */
- 1062, /* GL_ONE_MINUS_DST_ALPHA */
+ 1063, /* GL_ONE_MINUS_DST_ALPHA */
449, /* GL_DST_COLOR */
- 1063, /* GL_ONE_MINUS_DST_COLOR */
- 1484, /* GL_SRC_ALPHA_SATURATE */
+ 1064, /* GL_ONE_MINUS_DST_COLOR */
+ 1489, /* GL_SRC_ALPHA_SATURATE */
586, /* GL_FRONT_LEFT */
587, /* GL_FRONT_RIGHT */
69, /* GL_BACK_LEFT */
70, /* GL_BACK_RIGHT */
583, /* GL_FRONT */
68, /* GL_BACK */
- 676, /* GL_LEFT */
- 1386, /* GL_RIGHT */
+ 677, /* GL_LEFT */
+ 1391, /* GL_RIGHT */
584, /* GL_FRONT_AND_BACK */
63, /* GL_AUX0 */
64, /* GL_AUX1 */
65, /* GL_AUX2 */
66, /* GL_AUX3 */
- 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 */
+ 666, /* GL_INVALID_ENUM */
+ 670, /* GL_INVALID_VALUE */
+ 669, /* GL_INVALID_OPERATION */
+ 1495, /* GL_STACK_OVERFLOW */
+ 1496, /* GL_STACK_UNDERFLOW */
+ 1091, /* GL_OUT_OF_MEMORY */
+ 667, /* GL_INVALID_FRAMEBUFFER_OPERATION */
0, /* GL_2D */
2, /* GL_3D */
3, /* GL_3D_COLOR */
4, /* GL_3D_COLOR_TEXTURE */
6, /* GL_4D_COLOR_TEXTURE */
- 1110, /* GL_PASS_THROUGH_TOKEN */
- 1170, /* GL_POINT_TOKEN */
- 711, /* GL_LINE_TOKEN */
- 1184, /* GL_POLYGON_TOKEN */
+ 1111, /* GL_PASS_THROUGH_TOKEN */
+ 1171, /* GL_POINT_TOKEN */
+ 712, /* GL_LINE_TOKEN */
+ 1185, /* GL_POLYGON_TOKEN */
74, /* GL_BITMAP_TOKEN */
447, /* GL_DRAW_PIXEL_TOKEN */
301, /* GL_COPY_PIXEL_TOKEN */
- 704, /* GL_LINE_RESET_TOKEN */
+ 705, /* GL_LINE_RESET_TOKEN */
472, /* GL_EXP */
473, /* GL_EXP2 */
337, /* GL_CW */
125, /* GL_CCW */
146, /* GL_COEFF */
- 1087, /* GL_ORDER */
+ 1088, /* GL_ORDER */
384, /* GL_DOMAIN */
311, /* GL_CURRENT_COLOR */
314, /* GL_CURRENT_INDEX */
@@ -3890,33 +3900,33 @@ static const unsigned reduced_enums[1346] =
328, /* GL_CURRENT_RASTER_POSITION */
329, /* GL_CURRENT_RASTER_POSITION_VALID */
326, /* GL_CURRENT_RASTER_DISTANCE */
- 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 */
+ 1164, /* GL_POINT_SMOOTH */
+ 1153, /* GL_POINT_SIZE */
+ 1163, /* GL_POINT_SIZE_RANGE */
+ 1154, /* GL_POINT_SIZE_GRANULARITY */
+ 706, /* GL_LINE_SMOOTH */
+ 713, /* GL_LINE_WIDTH */
+ 715, /* GL_LINE_WIDTH_RANGE */
+ 714, /* GL_LINE_WIDTH_GRANULARITY */
+ 708, /* GL_LINE_STIPPLE */
+ 709, /* GL_LINE_STIPPLE_PATTERN */
+ 710, /* GL_LINE_STIPPLE_REPEAT */
+ 720, /* GL_LIST_MODE */
+ 886, /* GL_MAX_LIST_NESTING */
+ 717, /* GL_LIST_BASE */
+ 719, /* GL_LIST_INDEX */
+ 1174, /* GL_POLYGON_MODE */
+ 1181, /* GL_POLYGON_SMOOTH */
+ 1183, /* GL_POLYGON_STIPPLE */
458, /* GL_EDGE_FLAG */
304, /* GL_CULL_FACE */
305, /* GL_CULL_FACE_MODE */
585, /* GL_FRONT_FACE */
- 687, /* GL_LIGHTING */
- 692, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- 693, /* GL_LIGHT_MODEL_TWO_SIDE */
- 689, /* GL_LIGHT_MODEL_AMBIENT */
- 1432, /* GL_SHADE_MODEL */
+ 688, /* GL_LIGHTING */
+ 693, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ 694, /* GL_LIGHT_MODEL_TWO_SIDE */
+ 690, /* GL_LIGHT_MODEL_AMBIENT */
+ 1437, /* GL_SHADE_MODEL */
193, /* GL_COLOR_MATERIAL_FACE */
194, /* GL_COLOR_MATERIAL_PARAMETER */
192, /* GL_COLOR_MATERIAL */
@@ -3933,24 +3943,24 @@ static const unsigned reduced_enums[1346] =
358, /* GL_DEPTH_CLEAR_VALUE */
369, /* GL_DEPTH_FUNC */
12, /* GL_ACCUM_CLEAR_VALUE */
- 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 */
- 1860, /* 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 */
+ 1535, /* GL_STENCIL_TEST */
+ 1519, /* GL_STENCIL_CLEAR_VALUE */
+ 1521, /* GL_STENCIL_FUNC */
+ 1537, /* GL_STENCIL_VALUE_MASK */
+ 1520, /* GL_STENCIL_FAIL */
+ 1532, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ 1533, /* GL_STENCIL_PASS_DEPTH_PASS */
+ 1534, /* GL_STENCIL_REF */
+ 1538, /* GL_STENCIL_WRITEMASK */
+ 854, /* GL_MATRIX_MODE */
+ 1026, /* GL_NORMALIZE */
+ 1865, /* GL_VIEWPORT */
+ 1000, /* GL_MODELVIEW_STACK_DEPTH */
+ 1264, /* GL_PROJECTION_STACK_DEPTH */
+ 1745, /* GL_TEXTURE_STACK_DEPTH */
+ 998, /* GL_MODELVIEW_MATRIX */
+ 1263, /* GL_PROJECTION_MATRIX */
+ 1728, /* GL_TEXTURE_MATRIX */
61, /* GL_ATTRIB_STACK_DEPTH */
136, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
43, /* GL_ALPHA_TEST */
@@ -3960,72 +3970,72 @@ static const unsigned reduced_enums[1346] =
78, /* GL_BLEND_DST */
87, /* GL_BLEND_SRC */
75, /* GL_BLEND */
- 722, /* GL_LOGIC_OP_MODE */
- 639, /* GL_INDEX_LOGIC_OP */
+ 723, /* GL_LOGIC_OP_MODE */
+ 640, /* GL_INDEX_LOGIC_OP */
191, /* GL_COLOR_LOGIC_OP */
67, /* GL_AUX_BUFFERS */
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 */
+ 1304, /* GL_READ_BUFFER */
+ 1418, /* GL_SCISSOR_BOX */
+ 1419, /* GL_SCISSOR_TEST */
+ 639, /* GL_INDEX_CLEAR_VALUE */
+ 644, /* GL_INDEX_WRITEMASK */
188, /* GL_COLOR_CLEAR_VALUE */
230, /* GL_COLOR_WRITEMASK */
- 640, /* GL_INDEX_MODE */
- 1379, /* GL_RGBA_MODE */
+ 641, /* GL_INDEX_MODE */
+ 1384, /* 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 */
+ 1539, /* GL_STEREO */
+ 1342, /* GL_RENDER_MODE */
+ 1112, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ 1165, /* GL_POINT_SMOOTH_HINT */
+ 707, /* GL_LINE_SMOOTH_HINT */
+ 1182, /* GL_POLYGON_SMOOTH_HINT */
529, /* GL_FOG_HINT */
- 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 */
- 1777, /* GL_UNPACK_SWAP_BYTES */
- 1772, /* GL_UNPACK_LSB_FIRST */
- 1773, /* GL_UNPACK_ROW_LENGTH */
- 1776, /* GL_UNPACK_SKIP_ROWS */
- 1775, /* GL_UNPACK_SKIP_PIXELS */
- 1770, /* 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 */
- 1878, /* GL_ZOOM_X */
- 1879, /* GL_ZOOM_Y */
+ 1709, /* GL_TEXTURE_GEN_S */
+ 1710, /* GL_TEXTURE_GEN_T */
+ 1708, /* GL_TEXTURE_GEN_R */
+ 1707, /* GL_TEXTURE_GEN_Q */
+ 1125, /* GL_PIXEL_MAP_I_TO_I */
+ 1131, /* GL_PIXEL_MAP_S_TO_S */
+ 1127, /* GL_PIXEL_MAP_I_TO_R */
+ 1123, /* GL_PIXEL_MAP_I_TO_G */
+ 1121, /* GL_PIXEL_MAP_I_TO_B */
+ 1119, /* GL_PIXEL_MAP_I_TO_A */
+ 1129, /* GL_PIXEL_MAP_R_TO_R */
+ 1117, /* GL_PIXEL_MAP_G_TO_G */
+ 1115, /* GL_PIXEL_MAP_B_TO_B */
+ 1113, /* GL_PIXEL_MAP_A_TO_A */
+ 1126, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ 1132, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ 1128, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ 1124, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ 1122, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ 1120, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ 1130, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ 1118, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ 1116, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ 1114, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ 1782, /* GL_UNPACK_SWAP_BYTES */
+ 1777, /* GL_UNPACK_LSB_FIRST */
+ 1778, /* GL_UNPACK_ROW_LENGTH */
+ 1781, /* GL_UNPACK_SKIP_ROWS */
+ 1780, /* GL_UNPACK_SKIP_PIXELS */
+ 1775, /* GL_UNPACK_ALIGNMENT */
+ 1100, /* GL_PACK_SWAP_BYTES */
+ 1095, /* GL_PACK_LSB_FIRST */
+ 1096, /* GL_PACK_ROW_LENGTH */
+ 1099, /* GL_PACK_SKIP_ROWS */
+ 1098, /* GL_PACK_SKIP_PIXELS */
+ 1092, /* GL_PACK_ALIGNMENT */
+ 801, /* GL_MAP_COLOR */
+ 806, /* GL_MAP_STENCIL */
+ 643, /* GL_INDEX_SHIFT */
+ 642, /* GL_INDEX_OFFSET */
+ 1318, /* GL_RED_SCALE */
+ 1316, /* GL_RED_BIAS */
+ 1883, /* GL_ZOOM_X */
+ 1884, /* GL_ZOOM_Y */
603, /* GL_GREEN_SCALE */
601, /* GL_GREEN_BIAS */
93, /* GL_BLUE_SCALE */
@@ -4034,375 +4044,376 @@ static const unsigned reduced_enums[1346] =
40, /* GL_ALPHA_BIAS */
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 */
+ 881, /* GL_MAX_EVAL_ORDER */
+ 885, /* GL_MAX_LIGHTS */
+ 863, /* GL_MAX_CLIP_PLANES */
+ 933, /* GL_MAX_TEXTURE_SIZE */
+ 891, /* GL_MAX_PIXEL_MAP_TABLE */
+ 859, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ 888, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ 889, /* GL_MAX_NAME_STACK_DEPTH */
+ 917, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ 934, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ 948, /* GL_MAX_VIEWPORT_DIMS */
+ 860, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ 1549, /* GL_SUBPIXEL_BITS */
+ 638, /* GL_INDEX_BITS */
+ 1317, /* GL_RED_BITS */
602, /* GL_GREEN_BITS */
92, /* GL_BLUE_BITS */
41, /* GL_ALPHA_BITS */
352, /* GL_DEPTH_BITS */
- 1512, /* GL_STENCIL_BITS */
+ 1517, /* GL_STENCIL_BITS */
14, /* GL_ACCUM_RED_BITS */
13, /* GL_ACCUM_GREEN_BITS */
10, /* GL_ACCUM_BLUE_BITS */
9, /* GL_ACCUM_ALPHA_BITS */
- 1013, /* GL_NAME_STACK_DEPTH */
+ 1014, /* GL_NAME_STACK_DEPTH */
62, /* GL_AUTO_NORMAL */
- 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 */
+ 747, /* GL_MAP1_COLOR_4 */
+ 750, /* GL_MAP1_INDEX */
+ 751, /* GL_MAP1_NORMAL */
+ 752, /* GL_MAP1_TEXTURE_COORD_1 */
+ 753, /* GL_MAP1_TEXTURE_COORD_2 */
+ 754, /* GL_MAP1_TEXTURE_COORD_3 */
+ 755, /* GL_MAP1_TEXTURE_COORD_4 */
+ 756, /* GL_MAP1_VERTEX_3 */
+ 757, /* GL_MAP1_VERTEX_4 */
+ 774, /* GL_MAP2_COLOR_4 */
+ 777, /* GL_MAP2_INDEX */
+ 778, /* GL_MAP2_NORMAL */
+ 779, /* GL_MAP2_TEXTURE_COORD_1 */
+ 780, /* GL_MAP2_TEXTURE_COORD_2 */
+ 781, /* GL_MAP2_TEXTURE_COORD_3 */
+ 782, /* GL_MAP2_TEXTURE_COORD_4 */
+ 783, /* GL_MAP2_VERTEX_3 */
+ 784, /* GL_MAP2_VERTEX_4 */
+ 748, /* GL_MAP1_GRID_DOMAIN */
+ 749, /* GL_MAP1_GRID_SEGMENTS */
+ 775, /* GL_MAP2_GRID_DOMAIN */
+ 776, /* GL_MAP2_GRID_SEGMENTS */
+ 1632, /* GL_TEXTURE_1D */
+ 1634, /* GL_TEXTURE_2D */
482, /* GL_FEEDBACK_BUFFER_POINTER */
483, /* GL_FEEDBACK_BUFFER_SIZE */
484, /* GL_FEEDBACK_BUFFER_TYPE */
- 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 */
+ 1428, /* GL_SELECTION_BUFFER_POINTER */
+ 1429, /* GL_SELECTION_BUFFER_SIZE */
+ 1751, /* GL_TEXTURE_WIDTH */
+ 1714, /* GL_TEXTURE_HEIGHT */
+ 1669, /* GL_TEXTURE_COMPONENTS */
+ 1653, /* GL_TEXTURE_BORDER_COLOR */
+ 1652, /* GL_TEXTURE_BORDER */
385, /* GL_DONT_CARE */
480, /* GL_FASTEST */
- 1021, /* GL_NICEST */
+ 1022, /* GL_NICEST */
48, /* GL_AMBIENT */
382, /* GL_DIFFUSE */
- 1472, /* GL_SPECULAR */
- 1185, /* GL_POSITION */
- 1475, /* GL_SPOT_DIRECTION */
- 1476, /* GL_SPOT_EXPONENT */
- 1474, /* GL_SPOT_CUTOFF */
+ 1477, /* GL_SPECULAR */
+ 1186, /* GL_POSITION */
+ 1480, /* GL_SPOT_DIRECTION */
+ 1481, /* GL_SPOT_EXPONENT */
+ 1479, /* GL_SPOT_CUTOFF */
275, /* GL_CONSTANT_ATTENUATION */
- 696, /* GL_LINEAR_ATTENUATION */
- 1284, /* GL_QUADRATIC_ATTENUATION */
+ 697, /* GL_LINEAR_ATTENUATION */
+ 1285, /* GL_QUADRATIC_ATTENUATION */
244, /* GL_COMPILE */
245, /* GL_COMPILE_AND_EXECUTE */
120, /* GL_BYTE */
- 1779, /* GL_UNSIGNED_BYTE */
- 1437, /* GL_SHORT */
- 1791, /* GL_UNSIGNED_SHORT */
- 645, /* GL_INT */
- 1782, /* GL_UNSIGNED_INT */
+ 1784, /* GL_UNSIGNED_BYTE */
+ 1442, /* GL_SHORT */
+ 1796, /* GL_UNSIGNED_SHORT */
+ 646, /* GL_INT */
+ 1787, /* GL_UNSIGNED_INT */
489, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
7, /* GL_4_BYTES */
392, /* GL_DOUBLE */
+ 604, /* GL_HALF_FLOAT */
132, /* GL_CLEAR */
50, /* GL_AND */
52, /* GL_AND_REVERSE */
299, /* GL_COPY */
51, /* GL_AND_INVERTED */
- 1023, /* GL_NOOP */
- 1874, /* GL_XOR */
- 1086, /* GL_OR */
- 1024, /* GL_NOR */
+ 1024, /* GL_NOOP */
+ 1879, /* GL_XOR */
+ 1087, /* GL_OR */
+ 1025, /* GL_NOR */
470, /* GL_EQUIV */
- 672, /* GL_INVERT */
- 1089, /* GL_OR_REVERSE */
+ 673, /* GL_INVERT */
+ 1090, /* GL_OR_REVERSE */
300, /* GL_COPY_INVERTED */
- 1088, /* GL_OR_INVERTED */
- 1014, /* GL_NAND */
- 1428, /* GL_SET */
+ 1089, /* GL_OR_INVERTED */
+ 1015, /* GL_NAND */
+ 1433, /* GL_SET */
467, /* GL_EMISSION */
- 1436, /* GL_SHININESS */
+ 1441, /* GL_SHININESS */
49, /* GL_AMBIENT_AND_DIFFUSE */
190, /* GL_COLOR_INDEXES */
- 964, /* GL_MODELVIEW */
- 1261, /* GL_PROJECTION */
- 1562, /* GL_TEXTURE */
+ 965, /* GL_MODELVIEW */
+ 1262, /* GL_PROJECTION */
+ 1567, /* GL_TEXTURE */
147, /* GL_COLOR */
346, /* GL_DEPTH */
- 1498, /* GL_STENCIL */
+ 1503, /* GL_STENCIL */
189, /* GL_COLOR_INDEX */
- 1517, /* GL_STENCIL_INDEX */
+ 1522, /* GL_STENCIL_INDEX */
359, /* GL_DEPTH_COMPONENT */
- 1308, /* GL_RED */
+ 1313, /* GL_RED */
600, /* GL_GREEN */
90, /* GL_BLUE */
31, /* GL_ALPHA */
- 1345, /* GL_RGB */
- 1364, /* GL_RGBA */
- 724, /* GL_LUMINANCE */
- 745, /* GL_LUMINANCE_ALPHA */
+ 1350, /* GL_RGB */
+ 1369, /* GL_RGBA */
+ 725, /* GL_LUMINANCE */
+ 746, /* GL_LUMINANCE_ALPHA */
73, /* GL_BITMAP */
- 1141, /* GL_POINT */
- 694, /* GL_LINE */
+ 1142, /* GL_POINT */
+ 695, /* GL_LINE */
485, /* GL_FILL */
- 1317, /* GL_RENDER */
+ 1322, /* GL_RENDER */
481, /* GL_FEEDBACK */
- 1422, /* GL_SELECT */
+ 1427, /* GL_SELECT */
488, /* GL_FLAT */
- 1447, /* GL_SMOOTH */
- 673, /* GL_KEEP */
- 1339, /* GL_REPLACE */
- 627, /* GL_INCR */
+ 1452, /* GL_SMOOTH */
+ 674, /* GL_KEEP */
+ 1344, /* GL_REPLACE */
+ 628, /* GL_INCR */
342, /* GL_DECR */
- 1806, /* GL_VENDOR */
- 1336, /* GL_RENDERER */
- 1807, /* GL_VERSION */
+ 1811, /* GL_VENDOR */
+ 1341, /* GL_RENDERER */
+ 1812, /* GL_VERSION */
474, /* GL_EXTENSIONS */
- 1387, /* GL_S */
- 1553, /* GL_T */
- 1296, /* GL_R */
- 1283, /* GL_Q */
- 1000, /* GL_MODULATE */
+ 1392, /* GL_S */
+ 1558, /* GL_T */
+ 1301, /* GL_R */
+ 1284, /* GL_Q */
+ 1001, /* GL_MODULATE */
341, /* GL_DECAL */
- 1699, /* GL_TEXTURE_ENV_MODE */
- 1698, /* GL_TEXTURE_ENV_COLOR */
- 1697, /* GL_TEXTURE_ENV */
+ 1704, /* GL_TEXTURE_ENV_MODE */
+ 1703, /* GL_TEXTURE_ENV_COLOR */
+ 1702, /* GL_TEXTURE_ENV */
475, /* GL_EYE_LINEAR */
- 1047, /* GL_OBJECT_LINEAR */
- 1473, /* GL_SPHERE_MAP */
- 1701, /* GL_TEXTURE_GEN_MODE */
- 1049, /* GL_OBJECT_PLANE */
+ 1048, /* GL_OBJECT_LINEAR */
+ 1478, /* GL_SPHERE_MAP */
+ 1706, /* GL_TEXTURE_GEN_MODE */
+ 1050, /* 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 */
+ 1016, /* GL_NEAREST */
+ 696, /* GL_LINEAR */
+ 1020, /* GL_NEAREST_MIPMAP_NEAREST */
+ 701, /* GL_LINEAR_MIPMAP_NEAREST */
+ 1019, /* GL_NEAREST_MIPMAP_LINEAR */
+ 700, /* GL_LINEAR_MIPMAP_LINEAR */
+ 1727, /* GL_TEXTURE_MAG_FILTER */
+ 1735, /* GL_TEXTURE_MIN_FILTER */
+ 1753, /* GL_TEXTURE_WRAP_S */
+ 1754, /* GL_TEXTURE_WRAP_T */
126, /* GL_CLAMP */
- 1338, /* GL_REPEAT */
- 1179, /* GL_POLYGON_OFFSET_UNITS */
- 1178, /* GL_POLYGON_OFFSET_POINT */
- 1177, /* GL_POLYGON_OFFSET_LINE */
- 1297, /* GL_R3_G3_B2 */
- 1803, /* GL_V2F */
- 1804, /* GL_V3F */
+ 1343, /* GL_REPEAT */
+ 1180, /* GL_POLYGON_OFFSET_UNITS */
+ 1179, /* GL_POLYGON_OFFSET_POINT */
+ 1178, /* GL_POLYGON_OFFSET_LINE */
+ 1302, /* GL_R3_G3_B2 */
+ 1808, /* GL_V2F */
+ 1809, /* GL_V3F */
123, /* GL_C4UB_V2F */
124, /* GL_C4UB_V3F */
121, /* GL_C3F_V3F */
- 1012, /* GL_N3F_V3F */
+ 1013, /* GL_N3F_V3F */
122, /* GL_C4F_N3F_V3F */
- 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 */
+ 1563, /* GL_T2F_V3F */
+ 1565, /* GL_T4F_V4F */
+ 1561, /* GL_T2F_C4UB_V3F */
+ 1559, /* GL_T2F_C3F_V3F */
+ 1562, /* GL_T2F_N3F_V3F */
+ 1560, /* GL_T2F_C4F_N3F_V3F */
+ 1564, /* GL_T4F_C4F_N3F_V4F */
139, /* GL_CLIP_PLANE0 */
140, /* GL_CLIP_PLANE1 */
141, /* GL_CLIP_PLANE2 */
142, /* GL_CLIP_PLANE3 */
143, /* GL_CLIP_PLANE4 */
144, /* GL_CLIP_PLANE5 */
- 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 */
+ 680, /* GL_LIGHT0 */
+ 681, /* GL_LIGHT1 */
+ 682, /* GL_LIGHT2 */
+ 683, /* GL_LIGHT3 */
+ 684, /* GL_LIGHT4 */
+ 685, /* GL_LIGHT5 */
+ 686, /* GL_LIGHT6 */
+ 687, /* GL_LIGHT7 */
+ 605, /* GL_HINT_BIT */
277, /* GL_CONSTANT_COLOR */
- 1060, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 1061, /* GL_ONE_MINUS_CONSTANT_COLOR */
272, /* GL_CONSTANT_ALPHA */
- 1058, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 1059, /* GL_ONE_MINUS_CONSTANT_ALPHA */
76, /* GL_BLEND_COLOR */
588, /* GL_FUNC_ADD */
- 948, /* GL_MIN */
- 855, /* GL_MAX */
+ 949, /* GL_MIN */
+ 856, /* GL_MAX */
81, /* GL_BLEND_EQUATION */
592, /* GL_FUNC_SUBTRACT */
590, /* GL_FUNC_REVERSE_SUBTRACT */
280, /* GL_CONVOLUTION_1D */
281, /* GL_CONVOLUTION_2D */
- 1425, /* GL_SEPARABLE_2D */
+ 1430, /* GL_SEPARABLE_2D */
284, /* GL_CONVOLUTION_BORDER_MODE */
288, /* GL_CONVOLUTION_FILTER_SCALE */
286, /* GL_CONVOLUTION_FILTER_BIAS */
- 1309, /* GL_REDUCE */
+ 1314, /* GL_REDUCE */
290, /* GL_CONVOLUTION_FORMAT */
294, /* GL_CONVOLUTION_WIDTH */
292, /* GL_CONVOLUTION_HEIGHT */
- 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 */
- 1781, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1793, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1795, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1788, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1783, /* 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 */
+ 872, /* GL_MAX_CONVOLUTION_WIDTH */
+ 870, /* GL_MAX_CONVOLUTION_HEIGHT */
+ 1219, /* GL_POST_CONVOLUTION_RED_SCALE */
+ 1215, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ 1210, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ 1206, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ 1217, /* GL_POST_CONVOLUTION_RED_BIAS */
+ 1213, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ 1208, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ 1204, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ 606, /* GL_HISTOGRAM */
+ 1268, /* GL_PROXY_HISTOGRAM */
+ 622, /* GL_HISTOGRAM_WIDTH */
+ 612, /* GL_HISTOGRAM_FORMAT */
+ 618, /* GL_HISTOGRAM_RED_SIZE */
+ 614, /* GL_HISTOGRAM_GREEN_SIZE */
+ 609, /* GL_HISTOGRAM_BLUE_SIZE */
+ 607, /* GL_HISTOGRAM_ALPHA_SIZE */
+ 616, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ 620, /* GL_HISTOGRAM_SINK */
+ 950, /* GL_MINMAX */
+ 952, /* GL_MINMAX_FORMAT */
+ 954, /* GL_MINMAX_SINK */
+ 1566, /* GL_TABLE_TOO_LARGE_EXT */
+ 1786, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 1798, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 1800, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 1793, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 1788, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1177, /* GL_POLYGON_OFFSET_FILL */
+ 1176, /* GL_POLYGON_OFFSET_FACTOR */
+ 1175, /* GL_POLYGON_OFFSET_BIAS */
+ 1347, /* GL_RESCALE_NORMAL */
36, /* GL_ALPHA4 */
38, /* GL_ALPHA8 */
32, /* GL_ALPHA12 */
34, /* GL_ALPHA16 */
- 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 */
- 1774, /* GL_UNPACK_SKIP_IMAGES */
- 1771, /* 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 */
- 1808, /* GL_VERTEX_ARRAY */
- 1026, /* GL_NORMAL_ARRAY */
+ 736, /* GL_LUMINANCE4 */
+ 742, /* GL_LUMINANCE8 */
+ 726, /* GL_LUMINANCE12 */
+ 732, /* GL_LUMINANCE16 */
+ 737, /* GL_LUMINANCE4_ALPHA4 */
+ 740, /* GL_LUMINANCE6_ALPHA2 */
+ 743, /* GL_LUMINANCE8_ALPHA8 */
+ 729, /* GL_LUMINANCE12_ALPHA4 */
+ 727, /* GL_LUMINANCE12_ALPHA12 */
+ 733, /* GL_LUMINANCE16_ALPHA16 */
+ 647, /* GL_INTENSITY */
+ 652, /* GL_INTENSITY4 */
+ 654, /* GL_INTENSITY8 */
+ 648, /* GL_INTENSITY12 */
+ 650, /* GL_INTENSITY16 */
+ 1359, /* GL_RGB2_EXT */
+ 1360, /* GL_RGB4 */
+ 1363, /* GL_RGB5 */
+ 1367, /* GL_RGB8 */
+ 1351, /* GL_RGB10 */
+ 1355, /* GL_RGB12 */
+ 1357, /* GL_RGB16 */
+ 1374, /* GL_RGBA2 */
+ 1376, /* GL_RGBA4 */
+ 1364, /* GL_RGB5_A1 */
+ 1380, /* GL_RGBA8 */
+ 1352, /* GL_RGB10_A2 */
+ 1370, /* GL_RGBA12 */
+ 1372, /* GL_RGBA16 */
+ 1742, /* GL_TEXTURE_RED_SIZE */
+ 1712, /* GL_TEXTURE_GREEN_SIZE */
+ 1650, /* GL_TEXTURE_BLUE_SIZE */
+ 1637, /* GL_TEXTURE_ALPHA_SIZE */
+ 1725, /* GL_TEXTURE_LUMINANCE_SIZE */
+ 1716, /* GL_TEXTURE_INTENSITY_SIZE */
+ 1345, /* GL_REPLACE_EXT */
+ 1272, /* GL_PROXY_TEXTURE_1D */
+ 1275, /* GL_PROXY_TEXTURE_2D */
+ 1749, /* GL_TEXTURE_TOO_LARGE_EXT */
+ 1737, /* GL_TEXTURE_PRIORITY */
+ 1744, /* GL_TEXTURE_RESIDENT */
+ 1640, /* GL_TEXTURE_BINDING_1D */
+ 1642, /* GL_TEXTURE_BINDING_2D */
+ 1644, /* GL_TEXTURE_BINDING_3D */
+ 1097, /* GL_PACK_SKIP_IMAGES */
+ 1093, /* GL_PACK_IMAGE_HEIGHT */
+ 1779, /* GL_UNPACK_SKIP_IMAGES */
+ 1776, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1636, /* GL_TEXTURE_3D */
+ 1278, /* GL_PROXY_TEXTURE_3D */
+ 1699, /* GL_TEXTURE_DEPTH */
+ 1752, /* GL_TEXTURE_WRAP_R */
+ 857, /* GL_MAX_3D_TEXTURE_SIZE */
+ 1813, /* GL_VERTEX_ARRAY */
+ 1027, /* GL_NORMAL_ARRAY */
148, /* GL_COLOR_ARRAY */
- 631, /* GL_INDEX_ARRAY */
- 1672, /* GL_TEXTURE_COORD_ARRAY */
+ 632, /* GL_INDEX_ARRAY */
+ 1677, /* GL_TEXTURE_COORD_ARRAY */
459, /* GL_EDGE_FLAG_ARRAY */
- 1814, /* GL_VERTEX_ARRAY_SIZE */
- 1816, /* GL_VERTEX_ARRAY_TYPE */
- 1815, /* GL_VERTEX_ARRAY_STRIDE */
- 1031, /* GL_NORMAL_ARRAY_TYPE */
- 1030, /* GL_NORMAL_ARRAY_STRIDE */
+ 1819, /* GL_VERTEX_ARRAY_SIZE */
+ 1821, /* GL_VERTEX_ARRAY_TYPE */
+ 1820, /* GL_VERTEX_ARRAY_STRIDE */
+ 1032, /* GL_NORMAL_ARRAY_TYPE */
+ 1031, /* GL_NORMAL_ARRAY_STRIDE */
152, /* GL_COLOR_ARRAY_SIZE */
154, /* GL_COLOR_ARRAY_TYPE */
153, /* GL_COLOR_ARRAY_STRIDE */
- 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 */
+ 637, /* GL_INDEX_ARRAY_TYPE */
+ 636, /* GL_INDEX_ARRAY_STRIDE */
+ 1681, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ 1683, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ 1682, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
463, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1813, /* GL_VERTEX_ARRAY_POINTER */
- 1029, /* GL_NORMAL_ARRAY_POINTER */
+ 1818, /* GL_VERTEX_ARRAY_POINTER */
+ 1030, /* GL_NORMAL_ARRAY_POINTER */
151, /* GL_COLOR_ARRAY_POINTER */
- 634, /* GL_INDEX_ARRAY_POINTER */
- 1675, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ 635, /* GL_INDEX_ARRAY_POINTER */
+ 1680, /* 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 */
+ 1006, /* GL_MULTISAMPLE */
+ 1404, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ 1406, /* GL_SAMPLE_ALPHA_TO_ONE */
+ 1411, /* GL_SAMPLE_COVERAGE */
+ 1408, /* GL_SAMPLE_BUFFERS */
+ 1399, /* GL_SAMPLES */
+ 1415, /* GL_SAMPLE_COVERAGE_VALUE */
+ 1413, /* GL_SAMPLE_COVERAGE_INVERT */
195, /* GL_COLOR_MATRIX */
197, /* GL_COLOR_MATRIX_STACK_DEPTH */
- 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 */
+ 866, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ 1202, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ 1198, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ 1193, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ 1189, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ 1200, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ 1196, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ 1191, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ 1187, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ 1660, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ 1279, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ 1662, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
80, /* GL_BLEND_DST_RGB */
89, /* GL_BLEND_SRC_RGB */
79, /* GL_BLEND_DST_ALPHA */
88, /* GL_BLEND_SRC_ALPHA */
201, /* GL_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 */
+ 1212, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ 1195, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1267, /* GL_PROXY_COLOR_TABLE */
+ 1271, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ 1270, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
225, /* GL_COLOR_TABLE_SCALE */
205, /* GL_COLOR_TABLE_BIAS */
210, /* GL_COLOR_TABLE_FORMAT */
@@ -4415,62 +4426,62 @@ static const unsigned reduced_enums[1346] =
216, /* GL_COLOR_TABLE_INTENSITY_SIZE */
71, /* GL_BGR */
72, /* GL_BGRA */
- 879, /* GL_MAX_ELEMENTS_VERTICES */
- 878, /* GL_MAX_ELEMENTS_INDICES */
- 1710, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 880, /* GL_MAX_ELEMENTS_VERTICES */
+ 879, /* GL_MAX_ELEMENTS_INDICES */
+ 1715, /* GL_TEXTURE_INDEX_SIZE_EXT */
145, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- 1158, /* GL_POINT_SIZE_MIN */
- 1154, /* GL_POINT_SIZE_MAX */
- 1148, /* GL_POINT_FADE_THRESHOLD_SIZE */
- 1144, /* GL_POINT_DISTANCE_ATTENUATION */
+ 1159, /* GL_POINT_SIZE_MIN */
+ 1155, /* GL_POINT_SIZE_MAX */
+ 1149, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1145, /* GL_POINT_DISTANCE_ATTENUATION */
127, /* GL_CLAMP_TO_BORDER */
130, /* GL_CLAMP_TO_EDGE */
- 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 */
+ 1736, /* GL_TEXTURE_MIN_LOD */
+ 1734, /* GL_TEXTURE_MAX_LOD */
+ 1639, /* GL_TEXTURE_BASE_LEVEL */
+ 1733, /* GL_TEXTURE_MAX_LEVEL */
+ 625, /* GL_IGNORE_BORDER_HP */
276, /* GL_CONSTANT_BORDER_HP */
- 1341, /* GL_REPLICATE_BORDER_HP */
+ 1346, /* GL_REPLICATE_BORDER_HP */
282, /* GL_CONVOLUTION_BORDER_COLOR */
- 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 */
+ 1056, /* GL_OCCLUSION_TEST_HP */
+ 1057, /* GL_OCCLUSION_TEST_RESULT_HP */
+ 698, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ 1654, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ 1656, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ 1658, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ 1659, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1657, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ 1655, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ 861, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ 862, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1222, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ 1224, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ 1221, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ 1223, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ 1723, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ 1724, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ 1722, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
594, /* GL_GENERATE_MIPMAP */
595, /* GL_GENERATE_MIPMAP_HINT */
532, /* GL_FOG_OFFSET_SGIX */
533, /* GL_FOG_OFFSET_VALUE_SGIX */
- 1663, /* GL_TEXTURE_COMPARE_SGIX */
- 1662, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- 1714, /* GL_TEXTURE_LEQUAL_R_SGIX */
- 1706, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ 1668, /* GL_TEXTURE_COMPARE_SGIX */
+ 1667, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ 1719, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ 1711, /* GL_TEXTURE_GEQUAL_R_SGIX */
360, /* GL_DEPTH_COMPONENT16 */
363, /* GL_DEPTH_COMPONENT24 */
366, /* GL_DEPTH_COMPONENT32 */
306, /* GL_CULL_VERTEX_EXT */
308, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
307, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 1871, /* 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 */
+ 1876, /* GL_WRAP_BORDER_SUN */
+ 1661, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ 691, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ 1445, /* GL_SINGLE_COLOR */
+ 1431, /* GL_SEPARATE_SPECULAR_COLOR */
+ 1440, /* GL_SHARED_TEXTURE_PALETTE_EXT */
543, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
544, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
551, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
@@ -4482,31 +4493,31 @@ static const unsigned reduced_enums[1346] =
564, /* GL_FRAMEBUFFER_DEFAULT */
580, /* GL_FRAMEBUFFER_UNDEFINED */
373, /* GL_DEPTH_STENCIL_ATTACHMENT */
- 630, /* GL_INDEX */
- 1780, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1796, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1797, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1794, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1792, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1789, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1787, /* 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 */
+ 631, /* GL_INDEX */
+ 1785, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 1801, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 1802, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 1799, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 1797, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 1794, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 1792, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 1731, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ 1732, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ 1730, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ 957, /* GL_MIRRORED_REPEAT */
+ 1387, /* GL_RGB_S3TC */
+ 1362, /* GL_RGB4_S3TC */
+ 1385, /* GL_RGBA_S3TC */
+ 1379, /* GL_RGBA4_S3TC */
+ 1383, /* GL_RGBA_DXT5_S3TC */
+ 1377, /* GL_RGBA4_DXT5_S3TC */
264, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
259, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
260, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
261, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
- 1017, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- 1016, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- 698, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ 1018, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ 1017, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ 699, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
519, /* GL_FOG_COORDINATE_SOURCE */
511, /* GL_FOG_COORD */
535, /* GL_FRAGMENT_DEPTH */
@@ -4517,278 +4528,278 @@ static const unsigned reduced_enums[1346] =
513, /* GL_FOG_COORDINATE_ARRAY */
199, /* GL_COLOR_SUM */
332, /* GL_CURRENT_SECONDARY_COLOR */
- 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 */
+ 1424, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ 1426, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ 1425, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ 1423, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ 1420, /* GL_SECONDARY_COLOR_ARRAY */
330, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
28, /* GL_ALIASED_POINT_SIZE_RANGE */
27, /* GL_ALIASED_LINE_WIDTH_RANGE */
- 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 */
+ 1568, /* GL_TEXTURE0 */
+ 1570, /* GL_TEXTURE1 */
+ 1592, /* GL_TEXTURE2 */
+ 1614, /* GL_TEXTURE3 */
+ 1620, /* GL_TEXTURE4 */
+ 1622, /* GL_TEXTURE5 */
+ 1624, /* GL_TEXTURE6 */
+ 1626, /* GL_TEXTURE7 */
+ 1628, /* GL_TEXTURE8 */
+ 1630, /* GL_TEXTURE9 */
+ 1571, /* GL_TEXTURE10 */
+ 1573, /* GL_TEXTURE11 */
+ 1575, /* GL_TEXTURE12 */
+ 1577, /* GL_TEXTURE13 */
+ 1579, /* GL_TEXTURE14 */
+ 1581, /* GL_TEXTURE15 */
+ 1583, /* GL_TEXTURE16 */
+ 1585, /* GL_TEXTURE17 */
+ 1587, /* GL_TEXTURE18 */
+ 1589, /* GL_TEXTURE19 */
+ 1593, /* GL_TEXTURE20 */
+ 1595, /* GL_TEXTURE21 */
+ 1597, /* GL_TEXTURE22 */
+ 1599, /* GL_TEXTURE23 */
+ 1601, /* GL_TEXTURE24 */
+ 1603, /* GL_TEXTURE25 */
+ 1605, /* GL_TEXTURE26 */
+ 1607, /* GL_TEXTURE27 */
+ 1609, /* GL_TEXTURE28 */
+ 1611, /* GL_TEXTURE29 */
+ 1615, /* GL_TEXTURE30 */
+ 1617, /* GL_TEXTURE31 */
18, /* GL_ACTIVE_TEXTURE */
133, /* GL_CLIENT_ACTIVE_TEXTURE */
- 934, /* GL_MAX_TEXTURE_UNITS */
- 1758, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1761, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1763, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1755, /* GL_TRANSPOSE_COLOR_MATRIX */
- 1545, /* GL_SUBTRACT */
- 919, /* GL_MAX_RENDERBUFFER_SIZE */
+ 935, /* GL_MAX_TEXTURE_UNITS */
+ 1763, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 1766, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 1768, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 1760, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1550, /* GL_SUBTRACT */
+ 920, /* GL_MAX_RENDERBUFFER_SIZE */
247, /* GL_COMPRESSED_ALPHA */
251, /* GL_COMPRESSED_LUMINANCE */
252, /* GL_COMPRESSED_LUMINANCE_ALPHA */
249, /* GL_COMPRESSED_INTENSITY */
255, /* GL_COMPRESSED_RGB */
256, /* GL_COMPRESSED_RGBA */
- 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 */
+ 1675, /* GL_TEXTURE_COMPRESSION_HINT */
+ 1740, /* GL_TEXTURE_RECTANGLE_ARB */
+ 1647, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ 1282, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ 918, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
372, /* GL_DEPTH_STENCIL */
- 1784, /* 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 */
+ 1789, /* GL_UNSIGNED_INT_24_8 */
+ 931, /* GL_MAX_TEXTURE_LOD_BIAS */
+ 1729, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ 932, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1705, /* GL_TEXTURE_FILTER_CONTROL */
+ 1720, /* GL_TEXTURE_LOD_BIAS */
232, /* GL_COMBINE4 */
- 924, /* GL_MAX_SHININESS_NV */
- 925, /* GL_MAX_SPOT_EXPONENT_NV */
- 628, /* GL_INCR_WRAP */
+ 925, /* GL_MAX_SHININESS_NV */
+ 926, /* GL_MAX_SPOT_EXPONENT_NV */
+ 629, /* GL_INCR_WRAP */
343, /* GL_DECR_WRAP */
- 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 */
+ 977, /* GL_MODELVIEW1_ARB */
+ 1033, /* GL_NORMAL_MAP */
+ 1319, /* GL_REFLECTION_MAP */
+ 1684, /* GL_TEXTURE_CUBE_MAP */
+ 1645, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ 1692, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ 1686, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ 1694, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ 1688, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ 1696, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ 1690, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ 1280, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ 874, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ 1012, /* GL_MULTISAMPLE_FILTER_HINT_NV */
527, /* GL_FOG_DISTANCE_MODE_NV */
478, /* GL_EYE_RADIAL_NV */
477, /* GL_EYE_PLANE_ABSOLUTE_NV */
231, /* GL_COMBINE */
238, /* GL_COMBINE_RGB */
233, /* GL_COMBINE_ALPHA */
- 1383, /* GL_RGB_SCALE */
+ 1388, /* GL_RGB_SCALE */
24, /* GL_ADD_SIGNED */
- 656, /* GL_INTERPOLATE */
+ 657, /* GL_INTERPOLATE */
271, /* GL_CONSTANT */
- 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 */
- 1809, /* GL_VERTEX_ARRAY_BINDING */
- 1733, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- 1734, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 1875, /* GL_YCBCR_422_APPLE */
- 1798, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1800, /* 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 */
- 1767, /* GL_TRIANGLE_MESH_SUN */
- 1848, /* GL_VERTEX_PROGRAM_ARB */
- 1859, /* GL_VERTEX_STATE_PROGRAM_NV */
- 1835, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 1841, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 1843, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 1845, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 1228, /* GL_PRIMARY_COLOR */
+ 1225, /* GL_PREVIOUS */
+ 1460, /* GL_SOURCE0_RGB */
+ 1466, /* GL_SOURCE1_RGB */
+ 1472, /* GL_SOURCE2_RGB */
+ 1476, /* GL_SOURCE3_RGB_NV */
+ 1457, /* GL_SOURCE0_ALPHA */
+ 1463, /* GL_SOURCE1_ALPHA */
+ 1469, /* GL_SOURCE2_ALPHA */
+ 1475, /* GL_SOURCE3_ALPHA_NV */
+ 1070, /* GL_OPERAND0_RGB */
+ 1076, /* GL_OPERAND1_RGB */
+ 1082, /* GL_OPERAND2_RGB */
+ 1086, /* GL_OPERAND3_RGB_NV */
+ 1067, /* GL_OPERAND0_ALPHA */
+ 1073, /* GL_OPERAND1_ALPHA */
+ 1079, /* GL_OPERAND2_ALPHA */
+ 1085, /* GL_OPERAND3_ALPHA_NV */
+ 1814, /* GL_VERTEX_ARRAY_BINDING */
+ 1738, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ 1739, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ 1880, /* GL_YCBCR_422_APPLE */
+ 1803, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 1805, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 1748, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ 1541, /* GL_STORAGE_PRIVATE_APPLE */
+ 1540, /* GL_STORAGE_CACHED_APPLE */
+ 1542, /* GL_STORAGE_SHARED_APPLE */
+ 1447, /* GL_SLICE_ACCUM_SUN */
+ 1289, /* GL_QUAD_MESH_SUN */
+ 1772, /* GL_TRIANGLE_MESH_SUN */
+ 1853, /* GL_VERTEX_PROGRAM_ARB */
+ 1864, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 1840, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 1846, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 1848, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 1850, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
334, /* GL_CURRENT_VERTEX_ATTRIB */
- 1240, /* GL_PROGRAM_LENGTH_ARB */
- 1254, /* GL_PROGRAM_STRING_ARB */
- 998, /* GL_MODELVIEW_PROJECTION_NV */
- 623, /* GL_IDENTITY_NV */
- 670, /* GL_INVERSE_NV */
- 1760, /* 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 */
+ 1241, /* GL_PROGRAM_LENGTH_ARB */
+ 1255, /* GL_PROGRAM_STRING_ARB */
+ 999, /* GL_MODELVIEW_PROJECTION_NV */
+ 624, /* GL_IDENTITY_NV */
+ 671, /* GL_INVERSE_NV */
+ 1765, /* GL_TRANSPOSE_NV */
+ 672, /* GL_INVERSE_TRANSPOSE_NV */
+ 904, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ 903, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ 810, /* GL_MATRIX0_NV */
+ 822, /* GL_MATRIX1_NV */
+ 834, /* GL_MATRIX2_NV */
+ 838, /* GL_MATRIX3_NV */
+ 840, /* GL_MATRIX4_NV */
+ 842, /* GL_MATRIX5_NV */
+ 844, /* GL_MATRIX6_NV */
+ 846, /* GL_MATRIX7_NV */
318, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
315, /* GL_CURRENT_MATRIX_ARB */
- 1851, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- 1854, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- 1252, /* GL_PROGRAM_PARAMETER_NV */
- 1839, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- 1256, /* GL_PROGRAM_TARGET_NV */
- 1253, /* GL_PROGRAM_RESIDENT_NV */
- 1752, /* GL_TRACK_MATRIX_NV */
- 1753, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 1849, /* GL_VERTEX_PROGRAM_BINDING_NV */
- 1234, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ 1856, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ 1859, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1253, /* GL_PROGRAM_PARAMETER_NV */
+ 1844, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1257, /* GL_PROGRAM_TARGET_NV */
+ 1254, /* GL_PROGRAM_RESIDENT_NV */
+ 1757, /* GL_TRACK_MATRIX_NV */
+ 1758, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 1854, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1235, /* GL_PROGRAM_ERROR_POSITION_ARB */
356, /* GL_DEPTH_CLAMP */
- 1817, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 1824, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 1825, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 1826, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 1827, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 1828, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 1829, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 1830, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 1831, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 1832, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1818, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1819, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1820, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1821, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1822, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 1823, /* 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 */
+ 1822, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 1829, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 1830, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 1831, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 1832, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 1833, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 1834, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 1835, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 1836, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 1837, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 1823, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 1824, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 1825, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 1826, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 1827, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 1828, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 758, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ 765, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ 766, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ 767, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ 768, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ 769, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ 770, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ 771, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ 772, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ 773, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ 759, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ 760, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ 761, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ 762, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ 763, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ 764, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ 785, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ 792, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ 793, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ 794, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ 795, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ 796, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ 797, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ 1234, /* GL_PROGRAM_BINDING_ARB */
+ 799, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ 800, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ 786, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ 787, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ 788, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ 789, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ 790, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ 791, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ 1673, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ 1670, /* GL_TEXTURE_COMPRESSED */
+ 1038, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
269, /* GL_COMPRESSED_TEXTURE_FORMATS */
- 946, /* GL_MAX_VERTEX_UNITS_ARB */
+ 947, /* GL_MAX_VERTEX_UNITS_ARB */
22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 1870, /* GL_WEIGHT_SUM_UNITY_ARB */
- 1847, /* GL_VERTEX_BLEND_ARB */
+ 1875, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 1852, /* GL_VERTEX_BLEND_ARB */
336, /* GL_CURRENT_WEIGHT_ARB */
- 1869, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 1868, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 1867, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 1866, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 1863, /* GL_WEIGHT_ARRAY_ARB */
+ 1874, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 1873, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 1872, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 1871, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 1868, /* GL_WEIGHT_ARRAY_ARB */
386, /* GL_DOT3_RGB */
387, /* GL_DOT3_RGBA */
263, /* GL_COMPRESSED_RGB_FXT1_3DFX */
258, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- 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 */
+ 1007, /* GL_MULTISAMPLE_3DFX */
+ 1409, /* GL_SAMPLE_BUFFERS_3DFX */
+ 1400, /* GL_SAMPLES_3DFX */
+ 988, /* GL_MODELVIEW2_ARB */
+ 991, /* GL_MODELVIEW3_ARB */
+ 992, /* GL_MODELVIEW4_ARB */
+ 993, /* GL_MODELVIEW5_ARB */
+ 994, /* GL_MODELVIEW6_ARB */
+ 995, /* GL_MODELVIEW7_ARB */
+ 996, /* GL_MODELVIEW8_ARB */
+ 997, /* GL_MODELVIEW9_ARB */
+ 967, /* GL_MODELVIEW10_ARB */
+ 968, /* GL_MODELVIEW11_ARB */
+ 969, /* GL_MODELVIEW12_ARB */
+ 970, /* GL_MODELVIEW13_ARB */
+ 971, /* GL_MODELVIEW14_ARB */
+ 972, /* GL_MODELVIEW15_ARB */
+ 973, /* GL_MODELVIEW16_ARB */
+ 974, /* GL_MODELVIEW17_ARB */
+ 975, /* GL_MODELVIEW18_ARB */
+ 976, /* GL_MODELVIEW19_ARB */
+ 978, /* GL_MODELVIEW20_ARB */
+ 979, /* GL_MODELVIEW21_ARB */
+ 980, /* GL_MODELVIEW22_ARB */
+ 981, /* GL_MODELVIEW23_ARB */
+ 982, /* GL_MODELVIEW24_ARB */
+ 983, /* GL_MODELVIEW25_ARB */
+ 984, /* GL_MODELVIEW26_ARB */
+ 985, /* GL_MODELVIEW27_ARB */
+ 986, /* GL_MODELVIEW28_ARB */
+ 987, /* GL_MODELVIEW29_ARB */
+ 989, /* GL_MODELVIEW30_ARB */
+ 990, /* GL_MODELVIEW31_ARB */
391, /* GL_DOT3_RGB_EXT */
389, /* GL_DOT3_RGBA_EXT */
- 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 */
- 1876, /* GL_YCBCR_MESA */
- 1093, /* GL_PACK_INVERT_MESA */
+ 961, /* GL_MIRROR_CLAMP_EXT */
+ 964, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ 1002, /* GL_MODULATE_ADD_ATI */
+ 1003, /* GL_MODULATE_SIGNED_ADD_ATI */
+ 1004, /* GL_MODULATE_SUBTRACT_ATI */
+ 1881, /* GL_YCBCR_MESA */
+ 1094, /* GL_PACK_INVERT_MESA */
339, /* GL_DEBUG_OBJECT_MESA */
340, /* GL_DEBUG_PRINT_MESA */
338, /* GL_DEBUG_ASSERT_MESA */
@@ -4802,24 +4813,24 @@ static const unsigned reduced_enums[1346] =
450, /* GL_DU8DV8_ATI */
114, /* GL_BUMP_ENVMAP_ATI */
118, /* GL_BUMP_TARGET_ATI */
- 1503, /* GL_STENCIL_BACK_FUNC */
- 1501, /* GL_STENCIL_BACK_FAIL */
- 1505, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- 1507, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ 1508, /* GL_STENCIL_BACK_FUNC */
+ 1506, /* GL_STENCIL_BACK_FAIL */
+ 1510, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ 1512, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
536, /* GL_FRAGMENT_PROGRAM_ARB */
- 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 */
+ 1232, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1260, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1259, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1244, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1250, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1249, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 893, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 916, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 915, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 906, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 912, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 911, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 876, /* GL_MAX_DRAW_BUFFERS */
395, /* GL_DRAW_BUFFER0 */
398, /* GL_DRAW_BUFFER1 */
419, /* GL_DRAW_BUFFER2 */
@@ -4837,161 +4848,161 @@ static const unsigned reduced_enums[1346] =
411, /* GL_DRAW_BUFFER14 */
414, /* GL_DRAW_BUFFER15 */
82, /* GL_BLEND_EQUATION_ALPHA */
- 854, /* GL_MATRIX_PALETTE_ARB */
- 886, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- 889, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 855, /* GL_MATRIX_PALETTE_ARB */
+ 887, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 890, /* GL_MAX_PALETTE_MATRICES_ARB */
321, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- 848, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 849, /* GL_MATRIX_INDEX_ARRAY_ARB */
316, /* GL_CURRENT_MATRIX_INDEX_ARB */
- 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 */
+ 851, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ 853, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ 852, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ 850, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ 1700, /* GL_TEXTURE_DEPTH_SIZE */
379, /* GL_DEPTH_TEXTURE_MODE */
- 1660, /* GL_TEXTURE_COMPARE_MODE */
- 1658, /* GL_TEXTURE_COMPARE_FUNC */
+ 1665, /* GL_TEXTURE_COMPARE_MODE */
+ 1663, /* GL_TEXTURE_COMPARE_FUNC */
242, /* GL_COMPARE_R_TO_TEXTURE */
- 1165, /* GL_POINT_SPRITE */
+ 1166, /* GL_POINT_SPRITE */
296, /* GL_COORD_REPLACE */
- 1169, /* GL_POINT_SPRITE_R_MODE_NV */
- 1290, /* GL_QUERY_COUNTER_BITS */
+ 1170, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1293, /* GL_QUERY_COUNTER_BITS */
323, /* GL_CURRENT_QUERY */
- 1292, /* GL_QUERY_RESULT */
- 1294, /* GL_QUERY_RESULT_AVAILABLE */
- 940, /* GL_MAX_VERTEX_ATTRIBS */
- 1837, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 1296, /* GL_QUERY_RESULT */
+ 1298, /* GL_QUERY_RESULT_AVAILABLE */
+ 941, /* GL_MAX_VERTEX_ATTRIBS */
+ 1842, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
377, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
376, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- 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 */
+ 927, /* GL_MAX_TEXTURE_COORDS */
+ 929, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ 1237, /* GL_PROGRAM_ERROR_STRING_ARB */
+ 1239, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ 1238, /* GL_PROGRAM_FORMAT_ARB */
+ 1750, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
354, /* GL_DEPTH_BOUNDS_TEST_EXT */
353, /* GL_DEPTH_BOUNDS_EXT */
53, /* GL_ARRAY_BUFFER */
464, /* GL_ELEMENT_ARRAY_BUFFER */
54, /* GL_ARRAY_BUFFER_BINDING */
465, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1811, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- 1027, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 1816, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1028, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
149, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- 632, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- 1673, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ 633, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ 1678, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
460, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- 1416, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ 1421, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
514, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 1864, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 1833, /* 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 */
- 1757, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- 1304, /* GL_READ_ONLY */
- 1872, /* GL_WRITE_ONLY */
- 1306, /* GL_READ_WRITE */
+ 1869, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 1838, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1240, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ 899, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ 1246, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 908, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1258, /* GL_PROGRAM_TEMPORARIES_ARB */
+ 914, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ 1248, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 910, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1252, /* GL_PROGRAM_PARAMETERS_ARB */
+ 913, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ 1247, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 909, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1233, /* GL_PROGRAM_ATTRIBS_ARB */
+ 894, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ 1245, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 907, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1231, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 892, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1243, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 905, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 900, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ 896, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ 1261, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ 1762, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1309, /* GL_READ_ONLY */
+ 1877, /* GL_WRITE_ONLY */
+ 1311, /* GL_READ_WRITE */
102, /* GL_BUFFER_ACCESS */
105, /* GL_BUFFER_MAPPED */
107, /* GL_BUFFER_MAP_POINTER */
- 1751, /* 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 */
+ 1756, /* GL_TIME_ELAPSED_EXT */
+ 809, /* GL_MATRIX0_ARB */
+ 821, /* GL_MATRIX1_ARB */
+ 833, /* GL_MATRIX2_ARB */
+ 837, /* GL_MATRIX3_ARB */
+ 839, /* GL_MATRIX4_ARB */
+ 841, /* GL_MATRIX5_ARB */
+ 843, /* GL_MATRIX6_ARB */
+ 845, /* GL_MATRIX7_ARB */
+ 847, /* GL_MATRIX8_ARB */
+ 848, /* GL_MATRIX9_ARB */
+ 811, /* GL_MATRIX10_ARB */
+ 812, /* GL_MATRIX11_ARB */
+ 813, /* GL_MATRIX12_ARB */
+ 814, /* GL_MATRIX13_ARB */
+ 815, /* GL_MATRIX14_ARB */
+ 816, /* GL_MATRIX15_ARB */
+ 817, /* GL_MATRIX16_ARB */
+ 818, /* GL_MATRIX17_ARB */
+ 819, /* GL_MATRIX18_ARB */
+ 820, /* GL_MATRIX19_ARB */
+ 823, /* GL_MATRIX20_ARB */
+ 824, /* GL_MATRIX21_ARB */
+ 825, /* GL_MATRIX22_ARB */
+ 826, /* GL_MATRIX23_ARB */
+ 827, /* GL_MATRIX24_ARB */
+ 828, /* GL_MATRIX25_ARB */
+ 829, /* GL_MATRIX26_ARB */
+ 830, /* GL_MATRIX27_ARB */
+ 831, /* GL_MATRIX28_ARB */
+ 832, /* GL_MATRIX29_ARB */
+ 835, /* GL_MATRIX30_ARB */
+ 836, /* GL_MATRIX31_ARB */
+ 1545, /* GL_STREAM_DRAW */
+ 1547, /* GL_STREAM_READ */
+ 1543, /* GL_STREAM_COPY */
+ 1499, /* GL_STATIC_DRAW */
+ 1501, /* GL_STATIC_READ */
+ 1497, /* GL_STATIC_COPY */
454, /* GL_DYNAMIC_DRAW */
456, /* GL_DYNAMIC_READ */
452, /* GL_DYNAMIC_COPY */
- 1133, /* GL_PIXEL_PACK_BUFFER */
- 1137, /* GL_PIXEL_UNPACK_BUFFER */
- 1134, /* GL_PIXEL_PACK_BUFFER_BINDING */
- 1138, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 1134, /* GL_PIXEL_PACK_BUFFER */
+ 1138, /* GL_PIXEL_UNPACK_BUFFER */
+ 1135, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ 1139, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
347, /* GL_DEPTH24_STENCIL8 */
- 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 */
+ 1746, /* GL_TEXTURE_STENCIL_SIZE */
+ 1698, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ 895, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ 898, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ 902, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ 901, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ 858, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ 1536, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
17, /* GL_ACTIVE_STENCIL_FACE_EXT */
- 961, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- 1397, /* GL_SAMPLES_PASSED */
+ 962, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1402, /* GL_SAMPLES_PASSED */
109, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
104, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
537, /* GL_FRAGMENT_SHADER */
- 1857, /* 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 */
+ 1862, /* GL_VERTEX_SHADER */
+ 1251, /* GL_PROGRAM_OBJECT_ARB */
+ 1434, /* GL_SHADER_OBJECT_ARB */
+ 883, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ 945, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ 939, /* GL_MAX_VARYING_FLOATS */
+ 943, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ 868, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ 1054, /* GL_OBJECT_TYPE_ARB */
+ 1436, /* GL_SHADER_TYPE */
502, /* GL_FLOAT_VEC2 */
504, /* GL_FLOAT_VEC3 */
506, /* GL_FLOAT_VEC4 */
- 659, /* GL_INT_VEC2 */
- 661, /* GL_INT_VEC3 */
- 663, /* GL_INT_VEC4 */
+ 660, /* GL_INT_VEC2 */
+ 662, /* GL_INT_VEC3 */
+ 664, /* GL_INT_VEC4 */
94, /* GL_BOOL */
96, /* GL_BOOL_VEC2 */
98, /* GL_BOOL_VEC3 */
@@ -4999,12 +5010,12 @@ static const unsigned reduced_enums[1346] =
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 */
+ 1393, /* GL_SAMPLER_1D */
+ 1395, /* GL_SAMPLER_2D */
+ 1397, /* GL_SAMPLER_3D */
+ 1398, /* GL_SAMPLER_CUBE */
+ 1394, /* GL_SAMPLER_1D_SHADOW */
+ 1396, /* GL_SAMPLER_2D_SHADOW */
492, /* GL_FLOAT_MAT2x3 */
493, /* GL_FLOAT_MAT2x4 */
496, /* GL_FLOAT_MAT3x2 */
@@ -5013,61 +5024,61 @@ static const unsigned reduced_enums[1346] =
501, /* GL_FLOAT_MAT4x3 */
345, /* GL_DELETE_STATUS */
246, /* GL_COMPILE_STATUS */
- 715, /* GL_LINK_STATUS */
- 1805, /* GL_VALIDATE_STATUS */
- 644, /* GL_INFO_LOG_LENGTH */
+ 716, /* GL_LINK_STATUS */
+ 1810, /* GL_VALIDATE_STATUS */
+ 645, /* GL_INFO_LOG_LENGTH */
56, /* GL_ATTACHED_SHADERS */
20, /* GL_ACTIVE_UNIFORMS */
21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- 1430, /* GL_SHADER_SOURCE_LENGTH */
+ 1435, /* GL_SHADER_SOURCE_LENGTH */
15, /* GL_ACTIVE_ATTRIBUTES */
16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
539, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- 1433, /* GL_SHADING_LANGUAGE_VERSION */
+ 1438, /* GL_SHADING_LANGUAGE_VERSION */
322, /* GL_CURRENT_PROGRAM */
- 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 */
- 1790, /* 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 */
+ 1103, /* GL_PALETTE4_RGB8_OES */
+ 1105, /* GL_PALETTE4_RGBA8_OES */
+ 1101, /* GL_PALETTE4_R5_G6_B5_OES */
+ 1104, /* GL_PALETTE4_RGBA4_OES */
+ 1102, /* GL_PALETTE4_RGB5_A1_OES */
+ 1108, /* GL_PALETTE8_RGB8_OES */
+ 1110, /* GL_PALETTE8_RGBA8_OES */
+ 1106, /* GL_PALETTE8_R5_G6_B5_OES */
+ 1109, /* GL_PALETTE8_RGBA4_OES */
+ 1107, /* GL_PALETTE8_RGB5_A1_OES */
+ 627, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ 626, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ 1795, /* GL_UNSIGNED_NORMALIZED */
+ 1633, /* GL_TEXTURE_1D_ARRAY_EXT */
+ 1273, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ 1635, /* GL_TEXTURE_2D_ARRAY_EXT */
+ 1276, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ 1641, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ 1643, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ 1491, /* GL_SRGB */
+ 1492, /* GL_SRGB8 */
+ 1494, /* GL_SRGB_ALPHA */
+ 1493, /* GL_SRGB8_ALPHA8 */
+ 1451, /* GL_SLUMINANCE_ALPHA */
+ 1450, /* GL_SLUMINANCE8_ALPHA8 */
+ 1448, /* GL_SLUMINANCE */
+ 1449, /* GL_SLUMINANCE8 */
267, /* GL_COMPRESSED_SRGB */
268, /* GL_COMPRESSED_SRGB_ALPHA */
265, /* GL_COMPRESSED_SLUMINANCE */
266, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- 1167, /* GL_POINT_SPRITE_COORD_ORIGIN */
- 723, /* GL_LOWER_LEFT */
- 1802, /* GL_UPPER_LEFT */
- 1509, /* GL_STENCIL_BACK_REF */
- 1510, /* GL_STENCIL_BACK_VALUE_MASK */
- 1511, /* GL_STENCIL_BACK_WRITEMASK */
+ 1168, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ 724, /* GL_LOWER_LEFT */
+ 1807, /* GL_UPPER_LEFT */
+ 1514, /* GL_STENCIL_BACK_REF */
+ 1515, /* GL_STENCIL_BACK_VALUE_MASK */
+ 1516, /* GL_STENCIL_BACK_WRITEMASK */
444, /* GL_DRAW_FRAMEBUFFER_BINDING */
- 1320, /* GL_RENDERBUFFER_BINDING */
- 1300, /* GL_READ_FRAMEBUFFER */
+ 1325, /* GL_RENDERBUFFER_BINDING */
+ 1305, /* GL_READ_FRAMEBUFFER */
443, /* GL_DRAW_FRAMEBUFFER */
- 1301, /* GL_READ_FRAMEBUFFER_BINDING */
- 1331, /* GL_RENDERBUFFER_SAMPLES */
+ 1306, /* GL_READ_FRAMEBUFFER_BINDING */
+ 1336, /* GL_RENDERBUFFER_SAMPLES */
549, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
547, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
558, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
@@ -5083,7 +5094,7 @@ static const unsigned reduced_enums[1346] =
577, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
581, /* GL_FRAMEBUFFER_UNSUPPORTED */
579, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- 863, /* GL_MAX_COLOR_ATTACHMENTS */
+ 864, /* GL_MAX_COLOR_ATTACHMENTS */
155, /* GL_COLOR_ATTACHMENT0 */
157, /* GL_COLOR_ATTACHMENT1 */
171, /* GL_COLOR_ATTACHMENT2 */
@@ -5101,54 +5112,58 @@ static const unsigned reduced_enums[1346] =
166, /* GL_COLOR_ATTACHMENT14 */
168, /* GL_COLOR_ATTACHMENT15 */
349, /* GL_DEPTH_ATTACHMENT */
- 1499, /* GL_STENCIL_ATTACHMENT */
+ 1504, /* 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 */
+ 1323, /* GL_RENDERBUFFER */
+ 1339, /* GL_RENDERBUFFER_WIDTH */
+ 1331, /* GL_RENDERBUFFER_HEIGHT */
+ 1333, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ 1531, /* GL_STENCIL_INDEX_EXT */
+ 1523, /* GL_STENCIL_INDEX1 */
+ 1527, /* GL_STENCIL_INDEX4 */
+ 1529, /* GL_STENCIL_INDEX8 */
+ 1524, /* GL_STENCIL_INDEX16 */
+ 1335, /* GL_RENDERBUFFER_RED_SIZE */
+ 1330, /* GL_RENDERBUFFER_GREEN_SIZE */
+ 1327, /* GL_RENDERBUFFER_BLUE_SIZE */
+ 1324, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ 1328, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ 1338, /* GL_RENDERBUFFER_STENCIL_SIZE */
575, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- 921, /* GL_MAX_SAMPLES */
- 1286, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ 922, /* GL_MAX_SAMPLES */
+ 1300, /* GL_QUERY_WAIT_NV */
+ 1295, /* GL_QUERY_NO_WAIT_NV */
+ 1292, /* GL_QUERY_BY_REGION_WAIT_NV */
+ 1291, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ 1287, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
486, /* GL_FIRST_VERTEX_CONVENTION */
- 674, /* GL_LAST_VERTEX_CONVENTION */
- 1264, /* GL_PROVOKING_VERTEX */
+ 675, /* GL_LAST_VERTEX_CONVENTION */
+ 1265, /* GL_PROVOKING_VERTEX */
302, /* GL_COPY_READ_BUFFER */
303, /* GL_COPY_WRITE_BUFFER */
- 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 */
- 1778, /* GL_UNSIGNALED */
- 1438, /* GL_SIGNALED */
+ 1386, /* GL_RGBA_SNORM */
+ 1382, /* GL_RGBA8_SNORM */
+ 1444, /* GL_SIGNED_NORMALIZED */
+ 924, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ 1053, /* GL_OBJECT_TYPE */
+ 1552, /* GL_SYNC_CONDITION */
+ 1557, /* GL_SYNC_STATUS */
+ 1554, /* GL_SYNC_FLAGS */
+ 1553, /* GL_SYNC_FENCE */
+ 1556, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ 1783, /* GL_UNSIGNALED */
+ 1443, /* GL_SIGNALED */
46, /* GL_ALREADY_SIGNALED */
- 1750, /* GL_TIMEOUT_EXPIRED */
+ 1755, /* GL_TIMEOUT_EXPIRED */
270, /* GL_CONDITION_SATISFIED */
- 1862, /* GL_WAIT_FAILED */
+ 1867, /* 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 */
+ 1303, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ 718, /* GL_LIST_BIT */
+ 1649, /* GL_TEXTURE_BIT */
+ 1417, /* GL_SCISSOR_BIT */
29, /* GL_ALL_ATTRIB_BITS */
- 1008, /* GL_MULTISAMPLE_BIT */
+ 1009, /* GL_MULTISAMPLE_BIT */
30, /* GL_ALL_CLIENT_ATTRIB_BITS */
};
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 2138bfe40ef..73be24d80cf 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -50,11 +50,13 @@ static const struct {
{ OFF, "GL_ARB_depth_clamp", F(ARB_depth_clamp) },
{ ON, "GL_ARB_draw_buffers", F(ARB_draw_buffers) },
{ OFF, "GL_ARB_draw_elements_base_vertex", F(ARB_draw_elements_base_vertex) },
+ { OFF, "GL_ARB_fragment_coord_conventions", F(ARB_fragment_coord_conventions) },
{ OFF, "GL_ARB_fragment_program", F(ARB_fragment_program) },
{ OFF, "GL_ARB_fragment_program_shadow", F(ARB_fragment_program_shadow) },
{ OFF, "GL_ARB_fragment_shader", F(ARB_fragment_shader) },
{ OFF, "GL_ARB_framebuffer_object", F(ARB_framebuffer_object) },
{ OFF, "GL_ARB_half_float_pixel", F(ARB_half_float_pixel) },
+ { OFF, "GL_ARB_half_float_vertex", F(ARB_half_float_vertex) },
{ OFF, "GL_ARB_imaging", F(ARB_imaging) },
{ OFF, "GL_ARB_map_buffer_range", F(ARB_map_buffer_range) },
{ ON, "GL_ARB_multisample", F(ARB_multisample) },
@@ -103,6 +105,7 @@ static const struct {
{ OFF, "GL_EXT_convolution", F(EXT_convolution) },
{ ON, "GL_EXT_copy_texture", F(EXT_copy_texture) },
{ OFF, "GL_EXT_depth_bounds_test", F(EXT_depth_bounds_test) },
+ { OFF, "GL_EXT_draw_buffers2", F(EXT_draw_buffers2) },
{ ON, "GL_EXT_draw_range_elements", F(EXT_draw_range_elements) },
{ OFF, "GL_EXT_framebuffer_blit", F(EXT_framebuffer_blit) },
{ OFF, "GL_EXT_framebuffer_multisample", F(EXT_framebuffer_multisample) },
@@ -166,6 +169,7 @@ static const struct {
{ OFF, "GL_MESA_ycbcr_texture", F(MESA_ycbcr_texture) },
{ ON, "GL_MESA_window_pos", F(ARB_window_pos) },
{ OFF, "GL_NV_blend_square", F(NV_blend_square) },
+ { OFF, "GL_NV_conditional_render", F(NV_conditional_render) },
{ OFF, "GL_NV_depth_clamp", F(ARB_depth_clamp) },
{ OFF, "GL_NV_fragment_program", F(NV_fragment_program) },
{ OFF, "GL_NV_fragment_program_option", F(NV_fragment_program_option) },
@@ -187,6 +191,9 @@ static const struct {
{ ON, "GL_SGIS_texture_lod", F(SGIS_texture_lod) },
{ ON, "GL_SUN_multi_draw_arrays", F(EXT_multi_draw_arrays) },
{ OFF, "GL_S3_s3tc", F(S3_s3tc) },
+#if FEATURE_OES_draw_texture
+ { OFF, "GL_OES_draw_texture", F(OES_draw_texture) },
+#endif /* FEATURE_OES_draw_texture */
};
@@ -214,6 +221,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
#endif
ctx->Extensions.ARB_half_float_pixel = GL_TRUE;
+ ctx->Extensions.ARB_half_float_vertex = GL_TRUE;
ctx->Extensions.ARB_imaging = GL_TRUE;
ctx->Extensions.ARB_map_buffer_range = GL_TRUE;
ctx->Extensions.ARB_multitexture = GL_TRUE;
@@ -269,6 +277,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.EXT_blend_subtract = GL_TRUE;
ctx->Extensions.EXT_convolution = GL_TRUE;
ctx->Extensions.EXT_depth_bounds_test = GL_TRUE;
+ ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
ctx->Extensions.EXT_fog_coord = GL_TRUE;
#if FEATURE_EXT_framebuffer_object
ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
@@ -309,6 +318,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.MESA_texture_array = GL_TRUE;
ctx->Extensions.MESA_ycbcr_texture = GL_TRUE;
ctx->Extensions.NV_blend_square = GL_TRUE;
+ ctx->Extensions.NV_conditional_render = GL_TRUE;
/*ctx->Extensions.NV_light_max_exponent = GL_TRUE;*/
ctx->Extensions.NV_point_sprite = GL_TRUE;
ctx->Extensions.NV_texture_env_combine4 = GL_TRUE;
@@ -523,19 +533,33 @@ _mesa_disable_extension( GLcontext *ctx, const char *name )
/**
+ * Check if the i-th extension is enabled.
+ */
+static GLboolean
+extension_enabled(GLcontext *ctx, GLuint index)
+{
+ const GLboolean *base = (const GLboolean *) &ctx->Extensions;
+ if (!default_extensions[index].flag_offset ||
+ *(base + default_extensions[index].flag_offset)) {
+ return GL_TRUE;
+ }
+ else {
+ return GL_FALSE;
+ }
+}
+
+
+/**
* Test if the named extension is enabled in this context.
*/
GLboolean
_mesa_extension_is_enabled( GLcontext *ctx, const char *name )
{
- const GLboolean *base = (const GLboolean *) &ctx->Extensions;
GLuint i;
for (i = 0 ; i < Elements(default_extensions) ; i++) {
if (_mesa_strcmp(default_extensions[i].name, name) == 0) {
- if (!default_extensions[i].flag_offset)
- return GL_TRUE;
- return *(base + default_extensions[i].flag_offset);
+ return extension_enabled(ctx, i);
}
}
return GL_FALSE;
@@ -643,7 +667,6 @@ _mesa_init_extensions( GLcontext *ctx )
GLubyte *
_mesa_make_extension_string( GLcontext *ctx )
{
- const GLboolean *base = (const GLboolean *) &ctx->Extensions;
const char *extraExt = get_extension_override(ctx);
GLuint extStrLen = 0;
char *s;
@@ -651,8 +674,7 @@ _mesa_make_extension_string( GLcontext *ctx )
/* first, compute length of the extension string */
for (i = 0 ; i < Elements(default_extensions) ; i++) {
- if (!default_extensions[i].flag_offset ||
- *(base + default_extensions[i].flag_offset)) {
+ if (extension_enabled(ctx, i)) {
extStrLen += (GLuint)_mesa_strlen(default_extensions[i].name) + 1;
}
}
@@ -668,8 +690,7 @@ _mesa_make_extension_string( GLcontext *ctx )
/* second, build the extension string */
extStrLen = 0;
for (i = 0 ; i < Elements(default_extensions) ; i++) {
- if (!default_extensions[i].flag_offset ||
- *(base + default_extensions[i].flag_offset)) {
+ if (extension_enabled(ctx, i)) {
GLuint len = (GLuint)_mesa_strlen(default_extensions[i].name);
_mesa_memcpy(s + extStrLen, default_extensions[i].name, len);
extStrLen += len;
@@ -688,3 +709,48 @@ _mesa_make_extension_string( GLcontext *ctx )
return (GLubyte *) s;
}
+
+
+/**
+ * Return number of enabled extensions.
+ */
+GLuint
+_mesa_get_extension_count(GLcontext *ctx)
+{
+ GLuint i;
+
+ /* only count once */
+ if (!ctx->Extensions.Count) {
+ for (i = 0; i < Elements(default_extensions); i++) {
+ if (extension_enabled(ctx, i)) {
+ ctx->Extensions.Count++;
+ }
+ }
+ }
+
+ if (0)
+ _mesa_debug(ctx, "%u of %d extensions enabled\n", ctx->Extensions.Count,
+ Elements(default_extensions));
+
+ return ctx->Extensions.Count;
+}
+
+
+/**
+ * Return name of i-th enabled extension
+ */
+const GLubyte *
+_mesa_get_enabled_extension(GLcontext *ctx, GLuint index)
+{
+ GLuint i;
+
+ for (i = 0; i < Elements(default_extensions); i++) {
+ if (extension_enabled(ctx, i)) {
+ if (index == 0)
+ return (const GLubyte *) default_extensions[i].name;
+ index--;
+ }
+ }
+
+ return NULL;
+}
diff --git a/src/mesa/main/extensions.h b/src/mesa/main/extensions.h
index 05ad859a27e..a25472440d6 100644
--- a/src/mesa/main/extensions.h
+++ b/src/mesa/main/extensions.h
@@ -64,6 +64,13 @@ extern void _mesa_init_extensions(GLcontext *ctx);
extern GLubyte *_mesa_make_extension_string(GLcontext *ctx);
+extern GLuint
+_mesa_get_extension_count(GLcontext *ctx);
+
+extern const GLubyte *
+_mesa_get_enabled_extension(GLcontext *ctx, GLuint index);
+
+
#else
/** No-op */
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 0e83a4e87fa..de1b524c0b5 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -858,6 +858,9 @@ _mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers)
*
* \return one of GL_RGB, GL_RGBA, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT
* GL_DEPTH_STENCIL_EXT or zero if error.
+ *
+ * XXX in the future when we support red-only and red-green formats
+ * we'll also return GL_RED and GL_RG.
*/
GLenum
_mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat)
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index fe2416d8946..2d1db29cbfe 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -357,7 +357,7 @@ static struct ureg get_temp( struct tnl_program *p )
int bit = _mesa_ffs( ~p->temp_in_use );
if (!bit) {
_mesa_problem(NULL, "%s: out of temporaries\n", __FILE__);
- _mesa_exit(1);
+ exit(1);
}
if ((GLuint) bit > p->program->Base.NumTemporaries)
@@ -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/get.c b/src/mesa/main/get.c
index 3f6b03c88ae..22cf75f79de 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -132,7 +132,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.numAuxBuffers);
break;
case GL_BLEND:
- params[0] = ctx->Color.BlendEnabled;
+ params[0] = (ctx->Color.BlendEnabled & 1);
break;
case GL_BLEND_DST:
params[0] = ENUM_TO_BOOLEAN(ctx->Color.BlendDstRGB);
@@ -210,10 +210,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = ENUM_TO_BOOLEAN(ctx->Light.ColorMaterialMode);
break;
case GL_COLOR_WRITEMASK:
- params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
- params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
- params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
- params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][RCOMP] ? 1 : 0);
+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][GCOMP] ? 1 : 0);
+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][BCOMP] ? 1 : 0);
+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[0][ACOMP] ? 1 : 0);
break;
case GL_CULL_FACE:
params[0] = ctx->Polygon.CullFlag;
@@ -1877,7 +1877,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");
@@ -1899,6 +1899,15 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
CHECK_EXT1(ARB_sync, "GetBooleanv");
params[0] = INT64_TO_BOOLEAN(ctx->Const.MaxServerWaitTimeout);
break;
+ case GL_NUM_EXTENSIONS:
+ params[0] = INT_TO_BOOLEAN(_mesa_get_extension_count(ctx));
+ break;
+ case GL_MAJOR_VERSION:
+ params[0] = INT_TO_BOOLEAN(ctx->VersionMajor);
+ break;
+ case GL_MINOR_VERSION:
+ params[0] = INT_TO_BOOLEAN(ctx->VersionMinor);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanv(pname=0x%x)", pname);
}
@@ -1967,7 +1976,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = (GLfloat)(ctx->DrawBuffer->Visual.numAuxBuffers);
break;
case GL_BLEND:
- params[0] = BOOLEAN_TO_FLOAT(ctx->Color.BlendEnabled);
+ params[0] = BOOLEAN_TO_FLOAT((ctx->Color.BlendEnabled & 1));
break;
case GL_BLEND_DST:
params[0] = ENUM_TO_FLOAT(ctx->Color.BlendDstRGB);
@@ -2045,10 +2054,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = ENUM_TO_FLOAT(ctx->Light.ColorMaterialMode);
break;
case GL_COLOR_WRITEMASK:
- params[0] = (GLfloat)(ctx->Color.ColorMask[RCOMP] ? 1 : 0);
- params[1] = (GLfloat)(ctx->Color.ColorMask[GCOMP] ? 1 : 0);
- params[2] = (GLfloat)(ctx->Color.ColorMask[BCOMP] ? 1 : 0);
- params[3] = (GLfloat)(ctx->Color.ColorMask[ACOMP] ? 1 : 0);
+ params[0] = (GLfloat)(ctx->Color.ColorMask[0][RCOMP] ? 1 : 0);
+ params[1] = (GLfloat)(ctx->Color.ColorMask[0][GCOMP] ? 1 : 0);
+ params[2] = (GLfloat)(ctx->Color.ColorMask[0][BCOMP] ? 1 : 0);
+ params[3] = (GLfloat)(ctx->Color.ColorMask[0][ACOMP] ? 1 : 0);
break;
case GL_CULL_FACE:
params[0] = BOOLEAN_TO_FLOAT(ctx->Polygon.CullFlag);
@@ -3712,7 +3721,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");
@@ -3734,6 +3743,15 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
CHECK_EXT1(ARB_sync, "GetFloatv");
params[0] = (GLfloat)(ctx->Const.MaxServerWaitTimeout);
break;
+ case GL_NUM_EXTENSIONS:
+ params[0] = (GLfloat)(_mesa_get_extension_count(ctx));
+ break;
+ case GL_MAJOR_VERSION:
+ params[0] = (GLfloat)(ctx->VersionMajor);
+ break;
+ case GL_MINOR_VERSION:
+ params[0] = (GLfloat)(ctx->VersionMinor);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv(pname=0x%x)", pname);
}
@@ -3802,7 +3820,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = ctx->DrawBuffer->Visual.numAuxBuffers;
break;
case GL_BLEND:
- params[0] = BOOLEAN_TO_INT(ctx->Color.BlendEnabled);
+ params[0] = BOOLEAN_TO_INT((ctx->Color.BlendEnabled & 1));
break;
case GL_BLEND_DST:
params[0] = ENUM_TO_INT(ctx->Color.BlendDstRGB);
@@ -3880,10 +3898,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = ENUM_TO_INT(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] = ctx->Color.ColorMask[0][RCOMP] ? 1 : 0;
+ params[1] = ctx->Color.ColorMask[0][GCOMP] ? 1 : 0;
+ params[2] = ctx->Color.ColorMask[0][BCOMP] ? 1 : 0;
+ params[3] = ctx->Color.ColorMask[0][ACOMP] ? 1 : 0;
break;
case GL_CULL_FACE:
params[0] = BOOLEAN_TO_INT(ctx->Polygon.CullFlag);
@@ -5547,7 +5565,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");
@@ -5569,6 +5587,15 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
CHECK_EXT1(ARB_sync, "GetIntegerv");
params[0] = INT64_TO_INT(ctx->Const.MaxServerWaitTimeout);
break;
+ case GL_NUM_EXTENSIONS:
+ params[0] = _mesa_get_extension_count(ctx);
+ break;
+ case GL_MAJOR_VERSION:
+ params[0] = ctx->VersionMajor;
+ break;
+ case GL_MINOR_VERSION:
+ params[0] = ctx->VersionMinor;
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerv(pname=0x%x)", pname);
}
@@ -5638,7 +5665,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = (GLint64)(ctx->DrawBuffer->Visual.numAuxBuffers);
break;
case GL_BLEND:
- params[0] = BOOLEAN_TO_INT64(ctx->Color.BlendEnabled);
+ params[0] = BOOLEAN_TO_INT64((ctx->Color.BlendEnabled & 1));
break;
case GL_BLEND_DST:
params[0] = ENUM_TO_INT64(ctx->Color.BlendDstRGB);
@@ -5716,10 +5743,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = ENUM_TO_INT64(ctx->Light.ColorMaterialMode);
break;
case GL_COLOR_WRITEMASK:
- 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);
+ params[0] = (GLint64)(ctx->Color.ColorMask[0][RCOMP] ? 1 : 0);
+ params[1] = (GLint64)(ctx->Color.ColorMask[0][GCOMP] ? 1 : 0);
+ params[2] = (GLint64)(ctx->Color.ColorMask[0][BCOMP] ? 1 : 0);
+ params[3] = (GLint64)(ctx->Color.ColorMask[0][ACOMP] ? 1 : 0);
break;
case GL_CULL_FACE:
params[0] = BOOLEAN_TO_INT64(ctx->Polygon.CullFlag);
@@ -7383,7 +7410,7 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
break;
case GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB:
CHECK_EXT1(ARB_vertex_shader, "GetInteger64v");
- params[0] = (GLint64)(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+ params[0] = (GLint64)(ctx->Const.MaxCombinedTextureImageUnits);
break;
case GL_CURRENT_PROGRAM:
CHECK_EXT1(ARB_shader_objects, "GetInteger64v");
@@ -7405,6 +7432,15 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
CHECK_EXT1(ARB_sync, "GetInteger64v");
params[0] = ctx->Const.MaxServerWaitTimeout;
break;
+ case GL_NUM_EXTENSIONS:
+ params[0] = (GLint64)(_mesa_get_extension_count(ctx));
+ break;
+ case GL_MAJOR_VERSION:
+ params[0] = (GLint64)(ctx->VersionMajor);
+ break;
+ case GL_MINOR_VERSION:
+ params[0] = (GLint64)(ctx->VersionMinor);
+ break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetInteger64v(pname=0x%x)", pname);
}
@@ -7434,3 +7470,110 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
params[i] = (GLdouble) values[i];
}
+void GLAPIENTRY
+_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (!params)
+ return;
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+
+ switch (pname) {
+ case GL_BLEND:
+ CHECK_EXT1(EXT_draw_buffers2, "GetBooleanIndexedv");
+ if (index >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetBooleanIndexedv(index=%u), index", pname);
+ }
+ params[0] = INT_TO_BOOLEAN(((ctx->Color.BlendEnabled >> index) & 1));
+ break;
+ case GL_COLOR_WRITEMASK:
+ CHECK_EXT1(EXT_draw_buffers2, "GetBooleanIndexedv");
+ if (index >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetBooleanIndexedv(index=%u), index", pname);
+ }
+ params[0] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][RCOMP] ? 1 : 0);
+ params[1] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][GCOMP] ? 1 : 0);
+ params[2] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][BCOMP] ? 1 : 0);
+ params[3] = INT_TO_BOOLEAN(ctx->Color.ColorMask[index][ACOMP] ? 1 : 0);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetBooleanIndexedv(pname=0x%x)", pname);
+ }
+}
+
+void GLAPIENTRY
+_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (!params)
+ return;
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+
+ switch (pname) {
+ case GL_BLEND:
+ CHECK_EXT1(EXT_draw_buffers2, "GetIntegerIndexedv");
+ if (index >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetIntegerIndexedv(index=%u), index", pname);
+ }
+ params[0] = ((ctx->Color.BlendEnabled >> index) & 1);
+ break;
+ case GL_COLOR_WRITEMASK:
+ CHECK_EXT1(EXT_draw_buffers2, "GetIntegerIndexedv");
+ if (index >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetIntegerIndexedv(index=%u), index", pname);
+ }
+ params[0] = ctx->Color.ColorMask[index][RCOMP] ? 1 : 0;
+ params[1] = ctx->Color.ColorMask[index][GCOMP] ? 1 : 0;
+ params[2] = ctx->Color.ColorMask[index][BCOMP] ? 1 : 0;
+ params[3] = ctx->Color.ColorMask[index][ACOMP] ? 1 : 0;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetIntegerIndexedv(pname=0x%x)", pname);
+ }
+}
+
+#if FEATURE_ARB_sync
+void GLAPIENTRY
+_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (!params)
+ return;
+
+ if (ctx->NewState)
+ _mesa_update_state(ctx);
+
+ switch (pname) {
+ case GL_BLEND:
+ CHECK_EXT1(EXT_draw_buffers2, "GetInteger64Indexedv");
+ if (index >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetInteger64Indexedv(index=%u), index", pname);
+ }
+ params[0] = (GLint64)(((ctx->Color.BlendEnabled >> index) & 1));
+ break;
+ case GL_COLOR_WRITEMASK:
+ CHECK_EXT1(EXT_draw_buffers2, "GetInteger64Indexedv");
+ if (index >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetInteger64Indexedv(index=%u), index", pname);
+ }
+ params[0] = (GLint64)(ctx->Color.ColorMask[index][RCOMP] ? 1 : 0);
+ params[1] = (GLint64)(ctx->Color.ColorMask[index][GCOMP] ? 1 : 0);
+ params[2] = (GLint64)(ctx->Color.ColorMask[index][BCOMP] ? 1 : 0);
+ params[3] = (GLint64)(ctx->Color.ColorMask[index][ACOMP] ? 1 : 0);
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetInteger64Indexedv(pname=0x%x)", pname);
+ }
+}
+#endif /* FEATURE_ARB_sync */
+
diff --git a/src/mesa/main/get.h b/src/mesa/main/get.h
index 77a9a7d04b4..cc426fc0f61 100644
--- a/src/mesa/main/get.h
+++ b/src/mesa/main/get.h
@@ -51,11 +51,23 @@ extern void GLAPIENTRY
_mesa_GetInteger64v( GLenum pname, GLint64 *params );
extern void GLAPIENTRY
+_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params );
+
+extern void GLAPIENTRY
+_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params );
+
+extern void GLAPIENTRY
+_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params );
+
+extern void GLAPIENTRY
_mesa_GetPointerv( GLenum pname, GLvoid **params );
extern const GLubyte * GLAPIENTRY
_mesa_GetString( GLenum name );
+extern const GLubyte * GLAPIENTRY
+_mesa_GetStringi(GLenum name, GLuint index);
+
extern GLenum GLAPIENTRY
_mesa_GetError( void );
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index 697c4cfd92e..b0beb592075 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -82,7 +82,7 @@ StateVars = [
( "GL_AUTO_NORMAL", GLboolean, ["ctx->Eval.AutoNormal"], "", None ),
( "GL_AUX_BUFFERS", GLint, ["ctx->DrawBuffer->Visual.numAuxBuffers"],
"", None ),
- ( "GL_BLEND", GLboolean, ["ctx->Color.BlendEnabled"], "", None ),
+ ( "GL_BLEND", GLboolean, ["(ctx->Color.BlendEnabled & 1)"], "", None ),
( "GL_BLEND_DST", GLenum, ["ctx->Color.BlendDstRGB"], "", None ),
( "GL_BLEND_SRC", GLenum, ["ctx->Color.BlendSrcRGB"], "", None ),
( "GL_BLEND_SRC_RGB_EXT", GLenum, ["ctx->Color.BlendSrcRGB"], "", None ),
@@ -126,10 +126,10 @@ StateVars = [
( "GL_COLOR_MATERIAL_PARAMETER", GLenum,
["ctx->Light.ColorMaterialMode"], "", None ),
( "GL_COLOR_WRITEMASK", GLint,
- [ "ctx->Color.ColorMask[RCOMP] ? 1 : 0",
- "ctx->Color.ColorMask[GCOMP] ? 1 : 0",
- "ctx->Color.ColorMask[BCOMP] ? 1 : 0",
- "ctx->Color.ColorMask[ACOMP] ? 1 : 0" ], "", None ),
+ [ "ctx->Color.ColorMask[0][RCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[0][GCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[0][BCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[0][ACOMP] ? 1 : 0" ], "", None ),
( "GL_CULL_FACE", GLboolean, ["ctx->Polygon.CullFlag"], "", None ),
( "GL_CULL_FACE_MODE", GLenum, ["ctx->Polygon.CullFaceMode"], "", None ),
( "GL_CURRENT_COLOR", GLfloatN,
@@ -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
@@ -1030,9 +1030,29 @@ StateVars = [
# GL_ARB_sync
( "GL_MAX_SERVER_WAIT_TIMEOUT", GLint64, ["ctx->Const.MaxServerWaitTimeout"], "",
["ARB_sync"] ),
+
+ # GL3
+ ( "GL_NUM_EXTENSIONS", GLint, ["_mesa_get_extension_count(ctx)"], "", None ),
+ ( "GL_MAJOR_VERSION", GLint, ["ctx->VersionMajor"], "", None ),
+ ( "GL_MINOR_VERSION", GLint, ["ctx->VersionMinor"], "", None )
+]
+
+
+# These are queried via glGetIntegetIndexdvEXT() or glGetIntegeri_v()
+IndexedStateVars = [
+ ( "GL_BLEND", GLint, ["((ctx->Color.BlendEnabled >> index) & 1)"],
+ "ctx->Const.MaxDrawBuffers", ["EXT_draw_buffers2"] ),
+ ( "GL_COLOR_WRITEMASK", GLint,
+ [ "ctx->Color.ColorMask[index][RCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[index][GCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[index][BCOMP] ? 1 : 0",
+ "ctx->Color.ColorMask[index][ACOMP] ? 1 : 0" ],
+ "ctx->Const.MaxDrawBuffers", ["EXT_draw_buffers2"] ),
+ # XXX more to come...
]
+
def ConversionFunc(fromType, toType):
"""Return the name of the macro to convert between two data types."""
if fromType == toType:
@@ -1059,7 +1079,7 @@ def ConversionFunc(fromType, toType):
return fromStr + "_TO_" + toStr
-def EmitGetFunction(stateVars, returnType):
+def EmitGetFunction(stateVars, returnType, indexed):
"""Emit the code to implement glGetBooleanv, glGetIntegerv or glGetFloatv."""
assert (returnType == GLboolean or
returnType == GLint or
@@ -1068,22 +1088,35 @@ def EmitGetFunction(stateVars, returnType):
strType = TypeStrings[returnType]
# Capitalize first letter of return type
- if returnType == GLint:
- function = "GetIntegerv"
- elif returnType == GLboolean:
- function = "GetBooleanv"
- elif returnType == GLfloat:
- function = "GetFloatv"
- elif returnType == GLint64:
- function = "GetInteger64v"
+ if indexed:
+ if returnType == GLint:
+ function = "GetIntegerIndexedv"
+ elif returnType == GLboolean:
+ function = "GetBooleanIndexedv"
+ elif returnType == GLint64:
+ function = "GetInteger64Indexedv"
+ else:
+ function = "Foo"
else:
- abort()
+ if returnType == GLint:
+ function = "GetIntegerv"
+ elif returnType == GLboolean:
+ function = "GetBooleanv"
+ elif returnType == GLfloat:
+ function = "GetFloatv"
+ elif returnType == GLint64:
+ function = "GetInteger64v"
+ else:
+ abort()
if returnType == GLint64:
print "#if FEATURE_ARB_sync"
print "void GLAPIENTRY"
- print "_mesa_%s( GLenum pname, %s *params )" % (function, strType)
+ if indexed:
+ print "_mesa_%s( GLenum pname, GLuint index, %s *params )" % (function, strType)
+ else:
+ print "_mesa_%s( GLenum pname, %s *params )" % (function, strType)
print "{"
print " GET_CURRENT_CONTEXT(ctx);"
print " ASSERT_OUTSIDE_BEGIN_END(ctx);"
@@ -1094,13 +1127,20 @@ def EmitGetFunction(stateVars, returnType):
print " if (ctx->NewState)"
print " _mesa_update_state(ctx);"
print ""
- print " if (ctx->Driver.%s &&" % function
- print " ctx->Driver.%s(ctx, pname, params))" % function
- print " return;"
- print ""
+ if indexed == 0:
+ print " if (ctx->Driver.%s &&" % function
+ print " ctx->Driver.%s(ctx, pname, params))" % function
+ print " return;"
+ print ""
print " switch (pname) {"
- for (name, varType, state, optionalCode, extensions) in stateVars:
+ for state in stateVars:
+ if indexed:
+ (name, varType, state, indexMax, extensions) = state
+ optionalCode = 0
+ else:
+ (name, varType, state, optionalCode, extensions) = state
+ indexMax = 0
print " case " + name + ":"
if extensions:
if len(extensions) == 1:
@@ -1116,6 +1156,11 @@ def EmitGetFunction(stateVars, returnType):
assert len(extensions) == 4
print (' CHECK_EXT4(%s, %s, %s, %s, "%s");' %
(extensions[0], extensions[1], extensions[2], extensions[3], function))
+ if indexMax:
+ print (' if (index >= %s) {' % indexMax)
+ print (' _mesa_error(ctx, GL_INVALID_VALUE, "gl%s(index=%%u), index", pname);' % function)
+ print (' }')
+
conversion = ConversionFunc(varType, returnType)
if optionalCode:
optionalCode = string.replace(optionalCode, "CONVERSION", conversion);
@@ -1249,9 +1294,13 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
EmitHeader()
# XXX Maybe sort the StateVars list
-EmitGetFunction(StateVars, GLboolean)
-EmitGetFunction(StateVars, GLfloat)
-EmitGetFunction(StateVars, GLint)
-EmitGetFunction(StateVars, GLint64)
+EmitGetFunction(StateVars, GLboolean, 0)
+EmitGetFunction(StateVars, GLfloat, 0)
+EmitGetFunction(StateVars, GLint, 0)
+EmitGetFunction(StateVars, GLint64, 0)
EmitGetDoublev()
+EmitGetFunction(IndexedStateVars, GLboolean, 1)
+EmitGetFunction(IndexedStateVars, GLint, 1)
+EmitGetFunction(IndexedStateVars, GLint64, 1)
+
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 6599ed9698d..c203b046a5c 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -33,85 +33,6 @@
/**
- * Examine enabled GL extensions to determine GL version.
- * \return version string
- */
-static const char *
-compute_version(const GLcontext *ctx)
-{
- static const char *version_1_2 = "1.2 Mesa " MESA_VERSION_STRING;
- static const char *version_1_3 = "1.3 Mesa " MESA_VERSION_STRING;
- static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING;
- static const char *version_1_5 = "1.5 Mesa " MESA_VERSION_STRING;
- static const char *version_2_0 = "2.0 Mesa " MESA_VERSION_STRING;
- static const char *version_2_1 = "2.1 Mesa " MESA_VERSION_STRING;
-
- const GLboolean ver_1_3 = (ctx->Extensions.ARB_multisample &&
- ctx->Extensions.ARB_multitexture &&
- ctx->Extensions.ARB_texture_border_clamp &&
- ctx->Extensions.ARB_texture_compression &&
- ctx->Extensions.ARB_texture_cube_map &&
- ctx->Extensions.EXT_texture_env_add &&
- ctx->Extensions.ARB_texture_env_combine &&
- ctx->Extensions.ARB_texture_env_dot3);
- const GLboolean ver_1_4 = (ver_1_3 &&
- ctx->Extensions.ARB_depth_texture &&
- ctx->Extensions.ARB_shadow &&
- ctx->Extensions.ARB_texture_env_crossbar &&
- ctx->Extensions.ARB_texture_mirrored_repeat &&
- ctx->Extensions.ARB_window_pos &&
- ctx->Extensions.EXT_blend_color &&
- ctx->Extensions.EXT_blend_func_separate &&
- ctx->Extensions.EXT_blend_minmax &&
- ctx->Extensions.EXT_blend_subtract &&
- ctx->Extensions.EXT_fog_coord &&
- ctx->Extensions.EXT_multi_draw_arrays &&
- ctx->Extensions.EXT_point_parameters &&
- ctx->Extensions.EXT_secondary_color &&
- ctx->Extensions.EXT_stencil_wrap &&
- ctx->Extensions.EXT_texture_lod_bias &&
- ctx->Extensions.SGIS_generate_mipmap);
- const GLboolean ver_1_5 = (ver_1_4 &&
- ctx->Extensions.ARB_occlusion_query &&
- ctx->Extensions.ARB_vertex_buffer_object &&
- ctx->Extensions.EXT_shadow_funcs);
- const GLboolean ver_2_0 = (ver_1_5 &&
- ctx->Extensions.ARB_draw_buffers &&
- ctx->Extensions.ARB_point_sprite &&
- ctx->Extensions.ARB_shader_objects &&
- ctx->Extensions.ARB_vertex_shader &&
- ctx->Extensions.ARB_fragment_shader &&
- ctx->Extensions.ARB_texture_non_power_of_two &&
- ctx->Extensions.EXT_blend_equation_separate &&
-
- /* Technically, 2.0 requires the functionality
- * of the EXT version. Enable 2.0 if either
- * extension is available, and assume that a
- * driver that only exposes the ATI extension
- * will fallback to software when necessary.
- */
- (ctx->Extensions.EXT_stencil_two_side
- || ctx->Extensions.ATI_separate_stencil));
- const GLboolean ver_2_1 = (ver_2_0 &&
- ctx->Extensions.ARB_shading_language_120 &&
- ctx->Extensions.EXT_pixel_buffer_object &&
- ctx->Extensions.EXT_texture_sRGB);
- if (ver_2_1)
- return version_2_1;
- if (ver_2_0)
- return version_2_0;
- if (ver_1_5)
- return version_1_5;
- if (ver_1_4)
- return version_1_4;
- if (ver_1_3)
- return version_1_3;
- return version_1_2;
-}
-
-
-
-/**
* Query string-valued state. The return value should _not_ be freed by
* the caller.
*
@@ -149,7 +70,7 @@ _mesa_GetString( GLenum name )
case GL_RENDERER:
return (const GLubyte *) renderer;
case GL_VERSION:
- return (const GLubyte *) compute_version(ctx);
+ return (const GLubyte *) ctx->VersionString;
case GL_EXTENSIONS:
if (!ctx->Extensions.String)
ctx->Extensions.String = _mesa_make_extension_string(ctx);
@@ -184,6 +105,34 @@ _mesa_GetString( GLenum name )
/**
+ * GL3
+ */
+const GLubyte * GLAPIENTRY
+_mesa_GetStringi(GLenum name, GLuint index)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (!ctx)
+ return NULL;
+
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL);
+
+ switch (name) {
+ case GL_EXTENSIONS:
+ if (index >= _mesa_get_extension_count(ctx)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetStringi(index=%u)", index);
+ return (const GLubyte *) 0;
+ }
+ return _mesa_get_enabled_extension(ctx, index);
+ default:
+ _mesa_error( ctx, GL_INVALID_ENUM, "glGetString" );
+ return (const GLubyte *) 0;
+ }
+}
+
+
+
+/**
* Return pointer-valued state, such as a vertex array pointer.
*
* \param pname names state to be queried
@@ -242,6 +191,11 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
case GL_SELECTION_BUFFER_POINTER:
*params = ctx->Select.Buffer;
break;
+#if FEATURE_point_size_array
+ case GL_POINT_SIZE_ARRAY_POINTER_OES:
+ *params = (GLvoid *) ctx->Array.ArrayObj->PointSize.Ptr;
+ break;
+#endif
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glGetPointerv" );
return;
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 81d4ccf919f..77544c88c66 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -57,6 +57,13 @@
#ifndef GL_FIXED
#define GL_FIXED 0x140C
+typedef int GLfixed;
+typedef int GLclampx;
+#endif
+
+
+#ifndef GL_OES_EGL_image
+typedef void *GLeglImageOES;
#endif
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 1dfcc481955..81993e7063b 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -33,6 +33,7 @@
#include "glheader.h"
#include "colormac.h"
#include "context.h"
+#include "enums.h"
#include "image.h"
#include "imports.h"
#include "macros.h"
@@ -3352,7 +3353,8 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
stride = 2;
break;
default:
- _mesa_problem(NULL, "bad srcFormat in extract float data");
+ _mesa_problem(NULL, "bad srcFormat %s in extract float data",
+ _mesa_lookup_enum_by_nr(srcFormat));
return;
}
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 46ffb929b6c..def045269c5 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -460,7 +460,7 @@ _mesa_inv_sqrtf(float n)
#if 0 /* not used, see below -BP */
float r3, x3, y3;
#endif
- union { float f; unsigned int i; } u;
+ fi_type u;
unsigned int magic;
/*
@@ -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
}
@@ -645,10 +649,10 @@ _mesa_bitcount(unsigned int n)
GLhalfARB
_mesa_float_to_half(float val)
{
- const int flt = *((int *) (void *) &val);
- const int flt_m = flt & 0x7fffff;
- const int flt_e = (flt >> 23) & 0xff;
- const int flt_s = (flt >> 31) & 0x1;
+ const fi_type fi = {val};
+ const int flt_m = fi.i & 0x7fffff;
+ const int flt_e = (fi.i >> 23) & 0xff;
+ const int flt_s = (fi.i >> 31) & 0x1;
int s, e, m = 0;
GLhalfARB result;
@@ -735,7 +739,8 @@ _mesa_half_to_float(GLhalfARB val)
const int m = val & 0x3ff;
const int e = (val >> 10) & 0x1f;
const int s = (val >> 15) & 0x1;
- int flt_m, flt_e, flt_s, flt;
+ int flt_m, flt_e, flt_s;
+ fi_type fi;
float result;
/* sign bit */
@@ -770,8 +775,8 @@ _mesa_half_to_float(GLhalfARB val)
flt_m = m << 13;
}
- flt = (flt_s << 31) | (flt_e << 23) | flt_m;
- result = *((float *) (void *) &flt);
+ fi.i = (flt_s << 31) | (flt_e << 23) | flt_m;
+ result = fi.f;
return result;
}
@@ -1234,13 +1239,3 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
}
/*@}*/
-
-
-/**
- * Wrapper for exit().
- */
-void
-_mesa_exit( int status )
-{
- exit(status);
-}
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 7d4012a8560..b01fe5b0ab9 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -618,10 +618,6 @@ _mesa_error( __GLcontext *ctx, GLenum error, const char *fmtString, ... );
extern void
_mesa_debug( const __GLcontext *ctx, const char *fmtString, ... );
-extern void
-_mesa_exit( int status );
-
-
#ifdef __cplusplus
}
#endif
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 3d9a1aba98d..55578adf836 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -202,17 +202,12 @@ do { \
#endif
/**
- * Copy a 4-element float vector (avoid using FPU registers)
- * XXX Could use two 64-bit moves on 64-bit systems
+ * Copy a 4-element float vector
+ * memcpy seems to be most efficient
*/
#define COPY_4FV( DST, SRC ) \
do { \
- const GLuint *_s = (const GLuint *) (SRC); \
- GLuint *_d = (GLuint *) (DST); \
- _d[0] = _s[0]; \
- _d[1] = _s[1]; \
- _d[2] = _s[2]; \
- _d[3] = _s[3]; \
+ _mesa_memcpy(DST, SRC, sizeof(GLfloat) * 4); \
} while (0)
/** Copy \p SZ elements into a 4-element vector */
@@ -631,12 +626,6 @@ do { \
/** Clamp X to [MIN,MAX] */
#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) )
-/** Assign X to CLAMP(X, MIN, MAX) */
-#define CLAMP_SELF(x, mn, mx) \
- ( (x)<(mn) ? ((x) = (mn)) : ((x)>(mx) ? ((x)=(mx)) : (x)) )
-
-
-
/** Minimum of two values: */
#define MIN2( A, B ) ( (A)<(B) ? (A) : (B) )
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index cde2f5fe061..297c5ae878a 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -564,7 +564,7 @@ struct gl_colorbuffer_attrib
GLclampf ClearColor[4]; /**< Color to use for glClear */
GLuint IndexMask; /**< Color index write mask */
- GLubyte ColorMask[4]; /**< Each flag is 0xff or 0x0 */
+ GLubyte ColorMask[MAX_DRAW_BUFFERS][4];/**< Each flag is 0xff or 0x0 */
GLenum DrawBuffer[MAX_DRAW_BUFFERS]; /**< Which buffer to draw into */
@@ -581,7 +581,7 @@ struct gl_colorbuffer_attrib
* \name Blending
*/
/*@{*/
- GLboolean BlendEnabled; /**< Blending enabled flag */
+ GLbitfield BlendEnabled; /**< Per-buffer blend enable flags */
GLenum BlendSrcRGB; /**< Blending source operator */
GLenum BlendDstRGB; /**< Blending destination operator */
GLenum BlendSrcA; /**< GL_INGR_blend_func_separate */
@@ -1217,7 +1217,11 @@ struct gl_texture_object
GLuint Name; /**< the user-visible texture object ID */
GLenum Target; /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */
GLfloat Priority; /**< in [0,1] */
- GLfloat BorderColor[4]; /**< unclamped */
+ union {
+ GLfloat f[4];
+ GLuint ui[4];
+ GLint i[4];
+ } BorderColor; /**< Interpreted according to texture format */
GLenum WrapS; /**< S-axis texture image wrap mode */
GLenum WrapT; /**< T-axis texture image wrap mode */
GLenum WrapR; /**< R-axis texture image wrap mode */
@@ -1758,6 +1762,8 @@ struct gl_fragment_program
struct gl_program Base; /**< base class */
GLenum FogOption;
GLboolean UsesKill; /**< shader uses KIL instruction */
+ GLboolean OriginUpperLeft;
+ GLboolean PixelCenterInteger;
};
@@ -1899,6 +1905,10 @@ struct gl_query_state
struct _mesa_HashTable *QueryObjects;
struct gl_query_object *CurrentOcclusionObject; /* GL_ARB_occlusion_query */
struct gl_query_object *CurrentTimerObject; /* GL_EXT_timer_query */
+
+ /** GL_NV_conditional_render */
+ struct gl_query_object *CondRenderQuery;
+ GLenum CondRenderMode;
};
@@ -2319,6 +2329,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 */
@@ -2386,11 +2397,13 @@ struct gl_extensions
GLboolean ARB_depth_clamp;
GLboolean ARB_draw_buffers;
GLboolean ARB_draw_elements_base_vertex;
+ GLboolean ARB_fragment_coord_conventions;
GLboolean ARB_fragment_program;
GLboolean ARB_fragment_program_shadow;
GLboolean ARB_fragment_shader;
GLboolean ARB_framebuffer_object;
GLboolean ARB_half_float_pixel;
+ GLboolean ARB_half_float_vertex;
GLboolean ARB_imaging;
GLboolean ARB_map_buffer_range;
GLboolean ARB_multisample;
@@ -2433,6 +2446,7 @@ struct gl_extensions
GLboolean EXT_compiled_vertex_array;
GLboolean EXT_copy_texture;
GLboolean EXT_depth_bounds_test;
+ GLboolean EXT_draw_buffers2;
GLboolean EXT_draw_range_elements;
GLboolean EXT_fog_coord;
GLboolean EXT_framebuffer_blit;
@@ -2490,6 +2504,7 @@ struct gl_extensions
GLboolean MESA_texture_array;
GLboolean MESA_texture_signed_rgba;
GLboolean NV_blend_square;
+ GLboolean NV_conditional_render;
GLboolean NV_fragment_program;
GLboolean NV_fragment_program_option;
GLboolean NV_light_max_exponent;
@@ -2508,8 +2523,13 @@ struct gl_extensions
GLboolean SGIS_texture_lod;
GLboolean TDFX_texture_compression_FXT1;
GLboolean S3_s3tc;
+#if FEATURE_OES_draw_texture
+ GLboolean OES_draw_texture;
+#endif /* FEATURE_OES_draw_texture */
/** The extension string */
const GLubyte *String;
+ /** Number of supported extensions */
+ GLuint Count;
};
@@ -2851,6 +2871,10 @@ struct __GLcontextRec
/** Extension information */
struct gl_extensions Extensions;
+ /** Version info */
+ GLuint VersionMajor, VersionMinor;
+ char *VersionString;
+
/** \name State attribute stack (for glPush/PopAttrib) */
/*@{*/
GLuint AttribStackDepth;
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index f6eb4ee7e1b..387a82fc9df 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -118,15 +118,6 @@ _mesa_delete_query(GLcontext *ctx, struct gl_query_object *q)
}
-static struct gl_query_object *
-lookup_query_object(GLcontext *ctx, GLuint id)
-{
- return (struct gl_query_object *)
- _mesa_HashLookup(ctx->Query.QueryObjects, id);
-}
-
-
-
void
_mesa_init_query_object_functions(struct dd_function_table *driver)
{
@@ -196,7 +187,7 @@ _mesa_DeleteQueriesARB(GLsizei n, const GLuint *ids)
for (i = 0; i < n; i++) {
if (ids[i] > 0) {
- struct gl_query_object *q = lookup_query_object(ctx, ids[i]);
+ struct gl_query_object *q = _mesa_lookup_query_object(ctx, ids[i]);
if (q) {
ASSERT(!q->Active); /* should be caught earlier */
_mesa_HashRemove(ctx->Query.QueryObjects, ids[i]);
@@ -213,7 +204,7 @@ _mesa_IsQueryARB(GLuint id)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
- if (id && lookup_query_object(ctx, id))
+ if (id && _mesa_lookup_query_object(ctx, id))
return GL_TRUE;
else
return GL_FALSE;
@@ -260,7 +251,7 @@ _mesa_BeginQueryARB(GLenum target, GLuint id)
return;
}
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q) {
/* create new object */
q = ctx->Driver.NewQueryObject(ctx, id);
@@ -386,7 +377,7 @@ _mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (id)
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -426,7 +417,7 @@ _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (id)
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -469,7 +460,7 @@ _mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (id)
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -506,7 +497,7 @@ _mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params)
ASSERT_OUTSIDE_BEGIN_END(ctx);
if (id)
- q = lookup_query_object(ctx, id);
+ q = _mesa_lookup_query_object(ctx, id);
if (!q || q->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h
index 6cf3c76d74d..ba8b5dd0029 100644
--- a/src/mesa/main/queryobj.h
+++ b/src/mesa/main/queryobj.h
@@ -28,6 +28,7 @@
#include "main/mtypes.h"
+#include "main/hash.h"
#if FEATURE_queryobj
@@ -42,6 +43,15 @@
(driver)->CheckQuery = impl ## CheckQuery; \
} while (0)
+
+static INLINE struct gl_query_object *
+_mesa_lookup_query_object(GLcontext *ctx, GLuint id)
+{
+ return (struct gl_query_object *)
+ _mesa_HashLookup(ctx->Query.QueryObjects, id);
+}
+
+
extern void GLAPIENTRY
_mesa_GenQueriesARB(GLsizei n, GLuint *ids);
diff --git a/src/mesa/main/remap.c b/src/mesa/main/remap.c
index 0385ae8d7d9..5f32a482581 100644
--- a/src/mesa/main/remap.c
+++ b/src/mesa/main/remap.c
@@ -45,7 +45,7 @@
#define need_MESA_remap_table
-#include "remap_helper.h"
+#include "main/remap_helper.h"
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
#define MAX_ENTRY_POINTS 16
diff --git a/src/mesa/main/remap_helper.h b/src/mesa/main/remap_helper.h
index c80a524b4f0..fe2bebd96cc 100644
--- a/src/mesa/main/remap_helper.h
+++ b/src/mesa/main/remap_helper.h
@@ -605,3722 +605,3754 @@ static const char _mesa_function_pool[] =
"glFogCoordd\0"
"glFogCoorddEXT\0"
"\0"
- /* _mesa_function_pool[4074]: Color4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4074]: BeginConditionalRenderNV (will be remapped) */
+ "ii\0"
+ "glBeginConditionalRenderNV\0"
+ "\0"
+ /* _mesa_function_pool[4105]: Color4ubVertex3fSUN (dynamic) */
"iiiifff\0"
"glColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4105]: FogCoordfEXT (will be remapped) */
+ /* _mesa_function_pool[4136]: FogCoordfEXT (will be remapped) */
"f\0"
"glFogCoordf\0"
"glFogCoordfEXT\0"
"\0"
- /* _mesa_function_pool[4135]: PointSize (offset 173) */
+ /* _mesa_function_pool[4166]: PointSize (offset 173) */
"f\0"
"glPointSize\0"
"\0"
- /* _mesa_function_pool[4150]: TexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4181]: TexCoord2fVertex3fSUN (dynamic) */
"fffff\0"
"glTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4181]: PopName (offset 200) */
+ /* _mesa_function_pool[4212]: PopName (offset 200) */
"\0"
"glPopName\0"
"\0"
- /* _mesa_function_pool[4193]: GlobalAlphaFactoriSUN (dynamic) */
+ /* _mesa_function_pool[4224]: GlobalAlphaFactoriSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoriSUN\0"
"\0"
- /* _mesa_function_pool[4220]: VertexAttrib2dNV (will be remapped) */
+ /* _mesa_function_pool[4251]: VertexAttrib2dNV (will be remapped) */
"idd\0"
"glVertexAttrib2dNV\0"
"\0"
- /* _mesa_function_pool[4244]: GetProgramInfoLog (will be remapped) */
+ /* _mesa_function_pool[4275]: GetProgramInfoLog (will be remapped) */
"iipp\0"
"glGetProgramInfoLog\0"
"\0"
- /* _mesa_function_pool[4270]: VertexAttrib4NbvARB (will be remapped) */
+ /* _mesa_function_pool[4301]: VertexAttrib4NbvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nbv\0"
"glVertexAttrib4NbvARB\0"
"\0"
- /* _mesa_function_pool[4315]: GetActiveAttribARB (will be remapped) */
+ /* _mesa_function_pool[4346]: GetActiveAttribARB (will be remapped) */
"iiipppp\0"
"glGetActiveAttrib\0"
"glGetActiveAttribARB\0"
"\0"
- /* _mesa_function_pool[4363]: Vertex4sv (offset 149) */
+ /* _mesa_function_pool[4394]: Vertex4sv (offset 149) */
"p\0"
"glVertex4sv\0"
"\0"
- /* _mesa_function_pool[4378]: VertexAttrib4ubNV (will be remapped) */
+ /* _mesa_function_pool[4409]: VertexAttrib4ubNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4ubNV\0"
"\0"
- /* _mesa_function_pool[4405]: TextureRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[4436]: TextureRangeAPPLE (will be remapped) */
"iip\0"
"glTextureRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[4430]: GetTexEnvfv (offset 276) */
+ /* _mesa_function_pool[4461]: GetTexEnvfv (offset 276) */
"iip\0"
"glGetTexEnvfv\0"
"\0"
- /* _mesa_function_pool[4449]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[4480]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"ffffffffffff\0"
"glTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[4502]: Indexub (offset 315) */
+ /* _mesa_function_pool[4533]: Indexub (offset 315) */
"i\0"
"glIndexub\0"
"\0"
- /* _mesa_function_pool[4515]: TexEnvi (offset 186) */
+ /* _mesa_function_pool[4546]: TexEnvi (offset 186) */
"iii\0"
"glTexEnvi\0"
"\0"
- /* _mesa_function_pool[4530]: GetClipPlane (offset 259) */
+ /* _mesa_function_pool[4561]: GetClipPlane (offset 259) */
"ip\0"
"glGetClipPlane\0"
"\0"
- /* _mesa_function_pool[4549]: CombinerParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[4580]: CombinerParameterfvNV (will be remapped) */
"ip\0"
"glCombinerParameterfvNV\0"
"\0"
- /* _mesa_function_pool[4577]: VertexAttribs3dvNV (will be remapped) */
+ /* _mesa_function_pool[4608]: VertexAttribs3dvNV (will be remapped) */
"iip\0"
"glVertexAttribs3dvNV\0"
"\0"
- /* _mesa_function_pool[4603]: VertexAttribs4fvNV (will be remapped) */
+ /* _mesa_function_pool[4634]: VertexAttribs4fvNV (will be remapped) */
"iip\0"
"glVertexAttribs4fvNV\0"
"\0"
- /* _mesa_function_pool[4629]: VertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[4660]: VertexArrayRangeNV (will be remapped) */
"ip\0"
"glVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[4654]: FragmentLightiSGIX (dynamic) */
+ /* _mesa_function_pool[4685]: FragmentLightiSGIX (dynamic) */
"iii\0"
"glFragmentLightiSGIX\0"
"\0"
- /* _mesa_function_pool[4680]: PolygonOffsetEXT (will be remapped) */
+ /* _mesa_function_pool[4711]: PolygonOffsetEXT (will be remapped) */
"ff\0"
"glPolygonOffsetEXT\0"
"\0"
- /* _mesa_function_pool[4703]: PollAsyncSGIX (dynamic) */
+ /* _mesa_function_pool[4734]: PollAsyncSGIX (dynamic) */
"p\0"
"glPollAsyncSGIX\0"
"\0"
- /* _mesa_function_pool[4722]: DeleteFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[4753]: DeleteFragmentShaderATI (will be remapped) */
"i\0"
"glDeleteFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[4751]: Scaled (offset 301) */
+ /* _mesa_function_pool[4782]: Scaled (offset 301) */
"ddd\0"
"glScaled\0"
"\0"
- /* _mesa_function_pool[4765]: Scalef (offset 302) */
+ /* _mesa_function_pool[4796]: Scalef (offset 302) */
"fff\0"
"glScalef\0"
"\0"
- /* _mesa_function_pool[4779]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[4810]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[4817]: MultTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[4848]: MultTransposeMatrixdARB (will be remapped) */
"p\0"
"glMultTransposeMatrixd\0"
"glMultTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[4869]: AlphaFunc (offset 240) */
+ /* _mesa_function_pool[4900]: AlphaFunc (offset 240) */
"if\0"
"glAlphaFunc\0"
"\0"
- /* _mesa_function_pool[4885]: WindowPos2svMESA (will be remapped) */
+ /* _mesa_function_pool[4916]: WindowPos2svMESA (will be remapped) */
"p\0"
"glWindowPos2sv\0"
"glWindowPos2svARB\0"
"glWindowPos2svMESA\0"
"\0"
- /* _mesa_function_pool[4940]: EdgeFlag (offset 41) */
+ /* _mesa_function_pool[4971]: EdgeFlag (offset 41) */
"i\0"
"glEdgeFlag\0"
"\0"
- /* _mesa_function_pool[4954]: TexCoord2iv (offset 107) */
+ /* _mesa_function_pool[4985]: TexCoord2iv (offset 107) */
"p\0"
"glTexCoord2iv\0"
"\0"
- /* _mesa_function_pool[4971]: CompressedTexImage1DARB (will be remapped) */
+ /* _mesa_function_pool[5002]: CompressedTexImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexImage1D\0"
"glCompressedTexImage1DARB\0"
"\0"
- /* _mesa_function_pool[5029]: Rotated (offset 299) */
+ /* _mesa_function_pool[5060]: Rotated (offset 299) */
"dddd\0"
"glRotated\0"
"\0"
- /* _mesa_function_pool[5045]: VertexAttrib2sNV (will be remapped) */
+ /* _mesa_function_pool[5076]: VertexAttrib2sNV (will be remapped) */
"iii\0"
"glVertexAttrib2sNV\0"
"\0"
- /* _mesa_function_pool[5069]: ReadPixels (offset 256) */
+ /* _mesa_function_pool[5100]: ReadPixels (offset 256) */
"iiiiiip\0"
"glReadPixels\0"
"\0"
- /* _mesa_function_pool[5091]: EdgeFlagv (offset 42) */
+ /* _mesa_function_pool[5122]: EdgeFlagv (offset 42) */
"p\0"
"glEdgeFlagv\0"
"\0"
- /* _mesa_function_pool[5106]: NormalPointerListIBM (dynamic) */
+ /* _mesa_function_pool[5137]: NormalPointerListIBM (dynamic) */
"iipi\0"
"glNormalPointerListIBM\0"
"\0"
- /* _mesa_function_pool[5135]: IndexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[5166]: IndexPointerEXT (will be remapped) */
"iiip\0"
"glIndexPointerEXT\0"
"\0"
- /* _mesa_function_pool[5159]: Color4iv (offset 32) */
+ /* _mesa_function_pool[5190]: Color4iv (offset 32) */
"p\0"
"glColor4iv\0"
"\0"
- /* _mesa_function_pool[5173]: TexParameterf (offset 178) */
+ /* _mesa_function_pool[5204]: TexParameterf (offset 178) */
"iif\0"
"glTexParameterf\0"
"\0"
- /* _mesa_function_pool[5194]: TexParameteri (offset 180) */
+ /* _mesa_function_pool[5225]: TexParameteri (offset 180) */
"iii\0"
"glTexParameteri\0"
"\0"
- /* _mesa_function_pool[5215]: NormalPointerEXT (will be remapped) */
+ /* _mesa_function_pool[5246]: NormalPointerEXT (will be remapped) */
"iiip\0"
"glNormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[5240]: MultiTexCoord3dARB (offset 392) */
+ /* _mesa_function_pool[5271]: MultiTexCoord3dARB (offset 392) */
"iddd\0"
"glMultiTexCoord3d\0"
"glMultiTexCoord3dARB\0"
"\0"
- /* _mesa_function_pool[5285]: MultiTexCoord2iARB (offset 388) */
+ /* _mesa_function_pool[5316]: MultiTexCoord2iARB (offset 388) */
"iii\0"
"glMultiTexCoord2i\0"
"glMultiTexCoord2iARB\0"
"\0"
- /* _mesa_function_pool[5329]: DrawPixels (offset 257) */
+ /* _mesa_function_pool[5360]: DrawPixels (offset 257) */
"iiiip\0"
"glDrawPixels\0"
"\0"
- /* _mesa_function_pool[5349]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[5380]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
"iffffffff\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[5409]: MultiTexCoord2svARB (offset 391) */
+ /* _mesa_function_pool[5440]: MultiTexCoord2svARB (offset 391) */
"ip\0"
"glMultiTexCoord2sv\0"
"glMultiTexCoord2svARB\0"
"\0"
- /* _mesa_function_pool[5454]: ReplacementCodeubvSUN (dynamic) */
+ /* _mesa_function_pool[5485]: ReplacementCodeubvSUN (dynamic) */
"p\0"
"glReplacementCodeubvSUN\0"
"\0"
- /* _mesa_function_pool[5481]: Uniform3iARB (will be remapped) */
+ /* _mesa_function_pool[5512]: Uniform3iARB (will be remapped) */
"iiii\0"
"glUniform3i\0"
"glUniform3iARB\0"
"\0"
- /* _mesa_function_pool[5514]: GetFragmentMaterialfvSGIX (dynamic) */
+ /* _mesa_function_pool[5545]: GetFragmentMaterialfvSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialfvSGIX\0"
"\0"
- /* _mesa_function_pool[5547]: GetShaderInfoLog (will be remapped) */
+ /* _mesa_function_pool[5578]: GetShaderInfoLog (will be remapped) */
"iipp\0"
"glGetShaderInfoLog\0"
"\0"
- /* _mesa_function_pool[5572]: WeightivARB (dynamic) */
+ /* _mesa_function_pool[5603]: WeightivARB (dynamic) */
"ip\0"
"glWeightivARB\0"
"\0"
- /* _mesa_function_pool[5590]: PollInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[5621]: PollInstrumentsSGIX (dynamic) */
"p\0"
"glPollInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[5615]: GlobalAlphaFactordSUN (dynamic) */
+ /* _mesa_function_pool[5646]: GlobalAlphaFactordSUN (dynamic) */
"d\0"
"glGlobalAlphaFactordSUN\0"
"\0"
- /* _mesa_function_pool[5642]: GetFinalCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[5673]: GetFinalCombinerInputParameterfvNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[5684]: GenerateMipmapEXT (will be remapped) */
+ /* _mesa_function_pool[5715]: GenerateMipmapEXT (will be remapped) */
"i\0"
"glGenerateMipmap\0"
"glGenerateMipmapEXT\0"
"\0"
- /* _mesa_function_pool[5724]: GenLists (offset 5) */
+ /* _mesa_function_pool[5755]: GenLists (offset 5) */
"i\0"
"glGenLists\0"
"\0"
- /* _mesa_function_pool[5738]: SetFragmentShaderConstantATI (will be remapped) */
+ /* _mesa_function_pool[5769]: SetFragmentShaderConstantATI (will be remapped) */
"ip\0"
"glSetFragmentShaderConstantATI\0"
"\0"
- /* _mesa_function_pool[5773]: GetMapAttribParameterivNV (dynamic) */
+ /* _mesa_function_pool[5804]: GetMapAttribParameterivNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterivNV\0"
"\0"
- /* _mesa_function_pool[5807]: CreateShaderObjectARB (will be remapped) */
+ /* _mesa_function_pool[5838]: CreateShaderObjectARB (will be remapped) */
"i\0"
"glCreateShaderObjectARB\0"
"\0"
- /* _mesa_function_pool[5834]: GetSharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[5865]: GetSharpenTexFuncSGIS (dynamic) */
"ip\0"
"glGetSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[5862]: BufferDataARB (will be remapped) */
+ /* _mesa_function_pool[5893]: BufferDataARB (will be remapped) */
"iipi\0"
"glBufferData\0"
"glBufferDataARB\0"
"\0"
- /* _mesa_function_pool[5897]: FlushVertexArrayRangeNV (will be remapped) */
+ /* _mesa_function_pool[5928]: FlushVertexArrayRangeNV (will be remapped) */
"\0"
"glFlushVertexArrayRangeNV\0"
"\0"
- /* _mesa_function_pool[5925]: MapGrid2d (offset 226) */
+ /* _mesa_function_pool[5956]: MapGrid2d (offset 226) */
"iddidd\0"
"glMapGrid2d\0"
"\0"
- /* _mesa_function_pool[5945]: MapGrid2f (offset 227) */
+ /* _mesa_function_pool[5976]: MapGrid2f (offset 227) */
"iffiff\0"
"glMapGrid2f\0"
"\0"
- /* _mesa_function_pool[5965]: SampleMapATI (will be remapped) */
+ /* _mesa_function_pool[5996]: SampleMapATI (will be remapped) */
"iii\0"
"glSampleMapATI\0"
"\0"
- /* _mesa_function_pool[5985]: VertexPointerEXT (will be remapped) */
+ /* _mesa_function_pool[6016]: VertexPointerEXT (will be remapped) */
"iiiip\0"
"glVertexPointerEXT\0"
"\0"
- /* _mesa_function_pool[6011]: GetTexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[6042]: GetTexFilterFuncSGIS (dynamic) */
"iip\0"
"glGetTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[6039]: Scissor (offset 176) */
+ /* _mesa_function_pool[6070]: Scissor (offset 176) */
"iiii\0"
"glScissor\0"
"\0"
- /* _mesa_function_pool[6055]: Fogf (offset 153) */
+ /* _mesa_function_pool[6086]: Fogf (offset 153) */
"if\0"
"glFogf\0"
"\0"
- /* _mesa_function_pool[6066]: GetCombinerOutputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[6097]: GetCombinerOutputParameterfvNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[6105]: TexSubImage1D (offset 332) */
+ /* _mesa_function_pool[6136]: TexSubImage1D (offset 332) */
"iiiiiip\0"
"glTexSubImage1D\0"
"glTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[6149]: VertexAttrib1sARB (will be remapped) */
+ /* _mesa_function_pool[6180]: VertexAttrib1sARB (will be remapped) */
"ii\0"
"glVertexAttrib1s\0"
"glVertexAttrib1sARB\0"
"\0"
- /* _mesa_function_pool[6190]: FenceSync (will be remapped) */
+ /* _mesa_function_pool[6221]: FenceSync (will be remapped) */
"ii\0"
"glFenceSync\0"
"\0"
- /* _mesa_function_pool[6206]: Color4usv (offset 40) */
+ /* _mesa_function_pool[6237]: Color4usv (offset 40) */
"p\0"
"glColor4usv\0"
"\0"
- /* _mesa_function_pool[6221]: Fogi (offset 155) */
+ /* _mesa_function_pool[6252]: Fogi (offset 155) */
"ii\0"
"glFogi\0"
"\0"
- /* _mesa_function_pool[6232]: DepthRange (offset 288) */
+ /* _mesa_function_pool[6263]: DepthRange (offset 288) */
"dd\0"
"glDepthRange\0"
"\0"
- /* _mesa_function_pool[6249]: RasterPos3iv (offset 75) */
+ /* _mesa_function_pool[6280]: RasterPos3iv (offset 75) */
"p\0"
"glRasterPos3iv\0"
"\0"
- /* _mesa_function_pool[6267]: FinalCombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[6298]: FinalCombinerInputNV (will be remapped) */
"iiii\0"
"glFinalCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[6296]: TexCoord2i (offset 106) */
+ /* _mesa_function_pool[6327]: TexCoord2i (offset 106) */
"ii\0"
"glTexCoord2i\0"
"\0"
- /* _mesa_function_pool[6313]: PixelMapfv (offset 251) */
+ /* _mesa_function_pool[6344]: PixelMapfv (offset 251) */
"iip\0"
"glPixelMapfv\0"
"\0"
- /* _mesa_function_pool[6331]: Color4ui (offset 37) */
+ /* _mesa_function_pool[6362]: Color4ui (offset 37) */
"iiii\0"
"glColor4ui\0"
"\0"
- /* _mesa_function_pool[6348]: RasterPos3s (offset 76) */
+ /* _mesa_function_pool[6379]: RasterPos3s (offset 76) */
"iii\0"
"glRasterPos3s\0"
"\0"
- /* _mesa_function_pool[6367]: Color3usv (offset 24) */
+ /* _mesa_function_pool[6398]: Color3usv (offset 24) */
"p\0"
"glColor3usv\0"
"\0"
- /* _mesa_function_pool[6382]: FlushRasterSGIX (dynamic) */
+ /* _mesa_function_pool[6413]: FlushRasterSGIX (dynamic) */
"\0"
"glFlushRasterSGIX\0"
"\0"
- /* _mesa_function_pool[6402]: TexCoord2f (offset 104) */
+ /* _mesa_function_pool[6433]: TexCoord2f (offset 104) */
"ff\0"
"glTexCoord2f\0"
"\0"
- /* _mesa_function_pool[6419]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[6450]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
"ifffff\0"
"glReplacementCodeuiTexCoord2fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[6468]: TexCoord2d (offset 102) */
+ /* _mesa_function_pool[6499]: TexCoord2d (offset 102) */
"dd\0"
"glTexCoord2d\0"
"\0"
- /* _mesa_function_pool[6485]: RasterPos3d (offset 70) */
+ /* _mesa_function_pool[6516]: RasterPos3d (offset 70) */
"ddd\0"
"glRasterPos3d\0"
"\0"
- /* _mesa_function_pool[6504]: RasterPos3f (offset 72) */
+ /* _mesa_function_pool[6535]: RasterPos3f (offset 72) */
"fff\0"
"glRasterPos3f\0"
"\0"
- /* _mesa_function_pool[6523]: Uniform1fARB (will be remapped) */
+ /* _mesa_function_pool[6554]: Uniform1fARB (will be remapped) */
"if\0"
"glUniform1f\0"
"glUniform1fARB\0"
"\0"
- /* _mesa_function_pool[6554]: AreTexturesResident (offset 322) */
+ /* _mesa_function_pool[6585]: AreTexturesResident (offset 322) */
"ipp\0"
"glAreTexturesResident\0"
"glAreTexturesResidentEXT\0"
"\0"
- /* _mesa_function_pool[6606]: TexCoord2s (offset 108) */
+ /* _mesa_function_pool[6637]: TexCoord2s (offset 108) */
"ii\0"
"glTexCoord2s\0"
"\0"
- /* _mesa_function_pool[6623]: StencilOpSeparate (will be remapped) */
+ /* _mesa_function_pool[6654]: StencilOpSeparate (will be remapped) */
"iiii\0"
"glStencilOpSeparate\0"
"glStencilOpSeparateATI\0"
"\0"
- /* _mesa_function_pool[6672]: ColorTableParameteriv (offset 341) */
+ /* _mesa_function_pool[6703]: ColorTableParameteriv (offset 341) */
"iip\0"
"glColorTableParameteriv\0"
"glColorTableParameterivSGI\0"
"\0"
- /* _mesa_function_pool[6728]: FogCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[6759]: FogCoordPointerListIBM (dynamic) */
"iipi\0"
"glFogCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[6759]: WindowPos3dMESA (will be remapped) */
+ /* _mesa_function_pool[6790]: WindowPos3dMESA (will be remapped) */
"ddd\0"
"glWindowPos3d\0"
"glWindowPos3dARB\0"
"glWindowPos3dMESA\0"
"\0"
- /* _mesa_function_pool[6813]: Color4us (offset 39) */
+ /* _mesa_function_pool[6844]: Color4us (offset 39) */
"iiii\0"
"glColor4us\0"
"\0"
- /* _mesa_function_pool[6830]: PointParameterfvEXT (will be remapped) */
+ /* _mesa_function_pool[6861]: PointParameterfvEXT (will be remapped) */
"ip\0"
"glPointParameterfv\0"
"glPointParameterfvARB\0"
"glPointParameterfvEXT\0"
"glPointParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[6920]: Color3bv (offset 10) */
+ /* _mesa_function_pool[6951]: Color3bv (offset 10) */
"p\0"
"glColor3bv\0"
"\0"
- /* _mesa_function_pool[6934]: WindowPos2fvMESA (will be remapped) */
+ /* _mesa_function_pool[6965]: WindowPos2fvMESA (will be remapped) */
"p\0"
"glWindowPos2fv\0"
"glWindowPos2fvARB\0"
"glWindowPos2fvMESA\0"
"\0"
- /* _mesa_function_pool[6989]: SecondaryColor3bvEXT (will be remapped) */
+ /* _mesa_function_pool[7020]: SecondaryColor3bvEXT (will be remapped) */
"p\0"
"glSecondaryColor3bv\0"
"glSecondaryColor3bvEXT\0"
"\0"
- /* _mesa_function_pool[7035]: VertexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[7066]: VertexPointerListIBM (dynamic) */
"iiipi\0"
"glVertexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[7065]: GetProgramLocalParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[7096]: GetProgramLocalParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterfvARB\0"
"\0"
- /* _mesa_function_pool[7102]: FragmentMaterialfSGIX (dynamic) */
+ /* _mesa_function_pool[7133]: FragmentMaterialfSGIX (dynamic) */
"iif\0"
"glFragmentMaterialfSGIX\0"
"\0"
- /* _mesa_function_pool[7131]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[7162]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7173]: RenderbufferStorageEXT (will be remapped) */
+ /* _mesa_function_pool[7204]: RenderbufferStorageEXT (will be remapped) */
"iiii\0"
"glRenderbufferStorage\0"
"glRenderbufferStorageEXT\0"
"\0"
- /* _mesa_function_pool[7226]: IsFenceNV (will be remapped) */
+ /* _mesa_function_pool[7257]: IsFenceNV (will be remapped) */
"i\0"
"glIsFenceNV\0"
"\0"
- /* _mesa_function_pool[7241]: AttachObjectARB (will be remapped) */
+ /* _mesa_function_pool[7272]: AttachObjectARB (will be remapped) */
"ii\0"
"glAttachObjectARB\0"
"\0"
- /* _mesa_function_pool[7263]: GetFragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[7294]: GetFragmentLightivSGIX (dynamic) */
"iip\0"
"glGetFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[7293]: UniformMatrix2fvARB (will be remapped) */
+ /* _mesa_function_pool[7324]: UniformMatrix2fvARB (will be remapped) */
"iiip\0"
"glUniformMatrix2fv\0"
"glUniformMatrix2fvARB\0"
"\0"
- /* _mesa_function_pool[7340]: MultiTexCoord2fARB (offset 386) */
+ /* _mesa_function_pool[7371]: MultiTexCoord2fARB (offset 386) */
"iff\0"
"glMultiTexCoord2f\0"
"glMultiTexCoord2fARB\0"
"\0"
- /* _mesa_function_pool[7384]: ColorTable (offset 339) */
+ /* _mesa_function_pool[7415]: ColorTable (offset 339) */
"iiiiip\0"
"glColorTable\0"
"glColorTableSGI\0"
"glColorTableEXT\0"
"\0"
- /* _mesa_function_pool[7437]: IndexPointer (offset 314) */
+ /* _mesa_function_pool[7468]: IndexPointer (offset 314) */
"iip\0"
"glIndexPointer\0"
"\0"
- /* _mesa_function_pool[7457]: Accum (offset 213) */
+ /* _mesa_function_pool[7488]: Accum (offset 213) */
"if\0"
"glAccum\0"
"\0"
- /* _mesa_function_pool[7469]: GetTexImage (offset 281) */
+ /* _mesa_function_pool[7500]: GetTexImage (offset 281) */
"iiiip\0"
"glGetTexImage\0"
"\0"
- /* _mesa_function_pool[7490]: MapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[7521]: MapControlPointsNV (dynamic) */
"iiiiiiiip\0"
"glMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[7522]: ConvolutionFilter2D (offset 349) */
+ /* _mesa_function_pool[7553]: ConvolutionFilter2D (offset 349) */
"iiiiiip\0"
"glConvolutionFilter2D\0"
"glConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[7578]: Finish (offset 216) */
+ /* _mesa_function_pool[7609]: Finish (offset 216) */
"\0"
"glFinish\0"
"\0"
- /* _mesa_function_pool[7589]: MapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[7620]: MapParameterfvNV (dynamic) */
"iip\0"
"glMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[7613]: ClearStencil (offset 207) */
+ /* _mesa_function_pool[7644]: ClearStencil (offset 207) */
"i\0"
"glClearStencil\0"
"\0"
- /* _mesa_function_pool[7631]: VertexAttrib3dvARB (will be remapped) */
+ /* _mesa_function_pool[7662]: VertexAttrib3dvARB (will be remapped) */
"ip\0"
"glVertexAttrib3dv\0"
"glVertexAttrib3dvARB\0"
"\0"
- /* _mesa_function_pool[7674]: HintPGI (dynamic) */
+ /* _mesa_function_pool[7705]: HintPGI (dynamic) */
"ii\0"
"glHintPGI\0"
"\0"
- /* _mesa_function_pool[7688]: ConvolutionParameteriv (offset 353) */
+ /* _mesa_function_pool[7719]: ConvolutionParameteriv (offset 353) */
"iip\0"
"glConvolutionParameteriv\0"
"glConvolutionParameterivEXT\0"
"\0"
- /* _mesa_function_pool[7746]: Color4s (offset 33) */
+ /* _mesa_function_pool[7777]: Color4s (offset 33) */
"iiii\0"
"glColor4s\0"
"\0"
- /* _mesa_function_pool[7762]: InterleavedArrays (offset 317) */
+ /* _mesa_function_pool[7793]: InterleavedArrays (offset 317) */
"iip\0"
"glInterleavedArrays\0"
"\0"
- /* _mesa_function_pool[7787]: RasterPos2fv (offset 65) */
+ /* _mesa_function_pool[7818]: RasterPos2fv (offset 65) */
"p\0"
"glRasterPos2fv\0"
"\0"
- /* _mesa_function_pool[7805]: TexCoord1fv (offset 97) */
+ /* _mesa_function_pool[7836]: TexCoord1fv (offset 97) */
"p\0"
"glTexCoord1fv\0"
"\0"
- /* _mesa_function_pool[7822]: Vertex2d (offset 126) */
+ /* _mesa_function_pool[7853]: Vertex2d (offset 126) */
"dd\0"
"glVertex2d\0"
"\0"
- /* _mesa_function_pool[7837]: CullParameterdvEXT (will be remapped) */
+ /* _mesa_function_pool[7868]: CullParameterdvEXT (will be remapped) */
"ip\0"
"glCullParameterdvEXT\0"
"\0"
- /* _mesa_function_pool[7862]: ProgramNamedParameter4fNV (will be remapped) */
+ /* _mesa_function_pool[7893]: ProgramNamedParameter4fNV (will be remapped) */
"iipffff\0"
"glProgramNamedParameter4fNV\0"
"\0"
- /* _mesa_function_pool[7899]: Color3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[7930]: Color3fVertex3fSUN (dynamic) */
"ffffff\0"
"glColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[7928]: ProgramEnvParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[7959]: ProgramEnvParameter4fvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4fvARB\0"
"glProgramParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[7985]: Color4i (offset 31) */
+ /* _mesa_function_pool[8016]: Color4i (offset 31) */
"iiii\0"
"glColor4i\0"
"\0"
- /* _mesa_function_pool[8001]: Color4f (offset 29) */
+ /* _mesa_function_pool[8032]: Color4f (offset 29) */
"ffff\0"
"glColor4f\0"
"\0"
- /* _mesa_function_pool[8017]: RasterPos4fv (offset 81) */
+ /* _mesa_function_pool[8048]: RasterPos4fv (offset 81) */
"p\0"
"glRasterPos4fv\0"
"\0"
- /* _mesa_function_pool[8035]: Color4d (offset 27) */
+ /* _mesa_function_pool[8066]: Color4d (offset 27) */
"dddd\0"
"glColor4d\0"
"\0"
- /* _mesa_function_pool[8051]: ClearIndex (offset 205) */
+ /* _mesa_function_pool[8082]: ClearIndex (offset 205) */
"f\0"
"glClearIndex\0"
"\0"
- /* _mesa_function_pool[8067]: Color4b (offset 25) */
+ /* _mesa_function_pool[8098]: Color4b (offset 25) */
"iiii\0"
"glColor4b\0"
"\0"
- /* _mesa_function_pool[8083]: LoadMatrixd (offset 292) */
+ /* _mesa_function_pool[8114]: LoadMatrixd (offset 292) */
"p\0"
"glLoadMatrixd\0"
"\0"
- /* _mesa_function_pool[8100]: FragmentLightModeliSGIX (dynamic) */
+ /* _mesa_function_pool[8131]: FragmentLightModeliSGIX (dynamic) */
"ii\0"
"glFragmentLightModeliSGIX\0"
"\0"
- /* _mesa_function_pool[8130]: RasterPos2dv (offset 63) */
+ /* _mesa_function_pool[8161]: RasterPos2dv (offset 63) */
"p\0"
"glRasterPos2dv\0"
"\0"
- /* _mesa_function_pool[8148]: ConvolutionParameterfv (offset 351) */
+ /* _mesa_function_pool[8179]: ConvolutionParameterfv (offset 351) */
"iip\0"
"glConvolutionParameterfv\0"
"glConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[8206]: TbufferMask3DFX (dynamic) */
+ /* _mesa_function_pool[8237]: TbufferMask3DFX (dynamic) */
"i\0"
"glTbufferMask3DFX\0"
"\0"
- /* _mesa_function_pool[8227]: GetTexGendv (offset 278) */
+ /* _mesa_function_pool[8258]: GetTexGendv (offset 278) */
"iip\0"
"glGetTexGendv\0"
"\0"
- /* _mesa_function_pool[8246]: LoadProgramNV (will be remapped) */
+ /* _mesa_function_pool[8277]: ColorMaskIndexedEXT (will be remapped) */
+ "iiiii\0"
+ "glColorMaskIndexedEXT\0"
+ "\0"
+ /* _mesa_function_pool[8306]: LoadProgramNV (will be remapped) */
"iiip\0"
"glLoadProgramNV\0"
"\0"
- /* _mesa_function_pool[8268]: WaitSync (will be remapped) */
+ /* _mesa_function_pool[8328]: WaitSync (will be remapped) */
"iii\0"
"glWaitSync\0"
"\0"
- /* _mesa_function_pool[8284]: EndList (offset 1) */
+ /* _mesa_function_pool[8344]: EndList (offset 1) */
"\0"
"glEndList\0"
"\0"
- /* _mesa_function_pool[8296]: VertexAttrib4fvNV (will be remapped) */
+ /* _mesa_function_pool[8356]: VertexAttrib4fvNV (will be remapped) */
"ip\0"
"glVertexAttrib4fvNV\0"
"\0"
- /* _mesa_function_pool[8320]: GetAttachedObjectsARB (will be remapped) */
+ /* _mesa_function_pool[8380]: GetAttachedObjectsARB (will be remapped) */
"iipp\0"
"glGetAttachedObjectsARB\0"
"\0"
- /* _mesa_function_pool[8350]: Uniform3fvARB (will be remapped) */
+ /* _mesa_function_pool[8410]: Uniform3fvARB (will be remapped) */
"iip\0"
"glUniform3fv\0"
"glUniform3fvARB\0"
"\0"
- /* _mesa_function_pool[8384]: EvalCoord1fv (offset 231) */
+ /* _mesa_function_pool[8444]: EvalCoord1fv (offset 231) */
"p\0"
"glEvalCoord1fv\0"
"\0"
- /* _mesa_function_pool[8402]: DrawRangeElements (offset 338) */
+ /* _mesa_function_pool[8462]: DrawRangeElements (offset 338) */
"iiiiip\0"
"glDrawRangeElements\0"
"glDrawRangeElementsEXT\0"
"\0"
- /* _mesa_function_pool[8453]: EvalMesh2 (offset 238) */
+ /* _mesa_function_pool[8513]: EvalMesh2 (offset 238) */
"iiiii\0"
"glEvalMesh2\0"
"\0"
- /* _mesa_function_pool[8472]: Vertex4fv (offset 145) */
+ /* _mesa_function_pool[8532]: Vertex4fv (offset 145) */
"p\0"
"glVertex4fv\0"
"\0"
- /* _mesa_function_pool[8487]: SpriteParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[8547]: SpriteParameterfvSGIX (dynamic) */
"ip\0"
"glSpriteParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[8515]: CheckFramebufferStatusEXT (will be remapped) */
+ /* _mesa_function_pool[8575]: CheckFramebufferStatusEXT (will be remapped) */
"i\0"
"glCheckFramebufferStatus\0"
"glCheckFramebufferStatusEXT\0"
"\0"
- /* _mesa_function_pool[8571]: GlobalAlphaFactoruiSUN (dynamic) */
+ /* _mesa_function_pool[8631]: GlobalAlphaFactoruiSUN (dynamic) */
"i\0"
"glGlobalAlphaFactoruiSUN\0"
"\0"
- /* _mesa_function_pool[8599]: GetHandleARB (will be remapped) */
+ /* _mesa_function_pool[8659]: GetHandleARB (will be remapped) */
"i\0"
"glGetHandleARB\0"
"\0"
- /* _mesa_function_pool[8617]: GetVertexAttribivARB (will be remapped) */
+ /* _mesa_function_pool[8677]: GetVertexAttribivARB (will be remapped) */
"iip\0"
"glGetVertexAttribiv\0"
"glGetVertexAttribivARB\0"
"\0"
- /* _mesa_function_pool[8665]: GetCombinerInputParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[8725]: GetCombinerInputParameterfvNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterfvNV\0"
"\0"
- /* _mesa_function_pool[8704]: CreateProgram (will be remapped) */
+ /* _mesa_function_pool[8764]: CreateProgram (will be remapped) */
"\0"
"glCreateProgram\0"
"\0"
- /* _mesa_function_pool[8722]: LoadTransposeMatrixdARB (will be remapped) */
+ /* _mesa_function_pool[8782]: LoadTransposeMatrixdARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixd\0"
"glLoadTransposeMatrixdARB\0"
"\0"
- /* _mesa_function_pool[8774]: GetMinmax (offset 364) */
+ /* _mesa_function_pool[8834]: GetMinmax (offset 364) */
"iiiip\0"
"glGetMinmax\0"
"glGetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[8808]: StencilFuncSeparate (will be remapped) */
+ /* _mesa_function_pool[8868]: StencilFuncSeparate (will be remapped) */
"iiii\0"
"glStencilFuncSeparate\0"
"\0"
- /* _mesa_function_pool[8836]: SecondaryColor3sEXT (will be remapped) */
+ /* _mesa_function_pool[8896]: SecondaryColor3sEXT (will be remapped) */
"iii\0"
"glSecondaryColor3s\0"
"glSecondaryColor3sEXT\0"
"\0"
- /* _mesa_function_pool[8882]: Color3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[8942]: Color3fVertex3fvSUN (dynamic) */
"pp\0"
"glColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[8908]: Normal3fv (offset 57) */
+ /* _mesa_function_pool[8968]: Normal3fv (offset 57) */
"p\0"
"glNormal3fv\0"
"\0"
- /* _mesa_function_pool[8923]: GlobalAlphaFactorbSUN (dynamic) */
+ /* _mesa_function_pool[8983]: GlobalAlphaFactorbSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorbSUN\0"
"\0"
- /* _mesa_function_pool[8950]: Color3us (offset 23) */
+ /* _mesa_function_pool[9010]: Color3us (offset 23) */
"iii\0"
"glColor3us\0"
"\0"
- /* _mesa_function_pool[8966]: ImageTransformParameterfvHP (dynamic) */
+ /* _mesa_function_pool[9026]: ImageTransformParameterfvHP (dynamic) */
"iip\0"
"glImageTransformParameterfvHP\0"
"\0"
- /* _mesa_function_pool[9001]: VertexAttrib4ivARB (will be remapped) */
+ /* _mesa_function_pool[9061]: VertexAttrib4ivARB (will be remapped) */
"ip\0"
"glVertexAttrib4iv\0"
"glVertexAttrib4ivARB\0"
"\0"
- /* _mesa_function_pool[9044]: End (offset 43) */
+ /* _mesa_function_pool[9104]: End (offset 43) */
"\0"
"glEnd\0"
"\0"
- /* _mesa_function_pool[9052]: VertexAttrib3fNV (will be remapped) */
+ /* _mesa_function_pool[9112]: VertexAttrib3fNV (will be remapped) */
"ifff\0"
"glVertexAttrib3fNV\0"
"\0"
- /* _mesa_function_pool[9077]: VertexAttribs2dvNV (will be remapped) */
+ /* _mesa_function_pool[9137]: VertexAttribs2dvNV (will be remapped) */
"iip\0"
"glVertexAttribs2dvNV\0"
"\0"
- /* _mesa_function_pool[9103]: GetQueryObjectui64vEXT (will be remapped) */
+ /* _mesa_function_pool[9163]: GetQueryObjectui64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjectui64vEXT\0"
"\0"
- /* _mesa_function_pool[9133]: MultiTexCoord3fvARB (offset 395) */
+ /* _mesa_function_pool[9193]: MultiTexCoord3fvARB (offset 395) */
"ip\0"
"glMultiTexCoord3fv\0"
"glMultiTexCoord3fvARB\0"
"\0"
- /* _mesa_function_pool[9178]: SecondaryColor3dEXT (will be remapped) */
+ /* _mesa_function_pool[9238]: SecondaryColor3dEXT (will be remapped) */
"ddd\0"
"glSecondaryColor3d\0"
"glSecondaryColor3dEXT\0"
"\0"
- /* _mesa_function_pool[9224]: Color3ub (offset 19) */
+ /* _mesa_function_pool[9284]: Color3ub (offset 19) */
"iii\0"
"glColor3ub\0"
"\0"
- /* _mesa_function_pool[9240]: GetProgramParameterfvNV (will be remapped) */
+ /* _mesa_function_pool[9300]: GetProgramParameterfvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterfvNV\0"
"\0"
- /* _mesa_function_pool[9272]: TangentPointerEXT (dynamic) */
+ /* _mesa_function_pool[9332]: TangentPointerEXT (dynamic) */
"iip\0"
"glTangentPointerEXT\0"
"\0"
- /* _mesa_function_pool[9297]: Color4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[9357]: Color4fNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[9332]: GetInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[9392]: GetInstrumentsSGIX (dynamic) */
"\0"
"glGetInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[9355]: Color3ui (offset 21) */
+ /* _mesa_function_pool[9415]: Color3ui (offset 21) */
"iii\0"
"glColor3ui\0"
"\0"
- /* _mesa_function_pool[9371]: EvalMapsNV (dynamic) */
+ /* _mesa_function_pool[9431]: EvalMapsNV (dynamic) */
"ii\0"
"glEvalMapsNV\0"
"\0"
- /* _mesa_function_pool[9388]: TexSubImage2D (offset 333) */
+ /* _mesa_function_pool[9448]: TexSubImage2D (offset 333) */
"iiiiiiiip\0"
"glTexSubImage2D\0"
"glTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[9434]: FragmentLightivSGIX (dynamic) */
+ /* _mesa_function_pool[9494]: FragmentLightivSGIX (dynamic) */
"iip\0"
"glFragmentLightivSGIX\0"
"\0"
- /* _mesa_function_pool[9461]: GetTexParameterPointervAPPLE (will be remapped) */
+ /* _mesa_function_pool[9521]: GetTexParameterPointervAPPLE (will be remapped) */
"iip\0"
"glGetTexParameterPointervAPPLE\0"
"\0"
- /* _mesa_function_pool[9497]: TexGenfv (offset 191) */
+ /* _mesa_function_pool[9557]: TexGenfv (offset 191) */
"iip\0"
"glTexGenfv\0"
"\0"
- /* _mesa_function_pool[9513]: PixelTransformParameterfvEXT (dynamic) */
+ /* _mesa_function_pool[9573]: PixelTransformParameterfvEXT (dynamic) */
"iip\0"
"glPixelTransformParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[9549]: VertexAttrib4bvARB (will be remapped) */
+ /* _mesa_function_pool[9609]: VertexAttrib4bvARB (will be remapped) */
"ip\0"
"glVertexAttrib4bv\0"
"glVertexAttrib4bvARB\0"
"\0"
- /* _mesa_function_pool[9592]: AlphaFragmentOp2ATI (will be remapped) */
+ /* _mesa_function_pool[9652]: AlphaFragmentOp2ATI (will be remapped) */
"iiiiiiiii\0"
"glAlphaFragmentOp2ATI\0"
"\0"
- /* _mesa_function_pool[9625]: MultiTexCoord4sARB (offset 406) */
+ /* _mesa_function_pool[9685]: GetIntegerIndexedvEXT (will be remapped) */
+ "iip\0"
+ "glGetIntegerIndexedvEXT\0"
+ "\0"
+ /* _mesa_function_pool[9714]: MultiTexCoord4sARB (offset 406) */
"iiiii\0"
"glMultiTexCoord4s\0"
"glMultiTexCoord4sARB\0"
"\0"
- /* _mesa_function_pool[9671]: GetFragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[9760]: GetFragmentMaterialivSGIX (dynamic) */
"iip\0"
"glGetFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[9704]: WindowPos4dMESA (will be remapped) */
+ /* _mesa_function_pool[9793]: WindowPos4dMESA (will be remapped) */
"dddd\0"
"glWindowPos4dMESA\0"
"\0"
- /* _mesa_function_pool[9728]: WeightPointerARB (dynamic) */
+ /* _mesa_function_pool[9817]: WeightPointerARB (dynamic) */
"iiip\0"
"glWeightPointerARB\0"
"\0"
- /* _mesa_function_pool[9753]: WindowPos2dMESA (will be remapped) */
+ /* _mesa_function_pool[9842]: WindowPos2dMESA (will be remapped) */
"dd\0"
"glWindowPos2d\0"
"glWindowPos2dARB\0"
"glWindowPos2dMESA\0"
"\0"
- /* _mesa_function_pool[9806]: FramebufferTexture3DEXT (will be remapped) */
+ /* _mesa_function_pool[9895]: FramebufferTexture3DEXT (will be remapped) */
"iiiiii\0"
"glFramebufferTexture3D\0"
"glFramebufferTexture3DEXT\0"
"\0"
- /* _mesa_function_pool[9863]: BlendEquation (offset 337) */
+ /* _mesa_function_pool[9952]: BlendEquation (offset 337) */
"i\0"
"glBlendEquation\0"
"glBlendEquationEXT\0"
"\0"
- /* _mesa_function_pool[9901]: VertexAttrib3dNV (will be remapped) */
+ /* _mesa_function_pool[9990]: VertexAttrib3dNV (will be remapped) */
"iddd\0"
"glVertexAttrib3dNV\0"
"\0"
- /* _mesa_function_pool[9926]: VertexAttrib3dARB (will be remapped) */
+ /* _mesa_function_pool[10015]: VertexAttrib3dARB (will be remapped) */
"iddd\0"
"glVertexAttrib3d\0"
"glVertexAttrib3dARB\0"
"\0"
- /* _mesa_function_pool[9969]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[10058]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"ppppp\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[10033]: VertexAttrib4fARB (will be remapped) */
+ /* _mesa_function_pool[10122]: VertexAttrib4fARB (will be remapped) */
"iffff\0"
"glVertexAttrib4f\0"
"glVertexAttrib4fARB\0"
"\0"
- /* _mesa_function_pool[10077]: GetError (offset 261) */
+ /* _mesa_function_pool[10166]: GetError (offset 261) */
"\0"
"glGetError\0"
"\0"
- /* _mesa_function_pool[10090]: IndexFuncEXT (dynamic) */
+ /* _mesa_function_pool[10179]: IndexFuncEXT (dynamic) */
"if\0"
"glIndexFuncEXT\0"
"\0"
- /* _mesa_function_pool[10109]: TexCoord3dv (offset 111) */
+ /* _mesa_function_pool[10198]: TexCoord3dv (offset 111) */
"p\0"
"glTexCoord3dv\0"
"\0"
- /* _mesa_function_pool[10126]: Indexdv (offset 45) */
+ /* _mesa_function_pool[10215]: Indexdv (offset 45) */
"p\0"
"glIndexdv\0"
"\0"
- /* _mesa_function_pool[10139]: FramebufferTexture2DEXT (will be remapped) */
+ /* _mesa_function_pool[10228]: FramebufferTexture2DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture2D\0"
"glFramebufferTexture2DEXT\0"
"\0"
- /* _mesa_function_pool[10195]: Normal3s (offset 60) */
+ /* _mesa_function_pool[10284]: Normal3s (offset 60) */
"iii\0"
"glNormal3s\0"
"\0"
- /* _mesa_function_pool[10211]: PushName (offset 201) */
+ /* _mesa_function_pool[10300]: PushName (offset 201) */
"i\0"
"glPushName\0"
"\0"
- /* _mesa_function_pool[10225]: MultiTexCoord2dvARB (offset 385) */
+ /* _mesa_function_pool[10314]: MultiTexCoord2dvARB (offset 385) */
"ip\0"
"glMultiTexCoord2dv\0"
"glMultiTexCoord2dvARB\0"
"\0"
- /* _mesa_function_pool[10270]: CullParameterfvEXT (will be remapped) */
+ /* _mesa_function_pool[10359]: CullParameterfvEXT (will be remapped) */
"ip\0"
"glCullParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[10295]: Normal3i (offset 58) */
+ /* _mesa_function_pool[10384]: Normal3i (offset 58) */
"iii\0"
"glNormal3i\0"
"\0"
- /* _mesa_function_pool[10311]: ProgramNamedParameter4fvNV (will be remapped) */
+ /* _mesa_function_pool[10400]: ProgramNamedParameter4fvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4fvNV\0"
"\0"
- /* _mesa_function_pool[10346]: SecondaryColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[10435]: SecondaryColorPointerEXT (will be remapped) */
"iiip\0"
"glSecondaryColorPointer\0"
"glSecondaryColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[10403]: VertexAttrib4fvARB (will be remapped) */
+ /* _mesa_function_pool[10492]: VertexAttrib4fvARB (will be remapped) */
"ip\0"
"glVertexAttrib4fv\0"
"glVertexAttrib4fvARB\0"
"\0"
- /* _mesa_function_pool[10446]: ColorPointerListIBM (dynamic) */
+ /* _mesa_function_pool[10535]: ColorPointerListIBM (dynamic) */
"iiipi\0"
"glColorPointerListIBM\0"
"\0"
- /* _mesa_function_pool[10475]: GetActiveUniformARB (will be remapped) */
+ /* _mesa_function_pool[10564]: GetActiveUniformARB (will be remapped) */
"iiipppp\0"
"glGetActiveUniform\0"
"glGetActiveUniformARB\0"
"\0"
- /* _mesa_function_pool[10525]: ImageTransformParameteriHP (dynamic) */
+ /* _mesa_function_pool[10614]: ImageTransformParameteriHP (dynamic) */
"iii\0"
"glImageTransformParameteriHP\0"
"\0"
- /* _mesa_function_pool[10559]: Normal3b (offset 52) */
+ /* _mesa_function_pool[10648]: Normal3b (offset 52) */
"iii\0"
"glNormal3b\0"
"\0"
- /* _mesa_function_pool[10575]: Normal3d (offset 54) */
+ /* _mesa_function_pool[10664]: Normal3d (offset 54) */
"ddd\0"
"glNormal3d\0"
"\0"
- /* _mesa_function_pool[10591]: Normal3f (offset 56) */
+ /* _mesa_function_pool[10680]: Normal3f (offset 56) */
"fff\0"
"glNormal3f\0"
"\0"
- /* _mesa_function_pool[10607]: MultiTexCoord1svARB (offset 383) */
+ /* _mesa_function_pool[10696]: MultiTexCoord1svARB (offset 383) */
"ip\0"
"glMultiTexCoord1sv\0"
"glMultiTexCoord1svARB\0"
"\0"
- /* _mesa_function_pool[10652]: Indexi (offset 48) */
+ /* _mesa_function_pool[10741]: Indexi (offset 48) */
"i\0"
"glIndexi\0"
"\0"
- /* _mesa_function_pool[10664]: EndQueryARB (will be remapped) */
+ /* _mesa_function_pool[10753]: EndQueryARB (will be remapped) */
"i\0"
"glEndQuery\0"
"glEndQueryARB\0"
"\0"
- /* _mesa_function_pool[10692]: DeleteFencesNV (will be remapped) */
+ /* _mesa_function_pool[10781]: DeleteFencesNV (will be remapped) */
"ip\0"
"glDeleteFencesNV\0"
"\0"
- /* _mesa_function_pool[10713]: DeformationMap3dSGIX (dynamic) */
+ /* _mesa_function_pool[10802]: DeformationMap3dSGIX (dynamic) */
"iddiiddiiddiip\0"
"glDeformationMap3dSGIX\0"
"\0"
- /* _mesa_function_pool[10752]: DepthMask (offset 211) */
+ /* _mesa_function_pool[10841]: DepthMask (offset 211) */
"i\0"
"glDepthMask\0"
"\0"
- /* _mesa_function_pool[10767]: IsShader (will be remapped) */
+ /* _mesa_function_pool[10856]: IsShader (will be remapped) */
"i\0"
"glIsShader\0"
"\0"
- /* _mesa_function_pool[10781]: Indexf (offset 46) */
+ /* _mesa_function_pool[10870]: Indexf (offset 46) */
"f\0"
"glIndexf\0"
"\0"
- /* _mesa_function_pool[10793]: GetImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[10882]: GetImageTransformParameterivHP (dynamic) */
"iip\0"
"glGetImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[10831]: Indexd (offset 44) */
+ /* _mesa_function_pool[10920]: Indexd (offset 44) */
"d\0"
"glIndexd\0"
"\0"
- /* _mesa_function_pool[10843]: GetMaterialiv (offset 270) */
+ /* _mesa_function_pool[10932]: GetMaterialiv (offset 270) */
"iip\0"
"glGetMaterialiv\0"
"\0"
- /* _mesa_function_pool[10864]: StencilOp (offset 244) */
+ /* _mesa_function_pool[10953]: StencilOp (offset 244) */
"iii\0"
"glStencilOp\0"
"\0"
- /* _mesa_function_pool[10881]: WindowPos4ivMESA (will be remapped) */
+ /* _mesa_function_pool[10970]: WindowPos4ivMESA (will be remapped) */
"p\0"
"glWindowPos4ivMESA\0"
"\0"
- /* _mesa_function_pool[10903]: MultiTexCoord3svARB (offset 399) */
+ /* _mesa_function_pool[10992]: MultiTexCoord3svARB (offset 399) */
"ip\0"
"glMultiTexCoord3sv\0"
"glMultiTexCoord3svARB\0"
"\0"
- /* _mesa_function_pool[10948]: TexEnvfv (offset 185) */
+ /* _mesa_function_pool[11037]: TexEnvfv (offset 185) */
"iip\0"
"glTexEnvfv\0"
"\0"
- /* _mesa_function_pool[10964]: MultiTexCoord4iARB (offset 404) */
+ /* _mesa_function_pool[11053]: MultiTexCoord4iARB (offset 404) */
"iiiii\0"
"glMultiTexCoord4i\0"
"glMultiTexCoord4iARB\0"
"\0"
- /* _mesa_function_pool[11010]: Indexs (offset 50) */
+ /* _mesa_function_pool[11099]: Indexs (offset 50) */
"i\0"
"glIndexs\0"
"\0"
- /* _mesa_function_pool[11022]: Binormal3ivEXT (dynamic) */
+ /* _mesa_function_pool[11111]: Binormal3ivEXT (dynamic) */
"p\0"
"glBinormal3ivEXT\0"
"\0"
- /* _mesa_function_pool[11042]: ResizeBuffersMESA (will be remapped) */
+ /* _mesa_function_pool[11131]: ResizeBuffersMESA (will be remapped) */
"\0"
"glResizeBuffersMESA\0"
"\0"
- /* _mesa_function_pool[11064]: GetUniformivARB (will be remapped) */
+ /* _mesa_function_pool[11153]: GetUniformivARB (will be remapped) */
"iip\0"
"glGetUniformiv\0"
"glGetUniformivARB\0"
"\0"
- /* _mesa_function_pool[11102]: PixelTexGenParameteriSGIS (will be remapped) */
+ /* _mesa_function_pool[11191]: PixelTexGenParameteriSGIS (will be remapped) */
"ii\0"
"glPixelTexGenParameteriSGIS\0"
"\0"
- /* _mesa_function_pool[11134]: VertexPointervINTEL (dynamic) */
+ /* _mesa_function_pool[11223]: VertexPointervINTEL (dynamic) */
"iip\0"
"glVertexPointervINTEL\0"
"\0"
- /* _mesa_function_pool[11161]: Vertex2i (offset 130) */
+ /* _mesa_function_pool[11250]: Vertex2i (offset 130) */
"ii\0"
"glVertex2i\0"
"\0"
- /* _mesa_function_pool[11176]: LoadMatrixf (offset 291) */
+ /* _mesa_function_pool[11265]: LoadMatrixf (offset 291) */
"p\0"
"glLoadMatrixf\0"
"\0"
- /* _mesa_function_pool[11193]: Vertex2f (offset 128) */
+ /* _mesa_function_pool[11282]: Vertex2f (offset 128) */
"ff\0"
"glVertex2f\0"
"\0"
- /* _mesa_function_pool[11208]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[11297]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[11261]: Color4bv (offset 26) */
+ /* _mesa_function_pool[11350]: Color4bv (offset 26) */
"p\0"
"glColor4bv\0"
"\0"
- /* _mesa_function_pool[11275]: VertexPointer (offset 321) */
+ /* _mesa_function_pool[11364]: VertexPointer (offset 321) */
"iiip\0"
"glVertexPointer\0"
"\0"
- /* _mesa_function_pool[11297]: SecondaryColor3uiEXT (will be remapped) */
+ /* _mesa_function_pool[11386]: SecondaryColor3uiEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ui\0"
"glSecondaryColor3uiEXT\0"
"\0"
- /* _mesa_function_pool[11345]: StartInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[11434]: StartInstrumentsSGIX (dynamic) */
"\0"
"glStartInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[11370]: SecondaryColor3usvEXT (will be remapped) */
+ /* _mesa_function_pool[11459]: SecondaryColor3usvEXT (will be remapped) */
"p\0"
"glSecondaryColor3usv\0"
"glSecondaryColor3usvEXT\0"
"\0"
- /* _mesa_function_pool[11418]: VertexAttrib2fvNV (will be remapped) */
+ /* _mesa_function_pool[11507]: VertexAttrib2fvNV (will be remapped) */
"ip\0"
"glVertexAttrib2fvNV\0"
"\0"
- /* _mesa_function_pool[11442]: ProgramLocalParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[11531]: ProgramLocalParameter4dvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4dvARB\0"
"\0"
- /* _mesa_function_pool[11477]: DeleteLists (offset 4) */
+ /* _mesa_function_pool[11566]: DeleteLists (offset 4) */
"ii\0"
"glDeleteLists\0"
"\0"
- /* _mesa_function_pool[11495]: LogicOp (offset 242) */
+ /* _mesa_function_pool[11584]: LogicOp (offset 242) */
"i\0"
"glLogicOp\0"
"\0"
- /* _mesa_function_pool[11508]: MatrixIndexuivARB (dynamic) */
+ /* _mesa_function_pool[11597]: MatrixIndexuivARB (dynamic) */
"ip\0"
"glMatrixIndexuivARB\0"
"\0"
- /* _mesa_function_pool[11532]: Vertex2s (offset 132) */
+ /* _mesa_function_pool[11621]: Vertex2s (offset 132) */
"ii\0"
"glVertex2s\0"
"\0"
- /* _mesa_function_pool[11547]: RenderbufferStorageMultisample (will be remapped) */
+ /* _mesa_function_pool[11636]: RenderbufferStorageMultisample (will be remapped) */
"iiiii\0"
"glRenderbufferStorageMultisample\0"
"glRenderbufferStorageMultisampleEXT\0"
"\0"
- /* _mesa_function_pool[11623]: TexCoord4fv (offset 121) */
+ /* _mesa_function_pool[11712]: TexCoord4fv (offset 121) */
"p\0"
"glTexCoord4fv\0"
"\0"
- /* _mesa_function_pool[11640]: Tangent3sEXT (dynamic) */
+ /* _mesa_function_pool[11729]: Tangent3sEXT (dynamic) */
"iii\0"
"glTangent3sEXT\0"
"\0"
- /* _mesa_function_pool[11660]: GlobalAlphaFactorfSUN (dynamic) */
+ /* _mesa_function_pool[11749]: GlobalAlphaFactorfSUN (dynamic) */
"f\0"
"glGlobalAlphaFactorfSUN\0"
"\0"
- /* _mesa_function_pool[11687]: MultiTexCoord3iARB (offset 396) */
+ /* _mesa_function_pool[11776]: MultiTexCoord3iARB (offset 396) */
"iiii\0"
"glMultiTexCoord3i\0"
"glMultiTexCoord3iARB\0"
"\0"
- /* _mesa_function_pool[11732]: IsProgram (will be remapped) */
+ /* _mesa_function_pool[11821]: IsProgram (will be remapped) */
"i\0"
"glIsProgram\0"
"\0"
- /* _mesa_function_pool[11747]: TexCoordPointerListIBM (dynamic) */
+ /* _mesa_function_pool[11836]: TexCoordPointerListIBM (dynamic) */
"iiipi\0"
"glTexCoordPointerListIBM\0"
"\0"
- /* _mesa_function_pool[11779]: GlobalAlphaFactorusSUN (dynamic) */
+ /* _mesa_function_pool[11868]: GlobalAlphaFactorusSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorusSUN\0"
"\0"
- /* _mesa_function_pool[11807]: VertexAttrib2dvNV (will be remapped) */
+ /* _mesa_function_pool[11896]: VertexAttrib2dvNV (will be remapped) */
"ip\0"
"glVertexAttrib2dvNV\0"
"\0"
- /* _mesa_function_pool[11831]: FramebufferRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[11920]: FramebufferRenderbufferEXT (will be remapped) */
"iiii\0"
"glFramebufferRenderbuffer\0"
"glFramebufferRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[11892]: VertexAttrib1dvNV (will be remapped) */
+ /* _mesa_function_pool[11981]: VertexAttrib1dvNV (will be remapped) */
"ip\0"
"glVertexAttrib1dvNV\0"
"\0"
- /* _mesa_function_pool[11916]: GenTextures (offset 328) */
+ /* _mesa_function_pool[12005]: GenTextures (offset 328) */
"ip\0"
"glGenTextures\0"
"glGenTexturesEXT\0"
"\0"
- /* _mesa_function_pool[11951]: SetFenceNV (will be remapped) */
+ /* _mesa_function_pool[12040]: SetFenceNV (will be remapped) */
"ii\0"
"glSetFenceNV\0"
"\0"
- /* _mesa_function_pool[11968]: FramebufferTexture1DEXT (will be remapped) */
+ /* _mesa_function_pool[12057]: FramebufferTexture1DEXT (will be remapped) */
"iiiii\0"
"glFramebufferTexture1D\0"
"glFramebufferTexture1DEXT\0"
"\0"
- /* _mesa_function_pool[12024]: GetCombinerOutputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[12113]: GetCombinerOutputParameterivNV (will be remapped) */
"iiip\0"
"glGetCombinerOutputParameterivNV\0"
"\0"
- /* _mesa_function_pool[12063]: PixelTexGenParameterivSGIS (will be remapped) */
+ /* _mesa_function_pool[12152]: PixelTexGenParameterivSGIS (will be remapped) */
"ip\0"
"glPixelTexGenParameterivSGIS\0"
"\0"
- /* _mesa_function_pool[12096]: TextureNormalEXT (dynamic) */
+ /* _mesa_function_pool[12185]: TextureNormalEXT (dynamic) */
"i\0"
"glTextureNormalEXT\0"
"\0"
- /* _mesa_function_pool[12118]: IndexPointerListIBM (dynamic) */
+ /* _mesa_function_pool[12207]: IndexPointerListIBM (dynamic) */
"iipi\0"
"glIndexPointerListIBM\0"
"\0"
- /* _mesa_function_pool[12146]: WeightfvARB (dynamic) */
+ /* _mesa_function_pool[12235]: WeightfvARB (dynamic) */
"ip\0"
"glWeightfvARB\0"
"\0"
- /* _mesa_function_pool[12164]: RasterPos2sv (offset 69) */
+ /* _mesa_function_pool[12253]: RasterPos2sv (offset 69) */
"p\0"
"glRasterPos2sv\0"
"\0"
- /* _mesa_function_pool[12182]: Color4ubv (offset 36) */
+ /* _mesa_function_pool[12271]: Color4ubv (offset 36) */
"p\0"
"glColor4ubv\0"
"\0"
- /* _mesa_function_pool[12197]: DrawBuffer (offset 202) */
+ /* _mesa_function_pool[12286]: DrawBuffer (offset 202) */
"i\0"
"glDrawBuffer\0"
"\0"
- /* _mesa_function_pool[12213]: TexCoord2fv (offset 105) */
+ /* _mesa_function_pool[12302]: TexCoord2fv (offset 105) */
"p\0"
"glTexCoord2fv\0"
"\0"
- /* _mesa_function_pool[12230]: WindowPos4fMESA (will be remapped) */
+ /* _mesa_function_pool[12319]: WindowPos4fMESA (will be remapped) */
"ffff\0"
"glWindowPos4fMESA\0"
"\0"
- /* _mesa_function_pool[12254]: TexCoord1sv (offset 101) */
+ /* _mesa_function_pool[12343]: TexCoord1sv (offset 101) */
"p\0"
"glTexCoord1sv\0"
"\0"
- /* _mesa_function_pool[12271]: WindowPos3dvMESA (will be remapped) */
+ /* _mesa_function_pool[12360]: WindowPos3dvMESA (will be remapped) */
"p\0"
"glWindowPos3dv\0"
"glWindowPos3dvARB\0"
"glWindowPos3dvMESA\0"
"\0"
- /* _mesa_function_pool[12326]: DepthFunc (offset 245) */
+ /* _mesa_function_pool[12415]: DepthFunc (offset 245) */
"i\0"
"glDepthFunc\0"
"\0"
- /* _mesa_function_pool[12341]: PixelMapusv (offset 253) */
+ /* _mesa_function_pool[12430]: PixelMapusv (offset 253) */
"iip\0"
"glPixelMapusv\0"
"\0"
- /* _mesa_function_pool[12360]: GetQueryObjecti64vEXT (will be remapped) */
+ /* _mesa_function_pool[12449]: GetQueryObjecti64vEXT (will be remapped) */
"iip\0"
"glGetQueryObjecti64vEXT\0"
"\0"
- /* _mesa_function_pool[12389]: MultiTexCoord1dARB (offset 376) */
+ /* _mesa_function_pool[12478]: MultiTexCoord1dARB (offset 376) */
"id\0"
"glMultiTexCoord1d\0"
"glMultiTexCoord1dARB\0"
"\0"
- /* _mesa_function_pool[12432]: PointParameterivNV (will be remapped) */
+ /* _mesa_function_pool[12521]: PointParameterivNV (will be remapped) */
"ip\0"
"glPointParameteriv\0"
"glPointParameterivNV\0"
"\0"
- /* _mesa_function_pool[12476]: BlendFunc (offset 241) */
+ /* _mesa_function_pool[12565]: BlendFunc (offset 241) */
"ii\0"
"glBlendFunc\0"
"\0"
- /* _mesa_function_pool[12492]: Uniform2fvARB (will be remapped) */
+ /* _mesa_function_pool[12581]: Uniform2fvARB (will be remapped) */
"iip\0"
"glUniform2fv\0"
"glUniform2fvARB\0"
"\0"
- /* _mesa_function_pool[12526]: BufferParameteriAPPLE (will be remapped) */
+ /* _mesa_function_pool[12615]: BufferParameteriAPPLE (will be remapped) */
"iii\0"
"glBufferParameteriAPPLE\0"
"\0"
- /* _mesa_function_pool[12555]: MultiTexCoord3dvARB (offset 393) */
+ /* _mesa_function_pool[12644]: MultiTexCoord3dvARB (offset 393) */
"ip\0"
"glMultiTexCoord3dv\0"
"glMultiTexCoord3dvARB\0"
"\0"
- /* _mesa_function_pool[12600]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[12689]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[12656]: DeleteObjectARB (will be remapped) */
+ /* _mesa_function_pool[12745]: DeleteObjectARB (will be remapped) */
"i\0"
"glDeleteObjectARB\0"
"\0"
- /* _mesa_function_pool[12677]: MatrixIndexPointerARB (dynamic) */
+ /* _mesa_function_pool[12766]: MatrixIndexPointerARB (dynamic) */
"iiip\0"
"glMatrixIndexPointerARB\0"
"\0"
- /* _mesa_function_pool[12707]: ProgramNamedParameter4dvNV (will be remapped) */
+ /* _mesa_function_pool[12796]: ProgramNamedParameter4dvNV (will be remapped) */
"iipp\0"
"glProgramNamedParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[12742]: Tangent3fvEXT (dynamic) */
+ /* _mesa_function_pool[12831]: Tangent3fvEXT (dynamic) */
"p\0"
"glTangent3fvEXT\0"
"\0"
- /* _mesa_function_pool[12761]: Flush (offset 217) */
+ /* _mesa_function_pool[12850]: Flush (offset 217) */
"\0"
"glFlush\0"
"\0"
- /* _mesa_function_pool[12771]: Color4uiv (offset 38) */
+ /* _mesa_function_pool[12860]: Color4uiv (offset 38) */
"p\0"
"glColor4uiv\0"
"\0"
- /* _mesa_function_pool[12786]: GenVertexArrays (will be remapped) */
+ /* _mesa_function_pool[12875]: GenVertexArrays (will be remapped) */
"ip\0"
"glGenVertexArrays\0"
"\0"
- /* _mesa_function_pool[12808]: RasterPos3sv (offset 77) */
+ /* _mesa_function_pool[12897]: RasterPos3sv (offset 77) */
"p\0"
"glRasterPos3sv\0"
"\0"
- /* _mesa_function_pool[12826]: BindFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[12915]: BindFramebufferEXT (will be remapped) */
"ii\0"
"glBindFramebuffer\0"
"glBindFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[12869]: ReferencePlaneSGIX (dynamic) */
+ /* _mesa_function_pool[12958]: ReferencePlaneSGIX (dynamic) */
"p\0"
"glReferencePlaneSGIX\0"
"\0"
- /* _mesa_function_pool[12893]: PushAttrib (offset 219) */
+ /* _mesa_function_pool[12982]: PushAttrib (offset 219) */
"i\0"
"glPushAttrib\0"
"\0"
- /* _mesa_function_pool[12909]: RasterPos2i (offset 66) */
+ /* _mesa_function_pool[12998]: RasterPos2i (offset 66) */
"ii\0"
"glRasterPos2i\0"
"\0"
- /* _mesa_function_pool[12927]: ValidateProgramARB (will be remapped) */
+ /* _mesa_function_pool[13016]: ValidateProgramARB (will be remapped) */
"i\0"
"glValidateProgram\0"
"glValidateProgramARB\0"
"\0"
- /* _mesa_function_pool[12969]: TexParameteriv (offset 181) */
+ /* _mesa_function_pool[13058]: TexParameteriv (offset 181) */
"iip\0"
"glTexParameteriv\0"
"\0"
- /* _mesa_function_pool[12991]: UnlockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[13080]: UnlockArraysEXT (will be remapped) */
"\0"
"glUnlockArraysEXT\0"
"\0"
- /* _mesa_function_pool[13011]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[13100]: TexCoord2fColor3fVertex3fSUN (dynamic) */
"ffffffff\0"
"glTexCoord2fColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[13052]: WindowPos3fvMESA (will be remapped) */
+ /* _mesa_function_pool[13141]: WindowPos3fvMESA (will be remapped) */
"p\0"
"glWindowPos3fv\0"
"glWindowPos3fvARB\0"
"glWindowPos3fvMESA\0"
"\0"
- /* _mesa_function_pool[13107]: RasterPos2f (offset 64) */
+ /* _mesa_function_pool[13196]: RasterPos2f (offset 64) */
"ff\0"
"glRasterPos2f\0"
"\0"
- /* _mesa_function_pool[13125]: VertexAttrib1svNV (will be remapped) */
+ /* _mesa_function_pool[13214]: VertexAttrib1svNV (will be remapped) */
"ip\0"
"glVertexAttrib1svNV\0"
"\0"
- /* _mesa_function_pool[13149]: RasterPos2d (offset 62) */
+ /* _mesa_function_pool[13238]: RasterPos2d (offset 62) */
"dd\0"
"glRasterPos2d\0"
"\0"
- /* _mesa_function_pool[13167]: RasterPos3fv (offset 73) */
+ /* _mesa_function_pool[13256]: RasterPos3fv (offset 73) */
"p\0"
"glRasterPos3fv\0"
"\0"
- /* _mesa_function_pool[13185]: CopyTexSubImage3D (offset 373) */
+ /* _mesa_function_pool[13274]: CopyTexSubImage3D (offset 373) */
"iiiiiiiii\0"
"glCopyTexSubImage3D\0"
"glCopyTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[13239]: VertexAttrib2dARB (will be remapped) */
+ /* _mesa_function_pool[13328]: VertexAttrib2dARB (will be remapped) */
"idd\0"
"glVertexAttrib2d\0"
"glVertexAttrib2dARB\0"
"\0"
- /* _mesa_function_pool[13281]: Color4ub (offset 35) */
+ /* _mesa_function_pool[13370]: Color4ub (offset 35) */
"iiii\0"
"glColor4ub\0"
"\0"
- /* _mesa_function_pool[13298]: GetInteger64v (will be remapped) */
+ /* _mesa_function_pool[13387]: GetInteger64v (will be remapped) */
"ip\0"
"glGetInteger64v\0"
"\0"
- /* _mesa_function_pool[13318]: TextureColorMaskSGIS (dynamic) */
+ /* _mesa_function_pool[13407]: TextureColorMaskSGIS (dynamic) */
"iiii\0"
"glTextureColorMaskSGIS\0"
"\0"
- /* _mesa_function_pool[13347]: RasterPos2s (offset 68) */
+ /* _mesa_function_pool[13436]: RasterPos2s (offset 68) */
"ii\0"
"glRasterPos2s\0"
"\0"
- /* _mesa_function_pool[13365]: GetColorTable (offset 343) */
+ /* _mesa_function_pool[13454]: GetColorTable (offset 343) */
"iiip\0"
"glGetColorTable\0"
"glGetColorTableSGI\0"
"glGetColorTableEXT\0"
"\0"
- /* _mesa_function_pool[13425]: SelectBuffer (offset 195) */
+ /* _mesa_function_pool[13514]: SelectBuffer (offset 195) */
"ip\0"
"glSelectBuffer\0"
"\0"
- /* _mesa_function_pool[13444]: Indexiv (offset 49) */
+ /* _mesa_function_pool[13533]: Indexiv (offset 49) */
"p\0"
"glIndexiv\0"
"\0"
- /* _mesa_function_pool[13457]: TexCoord3i (offset 114) */
+ /* _mesa_function_pool[13546]: TexCoord3i (offset 114) */
"iii\0"
"glTexCoord3i\0"
"\0"
- /* _mesa_function_pool[13475]: CopyColorTable (offset 342) */
+ /* _mesa_function_pool[13564]: CopyColorTable (offset 342) */
"iiiii\0"
"glCopyColorTable\0"
"glCopyColorTableSGI\0"
"\0"
- /* _mesa_function_pool[13519]: GetHistogramParameterfv (offset 362) */
+ /* _mesa_function_pool[13608]: GetHistogramParameterfv (offset 362) */
"iip\0"
"glGetHistogramParameterfv\0"
"glGetHistogramParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[13579]: Frustum (offset 289) */
+ /* _mesa_function_pool[13668]: Frustum (offset 289) */
"dddddd\0"
"glFrustum\0"
"\0"
- /* _mesa_function_pool[13597]: GetString (offset 275) */
+ /* _mesa_function_pool[13686]: GetString (offset 275) */
"i\0"
"glGetString\0"
"\0"
- /* _mesa_function_pool[13612]: ColorPointervINTEL (dynamic) */
+ /* _mesa_function_pool[13701]: ColorPointervINTEL (dynamic) */
"iip\0"
"glColorPointervINTEL\0"
"\0"
- /* _mesa_function_pool[13638]: TexEnvf (offset 184) */
+ /* _mesa_function_pool[13727]: TexEnvf (offset 184) */
"iif\0"
"glTexEnvf\0"
"\0"
- /* _mesa_function_pool[13653]: TexCoord3d (offset 110) */
+ /* _mesa_function_pool[13742]: TexCoord3d (offset 110) */
"ddd\0"
"glTexCoord3d\0"
"\0"
- /* _mesa_function_pool[13671]: AlphaFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[13760]: AlphaFragmentOp1ATI (will be remapped) */
"iiiiii\0"
"glAlphaFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[13701]: TexCoord3f (offset 112) */
+ /* _mesa_function_pool[13790]: TexCoord3f (offset 112) */
"fff\0"
"glTexCoord3f\0"
"\0"
- /* _mesa_function_pool[13719]: MultiTexCoord3ivARB (offset 397) */
+ /* _mesa_function_pool[13808]: MultiTexCoord3ivARB (offset 397) */
"ip\0"
"glMultiTexCoord3iv\0"
"glMultiTexCoord3ivARB\0"
"\0"
- /* _mesa_function_pool[13764]: MultiTexCoord2sARB (offset 390) */
+ /* _mesa_function_pool[13853]: MultiTexCoord2sARB (offset 390) */
"iii\0"
"glMultiTexCoord2s\0"
"glMultiTexCoord2sARB\0"
"\0"
- /* _mesa_function_pool[13808]: VertexAttrib1dvARB (will be remapped) */
+ /* _mesa_function_pool[13897]: VertexAttrib1dvARB (will be remapped) */
"ip\0"
"glVertexAttrib1dv\0"
"glVertexAttrib1dvARB\0"
"\0"
- /* _mesa_function_pool[13851]: DeleteTextures (offset 327) */
+ /* _mesa_function_pool[13940]: DeleteTextures (offset 327) */
"ip\0"
"glDeleteTextures\0"
"glDeleteTexturesEXT\0"
"\0"
- /* _mesa_function_pool[13892]: TexCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[13981]: TexCoordPointerEXT (will be remapped) */
"iiiip\0"
"glTexCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[13920]: TexSubImage4DSGIS (dynamic) */
+ /* _mesa_function_pool[14009]: TexSubImage4DSGIS (dynamic) */
"iiiiiiiiiiiip\0"
"glTexSubImage4DSGIS\0"
"\0"
- /* _mesa_function_pool[13955]: TexCoord3s (offset 116) */
+ /* _mesa_function_pool[14044]: TexCoord3s (offset 116) */
"iii\0"
"glTexCoord3s\0"
"\0"
- /* _mesa_function_pool[13973]: GetTexLevelParameteriv (offset 285) */
+ /* _mesa_function_pool[14062]: GetTexLevelParameteriv (offset 285) */
"iiip\0"
"glGetTexLevelParameteriv\0"
"\0"
- /* _mesa_function_pool[14004]: CombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[14093]: CombinerStageParameterfvNV (dynamic) */
"iip\0"
"glCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[14038]: StopInstrumentsSGIX (dynamic) */
+ /* _mesa_function_pool[14127]: StopInstrumentsSGIX (dynamic) */
"i\0"
"glStopInstrumentsSGIX\0"
"\0"
- /* _mesa_function_pool[14063]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[14152]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
"fffffffffffffff\0"
"glTexCoord4fColor4fNormal3fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[14119]: ClearAccum (offset 204) */
+ /* _mesa_function_pool[14208]: ClearAccum (offset 204) */
"ffff\0"
"glClearAccum\0"
"\0"
- /* _mesa_function_pool[14138]: DeformSGIX (dynamic) */
+ /* _mesa_function_pool[14227]: DeformSGIX (dynamic) */
"i\0"
"glDeformSGIX\0"
"\0"
- /* _mesa_function_pool[14154]: GetVertexAttribfvARB (will be remapped) */
+ /* _mesa_function_pool[14243]: GetVertexAttribfvARB (will be remapped) */
"iip\0"
"glGetVertexAttribfv\0"
"glGetVertexAttribfvARB\0"
"\0"
- /* _mesa_function_pool[14202]: SecondaryColor3ivEXT (will be remapped) */
+ /* _mesa_function_pool[14291]: SecondaryColor3ivEXT (will be remapped) */
"p\0"
"glSecondaryColor3iv\0"
"glSecondaryColor3ivEXT\0"
"\0"
- /* _mesa_function_pool[14248]: TexCoord4iv (offset 123) */
+ /* _mesa_function_pool[14337]: TexCoord4iv (offset 123) */
"p\0"
"glTexCoord4iv\0"
"\0"
- /* _mesa_function_pool[14265]: UniformMatrix4x2fv (will be remapped) */
+ /* _mesa_function_pool[14354]: UniformMatrix4x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix4x2fv\0"
"\0"
- /* _mesa_function_pool[14292]: GetDetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14381]: GetDetailTexFuncSGIS (dynamic) */
"ip\0"
"glGetDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14319]: GetCombinerStageParameterfvNV (dynamic) */
+ /* _mesa_function_pool[14408]: GetCombinerStageParameterfvNV (dynamic) */
"iip\0"
"glGetCombinerStageParameterfvNV\0"
"\0"
- /* _mesa_function_pool[14356]: PolygonOffset (offset 319) */
+ /* _mesa_function_pool[14445]: PolygonOffset (offset 319) */
"ff\0"
"glPolygonOffset\0"
"\0"
- /* _mesa_function_pool[14376]: BindVertexArray (will be remapped) */
+ /* _mesa_function_pool[14465]: BindVertexArray (will be remapped) */
"i\0"
"glBindVertexArray\0"
"\0"
- /* _mesa_function_pool[14397]: Color4ubVertex2fvSUN (dynamic) */
+ /* _mesa_function_pool[14486]: Color4ubVertex2fvSUN (dynamic) */
"pp\0"
"glColor4ubVertex2fvSUN\0"
"\0"
- /* _mesa_function_pool[14424]: Rectd (offset 86) */
+ /* _mesa_function_pool[14513]: Rectd (offset 86) */
"dddd\0"
"glRectd\0"
"\0"
- /* _mesa_function_pool[14438]: TexFilterFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14527]: TexFilterFuncSGIS (dynamic) */
"iiip\0"
"glTexFilterFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14464]: SampleMaskSGIS (will be remapped) */
+ /* _mesa_function_pool[14553]: SampleMaskSGIS (will be remapped) */
"fi\0"
"glSampleMaskSGIS\0"
"glSampleMaskEXT\0"
"\0"
- /* _mesa_function_pool[14501]: GetAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[14590]: GetAttribLocationARB (will be remapped) */
"ip\0"
"glGetAttribLocation\0"
"glGetAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[14548]: RasterPos3i (offset 74) */
+ /* _mesa_function_pool[14637]: RasterPos3i (offset 74) */
"iii\0"
"glRasterPos3i\0"
"\0"
- /* _mesa_function_pool[14567]: VertexAttrib4ubvARB (will be remapped) */
+ /* _mesa_function_pool[14656]: VertexAttrib4ubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
"\0"
- /* _mesa_function_pool[14612]: DetailTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[14701]: DetailTexFuncSGIS (dynamic) */
"iip\0"
"glDetailTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[14637]: Normal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[14726]: Normal3fVertex3fSUN (dynamic) */
"ffffff\0"
"glNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[14667]: CopyTexImage2D (offset 324) */
+ /* _mesa_function_pool[14756]: CopyTexImage2D (offset 324) */
"iiiiiiii\0"
"glCopyTexImage2D\0"
"glCopyTexImage2DEXT\0"
"\0"
- /* _mesa_function_pool[14714]: GetBufferPointervARB (will be remapped) */
+ /* _mesa_function_pool[14803]: GetBufferPointervARB (will be remapped) */
"iip\0"
"glGetBufferPointerv\0"
"glGetBufferPointervARB\0"
"\0"
- /* _mesa_function_pool[14762]: ProgramEnvParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[14851]: ProgramEnvParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramEnvParameter4fARB\0"
"glProgramParameter4fNV\0"
"\0"
- /* _mesa_function_pool[14820]: Uniform3ivARB (will be remapped) */
+ /* _mesa_function_pool[14909]: Uniform3ivARB (will be remapped) */
"iip\0"
"glUniform3iv\0"
"glUniform3ivARB\0"
"\0"
- /* _mesa_function_pool[14854]: Lightfv (offset 160) */
+ /* _mesa_function_pool[14943]: Lightfv (offset 160) */
"iip\0"
"glLightfv\0"
"\0"
- /* _mesa_function_pool[14869]: ClearDepth (offset 208) */
+ /* _mesa_function_pool[14958]: ClearDepth (offset 208) */
"d\0"
"glClearDepth\0"
"\0"
- /* _mesa_function_pool[14885]: GetFenceivNV (will be remapped) */
+ /* _mesa_function_pool[14974]: GetFenceivNV (will be remapped) */
"iip\0"
"glGetFenceivNV\0"
"\0"
- /* _mesa_function_pool[14905]: WindowPos4dvMESA (will be remapped) */
+ /* _mesa_function_pool[14994]: WindowPos4dvMESA (will be remapped) */
"p\0"
"glWindowPos4dvMESA\0"
"\0"
- /* _mesa_function_pool[14927]: ColorSubTable (offset 346) */
+ /* _mesa_function_pool[15016]: ColorSubTable (offset 346) */
"iiiiip\0"
"glColorSubTable\0"
"glColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[14970]: Color4fv (offset 30) */
+ /* _mesa_function_pool[15059]: Color4fv (offset 30) */
"p\0"
"glColor4fv\0"
"\0"
- /* _mesa_function_pool[14984]: MultiTexCoord4ivARB (offset 405) */
+ /* _mesa_function_pool[15073]: MultiTexCoord4ivARB (offset 405) */
"ip\0"
"glMultiTexCoord4iv\0"
"glMultiTexCoord4ivARB\0"
"\0"
- /* _mesa_function_pool[15029]: ProgramLocalParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[15118]: ProgramLocalParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramLocalParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[15066]: ColorPointer (offset 308) */
+ /* _mesa_function_pool[15155]: ColorPointer (offset 308) */
"iiip\0"
"glColorPointer\0"
"\0"
- /* _mesa_function_pool[15087]: Rects (offset 92) */
+ /* _mesa_function_pool[15176]: Rects (offset 92) */
"iiii\0"
"glRects\0"
"\0"
- /* _mesa_function_pool[15101]: GetMapAttribParameterfvNV (dynamic) */
+ /* _mesa_function_pool[15190]: GetMapAttribParameterfvNV (dynamic) */
"iiip\0"
"glGetMapAttribParameterfvNV\0"
"\0"
- /* _mesa_function_pool[15135]: Lightiv (offset 162) */
+ /* _mesa_function_pool[15224]: Lightiv (offset 162) */
"iip\0"
"glLightiv\0"
"\0"
- /* _mesa_function_pool[15150]: VertexAttrib4sARB (will be remapped) */
+ /* _mesa_function_pool[15239]: VertexAttrib4sARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4s\0"
"glVertexAttrib4sARB\0"
"\0"
- /* _mesa_function_pool[15194]: GetQueryObjectuivARB (will be remapped) */
+ /* _mesa_function_pool[15283]: GetQueryObjectuivARB (will be remapped) */
"iip\0"
"glGetQueryObjectuiv\0"
"glGetQueryObjectuivARB\0"
"\0"
- /* _mesa_function_pool[15242]: GetTexParameteriv (offset 283) */
+ /* _mesa_function_pool[15331]: GetTexParameteriv (offset 283) */
"iip\0"
"glGetTexParameteriv\0"
"\0"
- /* _mesa_function_pool[15267]: MapParameterivNV (dynamic) */
+ /* _mesa_function_pool[15356]: MapParameterivNV (dynamic) */
"iip\0"
"glMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[15291]: GenRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[15380]: GenRenderbuffersEXT (will be remapped) */
"ip\0"
"glGenRenderbuffers\0"
"glGenRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[15336]: VertexAttrib2dvARB (will be remapped) */
+ /* _mesa_function_pool[15425]: VertexAttrib2dvARB (will be remapped) */
"ip\0"
"glVertexAttrib2dv\0"
"glVertexAttrib2dvARB\0"
"\0"
- /* _mesa_function_pool[15379]: EdgeFlagPointerEXT (will be remapped) */
+ /* _mesa_function_pool[15468]: EdgeFlagPointerEXT (will be remapped) */
"iip\0"
"glEdgeFlagPointerEXT\0"
"\0"
- /* _mesa_function_pool[15405]: VertexAttribs2svNV (will be remapped) */
+ /* _mesa_function_pool[15494]: VertexAttribs2svNV (will be remapped) */
"iip\0"
"glVertexAttribs2svNV\0"
"\0"
- /* _mesa_function_pool[15431]: WeightbvARB (dynamic) */
+ /* _mesa_function_pool[15520]: WeightbvARB (dynamic) */
"ip\0"
"glWeightbvARB\0"
"\0"
- /* _mesa_function_pool[15449]: VertexAttrib2fvARB (will be remapped) */
+ /* _mesa_function_pool[15538]: VertexAttrib2fvARB (will be remapped) */
"ip\0"
"glVertexAttrib2fv\0"
"glVertexAttrib2fvARB\0"
"\0"
- /* _mesa_function_pool[15492]: GetBufferParameterivARB (will be remapped) */
+ /* _mesa_function_pool[15581]: GetBufferParameterivARB (will be remapped) */
"iip\0"
"glGetBufferParameteriv\0"
"glGetBufferParameterivARB\0"
"\0"
- /* _mesa_function_pool[15546]: Rectdv (offset 87) */
+ /* _mesa_function_pool[15635]: Rectdv (offset 87) */
"pp\0"
"glRectdv\0"
"\0"
- /* _mesa_function_pool[15559]: ListParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[15648]: ListParameteriSGIX (dynamic) */
"iii\0"
"glListParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[15585]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[15674]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffff\0"
"glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[15644]: InstrumentsBufferSGIX (dynamic) */
+ /* _mesa_function_pool[15733]: InstrumentsBufferSGIX (dynamic) */
"ip\0"
"glInstrumentsBufferSGIX\0"
"\0"
- /* _mesa_function_pool[15672]: VertexAttrib4NivARB (will be remapped) */
+ /* _mesa_function_pool[15761]: VertexAttrib4NivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Niv\0"
"glVertexAttrib4NivARB\0"
"\0"
- /* _mesa_function_pool[15717]: GetAttachedShaders (will be remapped) */
+ /* _mesa_function_pool[15806]: GetAttachedShaders (will be remapped) */
"iipp\0"
"glGetAttachedShaders\0"
"\0"
- /* _mesa_function_pool[15744]: GenVertexArraysAPPLE (will be remapped) */
+ /* _mesa_function_pool[15833]: GenVertexArraysAPPLE (will be remapped) */
"ip\0"
"glGenVertexArraysAPPLE\0"
"\0"
- /* _mesa_function_pool[15771]: Materialiv (offset 172) */
+ /* _mesa_function_pool[15860]: Materialiv (offset 172) */
"iip\0"
"glMaterialiv\0"
"\0"
- /* _mesa_function_pool[15789]: PushClientAttrib (offset 335) */
+ /* _mesa_function_pool[15878]: PushClientAttrib (offset 335) */
"i\0"
"glPushClientAttrib\0"
"\0"
- /* _mesa_function_pool[15811]: ProgramEnvParameters4fvEXT (will be remapped) */
+ /* _mesa_function_pool[15900]: ProgramEnvParameters4fvEXT (will be remapped) */
"iiip\0"
"glProgramEnvParameters4fvEXT\0"
"\0"
- /* _mesa_function_pool[15846]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[15935]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
"pppp\0"
"glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[15892]: WindowPos2iMESA (will be remapped) */
+ /* _mesa_function_pool[15981]: WindowPos2iMESA (will be remapped) */
"ii\0"
"glWindowPos2i\0"
"glWindowPos2iARB\0"
"glWindowPos2iMESA\0"
"\0"
- /* _mesa_function_pool[15945]: SecondaryColor3fvEXT (will be remapped) */
+ /* _mesa_function_pool[16034]: SecondaryColor3fvEXT (will be remapped) */
"p\0"
"glSecondaryColor3fv\0"
"glSecondaryColor3fvEXT\0"
"\0"
- /* _mesa_function_pool[15991]: PolygonMode (offset 174) */
+ /* _mesa_function_pool[16080]: PolygonMode (offset 174) */
"ii\0"
"glPolygonMode\0"
"\0"
- /* _mesa_function_pool[16009]: CompressedTexSubImage1DARB (will be remapped) */
+ /* _mesa_function_pool[16098]: CompressedTexSubImage1DARB (will be remapped) */
"iiiiiip\0"
"glCompressedTexSubImage1D\0"
"glCompressedTexSubImage1DARB\0"
"\0"
- /* _mesa_function_pool[16073]: GetVertexAttribivNV (will be remapped) */
+ /* _mesa_function_pool[16162]: GetVertexAttribivNV (will be remapped) */
"iip\0"
"glGetVertexAttribivNV\0"
"\0"
- /* _mesa_function_pool[16100]: GetProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[16189]: GetProgramStringARB (will be remapped) */
"iip\0"
"glGetProgramStringARB\0"
"\0"
- /* _mesa_function_pool[16127]: TexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[16216]: TexBumpParameterfvATI (will be remapped) */
"ip\0"
"glTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[16155]: CompileShaderARB (will be remapped) */
+ /* _mesa_function_pool[16244]: CompileShaderARB (will be remapped) */
"i\0"
"glCompileShader\0"
"glCompileShaderARB\0"
"\0"
- /* _mesa_function_pool[16193]: DeleteShader (will be remapped) */
+ /* _mesa_function_pool[16282]: DeleteShader (will be remapped) */
"i\0"
"glDeleteShader\0"
"\0"
- /* _mesa_function_pool[16211]: DisableClientState (offset 309) */
+ /* _mesa_function_pool[16300]: DisableClientState (offset 309) */
"i\0"
"glDisableClientState\0"
"\0"
- /* _mesa_function_pool[16235]: TexGeni (offset 192) */
+ /* _mesa_function_pool[16324]: TexGeni (offset 192) */
"iii\0"
"glTexGeni\0"
"\0"
- /* _mesa_function_pool[16250]: TexGenf (offset 190) */
+ /* _mesa_function_pool[16339]: TexGenf (offset 190) */
"iif\0"
"glTexGenf\0"
"\0"
- /* _mesa_function_pool[16265]: Uniform3fARB (will be remapped) */
+ /* _mesa_function_pool[16354]: Uniform3fARB (will be remapped) */
"ifff\0"
"glUniform3f\0"
"glUniform3fARB\0"
"\0"
- /* _mesa_function_pool[16298]: TexGend (offset 188) */
+ /* _mesa_function_pool[16387]: TexGend (offset 188) */
"iid\0"
"glTexGend\0"
"\0"
- /* _mesa_function_pool[16313]: ListParameterfvSGIX (dynamic) */
+ /* _mesa_function_pool[16402]: ListParameterfvSGIX (dynamic) */
"iip\0"
"glListParameterfvSGIX\0"
"\0"
- /* _mesa_function_pool[16340]: GetPolygonStipple (offset 274) */
+ /* _mesa_function_pool[16429]: GetPolygonStipple (offset 274) */
"p\0"
"glGetPolygonStipple\0"
"\0"
- /* _mesa_function_pool[16363]: Tangent3dvEXT (dynamic) */
+ /* _mesa_function_pool[16452]: Tangent3dvEXT (dynamic) */
"p\0"
"glTangent3dvEXT\0"
"\0"
- /* _mesa_function_pool[16382]: GetVertexAttribfvNV (will be remapped) */
+ /* _mesa_function_pool[16471]: GetVertexAttribfvNV (will be remapped) */
"iip\0"
"glGetVertexAttribfvNV\0"
"\0"
- /* _mesa_function_pool[16409]: WindowPos3sMESA (will be remapped) */
+ /* _mesa_function_pool[16498]: WindowPos3sMESA (will be remapped) */
"iii\0"
"glWindowPos3s\0"
"glWindowPos3sARB\0"
"glWindowPos3sMESA\0"
"\0"
- /* _mesa_function_pool[16463]: VertexAttrib2svNV (will be remapped) */
+ /* _mesa_function_pool[16552]: VertexAttrib2svNV (will be remapped) */
"ip\0"
"glVertexAttrib2svNV\0"
"\0"
- /* _mesa_function_pool[16487]: VertexAttribs1fvNV (will be remapped) */
+ /* _mesa_function_pool[16576]: VertexAttribs1fvNV (will be remapped) */
"iip\0"
"glVertexAttribs1fvNV\0"
"\0"
- /* _mesa_function_pool[16513]: TexCoord2fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[16602]: TexCoord2fVertex3fvSUN (dynamic) */
"pp\0"
"glTexCoord2fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[16542]: WindowPos4sMESA (will be remapped) */
+ /* _mesa_function_pool[16631]: WindowPos4sMESA (will be remapped) */
"iiii\0"
"glWindowPos4sMESA\0"
"\0"
- /* _mesa_function_pool[16566]: VertexAttrib4NuivARB (will be remapped) */
+ /* _mesa_function_pool[16655]: VertexAttrib4NuivARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4NuivARB\0"
"\0"
- /* _mesa_function_pool[16613]: ClientActiveTextureARB (offset 375) */
+ /* _mesa_function_pool[16702]: ClientActiveTextureARB (offset 375) */
"i\0"
"glClientActiveTexture\0"
"glClientActiveTextureARB\0"
"\0"
- /* _mesa_function_pool[16663]: PixelTexGenSGIX (will be remapped) */
+ /* _mesa_function_pool[16752]: PixelTexGenSGIX (will be remapped) */
"i\0"
"glPixelTexGenSGIX\0"
"\0"
- /* _mesa_function_pool[16684]: ReplacementCodeusvSUN (dynamic) */
+ /* _mesa_function_pool[16773]: ReplacementCodeusvSUN (dynamic) */
"p\0"
"glReplacementCodeusvSUN\0"
"\0"
- /* _mesa_function_pool[16711]: Uniform4fARB (will be remapped) */
+ /* _mesa_function_pool[16800]: Uniform4fARB (will be remapped) */
"iffff\0"
"glUniform4f\0"
"glUniform4fARB\0"
"\0"
- /* _mesa_function_pool[16745]: Color4sv (offset 34) */
+ /* _mesa_function_pool[16834]: Color4sv (offset 34) */
"p\0"
"glColor4sv\0"
"\0"
- /* _mesa_function_pool[16759]: FlushMappedBufferRange (will be remapped) */
+ /* _mesa_function_pool[16848]: FlushMappedBufferRange (will be remapped) */
"iii\0"
"glFlushMappedBufferRange\0"
"\0"
- /* _mesa_function_pool[16789]: IsProgramNV (will be remapped) */
+ /* _mesa_function_pool[16878]: IsProgramNV (will be remapped) */
"i\0"
"glIsProgramARB\0"
"glIsProgramNV\0"
"\0"
- /* _mesa_function_pool[16821]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ /* _mesa_function_pool[16910]: FlushMappedBufferRangeAPPLE (will be remapped) */
"iii\0"
"glFlushMappedBufferRangeAPPLE\0"
"\0"
- /* _mesa_function_pool[16856]: PixelZoom (offset 246) */
+ /* _mesa_function_pool[16945]: PixelZoom (offset 246) */
"ff\0"
"glPixelZoom\0"
"\0"
- /* _mesa_function_pool[16872]: ReplacementCodePointerSUN (dynamic) */
+ /* _mesa_function_pool[16961]: ReplacementCodePointerSUN (dynamic) */
"iip\0"
"glReplacementCodePointerSUN\0"
"\0"
- /* _mesa_function_pool[16905]: ProgramEnvParameter4dARB (will be remapped) */
+ /* _mesa_function_pool[16994]: ProgramEnvParameter4dARB (will be remapped) */
"iidddd\0"
"glProgramEnvParameter4dARB\0"
"glProgramParameter4dNV\0"
"\0"
- /* _mesa_function_pool[16963]: ColorTableParameterfv (offset 340) */
+ /* _mesa_function_pool[17052]: ColorTableParameterfv (offset 340) */
"iip\0"
"glColorTableParameterfv\0"
"glColorTableParameterfvSGI\0"
"\0"
- /* _mesa_function_pool[17019]: FragmentLightModelfSGIX (dynamic) */
+ /* _mesa_function_pool[17108]: FragmentLightModelfSGIX (dynamic) */
"if\0"
"glFragmentLightModelfSGIX\0"
"\0"
- /* _mesa_function_pool[17049]: Binormal3bvEXT (dynamic) */
+ /* _mesa_function_pool[17138]: Binormal3bvEXT (dynamic) */
"p\0"
"glBinormal3bvEXT\0"
"\0"
- /* _mesa_function_pool[17069]: PixelMapuiv (offset 252) */
+ /* _mesa_function_pool[17158]: PixelMapuiv (offset 252) */
"iip\0"
"glPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[17088]: Color3dv (offset 12) */
+ /* _mesa_function_pool[17177]: Color3dv (offset 12) */
"p\0"
"glColor3dv\0"
"\0"
- /* _mesa_function_pool[17102]: IsTexture (offset 330) */
+ /* _mesa_function_pool[17191]: IsTexture (offset 330) */
"i\0"
"glIsTexture\0"
"glIsTextureEXT\0"
"\0"
- /* _mesa_function_pool[17132]: VertexWeightfvEXT (dynamic) */
+ /* _mesa_function_pool[17221]: VertexWeightfvEXT (dynamic) */
"p\0"
"glVertexWeightfvEXT\0"
"\0"
- /* _mesa_function_pool[17155]: VertexAttrib1dARB (will be remapped) */
+ /* _mesa_function_pool[17244]: VertexAttrib1dARB (will be remapped) */
"id\0"
"glVertexAttrib1d\0"
"glVertexAttrib1dARB\0"
"\0"
- /* _mesa_function_pool[17196]: ImageTransformParameterivHP (dynamic) */
+ /* _mesa_function_pool[17285]: ImageTransformParameterivHP (dynamic) */
"iip\0"
"glImageTransformParameterivHP\0"
"\0"
- /* _mesa_function_pool[17231]: TexCoord4i (offset 122) */
+ /* _mesa_function_pool[17320]: TexCoord4i (offset 122) */
"iiii\0"
"glTexCoord4i\0"
"\0"
- /* _mesa_function_pool[17250]: DeleteQueriesARB (will be remapped) */
+ /* _mesa_function_pool[17339]: DeleteQueriesARB (will be remapped) */
"ip\0"
"glDeleteQueries\0"
"glDeleteQueriesARB\0"
"\0"
- /* _mesa_function_pool[17289]: Color4ubVertex2fSUN (dynamic) */
+ /* _mesa_function_pool[17378]: Color4ubVertex2fSUN (dynamic) */
"iiiiff\0"
"glColor4ubVertex2fSUN\0"
"\0"
- /* _mesa_function_pool[17319]: FragmentColorMaterialSGIX (dynamic) */
+ /* _mesa_function_pool[17408]: FragmentColorMaterialSGIX (dynamic) */
"ii\0"
"glFragmentColorMaterialSGIX\0"
"\0"
- /* _mesa_function_pool[17351]: CurrentPaletteMatrixARB (dynamic) */
+ /* _mesa_function_pool[17440]: CurrentPaletteMatrixARB (dynamic) */
"i\0"
"glCurrentPaletteMatrixARB\0"
"\0"
- /* _mesa_function_pool[17380]: GetMapdv (offset 266) */
+ /* _mesa_function_pool[17469]: GetMapdv (offset 266) */
"iip\0"
"glGetMapdv\0"
"\0"
- /* _mesa_function_pool[17396]: SamplePatternSGIS (will be remapped) */
+ /* _mesa_function_pool[17485]: SamplePatternSGIS (will be remapped) */
"i\0"
"glSamplePatternSGIS\0"
"glSamplePatternEXT\0"
"\0"
- /* _mesa_function_pool[17438]: PixelStoref (offset 249) */
+ /* _mesa_function_pool[17527]: PixelStoref (offset 249) */
"if\0"
"glPixelStoref\0"
"\0"
- /* _mesa_function_pool[17456]: IsQueryARB (will be remapped) */
+ /* _mesa_function_pool[17545]: IsQueryARB (will be remapped) */
"i\0"
"glIsQuery\0"
"glIsQueryARB\0"
"\0"
- /* _mesa_function_pool[17482]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[17571]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
"iiiiifff\0"
"glReplacementCodeuiColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[17531]: PixelStorei (offset 250) */
+ /* _mesa_function_pool[17620]: PixelStorei (offset 250) */
"ii\0"
"glPixelStorei\0"
"\0"
- /* _mesa_function_pool[17549]: VertexAttrib4usvARB (will be remapped) */
+ /* _mesa_function_pool[17638]: VertexAttrib4usvARB (will be remapped) */
"ip\0"
"glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
"\0"
- /* _mesa_function_pool[17594]: LinkProgramARB (will be remapped) */
+ /* _mesa_function_pool[17683]: LinkProgramARB (will be remapped) */
"i\0"
"glLinkProgram\0"
"glLinkProgramARB\0"
"\0"
- /* _mesa_function_pool[17628]: VertexAttrib2fNV (will be remapped) */
+ /* _mesa_function_pool[17717]: VertexAttrib2fNV (will be remapped) */
"iff\0"
"glVertexAttrib2fNV\0"
"\0"
- /* _mesa_function_pool[17652]: ShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[17741]: ShaderSourceARB (will be remapped) */
"iipp\0"
"glShaderSource\0"
"glShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[17691]: FragmentMaterialiSGIX (dynamic) */
+ /* _mesa_function_pool[17780]: FragmentMaterialiSGIX (dynamic) */
"iii\0"
"glFragmentMaterialiSGIX\0"
"\0"
- /* _mesa_function_pool[17720]: EvalCoord2dv (offset 233) */
+ /* _mesa_function_pool[17809]: EvalCoord2dv (offset 233) */
"p\0"
"glEvalCoord2dv\0"
"\0"
- /* _mesa_function_pool[17738]: VertexAttrib3svARB (will be remapped) */
+ /* _mesa_function_pool[17827]: VertexAttrib3svARB (will be remapped) */
"ip\0"
"glVertexAttrib3sv\0"
"glVertexAttrib3svARB\0"
"\0"
- /* _mesa_function_pool[17781]: ColorMaterial (offset 151) */
+ /* _mesa_function_pool[17870]: ColorMaterial (offset 151) */
"ii\0"
"glColorMaterial\0"
"\0"
- /* _mesa_function_pool[17801]: CompressedTexSubImage3DARB (will be remapped) */
+ /* _mesa_function_pool[17890]: CompressedTexSubImage3DARB (will be remapped) */
"iiiiiiiiiip\0"
"glCompressedTexSubImage3D\0"
"glCompressedTexSubImage3DARB\0"
"\0"
- /* _mesa_function_pool[17869]: WindowPos2ivMESA (will be remapped) */
+ /* _mesa_function_pool[17958]: WindowPos2ivMESA (will be remapped) */
"p\0"
"glWindowPos2iv\0"
"glWindowPos2ivARB\0"
"glWindowPos2ivMESA\0"
"\0"
- /* _mesa_function_pool[17924]: IsFramebufferEXT (will be remapped) */
+ /* _mesa_function_pool[18013]: IsFramebufferEXT (will be remapped) */
"i\0"
"glIsFramebuffer\0"
"glIsFramebufferEXT\0"
"\0"
- /* _mesa_function_pool[17962]: Uniform4ivARB (will be remapped) */
+ /* _mesa_function_pool[18051]: Uniform4ivARB (will be remapped) */
"iip\0"
"glUniform4iv\0"
"glUniform4ivARB\0"
"\0"
- /* _mesa_function_pool[17996]: GetVertexAttribdvARB (will be remapped) */
+ /* _mesa_function_pool[18085]: GetVertexAttribdvARB (will be remapped) */
"iip\0"
"glGetVertexAttribdv\0"
"glGetVertexAttribdvARB\0"
"\0"
- /* _mesa_function_pool[18044]: TexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[18133]: TexBumpParameterivATI (will be remapped) */
"ip\0"
"glTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[18072]: GetSeparableFilter (offset 359) */
+ /* _mesa_function_pool[18161]: GetSeparableFilter (offset 359) */
"iiippp\0"
"glGetSeparableFilter\0"
"glGetSeparableFilterEXT\0"
"\0"
- /* _mesa_function_pool[18125]: Binormal3dEXT (dynamic) */
+ /* _mesa_function_pool[18214]: Binormal3dEXT (dynamic) */
"ddd\0"
"glBinormal3dEXT\0"
"\0"
- /* _mesa_function_pool[18146]: SpriteParameteriSGIX (dynamic) */
+ /* _mesa_function_pool[18235]: SpriteParameteriSGIX (dynamic) */
"ii\0"
"glSpriteParameteriSGIX\0"
"\0"
- /* _mesa_function_pool[18173]: RequestResidentProgramsNV (will be remapped) */
+ /* _mesa_function_pool[18262]: RequestResidentProgramsNV (will be remapped) */
"ip\0"
"glRequestResidentProgramsNV\0"
"\0"
- /* _mesa_function_pool[18205]: TagSampleBufferSGIX (dynamic) */
+ /* _mesa_function_pool[18294]: TagSampleBufferSGIX (dynamic) */
"\0"
"glTagSampleBufferSGIX\0"
"\0"
- /* _mesa_function_pool[18229]: ReplacementCodeusSUN (dynamic) */
+ /* _mesa_function_pool[18318]: ReplacementCodeusSUN (dynamic) */
"i\0"
"glReplacementCodeusSUN\0"
"\0"
- /* _mesa_function_pool[18255]: FeedbackBuffer (offset 194) */
+ /* _mesa_function_pool[18344]: FeedbackBuffer (offset 194) */
"iip\0"
"glFeedbackBuffer\0"
"\0"
- /* _mesa_function_pool[18277]: RasterPos2iv (offset 67) */
+ /* _mesa_function_pool[18366]: RasterPos2iv (offset 67) */
"p\0"
"glRasterPos2iv\0"
"\0"
- /* _mesa_function_pool[18295]: TexImage1D (offset 182) */
+ /* _mesa_function_pool[18384]: TexImage1D (offset 182) */
"iiiiiiip\0"
"glTexImage1D\0"
"\0"
- /* _mesa_function_pool[18318]: ListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[18407]: ListParameterivSGIX (dynamic) */
"iip\0"
"glListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[18345]: MultiDrawElementsEXT (will be remapped) */
+ /* _mesa_function_pool[18434]: MultiDrawElementsEXT (will be remapped) */
"ipipi\0"
"glMultiDrawElements\0"
"glMultiDrawElementsEXT\0"
"\0"
- /* _mesa_function_pool[18395]: Color3s (offset 17) */
+ /* _mesa_function_pool[18484]: Color3s (offset 17) */
"iii\0"
"glColor3s\0"
"\0"
- /* _mesa_function_pool[18410]: Uniform1ivARB (will be remapped) */
+ /* _mesa_function_pool[18499]: Uniform1ivARB (will be remapped) */
"iip\0"
"glUniform1iv\0"
"glUniform1ivARB\0"
"\0"
- /* _mesa_function_pool[18444]: WindowPos2sMESA (will be remapped) */
+ /* _mesa_function_pool[18533]: WindowPos2sMESA (will be remapped) */
"ii\0"
"glWindowPos2s\0"
"glWindowPos2sARB\0"
"glWindowPos2sMESA\0"
"\0"
- /* _mesa_function_pool[18497]: WeightusvARB (dynamic) */
+ /* _mesa_function_pool[18586]: WeightusvARB (dynamic) */
"ip\0"
"glWeightusvARB\0"
"\0"
- /* _mesa_function_pool[18516]: TexCoordPointer (offset 320) */
+ /* _mesa_function_pool[18605]: TexCoordPointer (offset 320) */
"iiip\0"
"glTexCoordPointer\0"
"\0"
- /* _mesa_function_pool[18540]: FogCoordPointerEXT (will be remapped) */
+ /* _mesa_function_pool[18629]: FogCoordPointerEXT (will be remapped) */
"iip\0"
"glFogCoordPointer\0"
"glFogCoordPointerEXT\0"
"\0"
- /* _mesa_function_pool[18584]: IndexMaterialEXT (dynamic) */
+ /* _mesa_function_pool[18673]: IndexMaterialEXT (dynamic) */
"ii\0"
"glIndexMaterialEXT\0"
"\0"
- /* _mesa_function_pool[18607]: Color3i (offset 15) */
+ /* _mesa_function_pool[18696]: Color3i (offset 15) */
"iii\0"
"glColor3i\0"
"\0"
- /* _mesa_function_pool[18622]: FrontFace (offset 157) */
+ /* _mesa_function_pool[18711]: FrontFace (offset 157) */
"i\0"
"glFrontFace\0"
"\0"
- /* _mesa_function_pool[18637]: EvalCoord2d (offset 232) */
+ /* _mesa_function_pool[18726]: EvalCoord2d (offset 232) */
"dd\0"
"glEvalCoord2d\0"
"\0"
- /* _mesa_function_pool[18655]: SecondaryColor3ubvEXT (will be remapped) */
+ /* _mesa_function_pool[18744]: SecondaryColor3ubvEXT (will be remapped) */
"p\0"
"glSecondaryColor3ubv\0"
"glSecondaryColor3ubvEXT\0"
"\0"
- /* _mesa_function_pool[18703]: EvalCoord2f (offset 234) */
+ /* _mesa_function_pool[18792]: EvalCoord2f (offset 234) */
"ff\0"
"glEvalCoord2f\0"
"\0"
- /* _mesa_function_pool[18721]: VertexAttrib4dvARB (will be remapped) */
+ /* _mesa_function_pool[18810]: VertexAttrib4dvARB (will be remapped) */
"ip\0"
"glVertexAttrib4dv\0"
"glVertexAttrib4dvARB\0"
"\0"
- /* _mesa_function_pool[18764]: BindAttribLocationARB (will be remapped) */
+ /* _mesa_function_pool[18853]: BindAttribLocationARB (will be remapped) */
"iip\0"
"glBindAttribLocation\0"
"glBindAttribLocationARB\0"
"\0"
- /* _mesa_function_pool[18814]: Color3b (offset 9) */
+ /* _mesa_function_pool[18903]: Color3b (offset 9) */
"iii\0"
"glColor3b\0"
"\0"
- /* _mesa_function_pool[18829]: MultiTexCoord2dARB (offset 384) */
+ /* _mesa_function_pool[18918]: MultiTexCoord2dARB (offset 384) */
"idd\0"
"glMultiTexCoord2d\0"
"glMultiTexCoord2dARB\0"
"\0"
- /* _mesa_function_pool[18873]: ExecuteProgramNV (will be remapped) */
+ /* _mesa_function_pool[18962]: ExecuteProgramNV (will be remapped) */
"iip\0"
"glExecuteProgramNV\0"
"\0"
- /* _mesa_function_pool[18897]: Color3f (offset 13) */
+ /* _mesa_function_pool[18986]: Color3f (offset 13) */
"fff\0"
"glColor3f\0"
"\0"
- /* _mesa_function_pool[18912]: LightEnviSGIX (dynamic) */
+ /* _mesa_function_pool[19001]: LightEnviSGIX (dynamic) */
"ii\0"
"glLightEnviSGIX\0"
"\0"
- /* _mesa_function_pool[18932]: Color3d (offset 11) */
+ /* _mesa_function_pool[19021]: Color3d (offset 11) */
"ddd\0"
"glColor3d\0"
"\0"
- /* _mesa_function_pool[18947]: Normal3dv (offset 55) */
+ /* _mesa_function_pool[19036]: Normal3dv (offset 55) */
"p\0"
"glNormal3dv\0"
"\0"
- /* _mesa_function_pool[18962]: Lightf (offset 159) */
+ /* _mesa_function_pool[19051]: Lightf (offset 159) */
"iif\0"
"glLightf\0"
"\0"
- /* _mesa_function_pool[18976]: ReplacementCodeuiSUN (dynamic) */
+ /* _mesa_function_pool[19065]: ReplacementCodeuiSUN (dynamic) */
"i\0"
"glReplacementCodeuiSUN\0"
"\0"
- /* _mesa_function_pool[19002]: MatrixMode (offset 293) */
+ /* _mesa_function_pool[19091]: MatrixMode (offset 293) */
"i\0"
"glMatrixMode\0"
"\0"
- /* _mesa_function_pool[19018]: GetPixelMapusv (offset 273) */
+ /* _mesa_function_pool[19107]: GetPixelMapusv (offset 273) */
"ip\0"
"glGetPixelMapusv\0"
"\0"
- /* _mesa_function_pool[19039]: Lighti (offset 161) */
+ /* _mesa_function_pool[19128]: Lighti (offset 161) */
"iii\0"
"glLighti\0"
"\0"
- /* _mesa_function_pool[19053]: VertexAttribPointerNV (will be remapped) */
+ /* _mesa_function_pool[19142]: VertexAttribPointerNV (will be remapped) */
"iiiip\0"
"glVertexAttribPointerNV\0"
"\0"
- /* _mesa_function_pool[19084]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[19173]: GetBooleanIndexedvEXT (will be remapped) */
+ "iip\0"
+ "glGetBooleanIndexedvEXT\0"
+ "\0"
+ /* _mesa_function_pool[19202]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
"iiip\0"
"glGetFramebufferAttachmentParameteriv\0"
"glGetFramebufferAttachmentParameterivEXT\0"
"\0"
- /* _mesa_function_pool[19169]: PixelTransformParameterfEXT (dynamic) */
+ /* _mesa_function_pool[19287]: PixelTransformParameterfEXT (dynamic) */
"iif\0"
"glPixelTransformParameterfEXT\0"
"\0"
- /* _mesa_function_pool[19204]: MultiTexCoord4dvARB (offset 401) */
+ /* _mesa_function_pool[19322]: MultiTexCoord4dvARB (offset 401) */
"ip\0"
"glMultiTexCoord4dv\0"
"glMultiTexCoord4dvARB\0"
"\0"
- /* _mesa_function_pool[19249]: PixelTransformParameteriEXT (dynamic) */
+ /* _mesa_function_pool[19367]: PixelTransformParameteriEXT (dynamic) */
"iii\0"
"glPixelTransformParameteriEXT\0"
"\0"
- /* _mesa_function_pool[19284]: GetDoublev (offset 260) */
+ /* _mesa_function_pool[19402]: GetDoublev (offset 260) */
"ip\0"
"glGetDoublev\0"
"\0"
- /* _mesa_function_pool[19301]: MultMatrixd (offset 295) */
+ /* _mesa_function_pool[19419]: MultMatrixd (offset 295) */
"p\0"
"glMultMatrixd\0"
"\0"
- /* _mesa_function_pool[19318]: MultMatrixf (offset 294) */
+ /* _mesa_function_pool[19436]: MultMatrixf (offset 294) */
"p\0"
"glMultMatrixf\0"
"\0"
- /* _mesa_function_pool[19335]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[19453]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
"ffiiiifff\0"
"glTexCoord2fColor4ubVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[19378]: Uniform1iARB (will be remapped) */
+ /* _mesa_function_pool[19496]: Uniform1iARB (will be remapped) */
"ii\0"
"glUniform1i\0"
"glUniform1iARB\0"
"\0"
- /* _mesa_function_pool[19409]: VertexAttribPointerARB (will be remapped) */
+ /* _mesa_function_pool[19527]: VertexAttribPointerARB (will be remapped) */
"iiiiip\0"
"glVertexAttribPointer\0"
"glVertexAttribPointerARB\0"
"\0"
- /* _mesa_function_pool[19464]: SharpenTexFuncSGIS (dynamic) */
+ /* _mesa_function_pool[19582]: SharpenTexFuncSGIS (dynamic) */
"iip\0"
"glSharpenTexFuncSGIS\0"
"\0"
- /* _mesa_function_pool[19490]: MultiTexCoord4fvARB (offset 403) */
+ /* _mesa_function_pool[19608]: MultiTexCoord4fvARB (offset 403) */
"ip\0"
"glMultiTexCoord4fv\0"
"glMultiTexCoord4fvARB\0"
"\0"
- /* _mesa_function_pool[19535]: UniformMatrix2x3fv (will be remapped) */
+ /* _mesa_function_pool[19653]: UniformMatrix2x3fv (will be remapped) */
"iiip\0"
"glUniformMatrix2x3fv\0"
"\0"
- /* _mesa_function_pool[19562]: TrackMatrixNV (will be remapped) */
+ /* _mesa_function_pool[19680]: TrackMatrixNV (will be remapped) */
"iiii\0"
"glTrackMatrixNV\0"
"\0"
- /* _mesa_function_pool[19584]: CombinerParameteriNV (will be remapped) */
+ /* _mesa_function_pool[19702]: CombinerParameteriNV (will be remapped) */
"ii\0"
"glCombinerParameteriNV\0"
"\0"
- /* _mesa_function_pool[19611]: DeleteAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[19729]: DeleteAsyncMarkersSGIX (dynamic) */
"ii\0"
"glDeleteAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[19640]: IsAsyncMarkerSGIX (dynamic) */
+ /* _mesa_function_pool[19758]: IsAsyncMarkerSGIX (dynamic) */
"i\0"
"glIsAsyncMarkerSGIX\0"
"\0"
- /* _mesa_function_pool[19663]: FrameZoomSGIX (dynamic) */
+ /* _mesa_function_pool[19781]: FrameZoomSGIX (dynamic) */
"i\0"
"glFrameZoomSGIX\0"
"\0"
- /* _mesa_function_pool[19682]: Normal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[19800]: Normal3fVertex3fvSUN (dynamic) */
"pp\0"
"glNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[19709]: RasterPos4sv (offset 85) */
+ /* _mesa_function_pool[19827]: RasterPos4sv (offset 85) */
"p\0"
"glRasterPos4sv\0"
"\0"
- /* _mesa_function_pool[19727]: VertexAttrib4NsvARB (will be remapped) */
+ /* _mesa_function_pool[19845]: VertexAttrib4NsvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nsv\0"
"glVertexAttrib4NsvARB\0"
"\0"
- /* _mesa_function_pool[19772]: VertexAttrib3fvARB (will be remapped) */
+ /* _mesa_function_pool[19890]: VertexAttrib3fvARB (will be remapped) */
"ip\0"
"glVertexAttrib3fv\0"
"glVertexAttrib3fvARB\0"
"\0"
- /* _mesa_function_pool[19815]: ClearColor (offset 206) */
+ /* _mesa_function_pool[19933]: ClearColor (offset 206) */
"ffff\0"
"glClearColor\0"
"\0"
- /* _mesa_function_pool[19834]: GetSynciv (will be remapped) */
+ /* _mesa_function_pool[19952]: GetSynciv (will be remapped) */
"iiipp\0"
"glGetSynciv\0"
"\0"
- /* _mesa_function_pool[19853]: DeleteFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[19971]: DeleteFramebuffersEXT (will be remapped) */
"ip\0"
"glDeleteFramebuffers\0"
"glDeleteFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[19902]: GlobalAlphaFactorsSUN (dynamic) */
+ /* _mesa_function_pool[20020]: GlobalAlphaFactorsSUN (dynamic) */
"i\0"
"glGlobalAlphaFactorsSUN\0"
"\0"
- /* _mesa_function_pool[19929]: TexEnviv (offset 187) */
+ /* _mesa_function_pool[20047]: IsEnabledIndexedEXT (will be remapped) */
+ "ii\0"
+ "glIsEnabledIndexedEXT\0"
+ "\0"
+ /* _mesa_function_pool[20073]: TexEnviv (offset 187) */
"iip\0"
"glTexEnviv\0"
"\0"
- /* _mesa_function_pool[19945]: TexSubImage3D (offset 372) */
+ /* _mesa_function_pool[20089]: TexSubImage3D (offset 372) */
"iiiiiiiiiip\0"
"glTexSubImage3D\0"
"glTexSubImage3DEXT\0"
"\0"
- /* _mesa_function_pool[19993]: Tangent3fEXT (dynamic) */
+ /* _mesa_function_pool[20137]: Tangent3fEXT (dynamic) */
"fff\0"
"glTangent3fEXT\0"
"\0"
- /* _mesa_function_pool[20013]: SecondaryColor3uivEXT (will be remapped) */
+ /* _mesa_function_pool[20157]: SecondaryColor3uivEXT (will be remapped) */
"p\0"
"glSecondaryColor3uiv\0"
"glSecondaryColor3uivEXT\0"
"\0"
- /* _mesa_function_pool[20061]: MatrixIndexubvARB (dynamic) */
+ /* _mesa_function_pool[20205]: MatrixIndexubvARB (dynamic) */
"ip\0"
"glMatrixIndexubvARB\0"
"\0"
- /* _mesa_function_pool[20085]: Color4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[20229]: Color4fNormal3fVertex3fSUN (dynamic) */
"ffffffffff\0"
"glColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[20126]: PixelTexGenParameterfSGIS (will be remapped) */
+ /* _mesa_function_pool[20270]: PixelTexGenParameterfSGIS (will be remapped) */
"if\0"
"glPixelTexGenParameterfSGIS\0"
"\0"
- /* _mesa_function_pool[20158]: CreateShader (will be remapped) */
+ /* _mesa_function_pool[20302]: CreateShader (will be remapped) */
"i\0"
"glCreateShader\0"
"\0"
- /* _mesa_function_pool[20176]: GetColorTableParameterfv (offset 344) */
+ /* _mesa_function_pool[20320]: GetColorTableParameterfv (offset 344) */
"iip\0"
"glGetColorTableParameterfv\0"
"glGetColorTableParameterfvSGI\0"
"glGetColorTableParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[20268]: FragmentLightModelfvSGIX (dynamic) */
+ /* _mesa_function_pool[20412]: FragmentLightModelfvSGIX (dynamic) */
"ip\0"
"glFragmentLightModelfvSGIX\0"
"\0"
- /* _mesa_function_pool[20299]: Bitmap (offset 8) */
+ /* _mesa_function_pool[20443]: Bitmap (offset 8) */
"iiffffp\0"
"glBitmap\0"
"\0"
- /* _mesa_function_pool[20317]: MultiTexCoord3fARB (offset 394) */
+ /* _mesa_function_pool[20461]: MultiTexCoord3fARB (offset 394) */
"ifff\0"
"glMultiTexCoord3f\0"
"glMultiTexCoord3fARB\0"
"\0"
- /* _mesa_function_pool[20362]: GetTexLevelParameterfv (offset 284) */
+ /* _mesa_function_pool[20506]: GetTexLevelParameterfv (offset 284) */
"iiip\0"
"glGetTexLevelParameterfv\0"
"\0"
- /* _mesa_function_pool[20393]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ /* _mesa_function_pool[20537]: GetPixelTexGenParameterfvSGIS (will be remapped) */
"ip\0"
"glGetPixelTexGenParameterfvSGIS\0"
"\0"
- /* _mesa_function_pool[20429]: GenFramebuffersEXT (will be remapped) */
+ /* _mesa_function_pool[20573]: GenFramebuffersEXT (will be remapped) */
"ip\0"
"glGenFramebuffers\0"
"glGenFramebuffersEXT\0"
"\0"
- /* _mesa_function_pool[20472]: GetProgramParameterdvNV (will be remapped) */
+ /* _mesa_function_pool[20616]: GetProgramParameterdvNV (will be remapped) */
"iiip\0"
"glGetProgramParameterdvNV\0"
"\0"
- /* _mesa_function_pool[20504]: Vertex2sv (offset 133) */
+ /* _mesa_function_pool[20648]: Vertex2sv (offset 133) */
"p\0"
"glVertex2sv\0"
"\0"
- /* _mesa_function_pool[20519]: GetIntegerv (offset 263) */
+ /* _mesa_function_pool[20663]: GetIntegerv (offset 263) */
"ip\0"
"glGetIntegerv\0"
"\0"
- /* _mesa_function_pool[20537]: IsVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[20681]: IsVertexArrayAPPLE (will be remapped) */
"i\0"
"glIsVertexArray\0"
"glIsVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[20577]: FragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[20721]: FragmentLightfvSGIX (dynamic) */
"iip\0"
"glFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[20604]: DetachShader (will be remapped) */
+ /* _mesa_function_pool[20748]: DetachShader (will be remapped) */
"ii\0"
"glDetachShader\0"
"\0"
- /* _mesa_function_pool[20623]: VertexAttrib4NubARB (will be remapped) */
+ /* _mesa_function_pool[20767]: VertexAttrib4NubARB (will be remapped) */
"iiiii\0"
"glVertexAttrib4Nub\0"
"glVertexAttrib4NubARB\0"
"\0"
- /* _mesa_function_pool[20671]: GetProgramEnvParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[20815]: GetProgramEnvParameterfvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterfvARB\0"
"\0"
- /* _mesa_function_pool[20706]: GetTrackMatrixivNV (will be remapped) */
+ /* _mesa_function_pool[20850]: GetTrackMatrixivNV (will be remapped) */
"iiip\0"
"glGetTrackMatrixivNV\0"
"\0"
- /* _mesa_function_pool[20733]: VertexAttrib3svNV (will be remapped) */
+ /* _mesa_function_pool[20877]: VertexAttrib3svNV (will be remapped) */
"ip\0"
"glVertexAttrib3svNV\0"
"\0"
- /* _mesa_function_pool[20757]: Uniform4fvARB (will be remapped) */
+ /* _mesa_function_pool[20901]: Uniform4fvARB (will be remapped) */
"iip\0"
"glUniform4fv\0"
"glUniform4fvARB\0"
"\0"
- /* _mesa_function_pool[20791]: MultTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[20935]: MultTransposeMatrixfARB (will be remapped) */
"p\0"
"glMultTransposeMatrixf\0"
"glMultTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[20843]: GetTexEnviv (offset 277) */
+ /* _mesa_function_pool[20987]: GetTexEnviv (offset 277) */
"iip\0"
"glGetTexEnviv\0"
"\0"
- /* _mesa_function_pool[20862]: ColorFragmentOp1ATI (will be remapped) */
+ /* _mesa_function_pool[21006]: ColorFragmentOp1ATI (will be remapped) */
"iiiiiii\0"
"glColorFragmentOp1ATI\0"
"\0"
- /* _mesa_function_pool[20893]: GetUniformfvARB (will be remapped) */
+ /* _mesa_function_pool[21037]: GetUniformfvARB (will be remapped) */
"iip\0"
"glGetUniformfv\0"
"glGetUniformfvARB\0"
"\0"
- /* _mesa_function_pool[20931]: PopClientAttrib (offset 334) */
+ /* _mesa_function_pool[21075]: PopClientAttrib (offset 334) */
"\0"
"glPopClientAttrib\0"
"\0"
- /* _mesa_function_pool[20951]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[21095]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
"iffffffffffff\0"
"glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[21022]: DetachObjectARB (will be remapped) */
+ /* _mesa_function_pool[21166]: DetachObjectARB (will be remapped) */
"ii\0"
"glDetachObjectARB\0"
"\0"
- /* _mesa_function_pool[21044]: VertexBlendARB (dynamic) */
+ /* _mesa_function_pool[21188]: VertexBlendARB (dynamic) */
"i\0"
"glVertexBlendARB\0"
"\0"
- /* _mesa_function_pool[21064]: WindowPos3iMESA (will be remapped) */
+ /* _mesa_function_pool[21208]: WindowPos3iMESA (will be remapped) */
"iii\0"
"glWindowPos3i\0"
"glWindowPos3iARB\0"
"glWindowPos3iMESA\0"
"\0"
- /* _mesa_function_pool[21118]: SeparableFilter2D (offset 360) */
+ /* _mesa_function_pool[21262]: SeparableFilter2D (offset 360) */
"iiiiiipp\0"
"glSeparableFilter2D\0"
"glSeparableFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[21171]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[21315]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiColor4ubVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[21216]: Map1d (offset 220) */
+ /* _mesa_function_pool[21360]: Map1d (offset 220) */
"iddiip\0"
"glMap1d\0"
"\0"
- /* _mesa_function_pool[21232]: Map1f (offset 221) */
+ /* _mesa_function_pool[21376]: Map1f (offset 221) */
"iffiip\0"
"glMap1f\0"
"\0"
- /* _mesa_function_pool[21248]: CompressedTexImage2DARB (will be remapped) */
+ /* _mesa_function_pool[21392]: CompressedTexImage2DARB (will be remapped) */
"iiiiiiip\0"
"glCompressedTexImage2D\0"
"glCompressedTexImage2DARB\0"
"\0"
- /* _mesa_function_pool[21307]: ArrayElement (offset 306) */
+ /* _mesa_function_pool[21451]: ArrayElement (offset 306) */
"i\0"
"glArrayElement\0"
"glArrayElementEXT\0"
"\0"
- /* _mesa_function_pool[21343]: TexImage2D (offset 183) */
+ /* _mesa_function_pool[21487]: TexImage2D (offset 183) */
"iiiiiiiip\0"
"glTexImage2D\0"
"\0"
- /* _mesa_function_pool[21367]: DepthBoundsEXT (will be remapped) */
+ /* _mesa_function_pool[21511]: DepthBoundsEXT (will be remapped) */
"dd\0"
"glDepthBoundsEXT\0"
"\0"
- /* _mesa_function_pool[21388]: ProgramParameters4fvNV (will be remapped) */
+ /* _mesa_function_pool[21532]: ProgramParameters4fvNV (will be remapped) */
"iiip\0"
"glProgramParameters4fvNV\0"
"\0"
- /* _mesa_function_pool[21419]: DeformationMap3fSGIX (dynamic) */
+ /* _mesa_function_pool[21563]: DeformationMap3fSGIX (dynamic) */
"iffiiffiiffiip\0"
"glDeformationMap3fSGIX\0"
"\0"
- /* _mesa_function_pool[21458]: GetProgramivNV (will be remapped) */
+ /* _mesa_function_pool[21602]: GetProgramivNV (will be remapped) */
"iip\0"
"glGetProgramivNV\0"
"\0"
- /* _mesa_function_pool[21480]: GetMinmaxParameteriv (offset 366) */
+ /* _mesa_function_pool[21624]: GetMinmaxParameteriv (offset 366) */
"iip\0"
"glGetMinmaxParameteriv\0"
"glGetMinmaxParameterivEXT\0"
"\0"
- /* _mesa_function_pool[21534]: PixelTransferf (offset 247) */
+ /* _mesa_function_pool[21678]: PixelTransferf (offset 247) */
"if\0"
"glPixelTransferf\0"
"\0"
- /* _mesa_function_pool[21555]: CopyTexImage1D (offset 323) */
+ /* _mesa_function_pool[21699]: CopyTexImage1D (offset 323) */
"iiiiiii\0"
"glCopyTexImage1D\0"
"glCopyTexImage1DEXT\0"
"\0"
- /* _mesa_function_pool[21601]: PushMatrix (offset 298) */
+ /* _mesa_function_pool[21745]: PushMatrix (offset 298) */
"\0"
"glPushMatrix\0"
"\0"
- /* _mesa_function_pool[21616]: Fogiv (offset 156) */
+ /* _mesa_function_pool[21760]: Fogiv (offset 156) */
"ip\0"
"glFogiv\0"
"\0"
- /* _mesa_function_pool[21628]: TexCoord1dv (offset 95) */
+ /* _mesa_function_pool[21772]: TexCoord1dv (offset 95) */
"p\0"
"glTexCoord1dv\0"
"\0"
- /* _mesa_function_pool[21645]: AlphaFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[21789]: AlphaFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiii\0"
"glAlphaFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[21681]: PixelTransferi (offset 248) */
+ /* _mesa_function_pool[21825]: PixelTransferi (offset 248) */
"ii\0"
"glPixelTransferi\0"
"\0"
- /* _mesa_function_pool[21702]: GetVertexAttribdvNV (will be remapped) */
+ /* _mesa_function_pool[21846]: GetVertexAttribdvNV (will be remapped) */
"iip\0"
"glGetVertexAttribdvNV\0"
"\0"
- /* _mesa_function_pool[21729]: VertexAttrib3fvNV (will be remapped) */
+ /* _mesa_function_pool[21873]: VertexAttrib3fvNV (will be remapped) */
"ip\0"
"glVertexAttrib3fvNV\0"
"\0"
- /* _mesa_function_pool[21753]: Rotatef (offset 300) */
+ /* _mesa_function_pool[21897]: Rotatef (offset 300) */
"ffff\0"
"glRotatef\0"
"\0"
- /* _mesa_function_pool[21769]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[21913]: GetFinalCombinerInputParameterivNV (will be remapped) */
"iip\0"
"glGetFinalCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[21811]: Vertex3i (offset 138) */
+ /* _mesa_function_pool[21955]: Vertex3i (offset 138) */
"iii\0"
"glVertex3i\0"
"\0"
- /* _mesa_function_pool[21827]: Vertex3f (offset 136) */
+ /* _mesa_function_pool[21971]: Vertex3f (offset 136) */
"fff\0"
"glVertex3f\0"
"\0"
- /* _mesa_function_pool[21843]: Clear (offset 203) */
+ /* _mesa_function_pool[21987]: Clear (offset 203) */
"i\0"
"glClear\0"
"\0"
- /* _mesa_function_pool[21854]: Vertex3d (offset 134) */
+ /* _mesa_function_pool[21998]: Vertex3d (offset 134) */
"ddd\0"
"glVertex3d\0"
"\0"
- /* _mesa_function_pool[21870]: GetMapParameterivNV (dynamic) */
+ /* _mesa_function_pool[22014]: GetMapParameterivNV (dynamic) */
"iip\0"
"glGetMapParameterivNV\0"
"\0"
- /* _mesa_function_pool[21897]: Uniform4iARB (will be remapped) */
+ /* _mesa_function_pool[22041]: Uniform4iARB (will be remapped) */
"iiiii\0"
"glUniform4i\0"
"glUniform4iARB\0"
"\0"
- /* _mesa_function_pool[21931]: ReadBuffer (offset 254) */
+ /* _mesa_function_pool[22075]: ReadBuffer (offset 254) */
"i\0"
"glReadBuffer\0"
"\0"
- /* _mesa_function_pool[21947]: ConvolutionParameteri (offset 352) */
+ /* _mesa_function_pool[22091]: ConvolutionParameteri (offset 352) */
"iii\0"
"glConvolutionParameteri\0"
"glConvolutionParameteriEXT\0"
"\0"
- /* _mesa_function_pool[22003]: Ortho (offset 296) */
+ /* _mesa_function_pool[22147]: Ortho (offset 296) */
"dddddd\0"
"glOrtho\0"
"\0"
- /* _mesa_function_pool[22019]: Binormal3sEXT (dynamic) */
+ /* _mesa_function_pool[22163]: Binormal3sEXT (dynamic) */
"iii\0"
"glBinormal3sEXT\0"
"\0"
- /* _mesa_function_pool[22040]: ListBase (offset 6) */
+ /* _mesa_function_pool[22184]: ListBase (offset 6) */
"i\0"
"glListBase\0"
"\0"
- /* _mesa_function_pool[22054]: Vertex3s (offset 140) */
+ /* _mesa_function_pool[22198]: Vertex3s (offset 140) */
"iii\0"
"glVertex3s\0"
"\0"
- /* _mesa_function_pool[22070]: ConvolutionParameterf (offset 350) */
+ /* _mesa_function_pool[22214]: ConvolutionParameterf (offset 350) */
"iif\0"
"glConvolutionParameterf\0"
"glConvolutionParameterfEXT\0"
"\0"
- /* _mesa_function_pool[22126]: GetColorTableParameteriv (offset 345) */
+ /* _mesa_function_pool[22270]: GetColorTableParameteriv (offset 345) */
"iip\0"
"glGetColorTableParameteriv\0"
"glGetColorTableParameterivSGI\0"
"glGetColorTableParameterivEXT\0"
"\0"
- /* _mesa_function_pool[22218]: ProgramEnvParameter4dvARB (will be remapped) */
+ /* _mesa_function_pool[22362]: ProgramEnvParameter4dvARB (will be remapped) */
"iip\0"
"glProgramEnvParameter4dvARB\0"
"glProgramParameter4dvNV\0"
"\0"
- /* _mesa_function_pool[22275]: ShadeModel (offset 177) */
+ /* _mesa_function_pool[22419]: ShadeModel (offset 177) */
"i\0"
"glShadeModel\0"
"\0"
- /* _mesa_function_pool[22291]: VertexAttribs2fvNV (will be remapped) */
+ /* _mesa_function_pool[22435]: VertexAttribs2fvNV (will be remapped) */
"iip\0"
"glVertexAttribs2fvNV\0"
"\0"
- /* _mesa_function_pool[22317]: Rectiv (offset 91) */
+ /* _mesa_function_pool[22461]: Rectiv (offset 91) */
"pp\0"
"glRectiv\0"
"\0"
- /* _mesa_function_pool[22330]: UseProgramObjectARB (will be remapped) */
+ /* _mesa_function_pool[22474]: UseProgramObjectARB (will be remapped) */
"i\0"
"glUseProgram\0"
"glUseProgramObjectARB\0"
"\0"
- /* _mesa_function_pool[22368]: GetMapParameterfvNV (dynamic) */
+ /* _mesa_function_pool[22512]: GetMapParameterfvNV (dynamic) */
"iip\0"
"glGetMapParameterfvNV\0"
"\0"
- /* _mesa_function_pool[22395]: PassTexCoordATI (will be remapped) */
+ /* _mesa_function_pool[22539]: EndConditionalRenderNV (will be remapped) */
+ "\0"
+ "glEndConditionalRenderNV\0"
+ "\0"
+ /* _mesa_function_pool[22566]: PassTexCoordATI (will be remapped) */
"iii\0"
"glPassTexCoordATI\0"
"\0"
- /* _mesa_function_pool[22418]: DeleteProgram (will be remapped) */
+ /* _mesa_function_pool[22589]: DeleteProgram (will be remapped) */
"i\0"
"glDeleteProgram\0"
"\0"
- /* _mesa_function_pool[22437]: Tangent3ivEXT (dynamic) */
+ /* _mesa_function_pool[22608]: Tangent3ivEXT (dynamic) */
"p\0"
"glTangent3ivEXT\0"
"\0"
- /* _mesa_function_pool[22456]: Tangent3dEXT (dynamic) */
+ /* _mesa_function_pool[22627]: Tangent3dEXT (dynamic) */
"ddd\0"
"glTangent3dEXT\0"
"\0"
- /* _mesa_function_pool[22476]: SecondaryColor3dvEXT (will be remapped) */
+ /* _mesa_function_pool[22647]: SecondaryColor3dvEXT (will be remapped) */
"p\0"
"glSecondaryColor3dv\0"
"glSecondaryColor3dvEXT\0"
"\0"
- /* _mesa_function_pool[22522]: Vertex2fv (offset 129) */
+ /* _mesa_function_pool[22693]: Vertex2fv (offset 129) */
"p\0"
"glVertex2fv\0"
"\0"
- /* _mesa_function_pool[22537]: MultiDrawArraysEXT (will be remapped) */
+ /* _mesa_function_pool[22708]: MultiDrawArraysEXT (will be remapped) */
"ippi\0"
"glMultiDrawArrays\0"
"glMultiDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[22582]: BindRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[22753]: BindRenderbufferEXT (will be remapped) */
"ii\0"
"glBindRenderbuffer\0"
"glBindRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[22627]: MultiTexCoord4dARB (offset 400) */
+ /* _mesa_function_pool[22798]: MultiTexCoord4dARB (offset 400) */
"idddd\0"
"glMultiTexCoord4d\0"
"glMultiTexCoord4dARB\0"
"\0"
- /* _mesa_function_pool[22673]: Vertex3sv (offset 141) */
+ /* _mesa_function_pool[22844]: Vertex3sv (offset 141) */
"p\0"
"glVertex3sv\0"
"\0"
- /* _mesa_function_pool[22688]: SecondaryColor3usEXT (will be remapped) */
+ /* _mesa_function_pool[22859]: SecondaryColor3usEXT (will be remapped) */
"iii\0"
"glSecondaryColor3us\0"
"glSecondaryColor3usEXT\0"
"\0"
- /* _mesa_function_pool[22736]: ProgramLocalParameter4fvARB (will be remapped) */
+ /* _mesa_function_pool[22907]: ProgramLocalParameter4fvARB (will be remapped) */
"iip\0"
"glProgramLocalParameter4fvARB\0"
"\0"
- /* _mesa_function_pool[22771]: DeleteProgramsNV (will be remapped) */
+ /* _mesa_function_pool[22942]: DeleteProgramsNV (will be remapped) */
"ip\0"
"glDeleteProgramsARB\0"
"glDeleteProgramsNV\0"
"\0"
- /* _mesa_function_pool[22814]: EvalMesh1 (offset 236) */
+ /* _mesa_function_pool[22985]: EvalMesh1 (offset 236) */
"iii\0"
"glEvalMesh1\0"
"\0"
- /* _mesa_function_pool[22831]: MultiTexCoord1sARB (offset 382) */
+ /* _mesa_function_pool[23002]: MultiTexCoord1sARB (offset 382) */
"ii\0"
"glMultiTexCoord1s\0"
"glMultiTexCoord1sARB\0"
"\0"
- /* _mesa_function_pool[22874]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[23045]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
"iffffff\0"
"glReplacementCodeuiColor3fVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[22921]: GetVertexAttribPointervNV (will be remapped) */
+ /* _mesa_function_pool[23092]: GetVertexAttribPointervNV (will be remapped) */
"iip\0"
"glGetVertexAttribPointerv\0"
"glGetVertexAttribPointervARB\0"
"glGetVertexAttribPointervNV\0"
"\0"
- /* _mesa_function_pool[23009]: MultiTexCoord1dvARB (offset 377) */
+ /* _mesa_function_pool[23180]: DisableIndexedEXT (will be remapped) */
+ "ii\0"
+ "glDisableIndexedEXT\0"
+ "\0"
+ /* _mesa_function_pool[23204]: MultiTexCoord1dvARB (offset 377) */
"ip\0"
"glMultiTexCoord1dv\0"
"glMultiTexCoord1dvARB\0"
"\0"
- /* _mesa_function_pool[23054]: Uniform2iARB (will be remapped) */
+ /* _mesa_function_pool[23249]: Uniform2iARB (will be remapped) */
"iii\0"
"glUniform2i\0"
"glUniform2iARB\0"
"\0"
- /* _mesa_function_pool[23086]: Vertex2iv (offset 131) */
+ /* _mesa_function_pool[23281]: Vertex2iv (offset 131) */
"p\0"
"glVertex2iv\0"
"\0"
- /* _mesa_function_pool[23101]: GetProgramStringNV (will be remapped) */
+ /* _mesa_function_pool[23296]: GetProgramStringNV (will be remapped) */
"iip\0"
"glGetProgramStringNV\0"
"\0"
- /* _mesa_function_pool[23127]: ColorPointerEXT (will be remapped) */
+ /* _mesa_function_pool[23322]: ColorPointerEXT (will be remapped) */
"iiiip\0"
"glColorPointerEXT\0"
"\0"
- /* _mesa_function_pool[23152]: LineWidth (offset 168) */
+ /* _mesa_function_pool[23347]: LineWidth (offset 168) */
"f\0"
"glLineWidth\0"
"\0"
- /* _mesa_function_pool[23167]: MapBufferARB (will be remapped) */
+ /* _mesa_function_pool[23362]: MapBufferARB (will be remapped) */
"ii\0"
"glMapBuffer\0"
"glMapBufferARB\0"
"\0"
- /* _mesa_function_pool[23198]: MultiDrawElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[23393]: MultiDrawElementsBaseVertex (will be remapped) */
"ipipip\0"
"glMultiDrawElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[23236]: Binormal3svEXT (dynamic) */
+ /* _mesa_function_pool[23431]: Binormal3svEXT (dynamic) */
"p\0"
"glBinormal3svEXT\0"
"\0"
- /* _mesa_function_pool[23256]: ApplyTextureEXT (dynamic) */
+ /* _mesa_function_pool[23451]: ApplyTextureEXT (dynamic) */
"i\0"
"glApplyTextureEXT\0"
"\0"
- /* _mesa_function_pool[23277]: TexGendv (offset 189) */
+ /* _mesa_function_pool[23472]: TexGendv (offset 189) */
"iip\0"
"glTexGendv\0"
"\0"
- /* _mesa_function_pool[23293]: TextureMaterialEXT (dynamic) */
+ /* _mesa_function_pool[23488]: EnableIndexedEXT (will be remapped) */
+ "ii\0"
+ "glEnableIndexedEXT\0"
+ "\0"
+ /* _mesa_function_pool[23511]: TextureMaterialEXT (dynamic) */
"ii\0"
"glTextureMaterialEXT\0"
"\0"
- /* _mesa_function_pool[23318]: TextureLightEXT (dynamic) */
+ /* _mesa_function_pool[23536]: TextureLightEXT (dynamic) */
"i\0"
"glTextureLightEXT\0"
"\0"
- /* _mesa_function_pool[23339]: ResetMinmax (offset 370) */
+ /* _mesa_function_pool[23557]: ResetMinmax (offset 370) */
"i\0"
"glResetMinmax\0"
"glResetMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[23373]: SpriteParameterfSGIX (dynamic) */
+ /* _mesa_function_pool[23591]: SpriteParameterfSGIX (dynamic) */
"if\0"
"glSpriteParameterfSGIX\0"
"\0"
- /* _mesa_function_pool[23400]: EnableClientState (offset 313) */
+ /* _mesa_function_pool[23618]: EnableClientState (offset 313) */
"i\0"
"glEnableClientState\0"
"\0"
- /* _mesa_function_pool[23423]: VertexAttrib4sNV (will be remapped) */
+ /* _mesa_function_pool[23641]: VertexAttrib4sNV (will be remapped) */
"iiiii\0"
"glVertexAttrib4sNV\0"
"\0"
- /* _mesa_function_pool[23449]: GetConvolutionParameterfv (offset 357) */
+ /* _mesa_function_pool[23667]: GetConvolutionParameterfv (offset 357) */
"iip\0"
"glGetConvolutionParameterfv\0"
"glGetConvolutionParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[23513]: VertexAttribs4dvNV (will be remapped) */
+ /* _mesa_function_pool[23731]: VertexAttribs4dvNV (will be remapped) */
"iip\0"
"glVertexAttribs4dvNV\0"
"\0"
- /* _mesa_function_pool[23539]: MultiModeDrawArraysIBM (will be remapped) */
+ /* _mesa_function_pool[23757]: MultiModeDrawArraysIBM (will be remapped) */
"pppii\0"
"glMultiModeDrawArraysIBM\0"
"\0"
- /* _mesa_function_pool[23571]: VertexAttrib4dARB (will be remapped) */
+ /* _mesa_function_pool[23789]: VertexAttrib4dARB (will be remapped) */
"idddd\0"
"glVertexAttrib4d\0"
"glVertexAttrib4dARB\0"
"\0"
- /* _mesa_function_pool[23615]: GetTexBumpParameterfvATI (will be remapped) */
+ /* _mesa_function_pool[23833]: GetTexBumpParameterfvATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterfvATI\0"
"\0"
- /* _mesa_function_pool[23646]: ProgramNamedParameter4dNV (will be remapped) */
+ /* _mesa_function_pool[23864]: ProgramNamedParameter4dNV (will be remapped) */
"iipdddd\0"
"glProgramNamedParameter4dNV\0"
"\0"
- /* _mesa_function_pool[23683]: GetMaterialfv (offset 269) */
+ /* _mesa_function_pool[23901]: GetMaterialfv (offset 269) */
"iip\0"
"glGetMaterialfv\0"
"\0"
- /* _mesa_function_pool[23704]: VertexWeightfEXT (dynamic) */
+ /* _mesa_function_pool[23922]: VertexWeightfEXT (dynamic) */
"f\0"
"glVertexWeightfEXT\0"
"\0"
- /* _mesa_function_pool[23726]: Binormal3fEXT (dynamic) */
+ /* _mesa_function_pool[23944]: Binormal3fEXT (dynamic) */
"fff\0"
"glBinormal3fEXT\0"
"\0"
- /* _mesa_function_pool[23747]: CallList (offset 2) */
+ /* _mesa_function_pool[23965]: CallList (offset 2) */
"i\0"
"glCallList\0"
"\0"
- /* _mesa_function_pool[23761]: Materialfv (offset 170) */
+ /* _mesa_function_pool[23979]: Materialfv (offset 170) */
"iip\0"
"glMaterialfv\0"
"\0"
- /* _mesa_function_pool[23779]: TexCoord3fv (offset 113) */
+ /* _mesa_function_pool[23997]: TexCoord3fv (offset 113) */
"p\0"
"glTexCoord3fv\0"
"\0"
- /* _mesa_function_pool[23796]: FogCoordfvEXT (will be remapped) */
+ /* _mesa_function_pool[24014]: FogCoordfvEXT (will be remapped) */
"p\0"
"glFogCoordfv\0"
"glFogCoordfvEXT\0"
"\0"
- /* _mesa_function_pool[23828]: MultiTexCoord1ivARB (offset 381) */
+ /* _mesa_function_pool[24046]: MultiTexCoord1ivARB (offset 381) */
"ip\0"
"glMultiTexCoord1iv\0"
"glMultiTexCoord1ivARB\0"
"\0"
- /* _mesa_function_pool[23873]: SecondaryColor3ubEXT (will be remapped) */
+ /* _mesa_function_pool[24091]: SecondaryColor3ubEXT (will be remapped) */
"iii\0"
"glSecondaryColor3ub\0"
"glSecondaryColor3ubEXT\0"
"\0"
- /* _mesa_function_pool[23921]: MultiTexCoord2ivARB (offset 389) */
+ /* _mesa_function_pool[24139]: MultiTexCoord2ivARB (offset 389) */
"ip\0"
"glMultiTexCoord2iv\0"
"glMultiTexCoord2ivARB\0"
"\0"
- /* _mesa_function_pool[23966]: FogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[24184]: FogFuncSGIS (dynamic) */
"ip\0"
"glFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[23984]: CopyTexSubImage2D (offset 326) */
+ /* _mesa_function_pool[24202]: CopyTexSubImage2D (offset 326) */
"iiiiiiii\0"
"glCopyTexSubImage2D\0"
"glCopyTexSubImage2DEXT\0"
"\0"
- /* _mesa_function_pool[24037]: GetObjectParameterivARB (will be remapped) */
+ /* _mesa_function_pool[24255]: GetObjectParameterivARB (will be remapped) */
"iip\0"
"glGetObjectParameterivARB\0"
"\0"
- /* _mesa_function_pool[24068]: Color3iv (offset 16) */
+ /* _mesa_function_pool[24286]: Color3iv (offset 16) */
"p\0"
"glColor3iv\0"
"\0"
- /* _mesa_function_pool[24082]: TexCoord4fVertex4fSUN (dynamic) */
+ /* _mesa_function_pool[24300]: TexCoord4fVertex4fSUN (dynamic) */
"ffffffff\0"
"glTexCoord4fVertex4fSUN\0"
"\0"
- /* _mesa_function_pool[24116]: DrawElements (offset 311) */
+ /* _mesa_function_pool[24334]: DrawElements (offset 311) */
"iiip\0"
"glDrawElements\0"
"\0"
- /* _mesa_function_pool[24137]: BindVertexArrayAPPLE (will be remapped) */
+ /* _mesa_function_pool[24355]: BindVertexArrayAPPLE (will be remapped) */
"i\0"
"glBindVertexArrayAPPLE\0"
"\0"
- /* _mesa_function_pool[24163]: GetProgramLocalParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[24381]: GetProgramLocalParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramLocalParameterdvARB\0"
"\0"
- /* _mesa_function_pool[24200]: GetHistogramParameteriv (offset 363) */
+ /* _mesa_function_pool[24418]: GetHistogramParameteriv (offset 363) */
"iip\0"
"glGetHistogramParameteriv\0"
"glGetHistogramParameterivEXT\0"
"\0"
- /* _mesa_function_pool[24260]: MultiTexCoord1iARB (offset 380) */
+ /* _mesa_function_pool[24478]: MultiTexCoord1iARB (offset 380) */
"ii\0"
"glMultiTexCoord1i\0"
"glMultiTexCoord1iARB\0"
"\0"
- /* _mesa_function_pool[24303]: GetConvolutionFilter (offset 356) */
+ /* _mesa_function_pool[24521]: GetConvolutionFilter (offset 356) */
"iiip\0"
"glGetConvolutionFilter\0"
"glGetConvolutionFilterEXT\0"
"\0"
- /* _mesa_function_pool[24358]: GetProgramivARB (will be remapped) */
+ /* _mesa_function_pool[24576]: GetProgramivARB (will be remapped) */
"iip\0"
"glGetProgramivARB\0"
"\0"
- /* _mesa_function_pool[24381]: BlendFuncSeparateEXT (will be remapped) */
+ /* _mesa_function_pool[24599]: BlendFuncSeparateEXT (will be remapped) */
"iiii\0"
"glBlendFuncSeparate\0"
"glBlendFuncSeparateEXT\0"
"glBlendFuncSeparateINGR\0"
"\0"
- /* _mesa_function_pool[24454]: MapBufferRange (will be remapped) */
+ /* _mesa_function_pool[24672]: MapBufferRange (will be remapped) */
"iiii\0"
"glMapBufferRange\0"
"\0"
- /* _mesa_function_pool[24477]: ProgramParameters4dvNV (will be remapped) */
+ /* _mesa_function_pool[24695]: ProgramParameters4dvNV (will be remapped) */
"iiip\0"
"glProgramParameters4dvNV\0"
"\0"
- /* _mesa_function_pool[24508]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[24726]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
"ppp\0"
"glTexCoord2fColor3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[24545]: EvalPoint2 (offset 239) */
+ /* _mesa_function_pool[24763]: EvalPoint2 (offset 239) */
"ii\0"
"glEvalPoint2\0"
"\0"
- /* _mesa_function_pool[24562]: EvalPoint1 (offset 237) */
+ /* _mesa_function_pool[24780]: EvalPoint1 (offset 237) */
"i\0"
"glEvalPoint1\0"
"\0"
- /* _mesa_function_pool[24578]: Binormal3dvEXT (dynamic) */
+ /* _mesa_function_pool[24796]: Binormal3dvEXT (dynamic) */
"p\0"
"glBinormal3dvEXT\0"
"\0"
- /* _mesa_function_pool[24598]: PopMatrix (offset 297) */
+ /* _mesa_function_pool[24816]: PopMatrix (offset 297) */
"\0"
"glPopMatrix\0"
"\0"
- /* _mesa_function_pool[24612]: FinishFenceNV (will be remapped) */
+ /* _mesa_function_pool[24830]: FinishFenceNV (will be remapped) */
"i\0"
"glFinishFenceNV\0"
"\0"
- /* _mesa_function_pool[24631]: GetFogFuncSGIS (dynamic) */
+ /* _mesa_function_pool[24849]: GetFogFuncSGIS (dynamic) */
"p\0"
"glGetFogFuncSGIS\0"
"\0"
- /* _mesa_function_pool[24651]: GetUniformLocationARB (will be remapped) */
+ /* _mesa_function_pool[24869]: GetUniformLocationARB (will be remapped) */
"ip\0"
"glGetUniformLocation\0"
"glGetUniformLocationARB\0"
"\0"
- /* _mesa_function_pool[24700]: SecondaryColor3fEXT (will be remapped) */
+ /* _mesa_function_pool[24918]: SecondaryColor3fEXT (will be remapped) */
"fff\0"
"glSecondaryColor3f\0"
"glSecondaryColor3fEXT\0"
"\0"
- /* _mesa_function_pool[24746]: GetTexGeniv (offset 280) */
+ /* _mesa_function_pool[24964]: GetTexGeniv (offset 280) */
"iip\0"
"glGetTexGeniv\0"
"\0"
- /* _mesa_function_pool[24765]: CombinerInputNV (will be remapped) */
+ /* _mesa_function_pool[24983]: CombinerInputNV (will be remapped) */
"iiiiii\0"
"glCombinerInputNV\0"
"\0"
- /* _mesa_function_pool[24791]: VertexAttrib3sARB (will be remapped) */
+ /* _mesa_function_pool[25009]: VertexAttrib3sARB (will be remapped) */
"iiii\0"
"glVertexAttrib3s\0"
"glVertexAttrib3sARB\0"
"\0"
- /* _mesa_function_pool[24834]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ /* _mesa_function_pool[25052]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
"ppp\0"
"glReplacementCodeuiNormal3fVertex3fvSUN\0"
"\0"
- /* _mesa_function_pool[24879]: Map2d (offset 222) */
+ /* _mesa_function_pool[25097]: Map2d (offset 222) */
"iddiiddiip\0"
"glMap2d\0"
"\0"
- /* _mesa_function_pool[24899]: Map2f (offset 223) */
+ /* _mesa_function_pool[25117]: Map2f (offset 223) */
"iffiiffiip\0"
"glMap2f\0"
"\0"
- /* _mesa_function_pool[24919]: ProgramStringARB (will be remapped) */
+ /* _mesa_function_pool[25137]: ProgramStringARB (will be remapped) */
"iiip\0"
"glProgramStringARB\0"
"\0"
- /* _mesa_function_pool[24944]: Vertex4s (offset 148) */
+ /* _mesa_function_pool[25162]: Vertex4s (offset 148) */
"iiii\0"
"glVertex4s\0"
"\0"
- /* _mesa_function_pool[24961]: TexCoord4fVertex4fvSUN (dynamic) */
+ /* _mesa_function_pool[25179]: TexCoord4fVertex4fvSUN (dynamic) */
"pp\0"
"glTexCoord4fVertex4fvSUN\0"
"\0"
- /* _mesa_function_pool[24990]: VertexAttrib3sNV (will be remapped) */
+ /* _mesa_function_pool[25208]: VertexAttrib3sNV (will be remapped) */
"iiii\0"
"glVertexAttrib3sNV\0"
"\0"
- /* _mesa_function_pool[25015]: VertexAttrib1fNV (will be remapped) */
+ /* _mesa_function_pool[25233]: VertexAttrib1fNV (will be remapped) */
"if\0"
"glVertexAttrib1fNV\0"
"\0"
- /* _mesa_function_pool[25038]: Vertex4f (offset 144) */
+ /* _mesa_function_pool[25256]: Vertex4f (offset 144) */
"ffff\0"
"glVertex4f\0"
"\0"
- /* _mesa_function_pool[25055]: EvalCoord1d (offset 228) */
+ /* _mesa_function_pool[25273]: EvalCoord1d (offset 228) */
"d\0"
"glEvalCoord1d\0"
"\0"
- /* _mesa_function_pool[25072]: Vertex4d (offset 142) */
+ /* _mesa_function_pool[25290]: Vertex4d (offset 142) */
"dddd\0"
"glVertex4d\0"
"\0"
- /* _mesa_function_pool[25089]: RasterPos4dv (offset 79) */
+ /* _mesa_function_pool[25307]: RasterPos4dv (offset 79) */
"p\0"
"glRasterPos4dv\0"
"\0"
- /* _mesa_function_pool[25107]: FragmentLightfSGIX (dynamic) */
+ /* _mesa_function_pool[25325]: FragmentLightfSGIX (dynamic) */
"iif\0"
"glFragmentLightfSGIX\0"
"\0"
- /* _mesa_function_pool[25133]: GetCompressedTexImageARB (will be remapped) */
+ /* _mesa_function_pool[25351]: GetCompressedTexImageARB (will be remapped) */
"iip\0"
"glGetCompressedTexImage\0"
"glGetCompressedTexImageARB\0"
"\0"
- /* _mesa_function_pool[25189]: GetTexGenfv (offset 279) */
+ /* _mesa_function_pool[25407]: GetTexGenfv (offset 279) */
"iip\0"
"glGetTexGenfv\0"
"\0"
- /* _mesa_function_pool[25208]: Vertex4i (offset 146) */
+ /* _mesa_function_pool[25426]: Vertex4i (offset 146) */
"iiii\0"
"glVertex4i\0"
"\0"
- /* _mesa_function_pool[25225]: VertexWeightPointerEXT (dynamic) */
+ /* _mesa_function_pool[25443]: VertexWeightPointerEXT (dynamic) */
"iiip\0"
"glVertexWeightPointerEXT\0"
"\0"
- /* _mesa_function_pool[25256]: GetHistogram (offset 361) */
+ /* _mesa_function_pool[25474]: GetHistogram (offset 361) */
"iiiip\0"
"glGetHistogram\0"
"glGetHistogramEXT\0"
"\0"
- /* _mesa_function_pool[25296]: ActiveStencilFaceEXT (will be remapped) */
+ /* _mesa_function_pool[25514]: ActiveStencilFaceEXT (will be remapped) */
"i\0"
"glActiveStencilFaceEXT\0"
"\0"
- /* _mesa_function_pool[25322]: StencilFuncSeparateATI (will be remapped) */
+ /* _mesa_function_pool[25540]: StencilFuncSeparateATI (will be remapped) */
"iiii\0"
"glStencilFuncSeparateATI\0"
"\0"
- /* _mesa_function_pool[25353]: Materialf (offset 169) */
+ /* _mesa_function_pool[25571]: Materialf (offset 169) */
"iif\0"
"glMaterialf\0"
"\0"
- /* _mesa_function_pool[25370]: GetShaderSourceARB (will be remapped) */
+ /* _mesa_function_pool[25588]: GetShaderSourceARB (will be remapped) */
"iipp\0"
"glGetShaderSource\0"
"glGetShaderSourceARB\0"
"\0"
- /* _mesa_function_pool[25415]: IglooInterfaceSGIX (dynamic) */
+ /* _mesa_function_pool[25633]: IglooInterfaceSGIX (dynamic) */
"ip\0"
"glIglooInterfaceSGIX\0"
"\0"
- /* _mesa_function_pool[25440]: Materiali (offset 171) */
+ /* _mesa_function_pool[25658]: Materiali (offset 171) */
"iii\0"
"glMateriali\0"
"\0"
- /* _mesa_function_pool[25457]: VertexAttrib4dNV (will be remapped) */
+ /* _mesa_function_pool[25675]: VertexAttrib4dNV (will be remapped) */
"idddd\0"
"glVertexAttrib4dNV\0"
"\0"
- /* _mesa_function_pool[25483]: MultiModeDrawElementsIBM (will be remapped) */
+ /* _mesa_function_pool[25701]: MultiModeDrawElementsIBM (will be remapped) */
"ppipii\0"
"glMultiModeDrawElementsIBM\0"
"\0"
- /* _mesa_function_pool[25518]: Indexsv (offset 51) */
+ /* _mesa_function_pool[25736]: Indexsv (offset 51) */
"p\0"
"glIndexsv\0"
"\0"
- /* _mesa_function_pool[25531]: MultiTexCoord4svARB (offset 407) */
+ /* _mesa_function_pool[25749]: MultiTexCoord4svARB (offset 407) */
"ip\0"
"glMultiTexCoord4sv\0"
"glMultiTexCoord4svARB\0"
"\0"
- /* _mesa_function_pool[25576]: LightModelfv (offset 164) */
+ /* _mesa_function_pool[25794]: LightModelfv (offset 164) */
"ip\0"
"glLightModelfv\0"
"\0"
- /* _mesa_function_pool[25595]: TexCoord2dv (offset 103) */
+ /* _mesa_function_pool[25813]: TexCoord2dv (offset 103) */
"p\0"
"glTexCoord2dv\0"
"\0"
- /* _mesa_function_pool[25612]: GenQueriesARB (will be remapped) */
+ /* _mesa_function_pool[25830]: GenQueriesARB (will be remapped) */
"ip\0"
"glGenQueries\0"
"glGenQueriesARB\0"
"\0"
- /* _mesa_function_pool[25645]: EvalCoord1dv (offset 229) */
+ /* _mesa_function_pool[25863]: EvalCoord1dv (offset 229) */
"p\0"
"glEvalCoord1dv\0"
"\0"
- /* _mesa_function_pool[25663]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ /* _mesa_function_pool[25881]: ReplacementCodeuiVertex3fSUN (dynamic) */
"ifff\0"
"glReplacementCodeuiVertex3fSUN\0"
"\0"
- /* _mesa_function_pool[25700]: Translated (offset 303) */
+ /* _mesa_function_pool[25918]: Translated (offset 303) */
"ddd\0"
"glTranslated\0"
"\0"
- /* _mesa_function_pool[25718]: Translatef (offset 304) */
+ /* _mesa_function_pool[25936]: Translatef (offset 304) */
"fff\0"
"glTranslatef\0"
"\0"
- /* _mesa_function_pool[25736]: StencilMask (offset 209) */
+ /* _mesa_function_pool[25954]: StencilMask (offset 209) */
"i\0"
"glStencilMask\0"
"\0"
- /* _mesa_function_pool[25753]: Tangent3iEXT (dynamic) */
+ /* _mesa_function_pool[25971]: Tangent3iEXT (dynamic) */
"iii\0"
"glTangent3iEXT\0"
"\0"
- /* _mesa_function_pool[25773]: GetLightiv (offset 265) */
+ /* _mesa_function_pool[25991]: GetLightiv (offset 265) */
"iip\0"
"glGetLightiv\0"
"\0"
- /* _mesa_function_pool[25791]: DrawMeshArraysSUN (dynamic) */
+ /* _mesa_function_pool[26009]: DrawMeshArraysSUN (dynamic) */
"iiii\0"
"glDrawMeshArraysSUN\0"
"\0"
- /* _mesa_function_pool[25817]: IsList (offset 287) */
+ /* _mesa_function_pool[26035]: IsList (offset 287) */
"i\0"
"glIsList\0"
"\0"
- /* _mesa_function_pool[25829]: IsSync (will be remapped) */
+ /* _mesa_function_pool[26047]: IsSync (will be remapped) */
"i\0"
"glIsSync\0"
"\0"
- /* _mesa_function_pool[25841]: RenderMode (offset 196) */
+ /* _mesa_function_pool[26059]: RenderMode (offset 196) */
"i\0"
"glRenderMode\0"
"\0"
- /* _mesa_function_pool[25857]: GetMapControlPointsNV (dynamic) */
+ /* _mesa_function_pool[26075]: GetMapControlPointsNV (dynamic) */
"iiiiiip\0"
"glGetMapControlPointsNV\0"
"\0"
- /* _mesa_function_pool[25890]: DrawBuffersARB (will be remapped) */
+ /* _mesa_function_pool[26108]: DrawBuffersARB (will be remapped) */
"ip\0"
"glDrawBuffers\0"
"glDrawBuffersARB\0"
"glDrawBuffersATI\0"
"\0"
- /* _mesa_function_pool[25942]: ProgramLocalParameter4fARB (will be remapped) */
+ /* _mesa_function_pool[26160]: ProgramLocalParameter4fARB (will be remapped) */
"iiffff\0"
"glProgramLocalParameter4fARB\0"
"\0"
- /* _mesa_function_pool[25979]: SpriteParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[26197]: SpriteParameterivSGIX (dynamic) */
"ip\0"
"glSpriteParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[26007]: ProvokingVertexEXT (will be remapped) */
+ /* _mesa_function_pool[26225]: ProvokingVertexEXT (will be remapped) */
"i\0"
"glProvokingVertexEXT\0"
"glProvokingVertex\0"
"\0"
- /* _mesa_function_pool[26049]: MultiTexCoord1fARB (offset 378) */
+ /* _mesa_function_pool[26267]: MultiTexCoord1fARB (offset 378) */
"if\0"
"glMultiTexCoord1f\0"
"glMultiTexCoord1fARB\0"
"\0"
- /* _mesa_function_pool[26092]: LoadName (offset 198) */
+ /* _mesa_function_pool[26310]: LoadName (offset 198) */
"i\0"
"glLoadName\0"
"\0"
- /* _mesa_function_pool[26106]: VertexAttribs4ubvNV (will be remapped) */
+ /* _mesa_function_pool[26324]: VertexAttribs4ubvNV (will be remapped) */
"iip\0"
"glVertexAttribs4ubvNV\0"
"\0"
- /* _mesa_function_pool[26133]: WeightsvARB (dynamic) */
+ /* _mesa_function_pool[26351]: WeightsvARB (dynamic) */
"ip\0"
"glWeightsvARB\0"
"\0"
- /* _mesa_function_pool[26151]: Uniform1fvARB (will be remapped) */
+ /* _mesa_function_pool[26369]: Uniform1fvARB (will be remapped) */
"iip\0"
"glUniform1fv\0"
"glUniform1fvARB\0"
"\0"
- /* _mesa_function_pool[26185]: CopyTexSubImage1D (offset 325) */
+ /* _mesa_function_pool[26403]: CopyTexSubImage1D (offset 325) */
"iiiiii\0"
"glCopyTexSubImage1D\0"
"glCopyTexSubImage1DEXT\0"
"\0"
- /* _mesa_function_pool[26236]: CullFace (offset 152) */
+ /* _mesa_function_pool[26454]: CullFace (offset 152) */
"i\0"
"glCullFace\0"
"\0"
- /* _mesa_function_pool[26250]: BindTexture (offset 307) */
+ /* _mesa_function_pool[26468]: BindTexture (offset 307) */
"ii\0"
"glBindTexture\0"
"glBindTextureEXT\0"
"\0"
- /* _mesa_function_pool[26285]: BeginFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[26503]: BeginFragmentShaderATI (will be remapped) */
"\0"
"glBeginFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[26312]: MultiTexCoord4fARB (offset 402) */
+ /* _mesa_function_pool[26530]: MultiTexCoord4fARB (offset 402) */
"iffff\0"
"glMultiTexCoord4f\0"
"glMultiTexCoord4fARB\0"
"\0"
- /* _mesa_function_pool[26358]: VertexAttribs3svNV (will be remapped) */
+ /* _mesa_function_pool[26576]: VertexAttribs3svNV (will be remapped) */
"iip\0"
"glVertexAttribs3svNV\0"
"\0"
- /* _mesa_function_pool[26384]: StencilFunc (offset 243) */
+ /* _mesa_function_pool[26602]: StencilFunc (offset 243) */
"iii\0"
"glStencilFunc\0"
"\0"
- /* _mesa_function_pool[26403]: CopyPixels (offset 255) */
+ /* _mesa_function_pool[26621]: CopyPixels (offset 255) */
"iiiii\0"
"glCopyPixels\0"
"\0"
- /* _mesa_function_pool[26423]: Rectsv (offset 93) */
+ /* _mesa_function_pool[26641]: Rectsv (offset 93) */
"pp\0"
"glRectsv\0"
"\0"
- /* _mesa_function_pool[26436]: ReplacementCodeuivSUN (dynamic) */
+ /* _mesa_function_pool[26654]: ReplacementCodeuivSUN (dynamic) */
"p\0"
"glReplacementCodeuivSUN\0"
"\0"
- /* _mesa_function_pool[26463]: EnableVertexAttribArrayARB (will be remapped) */
+ /* _mesa_function_pool[26681]: EnableVertexAttribArrayARB (will be remapped) */
"i\0"
"glEnableVertexAttribArray\0"
"glEnableVertexAttribArrayARB\0"
"\0"
- /* _mesa_function_pool[26521]: NormalPointervINTEL (dynamic) */
+ /* _mesa_function_pool[26739]: NormalPointervINTEL (dynamic) */
"ip\0"
"glNormalPointervINTEL\0"
"\0"
- /* _mesa_function_pool[26547]: CopyConvolutionFilter2D (offset 355) */
+ /* _mesa_function_pool[26765]: CopyConvolutionFilter2D (offset 355) */
"iiiiii\0"
"glCopyConvolutionFilter2D\0"
"glCopyConvolutionFilter2DEXT\0"
"\0"
- /* _mesa_function_pool[26610]: WindowPos3ivMESA (will be remapped) */
+ /* _mesa_function_pool[26828]: WindowPos3ivMESA (will be remapped) */
"p\0"
"glWindowPos3iv\0"
"glWindowPos3ivARB\0"
"glWindowPos3ivMESA\0"
"\0"
- /* _mesa_function_pool[26665]: CopyBufferSubData (will be remapped) */
+ /* _mesa_function_pool[26883]: CopyBufferSubData (will be remapped) */
"iiiii\0"
"glCopyBufferSubData\0"
"\0"
- /* _mesa_function_pool[26692]: NormalPointer (offset 318) */
+ /* _mesa_function_pool[26910]: NormalPointer (offset 318) */
"iip\0"
"glNormalPointer\0"
"\0"
- /* _mesa_function_pool[26713]: TexParameterfv (offset 179) */
+ /* _mesa_function_pool[26931]: TexParameterfv (offset 179) */
"iip\0"
"glTexParameterfv\0"
"\0"
- /* _mesa_function_pool[26735]: IsBufferARB (will be remapped) */
+ /* _mesa_function_pool[26953]: IsBufferARB (will be remapped) */
"i\0"
"glIsBuffer\0"
"glIsBufferARB\0"
"\0"
- /* _mesa_function_pool[26763]: WindowPos4iMESA (will be remapped) */
+ /* _mesa_function_pool[26981]: WindowPos4iMESA (will be remapped) */
"iiii\0"
"glWindowPos4iMESA\0"
"\0"
- /* _mesa_function_pool[26787]: VertexAttrib4uivARB (will be remapped) */
+ /* _mesa_function_pool[27005]: VertexAttrib4uivARB (will be remapped) */
"ip\0"
"glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
"\0"
- /* _mesa_function_pool[26832]: Tangent3bvEXT (dynamic) */
+ /* _mesa_function_pool[27050]: Tangent3bvEXT (dynamic) */
"p\0"
"glTangent3bvEXT\0"
"\0"
- /* _mesa_function_pool[26851]: UniformMatrix3x4fv (will be remapped) */
+ /* _mesa_function_pool[27069]: UniformMatrix3x4fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x4fv\0"
"\0"
- /* _mesa_function_pool[26878]: ClipPlane (offset 150) */
+ /* _mesa_function_pool[27096]: ClipPlane (offset 150) */
"ip\0"
"glClipPlane\0"
"\0"
- /* _mesa_function_pool[26894]: Recti (offset 90) */
+ /* _mesa_function_pool[27112]: Recti (offset 90) */
"iiii\0"
"glRecti\0"
"\0"
- /* _mesa_function_pool[26908]: DrawRangeElementsBaseVertex (will be remapped) */
+ /* _mesa_function_pool[27126]: DrawRangeElementsBaseVertex (will be remapped) */
"iiiiipi\0"
"glDrawRangeElementsBaseVertex\0"
"\0"
- /* _mesa_function_pool[26947]: TexCoordPointervINTEL (dynamic) */
+ /* _mesa_function_pool[27165]: TexCoordPointervINTEL (dynamic) */
"iip\0"
"glTexCoordPointervINTEL\0"
"\0"
- /* _mesa_function_pool[26976]: DeleteBuffersARB (will be remapped) */
+ /* _mesa_function_pool[27194]: DeleteBuffersARB (will be remapped) */
"ip\0"
"glDeleteBuffers\0"
"glDeleteBuffersARB\0"
"\0"
- /* _mesa_function_pool[27015]: WindowPos4fvMESA (will be remapped) */
+ /* _mesa_function_pool[27233]: WindowPos4fvMESA (will be remapped) */
"p\0"
"glWindowPos4fvMESA\0"
"\0"
- /* _mesa_function_pool[27037]: GetPixelMapuiv (offset 272) */
+ /* _mesa_function_pool[27255]: GetPixelMapuiv (offset 272) */
"ip\0"
"glGetPixelMapuiv\0"
"\0"
- /* _mesa_function_pool[27058]: Rectf (offset 88) */
+ /* _mesa_function_pool[27276]: Rectf (offset 88) */
"ffff\0"
"glRectf\0"
"\0"
- /* _mesa_function_pool[27072]: VertexAttrib1sNV (will be remapped) */
+ /* _mesa_function_pool[27290]: VertexAttrib1sNV (will be remapped) */
"ii\0"
"glVertexAttrib1sNV\0"
"\0"
- /* _mesa_function_pool[27095]: Indexfv (offset 47) */
+ /* _mesa_function_pool[27313]: Indexfv (offset 47) */
"p\0"
"glIndexfv\0"
"\0"
- /* _mesa_function_pool[27108]: SecondaryColor3svEXT (will be remapped) */
+ /* _mesa_function_pool[27326]: SecondaryColor3svEXT (will be remapped) */
"p\0"
"glSecondaryColor3sv\0"
"glSecondaryColor3svEXT\0"
"\0"
- /* _mesa_function_pool[27154]: LoadTransposeMatrixfARB (will be remapped) */
+ /* _mesa_function_pool[27372]: LoadTransposeMatrixfARB (will be remapped) */
"p\0"
"glLoadTransposeMatrixf\0"
"glLoadTransposeMatrixfARB\0"
"\0"
- /* _mesa_function_pool[27206]: GetPointerv (offset 329) */
+ /* _mesa_function_pool[27424]: GetPointerv (offset 329) */
"ip\0"
"glGetPointerv\0"
"glGetPointervEXT\0"
"\0"
- /* _mesa_function_pool[27241]: Tangent3bEXT (dynamic) */
+ /* _mesa_function_pool[27459]: Tangent3bEXT (dynamic) */
"iii\0"
"glTangent3bEXT\0"
"\0"
- /* _mesa_function_pool[27261]: CombinerParameterfNV (will be remapped) */
+ /* _mesa_function_pool[27479]: CombinerParameterfNV (will be remapped) */
"if\0"
"glCombinerParameterfNV\0"
"\0"
- /* _mesa_function_pool[27288]: IndexMask (offset 212) */
+ /* _mesa_function_pool[27506]: IndexMask (offset 212) */
"i\0"
"glIndexMask\0"
"\0"
- /* _mesa_function_pool[27303]: BindProgramNV (will be remapped) */
+ /* _mesa_function_pool[27521]: BindProgramNV (will be remapped) */
"ii\0"
"glBindProgramARB\0"
"glBindProgramNV\0"
"\0"
- /* _mesa_function_pool[27340]: VertexAttrib4svARB (will be remapped) */
+ /* _mesa_function_pool[27558]: VertexAttrib4svARB (will be remapped) */
"ip\0"
"glVertexAttrib4sv\0"
"glVertexAttrib4svARB\0"
"\0"
- /* _mesa_function_pool[27383]: GetFloatv (offset 262) */
+ /* _mesa_function_pool[27601]: GetFloatv (offset 262) */
"ip\0"
"glGetFloatv\0"
"\0"
- /* _mesa_function_pool[27399]: CreateDebugObjectMESA (dynamic) */
+ /* _mesa_function_pool[27617]: CreateDebugObjectMESA (dynamic) */
"\0"
"glCreateDebugObjectMESA\0"
"\0"
- /* _mesa_function_pool[27425]: GetShaderiv (will be remapped) */
+ /* _mesa_function_pool[27643]: GetShaderiv (will be remapped) */
"iip\0"
"glGetShaderiv\0"
"\0"
- /* _mesa_function_pool[27444]: ClientWaitSync (will be remapped) */
+ /* _mesa_function_pool[27662]: ClientWaitSync (will be remapped) */
"iii\0"
"glClientWaitSync\0"
"\0"
- /* _mesa_function_pool[27466]: TexCoord4s (offset 124) */
+ /* _mesa_function_pool[27684]: TexCoord4s (offset 124) */
"iiii\0"
"glTexCoord4s\0"
"\0"
- /* _mesa_function_pool[27485]: TexCoord3sv (offset 117) */
+ /* _mesa_function_pool[27703]: TexCoord3sv (offset 117) */
"p\0"
"glTexCoord3sv\0"
"\0"
- /* _mesa_function_pool[27502]: BindFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[27720]: BindFragmentShaderATI (will be remapped) */
"i\0"
"glBindFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[27529]: PopAttrib (offset 218) */
+ /* _mesa_function_pool[27747]: PopAttrib (offset 218) */
"\0"
"glPopAttrib\0"
"\0"
- /* _mesa_function_pool[27543]: Fogfv (offset 154) */
+ /* _mesa_function_pool[27761]: Fogfv (offset 154) */
"ip\0"
"glFogfv\0"
"\0"
- /* _mesa_function_pool[27555]: UnmapBufferARB (will be remapped) */
+ /* _mesa_function_pool[27773]: UnmapBufferARB (will be remapped) */
"i\0"
"glUnmapBuffer\0"
"glUnmapBufferARB\0"
"\0"
- /* _mesa_function_pool[27589]: InitNames (offset 197) */
+ /* _mesa_function_pool[27807]: InitNames (offset 197) */
"\0"
"glInitNames\0"
"\0"
- /* _mesa_function_pool[27603]: Normal3sv (offset 61) */
+ /* _mesa_function_pool[27821]: Normal3sv (offset 61) */
"p\0"
"glNormal3sv\0"
"\0"
- /* _mesa_function_pool[27618]: Minmax (offset 368) */
+ /* _mesa_function_pool[27836]: Minmax (offset 368) */
"iii\0"
"glMinmax\0"
"glMinmaxEXT\0"
"\0"
- /* _mesa_function_pool[27644]: TexCoord4d (offset 118) */
+ /* _mesa_function_pool[27862]: TexCoord4d (offset 118) */
"dddd\0"
"glTexCoord4d\0"
"\0"
- /* _mesa_function_pool[27663]: TexCoord4f (offset 120) */
+ /* _mesa_function_pool[27881]: TexCoord4f (offset 120) */
"ffff\0"
"glTexCoord4f\0"
"\0"
- /* _mesa_function_pool[27682]: FogCoorddvEXT (will be remapped) */
+ /* _mesa_function_pool[27900]: FogCoorddvEXT (will be remapped) */
"p\0"
"glFogCoorddv\0"
"glFogCoorddvEXT\0"
"\0"
- /* _mesa_function_pool[27714]: FinishTextureSUNX (dynamic) */
+ /* _mesa_function_pool[27932]: FinishTextureSUNX (dynamic) */
"\0"
"glFinishTextureSUNX\0"
"\0"
- /* _mesa_function_pool[27736]: GetFragmentLightfvSGIX (dynamic) */
+ /* _mesa_function_pool[27954]: GetFragmentLightfvSGIX (dynamic) */
"iip\0"
"glGetFragmentLightfvSGIX\0"
"\0"
- /* _mesa_function_pool[27766]: Binormal3fvEXT (dynamic) */
+ /* _mesa_function_pool[27984]: Binormal3fvEXT (dynamic) */
"p\0"
"glBinormal3fvEXT\0"
"\0"
- /* _mesa_function_pool[27786]: GetBooleanv (offset 258) */
+ /* _mesa_function_pool[28004]: GetBooleanv (offset 258) */
"ip\0"
"glGetBooleanv\0"
"\0"
- /* _mesa_function_pool[27804]: ColorFragmentOp3ATI (will be remapped) */
+ /* _mesa_function_pool[28022]: ColorFragmentOp3ATI (will be remapped) */
"iiiiiiiiiiiii\0"
"glColorFragmentOp3ATI\0"
"\0"
- /* _mesa_function_pool[27841]: Hint (offset 158) */
+ /* _mesa_function_pool[28059]: Hint (offset 158) */
"ii\0"
"glHint\0"
"\0"
- /* _mesa_function_pool[27852]: Color4dv (offset 28) */
+ /* _mesa_function_pool[28070]: Color4dv (offset 28) */
"p\0"
"glColor4dv\0"
"\0"
- /* _mesa_function_pool[27866]: VertexAttrib2svARB (will be remapped) */
+ /* _mesa_function_pool[28084]: VertexAttrib2svARB (will be remapped) */
"ip\0"
"glVertexAttrib2sv\0"
"glVertexAttrib2svARB\0"
"\0"
- /* _mesa_function_pool[27909]: AreProgramsResidentNV (will be remapped) */
+ /* _mesa_function_pool[28127]: AreProgramsResidentNV (will be remapped) */
"ipp\0"
"glAreProgramsResidentNV\0"
"\0"
- /* _mesa_function_pool[27938]: WindowPos3svMESA (will be remapped) */
+ /* _mesa_function_pool[28156]: WindowPos3svMESA (will be remapped) */
"p\0"
"glWindowPos3sv\0"
"glWindowPos3svARB\0"
"glWindowPos3svMESA\0"
"\0"
- /* _mesa_function_pool[27993]: CopyColorSubTable (offset 347) */
+ /* _mesa_function_pool[28211]: CopyColorSubTable (offset 347) */
"iiiii\0"
"glCopyColorSubTable\0"
"glCopyColorSubTableEXT\0"
"\0"
- /* _mesa_function_pool[28043]: WeightdvARB (dynamic) */
+ /* _mesa_function_pool[28261]: WeightdvARB (dynamic) */
"ip\0"
"glWeightdvARB\0"
"\0"
- /* _mesa_function_pool[28061]: DeleteRenderbuffersEXT (will be remapped) */
+ /* _mesa_function_pool[28279]: DeleteRenderbuffersEXT (will be remapped) */
"ip\0"
"glDeleteRenderbuffers\0"
"glDeleteRenderbuffersEXT\0"
"\0"
- /* _mesa_function_pool[28112]: VertexAttrib4NubvARB (will be remapped) */
+ /* _mesa_function_pool[28330]: VertexAttrib4NubvARB (will be remapped) */
"ip\0"
"glVertexAttrib4Nubv\0"
"glVertexAttrib4NubvARB\0"
"\0"
- /* _mesa_function_pool[28159]: VertexAttrib3dvNV (will be remapped) */
+ /* _mesa_function_pool[28377]: VertexAttrib3dvNV (will be remapped) */
"ip\0"
"glVertexAttrib3dvNV\0"
"\0"
- /* _mesa_function_pool[28183]: GetObjectParameterfvARB (will be remapped) */
+ /* _mesa_function_pool[28401]: GetObjectParameterfvARB (will be remapped) */
"iip\0"
"glGetObjectParameterfvARB\0"
"\0"
- /* _mesa_function_pool[28214]: Vertex4iv (offset 147) */
+ /* _mesa_function_pool[28432]: Vertex4iv (offset 147) */
"p\0"
"glVertex4iv\0"
"\0"
- /* _mesa_function_pool[28229]: GetProgramEnvParameterdvARB (will be remapped) */
+ /* _mesa_function_pool[28447]: GetProgramEnvParameterdvARB (will be remapped) */
"iip\0"
"glGetProgramEnvParameterdvARB\0"
"\0"
- /* _mesa_function_pool[28264]: TexCoord4dv (offset 119) */
+ /* _mesa_function_pool[28482]: TexCoord4dv (offset 119) */
"p\0"
"glTexCoord4dv\0"
"\0"
- /* _mesa_function_pool[28281]: LockArraysEXT (will be remapped) */
+ /* _mesa_function_pool[28499]: LockArraysEXT (will be remapped) */
"ii\0"
"glLockArraysEXT\0"
"\0"
- /* _mesa_function_pool[28301]: Begin (offset 7) */
+ /* _mesa_function_pool[28519]: Begin (offset 7) */
"i\0"
"glBegin\0"
"\0"
- /* _mesa_function_pool[28312]: LightModeli (offset 165) */
+ /* _mesa_function_pool[28530]: LightModeli (offset 165) */
"ii\0"
"glLightModeli\0"
"\0"
- /* _mesa_function_pool[28330]: Rectfv (offset 89) */
+ /* _mesa_function_pool[28548]: Rectfv (offset 89) */
"pp\0"
"glRectfv\0"
"\0"
- /* _mesa_function_pool[28343]: LightModelf (offset 163) */
+ /* _mesa_function_pool[28561]: LightModelf (offset 163) */
"if\0"
"glLightModelf\0"
"\0"
- /* _mesa_function_pool[28361]: GetTexParameterfv (offset 282) */
+ /* _mesa_function_pool[28579]: GetTexParameterfv (offset 282) */
"iip\0"
"glGetTexParameterfv\0"
"\0"
- /* _mesa_function_pool[28386]: GetLightfv (offset 264) */
+ /* _mesa_function_pool[28604]: GetLightfv (offset 264) */
"iip\0"
"glGetLightfv\0"
"\0"
- /* _mesa_function_pool[28404]: PixelTransformParameterivEXT (dynamic) */
+ /* _mesa_function_pool[28622]: PixelTransformParameterivEXT (dynamic) */
"iip\0"
"glPixelTransformParameterivEXT\0"
"\0"
- /* _mesa_function_pool[28440]: BinormalPointerEXT (dynamic) */
+ /* _mesa_function_pool[28658]: BinormalPointerEXT (dynamic) */
"iip\0"
"glBinormalPointerEXT\0"
"\0"
- /* _mesa_function_pool[28466]: VertexAttrib1dNV (will be remapped) */
+ /* _mesa_function_pool[28684]: VertexAttrib1dNV (will be remapped) */
"id\0"
"glVertexAttrib1dNV\0"
"\0"
- /* _mesa_function_pool[28489]: GetCombinerInputParameterivNV (will be remapped) */
+ /* _mesa_function_pool[28707]: GetCombinerInputParameterivNV (will be remapped) */
"iiiip\0"
"glGetCombinerInputParameterivNV\0"
"\0"
- /* _mesa_function_pool[28528]: Disable (offset 214) */
+ /* _mesa_function_pool[28746]: Disable (offset 214) */
"i\0"
"glDisable\0"
"\0"
- /* _mesa_function_pool[28541]: MultiTexCoord2fvARB (offset 387) */
+ /* _mesa_function_pool[28759]: MultiTexCoord2fvARB (offset 387) */
"ip\0"
"glMultiTexCoord2fv\0"
"glMultiTexCoord2fvARB\0"
"\0"
- /* _mesa_function_pool[28586]: GetRenderbufferParameterivEXT (will be remapped) */
+ /* _mesa_function_pool[28804]: GetRenderbufferParameterivEXT (will be remapped) */
"iip\0"
"glGetRenderbufferParameteriv\0"
"glGetRenderbufferParameterivEXT\0"
"\0"
- /* _mesa_function_pool[28652]: CombinerParameterivNV (will be remapped) */
+ /* _mesa_function_pool[28870]: CombinerParameterivNV (will be remapped) */
"ip\0"
"glCombinerParameterivNV\0"
"\0"
- /* _mesa_function_pool[28680]: GenFragmentShadersATI (will be remapped) */
+ /* _mesa_function_pool[28898]: GenFragmentShadersATI (will be remapped) */
"i\0"
"glGenFragmentShadersATI\0"
"\0"
- /* _mesa_function_pool[28707]: DrawArrays (offset 310) */
+ /* _mesa_function_pool[28925]: DrawArrays (offset 310) */
"iii\0"
"glDrawArrays\0"
"glDrawArraysEXT\0"
"\0"
- /* _mesa_function_pool[28741]: WeightuivARB (dynamic) */
+ /* _mesa_function_pool[28959]: WeightuivARB (dynamic) */
"ip\0"
"glWeightuivARB\0"
"\0"
- /* _mesa_function_pool[28760]: VertexAttrib2sARB (will be remapped) */
+ /* _mesa_function_pool[28978]: VertexAttrib2sARB (will be remapped) */
"iii\0"
"glVertexAttrib2s\0"
"glVertexAttrib2sARB\0"
"\0"
- /* _mesa_function_pool[28802]: ColorMask (offset 210) */
+ /* _mesa_function_pool[29020]: ColorMask (offset 210) */
"iiii\0"
"glColorMask\0"
"\0"
- /* _mesa_function_pool[28820]: GenAsyncMarkersSGIX (dynamic) */
+ /* _mesa_function_pool[29038]: GenAsyncMarkersSGIX (dynamic) */
"i\0"
"glGenAsyncMarkersSGIX\0"
"\0"
- /* _mesa_function_pool[28845]: Tangent3svEXT (dynamic) */
+ /* _mesa_function_pool[29063]: Tangent3svEXT (dynamic) */
"p\0"
"glTangent3svEXT\0"
"\0"
- /* _mesa_function_pool[28864]: GetListParameterivSGIX (dynamic) */
+ /* _mesa_function_pool[29082]: GetListParameterivSGIX (dynamic) */
"iip\0"
"glGetListParameterivSGIX\0"
"\0"
- /* _mesa_function_pool[28894]: BindBufferARB (will be remapped) */
+ /* _mesa_function_pool[29112]: BindBufferARB (will be remapped) */
"ii\0"
"glBindBuffer\0"
"glBindBufferARB\0"
"\0"
- /* _mesa_function_pool[28927]: GetInfoLogARB (will be remapped) */
+ /* _mesa_function_pool[29145]: GetInfoLogARB (will be remapped) */
"iipp\0"
"glGetInfoLogARB\0"
"\0"
- /* _mesa_function_pool[28949]: RasterPos4iv (offset 83) */
+ /* _mesa_function_pool[29167]: RasterPos4iv (offset 83) */
"p\0"
"glRasterPos4iv\0"
"\0"
- /* _mesa_function_pool[28967]: Enable (offset 215) */
+ /* _mesa_function_pool[29185]: Enable (offset 215) */
"i\0"
"glEnable\0"
"\0"
- /* _mesa_function_pool[28979]: LineStipple (offset 167) */
+ /* _mesa_function_pool[29197]: LineStipple (offset 167) */
"ii\0"
"glLineStipple\0"
"\0"
- /* _mesa_function_pool[28997]: VertexAttribs4svNV (will be remapped) */
+ /* _mesa_function_pool[29215]: VertexAttribs4svNV (will be remapped) */
"iip\0"
"glVertexAttribs4svNV\0"
"\0"
- /* _mesa_function_pool[29023]: EdgeFlagPointerListIBM (dynamic) */
+ /* _mesa_function_pool[29241]: EdgeFlagPointerListIBM (dynamic) */
"ipi\0"
"glEdgeFlagPointerListIBM\0"
"\0"
- /* _mesa_function_pool[29053]: UniformMatrix3x2fv (will be remapped) */
+ /* _mesa_function_pool[29271]: UniformMatrix3x2fv (will be remapped) */
"iiip\0"
"glUniformMatrix3x2fv\0"
"\0"
- /* _mesa_function_pool[29080]: GetMinmaxParameterfv (offset 365) */
+ /* _mesa_function_pool[29298]: GetMinmaxParameterfv (offset 365) */
"iip\0"
"glGetMinmaxParameterfv\0"
"glGetMinmaxParameterfvEXT\0"
"\0"
- /* _mesa_function_pool[29134]: VertexAttrib1fvARB (will be remapped) */
+ /* _mesa_function_pool[29352]: VertexAttrib1fvARB (will be remapped) */
"ip\0"
"glVertexAttrib1fv\0"
"glVertexAttrib1fvARB\0"
"\0"
- /* _mesa_function_pool[29177]: GenBuffersARB (will be remapped) */
+ /* _mesa_function_pool[29395]: GenBuffersARB (will be remapped) */
"ip\0"
"glGenBuffers\0"
"glGenBuffersARB\0"
"\0"
- /* _mesa_function_pool[29210]: VertexAttribs1svNV (will be remapped) */
+ /* _mesa_function_pool[29428]: VertexAttribs1svNV (will be remapped) */
"iip\0"
"glVertexAttribs1svNV\0"
"\0"
- /* _mesa_function_pool[29236]: Vertex3fv (offset 137) */
+ /* _mesa_function_pool[29454]: Vertex3fv (offset 137) */
"p\0"
"glVertex3fv\0"
"\0"
- /* _mesa_function_pool[29251]: GetTexBumpParameterivATI (will be remapped) */
+ /* _mesa_function_pool[29469]: GetTexBumpParameterivATI (will be remapped) */
"ip\0"
"glGetTexBumpParameterivATI\0"
"\0"
- /* _mesa_function_pool[29282]: Binormal3bEXT (dynamic) */
+ /* _mesa_function_pool[29500]: Binormal3bEXT (dynamic) */
"iii\0"
"glBinormal3bEXT\0"
"\0"
- /* _mesa_function_pool[29303]: FragmentMaterialivSGIX (dynamic) */
+ /* _mesa_function_pool[29521]: FragmentMaterialivSGIX (dynamic) */
"iip\0"
"glFragmentMaterialivSGIX\0"
"\0"
- /* _mesa_function_pool[29333]: IsRenderbufferEXT (will be remapped) */
+ /* _mesa_function_pool[29551]: IsRenderbufferEXT (will be remapped) */
"i\0"
"glIsRenderbuffer\0"
"glIsRenderbufferEXT\0"
"\0"
- /* _mesa_function_pool[29373]: GenProgramsNV (will be remapped) */
+ /* _mesa_function_pool[29591]: GenProgramsNV (will be remapped) */
"ip\0"
"glGenProgramsARB\0"
"glGenProgramsNV\0"
"\0"
- /* _mesa_function_pool[29410]: VertexAttrib4dvNV (will be remapped) */
+ /* _mesa_function_pool[29628]: VertexAttrib4dvNV (will be remapped) */
"ip\0"
"glVertexAttrib4dvNV\0"
"\0"
- /* _mesa_function_pool[29434]: EndFragmentShaderATI (will be remapped) */
+ /* _mesa_function_pool[29652]: EndFragmentShaderATI (will be remapped) */
"\0"
"glEndFragmentShaderATI\0"
"\0"
- /* _mesa_function_pool[29459]: Binormal3iEXT (dynamic) */
+ /* _mesa_function_pool[29677]: Binormal3iEXT (dynamic) */
"iii\0"
"glBinormal3iEXT\0"
"\0"
- /* _mesa_function_pool[29480]: WindowPos2fMESA (will be remapped) */
+ /* _mesa_function_pool[29698]: WindowPos2fMESA (will be remapped) */
"ff\0"
"glWindowPos2f\0"
"glWindowPos2fARB\0"
@@ -4334,392 +4366,400 @@ static const struct {
GLint remap_index;
} MESA_remap_table_functions[] = {
{ 1461, AttachShader_remap_index },
- { 8704, CreateProgram_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 },
+ { 8764, CreateProgram_remap_index },
+ { 20302, CreateShader_remap_index },
+ { 22589, DeleteProgram_remap_index },
+ { 16282, DeleteShader_remap_index },
+ { 20748, DetachShader_remap_index },
+ { 15806, GetAttachedShaders_remap_index },
+ { 4275, GetProgramInfoLog_remap_index },
{ 361, GetProgramiv_remap_index },
- { 5547, GetShaderInfoLog_remap_index },
- { 27425, GetShaderiv_remap_index },
- { 11732, IsProgram_remap_index },
- { 10767, IsShader_remap_index },
- { 8808, StencilFuncSeparate_remap_index },
+ { 5578, GetShaderInfoLog_remap_index },
+ { 27643, GetShaderiv_remap_index },
+ { 11821, IsProgram_remap_index },
+ { 10856, IsShader_remap_index },
+ { 8868, StencilFuncSeparate_remap_index },
{ 3487, StencilMaskSeparate_remap_index },
- { 6623, StencilOpSeparate_remap_index },
- { 19535, UniformMatrix2x3fv_remap_index },
+ { 6654, StencilOpSeparate_remap_index },
+ { 19653, UniformMatrix2x3fv_remap_index },
{ 2615, UniformMatrix2x4fv_remap_index },
- { 29053, UniformMatrix3x2fv_remap_index },
- { 26851, UniformMatrix3x4fv_remap_index },
- { 14265, UniformMatrix4x2fv_remap_index },
+ { 29271, UniformMatrix3x2fv_remap_index },
+ { 27069, UniformMatrix3x4fv_remap_index },
+ { 14354, UniformMatrix4x2fv_remap_index },
{ 2937, UniformMatrix4x3fv_remap_index },
- { 8722, LoadTransposeMatrixdARB_remap_index },
- { 27154, LoadTransposeMatrixfARB_remap_index },
- { 4817, MultTransposeMatrixdARB_remap_index },
- { 20791, MultTransposeMatrixfARB_remap_index },
+ { 8782, LoadTransposeMatrixdARB_remap_index },
+ { 27372, LoadTransposeMatrixfARB_remap_index },
+ { 4848, MultTransposeMatrixdARB_remap_index },
+ { 20935, MultTransposeMatrixfARB_remap_index },
{ 172, SampleCoverageARB_remap_index },
- { 4971, CompressedTexImage1DARB_remap_index },
- { 21248, CompressedTexImage2DARB_remap_index },
+ { 5002, CompressedTexImage1DARB_remap_index },
+ { 21392, CompressedTexImage2DARB_remap_index },
{ 3550, CompressedTexImage3DARB_remap_index },
- { 16009, CompressedTexSubImage1DARB_remap_index },
+ { 16098, CompressedTexSubImage1DARB_remap_index },
{ 1880, CompressedTexSubImage2DARB_remap_index },
- { 17801, CompressedTexSubImage3DARB_remap_index },
- { 25133, GetCompressedTexImageARB_remap_index },
+ { 17890, CompressedTexSubImage3DARB_remap_index },
+ { 25351, GetCompressedTexImageARB_remap_index },
{ 3395, DisableVertexAttribArrayARB_remap_index },
- { 26463, EnableVertexAttribArrayARB_remap_index },
- { 28229, GetProgramEnvParameterdvARB_remap_index },
- { 20671, GetProgramEnvParameterfvARB_remap_index },
- { 24163, GetProgramLocalParameterdvARB_remap_index },
- { 7065, GetProgramLocalParameterfvARB_remap_index },
- { 16100, GetProgramStringARB_remap_index },
- { 24358, GetProgramivARB_remap_index },
- { 17996, GetVertexAttribdvARB_remap_index },
- { 14154, GetVertexAttribfvARB_remap_index },
- { 8617, GetVertexAttribivARB_remap_index },
- { 16905, ProgramEnvParameter4dARB_remap_index },
- { 22218, ProgramEnvParameter4dvARB_remap_index },
- { 14762, ProgramEnvParameter4fARB_remap_index },
- { 7928, ProgramEnvParameter4fvARB_remap_index },
+ { 26681, EnableVertexAttribArrayARB_remap_index },
+ { 28447, GetProgramEnvParameterdvARB_remap_index },
+ { 20815, GetProgramEnvParameterfvARB_remap_index },
+ { 24381, GetProgramLocalParameterdvARB_remap_index },
+ { 7096, GetProgramLocalParameterfvARB_remap_index },
+ { 16189, GetProgramStringARB_remap_index },
+ { 24576, GetProgramivARB_remap_index },
+ { 18085, GetVertexAttribdvARB_remap_index },
+ { 14243, GetVertexAttribfvARB_remap_index },
+ { 8677, GetVertexAttribivARB_remap_index },
+ { 16994, ProgramEnvParameter4dARB_remap_index },
+ { 22362, ProgramEnvParameter4dvARB_remap_index },
+ { 14851, ProgramEnvParameter4fARB_remap_index },
+ { 7959, ProgramEnvParameter4fvARB_remap_index },
{ 3513, ProgramLocalParameter4dARB_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 },
+ { 11531, ProgramLocalParameter4dvARB_remap_index },
+ { 26160, ProgramLocalParameter4fARB_remap_index },
+ { 22907, ProgramLocalParameter4fvARB_remap_index },
+ { 25137, ProgramStringARB_remap_index },
+ { 17244, VertexAttrib1dARB_remap_index },
+ { 13897, VertexAttrib1dvARB_remap_index },
{ 3688, VertexAttrib1fARB_remap_index },
- { 29134, VertexAttrib1fvARB_remap_index },
- { 6149, VertexAttrib1sARB_remap_index },
+ { 29352, VertexAttrib1fvARB_remap_index },
+ { 6180, VertexAttrib1sARB_remap_index },
{ 2054, VertexAttrib1svARB_remap_index },
- { 13239, VertexAttrib2dARB_remap_index },
- { 15336, VertexAttrib2dvARB_remap_index },
+ { 13328, VertexAttrib2dARB_remap_index },
+ { 15425, VertexAttrib2dvARB_remap_index },
{ 1480, VertexAttrib2fARB_remap_index },
- { 15449, VertexAttrib2fvARB_remap_index },
- { 28760, VertexAttrib2sARB_remap_index },
- { 27866, VertexAttrib2svARB_remap_index },
- { 9926, VertexAttrib3dARB_remap_index },
- { 7631, VertexAttrib3dvARB_remap_index },
+ { 15538, VertexAttrib2fvARB_remap_index },
+ { 28978, VertexAttrib2sARB_remap_index },
+ { 28084, VertexAttrib2svARB_remap_index },
+ { 10015, VertexAttrib3dARB_remap_index },
+ { 7662, VertexAttrib3dvARB_remap_index },
{ 1567, VertexAttrib3fARB_remap_index },
- { 19772, VertexAttrib3fvARB_remap_index },
- { 24791, VertexAttrib3sARB_remap_index },
- { 17738, VertexAttrib3svARB_remap_index },
- { 4270, VertexAttrib4NbvARB_remap_index },
- { 15672, VertexAttrib4NivARB_remap_index },
- { 19727, VertexAttrib4NsvARB_remap_index },
- { 20623, VertexAttrib4NubARB_remap_index },
- { 28112, VertexAttrib4NubvARB_remap_index },
- { 16566, VertexAttrib4NuivARB_remap_index },
+ { 19890, VertexAttrib3fvARB_remap_index },
+ { 25009, VertexAttrib3sARB_remap_index },
+ { 17827, VertexAttrib3svARB_remap_index },
+ { 4301, VertexAttrib4NbvARB_remap_index },
+ { 15761, VertexAttrib4NivARB_remap_index },
+ { 19845, VertexAttrib4NsvARB_remap_index },
+ { 20767, VertexAttrib4NubARB_remap_index },
+ { 28330, VertexAttrib4NubvARB_remap_index },
+ { 16655, VertexAttrib4NuivARB_remap_index },
{ 2810, VertexAttrib4NusvARB_remap_index },
- { 9549, VertexAttrib4bvARB_remap_index },
- { 23571, VertexAttrib4dARB_remap_index },
- { 18721, VertexAttrib4dvARB_remap_index },
- { 10033, VertexAttrib4fARB_remap_index },
- { 10403, VertexAttrib4fvARB_remap_index },
- { 9001, VertexAttrib4ivARB_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 },
+ { 9609, VertexAttrib4bvARB_remap_index },
+ { 23789, VertexAttrib4dARB_remap_index },
+ { 18810, VertexAttrib4dvARB_remap_index },
+ { 10122, VertexAttrib4fARB_remap_index },
+ { 10492, VertexAttrib4fvARB_remap_index },
+ { 9061, VertexAttrib4ivARB_remap_index },
+ { 15239, VertexAttrib4sARB_remap_index },
+ { 27558, VertexAttrib4svARB_remap_index },
+ { 14656, VertexAttrib4ubvARB_remap_index },
+ { 27005, VertexAttrib4uivARB_remap_index },
+ { 17638, VertexAttrib4usvARB_remap_index },
+ { 19527, VertexAttribPointerARB_remap_index },
+ { 29112, BindBufferARB_remap_index },
+ { 5893, BufferDataARB_remap_index },
{ 1382, BufferSubDataARB_remap_index },
- { 26976, DeleteBuffersARB_remap_index },
- { 29177, GenBuffersARB_remap_index },
- { 15492, GetBufferParameterivARB_remap_index },
- { 14714, GetBufferPointervARB_remap_index },
+ { 27194, DeleteBuffersARB_remap_index },
+ { 29395, GenBuffersARB_remap_index },
+ { 15581, GetBufferParameterivARB_remap_index },
+ { 14803, GetBufferPointervARB_remap_index },
{ 1335, GetBufferSubDataARB_remap_index },
- { 26735, IsBufferARB_remap_index },
- { 23167, MapBufferARB_remap_index },
- { 27555, UnmapBufferARB_remap_index },
+ { 26953, IsBufferARB_remap_index },
+ { 23362, MapBufferARB_remap_index },
+ { 27773, UnmapBufferARB_remap_index },
{ 268, BeginQueryARB_remap_index },
- { 17250, DeleteQueriesARB_remap_index },
- { 10664, EndQueryARB_remap_index },
- { 25612, GenQueriesARB_remap_index },
+ { 17339, DeleteQueriesARB_remap_index },
+ { 10753, EndQueryARB_remap_index },
+ { 25830, GenQueriesARB_remap_index },
{ 1772, GetQueryObjectivARB_remap_index },
- { 15194, GetQueryObjectuivARB_remap_index },
+ { 15283, GetQueryObjectuivARB_remap_index },
{ 1624, GetQueryivARB_remap_index },
- { 17456, IsQueryARB_remap_index },
- { 7241, AttachObjectARB_remap_index },
- { 16155, CompileShaderARB_remap_index },
+ { 17545, IsQueryARB_remap_index },
+ { 7272, AttachObjectARB_remap_index },
+ { 16244, CompileShaderARB_remap_index },
{ 2879, CreateProgramObjectARB_remap_index },
- { 5807, CreateShaderObjectARB_remap_index },
- { 12656, DeleteObjectARB_remap_index },
- { 21022, DetachObjectARB_remap_index },
- { 10475, GetActiveUniformARB_remap_index },
- { 8320, GetAttachedObjectsARB_remap_index },
- { 8599, GetHandleARB_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 },
- { 26151, Uniform1fvARB_remap_index },
- { 19378, Uniform1iARB_remap_index },
- { 18410, Uniform1ivARB_remap_index },
+ { 5838, CreateShaderObjectARB_remap_index },
+ { 12745, DeleteObjectARB_remap_index },
+ { 21166, DetachObjectARB_remap_index },
+ { 10564, GetActiveUniformARB_remap_index },
+ { 8380, GetAttachedObjectsARB_remap_index },
+ { 8659, GetHandleARB_remap_index },
+ { 29145, GetInfoLogARB_remap_index },
+ { 28401, GetObjectParameterfvARB_remap_index },
+ { 24255, GetObjectParameterivARB_remap_index },
+ { 25588, GetShaderSourceARB_remap_index },
+ { 24869, GetUniformLocationARB_remap_index },
+ { 21037, GetUniformfvARB_remap_index },
+ { 11153, GetUniformivARB_remap_index },
+ { 17683, LinkProgramARB_remap_index },
+ { 17741, ShaderSourceARB_remap_index },
+ { 6554, Uniform1fARB_remap_index },
+ { 26369, Uniform1fvARB_remap_index },
+ { 19496, Uniform1iARB_remap_index },
+ { 18499, Uniform1ivARB_remap_index },
{ 2003, Uniform2fARB_remap_index },
- { 12492, Uniform2fvARB_remap_index },
- { 23054, Uniform2iARB_remap_index },
+ { 12581, Uniform2fvARB_remap_index },
+ { 23249, Uniform2iARB_remap_index },
{ 2123, Uniform2ivARB_remap_index },
- { 16265, Uniform3fARB_remap_index },
- { 8350, Uniform3fvARB_remap_index },
- { 5481, Uniform3iARB_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 },
+ { 16354, Uniform3fARB_remap_index },
+ { 8410, Uniform3fvARB_remap_index },
+ { 5512, Uniform3iARB_remap_index },
+ { 14909, Uniform3ivARB_remap_index },
+ { 16800, Uniform4fARB_remap_index },
+ { 20901, Uniform4fvARB_remap_index },
+ { 22041, Uniform4iARB_remap_index },
+ { 18051, Uniform4ivARB_remap_index },
+ { 7324, UniformMatrix2fvARB_remap_index },
{ 17, UniformMatrix3fvARB_remap_index },
{ 2475, UniformMatrix4fvARB_remap_index },
- { 22330, UseProgramObjectARB_remap_index },
- { 12927, ValidateProgramARB_remap_index },
- { 18764, BindAttribLocationARB_remap_index },
- { 4315, GetActiveAttribARB_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 },
+ { 22474, UseProgramObjectARB_remap_index },
+ { 13016, ValidateProgramARB_remap_index },
+ { 18853, BindAttribLocationARB_remap_index },
+ { 4346, GetActiveAttribARB_remap_index },
+ { 14590, GetAttribLocationARB_remap_index },
+ { 26108, DrawBuffersARB_remap_index },
+ { 11636, RenderbufferStorageMultisample_remap_index },
+ { 16848, FlushMappedBufferRange_remap_index },
+ { 24672, MapBufferRange_remap_index },
+ { 14465, BindVertexArray_remap_index },
+ { 12875, GenVertexArrays_remap_index },
+ { 26883, CopyBufferSubData_remap_index },
+ { 27662, ClientWaitSync_remap_index },
{ 2394, DeleteSync_remap_index },
- { 6190, FenceSync_remap_index },
- { 13298, GetInteger64v_remap_index },
- { 19834, GetSynciv_remap_index },
- { 25829, IsSync_remap_index },
- { 8268, WaitSync_remap_index },
+ { 6221, FenceSync_remap_index },
+ { 13387, GetInteger64v_remap_index },
+ { 19952, GetSynciv_remap_index },
+ { 26047, IsSync_remap_index },
+ { 8328, WaitSync_remap_index },
{ 3363, DrawElementsBaseVertex_remap_index },
- { 26908, DrawRangeElementsBaseVertex_remap_index },
- { 23198, MultiDrawElementsBaseVertex_remap_index },
- { 4680, PolygonOffsetEXT_remap_index },
- { 20393, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 27126, DrawRangeElementsBaseVertex_remap_index },
+ { 23393, MultiDrawElementsBaseVertex_remap_index },
+ { 4711, PolygonOffsetEXT_remap_index },
+ { 20537, GetPixelTexGenParameterfvSGIS_remap_index },
{ 3895, GetPixelTexGenParameterivSGIS_remap_index },
- { 20126, PixelTexGenParameterfSGIS_remap_index },
+ { 20270, PixelTexGenParameterfSGIS_remap_index },
{ 580, PixelTexGenParameterfvSGIS_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 },
- { 13892, TexCoordPointerEXT_remap_index },
- { 5985, VertexPointerEXT_remap_index },
+ { 11191, PixelTexGenParameteriSGIS_remap_index },
+ { 12152, PixelTexGenParameterivSGIS_remap_index },
+ { 14553, SampleMaskSGIS_remap_index },
+ { 17485, SamplePatternSGIS_remap_index },
+ { 23322, ColorPointerEXT_remap_index },
+ { 15468, EdgeFlagPointerEXT_remap_index },
+ { 5166, IndexPointerEXT_remap_index },
+ { 5246, NormalPointerEXT_remap_index },
+ { 13981, TexCoordPointerEXT_remap_index },
+ { 6016, VertexPointerEXT_remap_index },
{ 3165, PointParameterfEXT_remap_index },
- { 6830, PointParameterfvEXT_remap_index },
- { 28281, LockArraysEXT_remap_index },
- { 12991, UnlockArraysEXT_remap_index },
- { 7837, CullParameterdvEXT_remap_index },
- { 10270, CullParameterfvEXT_remap_index },
+ { 6861, PointParameterfvEXT_remap_index },
+ { 28499, LockArraysEXT_remap_index },
+ { 13080, UnlockArraysEXT_remap_index },
+ { 7868, CullParameterdvEXT_remap_index },
+ { 10359, CullParameterfvEXT_remap_index },
{ 1151, SecondaryColor3bEXT_remap_index },
- { 6989, SecondaryColor3bvEXT_remap_index },
- { 9178, SecondaryColor3dEXT_remap_index },
- { 22476, SecondaryColor3dvEXT_remap_index },
- { 24700, SecondaryColor3fEXT_remap_index },
- { 15945, SecondaryColor3fvEXT_remap_index },
+ { 7020, SecondaryColor3bvEXT_remap_index },
+ { 9238, SecondaryColor3dEXT_remap_index },
+ { 22647, SecondaryColor3dvEXT_remap_index },
+ { 24918, SecondaryColor3fEXT_remap_index },
+ { 16034, SecondaryColor3fvEXT_remap_index },
{ 426, SecondaryColor3iEXT_remap_index },
- { 14202, SecondaryColor3ivEXT_remap_index },
- { 8836, SecondaryColor3sEXT_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 },
- { 22537, MultiDrawArraysEXT_remap_index },
- { 18345, MultiDrawElementsEXT_remap_index },
- { 18540, FogCoordPointerEXT_remap_index },
+ { 14291, SecondaryColor3ivEXT_remap_index },
+ { 8896, SecondaryColor3sEXT_remap_index },
+ { 27326, SecondaryColor3svEXT_remap_index },
+ { 24091, SecondaryColor3ubEXT_remap_index },
+ { 18744, SecondaryColor3ubvEXT_remap_index },
+ { 11386, SecondaryColor3uiEXT_remap_index },
+ { 20157, SecondaryColor3uivEXT_remap_index },
+ { 22859, SecondaryColor3usEXT_remap_index },
+ { 11459, SecondaryColor3usvEXT_remap_index },
+ { 10435, SecondaryColorPointerEXT_remap_index },
+ { 22708, MultiDrawArraysEXT_remap_index },
+ { 18434, MultiDrawElementsEXT_remap_index },
+ { 18629, FogCoordPointerEXT_remap_index },
{ 4044, FogCoorddEXT_remap_index },
- { 27682, FogCoorddvEXT_remap_index },
- { 4105, FogCoordfEXT_remap_index },
- { 23796, FogCoordfvEXT_remap_index },
- { 16663, PixelTexGenSGIX_remap_index },
- { 24381, BlendFuncSeparateEXT_remap_index },
- { 5897, FlushVertexArrayRangeNV_remap_index },
- { 4629, VertexArrayRangeNV_remap_index },
- { 24765, CombinerInputNV_remap_index },
+ { 27900, FogCoorddvEXT_remap_index },
+ { 4136, FogCoordfEXT_remap_index },
+ { 24014, FogCoordfvEXT_remap_index },
+ { 16752, PixelTexGenSGIX_remap_index },
+ { 24599, BlendFuncSeparateEXT_remap_index },
+ { 5928, FlushVertexArrayRangeNV_remap_index },
+ { 4660, VertexArrayRangeNV_remap_index },
+ { 24983, CombinerInputNV_remap_index },
{ 1946, CombinerOutputNV_remap_index },
- { 27261, CombinerParameterfNV_remap_index },
- { 4549, CombinerParameterfvNV_remap_index },
- { 19584, CombinerParameteriNV_remap_index },
- { 28652, CombinerParameterivNV_remap_index },
- { 6267, FinalCombinerInputNV_remap_index },
- { 8665, GetCombinerInputParameterfvNV_remap_index },
- { 28489, GetCombinerInputParameterivNV_remap_index },
- { 6066, GetCombinerOutputParameterfvNV_remap_index },
- { 12024, GetCombinerOutputParameterivNV_remap_index },
- { 5642, GetFinalCombinerInputParameterfvNV_remap_index },
- { 21769, GetFinalCombinerInputParameterivNV_remap_index },
- { 11042, ResizeBuffersMESA_remap_index },
- { 9753, WindowPos2dMESA_remap_index },
+ { 27479, CombinerParameterfNV_remap_index },
+ { 4580, CombinerParameterfvNV_remap_index },
+ { 19702, CombinerParameteriNV_remap_index },
+ { 28870, CombinerParameterivNV_remap_index },
+ { 6298, FinalCombinerInputNV_remap_index },
+ { 8725, GetCombinerInputParameterfvNV_remap_index },
+ { 28707, GetCombinerInputParameterivNV_remap_index },
+ { 6097, GetCombinerOutputParameterfvNV_remap_index },
+ { 12113, GetCombinerOutputParameterivNV_remap_index },
+ { 5673, GetFinalCombinerInputParameterfvNV_remap_index },
+ { 21913, GetFinalCombinerInputParameterivNV_remap_index },
+ { 11131, ResizeBuffersMESA_remap_index },
+ { 9842, WindowPos2dMESA_remap_index },
{ 944, WindowPos2dvMESA_remap_index },
- { 29480, WindowPos2fMESA_remap_index },
- { 6934, WindowPos2fvMESA_remap_index },
- { 15892, WindowPos2iMESA_remap_index },
- { 17869, WindowPos2ivMESA_remap_index },
- { 18444, WindowPos2sMESA_remap_index },
- { 4885, WindowPos2svMESA_remap_index },
- { 6759, WindowPos3dMESA_remap_index },
- { 12271, WindowPos3dvMESA_remap_index },
+ { 29698, WindowPos2fMESA_remap_index },
+ { 6965, WindowPos2fvMESA_remap_index },
+ { 15981, WindowPos2iMESA_remap_index },
+ { 17958, WindowPos2ivMESA_remap_index },
+ { 18533, WindowPos2sMESA_remap_index },
+ { 4916, WindowPos2svMESA_remap_index },
+ { 6790, WindowPos3dMESA_remap_index },
+ { 12360, WindowPos3dvMESA_remap_index },
{ 472, WindowPos3fMESA_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 },
- { 14905, WindowPos4dvMESA_remap_index },
- { 12230, WindowPos4fMESA_remap_index },
- { 27015, WindowPos4fvMESA_remap_index },
- { 26763, WindowPos4iMESA_remap_index },
- { 10881, WindowPos4ivMESA_remap_index },
- { 16542, WindowPos4sMESA_remap_index },
+ { 13141, WindowPos3fvMESA_remap_index },
+ { 21208, WindowPos3iMESA_remap_index },
+ { 26828, WindowPos3ivMESA_remap_index },
+ { 16498, WindowPos3sMESA_remap_index },
+ { 28156, WindowPos3svMESA_remap_index },
+ { 9793, WindowPos4dMESA_remap_index },
+ { 14994, WindowPos4dvMESA_remap_index },
+ { 12319, WindowPos4fMESA_remap_index },
+ { 27233, WindowPos4fvMESA_remap_index },
+ { 26981, WindowPos4iMESA_remap_index },
+ { 10970, WindowPos4ivMESA_remap_index },
+ { 16631, WindowPos4sMESA_remap_index },
{ 2857, WindowPos4svMESA_remap_index },
- { 23539, MultiModeDrawArraysIBM_remap_index },
- { 25483, MultiModeDrawElementsIBM_remap_index },
- { 10692, DeleteFencesNV_remap_index },
- { 24612, FinishFenceNV_remap_index },
+ { 23757, MultiModeDrawArraysIBM_remap_index },
+ { 25701, MultiModeDrawElementsIBM_remap_index },
+ { 10781, DeleteFencesNV_remap_index },
+ { 24830, FinishFenceNV_remap_index },
{ 3287, GenFencesNV_remap_index },
- { 14885, GetFenceivNV_remap_index },
- { 7226, IsFenceNV_remap_index },
- { 11951, SetFenceNV_remap_index },
+ { 14974, GetFenceivNV_remap_index },
+ { 7257, IsFenceNV_remap_index },
+ { 12040, SetFenceNV_remap_index },
{ 3744, TestFenceNV_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 },
- { 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 },
- { 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 },
+ { 28127, AreProgramsResidentNV_remap_index },
+ { 27521, BindProgramNV_remap_index },
+ { 22942, DeleteProgramsNV_remap_index },
+ { 18962, ExecuteProgramNV_remap_index },
+ { 29591, GenProgramsNV_remap_index },
+ { 20616, GetProgramParameterdvNV_remap_index },
+ { 9300, GetProgramParameterfvNV_remap_index },
+ { 23296, GetProgramStringNV_remap_index },
+ { 21602, GetProgramivNV_remap_index },
+ { 20850, GetTrackMatrixivNV_remap_index },
+ { 23092, GetVertexAttribPointervNV_remap_index },
+ { 21846, GetVertexAttribdvNV_remap_index },
+ { 16471, GetVertexAttribfvNV_remap_index },
+ { 16162, GetVertexAttribivNV_remap_index },
+ { 16878, IsProgramNV_remap_index },
+ { 8306, LoadProgramNV_remap_index },
+ { 24695, ProgramParameters4dvNV_remap_index },
+ { 21532, ProgramParameters4fvNV_remap_index },
+ { 18262, RequestResidentProgramsNV_remap_index },
+ { 19680, TrackMatrixNV_remap_index },
+ { 28684, VertexAttrib1dNV_remap_index },
+ { 11981, VertexAttrib1dvNV_remap_index },
+ { 25233, VertexAttrib1fNV_remap_index },
{ 2245, VertexAttrib1fvNV_remap_index },
- { 27072, VertexAttrib1sNV_remap_index },
- { 13125, VertexAttrib1svNV_remap_index },
- { 4220, VertexAttrib2dNV_remap_index },
- { 11807, VertexAttrib2dvNV_remap_index },
- { 17628, VertexAttrib2fNV_remap_index },
- { 11418, VertexAttrib2fvNV_remap_index },
- { 5045, VertexAttrib2sNV_remap_index },
- { 16463, VertexAttrib2svNV_remap_index },
- { 9901, VertexAttrib3dNV_remap_index },
- { 28159, VertexAttrib3dvNV_remap_index },
- { 9052, VertexAttrib3fNV_remap_index },
- { 21729, VertexAttrib3fvNV_remap_index },
- { 24990, VertexAttrib3sNV_remap_index },
- { 20733, VertexAttrib3svNV_remap_index },
- { 25457, VertexAttrib4dNV_remap_index },
- { 29410, VertexAttrib4dvNV_remap_index },
+ { 27290, VertexAttrib1sNV_remap_index },
+ { 13214, VertexAttrib1svNV_remap_index },
+ { 4251, VertexAttrib2dNV_remap_index },
+ { 11896, VertexAttrib2dvNV_remap_index },
+ { 17717, VertexAttrib2fNV_remap_index },
+ { 11507, VertexAttrib2fvNV_remap_index },
+ { 5076, VertexAttrib2sNV_remap_index },
+ { 16552, VertexAttrib2svNV_remap_index },
+ { 9990, VertexAttrib3dNV_remap_index },
+ { 28377, VertexAttrib3dvNV_remap_index },
+ { 9112, VertexAttrib3fNV_remap_index },
+ { 21873, VertexAttrib3fvNV_remap_index },
+ { 25208, VertexAttrib3sNV_remap_index },
+ { 20877, VertexAttrib3svNV_remap_index },
+ { 25675, VertexAttrib4dNV_remap_index },
+ { 29628, VertexAttrib4dvNV_remap_index },
{ 3945, VertexAttrib4fNV_remap_index },
- { 8296, VertexAttrib4fvNV_remap_index },
- { 23423, VertexAttrib4sNV_remap_index },
+ { 8356, VertexAttrib4fvNV_remap_index },
+ { 23641, VertexAttrib4sNV_remap_index },
{ 1293, VertexAttrib4svNV_remap_index },
- { 4378, VertexAttrib4ubNV_remap_index },
+ { 4409, VertexAttrib4ubNV_remap_index },
{ 734, VertexAttrib4ubvNV_remap_index },
- { 19053, VertexAttribPointerNV_remap_index },
+ { 19142, VertexAttribPointerNV_remap_index },
{ 2097, VertexAttribs1dvNV_remap_index },
- { 16487, VertexAttribs1fvNV_remap_index },
- { 29210, VertexAttribs1svNV_remap_index },
- { 9077, VertexAttribs2dvNV_remap_index },
- { 22291, VertexAttribs2fvNV_remap_index },
- { 15405, VertexAttribs2svNV_remap_index },
- { 4577, VertexAttribs3dvNV_remap_index },
+ { 16576, VertexAttribs1fvNV_remap_index },
+ { 29428, VertexAttribs1svNV_remap_index },
+ { 9137, VertexAttribs2dvNV_remap_index },
+ { 22435, VertexAttribs2fvNV_remap_index },
+ { 15494, VertexAttribs2svNV_remap_index },
+ { 4608, VertexAttribs3dvNV_remap_index },
{ 1977, VertexAttribs3fvNV_remap_index },
- { 26358, VertexAttribs3svNV_remap_index },
- { 23513, VertexAttribs4dvNV_remap_index },
- { 4603, VertexAttribs4fvNV_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 },
- { 21645, AlphaFragmentOp3ATI_remap_index },
- { 26285, BeginFragmentShaderATI_remap_index },
- { 27502, BindFragmentShaderATI_remap_index },
- { 20862, ColorFragmentOp1ATI_remap_index },
+ { 26576, VertexAttribs3svNV_remap_index },
+ { 23731, VertexAttribs4dvNV_remap_index },
+ { 4634, VertexAttribs4fvNV_remap_index },
+ { 29215, VertexAttribs4svNV_remap_index },
+ { 26324, VertexAttribs4ubvNV_remap_index },
+ { 23833, GetTexBumpParameterfvATI_remap_index },
+ { 29469, GetTexBumpParameterivATI_remap_index },
+ { 16216, TexBumpParameterfvATI_remap_index },
+ { 18133, TexBumpParameterivATI_remap_index },
+ { 13760, AlphaFragmentOp1ATI_remap_index },
+ { 9652, AlphaFragmentOp2ATI_remap_index },
+ { 21789, AlphaFragmentOp3ATI_remap_index },
+ { 26503, BeginFragmentShaderATI_remap_index },
+ { 27720, BindFragmentShaderATI_remap_index },
+ { 21006, ColorFragmentOp1ATI_remap_index },
{ 3823, ColorFragmentOp2ATI_remap_index },
- { 27804, ColorFragmentOp3ATI_remap_index },
- { 4722, DeleteFragmentShaderATI_remap_index },
- { 29434, EndFragmentShaderATI_remap_index },
- { 28680, GenFragmentShadersATI_remap_index },
- { 22395, PassTexCoordATI_remap_index },
- { 5965, SampleMapATI_remap_index },
- { 5738, SetFragmentShaderConstantATI_remap_index },
+ { 28022, ColorFragmentOp3ATI_remap_index },
+ { 4753, DeleteFragmentShaderATI_remap_index },
+ { 29652, EndFragmentShaderATI_remap_index },
+ { 28898, GenFragmentShadersATI_remap_index },
+ { 22566, PassTexCoordATI_remap_index },
+ { 5996, SampleMapATI_remap_index },
+ { 5769, SetFragmentShaderConstantATI_remap_index },
{ 319, PointParameteriNV_remap_index },
- { 12432, PointParameterivNV_remap_index },
- { 25296, ActiveStencilFaceEXT_remap_index },
- { 24137, BindVertexArrayAPPLE_remap_index },
+ { 12521, PointParameterivNV_remap_index },
+ { 25514, ActiveStencilFaceEXT_remap_index },
+ { 24355, BindVertexArrayAPPLE_remap_index },
{ 2522, DeleteVertexArraysAPPLE_remap_index },
- { 15744, GenVertexArraysAPPLE_remap_index },
- { 20537, IsVertexArrayAPPLE_remap_index },
+ { 15833, GenVertexArraysAPPLE_remap_index },
+ { 20681, IsVertexArrayAPPLE_remap_index },
{ 775, GetProgramNamedParameterdvNV_remap_index },
{ 3128, GetProgramNamedParameterfvNV_remap_index },
- { 23646, ProgramNamedParameter4dNV_remap_index },
- { 12707, ProgramNamedParameter4dvNV_remap_index },
- { 7862, ProgramNamedParameter4fNV_remap_index },
- { 10311, ProgramNamedParameter4fvNV_remap_index },
- { 21367, DepthBoundsEXT_remap_index },
+ { 23864, ProgramNamedParameter4dNV_remap_index },
+ { 12796, ProgramNamedParameter4dvNV_remap_index },
+ { 7893, ProgramNamedParameter4fNV_remap_index },
+ { 10400, ProgramNamedParameter4fvNV_remap_index },
+ { 21511, DepthBoundsEXT_remap_index },
{ 1043, BlendEquationSeparateEXT_remap_index },
- { 12826, BindFramebufferEXT_remap_index },
- { 22582, BindRenderbufferEXT_remap_index },
- { 8515, CheckFramebufferStatusEXT_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 },
- { 20429, GenFramebuffersEXT_remap_index },
- { 15291, GenRenderbuffersEXT_remap_index },
- { 5684, GenerateMipmapEXT_remap_index },
- { 19084, GetFramebufferAttachmentParameterivEXT_remap_index },
- { 28586, GetRenderbufferParameterivEXT_remap_index },
- { 17924, IsFramebufferEXT_remap_index },
- { 29333, IsRenderbufferEXT_remap_index },
- { 7173, RenderbufferStorageEXT_remap_index },
+ { 12915, BindFramebufferEXT_remap_index },
+ { 22753, BindRenderbufferEXT_remap_index },
+ { 8575, CheckFramebufferStatusEXT_remap_index },
+ { 19971, DeleteFramebuffersEXT_remap_index },
+ { 28279, DeleteRenderbuffersEXT_remap_index },
+ { 11920, FramebufferRenderbufferEXT_remap_index },
+ { 12057, FramebufferTexture1DEXT_remap_index },
+ { 10228, FramebufferTexture2DEXT_remap_index },
+ { 9895, FramebufferTexture3DEXT_remap_index },
+ { 20573, GenFramebuffersEXT_remap_index },
+ { 15380, GenRenderbuffersEXT_remap_index },
+ { 5715, GenerateMipmapEXT_remap_index },
+ { 19202, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 28804, GetRenderbufferParameterivEXT_remap_index },
+ { 18013, IsFramebufferEXT_remap_index },
+ { 29551, IsRenderbufferEXT_remap_index },
+ { 7204, RenderbufferStorageEXT_remap_index },
{ 651, BlitFramebufferEXT_remap_index },
- { 12526, BufferParameteriAPPLE_remap_index },
- { 16821, FlushMappedBufferRangeAPPLE_remap_index },
+ { 12615, BufferParameteriAPPLE_remap_index },
+ { 16910, FlushMappedBufferRangeAPPLE_remap_index },
{ 2701, FramebufferTextureLayerEXT_remap_index },
- { 26007, ProvokingVertexEXT_remap_index },
- { 9461, GetTexParameterPointervAPPLE_remap_index },
- { 4405, TextureRangeAPPLE_remap_index },
- { 25322, StencilFuncSeparateATI_remap_index },
- { 15811, ProgramEnvParameters4fvEXT_remap_index },
- { 15029, ProgramLocalParameters4fvEXT_remap_index },
- { 12360, GetQueryObjecti64vEXT_remap_index },
- { 9103, GetQueryObjectui64vEXT_remap_index },
+ { 8277, ColorMaskIndexedEXT_remap_index },
+ { 23180, DisableIndexedEXT_remap_index },
+ { 23488, EnableIndexedEXT_remap_index },
+ { 19173, GetBooleanIndexedvEXT_remap_index },
+ { 9685, GetIntegerIndexedvEXT_remap_index },
+ { 20047, IsEnabledIndexedEXT_remap_index },
+ { 4074, BeginConditionalRenderNV_remap_index },
+ { 22539, EndConditionalRenderNV_remap_index },
+ { 26225, ProvokingVertexEXT_remap_index },
+ { 9521, GetTexParameterPointervAPPLE_remap_index },
+ { 4436, TextureRangeAPPLE_remap_index },
+ { 25540, StencilFuncSeparateATI_remap_index },
+ { 15900, ProgramEnvParameters4fvEXT_remap_index },
+ { 15118, ProgramLocalParameters4fvEXT_remap_index },
+ { 12449, GetQueryObjecti64vEXT_remap_index },
+ { 9163, GetQueryObjectui64vEXT_remap_index },
{ -1, -1 }
};
@@ -4728,108 +4768,108 @@ static const struct gl_function_remap MESA_alt_functions[] = {
/* from GL_EXT_blend_color */
{ 2440, _gloffset_BlendColor },
/* from GL_EXT_blend_minmax */
- { 9863, _gloffset_BlendEquation },
+ { 9952, _gloffset_BlendEquation },
/* from GL_EXT_color_subtable */
- { 14927, _gloffset_ColorSubTable },
- { 27993, _gloffset_CopyColorSubTable },
+ { 15016, _gloffset_ColorSubTable },
+ { 28211, _gloffset_CopyColorSubTable },
/* from GL_EXT_convolution */
{ 213, _gloffset_ConvolutionFilter1D },
{ 2284, _gloffset_CopyConvolutionFilter1D },
{ 3624, _gloffset_GetConvolutionParameteriv },
- { 7522, _gloffset_ConvolutionFilter2D },
- { 7688, _gloffset_ConvolutionParameteriv },
- { 8148, _gloffset_ConvolutionParameterfv },
- { 18072, _gloffset_GetSeparableFilter },
- { 21118, _gloffset_SeparableFilter2D },
- { 21947, _gloffset_ConvolutionParameteri },
- { 22070, _gloffset_ConvolutionParameterf },
- { 23449, _gloffset_GetConvolutionParameterfv },
- { 24303, _gloffset_GetConvolutionFilter },
- { 26547, _gloffset_CopyConvolutionFilter2D },
+ { 7553, _gloffset_ConvolutionFilter2D },
+ { 7719, _gloffset_ConvolutionParameteriv },
+ { 8179, _gloffset_ConvolutionParameterfv },
+ { 18161, _gloffset_GetSeparableFilter },
+ { 21262, _gloffset_SeparableFilter2D },
+ { 22091, _gloffset_ConvolutionParameteri },
+ { 22214, _gloffset_ConvolutionParameterf },
+ { 23667, _gloffset_GetConvolutionParameterfv },
+ { 24521, _gloffset_GetConvolutionFilter },
+ { 26765, _gloffset_CopyConvolutionFilter2D },
/* from GL_EXT_copy_texture */
- { 13185, _gloffset_CopyTexSubImage3D },
- { 14667, _gloffset_CopyTexImage2D },
- { 21555, _gloffset_CopyTexImage1D },
- { 23984, _gloffset_CopyTexSubImage2D },
- { 26185, _gloffset_CopyTexSubImage1D },
+ { 13274, _gloffset_CopyTexSubImage3D },
+ { 14756, _gloffset_CopyTexImage2D },
+ { 21699, _gloffset_CopyTexImage1D },
+ { 24202, _gloffset_CopyTexSubImage2D },
+ { 26403, _gloffset_CopyTexSubImage1D },
/* from GL_EXT_draw_range_elements */
- { 8402, _gloffset_DrawRangeElements },
+ { 8462, _gloffset_DrawRangeElements },
/* from GL_EXT_histogram */
{ 812, _gloffset_Histogram },
{ 3088, _gloffset_ResetHistogram },
- { 8774, _gloffset_GetMinmax },
- { 13519, _gloffset_GetHistogramParameterfv },
- { 21480, _gloffset_GetMinmaxParameteriv },
- { 23339, _gloffset_ResetMinmax },
- { 24200, _gloffset_GetHistogramParameteriv },
- { 25256, _gloffset_GetHistogram },
- { 27618, _gloffset_Minmax },
- { 29080, _gloffset_GetMinmaxParameterfv },
+ { 8834, _gloffset_GetMinmax },
+ { 13608, _gloffset_GetHistogramParameterfv },
+ { 21624, _gloffset_GetMinmaxParameteriv },
+ { 23557, _gloffset_ResetMinmax },
+ { 24418, _gloffset_GetHistogramParameteriv },
+ { 25474, _gloffset_GetHistogram },
+ { 27836, _gloffset_Minmax },
+ { 29298, _gloffset_GetMinmaxParameterfv },
/* from GL_EXT_paletted_texture */
- { 7384, _gloffset_ColorTable },
- { 13365, _gloffset_GetColorTable },
- { 20176, _gloffset_GetColorTableParameterfv },
- { 22126, _gloffset_GetColorTableParameteriv },
+ { 7415, _gloffset_ColorTable },
+ { 13454, _gloffset_GetColorTable },
+ { 20320, _gloffset_GetColorTableParameterfv },
+ { 22270, _gloffset_GetColorTableParameteriv },
/* from GL_EXT_subtexture */
- { 6105, _gloffset_TexSubImage1D },
- { 9388, _gloffset_TexSubImage2D },
+ { 6136, _gloffset_TexSubImage1D },
+ { 9448, _gloffset_TexSubImage2D },
/* from GL_EXT_texture3D */
{ 1658, _gloffset_TexImage3D },
- { 19945, _gloffset_TexSubImage3D },
+ { 20089, _gloffset_TexSubImage3D },
/* from GL_EXT_texture_object */
{ 2964, _gloffset_PrioritizeTextures },
- { 6554, _gloffset_AreTexturesResident },
- { 11916, _gloffset_GenTextures },
- { 13851, _gloffset_DeleteTextures },
- { 17102, _gloffset_IsTexture },
- { 26250, _gloffset_BindTexture },
+ { 6585, _gloffset_AreTexturesResident },
+ { 12005, _gloffset_GenTextures },
+ { 13940, _gloffset_DeleteTextures },
+ { 17191, _gloffset_IsTexture },
+ { 26468, _gloffset_BindTexture },
/* from GL_EXT_vertex_array */
- { 21307, _gloffset_ArrayElement },
- { 27206, _gloffset_GetPointerv },
- { 28707, _gloffset_DrawArrays },
+ { 21451, _gloffset_ArrayElement },
+ { 27424, _gloffset_GetPointerv },
+ { 28925, _gloffset_DrawArrays },
/* from GL_SGI_color_table */
- { 6672, _gloffset_ColorTableParameteriv },
- { 7384, _gloffset_ColorTable },
- { 13365, _gloffset_GetColorTable },
- { 13475, _gloffset_CopyColorTable },
- { 16963, _gloffset_ColorTableParameterfv },
- { 20176, _gloffset_GetColorTableParameterfv },
- { 22126, _gloffset_GetColorTableParameteriv },
+ { 6703, _gloffset_ColorTableParameteriv },
+ { 7415, _gloffset_ColorTable },
+ { 13454, _gloffset_GetColorTable },
+ { 13564, _gloffset_CopyColorTable },
+ { 17052, _gloffset_ColorTableParameterfv },
+ { 20320, _gloffset_GetColorTableParameterfv },
+ { 22270, _gloffset_GetColorTableParameteriv },
/* from GL_VERSION_1_3 */
{ 381, _gloffset_MultiTexCoord3sARB },
{ 613, _gloffset_ActiveTextureARB },
{ 3761, _gloffset_MultiTexCoord1fvARB },
- { 5240, _gloffset_MultiTexCoord3dARB },
- { 5285, _gloffset_MultiTexCoord2iARB },
- { 5409, _gloffset_MultiTexCoord2svARB },
- { 7340, _gloffset_MultiTexCoord2fARB },
- { 9133, _gloffset_MultiTexCoord3fvARB },
- { 9625, _gloffset_MultiTexCoord4sARB },
- { 10225, _gloffset_MultiTexCoord2dvARB },
- { 10607, _gloffset_MultiTexCoord1svARB },
- { 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 },
+ { 5271, _gloffset_MultiTexCoord3dARB },
+ { 5316, _gloffset_MultiTexCoord2iARB },
+ { 5440, _gloffset_MultiTexCoord2svARB },
+ { 7371, _gloffset_MultiTexCoord2fARB },
+ { 9193, _gloffset_MultiTexCoord3fvARB },
+ { 9714, _gloffset_MultiTexCoord4sARB },
+ { 10314, _gloffset_MultiTexCoord2dvARB },
+ { 10696, _gloffset_MultiTexCoord1svARB },
+ { 10992, _gloffset_MultiTexCoord3svARB },
+ { 11053, _gloffset_MultiTexCoord4iARB },
+ { 11776, _gloffset_MultiTexCoord3iARB },
+ { 12478, _gloffset_MultiTexCoord1dARB },
+ { 12644, _gloffset_MultiTexCoord3dvARB },
+ { 13808, _gloffset_MultiTexCoord3ivARB },
+ { 13853, _gloffset_MultiTexCoord2sARB },
+ { 15073, _gloffset_MultiTexCoord4ivARB },
+ { 16702, _gloffset_ClientActiveTextureARB },
+ { 18918, _gloffset_MultiTexCoord2dARB },
+ { 19322, _gloffset_MultiTexCoord4dvARB },
+ { 19608, _gloffset_MultiTexCoord4fvARB },
+ { 20461, _gloffset_MultiTexCoord3fARB },
+ { 22798, _gloffset_MultiTexCoord4dARB },
+ { 23002, _gloffset_MultiTexCoord1sARB },
+ { 23204, _gloffset_MultiTexCoord1dvARB },
+ { 24046, _gloffset_MultiTexCoord1ivARB },
+ { 24139, _gloffset_MultiTexCoord2ivARB },
+ { 24478, _gloffset_MultiTexCoord1iARB },
+ { 25749, _gloffset_MultiTexCoord4svARB },
+ { 26267, _gloffset_MultiTexCoord1fARB },
+ { 26530, _gloffset_MultiTexCoord4fARB },
+ { 28759, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
@@ -4837,7 +4877,7 @@ static const struct gl_function_remap MESA_alt_functions[] = {
#if defined(need_GL_3DFX_tbuffer)
static const struct gl_function_remap GL_3DFX_tbuffer_functions[] = {
- { 8206, -1 }, /* TbufferMask3DFX */
+ { 8237, -1 }, /* TbufferMask3DFX */
{ -1, -1 }
};
#endif
@@ -4901,10 +4941,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 */
- { 11508, -1 }, /* MatrixIndexuivARB */
- { 12677, -1 }, /* MatrixIndexPointerARB */
- { 17351, -1 }, /* CurrentPaletteMatrixARB */
- { 20061, -1 }, /* MatrixIndexubvARB */
+ { 11597, -1 }, /* MatrixIndexuivARB */
+ { 12766, -1 }, /* MatrixIndexPointerARB */
+ { 17440, -1 }, /* CurrentPaletteMatrixARB */
+ { 20205, -1 }, /* MatrixIndexubvARB */
{ -1, -1 }
};
#endif
@@ -4975,15 +5015,15 @@ static const struct gl_function_remap GL_ARB_vertex_array_object_functions[] = {
#if defined(need_GL_ARB_vertex_blend)
static const struct gl_function_remap GL_ARB_vertex_blend_functions[] = {
{ 2226, -1 }, /* WeightubvARB */
- { 5572, -1 }, /* WeightivARB */
- { 9728, -1 }, /* WeightPointerARB */
- { 12146, -1 }, /* WeightfvARB */
- { 15431, -1 }, /* WeightbvARB */
- { 18497, -1 }, /* WeightusvARB */
- { 21044, -1 }, /* VertexBlendARB */
- { 26133, -1 }, /* WeightsvARB */
- { 28043, -1 }, /* WeightdvARB */
- { 28741, -1 }, /* WeightuivARB */
+ { 5603, -1 }, /* WeightivARB */
+ { 9817, -1 }, /* WeightPointerARB */
+ { 12235, -1 }, /* WeightfvARB */
+ { 15520, -1 }, /* WeightbvARB */
+ { 18586, -1 }, /* WeightusvARB */
+ { 21188, -1 }, /* VertexBlendARB */
+ { 26351, -1 }, /* WeightsvARB */
+ { 28261, -1 }, /* WeightdvARB */
+ { 28959, -1 }, /* WeightuivARB */
{ -1, -1 }
};
#endif
@@ -5074,15 +5114,15 @@ static const struct gl_function_remap GL_EXT_blend_func_separate_functions[] = {
#if defined(need_GL_EXT_blend_minmax)
static const struct gl_function_remap GL_EXT_blend_minmax_functions[] = {
- { 9863, _gloffset_BlendEquation },
+ { 9952, _gloffset_BlendEquation },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_color_subtable)
static const struct gl_function_remap GL_EXT_color_subtable_functions[] = {
- { 14927, _gloffset_ColorSubTable },
- { 27993, _gloffset_CopyColorSubTable },
+ { 15016, _gloffset_ColorSubTable },
+ { 28211, _gloffset_CopyColorSubTable },
{ -1, -1 }
};
#endif
@@ -5099,55 +5139,55 @@ static const struct gl_function_remap GL_EXT_convolution_functions[] = {
{ 213, _gloffset_ConvolutionFilter1D },
{ 2284, _gloffset_CopyConvolutionFilter1D },
{ 3624, _gloffset_GetConvolutionParameteriv },
- { 7522, _gloffset_ConvolutionFilter2D },
- { 7688, _gloffset_ConvolutionParameteriv },
- { 8148, _gloffset_ConvolutionParameterfv },
- { 18072, _gloffset_GetSeparableFilter },
- { 21118, _gloffset_SeparableFilter2D },
- { 21947, _gloffset_ConvolutionParameteri },
- { 22070, _gloffset_ConvolutionParameterf },
- { 23449, _gloffset_GetConvolutionParameterfv },
- { 24303, _gloffset_GetConvolutionFilter },
- { 26547, _gloffset_CopyConvolutionFilter2D },
+ { 7553, _gloffset_ConvolutionFilter2D },
+ { 7719, _gloffset_ConvolutionParameteriv },
+ { 8179, _gloffset_ConvolutionParameterfv },
+ { 18161, _gloffset_GetSeparableFilter },
+ { 21262, _gloffset_SeparableFilter2D },
+ { 22091, _gloffset_ConvolutionParameteri },
+ { 22214, _gloffset_ConvolutionParameterf },
+ { 23667, _gloffset_GetConvolutionParameterfv },
+ { 24521, _gloffset_GetConvolutionFilter },
+ { 26765, _gloffset_CopyConvolutionFilter2D },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_coordinate_frame)
static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = {
- { 9272, -1 }, /* TangentPointerEXT */
- { 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 */
+ { 9332, -1 }, /* TangentPointerEXT */
+ { 11111, -1 }, /* Binormal3ivEXT */
+ { 11729, -1 }, /* Tangent3sEXT */
+ { 12831, -1 }, /* Tangent3fvEXT */
+ { 16452, -1 }, /* Tangent3dvEXT */
+ { 17138, -1 }, /* Binormal3bvEXT */
+ { 18214, -1 }, /* Binormal3dEXT */
+ { 20137, -1 }, /* Tangent3fEXT */
+ { 22163, -1 }, /* Binormal3sEXT */
+ { 22608, -1 }, /* Tangent3ivEXT */
+ { 22627, -1 }, /* Tangent3dEXT */
+ { 23431, -1 }, /* Binormal3svEXT */
+ { 23944, -1 }, /* Binormal3fEXT */
+ { 24796, -1 }, /* Binormal3dvEXT */
+ { 25971, -1 }, /* Tangent3iEXT */
+ { 27050, -1 }, /* Tangent3bvEXT */
+ { 27459, -1 }, /* Tangent3bEXT */
+ { 27984, -1 }, /* Binormal3fvEXT */
+ { 28658, -1 }, /* BinormalPointerEXT */
+ { 29063, -1 }, /* Tangent3svEXT */
+ { 29500, -1 }, /* Binormal3bEXT */
+ { 29677, -1 }, /* Binormal3iEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_copy_texture)
static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
- { 13185, _gloffset_CopyTexSubImage3D },
- { 14667, _gloffset_CopyTexImage2D },
- { 21555, _gloffset_CopyTexImage1D },
- { 23984, _gloffset_CopyTexSubImage2D },
- { 26185, _gloffset_CopyTexSubImage1D },
+ { 13274, _gloffset_CopyTexSubImage3D },
+ { 14756, _gloffset_CopyTexImage2D },
+ { 21699, _gloffset_CopyTexImage1D },
+ { 24202, _gloffset_CopyTexSubImage2D },
+ { 26403, _gloffset_CopyTexSubImage1D },
{ -1, -1 }
};
#endif
@@ -5166,9 +5206,16 @@ static const struct gl_function_remap GL_EXT_depth_bounds_test_functions[] = {
};
#endif
+#if defined(need_GL_EXT_draw_buffers2)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_draw_buffers2_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_EXT_draw_range_elements)
static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = {
- { 8402, _gloffset_DrawRangeElements },
+ { 8462, _gloffset_DrawRangeElements },
{ -1, -1 }
};
#endif
@@ -5212,37 +5259,37 @@ static const struct gl_function_remap GL_EXT_gpu_program_parameters_functions[]
static const struct gl_function_remap GL_EXT_histogram_functions[] = {
{ 812, _gloffset_Histogram },
{ 3088, _gloffset_ResetHistogram },
- { 8774, _gloffset_GetMinmax },
- { 13519, _gloffset_GetHistogramParameterfv },
- { 21480, _gloffset_GetMinmaxParameteriv },
- { 23339, _gloffset_ResetMinmax },
- { 24200, _gloffset_GetHistogramParameteriv },
- { 25256, _gloffset_GetHistogram },
- { 27618, _gloffset_Minmax },
- { 29080, _gloffset_GetMinmaxParameterfv },
+ { 8834, _gloffset_GetMinmax },
+ { 13608, _gloffset_GetHistogramParameterfv },
+ { 21624, _gloffset_GetMinmaxParameteriv },
+ { 23557, _gloffset_ResetMinmax },
+ { 24418, _gloffset_GetHistogramParameteriv },
+ { 25474, _gloffset_GetHistogram },
+ { 27836, _gloffset_Minmax },
+ { 29298, _gloffset_GetMinmaxParameterfv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_func)
static const struct gl_function_remap GL_EXT_index_func_functions[] = {
- { 10090, -1 }, /* IndexFuncEXT */
+ { 10179, -1 }, /* IndexFuncEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_index_material)
static const struct gl_function_remap GL_EXT_index_material_functions[] = {
- { 18584, -1 }, /* IndexMaterialEXT */
+ { 18673, -1 }, /* IndexMaterialEXT */
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_light_texture)
static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
- { 23256, -1 }, /* ApplyTextureEXT */
- { 23293, -1 }, /* TextureMaterialEXT */
- { 23318, -1 }, /* TextureLightEXT */
+ { 23451, -1 }, /* ApplyTextureEXT */
+ { 23511, -1 }, /* TextureMaterialEXT */
+ { 23536, -1 }, /* TextureLightEXT */
{ -1, -1 }
};
#endif
@@ -5263,20 +5310,20 @@ static const struct gl_function_remap GL_EXT_multisample_functions[] = {
#if defined(need_GL_EXT_paletted_texture)
static const struct gl_function_remap GL_EXT_paletted_texture_functions[] = {
- { 7384, _gloffset_ColorTable },
- { 13365, _gloffset_GetColorTable },
- { 20176, _gloffset_GetColorTableParameterfv },
- { 22126, _gloffset_GetColorTableParameteriv },
+ { 7415, _gloffset_ColorTable },
+ { 13454, _gloffset_GetColorTable },
+ { 20320, _gloffset_GetColorTableParameterfv },
+ { 22270, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_pixel_transform)
static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = {
- { 9513, -1 }, /* PixelTransformParameterfvEXT */
- { 19169, -1 }, /* PixelTransformParameterfEXT */
- { 19249, -1 }, /* PixelTransformParameteriEXT */
- { 28404, -1 }, /* PixelTransformParameterivEXT */
+ { 9573, -1 }, /* PixelTransformParameterfvEXT */
+ { 19287, -1 }, /* PixelTransformParameterfEXT */
+ { 19367, -1 }, /* PixelTransformParameteriEXT */
+ { 28622, -1 }, /* PixelTransformParameterivEXT */
{ -1, -1 }
};
#endif
@@ -5318,8 +5365,8 @@ static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = {
#if defined(need_GL_EXT_subtexture)
static const struct gl_function_remap GL_EXT_subtexture_functions[] = {
- { 6105, _gloffset_TexSubImage1D },
- { 9388, _gloffset_TexSubImage2D },
+ { 6136, _gloffset_TexSubImage1D },
+ { 9448, _gloffset_TexSubImage2D },
{ -1, -1 }
};
#endif
@@ -5327,7 +5374,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 },
- { 19945, _gloffset_TexSubImage3D },
+ { 20089, _gloffset_TexSubImage3D },
{ -1, -1 }
};
#endif
@@ -5342,18 +5389,18 @@ static const struct gl_function_remap GL_EXT_texture_array_functions[] = {
#if defined(need_GL_EXT_texture_object)
static const struct gl_function_remap GL_EXT_texture_object_functions[] = {
{ 2964, _gloffset_PrioritizeTextures },
- { 6554, _gloffset_AreTexturesResident },
- { 11916, _gloffset_GenTextures },
- { 13851, _gloffset_DeleteTextures },
- { 17102, _gloffset_IsTexture },
- { 26250, _gloffset_BindTexture },
+ { 6585, _gloffset_AreTexturesResident },
+ { 12005, _gloffset_GenTextures },
+ { 13940, _gloffset_DeleteTextures },
+ { 17191, _gloffset_IsTexture },
+ { 26468, _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[] = {
- { 12096, -1 }, /* TextureNormalEXT */
+ { 12185, -1 }, /* TextureNormalEXT */
{ -1, -1 }
};
#endif
@@ -5368,18 +5415,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[] = {
- { 21307, _gloffset_ArrayElement },
- { 27206, _gloffset_GetPointerv },
- { 28707, _gloffset_DrawArrays },
+ { 21451, _gloffset_ArrayElement },
+ { 27424, _gloffset_GetPointerv },
+ { 28925, _gloffset_DrawArrays },
{ -1, -1 }
};
#endif
#if defined(need_GL_EXT_vertex_weighting)
static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
- { 17132, -1 }, /* VertexWeightfvEXT */
- { 23704, -1 }, /* VertexWeightfEXT */
- { 25225, -1 }, /* VertexWeightPointerEXT */
+ { 17221, -1 }, /* VertexWeightfvEXT */
+ { 23922, -1 }, /* VertexWeightfEXT */
+ { 25443, -1 }, /* VertexWeightPointerEXT */
{ -1, -1 }
};
#endif
@@ -5388,10 +5435,10 @@ static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
static const struct gl_function_remap GL_HP_image_transform_functions[] = {
{ 2157, -1 }, /* GetImageTransformParameterfvHP */
{ 3305, -1 }, /* ImageTransformParameterfHP */
- { 8966, -1 }, /* ImageTransformParameterfvHP */
- { 10525, -1 }, /* ImageTransformParameteriHP */
- { 10793, -1 }, /* GetImageTransformParameterivHP */
- { 17196, -1 }, /* ImageTransformParameterivHP */
+ { 9026, -1 }, /* ImageTransformParameterfvHP */
+ { 10614, -1 }, /* ImageTransformParameteriHP */
+ { 10882, -1 }, /* GetImageTransformParameterivHP */
+ { 17285, -1 }, /* ImageTransformParameterivHP */
{ -1, -1 }
};
#endif
@@ -5406,13 +5453,13 @@ static const struct gl_function_remap GL_IBM_multimode_draw_arrays_functions[] =
#if defined(need_GL_IBM_vertex_array_lists)
static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = {
{ 3857, -1 }, /* SecondaryColorPointerListIBM */
- { 5106, -1 }, /* NormalPointerListIBM */
- { 6728, -1 }, /* FogCoordPointerListIBM */
- { 7035, -1 }, /* VertexPointerListIBM */
- { 10446, -1 }, /* ColorPointerListIBM */
- { 11747, -1 }, /* TexCoordPointerListIBM */
- { 12118, -1 }, /* IndexPointerListIBM */
- { 29023, -1 }, /* EdgeFlagPointerListIBM */
+ { 5137, -1 }, /* NormalPointerListIBM */
+ { 6759, -1 }, /* FogCoordPointerListIBM */
+ { 7066, -1 }, /* VertexPointerListIBM */
+ { 10535, -1 }, /* ColorPointerListIBM */
+ { 11836, -1 }, /* TexCoordPointerListIBM */
+ { 12207, -1 }, /* IndexPointerListIBM */
+ { 29241, -1 }, /* EdgeFlagPointerListIBM */
{ -1, -1 }
};
#endif
@@ -5426,10 +5473,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[] = {
- { 11134, -1 }, /* VertexPointervINTEL */
- { 13612, -1 }, /* ColorPointervINTEL */
- { 26521, -1 }, /* NormalPointervINTEL */
- { 26947, -1 }, /* TexCoordPointervINTEL */
+ { 11223, -1 }, /* VertexPointervINTEL */
+ { 13701, -1 }, /* ColorPointervINTEL */
+ { 26739, -1 }, /* NormalPointervINTEL */
+ { 27165, -1 }, /* TexCoordPointervINTEL */
{ -1, -1 }
};
#endif
@@ -5446,7 +5493,7 @@ static const struct gl_function_remap GL_MESA_shader_debug_functions[] = {
{ 1522, -1 }, /* GetDebugLogLengthMESA */
{ 3063, -1 }, /* ClearDebugLogMESA */
{ 4018, -1 }, /* GetDebugLogMESA */
- { 27399, -1 }, /* CreateDebugObjectMESA */
+ { 27617, -1 }, /* CreateDebugObjectMESA */
{ -1, -1 }
};
#endif
@@ -5458,17 +5505,24 @@ static const struct gl_function_remap GL_MESA_window_pos_functions[] = {
};
#endif
+#if defined(need_GL_NV_condtitional_render)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_condtitional_render_functions[] = {
+ { -1, -1 }
+};
+#endif
+
#if defined(need_GL_NV_evaluators)
static const struct gl_function_remap GL_NV_evaluators_functions[] = {
- { 5773, -1 }, /* GetMapAttribParameterivNV */
- { 7490, -1 }, /* MapControlPointsNV */
- { 7589, -1 }, /* MapParameterfvNV */
- { 9371, -1 }, /* EvalMapsNV */
- { 15101, -1 }, /* GetMapAttribParameterfvNV */
- { 15267, -1 }, /* MapParameterivNV */
- { 21870, -1 }, /* GetMapParameterivNV */
- { 22368, -1 }, /* GetMapParameterfvNV */
- { 25857, -1 }, /* GetMapControlPointsNV */
+ { 5804, -1 }, /* GetMapAttribParameterivNV */
+ { 7521, -1 }, /* MapControlPointsNV */
+ { 7620, -1 }, /* MapParameterfvNV */
+ { 9431, -1 }, /* EvalMapsNV */
+ { 15190, -1 }, /* GetMapAttribParameterfvNV */
+ { 15356, -1 }, /* MapParameterivNV */
+ { 22014, -1 }, /* GetMapParameterivNV */
+ { 22512, -1 }, /* GetMapParameterfvNV */
+ { 26075, -1 }, /* GetMapControlPointsNV */
{ -1, -1 }
};
#endif
@@ -5503,8 +5557,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[] = {
- { 14004, -1 }, /* CombinerStageParameterfvNV */
- { 14319, -1 }, /* GetCombinerStageParameterfvNV */
+ { 14093, -1 }, /* CombinerStageParameterfvNV */
+ { 14408, -1 }, /* GetCombinerStageParameterfvNV */
{ -1, -1 }
};
#endif
@@ -5525,23 +5579,23 @@ static const struct gl_function_remap GL_NV_vertex_program_functions[] = {
#if defined(need_GL_PGI_misc_hints)
static const struct gl_function_remap GL_PGI_misc_hints_functions[] = {
- { 7674, -1 }, /* HintPGI */
+ { 7705, -1 }, /* HintPGI */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_detail_texture)
static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = {
- { 14292, -1 }, /* GetDetailTexFuncSGIS */
- { 14612, -1 }, /* DetailTexFuncSGIS */
+ { 14381, -1 }, /* GetDetailTexFuncSGIS */
+ { 14701, -1 }, /* DetailTexFuncSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_fog_function)
static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
- { 23966, -1 }, /* FogFuncSGIS */
- { 24631, -1 }, /* GetFogFuncSGIS */
+ { 24184, -1 }, /* FogFuncSGIS */
+ { 24849, -1 }, /* GetFogFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5569,8 +5623,8 @@ static const struct gl_function_remap GL_SGIS_point_parameters_functions[] = {
#if defined(need_GL_SGIS_sharpen_texture)
static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
- { 5834, -1 }, /* GetSharpenTexFuncSGIS */
- { 19464, -1 }, /* SharpenTexFuncSGIS */
+ { 5865, -1 }, /* GetSharpenTexFuncSGIS */
+ { 19582, -1 }, /* SharpenTexFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5578,22 +5632,22 @@ static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
#if defined(need_GL_SGIS_texture4D)
static const struct gl_function_remap GL_SGIS_texture4D_functions[] = {
{ 894, -1 }, /* TexImage4DSGIS */
- { 13920, -1 }, /* TexSubImage4DSGIS */
+ { 14009, -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[] = {
- { 13318, -1 }, /* TextureColorMaskSGIS */
+ { 13407, -1 }, /* TextureColorMaskSGIS */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIS_texture_filter4)
static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
- { 6011, -1 }, /* GetTexFilterFuncSGIS */
- { 14438, -1 }, /* TexFilterFuncSGIS */
+ { 6042, -1 }, /* GetTexFilterFuncSGIS */
+ { 14527, -1 }, /* TexFilterFuncSGIS */
{ -1, -1 }
};
#endif
@@ -5602,17 +5656,17 @@ static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
static const struct gl_function_remap GL_SGIX_async_functions[] = {
{ 3014, -1 }, /* AsyncMarkerSGIX */
{ 3997, -1 }, /* FinishAsyncSGIX */
- { 4703, -1 }, /* PollAsyncSGIX */
- { 19611, -1 }, /* DeleteAsyncMarkersSGIX */
- { 19640, -1 }, /* IsAsyncMarkerSGIX */
- { 28820, -1 }, /* GenAsyncMarkersSGIX */
+ { 4734, -1 }, /* PollAsyncSGIX */
+ { 19729, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 19758, -1 }, /* IsAsyncMarkerSGIX */
+ { 29038, -1 }, /* GenAsyncMarkersSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_flush_raster)
static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
- { 6382, -1 }, /* FlushRasterSGIX */
+ { 6413, -1 }, /* FlushRasterSGIX */
{ -1, -1 }
};
#endif
@@ -5621,36 +5675,36 @@ static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = {
{ 2410, -1 }, /* FragmentMaterialfvSGIX */
{ 2906, -1 }, /* FragmentLightModelivSGIX */
- { 4654, -1 }, /* FragmentLightiSGIX */
- { 5514, -1 }, /* GetFragmentMaterialfvSGIX */
- { 7102, -1 }, /* FragmentMaterialfSGIX */
- { 7263, -1 }, /* GetFragmentLightivSGIX */
- { 8100, -1 }, /* FragmentLightModeliSGIX */
- { 9434, -1 }, /* FragmentLightivSGIX */
- { 9671, -1 }, /* GetFragmentMaterialivSGIX */
- { 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 */
+ { 4685, -1 }, /* FragmentLightiSGIX */
+ { 5545, -1 }, /* GetFragmentMaterialfvSGIX */
+ { 7133, -1 }, /* FragmentMaterialfSGIX */
+ { 7294, -1 }, /* GetFragmentLightivSGIX */
+ { 8131, -1 }, /* FragmentLightModeliSGIX */
+ { 9494, -1 }, /* FragmentLightivSGIX */
+ { 9760, -1 }, /* GetFragmentMaterialivSGIX */
+ { 17108, -1 }, /* FragmentLightModelfSGIX */
+ { 17408, -1 }, /* FragmentColorMaterialSGIX */
+ { 17780, -1 }, /* FragmentMaterialiSGIX */
+ { 19001, -1 }, /* LightEnviSGIX */
+ { 20412, -1 }, /* FragmentLightModelfvSGIX */
+ { 20721, -1 }, /* FragmentLightfvSGIX */
+ { 25325, -1 }, /* FragmentLightfSGIX */
+ { 27954, -1 }, /* GetFragmentLightfvSGIX */
+ { 29521, -1 }, /* FragmentMaterialivSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_framezoom)
static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
- { 19663, -1 }, /* FrameZoomSGIX */
+ { 19781, -1 }, /* FrameZoomSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_igloo_interface)
static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
- { 25415, -1 }, /* IglooInterfaceSGIX */
+ { 25633, -1 }, /* IglooInterfaceSGIX */
{ -1, -1 }
};
#endif
@@ -5658,11 +5712,11 @@ static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
#if defined(need_GL_SGIX_instruments)
static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
{ 2573, -1 }, /* ReadInstrumentsSGIX */
- { 5590, -1 }, /* PollInstrumentsSGIX */
- { 9332, -1 }, /* GetInstrumentsSGIX */
- { 11345, -1 }, /* StartInstrumentsSGIX */
- { 14038, -1 }, /* StopInstrumentsSGIX */
- { 15644, -1 }, /* InstrumentsBufferSGIX */
+ { 5621, -1 }, /* PollInstrumentsSGIX */
+ { 9392, -1 }, /* GetInstrumentsSGIX */
+ { 11434, -1 }, /* StartInstrumentsSGIX */
+ { 14127, -1 }, /* StopInstrumentsSGIX */
+ { 15733, -1 }, /* InstrumentsBufferSGIX */
{ -1, -1 }
};
#endif
@@ -5671,10 +5725,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 */
- { 15559, -1 }, /* ListParameteriSGIX */
- { 16313, -1 }, /* ListParameterfvSGIX */
- { 18318, -1 }, /* ListParameterivSGIX */
- { 28864, -1 }, /* GetListParameterivSGIX */
+ { 15648, -1 }, /* ListParameteriSGIX */
+ { 16402, -1 }, /* ListParameterfvSGIX */
+ { 18407, -1 }, /* ListParameterivSGIX */
+ { 29082, -1 }, /* GetListParameterivSGIX */
{ -1, -1 }
};
#endif
@@ -5689,53 +5743,53 @@ static const struct gl_function_remap GL_SGIX_pixel_texture_functions[] = {
#if defined(need_GL_SGIX_polynomial_ffd)
static const struct gl_function_remap GL_SGIX_polynomial_ffd_functions[] = {
{ 3251, -1 }, /* LoadIdentityDeformationMapSGIX */
- { 10713, -1 }, /* DeformationMap3dSGIX */
- { 14138, -1 }, /* DeformSGIX */
- { 21419, -1 }, /* DeformationMap3fSGIX */
+ { 10802, -1 }, /* DeformationMap3dSGIX */
+ { 14227, -1 }, /* DeformSGIX */
+ { 21563, -1 }, /* DeformationMap3fSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_reference_plane)
static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
- { 12869, -1 }, /* ReferencePlaneSGIX */
+ { 12958, -1 }, /* ReferencePlaneSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGIX_sprite)
static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
- { 8487, -1 }, /* SpriteParameterfvSGIX */
- { 18146, -1 }, /* SpriteParameteriSGIX */
- { 23373, -1 }, /* SpriteParameterfSGIX */
- { 25979, -1 }, /* SpriteParameterivSGIX */
+ { 8547, -1 }, /* SpriteParameterfvSGIX */
+ { 18235, -1 }, /* SpriteParameteriSGIX */
+ { 23591, -1 }, /* SpriteParameterfSGIX */
+ { 26197, -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[] = {
- { 18205, -1 }, /* TagSampleBufferSGIX */
+ { 18294, -1 }, /* TagSampleBufferSGIX */
{ -1, -1 }
};
#endif
#if defined(need_GL_SGI_color_table)
static const struct gl_function_remap GL_SGI_color_table_functions[] = {
- { 6672, _gloffset_ColorTableParameteriv },
- { 7384, _gloffset_ColorTable },
- { 13365, _gloffset_GetColorTable },
- { 13475, _gloffset_CopyColorTable },
- { 16963, _gloffset_ColorTableParameterfv },
- { 20176, _gloffset_GetColorTableParameterfv },
- { 22126, _gloffset_GetColorTableParameteriv },
+ { 6703, _gloffset_ColorTableParameteriv },
+ { 7415, _gloffset_ColorTable },
+ { 13454, _gloffset_GetColorTable },
+ { 13564, _gloffset_CopyColorTable },
+ { 17052, _gloffset_ColorTableParameterfv },
+ { 20320, _gloffset_GetColorTableParameterfv },
+ { 22270, _gloffset_GetColorTableParameteriv },
{ -1, -1 }
};
#endif
#if defined(need_GL_SUNX_constant_data)
static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
- { 27714, -1 }, /* FinishTextureSUNX */
+ { 27932, -1 }, /* FinishTextureSUNX */
{ -1, -1 }
};
#endif
@@ -5743,20 +5797,20 @@ static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
#if defined(need_GL_SUN_global_alpha)
static const struct gl_function_remap GL_SUN_global_alpha_functions[] = {
{ 3035, -1 }, /* GlobalAlphaFactorubSUN */
- { 4193, -1 }, /* GlobalAlphaFactoriSUN */
- { 5615, -1 }, /* GlobalAlphaFactordSUN */
- { 8571, -1 }, /* GlobalAlphaFactoruiSUN */
- { 8923, -1 }, /* GlobalAlphaFactorbSUN */
- { 11660, -1 }, /* GlobalAlphaFactorfSUN */
- { 11779, -1 }, /* GlobalAlphaFactorusSUN */
- { 19902, -1 }, /* GlobalAlphaFactorsSUN */
+ { 4224, -1 }, /* GlobalAlphaFactoriSUN */
+ { 5646, -1 }, /* GlobalAlphaFactordSUN */
+ { 8631, -1 }, /* GlobalAlphaFactoruiSUN */
+ { 8983, -1 }, /* GlobalAlphaFactorbSUN */
+ { 11749, -1 }, /* GlobalAlphaFactorfSUN */
+ { 11868, -1 }, /* GlobalAlphaFactorusSUN */
+ { 20020, -1 }, /* GlobalAlphaFactorsSUN */
{ -1, -1 }
};
#endif
#if defined(need_GL_SUN_mesh_array)
static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
- { 25791, -1 }, /* DrawMeshArraysSUN */
+ { 26009, -1 }, /* DrawMeshArraysSUN */
{ -1, -1 }
};
#endif
@@ -5764,12 +5818,12 @@ static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
#if defined(need_GL_SUN_triangle_list)
static const struct gl_function_remap GL_SUN_triangle_list_functions[] = {
{ 3971, -1 }, /* ReplacementCodeubSUN */
- { 5454, -1 }, /* ReplacementCodeubvSUN */
- { 16684, -1 }, /* ReplacementCodeusvSUN */
- { 16872, -1 }, /* ReplacementCodePointerSUN */
- { 18229, -1 }, /* ReplacementCodeusSUN */
- { 18976, -1 }, /* ReplacementCodeuiSUN */
- { 26436, -1 }, /* ReplacementCodeuivSUN */
+ { 5485, -1 }, /* ReplacementCodeubvSUN */
+ { 16773, -1 }, /* ReplacementCodeusvSUN */
+ { 16961, -1 }, /* ReplacementCodePointerSUN */
+ { 18318, -1 }, /* ReplacementCodeusSUN */
+ { 19065, -1 }, /* ReplacementCodeuiSUN */
+ { 26654, -1 }, /* ReplacementCodeuivSUN */
{ -1, -1 }
};
#endif
@@ -5783,39 +5837,39 @@ static const struct gl_function_remap GL_SUN_vertex_functions[] = {
{ 1833, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */
{ 2346, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */
{ 2642, -1 }, /* Color4ubVertex3fvSUN */
- { 4074, -1 }, /* Color4ubVertex3fSUN */
- { 4150, -1 }, /* TexCoord2fVertex3fSUN */
- { 4449, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
- { 4779, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
- { 5349, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
- { 6419, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
- { 7131, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
- { 7899, -1 }, /* Color3fVertex3fSUN */
- { 8882, -1 }, /* Color3fVertex3fvSUN */
- { 9297, -1 }, /* Color4fNormal3fVertex3fvSUN */
- { 9969, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
- { 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 */
+ { 4105, -1 }, /* Color4ubVertex3fSUN */
+ { 4181, -1 }, /* TexCoord2fVertex3fSUN */
+ { 4480, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
+ { 4810, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
+ { 5380, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
+ { 6450, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
+ { 7162, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
+ { 7930, -1 }, /* Color3fVertex3fSUN */
+ { 8942, -1 }, /* Color3fVertex3fvSUN */
+ { 9357, -1 }, /* Color4fNormal3fVertex3fvSUN */
+ { 10058, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 11297, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 12689, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 13100, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 14152, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 14486, -1 }, /* Color4ubVertex2fvSUN */
+ { 14726, -1 }, /* Normal3fVertex3fSUN */
+ { 15674, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 15935, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 16602, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 17378, -1 }, /* Color4ubVertex2fSUN */
+ { 17571, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 19453, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 19800, -1 }, /* Normal3fVertex3fvSUN */
+ { 20229, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 21095, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 21315, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 23045, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 24300, -1 }, /* TexCoord4fVertex4fSUN */
+ { 24726, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 25052, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 25179, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 25881, -1 }, /* ReplacementCodeuiVertex3fSUN */
{ -1, -1 }
};
#endif
@@ -5826,37 +5880,37 @@ static const struct gl_function_remap GL_VERSION_1_3_functions[] = {
{ 381, _gloffset_MultiTexCoord3sARB },
{ 613, _gloffset_ActiveTextureARB },
{ 3761, _gloffset_MultiTexCoord1fvARB },
- { 5240, _gloffset_MultiTexCoord3dARB },
- { 5285, _gloffset_MultiTexCoord2iARB },
- { 5409, _gloffset_MultiTexCoord2svARB },
- { 7340, _gloffset_MultiTexCoord2fARB },
- { 9133, _gloffset_MultiTexCoord3fvARB },
- { 9625, _gloffset_MultiTexCoord4sARB },
- { 10225, _gloffset_MultiTexCoord2dvARB },
- { 10607, _gloffset_MultiTexCoord1svARB },
- { 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 },
+ { 5271, _gloffset_MultiTexCoord3dARB },
+ { 5316, _gloffset_MultiTexCoord2iARB },
+ { 5440, _gloffset_MultiTexCoord2svARB },
+ { 7371, _gloffset_MultiTexCoord2fARB },
+ { 9193, _gloffset_MultiTexCoord3fvARB },
+ { 9714, _gloffset_MultiTexCoord4sARB },
+ { 10314, _gloffset_MultiTexCoord2dvARB },
+ { 10696, _gloffset_MultiTexCoord1svARB },
+ { 10992, _gloffset_MultiTexCoord3svARB },
+ { 11053, _gloffset_MultiTexCoord4iARB },
+ { 11776, _gloffset_MultiTexCoord3iARB },
+ { 12478, _gloffset_MultiTexCoord1dARB },
+ { 12644, _gloffset_MultiTexCoord3dvARB },
+ { 13808, _gloffset_MultiTexCoord3ivARB },
+ { 13853, _gloffset_MultiTexCoord2sARB },
+ { 15073, _gloffset_MultiTexCoord4ivARB },
+ { 16702, _gloffset_ClientActiveTextureARB },
+ { 18918, _gloffset_MultiTexCoord2dARB },
+ { 19322, _gloffset_MultiTexCoord4dvARB },
+ { 19608, _gloffset_MultiTexCoord4fvARB },
+ { 20461, _gloffset_MultiTexCoord3fARB },
+ { 22798, _gloffset_MultiTexCoord4dARB },
+ { 23002, _gloffset_MultiTexCoord1sARB },
+ { 23204, _gloffset_MultiTexCoord1dvARB },
+ { 24046, _gloffset_MultiTexCoord1ivARB },
+ { 24139, _gloffset_MultiTexCoord2ivARB },
+ { 24478, _gloffset_MultiTexCoord1iARB },
+ { 25749, _gloffset_MultiTexCoord4svARB },
+ { 26267, _gloffset_MultiTexCoord1fARB },
+ { 26530, _gloffset_MultiTexCoord4fARB },
+ { 28759, _gloffset_MultiTexCoord2fvARB },
{ -1, -1 }
};
#endif
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index f439d4addb3..499b7330d0a 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -606,7 +606,7 @@ static struct ureg get_temp( struct texenv_fragment_program *p )
if (!bit) {
_mesa_problem(NULL, "%s: out of temporaries\n", __FILE__);
- _mesa_exit(1);
+ exit(1);
}
if ((GLuint) bit > p->program->Base.NumTemporaries)
@@ -634,7 +634,7 @@ static struct ureg get_tex_temp( struct texenv_fragment_program *p )
if (!bit) {
_mesa_problem(NULL, "%s: out of temporaries\n", __FILE__);
- _mesa_exit(1);
+ exit(1);
}
if ((GLuint) bit > p->program->Base.NumTemporaries)
@@ -1040,8 +1040,6 @@ static struct ureg emit_combine( struct texenv_fragment_program *p,
assert(nr <= MAX_COMBINER_TERMS);
- tmp = undef; /* silence warning (bug 5318) */
-
for (i = 0; i < nr; i++)
src[i] = emit_combine_source( p, mask, unit, opt[i].Source, opt[i].Operand );
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index be4e03bc56c..2ae839b2a63 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -210,7 +210,7 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
}
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param )
{
GLfloat p[4];
@@ -269,7 +269,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
-static void GLAPIENTRY
+void GLAPIENTRY
_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
{
struct gl_texture_unit *texUnit;
diff --git a/src/mesa/main/texgen.h b/src/mesa/main/texgen.h
index f6924ef7222..eb4626033a6 100644
--- a/src/mesa/main/texgen.h
+++ b/src/mesa/main/texgen.h
@@ -41,8 +41,14 @@ extern void GLAPIENTRY
_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
extern void GLAPIENTRY
+_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param );
+
+extern void GLAPIENTRY
_mesa_TexGeni( GLenum coord, GLenum pname, GLint param );
+extern void GLAPIENTRY
+_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
+
extern void
_mesa_init_texgen_dispatch(struct _glapi_table *disp);
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 0cc6a563a05..66d01c15d04 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -40,30 +40,6 @@
-#if FEATURE_EXT_texture_sRGB
-
-/**
- * Convert a float value from linear space to a
- * non-linear sRGB value in [0, 255].
- * Not terribly efficient.
- */
-static INLINE GLfloat
-linear_to_nonlinear(GLfloat cl)
-{
- /* can't have values outside [0, 1] */
- GLfloat cs;
- if (cl < 0.0031308f) {
- cs = 12.92f * cl;
- }
- else {
- cs = (GLfloat)(1.055 * _mesa_pow(cl, 0.41666) - 0.055);
- }
- return cs;
-}
-
-#endif /* FEATURE_EXT_texture_sRGB */
-
-
/**
* Can the given type represent negative values?
*/
@@ -231,6 +207,29 @@ get_tex_ycbcr(GLcontext *ctx, GLuint dimensions,
}
+#if FEATURE_EXT_texture_sRGB
+
+
+/**
+ * Convert a float value from linear space to a
+ * non-linear sRGB value in [0, 255].
+ * Not terribly efficient.
+ */
+static INLINE GLfloat
+linear_to_nonlinear(GLfloat cl)
+{
+ /* can't have values outside [0, 1] */
+ GLfloat cs;
+ if (cl < 0.0031308f) {
+ cs = 12.92f * cl;
+ }
+ else {
+ cs = (GLfloat)(1.055 * _mesa_pow(cl, 0.41666) - 0.055);
+ }
+ return cs;
+}
+
+
/**
* glGetTexImagefor sRGB pixels;
*/
@@ -282,6 +281,21 @@ get_tex_srgb(GLcontext *ctx, GLuint dimensions,
}
+#else /* FEATURE_EXT_texture_sRGB */
+
+
+static INLINE void
+get_tex_srgb(GLcontext *ctx, GLuint dimensions,
+ GLenum format, GLenum type, GLvoid *pixels,
+ const struct gl_texture_image *texImage)
+{
+ ASSERT_NO_FEATURE();
+}
+
+
+#endif /* FEATURE_EXT_texture_sRGB */
+
+
/**
* glGetTexImagefor RGBA, Luminance, etc. pixels.
* This is the slow way since we use texture sampling.
@@ -553,7 +567,8 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level,
_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);
+ (GLubyte *)texImage->Data + i * row_stride_stored,
+ row_stride);
}
}
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 7f6255747b0..9db95814d00 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -227,10 +227,10 @@ _mesa_copy_texture_object( struct gl_texture_object *dest,
dest->Target = src->Target;
dest->Name = src->Name;
dest->Priority = src->Priority;
- dest->BorderColor[0] = src->BorderColor[0];
- dest->BorderColor[1] = src->BorderColor[1];
- dest->BorderColor[2] = src->BorderColor[2];
- dest->BorderColor[3] = src->BorderColor[3];
+ dest->BorderColor.f[0] = src->BorderColor.f[0];
+ dest->BorderColor.f[1] = src->BorderColor.f[1];
+ dest->BorderColor.f[2] = src->BorderColor.f[2];
+ dest->BorderColor.f[3] = src->BorderColor.f[3];
dest->WrapS = src->WrapS;
dest->WrapT = src->WrapT;
dest->WrapR = src->WrapR;
@@ -939,7 +939,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 93c5d6c10d8..c4f24950187 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -77,17 +77,19 @@ validate_texture_wrap_mode(GLcontext * ctx, GLenum target, GLenum wrap)
/**
* Get current texture object for given target.
- * Return NULL if any error.
+ * Return NULL if any error (and record the error).
* Note that this is different from _mesa_select_tex_object() in that proxy
* targets are not accepted.
+ * Only the glGetTexLevelParameter() functions accept proxy targets.
*/
static struct gl_texture_object *
-get_texobj(GLcontext *ctx, GLenum target)
+get_texobj(GLcontext *ctx, GLenum target, GLboolean get)
{
struct gl_texture_unit *texUnit;
if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureImageUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(current unit)");
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "gl%sTexParameter(current unit)", get ? "Get" : "");
return NULL;
}
@@ -124,7 +126,8 @@ get_texobj(GLcontext *ctx, GLenum target)
;
}
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "gl%sTexParameter(target)", get ? "Get" : "");
return NULL;
}
@@ -507,10 +510,10 @@ set_tex_parameterf(GLcontext *ctx,
case GL_TEXTURE_BORDER_COLOR:
flush(ctx, texObj);
- texObj->BorderColor[RCOMP] = params[0];
- texObj->BorderColor[GCOMP] = params[1];
- texObj->BorderColor[BCOMP] = params[2];
- texObj->BorderColor[ACOMP] = params[3];
+ texObj->BorderColor.f[RCOMP] = params[0];
+ texObj->BorderColor.f[GCOMP] = params[1];
+ texObj->BorderColor.f[BCOMP] = params[2];
+ texObj->BorderColor.f[ACOMP] = params[3];
return GL_TRUE;
default:
@@ -528,7 +531,7 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- texObj = get_texobj(ctx, target);
+ texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
return;
@@ -576,7 +579,7 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- texObj = get_texobj(ctx, target);
+ texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
return;
@@ -634,7 +637,7 @@ _mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- texObj = get_texobj(ctx, target);
+ texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
return;
@@ -678,7 +681,7 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- texObj = get_texobj(ctx, target);
+ texObj = get_texobj(ctx, target, GL_FALSE);
if (!texObj)
return;
@@ -727,6 +730,68 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
}
+/**
+ * Set tex parameter to integer value(s). Primarily intended to set
+ * integer-valued texture border color (for integer-valued textures).
+ * New in GL 3.0.
+ */
+void GLAPIENTRY
+_mesa_TexParameterIiv(GLenum target, GLenum pname, const GLint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ texObj = get_texobj(ctx, target, GL_FALSE);
+ if (!texObj)
+ return;
+
+ switch (pname) {
+ case GL_TEXTURE_BORDER_COLOR:
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ /* set the integer-valued border color */
+ COPY_4V(texObj->BorderColor.i, params);
+ break;
+ default:
+ _mesa_TexParameteriv(target, pname, params);
+ break;
+ }
+ /* XXX no driver hook for TexParameterIiv() yet */
+}
+
+
+/**
+ * Set tex parameter to unsigned integer value(s). Primarily intended to set
+ * uint-valued texture border color (for integer-valued textures).
+ * New in GL 3.0
+ */
+void GLAPIENTRY
+_mesa_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ texObj = get_texobj(ctx, target, GL_FALSE);
+ if (!texObj)
+ return;
+
+ switch (pname) {
+ case GL_TEXTURE_BORDER_COLOR:
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ /* set the unsigned integer-valued border color */
+ COPY_4V(texObj->BorderColor.ui, params);
+ break;
+ default:
+ _mesa_TexParameteriv(target, pname, (const GLint *) params);
+ break;
+ }
+ /* XXX no driver hook for TexParameterIuiv() yet */
+}
+
+
+
+
void GLAPIENTRY
_mesa_GetTexLevelParameterfv( GLenum target, GLint level,
GLenum pname, GLfloat *params )
@@ -977,25 +1042,14 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
void GLAPIENTRY
_mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *obj;
GLboolean error = GL_FALSE;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureImageUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetTexParameterfv(current unit)");
+ obj = get_texobj(ctx, target, GL_TRUE);
+ if (!obj)
return;
- }
-
- texUnit = _mesa_get_current_tex_unit(ctx);
-
- obj = _mesa_select_tex_object(ctx, texUnit, target);
- if (!obj) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(target)");
- return;
- }
_mesa_lock_texture(ctx, obj);
switch (pname) {
@@ -1015,10 +1069,10 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
*params = ENUM_TO_FLOAT(obj->WrapR);
break;
case GL_TEXTURE_BORDER_COLOR:
- params[0] = CLAMP(obj->BorderColor[0], 0.0F, 1.0F);
- params[1] = CLAMP(obj->BorderColor[1], 0.0F, 1.0F);
- params[2] = CLAMP(obj->BorderColor[2], 0.0F, 1.0F);
- params[3] = CLAMP(obj->BorderColor[3], 0.0F, 1.0F);
+ params[0] = CLAMP(obj->BorderColor.f[0], 0.0F, 1.0F);
+ params[1] = CLAMP(obj->BorderColor.f[1], 0.0F, 1.0F);
+ params[2] = CLAMP(obj->BorderColor.f[2], 0.0F, 1.0F);
+ params[3] = CLAMP(obj->BorderColor.f[3], 0.0F, 1.0F);
break;
case GL_TEXTURE_RESIDENT:
{
@@ -1144,25 +1198,14 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
void GLAPIENTRY
_mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
{
- struct gl_texture_unit *texUnit;
struct gl_texture_object *obj;
GLboolean error = GL_FALSE;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureImageUnits) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetTexParameteriv(current unit)");
- return;
- }
-
- texUnit = _mesa_get_current_tex_unit(ctx);
-
- obj = _mesa_select_tex_object(ctx, texUnit, target);
- if (!obj) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(target)");
- return;
- }
+ obj = get_texobj(ctx, target, GL_TRUE);
+ if (!obj)
+ return;
_mesa_lock_texture(ctx, obj);
switch (pname) {
@@ -1184,10 +1227,10 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
case GL_TEXTURE_BORDER_COLOR:
{
GLfloat b[4];
- b[0] = CLAMP(obj->BorderColor[0], 0.0F, 1.0F);
- b[1] = CLAMP(obj->BorderColor[1], 0.0F, 1.0F);
- b[2] = CLAMP(obj->BorderColor[2], 0.0F, 1.0F);
- b[3] = CLAMP(obj->BorderColor[3], 0.0F, 1.0F);
+ b[0] = CLAMP(obj->BorderColor.f[0], 0.0F, 1.0F);
+ b[1] = CLAMP(obj->BorderColor.f[1], 0.0F, 1.0F);
+ b[2] = CLAMP(obj->BorderColor.f[2], 0.0F, 1.0F);
+ b[3] = CLAMP(obj->BorderColor.f[3], 0.0F, 1.0F);
params[0] = FLOAT_TO_INT(b[0]);
params[1] = FLOAT_TO_INT(b[1]);
params[2] = FLOAT_TO_INT(b[2]);
@@ -1315,3 +1358,53 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
_mesa_unlock_texture(ctx, obj);
}
+
+
+/** New in GL 3.0 */
+void GLAPIENTRY
+_mesa_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ texObj = get_texobj(ctx, target, GL_TRUE);
+
+ switch (pname) {
+ case GL_TEXTURE_BORDER_COLOR:
+ COPY_4V(params, texObj->BorderColor.i);
+ break;
+ default:
+ _mesa_GetTexParameteriv(target, pname, params);
+ }
+}
+
+
+/** New in GL 3.0 */
+void GLAPIENTRY
+_mesa_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ texObj = get_texobj(ctx, target, GL_TRUE);
+
+ switch (pname) {
+ case GL_TEXTURE_BORDER_COLOR:
+ COPY_4V(params, texObj->BorderColor.i);
+ break;
+ default:
+ {
+ GLint ip[4];
+ _mesa_GetTexParameteriv(target, pname, ip);
+ params[0] = ip[0];
+ if (pname == GL_TEXTURE_SWIZZLE_RGBA_EXT ||
+ pname == GL_TEXTURE_CROP_RECT_OES) {
+ params[1] = ip[1];
+ params[2] = ip[2];
+ params[3] = ip[3];
+ }
+ }
+ }
+}
diff --git a/src/mesa/main/texparam.h b/src/mesa/main/texparam.h
index 454b96350ee..19b4116c0b6 100644
--- a/src/mesa/main/texparam.h
+++ b/src/mesa/main/texparam.h
@@ -44,6 +44,11 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params );
extern void GLAPIENTRY
_mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params );
+extern void GLAPIENTRY
+_mesa_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params);
+
+extern void GLAPIENTRY
+_mesa_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params);
extern void GLAPIENTRY
@@ -60,4 +65,11 @@ extern void GLAPIENTRY
_mesa_TexParameteriv( GLenum target, GLenum pname, const GLint *params );
+extern void GLAPIENTRY
+_mesa_TexParameterIiv(GLenum target, GLenum pname, const GLint *params);
+
+extern void GLAPIENTRY
+_mesa_TexParameterIuiv(GLenum target, GLenum pname, const GLuint *params);
+
+
#endif /* TEXPARAM_H */
diff --git a/src/mesa/main/texrender.c b/src/mesa/main/texrender.c
index e2432be6ca4..cf603d46d86 100644
--- a/src/mesa/main/texrender.c
+++ b/src/mesa/main/texrender.c
@@ -467,7 +467,6 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
{
struct texture_renderbuffer *trb
= (struct texture_renderbuffer *) att->Renderbuffer;
- gl_format texFormat;
(void) ctx;
ASSERT(trb);
@@ -490,8 +489,6 @@ update_wrapper(GLcontext *ctx, const struct gl_renderbuffer_attachment *att)
trb->Zoffset = att->Zoffset;
}
- texFormat = trb->TexImage->TexFormat;
-
trb->Base.Width = trb->TexImage->Width;
trb->Base.Height = trb->TexImage->Height;
trb->Base.InternalFormat = trb->TexImage->InternalFormat;
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index c2193074cdf..0b6295d5e16 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -121,6 +121,9 @@ _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = size * sizeof(GLfixed);
@@ -174,6 +177,9 @@ _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr )
case GL_DOUBLE:
elementSize = 3 * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = 3 * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = 3 * sizeof(GLfixed);
@@ -250,6 +256,9 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr)
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = size * sizeof(GLfixed);
@@ -285,6 +294,9 @@ _mesa_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr)
case GL_DOUBLE:
elementSize = sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = sizeof(GLhalfARB);
+ break;
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glFogCoordPointer(type)" );
return;
@@ -394,6 +406,9 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type,
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glSecondaryColorPointer(type=%s)",
_mesa_lookup_enum_by_nr(type));
@@ -441,6 +456,9 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = size * sizeof(GLfixed);
@@ -670,6 +688,9 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type,
case GL_DOUBLE:
elementSize = size * sizeof(GLdouble);
break;
+ case GL_HALF_FLOAT:
+ elementSize = size * sizeof(GLhalfARB);
+ break;
#if FEATURE_fixedpt
case GL_FIXED:
elementSize = size * sizeof(GLfixed);
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
new file mode 100644
index 00000000000..9d23c577bd1
--- /dev/null
+++ b/src/mesa/main/version.c
@@ -0,0 +1,130 @@
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "context.h"
+#include "version.h"
+
+
+
+/**
+ * Examine enabled GL extensions to determine GL version.
+ * Return major and minor version numbers.
+ */
+static void
+compute_version(const GLcontext *ctx, GLuint *major, GLuint *minor)
+{
+ const GLboolean ver_1_3 = (ctx->Extensions.ARB_multisample &&
+ ctx->Extensions.ARB_multitexture &&
+ ctx->Extensions.ARB_texture_border_clamp &&
+ ctx->Extensions.ARB_texture_compression &&
+ ctx->Extensions.ARB_texture_cube_map &&
+ ctx->Extensions.EXT_texture_env_add &&
+ ctx->Extensions.ARB_texture_env_combine &&
+ ctx->Extensions.ARB_texture_env_dot3);
+ const GLboolean ver_1_4 = (ver_1_3 &&
+ ctx->Extensions.ARB_depth_texture &&
+ ctx->Extensions.ARB_shadow &&
+ ctx->Extensions.ARB_texture_env_crossbar &&
+ ctx->Extensions.ARB_texture_mirrored_repeat &&
+ ctx->Extensions.ARB_window_pos &&
+ ctx->Extensions.EXT_blend_color &&
+ ctx->Extensions.EXT_blend_func_separate &&
+ ctx->Extensions.EXT_blend_minmax &&
+ ctx->Extensions.EXT_blend_subtract &&
+ ctx->Extensions.EXT_fog_coord &&
+ ctx->Extensions.EXT_multi_draw_arrays &&
+ ctx->Extensions.EXT_point_parameters &&
+ ctx->Extensions.EXT_secondary_color &&
+ ctx->Extensions.EXT_stencil_wrap &&
+ ctx->Extensions.EXT_texture_lod_bias &&
+ ctx->Extensions.SGIS_generate_mipmap);
+ const GLboolean ver_1_5 = (ver_1_4 &&
+ ctx->Extensions.ARB_occlusion_query &&
+ ctx->Extensions.ARB_vertex_buffer_object &&
+ ctx->Extensions.EXT_shadow_funcs);
+ const GLboolean ver_2_0 = (ver_1_5 &&
+ ctx->Extensions.ARB_draw_buffers &&
+ ctx->Extensions.ARB_point_sprite &&
+ ctx->Extensions.ARB_shader_objects &&
+ ctx->Extensions.ARB_vertex_shader &&
+ ctx->Extensions.ARB_fragment_shader &&
+ ctx->Extensions.ARB_texture_non_power_of_two &&
+ ctx->Extensions.EXT_blend_equation_separate &&
+
+ /* Technically, 2.0 requires the functionality
+ * of the EXT version. Enable 2.0 if either
+ * extension is available, and assume that a
+ * driver that only exposes the ATI extension
+ * will fallback to software when necessary.
+ */
+ (ctx->Extensions.EXT_stencil_two_side
+ || ctx->Extensions.ATI_separate_stencil));
+ const GLboolean ver_2_1 = (ver_2_0 &&
+ ctx->Extensions.ARB_shading_language_120 &&
+ ctx->Extensions.EXT_pixel_buffer_object &&
+ ctx->Extensions.EXT_texture_sRGB);
+ if (ver_2_1) {
+ *major = 2;
+ *minor = 1;
+ }
+ else if (ver_2_0) {
+ *major = 2;
+ *minor = 0;
+ }
+ else if (ver_1_5) {
+ *major = 1;
+ *minor = 5;
+ }
+ else if (ver_1_4) {
+ *major = 1;
+ *minor = 4;
+ }
+ else if (ver_1_3) {
+ *major = 1;
+ *minor = 3;
+ }
+ else {
+ *major = 1;
+ *minor = 2;
+ }
+}
+
+
+/**
+ * Set the context's VersionMajor, VersionMinor, VersionString fields.
+ * This should only be called once as part of context initialization.
+ */
+void
+_mesa_compute_version(GLcontext *ctx)
+{
+ static const int max = 100;
+
+ compute_version(ctx, &ctx->VersionMajor, &ctx->VersionMinor);
+
+ ctx->VersionString = (char *) _mesa_malloc(max);
+ if (ctx->VersionString) {
+ _mesa_snprintf(ctx->VersionString, max, "%u.%u Mesa " MESA_VERSION_STRING,
+ ctx->VersionMajor, ctx->VersionMinor);
+ }
+}
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 1c5749fbcaf..d521569f8d3 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,9 +1,9 @@
/*
* Mesa 3-D graphics library
- * Version: 7.7.1
+ * Version: 7.8
*
* Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
- * Copyright (C) 2009-2010 VMware, Inc. All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -28,11 +28,14 @@
#define VERSION_H
+#include "mtypes.h"
+
+
/* Mesa version */
#define MESA_MAJOR 7
-#define MESA_MINOR 7
-#define MESA_PATCH 1
-#define MESA_VERSION_STRING "7.7.1-DEVEL"
+#define MESA_MINOR 8
+#define MESA_PATCH 0
+#define MESA_VERSION_STRING "7.8-devel"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
@@ -50,4 +53,8 @@
#define OPENGL_VERSION_CODE OPENGL_VERSION(OPENGL_MAJOR, OPENGL_MINOR, OPENGL_PATCH)
+extern void
+_mesa_compute_version(GLcontext *ctx);
+
+
#endif /* VERSION_H */
diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c
index 89c632e7d59..f9b26d80471 100644
--- a/src/mesa/math/m_debug_norm.c
+++ b/src/mesa/math/m_debug_norm.c
@@ -230,7 +230,7 @@ static int test_norm_function( normal_func func, int mtype, long *cycles )
case VAR:
break;
default:
- _mesa_exit(1);
+ exit(1);
}
}
}
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index a33f5100db9..bdd26b7f3a7 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -121,6 +121,8 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target,
case OPTION_FOG_LINEAR: program->FogOption = GL_LINEAR; break;
default: program->FogOption = GL_NONE; break;
}
+ program->OriginUpperLeft = state.option.OriginUpperLeft;
+ program->PixelCenterInteger = state.option.PixelCenterInteger;
program->UsesKill = state.fragment.UsesKill;
diff --git a/src/mesa/shader/arbprogram.c b/src/mesa/shader/arbprogram.c
index 3cb26109508..746138071ed 100644
--- a/src/mesa/shader/arbprogram.c
+++ b/src/mesa/shader/arbprogram.c
@@ -180,23 +180,24 @@ _mesa_DeletePrograms(GLsizei n, const GLuint *ids)
}
else if (prog) {
/* Unbind program if necessary */
- if (prog->Target == GL_VERTEX_PROGRAM_ARB || /* == GL_VERTEX_PROGRAM_NV */
- prog->Target == GL_VERTEX_STATE_PROGRAM_NV) {
+ switch (prog->Target) {
+ case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
+ case GL_VERTEX_STATE_PROGRAM_NV:
if (ctx->VertexProgram.Current &&
ctx->VertexProgram.Current->Base.Id == ids[i]) {
/* unbind this currently bound program */
_mesa_BindProgram(prog->Target, 0);
}
- }
- else if (prog->Target == GL_FRAGMENT_PROGRAM_NV ||
- prog->Target == GL_FRAGMENT_PROGRAM_ARB) {
+ break;
+ case GL_FRAGMENT_PROGRAM_NV:
+ case GL_FRAGMENT_PROGRAM_ARB:
if (ctx->FragmentProgram.Current &&
ctx->FragmentProgram.Current->Base.Id == ids[i]) {
/* unbind this currently bound program */
_mesa_BindProgram(prog->Target, 0);
}
- }
- else {
+ break;
+ default:
_mesa_problem(ctx, "bad target in glDeleteProgramsNV");
return;
}
@@ -608,7 +609,6 @@ _mesa_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
- GLint i;
GLfloat * dest;
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -639,11 +639,7 @@ _mesa_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
return;
}
- for ( i = 0 ; i < count ; i++ ) {
- COPY_4V(dest, params);
- params += 4;
- dest += 4;
- }
+ memcpy(dest, params, count * 4 * sizeof(GLfloat));
}
@@ -756,8 +752,7 @@ _mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
- struct gl_program *prog;
- GLint i;
+ GLfloat *dest;
ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_PROGRAM_CONSTANTS);
@@ -772,7 +767,7 @@ _mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
_mesa_error(ctx, GL_INVALID_VALUE, "glProgramLocalParameters4fvEXT(index + count)");
return;
}
- prog = &(ctx->FragmentProgram.Current->Base);
+ dest = ctx->FragmentProgram.Current->Base.LocalParams[index];
}
else if (target == GL_VERTEX_PROGRAM_ARB
&& ctx->Extensions.ARB_vertex_program) {
@@ -780,18 +775,14 @@ _mesa_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
_mesa_error(ctx, GL_INVALID_VALUE, "glProgramLocalParameters4fvEXT(index + count)");
return;
}
- prog = &(ctx->VertexProgram.Current->Base);
+ dest = ctx->VertexProgram.Current->Base.LocalParams[index];
}
else {
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramLocalParameters4fvEXT(target)");
return;
}
- for (i = 0; i < count; i++) {
- ASSERT((index + i) < MAX_PROGRAM_LOCAL_PARAMS);
- COPY_4V(prog->LocalParams[index + i], params);
- params += 4;
- }
+ memcpy(dest, params, count * 4 * sizeof(GLfloat));
}
diff --git a/src/mesa/shader/atifragshader.c b/src/mesa/shader/atifragshader.c
index ac087d415c5..e04a05b22ff 100644
--- a/src/mesa/shader/atifragshader.c
+++ b/src/mesa/shader/atifragshader.c
@@ -290,9 +290,11 @@ _mesa_DeleteFragmentShaderATI(GLuint id)
/* The ID is immediately available for re-use now */
_mesa_HashRemove(ctx->Shared->ATIShaders, id);
- prog->RefCount--;
- if (prog->RefCount <= 0) {
- _mesa_free(prog);
+ if (prog) {
+ prog->RefCount--;
+ if (prog->RefCount <= 0) {
+ _mesa_free(prog);
+ }
}
}
}
diff --git a/src/mesa/shader/descrip.mms b/src/mesa/shader/descrip.mms
index 19bafd48302..59730020d0c 100644
--- a/src/mesa/shader/descrip.mms
+++ b/src/mesa/shader/descrip.mms
@@ -16,7 +16,7 @@
VPATH = RCS
-INCDIR = [---.include],[.grammar],[-.main],[-.glapi],[.slang]
+INCDIR = [---.include],[-.main],[-.glapi],[.slang]
LIBDIR = [---.lib]
CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1,"__extension__=")/name=(as_is,short)/float=ieee/ieee=denorm
@@ -64,8 +64,6 @@ all :
$(MMS)$(MMSQUALIFIERS) $(LIBDIR)$(GL_LIB)
set def [.slang]
$(MMS)$(MMSQUALIFIERS)
- set def [-.grammar]
- $(MMS)$(MMSQUALIFIERS)
set def [-]
# Make the library
diff --git a/src/mesa/shader/grammar/grammar.c b/src/mesa/shader/grammar/grammar.c
deleted file mode 100644
index a9775961d3a..00000000000
--- a/src/mesa/shader/grammar/grammar.c
+++ /dev/null
@@ -1,3178 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.6
- *
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file grammar.c
- * syntax parsing engine
- * \author Michal Krol
- */
-
-#ifndef GRAMMAR_PORT_BUILD
-#error Do not build this file directly, build your grammar_XXX.c instead, which includes this file
-#endif
-
-/*
-*/
-
-/*
- INTRODUCTION
- ------------
-
- The task is to check the syntax of an input string. Input string is a stream of ASCII
- characters terminated with a null-character ('\0'). Checking it using C language is
- difficult and hard to implement without bugs. It is hard to maintain and make changes when
- the syntax changes.
-
- This is because of a high redundancy of the C code. Large blocks of code are duplicated with
- only small changes. Even use of macros does not solve the problem because macros cannot
- erase the complexity of the problem.
-
- The resolution is to create a new language that will be highly oriented to our task. Once
- we describe a particular syntax, we are done. We can then focus on the code that implements
- the language. The size and complexity of it is relatively small than the code that directly
- checks the syntax.
-
- First, we must implement our new language. Here, the language is implemented in C, but it
- could also be implemented in any other language. The code is listed below. We must take
- a good care that it is bug free. This is simple because the code is simple and clean.
-
- Next, we must describe the syntax of our new language in itself. Once created and checked
- manually that it is correct, we can use it to check another scripts.
-
- Note that our new language loading code does not have to check the syntax. It is because we
- assume that the script describing itself is correct, and other scripts can be syntactically
- checked by the former script. The loading code must only do semantic checking which leads us to
- simple resolving references.
-
- THE LANGUAGE
- ------------
-
- Here I will describe the syntax of the new language (further called "Synek"). It is mainly a
- sequence of declarations terminated by a semicolon. The declaration consists of a symbol,
- which is an identifier, and its definition. A definition is in turn a sequence of specifiers
- connected with ".and" or ".or" operator. These operators cannot be mixed together in a one
- definition. Specifier can be a symbol, string, character, character range or a special
- keyword ".true" or ".false".
-
- On the very beginning of the script there is a declaration of a root symbol and is in the form:
- .syntax <root_symbol>;
- The <root_symbol> must be on of the symbols in declaration sequence. The syntax is correct if
- the root symbol evaluates to true. A symbol evaluates to true if the definition associated with
- the symbol evaluates to true. Definition evaluation depends on the operator used to connect
- specifiers in the definition. If ".and" operator is used, definition evaluates to true if and
- only if all the specifiers evaluate to true. If ".or" operator is used, definition evalutes to
- true if any of the specifiers evaluates to true. If definition contains only one specifier,
- it is evaluated as if it was connected with ".true" keyword by ".and" operator.
-
- If specifier is a ".true" keyword, it always evaluates to true.
-
- If specifier is a ".false" keyword, it always evaluates to false. Specifier evaluates to false
- when it does not evaluate to true.
-
- Character range specifier is in the form:
- '<first_character>' - '<second_character>'
- If specifier is a character range, it evaluates to true if character in the stream is greater
- or equal to <first_character> and less or equal to <second_character>. In that situation
- the stream pointer is advanced to point to next character in the stream. All C-style escape
- sequences are supported although trigraph sequences are not. The comparisions are performed
- on 8-bit unsigned integers.
-
- Character specifier is in the form:
- '<single_character>'
- It evaluates to true if the following character range specifier evaluates to true:
- '<single_character>' - '<single_character>'
-
- String specifier is in the form:
- "<string>"
- Let N be the number of characters in <string>. Let <string>[i] designate i-th character in
- <string>. Then the string specifier evaluates to true if and only if for i in the range [0, N)
- the following character specifier evaluates to true:
- '<string>[i]'
- If <string>[i] is a quotation mark, '<string>[i]' is replaced with '\<string>[i]'.
-
- Symbol specifier can be optionally preceded by a ".loop" keyword in the form:
- .loop <symbol> (1)
- where <symbol> is defined as follows:
- <symbol> <definition>; (2)
- Construction (1) is replaced by the following code:
- <symbol$1>
- and declaration (2) is replaced by the following:
- <symbol$1> <symbol$2> .or .true;
- <symbol$2> <symbol> .and <symbol$1>;
- <symbol> <definition>;
-
- Synek supports also a register mechanizm. User can, in its SYN file, declare a number of
- registers that can be accessed in the syn body. Each reg has its name and a default value.
- The register is one byte wide. The C code can change the default value by calling
- grammar_set_reg8() with grammar id, register name and a new value. As we know, each rule is
- a sequence of specifiers joined with .and or .or operator. And now each specifier can be
- prefixed with a condition expression in a form ".if (<reg_name> <operator> <hex_literal>)"
- where <operator> can be == or !=. If the condition evaluates to false, the specifier
- evaluates to .false. Otherwise it evalutes to the specifier.
-
- ESCAPE SEQUENCES
- ----------------
-
- Synek supports all escape sequences in character specifiers. The mapping table is listed below.
- All occurences of the characters in the first column are replaced with the corresponding
- character in the second column.
-
- Escape sequence Represents
- ------------------------------------------------------------------------------------------------
- \a Bell (alert)
- \b Backspace
- \f Formfeed
- \n New line
- \r Carriage return
- \t Horizontal tab
- \v Vertical tab
- \' Single quotation mark
- \" Double quotation mark
- \\ Backslash
- \? Literal question mark
- \ooo ASCII character in octal notation
- \xhhh ASCII character in hexadecimal notation
- ------------------------------------------------------------------------------------------------
-
- RAISING ERRORS
- --------------
-
- Any specifier can be followed by a special construction that is executed when the specifier
- evaluates to false. The construction is in the form:
- .error <ERROR_TEXT>
- <ERROR_TEXT> is an identifier declared earlier by error text declaration. The declaration is
- in the form:
- .errtext <ERROR_TEXT> "<error_desc>"
- When specifier evaluates to false and this construction is present, parsing is stopped
- immediately and <error_desc> is returned as a result of parsing. The error position is also
- returned and it is meant as an offset from the beggining of the stream to the character that
- was valid so far. Example:
-
- (**** syntax script ****)
-
- .syntax program;
- .errtext MISSING_SEMICOLON "missing ';'"
- program declaration .and .loop space .and ';' .error MISSING_SEMICOLON .and
- .loop space .and '\0';
- declaration "declare" .and .loop space .and identifier;
- space ' ';
-
- (**** sample code ****)
-
- declare foo ,
-
- In the example above checking the sample code will result in error message "missing ';'" and
- error position 12. The sample code is not correct. Note the presence of '\0' specifier to
- assure that there is no code after semicolon - only spaces.
- <error_desc> can optionally contain identifier surrounded by dollar signs $. In such a case,
- the identifier and dollar signs are replaced by a string retrieved by invoking symbol with
- the identifier name. The starting position is the error position. The lenght of the resulting
- string is the position after invoking the symbol.
-
- PRODUCTION
- ----------
-
- Synek not only checks the syntax but it can also produce (emit) bytes associated with specifiers
- that evaluate to true. That is, every specifier and optional error construction can be followed
- by a number of emit constructions that are in the form:
- .emit <parameter>
- <paramater> can be a HEX number, identifier, a star * or a dollar $. HEX number is preceded by
- 0x or 0X. If <parameter> is an identifier, it must be earlier declared by emit code declaration
- in the form:
- .emtcode <identifier> <hex_number>
-
- When given specifier evaluates to true, all emits associated with the specifier are output
- in order they were declared. A star means that last-read character should be output instead
- of constant value. Example:
-
- (**** syntax script ****)
-
- .syntax foobar;
- .emtcode WORD_FOO 0x01
- .emtcode WORD_BAR 0x02
- foobar FOO .emit WORD_FOO .or BAR .emit WORD_BAR .or .true .emit 0x00;
- FOO "foo" .and SPACE;
- BAR "bar" .and SPACE;
- SPACE ' ' .or '\0';
-
- (**** sample text 1 ****)
-
- foo
-
- (**** sample text 2 ****)
-
- foobar
-
- For both samples the result will be one-element array. For first sample text it will be
- value 1, for second - 0. Note that every text will be accepted because of presence of
- .true as an alternative.
-
- Another example:
-
- (**** syntax script ****)
-
- .syntax declaration;
- .emtcode VARIABLE 0x01
- declaration "declare" .and .loop space .and
- identifier .emit VARIABLE .and (1)
- .true .emit 0x00 .and (2)
- .loop space .and ';';
- space ' ' .or '\t';
- identifier .loop id_char .emit *; (3)
- id_char 'a'-'z' .or 'A'-'Z' .or '_';
-
- (**** sample code ****)
-
- declare fubar;
-
- In specifier (1) symbol <identifier> is followed by .emit VARIABLE. If it evaluates to
- true, VARIABLE constant and then production of the symbol is output. Specifier (2) is used
- to terminate the string with null to signal when the string ends. Specifier (3) outputs
- all characters that make declared identifier. The result of sample code will be the
- following array:
- { 1, 'f', 'u', 'b', 'a', 'r', 0 }
-
- If .emit is followed by dollar $, it means that current position should be output. Current
- position is a 32-bit unsigned integer distance from the very beginning of the parsed string to
- first character consumed by the specifier associated with the .emit instruction. Current
- position is stored in the output buffer in Little-Endian convention (the lowest byte comes
- first).
-*/
-
-#include <stdio.h>
-
-static void mem_free (void **);
-
-/*
- internal error messages
-*/
-static const byte *OUT_OF_MEMORY = (byte *) "internal error 1001: out of physical memory";
-static const byte *UNRESOLVED_REFERENCE = (byte *) "internal error 1002: unresolved reference '$'";
-static const byte *INVALID_GRAMMAR_ID = (byte *) "internal error 1003: invalid grammar object";
-static const byte *INVALID_REGISTER_NAME = (byte *) "internal error 1004: invalid register name: '$'";
-/*static const byte *DUPLICATE_IDENTIFIER = (byte *) "internal error 1005: identifier '$' already defined";*/
-static const byte *UNREFERENCED_IDENTIFIER =(byte *) "internal error 1006: unreferenced identifier '$'";
-
-static const byte *error_message = NULL; /* points to one of the error messages above */
-static byte *error_param = NULL; /* this is inserted into error_message in place of $ */
-static int error_position = -1;
-
-static byte *unknown = (byte *) "???";
-
-static void clear_last_error (void)
-{
- /* reset error message */
- error_message = NULL;
-
- /* free error parameter - if error_param is a "???" don't free it - it's static */
- if (error_param != unknown)
- mem_free ((void **) (void *) &error_param);
- else
- error_param = NULL;
-
- /* reset error position */
- error_position = -1;
-}
-
-static void set_last_error (const byte *msg, byte *param, int pos)
-{
- /* error message can be set only once */
- if (error_message != NULL)
- {
- mem_free ((void **) (void *) &param);
- return;
- }
-
- error_message = msg;
-
- /* if param is NULL, set error_param to unknown ("???") */
- /* note: do not try to strdup the "???" - it may be that we are here because of */
- /* out of memory error so strdup can fail */
- if (param != NULL)
- error_param = param;
- else
- error_param = unknown;
-
- error_position = pos;
-}
-
-/*
- memory management routines
-*/
-static void *mem_alloc (size_t size)
-{
- void *ptr = grammar_alloc_malloc (size);
- if (ptr == NULL)
- set_last_error (OUT_OF_MEMORY, NULL, -1);
- return ptr;
-}
-
-static void *mem_copy (void *dst, const void *src, size_t size)
-{
- return grammar_memory_copy (dst, src, size);
-}
-
-static void mem_free (void **ptr)
-{
- grammar_alloc_free (*ptr);
- *ptr = NULL;
-}
-
-static void *mem_realloc (void *ptr, size_t old_size, size_t new_size)
-{
- void *ptr2 = grammar_alloc_realloc (ptr, old_size, new_size);
- if (ptr2 == NULL)
- set_last_error (OUT_OF_MEMORY, NULL, -1);
- return ptr2;
-}
-
-static byte *str_copy_n (byte *dst, const byte *src, size_t max_len)
-{
- return grammar_string_copy_n (dst, src, max_len);
-}
-
-static byte *str_duplicate (const byte *str)
-{
- byte *new_str = grammar_string_duplicate (str);
- if (new_str == NULL)
- set_last_error (OUT_OF_MEMORY, NULL, -1);
- return new_str;
-}
-
-static int str_equal (const byte *str1, const byte *str2)
-{
- return grammar_string_compare (str1, str2) == 0;
-}
-
-static int str_equal_n (const byte *str1, const byte *str2, unsigned int n)
-{
- return grammar_string_compare_n (str1, str2, n) == 0;
-}
-
-static int
-str_length (const byte *str)
-{
- return (int) (grammar_string_length (str));
-}
-
-/*
- useful macros
-*/
-#define GRAMMAR_IMPLEMENT_LIST_APPEND(_Ty)\
- static void _Ty##_append (_Ty **x, _Ty *nx) {\
- while (*x) x = &(**x).next;\
- *x = nx;\
- }
-
-/*
- string to byte map typedef
-*/
-typedef struct map_byte_
-{
- byte *key;
- byte data;
- struct map_byte_ *next;
-} map_byte;
-
-static void map_byte_create (map_byte **ma)
-{
- *ma = (map_byte *) mem_alloc (sizeof (map_byte));
- if (*ma)
- {
- (**ma).key = NULL;
- (**ma).data = '\0';
- (**ma).next = NULL;
- }
-}
-
-static void map_byte_destroy (map_byte **ma)
-{
- if (*ma)
- {
- map_byte_destroy (&(**ma).next);
- mem_free ((void **) &(**ma).key);
- mem_free ((void **) ma);
- }
-}
-
-GRAMMAR_IMPLEMENT_LIST_APPEND(map_byte)
-
-/*
- searches the map for the specified key,
- returns pointer to the element with the specified key if it exists
- returns NULL otherwise
-*/
-static map_byte *map_byte_locate (map_byte **ma, const byte *key)
-{
- while (*ma)
- {
- if (str_equal ((**ma).key, key))
- return *ma;
-
- ma = &(**ma).next;
- }
-
- set_last_error (UNRESOLVED_REFERENCE, str_duplicate (key), -1);
- return NULL;
-}
-
-/*
- searches the map for specified key,
- if the key is matched, *data is filled with data associated with the key,
- returns 0 if the key is matched,
- returns 1 otherwise
-*/
-static int map_byte_find (map_byte **ma, const byte *key, byte *data)
-{
- map_byte *found = map_byte_locate (ma, key);
- if (found != NULL)
- {
- *data = found->data;
-
- return 0;
- }
-
- return 1;
-}
-
-/*
- regbyte context typedef
-
- Each regbyte consists of its name and a default value. These are static and created at
- grammar script compile-time, for example the following line:
- .regbyte vertex_blend 0x00
- adds a new regbyte named "vertex_blend" to the static list and initializes it to 0.
- When the script is executed, this regbyte can be accessed by name for read and write. When a
- particular regbyte is written, a new regbyte_ctx entry is added to the top of the regbyte_ctx
- stack. The new entry contains information abot which regbyte it references and its new value.
- When a given regbyte is accessed for read, the stack is searched top-down to find an
- entry that references the regbyte. The first matching entry is used to return the current
- value it holds. If no entry is found, the default value is returned.
-*/
-typedef struct regbyte_ctx_
-{
- map_byte *m_regbyte;
- byte m_current_value;
- struct regbyte_ctx_ *m_prev;
-} regbyte_ctx;
-
-static void regbyte_ctx_create (regbyte_ctx **re)
-{
- *re = (regbyte_ctx *) mem_alloc (sizeof (regbyte_ctx));
- if (*re)
- {
- (**re).m_regbyte = NULL;
- (**re).m_prev = NULL;
- }
-}
-
-static void regbyte_ctx_destroy (regbyte_ctx **re)
-{
- if (*re)
- {
- mem_free ((void **) re);
- }
-}
-
-static byte regbyte_ctx_extract (regbyte_ctx **re, map_byte *reg)
-{
- /* first lookup in the register stack */
- while (*re != NULL)
- {
- if ((**re).m_regbyte == reg)
- return (**re).m_current_value;
-
- re = &(**re).m_prev;
- }
-
- /* if not found - return the default value */
- return reg->data;
-}
-
-/*
- emit type typedef
-*/
-typedef enum emit_type_
-{
- et_byte, /* explicit number */
- et_stream, /* eaten character */
- et_position /* current position */
-} emit_type;
-
-/*
- emit destination typedef
-*/
-typedef enum emit_dest_
-{
- ed_output, /* write to the output buffer */
- ed_regbyte /* write a particular regbyte */
-} emit_dest;
-
-/*
- emit typedef
-*/
-typedef struct emit_
-{
- emit_dest m_emit_dest;
- emit_type m_emit_type; /* ed_output */
- byte m_byte; /* et_byte */
- map_byte *m_regbyte; /* ed_regbyte */
- byte *m_regname; /* ed_regbyte - temporary */
- struct emit_ *m_next;
-} emit;
-
-static void emit_create (emit **em)
-{
- *em = (emit *) mem_alloc (sizeof (emit));
- if (*em)
- {
- (**em).m_emit_dest = ed_output;
- (**em).m_emit_type = et_byte;
- (**em).m_byte = '\0';
- (**em).m_regbyte = NULL;
- (**em).m_regname = NULL;
- (**em).m_next = NULL;
- }
-}
-
-static void emit_destroy (emit **em)
-{
- if (*em)
- {
- emit_destroy (&(**em).m_next);
- mem_free ((void **) &(**em).m_regname);
- mem_free ((void **) em);
- }
-}
-
-static unsigned int emit_size (emit *_E)
-{
- unsigned int n = 0;
-
- while (_E != NULL)
- {
- if (_E->m_emit_dest == ed_output)
- {
- if (_E->m_emit_type == et_position)
- n += 4; /* position is a 32-bit unsigned integer */
- else
- n++;
- }
- _E = _E->m_next;
- }
-
- return n;
-}
-
-static int emit_push (emit *_E, byte *_P, byte c, unsigned int _Pos, regbyte_ctx **_Ctx)
-{
- while (_E != NULL)
- {
- if (_E->m_emit_dest == ed_output)
- {
- if (_E->m_emit_type == et_byte)
- *_P++ = _E->m_byte;
- else if (_E->m_emit_type == et_stream)
- *_P++ = c;
- else /* _Em->type == et_position */
- {
- *_P++ = (byte) (_Pos);
- *_P++ = (byte) (_Pos >> 8);
- *_P++ = (byte) (_Pos >> 16);
- *_P++ = (byte) (_Pos >> 24);
- }
- }
- else
- {
- regbyte_ctx *new_rbc;
- regbyte_ctx_create (&new_rbc);
- if (new_rbc == NULL)
- return 1;
-
- new_rbc->m_prev = *_Ctx;
- new_rbc->m_regbyte = _E->m_regbyte;
- *_Ctx = new_rbc;
-
- if (_E->m_emit_type == et_byte)
- new_rbc->m_current_value = _E->m_byte;
- else if (_E->m_emit_type == et_stream)
- new_rbc->m_current_value = c;
- }
-
- _E = _E->m_next;
- }
-
- return 0;
-}
-
-/*
- error typedef
-*/
-typedef struct error_
-{
- byte *m_text;
- byte *m_token_name;
- struct rule_ *m_token;
-} error;
-
-static void error_create (error **er)
-{
- *er = (error *) mem_alloc (sizeof (error));
- if (*er)
- {
- (**er).m_text = NULL;
- (**er).m_token_name = NULL;
- (**er).m_token = NULL;
- }
-}
-
-static void error_destroy (error **er)
-{
- if (*er)
- {
- mem_free ((void **) &(**er).m_text);
- mem_free ((void **) &(**er).m_token_name);
- mem_free ((void **) er);
- }
-}
-
-struct dict_;
-
-static byte *
-error_get_token (error *, struct dict_ *, const byte *, int);
-
-/*
- condition operand type typedef
-*/
-typedef enum cond_oper_type_
-{
- cot_byte, /* constant 8-bit unsigned integer */
- cot_regbyte /* pointer to byte register containing the current value */
-} cond_oper_type;
-
-/*
- condition operand typedef
-*/
-typedef struct cond_oper_
-{
- cond_oper_type m_type;
- byte m_byte; /* cot_byte */
- map_byte *m_regbyte; /* cot_regbyte */
- byte *m_regname; /* cot_regbyte - temporary */
-} cond_oper;
-
-/*
- condition type typedef
-*/
-typedef enum cond_type_
-{
- ct_equal,
- ct_not_equal
-} cond_type;
-
-/*
- condition typedef
-*/
-typedef struct cond_
-{
- cond_type m_type;
- cond_oper m_operands[2];
-} cond;
-
-static void cond_create (cond **co)
-{
- *co = (cond *) mem_alloc (sizeof (cond));
- if (*co)
- {
- (**co).m_operands[0].m_regname = NULL;
- (**co).m_operands[1].m_regname = NULL;
- }
-}
-
-static void cond_destroy (cond **co)
-{
- if (*co)
- {
- mem_free ((void **) &(**co).m_operands[0].m_regname);
- mem_free ((void **) &(**co).m_operands[1].m_regname);
- mem_free ((void **) co);
- }
-}
-
-/*
- specifier type typedef
-*/
-typedef enum spec_type_
-{
- st_false,
- st_true,
- st_byte,
- st_byte_range,
- st_string,
- st_identifier,
- st_identifier_loop,
- st_debug
-} spec_type;
-
-/*
- specifier typedef
-*/
-typedef struct spec_
-{
- spec_type m_spec_type;
- byte m_byte[2]; /* st_byte, st_byte_range */
- byte *m_string; /* st_string */
- struct rule_ *m_rule; /* st_identifier, st_identifier_loop */
- emit *m_emits;
- error *m_errtext;
- cond *m_cond;
- struct spec_ *next;
-} spec;
-
-static void spec_create (spec **sp)
-{
- *sp = (spec *) mem_alloc (sizeof (spec));
- if (*sp)
- {
- (**sp).m_spec_type = st_false;
- (**sp).m_byte[0] = '\0';
- (**sp).m_byte[1] = '\0';
- (**sp).m_string = NULL;
- (**sp).m_rule = NULL;
- (**sp).m_emits = NULL;
- (**sp).m_errtext = NULL;
- (**sp).m_cond = NULL;
- (**sp).next = NULL;
- }
-}
-
-static void spec_destroy (spec **sp)
-{
- if (*sp)
- {
- spec_destroy (&(**sp).next);
- emit_destroy (&(**sp).m_emits);
- error_destroy (&(**sp).m_errtext);
- mem_free ((void **) &(**sp).m_string);
- cond_destroy (&(**sp).m_cond);
- mem_free ((void **) sp);
- }
-}
-
-GRAMMAR_IMPLEMENT_LIST_APPEND(spec)
-
-/*
- operator typedef
-*/
-typedef enum oper_
-{
- op_none,
- op_and,
- op_or
-} oper;
-
-/*
- rule typedef
-*/
-typedef struct rule_
-{
- oper m_oper;
- spec *m_specs;
- struct rule_ *next;
- int m_referenced;
-} rule;
-
-static void rule_create (rule **ru)
-{
- *ru = (rule *) mem_alloc (sizeof (rule));
- if (*ru)
- {
- (**ru).m_oper = op_none;
- (**ru).m_specs = NULL;
- (**ru).next = NULL;
- (**ru).m_referenced = 0;
- }
-}
-
-static void rule_destroy (rule **ru)
-{
- if (*ru)
- {
- rule_destroy (&(**ru).next);
- spec_destroy (&(**ru).m_specs);
- mem_free ((void **) ru);
- }
-}
-
-GRAMMAR_IMPLEMENT_LIST_APPEND(rule)
-
-/*
- returns unique grammar id
-*/
-static grammar next_valid_grammar_id (void)
-{
- static grammar id = 0;
-
- return ++id;
-}
-
-/*
- dictionary typedef
-*/
-typedef struct dict_
-{
- rule *m_rulez;
- rule *m_syntax;
- rule *m_string;
- map_byte *m_regbytes;
- grammar m_id;
- struct dict_ *next;
-} dict;
-
-static void dict_create (dict **di)
-{
- *di = (dict *) mem_alloc (sizeof (dict));
- if (*di)
- {
- (**di).m_rulez = NULL;
- (**di).m_syntax = NULL;
- (**di).m_string = NULL;
- (**di).m_regbytes = NULL;
- (**di).m_id = next_valid_grammar_id ();
- (**di).next = NULL;
- }
-}
-
-static void dict_destroy (dict **di)
-{
- if (*di)
- {
- rule_destroy (&(**di).m_rulez);
- map_byte_destroy (&(**di).m_regbytes);
- mem_free ((void **) di);
- }
-}
-
-GRAMMAR_IMPLEMENT_LIST_APPEND(dict)
-
-static void dict_find (dict **di, grammar key, dict **data)
-{
- while (*di)
- {
- if ((**di).m_id == key)
- {
- *data = *di;
- return;
- }
-
- di = &(**di).next;
- }
-
- *data = NULL;
-}
-
-static dict *g_dicts = NULL;
-
-/*
- byte array typedef
-*/
-typedef struct barray_
-{
- byte *data;
- unsigned int len;
-} barray;
-
-static void barray_create (barray **ba)
-{
- *ba = (barray *) mem_alloc (sizeof (barray));
- if (*ba)
- {
- (**ba).data = NULL;
- (**ba).len = 0;
- }
-}
-
-static void barray_destroy (barray **ba)
-{
- if (*ba)
- {
- mem_free ((void **) &(**ba).data);
- mem_free ((void **) ba);
- }
-}
-
-/*
- reallocates byte array to requested size,
- returns 0 on success,
- returns 1 otherwise
-*/
-static int barray_resize (barray **ba, unsigned int nlen)
-{
- byte *new_pointer;
-
- if (nlen == 0)
- {
- mem_free ((void **) &(**ba).data);
- (**ba).data = NULL;
- (**ba).len = 0;
-
- return 0;
- }
- else
- {
- new_pointer = (byte *) mem_realloc ((**ba).data, (**ba).len * sizeof (byte),
- nlen * sizeof (byte));
- if (new_pointer)
- {
- (**ba).data = new_pointer;
- (**ba).len = nlen;
-
- return 0;
- }
- }
-
- return 1;
-}
-
-/*
- adds byte array pointed by *nb to the end of array pointed by *ba,
- returns 0 on success,
- returns 1 otherwise
-*/
-static int barray_append (barray **ba, barray **nb)
-{
- const unsigned int len = (**ba).len;
-
- if (barray_resize (ba, (**ba).len + (**nb).len))
- return 1;
-
- mem_copy ((**ba).data + len, (**nb).data, (**nb).len);
-
- return 0;
-}
-
-/*
- adds emit chain pointed by em to the end of array pointed by *ba,
- returns 0 on success,
- returns 1 otherwise
-*/
-static int barray_push (barray **ba, emit *em, byte c, unsigned int pos, regbyte_ctx **rbc)
-{
- unsigned int count = emit_size (em);
-
- if (barray_resize (ba, (**ba).len + count))
- return 1;
-
- return emit_push (em, (**ba).data + ((**ba).len - count), c, pos, rbc);
-}
-
-/*
- byte pool typedef
-*/
-typedef struct bytepool_
-{
- byte *_F;
- unsigned int _Siz;
-} bytepool;
-
-static void bytepool_destroy (bytepool **by)
-{
- if (*by != NULL)
- {
- mem_free ((void **) &(**by)._F);
- mem_free ((void **) by);
- }
-}
-
-static void bytepool_create (bytepool **by, int len)
-{
- *by = (bytepool *) (mem_alloc (sizeof (bytepool)));
- if (*by != NULL)
- {
- (**by)._F = (byte *) (mem_alloc (sizeof (byte) * len));
- (**by)._Siz = len;
-
- if ((**by)._F == NULL)
- bytepool_destroy (by);
- }
-}
-
-static int bytepool_reserve (bytepool *by, unsigned int n)
-{
- byte *_P;
-
- if (n <= by->_Siz)
- return 0;
-
- /* byte pool can only grow and at least by doubling its size */
- n = n >= by->_Siz * 2 ? n : by->_Siz * 2;
-
- /* reallocate the memory and adjust pointers to the new memory location */
- _P = (byte *) (mem_realloc (by->_F, sizeof (byte) * by->_Siz, sizeof (byte) * n));
- if (_P != NULL)
- {
- by->_F = _P;
- by->_Siz = n;
- return 0;
- }
-
- return 1;
-}
-
-/*
- string to string map typedef
-*/
-typedef struct map_str_
-{
- byte *key;
- byte *data;
- struct map_str_ *next;
-} map_str;
-
-static void map_str_create (map_str **ma)
-{
- *ma = (map_str *) mem_alloc (sizeof (map_str));
- if (*ma)
- {
- (**ma).key = NULL;
- (**ma).data = NULL;
- (**ma).next = NULL;
- }
-}
-
-static void map_str_destroy (map_str **ma)
-{
- if (*ma)
- {
- map_str_destroy (&(**ma).next);
- mem_free ((void **) &(**ma).key);
- mem_free ((void **) &(**ma).data);
- mem_free ((void **) ma);
- }
-}
-
-GRAMMAR_IMPLEMENT_LIST_APPEND(map_str)
-
-/*
- searches the map for specified key,
- if the key is matched, *data is filled with data associated with the key,
- returns 0 if the key is matched,
- returns 1 otherwise
-*/
-static int map_str_find (map_str **ma, const byte *key, byte **data)
-{
- while (*ma)
- {
- if (str_equal ((**ma).key, key))
- {
- *data = str_duplicate ((**ma).data);
- if (*data == NULL)
- return 1;
-
- return 0;
- }
-
- ma = &(**ma).next;
- }
-
- set_last_error (UNRESOLVED_REFERENCE, str_duplicate (key), -1);
- return 1;
-}
-
-/*
- string to rule map typedef
-*/
-typedef struct map_rule_
-{
- byte *key;
- rule *data;
- struct map_rule_ *next;
-} map_rule;
-
-static void map_rule_create (map_rule **ma)
-{
- *ma = (map_rule *) mem_alloc (sizeof (map_rule));
- if (*ma)
- {
- (**ma).key = NULL;
- (**ma).data = NULL;
- (**ma).next = NULL;
- }
-}
-
-static void map_rule_destroy (map_rule **ma)
-{
- if (*ma)
- {
- map_rule_destroy (&(**ma).next);
- mem_free ((void **) &(**ma).key);
- mem_free ((void **) ma);
- }
-}
-
-GRAMMAR_IMPLEMENT_LIST_APPEND(map_rule)
-
-/*
- searches the map for specified key,
- if the key is matched, *data is filled with data associated with the key,
- returns 0 if the is matched,
- returns 1 otherwise
-*/
-static int map_rule_find (map_rule **ma, const byte *key, rule **data)
-{
- while (*ma)
- {
- if (str_equal ((**ma).key, key))
- {
- *data = (**ma).data;
-
- return 0;
- }
-
- ma = &(**ma).next;
- }
-
- set_last_error (UNRESOLVED_REFERENCE, str_duplicate (key), -1);
- return 1;
-}
-
-/*
- returns 1 if given character is a white space,
- returns 0 otherwise
-*/
-static int is_space (byte c)
-{
- return c == ' ' || c == '\t' || c == '\n' || c == '\r';
-}
-
-/*
- advances text pointer by 1 if character pointed by *text is a space,
- returns 1 if a space has been eaten,
- returns 0 otherwise
-*/
-static int eat_space (const byte **text)
-{
- if (is_space (**text))
- {
- (*text)++;
-
- return 1;
- }
-
- return 0;
-}
-
-/*
- returns 1 if text points to C-style comment start string,
- returns 0 otherwise
-*/
-static int is_comment_start (const byte *text)
-{
- return text[0] == '/' && text[1] == '*';
-}
-
-/*
- advances text pointer to first character after C-style comment block - if any,
- returns 1 if C-style comment block has been encountered and eaten,
- returns 0 otherwise
-*/
-static int eat_comment (const byte **text)
-{
- if (is_comment_start (*text))
- {
- /* *text points to comment block - skip two characters to enter comment body */
- *text += 2;
- /* skip any character except consecutive '*' and '/' */
- while (!((*text)[0] == '*' && (*text)[1] == '/'))
- (*text)++;
- /* skip those two terminating characters */
- *text += 2;
-
- return 1;
- }
-
- return 0;
-}
-
-/*
- advances text pointer to first character that is neither space nor C-style comment block
-*/
-static void eat_spaces (const byte **text)
-{
- while (eat_space (text) || eat_comment (text))
- ;
-}
-
-/*
- resizes string pointed by *ptr to successfully add character c to the end of the string,
- returns 0 on success,
- returns 1 otherwise
-*/
-static int string_grow (byte **ptr, unsigned int *len, byte c)
-{
- /* reallocate the string in 16-byte increments */
- if ((*len & 0x0F) == 0x0F || *ptr == NULL)
- {
- byte *tmp = (byte *) mem_realloc (*ptr, ((*len + 1) & ~0x0F) * sizeof (byte),
- ((*len + 1 + 0x10) & ~0x0F) * sizeof (byte));
- if (tmp == NULL)
- return 1;
-
- *ptr = tmp;
- }
-
- if (c)
- {
- /* append given character */
- (*ptr)[*len] = c;
- (*len)++;
- }
- (*ptr)[*len] = '\0';
-
- return 0;
-}
-
-/*
- returns 1 if given character is a valid identifier character a-z, A-Z, 0-9 or _
- returns 0 otherwise
-*/
-static int is_identifier (byte c)
-{
- return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_';
-}
-
-/*
- copies characters from *text to *id until non-identifier character is encountered,
- assumes that *id points to NULL object - caller is responsible for later freeing the string,
- text pointer is advanced to point past the copied identifier,
- returns 0 if identifier was successfully copied,
- returns 1 otherwise
-*/
-static int get_identifier (const byte **text, byte **id)
-{
- const byte *t = *text;
- byte *p = NULL;
- unsigned int len = 0;
-
- if (string_grow (&p, &len, '\0'))
- return 1;
-
- /* loop while next character in buffer is valid for identifiers */
- while (is_identifier (*t))
- {
- if (string_grow (&p, &len, *t++))
- {
- mem_free ((void **) (void *) &p);
- return 1;
- }
- }
-
- *text = t;
- *id = p;
-
- return 0;
-}
-
-/*
- converts sequence of DEC digits pointed by *text until non-DEC digit is encountered,
- advances text pointer past the converted sequence,
- returns the converted value
-*/
-static unsigned int dec_convert (const byte **text)
-{
- unsigned int value = 0;
-
- while (**text >= '0' && **text <= '9')
- {
- value = value * 10 + **text - '0';
- (*text)++;
- }
-
- return value;
-}
-
-/*
- returns 1 if given character is HEX digit 0-9, A-F or a-f,
- returns 0 otherwise
-*/
-static int is_hex (byte c)
-{
- return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
-}
-
-/*
- returns value of passed character as if it was HEX digit
-*/
-static unsigned int hex2dec (byte c)
-{
- if (c >= '0' && c <= '9')
- return c - '0';
- if (c >= 'A' && c <= 'F')
- return c - 'A' + 10;
- return c - 'a' + 10;
-}
-
-/*
- converts sequence of HEX digits pointed by *text until non-HEX digit is encountered,
- advances text pointer past the converted sequence,
- returns the converted value
-*/
-static unsigned int hex_convert (const byte **text)
-{
- unsigned int value = 0;
-
- while (is_hex (**text))
- {
- value = value * 0x10 + hex2dec (**text);
- (*text)++;
- }
-
- return value;
-}
-
-/*
- returns 1 if given character is OCT digit 0-7,
- returns 0 otherwise
-*/
-static int is_oct (byte c)
-{
- return c >= '0' && c <= '7';
-}
-
-/*
- returns value of passed character as if it was OCT digit
-*/
-static int oct2dec (byte c)
-{
- return c - '0';
-}
-
-static byte get_escape_sequence (const byte **text)
-{
- int value = 0;
-
- /* skip '\' character */
- (*text)++;
-
- switch (*(*text)++)
- {
- case '\'':
- return '\'';
- case '"':
- return '\"';
- case '?':
- return '\?';
- case '\\':
- return '\\';
- case 'a':
- return '\a';
- case 'b':
- return '\b';
- case 'f':
- return '\f';
- case 'n':
- return '\n';
- case 'r':
- return '\r';
- case 't':
- return '\t';
- case 'v':
- return '\v';
- case 'x':
- return (byte) hex_convert (text);
- }
-
- (*text)--;
- if (is_oct (**text))
- {
- value = oct2dec (*(*text)++);
- if (is_oct (**text))
- {
- value = value * 010 + oct2dec (*(*text)++);
- if (is_oct (**text))
- value = value * 010 + oct2dec (*(*text)++);
- }
- }
-
- return (byte) value;
-}
-
-/*
- copies characters from *text to *str until " or ' character is encountered,
- assumes that *str points to NULL object - caller is responsible for later freeing the string,
- assumes that *text points to " or ' character that starts the string,
- text pointer is advanced to point past the " or ' character,
- returns 0 if string was successfully copied,
- returns 1 otherwise
-*/
-static int get_string (const byte **text, byte **str)
-{
- const byte *t = *text;
- byte *p = NULL;
- unsigned int len = 0;
- byte term_char;
-
- if (string_grow (&p, &len, '\0'))
- return 1;
-
- /* read " or ' character that starts the string */
- term_char = *t++;
- /* while next character is not the terminating character */
- while (*t && *t != term_char)
- {
- byte c;
-
- if (*t == '\\')
- c = get_escape_sequence (&t);
- else
- c = *t++;
-
- if (string_grow (&p, &len, c))
- {
- mem_free ((void **) (void *) &p);
- return 1;
- }
- }
- /* skip " or ' character that ends the string */
- t++;
-
- *text = t;
- *str = p;
- return 0;
-}
-
-/*
- gets emit code, the syntax is:
- ".emtcode" " " <symbol> " " (("0x" | "0X") <hex_value>) | <dec_value> | <character>
- assumes that *text already points to <symbol>,
- returns 0 if emit code is successfully read,
- returns 1 otherwise
-*/
-static int get_emtcode (const byte **text, map_byte **ma)
-{
- const byte *t = *text;
- map_byte *m = NULL;
-
- map_byte_create (&m);
- if (m == NULL)
- return 1;
-
- if (get_identifier (&t, &m->key))
- {
- map_byte_destroy (&m);
- return 1;
- }
- eat_spaces (&t);
-
- if (*t == '\'')
- {
- byte *c;
-
- if (get_string (&t, &c))
- {
- map_byte_destroy (&m);
- return 1;
- }
-
- m->data = (byte) c[0];
- mem_free ((void **) (void *) &c);
- }
- else if (t[0] == '0' && (t[1] == 'x' || t[1] == 'X'))
- {
- /* skip HEX "0x" or "0X" prefix */
- t += 2;
- m->data = (byte) hex_convert (&t);
- }
- else
- {
- m->data = (byte) dec_convert (&t);
- }
-
- eat_spaces (&t);
-
- *text = t;
- *ma = m;
- return 0;
-}
-
-/*
- gets regbyte declaration, the syntax is:
- ".regbyte" " " <symbol> " " (("0x" | "0X") <hex_value>) | <dec_value> | <character>
- assumes that *text already points to <symbol>,
- returns 0 if regbyte is successfully read,
- returns 1 otherwise
-*/
-static int get_regbyte (const byte **text, map_byte **ma)
-{
- /* pass it to the emtcode parser as it has the same syntax starting at <symbol> */
- return get_emtcode (text, ma);
-}
-
-/*
- returns 0 on success,
- returns 1 otherwise
-*/
-static int get_errtext (const byte **text, map_str **ma)
-{
- const byte *t = *text;
- map_str *m = NULL;
-
- map_str_create (&m);
- if (m == NULL)
- return 1;
-
- if (get_identifier (&t, &m->key))
- {
- map_str_destroy (&m);
- return 1;
- }
- eat_spaces (&t);
-
- if (get_string (&t, &m->data))
- {
- map_str_destroy (&m);
- return 1;
- }
- eat_spaces (&t);
-
- *text = t;
- *ma = m;
- return 0;
-}
-
-/*
- returns 0 on success,
- returns 1 otherwise,
-*/
-static int get_error (const byte **text, error **er, map_str *maps)
-{
- const byte *t = *text;
- byte *temp = NULL;
-
- if (*t != '.')
- return 0;
-
- t++;
- if (get_identifier (&t, &temp))
- return 1;
- eat_spaces (&t);
-
- if (!str_equal ((byte *) "error", temp))
- {
- mem_free ((void **) (void *) &temp);
- return 0;
- }
-
- mem_free ((void **) (void *) &temp);
-
- error_create (er);
- if (*er == NULL)
- return 1;
-
- if (*t == '\"')
- {
- if (get_string (&t, &(**er).m_text))
- {
- error_destroy (er);
- return 1;
- }
- eat_spaces (&t);
- }
- else
- {
- if (get_identifier (&t, &temp))
- {
- error_destroy (er);
- return 1;
- }
- eat_spaces (&t);
-
- if (map_str_find (&maps, temp, &(**er).m_text))
- {
- mem_free ((void **) (void *) &temp);
- error_destroy (er);
- return 1;
- }
-
- mem_free ((void **) (void *) &temp);
- }
-
- /* try to extract "token" from "...$token$..." */
- {
- byte *processed = NULL;
- unsigned int len = 0;
- int i = 0;
-
- if (string_grow (&processed, &len, '\0'))
- {
- error_destroy (er);
- return 1;
- }
-
- while (i < str_length ((**er).m_text))
- {
- /* check if the dollar sign is repeated - if so skip it */
- if ((**er).m_text[i] == '$' && (**er).m_text[i + 1] == '$')
- {
- if (string_grow (&processed, &len, '$'))
- {
- mem_free ((void **) (void *) &processed);
- error_destroy (er);
- return 1;
- }
-
- i += 2;
- }
- else if ((**er).m_text[i] != '$')
- {
- if (string_grow (&processed, &len, (**er).m_text[i]))
- {
- mem_free ((void **) (void *) &processed);
- error_destroy (er);
- return 1;
- }
-
- i++;
- }
- else
- {
- if (string_grow (&processed, &len, '$'))
- {
- mem_free ((void **) (void *) &processed);
- error_destroy (er);
- return 1;
- }
-
- {
- /* length of token being extracted */
- unsigned int tlen = 0;
-
- if (string_grow (&(**er).m_token_name, &tlen, '\0'))
- {
- mem_free ((void **) (void *) &processed);
- error_destroy (er);
- return 1;
- }
-
- /* skip the dollar sign */
- i++;
-
- while ((**er).m_text[i] != '$')
- {
- if (string_grow (&(**er).m_token_name, &tlen, (**er).m_text[i]))
- {
- mem_free ((void **) (void *) &processed);
- error_destroy (er);
- return 1;
- }
-
- i++;
- }
-
- /* skip the dollar sign */
- i++;
- }
- }
- }
-
- mem_free ((void **) &(**er).m_text);
- (**er).m_text = processed;
- }
-
- *text = t;
- return 0;
-}
-
-/*
- returns 0 on success,
- returns 1 otherwise,
-*/
-static int get_emits (const byte **text, emit **em, map_byte *mapb)
-{
- const byte *t = *text;
- byte *temp = NULL;
- emit *e = NULL;
- emit_dest dest;
-
- if (*t != '.')
- return 0;
-
- t++;
- if (get_identifier (&t, &temp))
- return 1;
- eat_spaces (&t);
-
- /* .emit */
- if (str_equal ((byte *) "emit", temp))
- dest = ed_output;
- /* .load */
- else if (str_equal ((byte *) "load", temp))
- dest = ed_regbyte;
- else
- {
- mem_free ((void **) (void *) &temp);
- return 0;
- }
-
- mem_free ((void **) (void *) &temp);
-
- emit_create (&e);
- if (e == NULL)
- return 1;
-
- e->m_emit_dest = dest;
-
- if (dest == ed_regbyte)
- {
- if (get_identifier (&t, &e->m_regname))
- {
- emit_destroy (&e);
- return 1;
- }
- eat_spaces (&t);
- }
-
- /* 0xNN */
- if (*t == '0' && (t[1] == 'x' || t[1] == 'X'))
- {
- t += 2;
- e->m_byte = (byte) hex_convert (&t);
-
- e->m_emit_type = et_byte;
- }
- /* NNN */
- else if (*t >= '0' && *t <= '9')
- {
- e->m_byte = (byte) dec_convert (&t);
-
- e->m_emit_type = et_byte;
- }
- /* * */
- else if (*t == '*')
- {
- t++;
-
- e->m_emit_type = et_stream;
- }
- /* $ */
- else if (*t == '$')
- {
- t++;
-
- e->m_emit_type = et_position;
- }
- /* 'c' */
- else if (*t == '\'')
- {
- if (get_string (&t, &temp))
- {
- emit_destroy (&e);
- return 1;
- }
- e->m_byte = (byte) temp[0];
-
- mem_free ((void **) (void *) &temp);
-
- e->m_emit_type = et_byte;
- }
- else
- {
- if (get_identifier (&t, &temp))
- {
- emit_destroy (&e);
- return 1;
- }
-
- if (map_byte_find (&mapb, temp, &e->m_byte))
- {
- mem_free ((void **) (void *) &temp);
- emit_destroy (&e);
- return 1;
- }
-
- mem_free ((void **) (void *) &temp);
-
- e->m_emit_type = et_byte;
- }
-
- eat_spaces (&t);
-
- if (get_emits (&t, &e->m_next, mapb))
- {
- emit_destroy (&e);
- return 1;
- }
-
- *text = t;
- *em = e;
- return 0;
-}
-
-/*
- returns 0 on success,
- returns 1 otherwise,
-*/
-static int get_spec (const byte **text, spec **sp, map_str *maps, map_byte *mapb)
-{
- const byte *t = *text;
- spec *s = NULL;
-
- spec_create (&s);
- if (s == NULL)
- return 1;
-
- /* first - read optional .if statement */
- if (*t == '.')
- {
- const byte *u = t;
- byte *keyword = NULL;
-
- /* skip the dot */
- u++;
-
- if (get_identifier (&u, &keyword))
- {
- spec_destroy (&s);
- return 1;
- }
-
- /* .if */
- if (str_equal ((byte *) "if", keyword))
- {
- cond_create (&s->m_cond);
- if (s->m_cond == NULL)
- {
- spec_destroy (&s);
- return 1;
- }
-
- /* skip the left paren */
- eat_spaces (&u);
- u++;
-
- /* get the left operand */
- eat_spaces (&u);
- if (get_identifier (&u, &s->m_cond->m_operands[0].m_regname))
- {
- spec_destroy (&s);
- return 1;
- }
- s->m_cond->m_operands[0].m_type = cot_regbyte;
-
- /* get the operator (!= or ==) */
- eat_spaces (&u);
- if (*u == '!')
- s->m_cond->m_type = ct_not_equal;
- else
- s->m_cond->m_type = ct_equal;
- u += 2;
- eat_spaces (&u);
-
- if (u[0] == '0' && (u[1] == 'x' || u[1] == 'X'))
- {
- /* skip the 0x prefix */
- u += 2;
-
- /* get the right operand */
- s->m_cond->m_operands[1].m_byte = hex_convert (&u);
- s->m_cond->m_operands[1].m_type = cot_byte;
- }
- else /*if (*u >= '0' && *u <= '9')*/
- {
- /* get the right operand */
- s->m_cond->m_operands[1].m_byte = dec_convert (&u);
- s->m_cond->m_operands[1].m_type = cot_byte;
- }
-
- /* skip the right paren */
- eat_spaces (&u);
- u++;
-
- eat_spaces (&u);
-
- t = u;
- }
-
- mem_free ((void **) (void *) &keyword);
- }
-
- if (*t == '\'')
- {
- byte *temp = NULL;
-
- if (get_string (&t, &temp))
- {
- spec_destroy (&s);
- return 1;
- }
- eat_spaces (&t);
-
- if (*t == '-')
- {
- byte *temp2 = NULL;
-
- /* skip the '-' character */
- t++;
- eat_spaces (&t);
-
- if (get_string (&t, &temp2))
- {
- mem_free ((void **) (void *) &temp);
- spec_destroy (&s);
- return 1;
- }
- eat_spaces (&t);
-
- s->m_spec_type = st_byte_range;
- s->m_byte[0] = *temp;
- s->m_byte[1] = *temp2;
-
- mem_free ((void **) (void *) &temp2);
- }
- else
- {
- s->m_spec_type = st_byte;
- *s->m_byte = *temp;
- }
-
- mem_free ((void **) (void *) &temp);
- }
- else if (*t == '"')
- {
- if (get_string (&t, &s->m_string))
- {
- spec_destroy (&s);
- return 1;
- }
- eat_spaces (&t);
-
- s->m_spec_type = st_string;
- }
- else if (*t == '.')
- {
- byte *keyword = NULL;
-
- /* skip the dot */
- t++;
-
- if (get_identifier (&t, &keyword))
- {
- spec_destroy (&s);
- return 1;
- }
- eat_spaces (&t);
-
- /* .true */
- if (str_equal ((byte *) "true", keyword))
- {
- s->m_spec_type = st_true;
- }
- /* .false */
- else if (str_equal ((byte *) "false", keyword))
- {
- s->m_spec_type = st_false;
- }
- /* .debug */
- else if (str_equal ((byte *) "debug", keyword))
- {
- s->m_spec_type = st_debug;
- }
- /* .loop */
- else if (str_equal ((byte *) "loop", keyword))
- {
- if (get_identifier (&t, &s->m_string))
- {
- mem_free ((void **) (void *) &keyword);
- spec_destroy (&s);
- return 1;
- }
- eat_spaces (&t);
-
- s->m_spec_type = st_identifier_loop;
- }
- mem_free ((void **) (void *) &keyword);
- }
- else
- {
- if (get_identifier (&t, &s->m_string))
- {
- spec_destroy (&s);
- return 1;
- }
- eat_spaces (&t);
-
- s->m_spec_type = st_identifier;
- }
-
- if (get_error (&t, &s->m_errtext, maps))
- {
- spec_destroy (&s);
- return 1;
- }
-
- if (get_emits (&t, &s->m_emits, mapb))
- {
- spec_destroy (&s);
- return 1;
- }
-
- *text = t;
- *sp = s;
- return 0;
-}
-
-/*
- returns 0 on success,
- returns 1 otherwise,
-*/
-static int get_rule (const byte **text, rule **ru, map_str *maps, map_byte *mapb)
-{
- const byte *t = *text;
- rule *r = NULL;
-
- rule_create (&r);
- if (r == NULL)
- return 1;
-
- if (get_spec (&t, &r->m_specs, maps, mapb))
- {
- rule_destroy (&r);
- return 1;
- }
-
- while (*t != ';')
- {
- byte *op = NULL;
- spec *sp = NULL;
-
- /* skip the dot that precedes "and" or "or" */
- t++;
-
- /* read "and" or "or" keyword */
- if (get_identifier (&t, &op))
- {
- rule_destroy (&r);
- return 1;
- }
- eat_spaces (&t);
-
- if (r->m_oper == op_none)
- {
- /* .and */
- if (str_equal ((byte *) "and", op))
- r->m_oper = op_and;
- /* .or */
- else
- r->m_oper = op_or;
- }
-
- mem_free ((void **) (void *) &op);
-
- if (get_spec (&t, &sp, maps, mapb))
- {
- rule_destroy (&r);
- return 1;
- }
-
- spec_append (&r->m_specs, sp);
- }
-
- /* skip the semicolon */
- t++;
- eat_spaces (&t);
-
- *text = t;
- *ru = r;
- return 0;
-}
-
-/*
- returns 0 on success,
- returns 1 otherwise,
-*/
-static int update_dependency (map_rule *mapr, byte *symbol, rule **ru)
-{
- if (map_rule_find (&mapr, symbol, ru))
- return 1;
-
- (**ru).m_referenced = 1;
-
- return 0;
-}
-
-/*
- returns 0 on success,
- returns 1 otherwise,
-*/
-static int update_dependencies (dict *di, map_rule *mapr, byte **syntax_symbol,
- byte **string_symbol, map_byte *regbytes)
-{
- rule *rulez = di->m_rulez;
-
- /* update dependecies for the root and lexer symbols */
- if (update_dependency (mapr, *syntax_symbol, &di->m_syntax) ||
- (*string_symbol != NULL && update_dependency (mapr, *string_symbol, &di->m_string)))
- return 1;
-
- mem_free ((void **) syntax_symbol);
- mem_free ((void **) string_symbol);
-
- /* update dependecies for the rest of the rules */
- while (rulez)
- {
- spec *sp = rulez->m_specs;
-
- /* iterate through all the specifiers */
- while (sp)
- {
- /* update dependency for identifier */
- if (sp->m_spec_type == st_identifier || sp->m_spec_type == st_identifier_loop)
- {
- if (update_dependency (mapr, sp->m_string, &sp->m_rule))
- return 1;
-
- mem_free ((void **) &sp->m_string);
- }
-
- /* some errtexts reference to a rule */
- if (sp->m_errtext && sp->m_errtext->m_token_name)
- {
- if (update_dependency (mapr, sp->m_errtext->m_token_name, &sp->m_errtext->m_token))
- return 1;
-
- mem_free ((void **) &sp->m_errtext->m_token_name);
- }
-
- /* update dependency for condition */
- if (sp->m_cond)
- {
- int i;
- for (i = 0; i < 2; i++)
- if (sp->m_cond->m_operands[i].m_type == cot_regbyte)
- {
- sp->m_cond->m_operands[i].m_regbyte = map_byte_locate (&regbytes,
- sp->m_cond->m_operands[i].m_regname);
-
- if (sp->m_cond->m_operands[i].m_regbyte == NULL)
- return 1;
-
- mem_free ((void **) &sp->m_cond->m_operands[i].m_regname);
- }
- }
-
- /* update dependency for all .load instructions */
- if (sp->m_emits)
- {
- emit *em = sp->m_emits;
- while (em != NULL)
- {
- if (em->m_emit_dest == ed_regbyte)
- {
- em->m_regbyte = map_byte_locate (&regbytes, em->m_regname);
-
- if (em->m_regbyte == NULL)
- return 1;
-
- mem_free ((void **) &em->m_regname);
- }
-
- em = em->m_next;
- }
- }
-
- sp = sp->next;
- }
-
- rulez = rulez->next;
- }
-
- /* check for unreferenced symbols */
- rulez = di->m_rulez;
- while (rulez != NULL)
- {
- if (!rulez->m_referenced)
- {
- map_rule *ma = mapr;
- while (ma)
- {
- if (ma->data == rulez)
- {
- set_last_error (UNREFERENCED_IDENTIFIER, str_duplicate (ma->key), -1);
- return 1;
- }
- ma = ma->next;
- }
- }
- rulez = rulez->next;
- }
-
- return 0;
-}
-
-static int satisfies_condition (cond *co, regbyte_ctx *ctx)
-{
- byte values[2];
- int i;
-
- if (co == NULL)
- return 1;
-
- for (i = 0; i < 2; i++)
- switch (co->m_operands[i].m_type)
- {
- case cot_byte:
- values[i] = co->m_operands[i].m_byte;
- break;
- case cot_regbyte:
- values[i] = regbyte_ctx_extract (&ctx, co->m_operands[i].m_regbyte);
- break;
- }
-
- switch (co->m_type)
- {
- case ct_equal:
- return values[0] == values[1];
- case ct_not_equal:
- return values[0] != values[1];
- }
-
- return 0;
-}
-
-static void free_regbyte_ctx_stack (regbyte_ctx *top, regbyte_ctx *limit)
-{
- while (top != limit)
- {
- regbyte_ctx *rbc = top->m_prev;
- regbyte_ctx_destroy (&top);
- top = rbc;
- }
-}
-
-typedef enum match_result_
-{
- mr_not_matched, /* the examined string does not match */
- mr_matched, /* the examined string matches */
- mr_error_raised, /* mr_not_matched + error has been raised */
- mr_dont_emit, /* used by identifier loops only */
- mr_internal_error /* an internal error has occured such as out of memory */
-} match_result;
-
-/*
- * This function does the main job. It parses the text and generates output data.
- */
-static match_result
-match (dict *di, const byte *text, int *index, rule *ru, barray **ba, int filtering_string,
- regbyte_ctx **rbc)
-{
- int ind = *index;
- match_result status = mr_not_matched;
- spec *sp = ru->m_specs;
- regbyte_ctx *ctx = *rbc;
-
- /* for every specifier in the rule */
- while (sp)
- {
- int i, len, save_ind = ind;
- barray *array = NULL;
-
- if (satisfies_condition (sp->m_cond, ctx))
- {
- switch (sp->m_spec_type)
- {
- case st_identifier:
- barray_create (&array);
- if (array == NULL)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
-
- status = match (di, text, &ind, sp->m_rule, &array, filtering_string, &ctx);
-
- if (status == mr_internal_error)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- barray_destroy (&array);
- return mr_internal_error;
- }
- break;
- case st_string:
- len = str_length (sp->m_string);
-
- /* prefilter the stream */
- if (!filtering_string && di->m_string)
- {
- barray *ba;
- int filter_index = 0;
- match_result result;
- regbyte_ctx *null_ctx = NULL;
-
- barray_create (&ba);
- if (ba == NULL)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
-
- result = match (di, text + ind, &filter_index, di->m_string, &ba, 1, &null_ctx);
-
- if (result == mr_internal_error)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- barray_destroy (&ba);
- return mr_internal_error;
- }
-
- if (result != mr_matched)
- {
- barray_destroy (&ba);
- status = mr_not_matched;
- break;
- }
-
- barray_destroy (&ba);
-
- if (filter_index != len || !str_equal_n (sp->m_string, text + ind, len))
- {
- status = mr_not_matched;
- break;
- }
-
- status = mr_matched;
- ind += len;
- }
- else
- {
- status = mr_matched;
- for (i = 0; status == mr_matched && i < len; i++)
- if (text[ind + i] != sp->m_string[i])
- status = mr_not_matched;
-
- if (status == mr_matched)
- ind += len;
- }
- break;
- case st_byte:
- status = text[ind] == *sp->m_byte ? mr_matched : mr_not_matched;
- if (status == mr_matched)
- ind++;
- break;
- case st_byte_range:
- status = (text[ind] >= sp->m_byte[0] && text[ind] <= sp->m_byte[1]) ?
- mr_matched : mr_not_matched;
- if (status == mr_matched)
- ind++;
- break;
- case st_true:
- status = mr_matched;
- break;
- case st_false:
- status = mr_not_matched;
- break;
- case st_debug:
- status = ru->m_oper == op_and ? mr_matched : mr_not_matched;
- break;
- case st_identifier_loop:
- barray_create (&array);
- if (array == NULL)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
-
- status = mr_dont_emit;
- for (;;)
- {
- match_result result;
-
- save_ind = ind;
- result = match (di, text, &ind, sp->m_rule, &array, filtering_string, &ctx);
-
- if (result == mr_error_raised)
- {
- status = result;
- break;
- }
- else if (result == mr_matched)
- {
- if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx) ||
- barray_append (ba, &array))
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- barray_destroy (&array);
- return mr_internal_error;
- }
- barray_destroy (&array);
- barray_create (&array);
- if (array == NULL)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
- }
- else if (result == mr_internal_error)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- barray_destroy (&array);
- return mr_internal_error;
- }
- else
- break;
- }
- break;
- }
- }
- else
- {
- status = mr_not_matched;
- }
-
- if (status == mr_error_raised)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- barray_destroy (&array);
-
- return mr_error_raised;
- }
-
- if (ru->m_oper == op_and && status != mr_matched && status != mr_dont_emit)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- barray_destroy (&array);
-
- if (sp->m_errtext)
- {
- set_last_error (sp->m_errtext->m_text, error_get_token (sp->m_errtext, di, text,
- ind), ind);
-
- return mr_error_raised;
- }
-
- return mr_not_matched;
- }
-
- if (status == mr_matched)
- {
- if (sp->m_emits)
- if (barray_push (ba, sp->m_emits, text[ind - 1], save_ind, &ctx))
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- barray_destroy (&array);
- return mr_internal_error;
- }
-
- if (array)
- if (barray_append (ba, &array))
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- barray_destroy (&array);
- return mr_internal_error;
- }
- }
-
- barray_destroy (&array);
-
- /* if the rule operator is a logical or, we pick up the first matching specifier */
- if (ru->m_oper == op_or && (status == mr_matched || status == mr_dont_emit))
- {
- *index = ind;
- *rbc = ctx;
- return mr_matched;
- }
-
- sp = sp->next;
- }
-
- /* everything went fine - all specifiers match up */
- if (ru->m_oper == op_and && (status == mr_matched || status == mr_dont_emit))
- {
- *index = ind;
- *rbc = ctx;
- return mr_matched;
- }
-
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_not_matched;
-}
-
-static match_result
-fast_match (dict *di, const byte *text, int *index, rule *ru, int *_PP, bytepool *_BP,
- int filtering_string, regbyte_ctx **rbc)
-{
- int ind = *index;
- int _P = filtering_string ? 0 : *_PP;
- int _P2;
- match_result status = mr_not_matched;
- spec *sp = ru->m_specs;
- regbyte_ctx *ctx = *rbc;
-
- /* for every specifier in the rule */
- while (sp)
- {
- int i, len, save_ind = ind;
-
- _P2 = _P + (sp->m_emits ? emit_size (sp->m_emits) : 0);
- if (bytepool_reserve (_BP, _P2))
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
-
- if (satisfies_condition (sp->m_cond, ctx))
- {
- switch (sp->m_spec_type)
- {
- case st_identifier:
- status = fast_match (di, text, &ind, sp->m_rule, &_P2, _BP, filtering_string, &ctx);
-
- if (status == mr_internal_error)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
- break;
- case st_string:
- len = str_length (sp->m_string);
-
- /* prefilter the stream */
- if (!filtering_string && di->m_string)
- {
- int filter_index = 0;
- match_result result;
- regbyte_ctx *null_ctx = NULL;
-
- result = fast_match (di, text + ind, &filter_index, di->m_string, NULL, _BP, 1, &null_ctx);
-
- if (result == mr_internal_error)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
-
- if (result != mr_matched)
- {
- status = mr_not_matched;
- break;
- }
-
- if (filter_index != len || !str_equal_n (sp->m_string, text + ind, len))
- {
- status = mr_not_matched;
- break;
- }
-
- status = mr_matched;
- ind += len;
- }
- else
- {
- status = mr_matched;
- for (i = 0; status == mr_matched && i < len; i++)
- if (text[ind + i] != sp->m_string[i])
- status = mr_not_matched;
-
- if (status == mr_matched)
- ind += len;
- }
- break;
- case st_byte:
- status = text[ind] == *sp->m_byte ? mr_matched : mr_not_matched;
- if (status == mr_matched)
- ind++;
- break;
- case st_byte_range:
- status = (text[ind] >= sp->m_byte[0] && text[ind] <= sp->m_byte[1]) ?
- mr_matched : mr_not_matched;
- if (status == mr_matched)
- ind++;
- break;
- case st_true:
- status = mr_matched;
- break;
- case st_false:
- status = mr_not_matched;
- break;
- case st_debug:
- status = ru->m_oper == op_and ? mr_matched : mr_not_matched;
- break;
- case st_identifier_loop:
- status = mr_dont_emit;
- for (;;)
- {
- match_result result;
-
- save_ind = ind;
- result = fast_match (di, text, &ind, sp->m_rule, &_P2, _BP, filtering_string, &ctx);
-
- if (result == mr_error_raised)
- {
- status = result;
- break;
- }
- else if (result == mr_matched)
- {
- if (!filtering_string)
- {
- if (sp->m_emits != NULL)
- {
- if (emit_push (sp->m_emits, _BP->_F + _P, text[ind - 1], save_ind, &ctx))
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
- }
-
- _P = _P2;
- _P2 += sp->m_emits ? emit_size (sp->m_emits) : 0;
- if (bytepool_reserve (_BP, _P2))
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
- }
- }
- else if (result == mr_internal_error)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
- else
- break;
- }
- break;
- }
- }
- else
- {
- status = mr_not_matched;
- }
-
- if (status == mr_error_raised)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
-
- return mr_error_raised;
- }
-
- if (ru->m_oper == op_and && status != mr_matched && status != mr_dont_emit)
- {
- free_regbyte_ctx_stack (ctx, *rbc);
-
- if (sp->m_errtext)
- {
- set_last_error (sp->m_errtext->m_text, error_get_token (sp->m_errtext, di, text,
- ind), ind);
-
- return mr_error_raised;
- }
-
- return mr_not_matched;
- }
-
- if (status == mr_matched)
- {
- if (sp->m_emits != NULL) {
- const byte ch = (ind <= 0) ? 0 : text[ind - 1];
- if (emit_push (sp->m_emits, _BP->_F + _P, ch, save_ind, &ctx))
- {
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_internal_error;
- }
-
- }
- _P = _P2;
- }
-
- /* if the rule operator is a logical or, we pick up the first matching specifier */
- if (ru->m_oper == op_or && (status == mr_matched || status == mr_dont_emit))
- {
- *index = ind;
- *rbc = ctx;
- if (!filtering_string)
- *_PP = _P;
- return mr_matched;
- }
-
- sp = sp->next;
- }
-
- /* everything went fine - all specifiers match up */
- if (ru->m_oper == op_and && (status == mr_matched || status == mr_dont_emit))
- {
- *index = ind;
- *rbc = ctx;
- if (!filtering_string)
- *_PP = _P;
- return mr_matched;
- }
-
- free_regbyte_ctx_stack (ctx, *rbc);
- return mr_not_matched;
-}
-
-static byte *
-error_get_token (error *er, dict *di, const byte *text, int ind)
-{
- byte *str = NULL;
-
- if (er->m_token)
- {
- barray *ba;
- int filter_index = 0;
- regbyte_ctx *ctx = NULL;
-
- barray_create (&ba);
- if (ba != NULL)
- {
- if (match (di, text + ind, &filter_index, er->m_token, &ba, 0, &ctx) == mr_matched &&
- filter_index)
- {
- str = (byte *) mem_alloc (filter_index + 1);
- if (str != NULL)
- {
- str_copy_n (str, text + ind, filter_index);
- str[filter_index] = '\0';
- }
- }
- barray_destroy (&ba);
- }
- }
-
- return str;
-}
-
-typedef struct grammar_load_state_
-{
- dict *di;
- byte *syntax_symbol;
- byte *string_symbol;
- map_str *maps;
- map_byte *mapb;
- map_rule *mapr;
-} grammar_load_state;
-
-static void grammar_load_state_create (grammar_load_state **gr)
-{
- *gr = (grammar_load_state *) mem_alloc (sizeof (grammar_load_state));
- if (*gr)
- {
- (**gr).di = NULL;
- (**gr).syntax_symbol = NULL;
- (**gr).string_symbol = NULL;
- (**gr).maps = NULL;
- (**gr).mapb = NULL;
- (**gr).mapr = NULL;
- }
-}
-
-static void grammar_load_state_destroy (grammar_load_state **gr)
-{
- if (*gr)
- {
- dict_destroy (&(**gr).di);
- mem_free ((void **) &(**gr).syntax_symbol);
- mem_free ((void **) &(**gr).string_symbol);
- map_str_destroy (&(**gr).maps);
- map_byte_destroy (&(**gr).mapb);
- map_rule_destroy (&(**gr).mapr);
- mem_free ((void **) gr);
- }
-}
-
-
-static void error_msg(int line, const char *msg)
-{
- fprintf(stderr, "Error in grammar_load_from_text() at line %d: %s\n", line, msg);
-}
-
-
-/*
- the API
-*/
-grammar grammar_load_from_text (const byte *text)
-{
- grammar_load_state *g = NULL;
- grammar id = 0;
-
- clear_last_error ();
-
- grammar_load_state_create (&g);
- if (g == NULL) {
- error_msg(__LINE__, "");
- return 0;
- }
-
- dict_create (&g->di);
- if (g->di == NULL)
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
-
- eat_spaces (&text);
-
- /* skip ".syntax" keyword */
- text += 7;
- eat_spaces (&text);
-
- /* retrieve root symbol */
- if (get_identifier (&text, &g->syntax_symbol))
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
- eat_spaces (&text);
-
- /* skip semicolon */
- text++;
- eat_spaces (&text);
-
- while (*text)
- {
- byte *symbol = NULL;
- int is_dot = *text == '.';
-
- if (is_dot)
- text++;
-
- if (get_identifier (&text, &symbol))
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
- eat_spaces (&text);
-
- /* .emtcode */
- if (is_dot && str_equal (symbol, (byte *) "emtcode"))
- {
- map_byte *ma = NULL;
-
- mem_free ((void **) (void *) &symbol);
-
- if (get_emtcode (&text, &ma))
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
-
- map_byte_append (&g->mapb, ma);
- }
- /* .regbyte */
- else if (is_dot && str_equal (symbol, (byte *) "regbyte"))
- {
- map_byte *ma = NULL;
-
- mem_free ((void **) (void *) &symbol);
-
- if (get_regbyte (&text, &ma))
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
-
- map_byte_append (&g->di->m_regbytes, ma);
- }
- /* .errtext */
- else if (is_dot && str_equal (symbol, (byte *) "errtext"))
- {
- map_str *ma = NULL;
-
- mem_free ((void **) (void *) &symbol);
-
- if (get_errtext (&text, &ma))
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
-
- map_str_append (&g->maps, ma);
- }
- /* .string */
- else if (is_dot && str_equal (symbol, (byte *) "string"))
- {
- mem_free ((void **) (void *) &symbol);
-
- if (g->di->m_string != NULL)
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
-
- if (get_identifier (&text, &g->string_symbol))
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
-
- /* skip semicolon */
- eat_spaces (&text);
- text++;
- eat_spaces (&text);
- }
- else
- {
- rule *ru = NULL;
- map_rule *ma = NULL;
-
- if (get_rule (&text, &ru, g->maps, g->mapb))
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
-
- rule_append (&g->di->m_rulez, ru);
-
- /* if a rule consist of only one specifier, give it an ".and" operator */
- if (ru->m_oper == op_none)
- ru->m_oper = op_and;
-
- map_rule_create (&ma);
- if (ma == NULL)
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "");
- return 0;
- }
-
- ma->key = symbol;
- ma->data = ru;
- map_rule_append (&g->mapr, ma);
- }
- }
-
- if (update_dependencies (g->di, g->mapr, &g->syntax_symbol, &g->string_symbol,
- g->di->m_regbytes))
- {
- grammar_load_state_destroy (&g);
- error_msg(__LINE__, "update_dependencies() failed");
- return 0;
- }
-
- dict_append (&g_dicts, g->di);
- id = g->di->m_id;
- g->di = NULL;
-
- grammar_load_state_destroy (&g);
-
- return id;
-}
-
-int grammar_set_reg8 (grammar id, const byte *name, byte value)
-{
- dict *di = NULL;
- map_byte *reg = NULL;
-
- clear_last_error ();
-
- dict_find (&g_dicts, id, &di);
- if (di == NULL)
- {
- set_last_error (INVALID_GRAMMAR_ID, NULL, -1);
- return 0;
- }
-
- reg = map_byte_locate (&di->m_regbytes, name);
- if (reg == NULL)
- {
- set_last_error (INVALID_REGISTER_NAME, str_duplicate (name), -1);
- return 0;
- }
-
- reg->data = value;
- return 1;
-}
-
-/*
- internal checking function used by both grammar_check and grammar_fast_check functions
-*/
-static int _grammar_check (grammar id, const byte *text, byte **prod, unsigned int *size,
- unsigned int estimate_prod_size, int use_fast_path)
-{
- dict *di = NULL;
- int index = 0;
-
- clear_last_error ();
-
- dict_find (&g_dicts, id, &di);
- if (di == NULL)
- {
- set_last_error (INVALID_GRAMMAR_ID, NULL, -1);
- return 0;
- }
-
- *prod = NULL;
- *size = 0;
-
- if (use_fast_path)
- {
- regbyte_ctx *rbc = NULL;
- bytepool *bp = NULL;
- int _P = 0;
-
- bytepool_create (&bp, estimate_prod_size);
- if (bp == NULL)
- return 0;
-
- if (fast_match (di, text, &index, di->m_syntax, &_P, bp, 0, &rbc) != mr_matched)
- {
- bytepool_destroy (&bp);
- free_regbyte_ctx_stack (rbc, NULL);
- return 0;
- }
-
- free_regbyte_ctx_stack (rbc, NULL);
-
- *prod = bp->_F;
- *size = _P;
- bp->_F = NULL;
- bytepool_destroy (&bp);
- }
- else
- {
- regbyte_ctx *rbc = NULL;
- barray *ba = NULL;
-
- barray_create (&ba);
- if (ba == NULL)
- return 0;
-
- if (match (di, text, &index, di->m_syntax, &ba, 0, &rbc) != mr_matched)
- {
- barray_destroy (&ba);
- free_regbyte_ctx_stack (rbc, NULL);
- return 0;
- }
-
- free_regbyte_ctx_stack (rbc, NULL);
-
- *prod = (byte *) mem_alloc (ba->len * sizeof (byte));
- if (*prod == NULL)
- {
- barray_destroy (&ba);
- return 0;
- }
-
- mem_copy (*prod, ba->data, ba->len * sizeof (byte));
- *size = ba->len;
- barray_destroy (&ba);
- }
-
- return 1;
-}
-
-int grammar_check (grammar id, const byte *text, byte **prod, unsigned int *size)
-{
- return _grammar_check (id, text, prod, size, 0, 0);
-}
-
-int grammar_fast_check (grammar id, const byte *text, byte **prod, unsigned int *size,
- unsigned int estimate_prod_size)
-{
- return _grammar_check (id, text, prod, size, estimate_prod_size, 1);
-}
-
-int grammar_destroy (grammar id)
-{
- dict **di = &g_dicts;
-
- clear_last_error ();
-
- while (*di != NULL)
- {
- if ((**di).m_id == id)
- {
- dict *tmp = *di;
- *di = (**di).next;
- dict_destroy (&tmp);
- return 1;
- }
-
- di = &(**di).next;
- }
-
- set_last_error (INVALID_GRAMMAR_ID, NULL, -1);
- return 0;
-}
-
-static void append_character (const char x, byte *text, int *dots_made, int *len, int size)
-{
- if (*dots_made == 0)
- {
- if (*len < size - 1)
- {
- text[(*len)++] = x;
- text[*len] = '\0';
- }
- else
- {
- int i;
- for (i = 0; i < 3; i++)
- if (--(*len) >= 0)
- text[*len] = '.';
- *dots_made = 1;
- }
- }
-}
-
-void grammar_get_last_error (byte *text, unsigned int size, int *pos)
-{
- int len = 0, dots_made = 0;
- const byte *p = error_message;
-
- *text = '\0';
-
- if (p)
- {
- while (*p)
- {
- if (*p == '$')
- {
- const byte *r = error_param;
-
- while (*r)
- {
- append_character (*r++, text, &dots_made, &len, (int) size);
- }
-
- p++;
- }
- else
- {
- append_character (*p++, text, &dots_made, &len, size);
- }
- }
- }
-
- *pos = error_position;
-}
diff --git a/src/mesa/shader/grammar/grammar.h b/src/mesa/shader/grammar/grammar.h
deleted file mode 100644
index 591e38aefa6..00000000000
--- a/src/mesa/shader/grammar/grammar.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.2
- *
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef GRAMMAR_H
-#define GRAMMAR_H
-
-
-#ifndef GRAMMAR_PORT_INCLUDE
-#error Do not include this file directly, include your grammar_XXX.h instead
-#endif
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void grammar_alloc_free (void *);
-void *grammar_alloc_malloc (size_t);
-void *grammar_alloc_realloc (void *, size_t, size_t);
-void *grammar_memory_copy (void *, const void *, size_t);
-int grammar_string_compare (const byte *, const byte *);
-int grammar_string_compare_n (const byte *, const byte *, size_t);
-byte *grammar_string_copy (byte *, const byte *);
-byte *grammar_string_copy_n (byte *, const byte *, size_t);
-byte *grammar_string_duplicate (const byte *);
-unsigned int grammar_string_length (const byte *);
-
-/*
- loads grammar script from null-terminated ASCII <text>
- returns unique grammar id to grammar object
- returns 0 if an error occurs (call grammar_get_last_error to retrieve the error text)
-*/
-grammar grammar_load_from_text (const byte *text);
-
-/*
- sets a new <value> to a register <name> for grammar <id>
- returns 0 on error (call grammar_get_last_error to retrieve the error text)
- returns 1 on success
-*/
-int grammar_set_reg8 (grammar id, const byte *name, byte value);
-
-/*
- this function is obsolete, use only for debugging purposes
-
- checks if a null-terminated <text> matches given grammar <id>
- returns 0 on error (call grammar_get_last_error to retrieve the error text)
- returns 1 on success, the <prod> points to newly allocated buffer with production and <size>
- is filled with the production size
- call grammar_alloc_free to free the memory block pointed by <prod>
-*/
-int grammar_check (grammar id, const byte *text, byte **prod, unsigned int *size);
-
-/*
- does the same what grammar_check does but much more (approx. 4 times) faster
- use this function instead of grammar_check
- <estimate_prod_size> is a hint - the initial production buffer size will be of this size,
- but if more room is needed it will be safely resized; set it to 0x1000 or so
-*/
-int grammar_fast_check (grammar id, const byte *text, byte **prod, unsigned int *size,
- unsigned int estimate_prod_size);
-
-/*
- destroys grammar object identified by <id>
- returns 0 on error (call grammar_get_last_error to retrieve the error text)
- returns 1 on success
-*/
-int grammar_destroy (grammar id);
-
-/*
- retrieves last grammar error reported either by grammar_load_from_text, grammar_check
- or grammar_destroy
- the user allocated <text> buffer receives error description, <pos> points to error position,
- <size> is the size of the text buffer to fill in - it must be at least 4 bytes long,
-*/
-void grammar_get_last_error (byte *text, unsigned int size, int *pos);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/src/mesa/shader/grammar/grammar.syn b/src/mesa/shader/grammar/grammar.syn
deleted file mode 100644
index 5d99f65bfce..00000000000
--- a/src/mesa/shader/grammar/grammar.syn
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.2
- *
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
- /**
- * \file grammar.syn
- * syntax of .syn script - used to validate other syntax files
- * \author Michal Krol
- */
-
-.syntax grammar;
-
-/* declaration */
-.emtcode DECLARATION_END 0
-.emtcode DECLARATION_EMITCODE 1
-.emtcode DECLARATION_ERRORTEXT 2
-.emtcode DECLARATION_REGBYTE 3
-.emtcode DECLARATION_LEXER 4
-.emtcode DECLARATION_RULE 5
-
-/* specifier */
-.emtcode SPECIFIER_END 0
-.emtcode SPECIFIER_AND_TAG 1
-.emtcode SPECIFIER_OR_TAG 2
-.emtcode SPECIFIER_CHARACTER_RANGE 3
-.emtcode SPECIFIER_CHARACTER 4
-.emtcode SPECIFIER_STRING 5
-.emtcode SPECIFIER_IDENTIFIER 6
-.emtcode SPECIFIER_TRUE 7
-.emtcode SPECIFIER_FALSE 8
-.emtcode SPECIFIER_DEBUG 9
-
-/* identifier */
-.emtcode IDENTIFIER_SIMPLE 0
-.emtcode IDENTIFIER_LOOP 1
-
-/* error */
-.emtcode ERROR_NOT_PRESENT 0
-.emtcode ERROR_PRESENT 1
-
-/* emit */
-.emtcode EMIT_NULL 0
-.emtcode EMIT_INTEGER 1
-.emtcode EMIT_IDENTIFIER 2
-.emtcode EMIT_CHARACTER 3
-.emtcode EMIT_LAST_CHARACTER 4
-.emtcode EMIT_CURRENT_POSITION 5
-
-.errtext INVALID_GRAMMAR "internal error 2001: invalid grammar script"
-.errtext SYNTAX_EXPECTED "internal error 2002: '.syntax' keyword expected"
-.errtext IDENTIFIER_EXPECTED "internal error 2003: identifier expected"
-.errtext MISSING_SEMICOLON "internal error 2004: missing ';'"
-.errtext INTEGER_EXPECTED "internal error 2005: integer value expected"
-.errtext STRING_EXPECTED "internal error 2006: string expected"
-
-/*
- <grammar> ::= ".syntax" <identifier> ";" <declaration_list>
-*/
-grammar
- grammar_1 .error INVALID_GRAMMAR;
-grammar_1
- optional_space .and ".syntax" .error SYNTAX_EXPECTED .and space .and identifier .and
- semicolon .and declaration_list .and optional_space .and '\0' .emit DECLARATION_END;
-
-/*
- <optional_space> ::= <space>
- | ""
-*/
-optional_space
- space .or .true;
-
-/*
- <space> ::= <single_space> <single_space>*
-*/
-space
- single_space .and .loop single_space;
-
-/*
- <single_space> ::= <white_char>
- | <comment_block>
-*/
-single_space
- white_char .or comment_block;
-
-/*
- <white_char> ::= " "
- | "\t"
- | "\n"
- | "\r"
-*/
-white_char
- ' ' .or '\t' .or '\n' .or '\r';
-
-/*
- <comment_block> ::= "/" "*" <comment_rest>
-*/
-comment_block
- '/' .and '*' .and comment_rest;
-
-/*
- <comment_rest> ::= <comment_char_no_star>* <comment_end>
- | <comment_char_no_star>* "*" <comment_rest>
-*/
-comment_rest
- .loop comment_char_no_star .and comment_rest_1;
-comment_rest_1
- comment_end .or comment_rest_2;
-comment_rest_2
- '*' .and comment_rest;
-
-/*
- <comment_char_no_star> ::= All ASCII characters except "*" and "\0"
-*/
-comment_char_no_star
- '\x2B'-'\xFF' .or '\x01'-'\x29';
-
-/*
- <comment_end> ::= "*" "/"
-*/
-comment_end
- '*' .and '/';
-
-/*
- <identifier> ::= <identifier>
-*/
-identifier
- identifier_ne .error IDENTIFIER_EXPECTED;
-
-/*
- <identifier_ne> ::= <first_idchar> <follow_idchar>*
-*/
-identifier_ne
- first_idchar .emit * .and .loop follow_idchar .emit * .and .true .emit '\0';
-
-/*
- <first_idchar> ::= "a"-"z"
- | "A"-"Z"
- | "_"
-*/
-first_idchar
- 'a'-'z' .or 'A'-'Z' .or '_';
-
-/*
- <follow_idchar> ::= <first_idchar>
- | <digit_dec>
-*/
-follow_idchar
- first_idchar .or digit_dec;
-
-/*
- <digit_dec> ::= "0"-"9"
-*/
-digit_dec
- '0'-'9';
-
-/*
- <semicolon> ::= ";"
-*/
-semicolon
- optional_space .and ';' .error MISSING_SEMICOLON .and optional_space;
-
-/*
- <declaration_list> ::= <declaration>
- | <declaration_list> <declaration>
-*/
-declaration_list
- declaration .and .loop declaration;
-
-/*
- <declaration> ::= <emitcode_definition>
- | <errortext_definition>
- | <lexer_definition>
- | <rule_definition>
-*/
-declaration
- emitcode_definition .emit DECLARATION_EMITCODE .or
- errortext_definition .emit DECLARATION_ERRORTEXT .or
- regbyte_definition .emit DECLARATION_REGBYTE .or
- lexer_definition .emit DECLARATION_LEXER .or
- rule_definition .emit DECLARATION_RULE;
-
-/*
- <emitcode_definition> ::= ".emtcode" <identifier> <integer>
-*/
-emitcode_definition
- ".emtcode" .and space .and identifier .and space .and integer .and space_or_null;
-
-/*
- <integer> ::= <integer_ne>
-*/
-integer
- integer_ne .error INTEGER_EXPECTED;
-
-/*
- <integer_ne> ::= <hex_integer>
- | <dec_integer>
-*/
-integer_ne
- hex_integer .emit 0x10 .or dec_integer .emit 10;
-
-/*
- <hex_integer> :: <hex_prefix> <digit_hex> <digit_hex>*
-*/
-hex_integer
- hex_prefix .and digit_hex .emit * .and .loop digit_hex .emit * .and .true .emit '\0';
-
-/*
- <hex_prefix> ::= "0x"
- | "0X"
-*/
-hex_prefix
- '0' .and hex_prefix_1;
-hex_prefix_1
- 'x' .or 'X';
-
-/*
- <digit_hex> ::= "0"-"9"
- | "a"-"f"
- | "A"-"F"
-*/
-digit_hex
- '0'-'9' .or 'a'-'f' .or 'A'-'F';
-
-/*
- <dec_integer> :: <digit_dec> <digit_dec>*
-*/
-dec_integer
- digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\0';
-
-/*
- <space_or_null> ::= <space>
- | "\0"
-*/
-space_or_null
- space .or '\0';
-
-/*
- <errortext_definition> ::= ".errtext" <identifier> <string>
-*/
-errortext_definition
- ".errtext" .and space .and identifier .and space .and string .and space_or_null;
-
-/*
- <string> ::= <string_ne>
-*/
-string
- string_ne .error STRING_EXPECTED;
-
-/*
- <string_ne> ::= "\"" <string_char_double_quotes> "\""
-*/
-string_ne
- '"' .and .loop string_char_double_quotes .and '"' .emit '\0';
-
-/*
- <string_char_double_quotes> ::= <escape_sequence>
- | <string_char>
- | "\'"
-*/
-string_char_double_quotes
- escape_sequence .or string_char .emit * .or '\'' .emit *;
-
-/*
- <string_char> ::= All ASCII characters except "\'", "\"", "\n", "\r",
- "\0" and "\\"
-*/
-string_char
- '\x5D'-'\xFF' .or '\x28'-'\x5B' .or '\x23'-'\x26' .or '\x0E'-'\x21' .or '\x0B'-'\x0C' .or
- '\x01'-'\x09';
-
-/*
- <escape_sequence> ::= "\\" <escape_code>
-*/
-escape_sequence
- '\\' .emit * .and escape_code;
-
-/*
- <escape_code> ::= <simple_escape_code>
- | <hex_escape_code>
- | <oct_escape_code>
-*/
-escape_code
- simple_escape_code .emit * .or hex_escape_code .or oct_escape_code;
-
-/*
- <simple_escape_code> ::= "\'"
- | "\""
- | "?"
- | "\\"
- | "a"
- | "b"
- | "f"
- | "n"
- | "r"
- | "t"
- | "v"
-*/
-simple_escape_code
- '\'' .or '"' .or '?' .or '\\' .or 'a' .or 'b' .or 'f' .or 'n' .or 'r' .or 't' .or 'v';
-
-/*
- <hex_escape_code> ::= "x" <digit_hex> <digit_hex>*
-*/
-hex_escape_code
- 'x' .emit * .and digit_hex .emit * .and .loop digit_hex .emit *;
-
-/*
- <oct_escape_code> ::= <digit_oct> <optional_digit_oct> <optional_digit_oct>
-*/
-oct_escape_code
- digit_oct .emit * .and optional_digit_oct .and optional_digit_oct;
-
-/*
- <digit_oct> ::= "0"-"7"
-*/
-digit_oct
- '0'-'7';
-
-/*
- <optional_digit_oct> ::= <digit_oct>
- | ""
-*/
-optional_digit_oct
- digit_oct .emit * .or .true;
-
-/*
- <regbyte_definition> ::= ".regbyte" <identifier> <integer>
-*/
-regbyte_definition
- ".regbyte" .and space .and identifier .and space .and integer .and space_or_null;
-
-/*
- <lexer_definition> ::= ".string" <identifier> ";"
-*/
-lexer_definition
- ".string" .and space .and identifier .and semicolon;
-
-/*
- <rule_definition> ::= <identifier_ne> <definition>
-*/
-rule_definition
- identifier_ne .and space .and definition;
-
-/*
- <definition> ::= <specifier> <optional_specifiers_and_or> ";"
-*/
-definition
- specifier .and optional_specifiers_and_or .and semicolon .emit SPECIFIER_END;
-
-/*
- <optional_specifiers_and_or> ::= <and_specifiers>
- | <or_specifiers>
- | ""
-*/
-optional_specifiers_and_or
- and_specifiers .emit SPECIFIER_AND_TAG .or or_specifiers .emit SPECIFIER_OR_TAG .or .true;
-
-/*
- <specifier> ::= <specifier_condition> <specifier_rule>
-*/
-specifier
- specifier_condition .and optional_space .and specifier_rule;
-
-/*
- <specifier_condition> ::= ".if" "(" <left_operand> <operator> <right_operand> ")"
-*/
-specifier_condition
- specifier_condition_1 .or .true;
-specifier_condition_1
- ".if" .and optional_space .and '(' .and optional_space .and left_operand .and operator .and
- right_operand .and optional_space .and ')';
-
-/*
- <left_operand> ::= <identifier>
-*/
-left_operand
- identifier;
-
-/*
- <operator> ::= "!="
- | "=="
-*/
-operator
- operator_1 .or operator_2;
-operator_1
- optional_space .and '!' .and '=' .and optional_space;
-operator_2
- optional_space .and '=' .and '=' .and optional_space;
-
-/*
- <right_operand> ::= <integer>
-*/
-right_operand
- integer;
-
-/*
- <specifier_rule> ::= <character_range> <optional_error> <emit>*
- | <character> <optional_error> <emit>*
- | <string> <optional_error> <emit>*
- | ".true" <optional_error> <emit>*
- | ".false" <optional_error> <emit>*
- | ".debug" <optional_error> <emit>*
- | <advanced_identifier> <optional_error> <emit>*
-*/
-specifier_rule
- specifier_rule_1 .and optional_error .and .loop emit .and .true .emit EMIT_NULL;
-specifier_rule_1
- character_range .emit SPECIFIER_CHARACTER_RANGE .or
- character .emit SPECIFIER_CHARACTER .or
- string_ne .emit SPECIFIER_STRING .or
- ".true" .emit SPECIFIER_TRUE .or
- ".false" .emit SPECIFIER_FALSE .or
- ".debug" .emit SPECIFIER_DEBUG .or
- advanced_identifier .emit SPECIFIER_IDENTIFIER;
-
-/*
- <character> ::= "\'" <string_char_single_quotes "\'"
-*/
-character
- '\'' .and string_char_single_quotes .and '\'' .emit '\0';
-
-/*
- <string_char_single_quotes> ::= <escape_sequence>
- | <string_char>
- | "\""
-*/
-string_char_single_quotes
- escape_sequence .or string_char .emit * .or '"' .emit *;
-
-/*
- <character_range> ::= <character> "-" <character>
-*/
-character_range
- character .and optional_space .and '-' .and optional_space .and character;
-
-/*
- <advanced_identifier> ::= <optional_loop> <identifier>
-*/
-advanced_identifier
- optional_loop .and identifier;
-
-/*
- <optional_loop> ::= ".loop"
- | ""
-*/
-optional_loop
- optional_loop_1 .emit IDENTIFIER_LOOP .or .true .emit IDENTIFIER_SIMPLE;
-optional_loop_1
- ".loop" .and space;
-
-/*
- <optional_error> ::= <error>
- | ""
-*/
-optional_error
- error .emit ERROR_PRESENT .or .true .emit ERROR_NOT_PRESENT;
-
-/*
- <error> :: ".error" <identifier>
-*/
-error
- space .and ".error" .and space .and identifier;
-
-/*
- <emit> ::= <emit_output>
- | <emit_regbyte>
-*/
-emit
- emit_output .or emit_regbyte;
-
-/*
- <emit_output> ::= ".emit" <emit_param>
-*/
-emit_output
- space .and ".emit" .and space .and emit_param;
-
-/*
- <emit_param> ::= <integer>
- | <identifier>
- | <character>
- | "*"
- | "$"
-*/
-emit_param
- integer_ne .emit EMIT_INTEGER .or
- identifier_ne .emit EMIT_IDENTIFIER .or
- character .emit EMIT_CHARACTER .or
- '*' .emit EMIT_LAST_CHARACTER .or
- '$' .emit EMIT_CURRENT_POSITION;
-
-/*
- <emit_regbyte> ::= ".load" <identifier> <emit_param>
-*/
-emit_regbyte
- space .and ".load" .and space .and identifier .and space .and emit_param;
-
-/*
- <and_specifiers> ::= <and_specifier> <and_specifier>*
-*/
-and_specifiers
- and_specifier .and .loop and_specifier;
-
-/*
- <or_specifiers> ::= <or_specifier> <or_specifier>*
-*/
-or_specifiers
- or_specifier .and .loop or_specifier;
-
-/*
- <and_specifier> ::= ".and" <specifier>
-*/
-and_specifier
- space .and ".and" .and space .and specifier;
-
-/*
- <or_specifier> ::= ".or" <specifier>
-*/
-or_specifier
- space .and ".or" .and space .and specifier;
-
-
-.string __string_filter;
-
-/*
- <__string_filter> ::= <__first_identifier_char> <__next_identifier_char>*
-*/
-__string_filter
- __first_identifier_char .and .loop __next_identifier_char;
-
-/*
- <__first_identifier_char> ::= "a"-"z"
- | "A"-"Z"
- | "_"
- | "."
-*/
-__first_identifier_char
- 'a'-'z' .or 'A'-'Z' .or '_' .or '.';
-
-/*
- <__next_identifier_char> ::= "a"-"z"
- | "A"-"Z"
- | "_"
- | "0"-"9"
-*/
-__next_identifier_char
- 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';
-
diff --git a/src/mesa/shader/grammar/grammar_crt.c b/src/mesa/shader/grammar/grammar_crt.c
deleted file mode 100644
index d2c95d1c8e7..00000000000
--- a/src/mesa/shader/grammar/grammar_crt.c
+++ /dev/null
@@ -1,64 +0,0 @@
-#include "grammar_crt.h"
-
-#define GRAMMAR_PORT_BUILD 1
-#include "grammar.c"
-#undef GRAMMAR_PORT_BUILD
-
-
-void grammar_alloc_free (void *ptr)
-{
- free (ptr);
-}
-
-void *grammar_alloc_malloc (size_t size)
-{
- return malloc (size);
-}
-
-void *grammar_alloc_realloc (void *ptr, size_t old_size, size_t size)
-{
- return realloc (ptr, size);
-}
-
-void *grammar_memory_copy (void *dst, const void * src, size_t size)
-{
- return memcpy (dst, src, size);
-}
-
-int grammar_string_compare (const byte *str1, const byte *str2)
-{
- return strcmp ((const char *) str1, (const char *) str2);
-}
-
-int grammar_string_compare_n (const byte *str1, const byte *str2, size_t n)
-{
- return strncmp ((const char *) str1, (const char *) str2, n);
-}
-
-byte *grammar_string_copy (byte *dst, const byte *src)
-{
- return (byte *) strcpy ((char *) dst, (const char *) src);
-}
-
-byte *grammar_string_copy_n (byte *dst, const byte *src, size_t n)
-{
- return (byte *) strncpy ((char *) dst, (const char *) src, n);
-}
-
-unsigned int grammar_string_length (const byte *str)
-{
- return strlen ((const char *) str);
-}
-
-byte *grammar_string_duplicate (const byte *src)
-{
- const unsigned int size = grammar_string_length (src);
- byte *str = grammar_alloc_malloc (size + 1);
- if (str != NULL)
- {
- grammar_memory_copy (str, src, size);
- str[size] = '\0';
- }
- return str;
-}
-
diff --git a/src/mesa/shader/grammar/grammar_crt.h b/src/mesa/shader/grammar/grammar_crt.h
deleted file mode 100644
index 492711e96ae..00000000000
--- a/src/mesa/shader/grammar/grammar_crt.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef GRAMMAR_CRT_H
-#define GRAMMAR_CRT_H
-
-
-#include <stdlib.h>
-#include <malloc.h>
-#include <string.h>
-
-
-typedef unsigned long grammar;
-typedef unsigned char byte;
-
-
-#define GRAMMAR_PORT_INCLUDE 1
-#include "grammar.h"
-#undef GRAMMAR_PORT_INCLUDE
-
-
-#endif
-
diff --git a/src/mesa/shader/grammar/grammar_mesa.c b/src/mesa/shader/grammar/grammar_mesa.c
deleted file mode 100644
index eb962505bfe..00000000000
--- a/src/mesa/shader/grammar/grammar_mesa.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.1
- *
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file grammar_mesa.c
- * mesa3d port to syntax parsing engine
- * \author Michal Krol
- */
-
-#include "grammar_mesa.h"
-
-#define GRAMMAR_PORT_BUILD 1
-#include "grammar.c"
-#undef GRAMMAR_PORT_BUILD
-
-
-void grammar_alloc_free (void *ptr)
-{
- _mesa_free (ptr);
-}
-
-void *grammar_alloc_malloc (size_t size)
-{
- return _mesa_malloc (size);
-}
-
-void *grammar_alloc_realloc (void *ptr, size_t old_size, size_t size)
-{
- return _mesa_realloc (ptr, old_size, size);
-}
-
-void *grammar_memory_copy (void *dst, const void * src, size_t size)
-{
- return _mesa_memcpy (dst, src, size);
-}
-
-int grammar_string_compare (const byte *str1, const byte *str2)
-{
- return _mesa_strcmp ((const char *) str1, (const char *) str2);
-}
-
-int grammar_string_compare_n (const byte *str1, const byte *str2, size_t n)
-{
- return _mesa_strncmp ((const char *) str1, (const char *) str2, n);
-}
-
-byte *grammar_string_copy (byte *dst, const byte *src)
-{
- return (byte *) _mesa_strcpy ((char *) dst, (const char *) src);
-}
-
-byte *grammar_string_copy_n (byte *dst, const byte *src, size_t n)
-{
- return (byte *) _mesa_strncpy ((char *) dst, (const char *) src, n);
-}
-
-byte *grammar_string_duplicate (const byte *src)
-{
- return (byte *) _mesa_strdup ((const char *) src);
-}
-
-unsigned int grammar_string_length (const byte *str)
-{
- return (unsigned int)_mesa_strlen ((const char *) str);
-}
-
diff --git a/src/mesa/shader/grammar/grammar_mesa.h b/src/mesa/shader/grammar/grammar_mesa.h
deleted file mode 100644
index 6c92c5812da..00000000000
--- a/src/mesa/shader/grammar/grammar_mesa.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.1
- *
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef GRAMMAR_MESA_H
-#define GRAMMAR_MESA_H
-
-
-#include "main/imports.h"
-/* NOTE: include Mesa 3-D specific headers here */
-
-
-typedef GLuint grammar;
-typedef GLubyte byte;
-
-
-#define GRAMMAR_PORT_INCLUDE 1
-#include "grammar.h"
-#undef GRAMMAR_PORT_INCLUDE
-
-
-#endif
-
diff --git a/src/mesa/shader/grammar/grammar_syn.h b/src/mesa/shader/grammar/grammar_syn.h
deleted file mode 100644
index 840a1ab62c2..00000000000
--- a/src/mesa/shader/grammar/grammar_syn.h
+++ /dev/null
@@ -1,202 +0,0 @@
-".syntax grammar;\n"
-".emtcode DECLARATION_END 0\n"
-".emtcode DECLARATION_EMITCODE 1\n"
-".emtcode DECLARATION_ERRORTEXT 2\n"
-".emtcode DECLARATION_REGBYTE 3\n"
-".emtcode DECLARATION_LEXER 4\n"
-".emtcode DECLARATION_RULE 5\n"
-".emtcode SPECIFIER_END 0\n"
-".emtcode SPECIFIER_AND_TAG 1\n"
-".emtcode SPECIFIER_OR_TAG 2\n"
-".emtcode SPECIFIER_CHARACTER_RANGE 3\n"
-".emtcode SPECIFIER_CHARACTER 4\n"
-".emtcode SPECIFIER_STRING 5\n"
-".emtcode SPECIFIER_IDENTIFIER 6\n"
-".emtcode SPECIFIER_TRUE 7\n"
-".emtcode SPECIFIER_FALSE 8\n"
-".emtcode SPECIFIER_DEBUG 9\n"
-".emtcode IDENTIFIER_SIMPLE 0\n"
-".emtcode IDENTIFIER_LOOP 1\n"
-".emtcode ERROR_NOT_PRESENT 0\n"
-".emtcode ERROR_PRESENT 1\n"
-".emtcode EMIT_NULL 0\n"
-".emtcode EMIT_INTEGER 1\n"
-".emtcode EMIT_IDENTIFIER 2\n"
-".emtcode EMIT_CHARACTER 3\n"
-".emtcode EMIT_LAST_CHARACTER 4\n"
-".emtcode EMIT_CURRENT_POSITION 5\n"
-".errtext INVALID_GRAMMAR \"internal error 2001: invalid grammar script\"\n"
-".errtext SYNTAX_EXPECTED \"internal error 2002: '.syntax' keyword expected\"\n"
-".errtext IDENTIFIER_EXPECTED \"internal error 2003: identifier expected\"\n"
-".errtext MISSING_SEMICOLON \"internal error 2004: missing ';'\"\n"
-".errtext INTEGER_EXPECTED \"internal error 2005: integer value expected\"\n"
-".errtext STRING_EXPECTED \"internal error 2006: string expected\"\n"
-"grammar\n"
-" grammar_1 .error INVALID_GRAMMAR;\n"
-"grammar_1\n"
-" optional_space .and \".syntax\" .error SYNTAX_EXPECTED .and space .and identifier .and\n"
-" semicolon .and declaration_list .and optional_space .and '\\0' .emit DECLARATION_END;\n"
-"optional_space\n"
-" space .or .true;\n"
-"space\n"
-" single_space .and .loop single_space;\n"
-"single_space\n"
-" white_char .or comment_block;\n"
-"white_char\n"
-" ' ' .or '\\t' .or '\\n' .or '\\r';\n"
-"comment_block\n"
-" '/' .and '*' .and comment_rest;\n"
-"comment_rest\n"
-" .loop comment_char_no_star .and comment_rest_1;\n"
-"comment_rest_1\n"
-" comment_end .or comment_rest_2;\n"
-"comment_rest_2\n"
-" '*' .and comment_rest;\n"
-"comment_char_no_star\n"
-" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"
-"comment_end\n"
-" '*' .and '/';\n"
-"identifier\n"
-" identifier_ne .error IDENTIFIER_EXPECTED;\n"
-"identifier_ne\n"
-" first_idchar .emit * .and .loop follow_idchar .emit * .and .true .emit '\\0';\n"
-"first_idchar\n"
-" 'a'-'z' .or 'A'-'Z' .or '_';\n"
-"follow_idchar\n"
-" first_idchar .or digit_dec;\n"
-"digit_dec\n"
-" '0'-'9';\n"
-"semicolon\n"
-" optional_space .and ';' .error MISSING_SEMICOLON .and optional_space;\n"
-"declaration_list\n"
-" declaration .and .loop declaration;\n"
-"declaration\n"
-" emitcode_definition .emit DECLARATION_EMITCODE .or\n"
-" errortext_definition .emit DECLARATION_ERRORTEXT .or\n"
-" regbyte_definition .emit DECLARATION_REGBYTE .or\n"
-" lexer_definition .emit DECLARATION_LEXER .or\n"
-" rule_definition .emit DECLARATION_RULE;\n"
-"emitcode_definition\n"
-" \".emtcode\" .and space .and identifier .and space .and integer .and space_or_null;\n"
-"integer\n"
-" integer_ne .error INTEGER_EXPECTED;\n"
-"integer_ne\n"
-" hex_integer .emit 0x10 .or dec_integer .emit 10;\n"
-"hex_integer\n"
-" hex_prefix .and digit_hex .emit * .and .loop digit_hex .emit * .and .true .emit '\\0';\n"
-"hex_prefix\n"
-" '0' .and hex_prefix_1;\n"
-"hex_prefix_1\n"
-" 'x' .or 'X';\n"
-"digit_hex\n"
-" '0'-'9' .or 'a'-'f' .or 'A'-'F';\n"
-"dec_integer\n"
-" digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
-"space_or_null\n"
-" space .or '\\0';\n"
-"errortext_definition\n"
-" \".errtext\" .and space .and identifier .and space .and string .and space_or_null;\n"
-"string\n"
-" string_ne .error STRING_EXPECTED;\n"
-"string_ne\n"
-" '\"' .and .loop string_char_double_quotes .and '\"' .emit '\\0';\n"
-"string_char_double_quotes\n"
-" escape_sequence .or string_char .emit * .or '\\'' .emit *;\n"
-"string_char\n"
-" '\\x5D'-'\\xFF' .or '\\x28'-'\\x5B' .or '\\x23'-'\\x26' .or '\\x0E'-'\\x21' .or '\\x0B'-'\\x0C' .or\n"
-" '\\x01'-'\\x09';\n"
-"escape_sequence\n"
-" '\\\\' .emit * .and escape_code;\n"
-"escape_code\n"
-" simple_escape_code .emit * .or hex_escape_code .or oct_escape_code;\n"
-"simple_escape_code\n"
-" '\\'' .or '\"' .or '?' .or '\\\\' .or 'a' .or 'b' .or 'f' .or 'n' .or 'r' .or 't' .or 'v';\n"
-"hex_escape_code\n"
-" 'x' .emit * .and digit_hex .emit * .and .loop digit_hex .emit *;\n"
-"oct_escape_code\n"
-" digit_oct .emit * .and optional_digit_oct .and optional_digit_oct;\n"
-"digit_oct\n"
-" '0'-'7';\n"
-"optional_digit_oct\n"
-" digit_oct .emit * .or .true;\n"
-"regbyte_definition\n"
-" \".regbyte\" .and space .and identifier .and space .and integer .and space_or_null;\n"
-"lexer_definition\n"
-" \".string\" .and space .and identifier .and semicolon;\n"
-"rule_definition\n"
-" identifier_ne .and space .and definition;\n"
-"definition\n"
-" specifier .and optional_specifiers_and_or .and semicolon .emit SPECIFIER_END;\n"
-"optional_specifiers_and_or\n"
-" and_specifiers .emit SPECIFIER_AND_TAG .or or_specifiers .emit SPECIFIER_OR_TAG .or .true;\n"
-"specifier\n"
-" specifier_condition .and optional_space .and specifier_rule;\n"
-"specifier_condition\n"
-" specifier_condition_1 .or .true;\n"
-"specifier_condition_1\n"
-" \".if\" .and optional_space .and '(' .and optional_space .and left_operand .and operator .and\n"
-" right_operand .and optional_space .and ')';\n"
-"left_operand\n"
-" identifier;\n"
-"operator\n"
-" operator_1 .or operator_2;\n"
-"operator_1\n"
-" optional_space .and '!' .and '=' .and optional_space;\n"
-"operator_2\n"
-" optional_space .and '=' .and '=' .and optional_space;\n"
-"right_operand\n"
-" integer;\n"
-"specifier_rule\n"
-" specifier_rule_1 .and optional_error .and .loop emit .and .true .emit EMIT_NULL;\n"
-"specifier_rule_1\n"
-" character_range .emit SPECIFIER_CHARACTER_RANGE .or\n"
-" character .emit SPECIFIER_CHARACTER .or\n"
-" string_ne .emit SPECIFIER_STRING .or\n"
-" \".true\" .emit SPECIFIER_TRUE .or\n"
-" \".false\" .emit SPECIFIER_FALSE .or\n"
-" \".debug\" .emit SPECIFIER_DEBUG .or\n"
-" advanced_identifier .emit SPECIFIER_IDENTIFIER;\n"
-"character\n"
-" '\\'' .and string_char_single_quotes .and '\\'' .emit '\\0';\n"
-"string_char_single_quotes\n"
-" escape_sequence .or string_char .emit * .or '\"' .emit *;\n"
-"character_range\n"
-" character .and optional_space .and '-' .and optional_space .and character;\n"
-"advanced_identifier\n"
-" optional_loop .and identifier;\n"
-"optional_loop\n"
-" optional_loop_1 .emit IDENTIFIER_LOOP .or .true .emit IDENTIFIER_SIMPLE;\n"
-"optional_loop_1\n"
-" \".loop\" .and space;\n"
-"optional_error\n"
-" error .emit ERROR_PRESENT .or .true .emit ERROR_NOT_PRESENT;\n"
-"error\n"
-" space .and \".error\" .and space .and identifier;\n"
-"emit\n"
-" emit_output .or emit_regbyte;\n"
-"emit_output\n"
-" space .and \".emit\" .and space .and emit_param;\n"
-"emit_param\n"
-" integer_ne .emit EMIT_INTEGER .or\n"
-" identifier_ne .emit EMIT_IDENTIFIER .or\n"
-" character .emit EMIT_CHARACTER .or\n"
-" '*' .emit EMIT_LAST_CHARACTER .or\n"
-" '$' .emit EMIT_CURRENT_POSITION;\n"
-"emit_regbyte\n"
-" space .and \".load\" .and space .and identifier .and space .and emit_param;\n"
-"and_specifiers\n"
-" and_specifier .and .loop and_specifier;\n"
-"or_specifiers\n"
-" or_specifier .and .loop or_specifier;\n"
-"and_specifier\n"
-" space .and \".and\" .and space .and specifier;\n"
-"or_specifier\n"
-" space .and \".or\" .and space .and specifier;\n"
-".string __string_filter;\n"
-"__string_filter\n"
-" __first_identifier_char .and .loop __next_identifier_char;\n"
-"__first_identifier_char\n"
-" 'a'-'z' .or 'A'-'Z' .or '_' .or '.';\n"
-"__next_identifier_char\n"
-" 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\n"
-""
diff --git a/src/mesa/shader/lex.yy.c b/src/mesa/shader/lex.yy.c
index 68543ae2e12..d1af35fedb6 100644
--- a/src/mesa/shader/lex.yy.c
+++ b/src/mesa/shader/lex.yy.c
@@ -1043,12 +1043,12 @@ static yyconst flex_int16_t yy_chk[1368] =
*/
#include "main/glheader.h"
#include "main/imports.h"
-#include "prog_instruction.h"
-#include "prog_statevars.h"
+#include "shader/prog_instruction.h"
+#include "shader/prog_statevars.h"
-#include "symbol_table.h"
-#include "program_parser.h"
-#include "program_parse.tab.h"
+#include "shader/symbol_table.h"
+#include "shader/program_parser.h"
+#include "shader/program_parse.tab.h"
#define require_ARB_vp (yyextra->mode == ARB_vertex)
#define require_ARB_fp (yyextra->mode == ARB_fragment)
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index fb29768935f..c212790dcd9 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -53,8 +53,18 @@
* Set x to positive or negative infinity.
*/
#if defined(USE_IEEE) || defined(_WIN32)
-#define SET_POS_INFINITY(x) ( *((GLuint *) (void *)&x) = 0x7F800000 )
-#define SET_NEG_INFINITY(x) ( *((GLuint *) (void *)&x) = 0xFF800000 )
+#define SET_POS_INFINITY(x) \
+ do { \
+ fi_type fi; \
+ fi.i = 0x7F800000; \
+ x = fi.f; \
+ } while (0)
+#define SET_NEG_INFINITY(x) \
+ do { \
+ fi_type fi; \
+ fi.i = 0xFF800000; \
+ x = fi.f; \
+ } while (0)
#elif defined(VMS)
#define SET_POS_INFINITY(x) x = __MAXFLOAT
#define SET_NEG_INFINITY(x) x = -__MAXFLOAT
@@ -695,9 +705,13 @@ _mesa_execute_program(GLcontext * ctx,
break;
case OPCODE_BGNLOOP:
/* no-op */
+ ASSERT(program->Instructions[inst->BranchTarget].Opcode
+ == OPCODE_ENDLOOP);
break;
case OPCODE_ENDLOOP:
/* subtract 1 here since pc is incremented by for(pc) loop */
+ ASSERT(program->Instructions[inst->BranchTarget].Opcode
+ == OPCODE_BGNLOOP);
pc = inst->BranchTarget - 1; /* go to matching BNGLOOP */
break;
case OPCODE_BGNSUB: /* begin subroutine */
@@ -705,12 +719,26 @@ _mesa_execute_program(GLcontext * ctx,
case OPCODE_ENDSUB: /* end subroutine */
break;
case OPCODE_BRA: /* branch (conditional) */
- /* fall-through */
+ if (eval_condition(machine, inst)) {
+ /* take branch */
+ /* Subtract 1 here since we'll do pc++ below */
+ pc = inst->BranchTarget - 1;
+ }
+ break;
case OPCODE_BRK: /* break out of loop (conditional) */
- /* fall-through */
+ ASSERT(program->Instructions[inst->BranchTarget].Opcode
+ == OPCODE_ENDLOOP);
+ if (eval_condition(machine, inst)) {
+ /* break out of loop */
+ /* pc++ at end of for-loop will put us after the ENDLOOP inst */
+ pc = inst->BranchTarget;
+ }
+ break;
case OPCODE_CONT: /* continue loop (conditional) */
+ ASSERT(program->Instructions[inst->BranchTarget].Opcode
+ == OPCODE_ENDLOOP);
if (eval_condition(machine, inst)) {
- /* take branch */
+ /* continue at ENDLOOP */
/* Subtract 1 here since we'll do pc++ at end of for-loop */
pc = inst->BranchTarget - 1;
}
@@ -903,6 +931,10 @@ _mesa_execute_program(GLcontext * ctx,
case OPCODE_IF:
{
GLboolean cond;
+ ASSERT(program->Instructions[inst->BranchTarget].Opcode
+ == OPCODE_ELSE ||
+ program->Instructions[inst->BranchTarget].Opcode
+ == OPCODE_ENDIF);
/* eval condition */
if (inst->SrcReg[0].File != PROGRAM_UNDEFINED) {
GLfloat a[4];
@@ -922,14 +954,16 @@ _mesa_execute_program(GLcontext * ctx,
else {
/* go to the instruction after ELSE or ENDIF */
assert(inst->BranchTarget >= 0);
- pc = inst->BranchTarget - 1;
+ pc = inst->BranchTarget;
}
}
break;
case OPCODE_ELSE:
/* goto ENDIF */
+ ASSERT(program->Instructions[inst->BranchTarget].Opcode
+ == OPCODE_ENDIF);
assert(inst->BranchTarget >= 0);
- pc = inst->BranchTarget - 1;
+ pc = inst->BranchTarget;
break;
case OPCODE_ENDIF:
/* nothing */
@@ -1657,7 +1691,7 @@ _mesa_execute_program(GLcontext * ctx,
{
const GLuint raw = fetch_vector1ui(&inst->SrcReg[0], machine);
GLfloat result[4];
- GLhalfNV hx, hy;
+ GLushort hx, hy;
hx = raw & 0xffff;
hy = raw >> 16;
result[0] = result[2] = _mesa_half_to_float(hx);
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 8b9466a5a61..ce411731b22 100644
--- a/src/mesa/shader/prog_optimize.c
+++ b/src/mesa/shader/prog_optimize.c
@@ -111,7 +111,6 @@ remove_instructions(struct gl_program *prog, const GLboolean *removeFlags)
if (removeCount > 0) {
GLint removeStart = removeEnd - removeCount + 1;
_mesa_delete_instructions(prog, removeStart, removeCount);
- removeStart = removeCount = 0; /* reset removal info */
}
return totalRemoved;
}
diff --git a/src/mesa/shader/program_lexer.l b/src/mesa/shader/program_lexer.l
index e2acb3c0c96..83bc5089d9e 100644
--- a/src/mesa/shader/program_lexer.l
+++ b/src/mesa/shader/program_lexer.l
@@ -23,12 +23,12 @@
*/
#include "main/glheader.h"
#include "main/imports.h"
-#include "prog_instruction.h"
-#include "prog_statevars.h"
+#include "shader/prog_instruction.h"
+#include "shader/prog_statevars.h"
-#include "symbol_table.h"
-#include "program_parser.h"
-#include "program_parse.tab.h"
+#include "shader/symbol_table.h"
+#include "shader/program_parser.h"
+#include "shader/program_parse.tab.h"
#define require_ARB_vp (yyextra->mode == ARB_vertex)
#define require_ARB_fp (yyextra->mode == ARB_fragment)
diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c
index b12dcee9dfa..2adfb409739 100644
--- a/src/mesa/shader/program_parse.tab.c
+++ b/src/mesa/shader/program_parse.tab.c
@@ -98,14 +98,14 @@
#include "main/mtypes.h"
#include "main/imports.h"
-#include "program.h"
-#include "prog_parameter.h"
-#include "prog_parameter_layout.h"
-#include "prog_statevars.h"
-#include "prog_instruction.h"
-
-#include "symbol_table.h"
-#include "program_parser.h"
+#include "shader/program.h"
+#include "shader/prog_parameter.h"
+#include "shader/prog_parameter_layout.h"
+#include "shader/prog_statevars.h"
+#include "shader/prog_instruction.h"
+
+#include "shader/symbol_table.h"
+#include "shader/program_parser.h"
extern void *yy_scan_string(char *);
extern void yy_delete_buffer(void *);
diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y
index 5c5d8d75908..3880d549172 100644
--- a/src/mesa/shader/program_parse.y
+++ b/src/mesa/shader/program_parse.y
@@ -27,14 +27,14 @@
#include "main/mtypes.h"
#include "main/imports.h"
-#include "program.h"
-#include "prog_parameter.h"
-#include "prog_parameter_layout.h"
-#include "prog_statevars.h"
-#include "prog_instruction.h"
-
-#include "symbol_table.h"
-#include "program_parser.h"
+#include "shader/program.h"
+#include "shader/prog_parameter.h"
+#include "shader/prog_parameter_layout.h"
+#include "shader/prog_statevars.h"
+#include "shader/prog_instruction.h"
+
+#include "shader/symbol_table.h"
+#include "shader/program_parser.h"
extern void *yy_scan_string(char *);
extern void yy_delete_buffer(void *);
diff --git a/src/mesa/shader/program_parse_extra.c b/src/mesa/shader/program_parse_extra.c
index 0656c5eaa8e..ae98b782b70 100644
--- a/src/mesa/shader/program_parse_extra.c
+++ b/src/mesa/shader/program_parse_extra.c
@@ -216,6 +216,18 @@ _mesa_ARBfp_parse_option(struct asm_parser_state *state, const char *option)
state->option.Shadow = 1;
return 1;
}
+ } else if (strncmp(option, "fragment_coord_", 15) == 0) {
+ option += 15;
+ if (state->ctx->Extensions.ARB_fragment_coord_conventions) {
+ if (strcmp(option, "origin_upper_left") == 0) {
+ state->option.OriginUpperLeft = 1;
+ return 1;
+ }
+ else if (strcmp(option, "pixel_center_integer") == 0) {
+ state->option.PixelCenterInteger = 1;
+ return 1;
+ }
+ }
}
} else if (strncmp(option, "NV_fragment_program", 19) == 0) {
option += 19;
diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h
index 69396ca2c0f..730466c30f5 100644
--- a/src/mesa/shader/program_parser.h
+++ b/src/mesa/shader/program_parser.h
@@ -209,6 +209,8 @@ struct asm_parser_state {
unsigned TexRect:1;
unsigned TexArray:1;
unsigned NV_fragment:1;
+ unsigned OriginUpperLeft:1;
+ unsigned PixelCenterInteger:1;
} option;
struct {
diff --git a/src/mesa/shader/slang/descrip.mms b/src/mesa/shader/slang/descrip.mms
index 6eefbcf5bdd..674b786ac08 100644
--- a/src/mesa/shader/slang/descrip.mms
+++ b/src/mesa/shader/slang/descrip.mms
@@ -17,12 +17,12 @@
VPATH = RCS
-INCDIR = [----.include],[--.main],[--.glapi],[-.slang],[-.grammar],[-]
+INCDIR = [----.include],[--.main],[--.glapi],[-.slang],[-]
LIBDIR = [----.lib]
CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)/float=ieee/ieee=denorm
SOURCES = \
- slang_compile.c,slang_preprocess.c
+ slang_compile.c
OBJECTS = slang_builtin.obj,slang_codegen.obj,slang_compile.obj,\
slang_compile_function.obj,slang_compile_operation.obj,\
@@ -59,7 +59,6 @@ slang_library_noise.obj : slang_library_noise.c
slang_link.obj : slang_link.c
slang_log.obj : slang_log.c
slang_mem.obj : slang_mem.c
-slang_preprocess.obj : slang_preprocess.c
slang_print.obj : slang_print.c
slang_simplify.obj : slang_simplify.c
slang_storage.obj : slang_storage.c
diff --git a/src/mesa/shader/slang/library/.gitignore b/src/mesa/shader/slang/library/.gitignore
new file mode 100644
index 00000000000..02a89fc7df7
--- /dev/null
+++ b/src/mesa/shader/slang/library/.gitignore
@@ -0,0 +1 @@
+*_gc.h
diff --git a/src/mesa/shader/slang/library/Makefile b/src/mesa/shader/slang/library/Makefile
index 0e03fac2ee1..c6964512bfe 100644
--- a/src/mesa/shader/slang/library/Makefile
+++ b/src/mesa/shader/slang/library/Makefile
@@ -4,9 +4,7 @@ TOP = ../../../../..
include $(TOP)/configs/current
-INCDIR = $(TOP)/include
-
-LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
+GLSL_CL = $(TOP)/src/glsl/apps/compile
#
# targets
@@ -14,42 +12,14 @@ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
.PHONY: default clean
-default: syntax builtin
+default: builtin
clean:
- -rm -f syn_to_c gc_to_bin *_syn.h *_gc.h
-
-syntax: slang_pp_directives_syn.h slang_pp_expression_syn.h slang_shader_syn.h slang_pp_version_syn.h
+ -rm -f *_gc.h
builtin: builtin_110 builtin_120
#
-# executables
-#
-
-syn_to_c: syn_to_c.c
- $(CC) syn_to_c.c -o syn_to_c
-
-gc_to_bin: gc_to_bin.c slang_shader_syn.h
- $(CC) gc_to_bin.c -o gc_to_bin
-
-#
-# syntax scripts
-#
-
-slang_pp_directives_syn.h: syn_to_c slang_pp_directives.syn
- ./syn_to_c slang_pp_directives.syn > slang_pp_directives_syn.h
-
-slang_pp_expression_syn.h: syn_to_c slang_pp_expression.syn
- ./syn_to_c slang_pp_expression.syn > slang_pp_expression_syn.h
-
-slang_shader_syn.h: syn_to_c slang_shader.syn
- ./syn_to_c slang_shader.syn > slang_shader_syn.h
-
-slang_pp_version_syn.h: syn_to_c slang_pp_version.syn
- ./syn_to_c slang_pp_version.syn > slang_pp_version_syn.h
-
-#
# builtin library sources
#
@@ -58,24 +28,24 @@ builtin_110: slang_common_builtin_gc.h slang_core_gc.h slang_fragment_builtin_gc
builtin_120: slang_120_core_gc.h slang_builtin_120_common_gc.h slang_builtin_120_fragment_gc.h
-slang_120_core_gc.h: gc_to_bin slang_120_core.gc
- ./gc_to_bin 1 slang_120_core.gc slang_120_core_gc.h
+slang_120_core_gc.h: slang_120_core.gc
+ $(GLSL_CL) fragment slang_120_core.gc slang_120_core_gc.h
-slang_builtin_120_common_gc.h: gc_to_bin slang_builtin_120_common.gc
- ./gc_to_bin 1 slang_builtin_120_common.gc slang_builtin_120_common_gc.h
+slang_builtin_120_common_gc.h: slang_builtin_120_common.gc
+ $(GLSL_CL) fragment slang_builtin_120_common.gc slang_builtin_120_common_gc.h
-slang_builtin_120_fragment_gc.h: gc_to_bin slang_builtin_120_fragment.gc
- ./gc_to_bin 1 slang_builtin_120_fragment.gc slang_builtin_120_fragment_gc.h
+slang_builtin_120_fragment_gc.h: slang_builtin_120_fragment.gc
+ $(GLSL_CL) fragment slang_builtin_120_fragment.gc slang_builtin_120_fragment_gc.h
-slang_common_builtin_gc.h: gc_to_bin slang_common_builtin.gc
- ./gc_to_bin 1 slang_common_builtin.gc slang_common_builtin_gc.h
+slang_common_builtin_gc.h: slang_common_builtin.gc
+ $(GLSL_CL) fragment slang_common_builtin.gc slang_common_builtin_gc.h
-slang_core_gc.h: gc_to_bin slang_core.gc
- ./gc_to_bin 1 slang_core.gc slang_core_gc.h
+slang_core_gc.h: slang_core.gc
+ $(GLSL_CL) fragment slang_core.gc slang_core_gc.h
-slang_fragment_builtin_gc.h: gc_to_bin slang_fragment_builtin.gc
- ./gc_to_bin 1 slang_fragment_builtin.gc slang_fragment_builtin_gc.h
+slang_fragment_builtin_gc.h: slang_fragment_builtin.gc
+ $(GLSL_CL) fragment slang_fragment_builtin.gc slang_fragment_builtin_gc.h
-slang_vertex_builtin_gc.h: gc_to_bin slang_vertex_builtin.gc
- ./gc_to_bin 2 slang_vertex_builtin.gc slang_vertex_builtin_gc.h
+slang_vertex_builtin_gc.h: slang_vertex_builtin.gc
+ $(GLSL_CL) vertex slang_vertex_builtin.gc slang_vertex_builtin_gc.h
diff --git a/src/mesa/shader/slang/library/SConscript b/src/mesa/shader/slang/library/SConscript
new file mode 100644
index 00000000000..ef131146be5
--- /dev/null
+++ b/src/mesa/shader/slang/library/SConscript
@@ -0,0 +1,52 @@
+#######################################################################
+# SConscript for GLSL builtin library
+
+Import('*')
+
+env = env.Clone()
+
+# See also http://www.scons.org/wiki/UsingCodeGenerators
+
+def glsl_compile_emitter(target, source, env):
+ env.Depends(target, glsl_compile)
+ return (target, source)
+
+bld_frag = Builder(
+ action = glsl_compile[0].abspath + ' fragment $SOURCE $TARGET',
+ emitter = glsl_compile_emitter,
+ suffix = '.gc',
+ src_suffix = '_gc.h')
+
+bld_vert = Builder(
+ action = glsl_compile[0].abspath + ' vertex $SOURCE $TARGET',
+ emitter = glsl_compile_emitter,
+ suffix = '.gc',
+ src_suffix = '_gc.h')
+
+env['BUILDERS']['bld_frag'] = bld_frag
+env['BUILDERS']['bld_vert'] = bld_vert
+
+# Generate GLSL builtin library binaries
+env.bld_frag(
+ '#src/mesa/shader/slang/library/slang_core_gc.h',
+ '#src/mesa/shader/slang/library/slang_core.gc')
+env.bld_frag(
+ '#src/mesa/shader/slang/library/slang_common_builtin_gc.h',
+ '#src/mesa/shader/slang/library/slang_common_builtin.gc')
+env.bld_frag(
+ '#src/mesa/shader/slang/library/slang_fragment_builtin_gc.h',
+ '#src/mesa/shader/slang/library/slang_fragment_builtin.gc')
+env.bld_vert(
+ '#src/mesa/shader/slang/library/slang_vertex_builtin_gc.h',
+ '#src/mesa/shader/slang/library/slang_vertex_builtin.gc')
+
+# Generate GLSL 1.20 builtin library binaries
+env.bld_frag(
+ '#src/mesa/shader/slang/library/slang_120_core_gc.h',
+ '#src/mesa/shader/slang/library/slang_120_core.gc')
+env.bld_frag(
+ '#src/mesa/shader/slang/library/slang_builtin_120_common_gc.h',
+ '#src/mesa/shader/slang/library/slang_builtin_120_common.gc')
+env.bld_frag(
+ '#src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h',
+ '#src/mesa/shader/slang/library/slang_builtin_120_fragment.gc')
diff --git a/src/mesa/shader/slang/library/gc_to_bin.c b/src/mesa/shader/slang/library/gc_to_bin.c
deleted file mode 100644
index 8aef7b54124..00000000000
--- a/src/mesa/shader/slang/library/gc_to_bin.c
+++ /dev/null
@@ -1,85 +0,0 @@
-#include "../../grammar/grammar_crt.h"
-#include "../../grammar/grammar_crt.c"
-#include <stdlib.h>
-#include <stdio.h>
-
-static const char *slang_shader_syn =
-#include "slang_shader_syn.h"
-;
-
-static int gc_to_bin (grammar id, const char *in, const char *out)
-{
- FILE *f;
- byte *source, *prod;
- unsigned int size, i, line = 0;
-
- printf ("Precompiling %s\n", in);
-
- f = fopen (in, "r");
- if (f == NULL)
- return 1;
- fseek (f, 0, SEEK_END);
- size = ftell (f);
- fseek (f, 0, SEEK_SET);
- source = (byte *) grammar_alloc_malloc (size + 1);
- source[fread (source, 1, size, f)] = '\0';
- fclose (f);
-
- if (!grammar_fast_check (id, source, &prod, &size, 65536))
- {
- grammar_alloc_free (source);
- return 1;
- }
-
- f = fopen (out, "w");
- fprintf (f, "\n");
- fprintf (f, "/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */\n");
- fprintf (f, "/* %s */\n", in);
- fprintf (f, "\n");
- for (i = 0; i < size; i++)
- {
- unsigned int a;
- if (prod[i] < 10)
- a = 1;
- else if (prod[i] < 100)
- a = 2;
- else
- a = 3;
- if (i < size - 1)
- a++;
- if (line + a >= 100)
- {
- fprintf (f, "\n");
- line = 0;
- }
- line += a;
- fprintf (f, "%d", prod[i]);
- if (i < size - 1)
- fprintf (f, ",");
- }
- fprintf (f, "\n");
- fclose (f);
- grammar_alloc_free (prod);
- return 0;
-}
-
-int main (int argc, char *argv[])
-{
- grammar id;
-
- id = grammar_load_from_text ((const byte *) slang_shader_syn);
- if (id == 0) {
- fprintf(stderr, "Error loading grammar from text\n");
- return 1;
- }
- grammar_set_reg8 (id, (const byte *) "parsing_builtin", 1);
- grammar_set_reg8 (id, (const byte *) "shader_type", atoi (argv[1]));
- if (gc_to_bin (id, argv[2], argv[3])) {
- fprintf(stderr, "Error in gc_to_bin %s %s\n", argv[2], argv[3]);
- grammar_destroy (id);
- return 1;
- }
- grammar_destroy (id);
- return 0;
-}
-
diff --git a/src/mesa/shader/slang/library/slang_120_core_gc.h b/src/mesa/shader/slang/library/slang_120_core_gc.h
deleted file mode 100644
index 1fdbddf7c3e..00000000000
--- a/src/mesa/shader/slang/library/slang_120_core_gc.h
+++ /dev/null
@@ -1,764 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_120_core.gc */
-
-5,1,90,95,0,0,26,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,
-1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,50,49,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,
-18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,49,0,20,0,
-9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,9,0,102,0,
-0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,102,0,0,17,48,0,48,0,0,0,
-17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,
-5,0,105,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,
-114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,
-1,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,
-114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,
-11,0,99,48,0,0,1,1,0,0,11,0,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,
-0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,
-0,9,0,102,48,48,0,0,1,1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,1,1,0,0,9,0,102,51,48,0,0,
-1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,50,49,0,0,1,1,0,0,9,0,102,51,
-49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,
-0,16,8,48,0,57,59,122,0,18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,
-0,18,102,51,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,49,0,20,
-0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,
-10,49,0,57,59,119,0,18,102,51,49,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,
-17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,
-0,28,0,1,1,1,0,0,5,0,105,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,
-0,0,0,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,
-0,28,0,1,1,1,0,0,1,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,
-0,0,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,
-28,0,1,1,1,0,0,12,0,99,48,0,0,1,1,0,0,12,0,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,
-48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,90,95,
-0,0,27,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,
-0,102,49,49,0,0,1,1,0,0,9,0,102,48,50,0,0,1,1,0,0,9,0,102,49,50,0,0,0,1,9,18,95,95,114,101,116,86,
-97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,
-59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,
-49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,50,0,57,59,121,0,18,102,49,50,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,
-0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,5,0,105,0,0,0,
-1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,101,116,86,
-97,108,0,58,109,97,116,51,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,1,0,98,0,0,0,1,
-3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,101,116,86,97,
-108,0,58,109,97,116,51,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,10,0,99,48,0,0,1,
-1,0,0,10,0,99,49,0,0,1,1,0,0,10,0,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0,
-0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,1,1,0,0,9,0,102,51,48,0,0,1,1,0,0,9,0,102,48,49,0,0,
-1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,50,49,0,0,1,1,0,0,9,0,102,51,49,0,0,1,1,0,0,9,0,102,48,
-50,0,0,1,1,0,0,9,0,102,49,50,0,0,1,1,0,0,9,0,102,50,50,0,0,1,1,0,0,9,0,102,51,50,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,
-122,0,18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,18,102,51,48,0,
-20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,49,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,119,
-0,18,102,51,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,
-0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,102,49,50,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,50,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,
-10,50,0,57,59,119,0,18,102,51,50,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,
-17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,
-48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,5,0,105,0,0,0,1,3,2,
-90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,101,116,86,97,
-108,0,58,109,97,116,51,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,1,0,98,0,0,0,1,3,
-2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,101,116,86,97,
-108,0,58,109,97,116,51,120,52,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,12,0,99,48,0,0,1,
-1,0,0,12,0,99,49,0,0,1,1,0,0,12,0,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,9,0,102,48,48,0,0,1,1,0,
-0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,0,0,1,1,0,0,9,0,102,48,50,0,0,
-1,1,0,0,9,0,102,49,50,0,0,1,1,0,0,9,0,102,48,51,0,0,1,1,0,0,9,0,102,49,51,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,
-0,18,102,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,
-0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,59,121,0,18,102,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,
-10,51,0,57,59,120,0,18,102,48,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,
-18,102,49,51,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,
-0,58,109,97,116,52,120,50,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,16,10,52,0,0,17,48,0,48,
-0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,5,0,
-105,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,
-101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,1,0,
-98,0,0,0,1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,
-101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,10,
-0,99,48,0,0,1,1,0,0,10,0,99,49,0,0,1,1,0,0,10,0,99,50,0,0,1,1,0,0,10,0,99,51,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,
-57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,9,0,102,48,48,0,0,1,
-1,0,0,9,0,102,49,48,0,0,1,1,0,0,9,0,102,50,48,0,0,1,1,0,0,9,0,102,48,49,0,0,1,1,0,0,9,0,102,49,49,
-0,0,1,1,0,0,9,0,102,50,49,0,0,1,1,0,0,9,0,102,48,50,0,0,1,1,0,0,9,0,102,49,50,0,0,1,1,0,0,9,0,102,
-50,50,0,0,1,1,0,0,9,0,102,48,51,0,0,1,1,0,0,9,0,102,49,51,0,0,1,1,0,0,9,0,102,50,51,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,102,48,48,0,20,0,9,18,95,95,114,101,116,86,
-97,108,0,16,8,48,0,57,59,121,0,18,102,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,
-59,122,0,18,102,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,102,48,
-49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,102,49,49,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,102,50,49,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,50,0,57,59,120,0,18,102,48,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,
-59,121,0,18,102,49,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,102,50,
-50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,120,0,18,102,48,51,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,18,102,49,51,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,51,0,57,59,122,0,18,102,50,51,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,
-0,0,17,48,0,48,0,0,0,18,102,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,102,0,0,17,
-48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,5,0,105,0,0,0,
-1,3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,9,18,95,95,114,101,116,86,
-97,108,0,58,109,97,116,52,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,1,0,98,0,0,0,1,
-3,2,90,95,1,0,9,0,1,102,0,2,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,9,18,95,95,114,101,116,86,97,
-108,0,58,109,97,116,52,120,51,0,0,18,102,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,11,0,99,48,0,0,1,
-1,0,0,11,0,99,49,0,0,1,1,0,0,11,0,99,50,0,0,1,1,0,0,11,0,99,51,0,0,0,1,9,18,95,95,114,101,116,86,
-97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,
-20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,
-90,95,0,0,13,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,0,0,
-18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,26,0,109,0,0,
-0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,
-18,109,0,16,10,49,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,
-10,49,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,
-59,120,121,0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,
-0,0,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,
-97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,0,20,0,0,
-1,90,95,0,0,13,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,0,
-0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,
-26,0,1,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,26,
-0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,109,
-0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,31,0,109,0,0,0,1,9,
-18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,
-10,49,0,57,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,
-0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,
-120,121,122,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,
-59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,
-97,108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,
-57,59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,
-86,97,108,0,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,
-121,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,
-0,48,0,0,0,0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,17,
-48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,
-0,20,0,0,1,90,95,0,0,26,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,
-116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,17,48,0,48,0,0,
-0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,0,20,0,0,1,
-90,95,0,0,28,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,
-95,0,0,28,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,
-0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,15,0,109,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,0,18,
-109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,
-86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,
-121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,
-0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,122,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,
-28,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,
-109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,17,
-48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,
-49,0,57,59,122,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,
-16,8,48,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,
-59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,122,0,0,17,48,0,48,0,0,0,0,
-20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,
-116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,
-0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,
-48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,
-59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,
-57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,28,0,1,1,1,0,0,29,0,109,0,0,0,
-1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,
-18,109,0,16,8,48,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,18,109,0,16,10,49,0,57,59,120,0,
-0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,0,0,27,0,1,
-1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,27,0,1,1,1,
-0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,109,0,16,8,
-48,0,57,0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,14,
-0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,
-0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,30,0,109,0,
-0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,59,120,
-0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,
-121,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,121,0,0,0,20,0,0,1,90,95,0,0,
-27,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,50,0,0,18,
-109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,120,0,0,
-18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,121,
-0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,
-97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,
-10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,
-1,90,95,0,0,27,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,
-120,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,58,118,101,99,50,0,0,17,48,0,48,0,0,0,
-0,0,0,20,0,0,1,90,95,0,0,27,0,1,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,
-97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,
-10,49,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,
-1,90,95,0,0,27,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,
-120,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,
-57,59,120,0,0,18,109,0,16,10,49,0,57,59,121,0,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,0,20,0,0,1,90,95,
-0,0,14,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,
-14,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,
-16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,
-0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,
-59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,18,109,0,16,10,50,0,57,59,120,121,122,
-0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,
-97,116,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,
-18,109,0,16,10,50,0,57,59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,26,0,109,0,0,0,1,9,
-18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,
-57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,28,0,109,0,0,0,
-1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,59,120,121,122,0,0,
-18,109,0,16,10,49,0,57,59,120,121,122,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,
-95,0,0,14,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,
-109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,
-17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,
-0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,13,0,109,0,0,0,1,
-9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,
-109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,
-30,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,30,
-0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,
-0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,
-0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8,
-48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,48,0,0,
-0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,
-97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,
-18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,
-49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,
-0,0,26,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8,
-48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,
-0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,
-97,108,0,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,
-16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,0,0,0,0,0,
-20,0,0,1,90,95,0,0,30,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,
-116,51,120,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,
-48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,
-30,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,51,120,52,0,0,18,
-109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,
-0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,29,
-0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,31,0,
-109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,
-59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,18,109,0,16,10,50,0,57,59,120,121,0,0,18,109,
-0,16,10,51,0,57,59,120,121,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,
-10,49,0,57,59,120,121,0,0,18,109,0,16,10,50,0,57,59,120,121,0,0,18,109,0,16,10,51,0,57,59,120,121,
-0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,
-97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,
-0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,
-116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,18,
-109,0,16,10,50,0,57,59,120,121,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,
-30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,
-57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,18,109,0,16,10,50,0,57,59,120,121,0,0,17,
-48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,57,0,17,48,
-0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,26,0,109,0,0,
-0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,
-121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,
-0,0,0,20,0,0,1,90,95,0,0,29,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,
-97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,59,120,121,0,0,18,109,0,16,10,49,0,57,59,120,121,0,0,17,
-48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,31,0,109,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,15,0,109,0,0,
-0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,59,120,
-121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,18,109,0,16,10,50,0,57,59,120,121,122,0,0,18,
-109,0,16,10,51,0,57,59,120,121,122,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,14,0,109,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,
-49,0,57,0,18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,
-31,0,1,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,
-109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,18,109,0,16,10,50,
-0,57,59,120,121,122,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,
-0,0,29,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,
-48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,
-0,0,18,109,0,16,10,51,0,57,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,26,0,109,0,0,0,1,9,
-18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,
-10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,
-20,0,0,1,90,95,0,0,31,0,1,1,1,0,0,27,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,
-116,52,120,51,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,
-109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,
-31,0,1,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,
-109,0,16,8,48,0,57,59,120,121,122,0,0,18,109,0,16,10,49,0,57,59,120,121,122,0,0,17,48,0,0,0,0,17,
-48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,31,0,1,1,1,
-0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,120,51,0,0,18,109,0,16,8,
-48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,
-0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,15,0,109,0,0,0,
-1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,30,0,109,0,0,0,1,9,
-18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,18,109,0,16,10,49,0,
-57,0,18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,
-90,95,0,0,15,0,1,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,
-18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,
-57,0,17,48,0,0,0,0,18,109,0,16,10,51,0,57,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,28,0,
-109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,18,109,
-0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,
-0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,
-18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,49,0,0,0,0,17,48,
-0,0,0,0,18,109,0,16,10,51,0,57,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,
-14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,
-17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,48,0,0,0,0,17,48,
-0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,26,0,109,0,0,
-0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,0,0,
-18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,
-48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,27,0,109,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,0,17,48,0,0,
-0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,50,0,57,0,17,
-49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,0,20,0,0,1,90,95,
-0,0,15,0,1,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,109,97,116,52,0,0,18,109,
-0,16,8,48,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,18,109,0,16,10,49,0,57,0,17,48,0,0,0,0,17,48,0,0,0,0,
-17,48,0,0,0,0,17,48,0,0,0,0,17,49,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,17,48,0,0,0,0,
-17,49,0,0,0,0,0,20,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,109,
-0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,
-90,95,0,0,0,0,2,1,1,0,2,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,
-16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,
-0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,
-109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,
-0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,30,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,
-110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,16,10,50,0,
-57,18,110,0,16,10,50,0,57,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,
-9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
-21,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,
-51,0,57,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,109,0,16,8,
-48,0,57,18,110,0,16,8,48,0,57,21,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,21,0,9,18,109,0,
-16,10,50,0,57,18,110,0,16,10,50,0,57,21,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,21,0,0,1,
-90,95,0,0,0,0,2,2,1,0,2,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,
-16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,
-0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,
-109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,27,0,109,0,0,1,1,0,0,
-27,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,
-110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,22,0,0,1,90,95,0,0,0,0,2,
-2,1,0,2,0,30,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,22,0,
-9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,
-57,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,109,0,16,8,48,0,
-57,18,110,0,16,8,48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,
-10,50,0,57,18,110,0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,90,
-95,0,0,0,0,2,2,1,0,2,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,
-48,0,57,22,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,22,0,9,18,109,0,16,10,50,0,57,18,110,
-0,16,10,50,0,57,22,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,22,0,0,1,90,95,0,0,0,0,2,4,1,
-0,2,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,
-18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,28,0,109,0,0,1,1,
-0,0,28,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,
-18,110,0,16,10,49,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,
-18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
-24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,30,0,109,0,
-0,1,1,0,0,30,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,0,16,10,49,
-0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,0,1,90,95,0,
-0,0,0,2,4,1,0,2,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,
-57,24,0,9,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,
-10,50,0,57,24,0,9,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,
-31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,24,0,9,18,109,
-0,16,10,49,0,57,18,110,0,16,10,49,0,57,24,0,9,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,24,0,9,
-18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,24,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,26,0,109,0,0,1,
-1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,
-48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,20,0,9,18,95,95,114,
-101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,
-18,109,0,16,10,49,0,57,59,121,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,
-120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,20,
-0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,28,0,109,0,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,
-97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,
-16,10,49,0,57,59,120,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,
-109,0,16,8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,20,0,9,18,
-95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,118,
-0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,
-18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,119,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,
-119,0,48,46,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,27,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,
-121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,48,
-46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,
-0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,
-57,59,121,0,48,46,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,
-0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,
-48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,
-121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,
-50,0,57,59,121,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,120,0,18,109,0,
-16,8,48,0,57,59,122,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,118,0,59,122,0,
-18,109,0,16,10,50,0,57,59,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,118,0,59,
-120,0,18,109,0,16,8,48,0,57,59,119,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,119,0,48,46,18,
-118,0,59,122,0,18,109,0,16,10,50,0,57,59,119,0,48,46,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,29,0,109,
-0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,118,0,59,120,0,18,109,
-0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,48,46,18,118,0,59,122,
-0,18,109,0,16,10,50,0,57,59,120,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,120,0,48,46,20,
-0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,121,0,48,
-18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,
-59,121,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,48,46,20,0,0,1,90,95,0,0,11,0,2,
-21,1,1,0,0,31,0,109,0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,
-118,0,59,120,0,18,109,0,16,8,48,0,57,59,120,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,120,0,
-48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,120,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,
-0,57,59,120,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,118,0,59,120,0,18,109,0,16,
-8,48,0,57,59,121,0,48,18,118,0,59,121,0,18,109,0,16,10,49,0,57,59,121,0,48,46,18,118,0,59,122,0,18,
-109,0,16,10,50,0,57,59,121,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,121,0,48,46,20,0,9,
-18,95,95,114,101,116,86,97,108,0,59,122,0,18,118,0,59,120,0,18,109,0,16,8,48,0,57,59,122,0,48,18,
-118,0,59,121,0,18,109,0,16,10,49,0,57,59,122,0,48,46,18,118,0,59,122,0,18,109,0,16,10,50,0,57,59,
-122,0,48,46,18,118,0,59,119,0,18,109,0,16,10,51,0,57,59,122,0,48,46,20,0,0,1,90,95,0,0,27,0,2,21,1,
-1,0,0,13,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,
-0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,
-16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,
-0,57,48,20,0,0,1,90,95,0,0,29,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,
-97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,
-0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,
-13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,
-20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,
-90,95,0,0,14,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,
-0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,
-0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,
-109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,29,0,110,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,
-18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,28,0,2,21,1,1,
-0,0,28,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,
-18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,
-16,10,49,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,28,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,
-101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,
-86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,
-28,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,
-110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,
-10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,
-57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,
-0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,27,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,95,95,114,101,116,86,
-97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,
-10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,27,0,2,21,1,1,0,0,27,0,109,0,0,1,
-1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,
-57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,
-0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,
-95,0,0,29,0,2,21,1,1,0,0,27,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,
-57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,
-0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,
-0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,
-101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,
-1,1,0,0,14,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,
-110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,
-10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,
-57,48,20,0,0,1,90,95,0,0,28,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,
-97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,30,
-0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,
-0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,
-0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,
-20,0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,
-86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,
-0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,
-109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,29,0,109,0,0,1,1,0,0,28,0,110,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,
-18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,
-0,27,0,2,21,1,1,0,0,29,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,
-48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,
-109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,
-110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,29,0,2,21,1,1,0,0,29,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,
-9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,31,0,
-109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,
-16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,
-57,48,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,31,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,
-97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,31,0,109,0,0,
-1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,
-0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,
-20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,9,18,
-95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,
-28,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,
-0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,
-109,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,30,0,110,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,18,110,0,16,8,48,0,57,48,20,0,9,
-18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,0,0,2,
-3,1,0,2,0,26,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,90,95,0,0,
-0,0,2,3,1,0,2,0,28,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,0,1,90,
-95,0,0,0,0,2,3,1,0,2,0,27,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,
-0,1,90,95,0,0,0,0,2,3,1,0,2,0,30,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,
-48,20,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,29,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,18,109,0,18,
-110,0,48,20,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,31,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,18,
-109,0,18,110,0,48,20,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,27,0,109,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,
-0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,
-0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,
-50,0,57,0,0,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,29,0,109,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,
-95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,
-0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,
-0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,
-51,0,57,0,0,20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,26,0,109,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,
-95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,
-0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,31,0,109,0,0,0,1,9,18,95,95,114,101,116,86,
-97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,
-18,95,95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,
-20,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,28,0,109,0,0,0,1,9,18,95,95,114,101,116,
-86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,
-95,0,0,11,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,30,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,
-0,0,0,2,1,1,0,2,0,26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,
-109,0,16,10,49,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,
-9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,
-0,2,0,27,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,
-0,57,18,97,0,21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,30,0,109,0,0,
-1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,
-9,18,109,0,16,10,50,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,
-0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,21,0,9,18,109,0,16,10,
-50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,2,1,1,0,2,0,31,0,109,
-0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,21,0,9,18,109,0,16,10,49,0,57,18,97,0,
-21,0,9,18,109,0,16,10,50,0,57,18,97,0,21,0,9,18,109,0,16,10,51,0,57,18,97,0,21,0,0,1,90,95,0,0,0,0,
-2,2,1,0,2,0,26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,
-10,49,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,
-0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,27,
-0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,
-97,0,22,0,9,18,109,0,16,10,50,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,30,0,109,0,0,1,1,0,0,
-9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,
-0,16,10,50,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,
-18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,109,0,16,10,50,0,57,
-18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,2,1,0,2,0,31,0,109,0,0,1,1,
-0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,22,0,9,18,109,0,16,10,49,0,57,18,97,0,22,0,9,18,
-109,0,16,10,50,0,57,18,97,0,22,0,9,18,109,0,16,10,51,0,57,18,97,0,22,0,0,1,90,95,0,0,0,0,2,3,1,0,2,
-0,26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,
-57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,
-48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,27,0,109,
-0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,
-23,0,9,18,109,0,16,10,50,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,30,0,109,0,0,1,1,0,0,9,0,
-97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,
-16,10,50,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,
-109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,0,16,10,50,0,57,18,
-97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,3,1,0,2,0,31,0,109,0,0,1,1,0,0,
-9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,23,0,9,18,109,0,16,10,49,0,57,18,97,0,23,0,9,18,109,
-0,16,10,50,0,57,18,97,0,23,0,9,18,109,0,16,10,51,0,57,18,97,0,23,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,
-26,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,
-18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,28,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,
-0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,27,0,109,0,0,
-1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,
-9,18,109,0,16,10,50,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,30,0,109,0,0,1,1,0,0,9,0,97,0,
-0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,
-50,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,29,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,109,0,
-16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,16,10,50,0,57,18,97,0,
-24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,90,95,0,0,0,0,2,4,1,0,2,0,31,0,109,0,0,1,1,0,0,9,0,
-97,0,0,0,1,9,18,109,0,16,8,48,0,57,18,97,0,24,0,9,18,109,0,16,10,49,0,57,18,97,0,24,0,9,18,109,0,
-16,10,50,0,57,18,97,0,24,0,9,18,109,0,16,10,51,0,57,18,97,0,24,0,0,1,90,95,0,0,26,0,2,26,1,1,0,0,
-26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,
-16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,90,95,0,0,28,0,2,26,1,
-1,0,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,
-110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,0,0,0,1,90,95,0,0,27,0,
-2,26,1,1,0,0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,
-0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,
-50,0,57,18,110,0,16,10,50,0,57,46,0,0,0,0,1,90,95,0,0,30,0,2,26,1,1,0,0,30,0,109,0,0,1,1,0,0,30,0,
-110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,
-0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,0,0,
-0,1,90,95,0,0,29,0,2,26,1,1,0,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,
-0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
-46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,
-57,46,0,0,0,0,1,90,95,0,0,31,0,2,26,1,1,0,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,8,58,109,97,116,
-52,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,0,18,109,0,16,10,49,0,57,18,110,0,16,
-10,49,0,57,46,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,0,18,109,0,16,10,51,0,57,18,110,0,
-16,10,51,0,57,46,0,0,0,0,1,90,95,0,0,26,0,2,27,1,1,0,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,
-109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,
-18,110,0,16,10,49,0,57,47,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,
-0,1,8,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,
-49,0,57,18,110,0,16,10,49,0,57,47,0,0,0,0,1,90,95,0,0,27,0,2,27,1,1,0,0,27,0,109,0,0,1,1,0,0,27,0,
-110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,
-0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0,
-0,1,90,95,0,0,30,0,2,27,1,1,0,0,30,0,109,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,
-0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
-47,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,0,0,0,0,1,90,95,0,0,29,0,2,27,1,1,0,0,29,0,
-109,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,
-48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,18,110,0,16,
-10,50,0,57,47,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,31,0,2,27,1,1,
-0,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,
-110,0,16,8,48,0,57,47,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,0,18,109,0,16,10,50,0,57,
-18,110,0,16,10,50,0,57,47,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,
-26,0,2,22,1,1,0,0,26,0,109,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,
-8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,0,0,1,90,
-95,0,0,28,0,2,22,1,1,0,0,28,0,109,0,0,1,1,0,0,28,0,110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,
-109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,0,
-0,0,1,90,95,0,0,27,0,2,22,1,1,0,0,27,0,109,0,0,1,1,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,
-0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
-49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,0,0,0,1,90,95,0,0,30,0,2,22,1,1,0,0,30,0,
-109,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,
-48,0,57,49,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,
-10,50,0,57,49,0,0,0,0,1,90,95,0,0,29,0,2,22,1,1,0,0,29,0,109,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,
-97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,49,0,57,18,
-110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16,10,51,0,57,
-18,110,0,16,10,51,0,57,49,0,0,0,0,1,90,95,0,0,31,0,2,22,1,1,0,0,31,0,109,0,0,1,1,0,0,31,0,110,0,0,
-0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,0,18,109,0,16,10,
-49,0,57,18,110,0,16,10,49,0,57,49,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,0,18,109,0,16,
-10,51,0,57,18,110,0,16,10,51,0,57,49,0,0,0,0,1,90,95,0,0,26,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,26,0,
-110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,
-10,49,0,57,46,0,0,0,0,1,90,95,0,0,26,0,2,26,1,1,0,0,26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,
-97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,
-1,90,95,0,0,28,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,28,0,110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,
-97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,0,0,0,1,90,95,0,0,28,0,2,26,1,
-1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,
-98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,27,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,
-0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,
-0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,90,95,0,0,27,0,2,26,1,1,0,0,27,0,
-109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,18,98,0,46,0,18,
-109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,30,0,2,26,1,
-1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,97,0,18,110,0,16,8,48,0,
-57,46,0,18,97,0,18,110,0,16,10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,0,0,0,1,90,95,0,0,
-30,0,2,26,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,
-48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,0,0,0,0,
-1,90,95,0,0,29,0,2,26,1,1,0,0,29,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,
-109,0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,
-46,0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,29,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,29,
-0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,
-10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,90,
-95,0,0,31,0,2,26,1,1,0,0,31,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,
-0,16,8,48,0,57,18,98,0,46,0,18,109,0,16,10,49,0,57,18,98,0,46,0,18,109,0,16,10,50,0,57,18,98,0,46,
-0,18,109,0,16,10,51,0,57,18,98,0,46,0,0,0,0,1,90,95,0,0,31,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,31,0,
-110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,97,0,18,110,0,16,8,48,0,57,46,0,18,97,0,18,110,0,16,
-10,49,0,57,46,0,18,97,0,18,110,0,16,10,50,0,57,46,0,18,97,0,18,110,0,16,10,51,0,57,46,0,0,0,0,1,90,
-95,0,0,26,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,97,0,
-18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,0,0,0,1,90,95,0,0,26,0,2,27,1,1,0,0,
-26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,98,0,47,
-0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,28,0,
-110,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,
-10,49,0,57,47,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,
-97,116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,0,0,0,
-1,90,95,0,0,27,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,
-97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,
-47,0,0,0,0,1,90,95,0,0,27,0,2,27,1,1,0,0,27,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,8,58,109,97,116,51,
-120,50,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,98,0,47,0,18,109,0,16,10,
-50,0,57,18,98,0,47,0,0,0,0,1,90,95,0,0,30,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,8,58,
-109,97,116,51,120,52,0,0,18,97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,
-97,0,18,110,0,16,10,50,0,57,47,0,0,0,0,1,90,95,0,0,30,0,2,27,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,0,
-0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,0,57,18,
-98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,0,0,0,1,90,95,0,0,29,0,2,27,1,1,0,0,29,0,109,0,0,1,1,
-0,0,9,0,98,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,
-49,0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,
-1,90,95,0,0,29,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,
-97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,
-47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,31,0,2,27,1,1,0,0,31,0,109,0,0,1,1,0,0,
-9,0,98,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,98,0,47,0,18,109,0,16,10,49,
-0,57,18,98,0,47,0,18,109,0,16,10,50,0,57,18,98,0,47,0,18,109,0,16,10,51,0,57,18,98,0,47,0,0,0,0,1,
-90,95,0,0,31,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,31,0,110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,
-97,0,18,110,0,16,8,48,0,57,47,0,18,97,0,18,110,0,16,10,49,0,57,47,0,18,97,0,18,110,0,16,10,50,0,57,
-47,0,18,97,0,18,110,0,16,10,51,0,57,47,0,0,0,0,1,90,95,0,0,26,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,26,
-0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,
-0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,
-95,0,0,26,0,2,21,1,1,0,0,26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,
-8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,
-18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,90,95,0,0,28,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,28,0,110,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,
-95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,
-28,0,2,21,1,1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,
-57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,
-16,10,49,0,57,18,98,0,48,20,0,0,1,90,95,0,0,27,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,27,0,110,0,0,0,1,
-9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,27,0,2,21,1,1,0,
-0,27,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,
-8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,
-18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,
-20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,9,18,95,95,114,101,116,86,
-97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,
-10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,
-18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,30,0,2,21,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,
-95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,
-101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,1,90,95,0,0,29,0,2,21,1,
-1,0,0,29,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,
-16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,
-57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,
-48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,
-1,90,95,0,0,29,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,29,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,
-0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,
-57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,
-18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,
-16,10,51,0,57,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,31,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,
-10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,48,20,0,0,1,90,95,0,0,31,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,
-0,31,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,
-48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,
-18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,
-22,1,1,0,0,9,0,97,0,0,1,1,0,0,26,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,
-18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0,
-57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0,
-57,48,20,0,0,1,90,95,0,0,26,0,2,22,1,1,0,0,26,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,
-105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,
-109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,28,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,28,
-0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,97,0,49,0,0,9,18,95,95,114,101,
-116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,
-86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,28,0,2,22,
-1,1,0,0,28,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,
-98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,105,110,118,0,
-48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,105,110,118,0,
-48,20,0,0,1,90,95,0,0,27,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,27,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,
-105,110,118,0,2,17,49,0,48,0,0,18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-105,110,118,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,
-105,110,118,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,
-105,110,118,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,27,0,2,22,1,1,0,0,27,0,109,0,0,1,1,0,0,
-9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,
-101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,30,0,2,
-22,1,1,0,0,9,0,97,0,0,1,1,0,0,30,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,
-18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0,
-57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0,
-57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,105,110,118,0,18,110,0,16,10,50,0,
-57,48,20,0,0,1,90,95,0,0,30,0,2,22,1,1,0,0,30,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,
-105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,
-109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,
-109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,29,0,2,22,1,1,0,0,29,0,109,0,0,1,1,0,0,
-9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,
-101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,29,0,2,
-22,1,1,0,0,9,0,97,0,0,1,1,0,0,29,0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,
-18,97,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0,
-57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0,
-57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,105,110,118,0,18,110,0,16,10,50,0,
-57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,105,110,118,0,18,110,0,16,10,51,0,
-57,48,20,0,0,1,90,95,0,0,31,0,2,22,1,1,0,0,31,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,1,0,9,0,1,
-105,110,118,0,2,17,49,0,48,0,0,18,98,0,49,0,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-109,0,16,8,48,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,
-109,0,16,10,49,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,
-109,0,16,10,50,0,57,18,105,110,118,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,
-109,0,16,10,51,0,57,18,105,110,118,0,48,20,0,0,1,90,95,0,0,31,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,31,
-0,110,0,0,0,1,3,2,90,95,1,0,9,0,1,105,110,118,0,2,17,49,0,48,0,0,18,97,0,49,0,0,9,18,95,95,114,101,
-116,86,97,108,0,16,8,48,0,57,18,105,110,118,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,
-86,97,108,0,16,10,49,0,57,18,105,110,118,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,
-86,97,108,0,16,10,50,0,57,18,105,110,118,0,18,110,0,16,10,50,0,57,48,20,0,9,18,95,95,114,101,116,
-86,97,108,0,16,10,51,0,57,18,105,110,118,0,18,110,0,16,10,51,0,57,48,20,0,0,1,90,95,0,0,26,0,2,27,
-1,1,0,0,26,0,109,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,
-49,0,57,54,0,0,0,0,1,90,95,0,0,28,0,2,27,1,1,0,0,28,0,109,0,0,0,1,8,58,109,97,116,50,120,52,0,0,18,
-109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,0,0,0,1,90,95,0,0,27,0,2,27,1,1,0,0,27,0,109,0,
-0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,
-0,16,10,50,0,57,54,0,0,0,0,1,90,95,0,0,30,0,2,27,1,1,0,0,30,0,109,0,0,0,1,8,58,109,97,116,51,120,
-52,0,0,18,109,0,16,8,48,0,57,54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,0,0,0,1,
-90,95,0,0,29,0,2,27,1,1,0,0,29,0,109,0,0,0,1,8,58,109,97,116,52,120,50,0,0,18,109,0,16,8,48,0,57,
-54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,
-90,95,0,0,31,0,2,27,1,1,0,0,31,0,109,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,
-54,0,18,109,0,16,10,49,0,57,54,0,18,109,0,16,10,50,0,57,54,0,18,109,0,16,10,51,0,57,54,0,0,0,0,1,
-90,95,0,0,0,0,2,25,1,0,2,0,26,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,
-52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,28,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,
-49,0,57,52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,27,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,
-0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,30,0,109,0,0,0,1,
-9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,0,1,90,95,
-0,0,0,0,2,25,1,0,2,0,29,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,
-18,109,0,16,10,50,0,57,52,0,9,18,109,0,16,10,51,0,57,52,0,0,1,90,95,0,0,0,0,2,25,1,0,2,0,31,0,109,
-0,0,0,1,9,18,109,0,16,8,48,0,57,52,0,9,18,109,0,16,10,49,0,57,52,0,9,18,109,0,16,10,50,0,57,52,0,9,
-18,109,0,16,10,51,0,57,52,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,26,0,109,0,0,0,1,9,18,109,0,16,8,48,0,
-57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,28,0,109,0,0,0,1,9,18,109,0,
-16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,27,0,109,0,0,0,1,9,
-18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,0,1,90,95,0,
-0,0,0,2,24,1,0,2,0,30,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,
-18,109,0,16,10,50,0,57,51,0,0,1,90,95,0,0,0,0,2,24,1,0,2,0,29,0,109,0,0,0,1,9,18,109,0,16,8,48,0,
-57,51,0,9,18,109,0,16,10,49,0,57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,
-0,1,90,95,0,0,0,0,2,24,1,0,2,0,31,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,51,0,9,18,109,0,16,10,49,0,
-57,51,0,9,18,109,0,16,10,50,0,57,51,0,9,18,109,0,16,10,51,0,57,51,0,0,0
diff --git a/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h b/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h
deleted file mode 100644
index c397b9f0fad..00000000000
--- a/src/mesa/shader/slang/library/slang_builtin_120_common_gc.h
+++ /dev/null
@@ -1,108 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_builtin_120_common.gc */
-
-5,1,90,95,0,0,26,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,26,0,109,0,0,1,
-0,0,0,26,0,110,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,
-48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,0,0,0,1,90,95,0,0,28,0,0,109,97,116,114,
-105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,28,0,109,0,0,1,0,0,0,28,0,110,0,0,0,1,8,58,109,97,
-116,50,120,52,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,
-16,10,49,0,57,48,0,0,0,0,1,90,95,0,0,27,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,
-1,0,0,0,27,0,109,0,0,1,0,0,0,27,0,110,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,16,8,48,0,57,
-18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,
-57,18,110,0,16,10,50,0,57,48,0,0,0,0,1,90,95,0,0,30,0,0,109,97,116,114,105,120,67,111,109,112,77,
-117,108,116,0,1,0,0,0,30,0,109,0,0,1,0,0,0,30,0,110,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,109,0,
-16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,
-0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,0,0,0,1,90,95,0,0,29,0,0,109,97,116,114,105,120,67,111,
-109,112,77,117,108,116,0,1,0,0,0,29,0,109,0,0,1,0,0,0,29,0,110,0,0,0,1,8,58,109,97,116,52,120,50,0,
-0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,
-48,0,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,
-57,48,0,0,0,0,1,90,95,0,0,31,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,31,
-0,109,0,0,1,0,0,0,31,0,110,0,0,0,1,8,58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,18,110,0,16,
-8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,110,0,
-16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,90,95,0,0,13,0,0,111,
-117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,10,0,99,0,0,1,0,0,0,10,0,114,0,0,0,1,8,58,109,
-97,116,50,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,
-99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,0,0,0,1,90,95,0,0,14,
-0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,11,0,99,0,0,1,0,0,0,11,0,114,0,0,0,1,8,
-58,109,97,116,51,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,
-0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,
-18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,
-48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,0,0,0,1,90,95,
-0,0,15,0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,12,0,99,0,0,1,0,0,0,12,0,114,0,
-0,0,1,8,58,109,97,116,52,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,
-120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0,
-59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,
-59,121,0,48,0,18,99,0,59,119,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,48,0,18,
-99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,18,99,0,59,119,0,18,
-114,0,59,122,0,48,0,18,99,0,59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,121,0,18,114,0,59,119,0,48,
-0,18,99,0,59,122,0,18,114,0,59,119,0,48,0,18,99,0,59,119,0,18,114,0,59,119,0,48,0,0,0,0,1,90,95,0,
-0,26,0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,11,0,99,0,0,1,0,0,0,10,0,114,0,0,
-0,1,8,58,109,97,116,50,120,51,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,
-0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,
-99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,0,0,0,1,90,95,0,0,27,
-0,0,111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,10,0,99,0,0,1,0,0,0,11,0,114,0,0,0,1,8,
-58,109,97,116,51,120,50,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,
-120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,
-59,120,0,18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,0,0,0,1,90,95,0,0,28,0,0,
-111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,12,0,99,0,0,1,0,0,0,10,0,114,0,0,0,1,8,58,
-109,97,116,50,120,52,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,
-0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0,59,
-120,0,18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,
-121,0,48,0,18,99,0,59,119,0,18,114,0,59,121,0,48,0,0,0,0,1,90,95,0,0,29,0,0,111,117,116,101,114,80,
-114,111,100,117,99,116,0,1,0,0,0,10,0,99,0,0,1,0,0,0,12,0,114,0,0,0,1,8,58,109,97,116,52,120,50,0,
-0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,
-18,114,0,59,121,0,48,0,18,99,0,59,121,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,
-48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,
-121,0,18,114,0,59,119,0,48,0,0,0,0,1,90,95,0,0,30,0,0,111,117,116,101,114,80,114,111,100,117,99,
-116,0,1,0,0,0,12,0,99,0,0,1,0,0,0,11,0,114,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,99,0,59,120,0,
-18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,
-48,0,18,99,0,59,119,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,
-121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,119,0,18,114,0,59,
-121,0,48,0,18,99,0,59,120,0,18,114,0,59,122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,
-59,122,0,18,114,0,59,122,0,48,0,18,99,0,59,119,0,18,114,0,59,122,0,48,0,0,0,0,1,90,95,0,0,31,0,0,
-111,117,116,101,114,80,114,111,100,117,99,116,0,1,0,0,0,11,0,99,0,0,1,0,0,0,12,0,114,0,0,0,1,8,58,
-109,97,116,52,120,51,0,0,18,99,0,59,120,0,18,114,0,59,120,0,48,0,18,99,0,59,121,0,18,114,0,59,120,
-0,48,0,18,99,0,59,122,0,18,114,0,59,120,0,48,0,18,99,0,59,120,0,18,114,0,59,121,0,48,0,18,99,0,59,
-121,0,18,114,0,59,121,0,48,0,18,99,0,59,122,0,18,114,0,59,121,0,48,0,18,99,0,59,120,0,18,114,0,59,
-122,0,48,0,18,99,0,59,121,0,18,114,0,59,122,0,48,0,18,99,0,59,122,0,18,114,0,59,122,0,48,0,18,99,0,
-59,120,0,18,114,0,59,119,0,48,0,18,99,0,59,121,0,18,114,0,59,119,0,48,0,18,99,0,59,122,0,18,114,0,
-59,119,0,48,0,0,0,0,1,90,95,0,0,13,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,13,0,109,0,0,0,
-1,8,58,109,97,116,50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,
-0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,0,0,0,1,90,95,0,0,14,0,0,116,114,97,
-110,115,112,111,115,101,0,1,0,0,0,14,0,109,0,0,0,1,8,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,59,
-120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57,
-59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,8,48,0,
-57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,0,0,0,1,90,95,0,
-0,15,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,15,0,109,0,0,0,1,8,58,109,97,116,52,0,0,18,
-109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,
-18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,
-0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,
-0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,10,51,0,57,59,
-122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119,0,0,18,109,0,16,10,50,0,57,
-59,119,0,0,18,109,0,16,10,51,0,57,59,119,0,0,0,0,0,1,90,95,0,0,26,0,0,116,114,97,110,115,112,111,
-115,101,0,1,0,0,0,27,0,109,0,0,0,1,8,58,109,97,116,50,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,
-18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,
-0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,0,0,0,1,90,95,0,0,27,0,0,116,
-114,97,110,115,112,111,115,101,0,1,0,0,0,26,0,109,0,0,0,1,8,58,109,97,116,51,120,50,0,0,18,109,0,
-16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,
-0,16,10,49,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0,0,0,0,
-0,1,90,95,0,0,28,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,29,0,109,0,0,0,1,8,58,109,97,116,
-50,120,52,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,
-0,57,59,120,0,0,18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,
-49,0,57,59,121,0,0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,0,0,0,1,90,
-95,0,0,29,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,28,0,109,0,0,0,1,8,58,109,97,116,52,120,
-50,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,
-121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57,
-59,122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119,0,0,0,0,0,1,90,95,0,0,30,
-0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,31,0,109,0,0,0,1,8,58,109,97,116,51,120,52,0,0,18,
-109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,109,0,16,10,50,0,57,59,120,0,0,
-18,109,0,16,10,51,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,
-0,18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,10,51,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,
-0,0,18,109,0,16,10,49,0,57,59,122,0,0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,10,51,0,57,59,
-122,0,0,0,0,0,1,90,95,0,0,31,0,0,116,114,97,110,115,112,111,115,101,0,1,0,0,0,30,0,109,0,0,0,1,8,
-58,109,97,116,52,120,51,0,0,18,109,0,16,8,48,0,57,59,120,0,0,18,109,0,16,10,49,0,57,59,120,0,0,18,
-109,0,16,10,50,0,57,59,120,0,0,18,109,0,16,8,48,0,57,59,121,0,0,18,109,0,16,10,49,0,57,59,121,0,0,
-18,109,0,16,10,50,0,57,59,121,0,0,18,109,0,16,8,48,0,57,59,122,0,0,18,109,0,16,10,49,0,57,59,122,0,
-0,18,109,0,16,10,50,0,57,59,122,0,0,18,109,0,16,8,48,0,57,59,119,0,0,18,109,0,16,10,49,0,57,59,119,
-0,0,18,109,0,16,10,50,0,57,59,119,0,0,0,0,0,0
diff --git a/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h b/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h
deleted file mode 100644
index add3b5aeaa9..00000000000
--- a/src/mesa/shader/slang/library/slang_builtin_120_fragment_gc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_builtin_120_fragment.gc */
-
-5,2,2,90,95,3,0,10,0,1,103,108,95,80,111,105,110,116,67,111,111,114,100,0,0,0,0
diff --git a/src/mesa/shader/slang/library/slang_common_builtin_gc.h b/src/mesa/shader/slang/library/slang_common_builtin_gc.h
deleted file mode 100644
index 3c3666e4ea2..00000000000
--- a/src/mesa/shader/slang/library/slang_common_builtin_gc.h
+++ /dev/null
@@ -1,880 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_common_builtin.gc */
-
-5,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,76,105,103,104,116,115,0,2,16,10,56,0,0,0,2,2,90,95,1,0,
-5,0,1,103,108,95,77,97,120,67,108,105,112,80,108,97,110,101,115,0,2,16,10,54,0,0,0,2,2,90,95,1,0,5,
-0,1,103,108,95,77,97,120,84,101,120,116,117,114,101,85,110,105,116,115,0,2,16,10,56,0,0,0,2,2,90,
-95,1,0,5,0,1,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,2,16,10,56,0,
-0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,86,101,114,116,101,120,65,116,116,114,105,98,115,0,2,
-16,10,49,54,0,0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,86,101,114,116,101,120,85,110,105,102,
-111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,16,10,53,49,50,0,0,0,2,2,90,95,1,0,5,0,1,
-103,108,95,77,97,120,86,97,114,121,105,110,103,70,108,111,97,116,115,0,2,16,10,51,50,0,0,0,2,2,90,
-95,1,0,5,0,1,103,108,95,77,97,120,86,101,114,116,101,120,84,101,120,116,117,114,101,73,109,97,103,
-101,85,110,105,116,115,0,2,16,8,48,0,0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,67,111,109,98,
-105,110,101,100,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,116,115,0,2,16,10,50,0,0,0,
-2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97,103,101,85,110,105,
-116,115,0,2,16,10,50,0,0,0,2,2,90,95,1,0,5,0,1,103,108,95,77,97,120,70,114,97,103,109,101,110,116,
-85,110,105,102,111,114,109,67,111,109,112,111,110,101,110,116,115,0,2,16,10,54,52,0,0,0,2,2,90,95,
-1,0,5,0,1,103,108,95,77,97,120,68,114,97,119,66,117,102,102,101,114,115,0,2,16,10,49,0,0,0,2,2,90,
-95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,0,0,0,2,2,90,95,4,
-0,15,0,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,0,0,2,2,90,95,4,
-0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,
-116,114,105,120,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105,
-120,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,
-4,0,14,0,1,103,108,95,78,111,114,109,97,108,77,97,116,114,105,120,0,0,0,2,2,90,95,4,0,15,0,1,103,
-108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2,
-2,90,95,4,0,15,0,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,
-118,101,114,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,80,114,
-111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101,0,0,0,2,2,90,95,4,
-0,15,0,1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105,120,73,110,118,101,114,115,101,0,
-3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,15,
-0,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,114,105,120,84,114,97,110,115,112,111,
-115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,
-105,120,84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,
-86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,84,114,97,110,115,112,
-111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,84,101,120,116,117,114,101,77,97,116,114,105,120,
-84,114,97,110,115,112,111,115,101,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,
-111,114,100,115,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,105,101,119,77,97,116,
-114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,
-1,103,108,95,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,
-101,84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,77,111,100,101,108,86,
-105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,73,110,118,101,114,115,101,
-84,114,97,110,115,112,111,115,101,0,0,0,2,2,90,95,4,0,15,0,1,103,108,95,84,101,120,116,117,114,101,
-77,97,116,114,105,120,73,110,118,101,114,115,101,84,114,97,110,115,112,111,115,101,0,3,18,103,108,
-95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,9,0,1,103,108,
-95,78,111,114,109,97,108,83,99,97,108,101,0,0,0,2,2,90,95,0,0,24,103,108,95,68,101,112,116,104,82,
-97,110,103,101,80,97,114,97,109,101,116,101,114,115,0,9,0,110,101,97,114,0,0,0,1,9,0,102,97,114,0,
-0,0,1,9,0,100,105,102,102,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,68,101,112,116,104,82,97,110,
-103,101,80,97,114,97,109,101,116,101,114,115,0,0,1,103,108,95,68,101,112,116,104,82,97,110,103,101,
-0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,67,108,105,112,80,108,97,110,101,0,3,18,103,108,95,77,97,120,
-67,108,105,112,80,108,97,110,101,115,0,0,0,2,2,90,95,0,0,24,103,108,95,80,111,105,110,116,80,97,
-114,97,109,101,116,101,114,115,0,9,0,115,105,122,101,0,0,0,1,9,0,115,105,122,101,77,105,110,0,0,0,
-1,9,0,115,105,122,101,77,97,120,0,0,0,1,9,0,102,97,100,101,84,104,114,101,115,104,111,108,100,83,
-105,122,101,0,0,0,1,9,0,100,105,115,116,97,110,99,101,67,111,110,115,116,97,110,116,65,116,116,101,
-110,117,97,116,105,111,110,0,0,0,1,9,0,100,105,115,116,97,110,99,101,76,105,110,101,97,114,65,116,
-116,101,110,117,97,116,105,111,110,0,0,0,1,9,0,100,105,115,116,97,110,99,101,81,117,97,100,114,97,
-116,105,99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,80,
-111,105,110,116,80,97,114,97,109,101,116,101,114,115,0,0,1,103,108,95,80,111,105,110,116,0,0,0,2,2,
-90,95,0,0,24,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,12,0,
-101,109,105,115,115,105,111,110,0,0,0,1,12,0,97,109,98,105,101,110,116,0,0,0,1,12,0,100,105,102,
-102,117,115,101,0,0,0,1,12,0,115,112,101,99,117,108,97,114,0,0,0,1,9,0,115,104,105,110,105,110,101,
-115,115,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,
-101,116,101,114,115,0,0,1,103,108,95,70,114,111,110,116,77,97,116,101,114,105,97,108,0,0,0,2,2,90,
-95,4,0,25,103,108,95,77,97,116,101,114,105,97,108,80,97,114,97,109,101,116,101,114,115,0,0,1,103,
-108,95,66,97,99,107,77,97,116,101,114,105,97,108,0,0,0,2,2,90,95,0,0,24,103,108,95,76,105,103,104,
-116,83,111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,12,0,97,109,98,105,101,110,116,0,
-0,0,1,12,0,100,105,102,102,117,115,101,0,0,0,1,12,0,115,112,101,99,117,108,97,114,0,0,0,1,12,0,112,
-111,115,105,116,105,111,110,0,0,0,1,12,0,104,97,108,102,86,101,99,116,111,114,0,0,0,1,11,0,115,112,
-111,116,68,105,114,101,99,116,105,111,110,0,0,0,1,9,0,115,112,111,116,67,111,115,67,117,116,111,
-102,102,0,0,0,1,9,0,99,111,110,115,116,97,110,116,65,116,116,101,110,117,97,116,105,111,110,0,0,0,
-1,9,0,108,105,110,101,97,114,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,0,113,117,97,100,
-114,97,116,105,99,65,116,116,101,110,117,97,116,105,111,110,0,0,0,1,9,0,115,112,111,116,69,120,112,
-111,110,101,110,116,0,0,0,1,9,0,115,112,111,116,67,117,116,111,102,102,0,0,0,0,0,0,0,2,2,90,95,4,0,
-25,103,108,95,76,105,103,104,116,83,111,117,114,99,101,80,97,114,97,109,101,116,101,114,115,0,0,1,
-103,108,95,76,105,103,104,116,83,111,117,114,99,101,0,3,18,103,108,95,77,97,120,76,105,103,104,116,
-115,0,0,0,2,2,90,95,0,0,24,103,108,95,76,105,103,104,116,77,111,100,101,108,80,97,114,97,109,101,
-116,101,114,115,0,12,0,97,109,98,105,101,110,116,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,76,105,
-103,104,116,77,111,100,101,108,80,97,114,97,109,101,116,101,114,115,0,0,1,103,108,95,76,105,103,
-104,116,77,111,100,101,108,0,0,0,2,2,90,95,0,0,24,103,108,95,76,105,103,104,116,77,111,100,101,108,
-80,114,111,100,117,99,116,115,0,12,0,115,99,101,110,101,67,111,108,111,114,0,0,0,0,0,0,0,2,2,90,95,
-4,0,25,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,0,1,103,
-108,95,70,114,111,110,116,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2,
-2,90,95,4,0,25,103,108,95,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,115,0,0,
-1,103,108,95,66,97,99,107,76,105,103,104,116,77,111,100,101,108,80,114,111,100,117,99,116,0,0,0,2,
-2,90,95,0,0,24,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,12,0,97,109,98,105,
-101,110,116,0,0,0,1,12,0,100,105,102,102,117,115,101,0,0,0,1,12,0,115,112,101,99,117,108,97,114,0,
-0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,76,105,103,104,116,80,114,111,100,117,99,116,115,0,0,1,103,
-108,95,70,114,111,110,116,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,95,77,97,120,
-76,105,103,104,116,115,0,0,0,2,2,90,95,4,0,25,103,108,95,76,105,103,104,116,80,114,111,100,117,99,
-116,115,0,0,1,103,108,95,66,97,99,107,76,105,103,104,116,80,114,111,100,117,99,116,0,3,18,103,108,
-95,77,97,120,76,105,103,104,116,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,84,101,120,116,117,114,
-101,69,110,118,67,111,108,111,114,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,73,109,97,
-103,101,85,110,105,116,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,69,121,101,80,108,97,110,101,83,0,
-3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,
-0,1,103,108,95,69,121,101,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,
-101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,69,121,101,80,108,97,110,101,82,0,
-3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,
-0,1,103,108,95,69,121,101,80,108,97,110,101,81,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,
-101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,79,98,106,101,99,116,80,108,97,
-110,101,83,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,
-90,95,4,0,12,0,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,84,0,3,18,103,108,95,77,97,120,
-84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,79,98,106,
-101,99,116,80,108,97,110,101,82,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,
-114,100,115,0,0,0,2,2,90,95,4,0,12,0,1,103,108,95,79,98,106,101,99,116,80,108,97,110,101,81,0,3,18,
-103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,114,100,115,0,0,0,2,2,90,95,0,0,24,103,
-108,95,70,111,103,80,97,114,97,109,101,116,101,114,115,0,12,0,99,111,108,111,114,0,0,0,1,9,0,100,
-101,110,115,105,116,121,0,0,0,1,9,0,115,116,97,114,116,0,0,0,1,9,0,101,110,100,0,0,0,1,9,0,115,99,
-97,108,101,0,0,0,0,0,0,0,2,2,90,95,4,0,25,103,108,95,70,111,103,80,97,114,97,109,101,116,101,114,
-115,0,0,1,103,108,95,70,111,103,0,0,0,1,90,95,0,0,9,0,0,114,97,100,105,97,110,115,0,1,1,0,0,9,0,
-100,101,103,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,
-0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,
-18,100,101,103,0,0,18,99,0,0,0,0,1,90,95,0,0,10,0,0,114,97,100,105,97,110,115,0,1,1,0,0,10,0,100,
-101,103,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0,
-49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,
-120,121,0,0,18,100,101,103,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,90,95,0,0,11,0,0,114,97,
-100,105,97,110,115,0,1,1,0,0,11,0,100,101,103,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,
-53,57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,
-18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,100,101,103,0,59,120,121,122,0,0,18,99,0,59,
-120,120,120,0,0,0,0,1,90,95,0,0,12,0,0,114,97,100,105,97,110,115,0,1,1,0,0,12,0,100,101,103,0,0,0,
-1,3,2,90,95,1,0,9,0,1,99,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,49,56,48,0,48,0,0,49,0,0,4,118,
-101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,100,101,103,0,
-0,18,99,0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,9,0,0,100,101,103,114,101,101,115,0,1,1,0,0,9,0,
-114,97,100,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52,49,53,57,50,54,0,
-0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,
-18,114,97,100,0,0,18,99,0,0,0,0,1,90,95,0,0,10,0,0,100,101,103,114,101,101,115,0,1,1,0,0,10,0,114,
-97,100,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52,49,53,57,50,54,0,0,49,
-0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,
-121,0,0,18,114,97,100,0,59,120,121,0,0,18,99,0,59,120,120,0,0,0,0,1,90,95,0,0,11,0,0,100,101,103,
-114,101,101,115,0,1,1,0,0,11,0,114,97,100,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,
-17,51,0,49,52,49,53,57,50,54,0,0,49,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,
-95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,114,97,100,0,59,120,121,122,0,0,18,99,0,59,120,
-120,120,0,0,0,0,1,90,95,0,0,12,0,0,100,101,103,114,101,101,115,0,1,1,0,0,12,0,114,97,100,0,0,0,1,3,
-2,90,95,1,0,9,0,1,99,0,2,17,49,56,48,0,48,0,0,17,51,0,49,52,49,53,57,50,54,0,0,49,0,0,4,118,101,99,
-52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,114,97,100,0,0,18,99,
-0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,9,0,0,115,105,110,0,1,1,0,0,9,0,114,97,100,105,97,110,115,
-0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,114,97,100,
-105,97,110,115,0,0,0,0,1,90,95,0,0,10,0,0,115,105,110,0,1,1,0,0,10,0,114,97,100,105,97,110,115,0,0,
-0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,
-97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,
-116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,115,
-105,110,0,1,1,0,0,11,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,
-18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,
-111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,
-110,115,0,59,121,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,
-59,122,0,0,18,114,97,100,105,97,110,115,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,115,105,110,0,1,1,0,0,
-12,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,
-116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,115,
-105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0,
-0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,114,
-97,100,105,97,110,115,0,59,122,0,0,0,4,102,108,111,97,116,95,115,105,110,101,0,18,95,95,114,101,
-116,86,97,108,0,59,119,0,0,18,114,97,100,105,97,110,115,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,99,111,
-115,0,1,1,0,0,9,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101,
-0,18,95,95,114,101,116,86,97,108,0,0,18,114,97,100,105,97,110,115,0,0,0,0,1,90,95,0,0,10,0,0,99,
-111,115,0,1,1,0,0,10,0,114,97,100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,
-110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,
-4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,
-114,97,100,105,97,110,115,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,99,111,115,0,1,1,0,0,11,0,114,97,100,
-105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,
-108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,99,111,115,
-105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,121,0,
-0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,
-18,114,97,100,105,97,110,115,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,99,111,115,0,1,1,0,0,12,0,114,97,
-100,105,97,110,115,0,0,0,1,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,
-86,97,108,0,59,120,0,0,18,114,97,100,105,97,110,115,0,59,120,0,0,0,4,102,108,111,97,116,95,99,111,
-115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,114,97,100,105,97,110,115,0,59,
-121,0,0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,
-0,0,18,114,97,100,105,97,110,115,0,59,122,0,0,0,4,102,108,111,97,116,95,99,111,115,105,110,101,0,
-18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,114,97,100,105,97,110,115,0,59,119,0,0,0,0,1,90,95,
-0,0,9,0,0,116,97,110,0,1,1,0,0,9,0,97,110,103,108,101,0,0,0,1,3,2,90,95,1,0,9,0,1,115,0,2,58,115,
-105,110,0,0,18,97,110,103,108,101,0,0,0,0,0,3,2,90,95,1,0,9,0,1,99,0,2,58,99,111,115,0,0,18,97,110,
-103,108,101,0,0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,90,95,0,0,10,0,0,116,97,110,0,1,1,0,0,10,0,97,
-110,103,108,101,0,0,0,1,3,2,90,95,1,0,10,0,1,115,0,2,58,115,105,110,0,0,18,97,110,103,108,101,0,0,
-0,0,0,3,2,90,95,1,0,10,0,1,99,0,2,58,99,111,115,0,0,18,97,110,103,108,101,0,0,0,0,0,8,18,115,0,18,
-99,0,49,0,0,1,90,95,0,0,11,0,0,116,97,110,0,1,1,0,0,11,0,97,110,103,108,101,0,0,0,1,3,2,90,95,1,0,
-11,0,1,115,0,2,58,115,105,110,0,0,18,97,110,103,108,101,0,0,0,0,0,3,2,90,95,1,0,11,0,1,99,0,2,58,
-99,111,115,0,0,18,97,110,103,108,101,0,0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,90,95,0,0,12,0,0,116,97,
-110,0,1,1,0,0,12,0,97,110,103,108,101,0,0,0,1,3,2,90,95,1,0,12,0,1,115,0,2,58,115,105,110,0,0,18,
-97,110,103,108,101,0,0,0,0,0,3,2,90,95,1,0,12,0,1,99,0,2,58,99,111,115,0,0,18,97,110,103,108,101,0,
-0,0,0,0,8,18,115,0,18,99,0,49,0,0,1,90,95,0,0,9,0,0,97,115,105,110,0,1,1,0,0,9,0,120,0,0,0,1,3,2,
-90,95,1,0,9,0,1,97,48,0,2,17,49,0,53,55,48,55,50,56,56,0,0,0,0,3,2,90,95,1,0,9,0,1,97,49,0,2,17,48,
-0,50,49,50,49,49,52,52,0,0,54,0,0,3,2,90,95,1,0,9,0,1,97,50,0,2,17,48,0,48,55,52,50,54,49,48,0,0,0,
-0,3,2,90,95,1,0,9,0,1,104,97,108,102,80,105,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,48,0,53,0,0,48,
-0,0,3,2,90,95,1,0,9,0,1,121,0,2,58,97,98,115,0,0,18,120,0,0,0,0,0,9,18,95,95,114,101,116,86,97,108,
-0,18,104,97,108,102,80,105,0,58,115,113,114,116,0,0,17,49,0,48,0,0,18,121,0,47,0,0,18,97,48,0,18,
-121,0,18,97,49,0,18,97,50,0,18,121,0,48,46,48,46,48,47,58,115,105,103,110,0,0,18,120,0,0,0,48,20,0,
-0,1,90,95,0,0,10,0,0,97,115,105,110,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-59,120,0,58,97,115,105,110,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,
-121,0,58,97,115,105,110,0,0,18,118,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,115,105,110,0,1,1,0,
-0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,115,105,110,0,0,18,118,0,59,
-120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,115,105,110,0,0,18,118,0,59,121,0,
-0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,115,105,110,0,0,18,118,0,59,122,0,0,0,
-20,0,0,1,90,95,0,0,12,0,0,97,115,105,110,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,59,120,0,58,97,115,105,110,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
-59,121,0,58,97,115,105,110,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,
-122,0,58,97,115,105,110,0,0,18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,
-58,97,115,105,110,0,0,18,118,0,59,119,0,0,0,20,0,0,1,90,95,0,0,9,0,0,97,99,111,115,0,1,1,0,0,9,0,
-120,0,0,0,1,3,2,90,95,1,0,9,0,1,104,97,108,102,80,105,0,2,17,51,0,49,52,49,53,57,50,54,0,0,17,48,0,
-53,0,0,48,0,0,9,18,95,95,114,101,116,86,97,108,0,18,104,97,108,102,80,105,0,58,97,115,105,110,0,0,
-18,120,0,0,0,47,20,0,0,1,90,95,0,0,10,0,0,97,99,111,115,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,59,120,0,58,97,99,111,115,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,59,121,0,58,97,99,111,115,0,0,18,118,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,
-99,111,115,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,99,111,115,
-0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,99,111,115,0,0,18,
-118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,99,111,115,0,0,18,118,0,
-59,122,0,0,0,20,0,0,1,90,95,0,0,12,0,0,97,99,111,115,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,59,120,0,58,97,99,111,115,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,
-97,108,0,59,121,0,58,97,99,111,115,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,
-0,59,122,0,58,97,99,111,115,0,0,18,118,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,
-119,0,58,97,99,111,115,0,0,18,118,0,59,119,0,0,0,20,0,0,1,90,95,0,0,9,0,0,97,116,97,110,0,1,1,0,0,
-9,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,97,115,105,110,0,0,18,120,0,58,105,110,118,
-101,114,115,101,115,113,114,116,0,0,18,120,0,18,120,0,48,17,49,0,48,0,0,46,0,0,48,0,0,20,0,0,1,90,
-95,0,0,10,0,0,97,116,97,110,0,1,1,0,0,10,0,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,
-20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,
-120,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,116,97,110,0,1,1,0,0,11,0,121,95,111,118,101,114,
-95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,121,95,111,118,
-101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,
-0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,
-58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,122,0,0,0,20,0,0,1,90,95,0,0,12,0,0,97,
-116,97,110,0,1,1,0,0,12,0,121,95,111,118,101,114,95,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-59,120,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,120,0,0,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,120,0,59,121,0,0,0,
-20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,97,116,97,110,0,0,18,121,95,111,118,101,114,95,
-120,0,59,122,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,97,116,97,110,0,0,18,121,95,
-111,118,101,114,95,120,0,59,119,0,0,0,20,0,0,1,90,95,0,0,9,0,0,97,116,97,110,0,1,1,0,0,9,0,121,0,0,
-1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,10,58,97,98,115,0,0,18,120,0,0,0,17,49,0,48,
-0,45,52,0,41,0,2,9,18,114,0,58,97,116,97,110,0,0,18,121,0,18,120,0,49,0,0,20,0,10,18,120,0,17,48,0,
-48,0,0,40,0,2,9,18,114,0,18,114,0,58,115,105,103,110,0,0,18,121,0,0,0,17,51,0,49,52,49,53,57,51,0,
-0,48,46,20,0,0,9,14,0,0,2,9,18,114,0,58,115,105,103,110,0,0,18,121,0,0,0,17,49,0,53,55,48,55,57,54,
-53,0,0,48,20,0,0,8,18,114,0,0,0,1,90,95,0,0,10,0,0,97,116,97,110,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,
-0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,117,0,59,120,0,0,
-18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,0,0,18,117,
-0,59,121,0,0,18,118,0,59,121,0,0,0,20,0,0,1,90,95,0,0,11,0,0,97,116,97,110,0,1,1,0,0,11,0,117,0,0,
-1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,97,116,97,110,0,0,18,117,0,
-59,120,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,97,116,97,110,
-0,0,18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,
-97,116,97,110,0,0,18,117,0,59,122,0,0,18,118,0,59,122,0,0,0,20,0,0,1,90,95,0,0,12,0,0,97,116,97,
-110,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,
-97,116,97,110,0,0,18,117,0,59,120,0,0,18,118,0,59,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,
-0,59,121,0,58,97,116,97,110,0,0,18,117,0,59,121,0,0,18,118,0,59,121,0,0,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,59,122,0,58,97,116,97,110,0,0,18,117,0,59,122,0,0,18,118,0,59,122,0,0,0,20,0,9,18,
-95,95,114,101,116,86,97,108,0,59,119,0,58,97,116,97,110,0,0,18,117,0,59,119,0,0,18,118,0,59,119,0,
-0,0,20,0,0,1,90,95,0,0,9,0,0,112,111,119,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,102,108,111,
-97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,
-0,0,10,0,0,112,111,119,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,4,102,108,111,97,116,95,112,
-111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0,
-0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,
-97,0,59,121,0,0,18,98,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,112,111,119,0,1,1,0,0,11,0,97,0,0,1,1,0,
-0,11,0,98,0,0,0,1,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,
-59,120,0,0,18,97,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,
-18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,
-97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,18,
-98,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,112,111,119,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4,
-102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,59,
-120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,
-97,108,0,59,121,0,0,18,97,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,112,111,119,
-101,114,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,18,98,0,59,122,0,0,0,4,
-102,108,111,97,116,95,112,111,119,101,114,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,97,0,59,
-119,0,0,18,98,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,101,120,112,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,
-0,9,0,1,116,0,2,18,97,0,17,49,0,52,52,50,54,57,53,48,50,0,0,48,0,0,4,102,108,111,97,116,95,101,120,
-112,50,0,18,95,95,114,101,116,86,97,108,0,0,18,116,0,0,0,0,1,90,95,0,0,10,0,0,101,120,112,0,1,1,0,
-0,10,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,116,0,2,18,97,0,17,49,0,52,52,50,54,57,53,48,50,0,0,48,0,0,
-4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,116,0,59,
-120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,
-116,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,101,120,112,0,1,1,0,0,11,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,
-116,0,2,18,97,0,17,49,0,52,52,50,54,57,53,48,50,0,0,48,0,0,4,102,108,111,97,116,95,101,120,112,50,
-0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,116,0,59,120,0,0,0,4,102,108,111,97,116,95,101,
-120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,116,0,59,121,0,0,0,4,102,108,111,97,
-116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,116,0,59,122,0,0,0,0,1,90,
-95,0,0,12,0,0,101,120,112,0,1,1,0,0,12,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,116,0,2,18,97,0,17,49,0,
-52,52,50,54,57,53,48,50,0,0,48,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,
-86,97,108,0,59,120,0,0,18,116,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,
-101,116,86,97,108,0,59,121,0,0,18,116,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,
-95,95,114,101,116,86,97,108,0,59,122,0,0,18,116,0,59,122,0,0,0,4,102,108,111,97,116,95,101,120,112,
-50,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,116,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,108,111,
-103,50,0,1,1,0,0,9,0,120,0,0,0,1,4,102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,
-97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,108,111,103,50,0,1,1,0,0,10,0,118,0,0,0,1,4,102,108,
-111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,
-102,108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,
-0,0,0,0,1,90,95,0,0,11,0,0,108,111,103,50,0,1,1,0,0,11,0,118,0,0,0,1,4,102,108,111,97,116,95,108,
-111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,
-116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,
-108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,
-0,0,1,90,95,0,0,12,0,0,108,111,103,50,0,1,1,0,0,12,0,118,0,0,0,1,4,102,108,111,97,116,95,108,111,
-103,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95,
-108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108,111,
-97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,4,102,
-108,111,97,116,95,108,111,103,50,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,0,59,119,0,0,
-0,0,1,90,95,0,0,9,0,0,108,111,103,0,1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,
-57,51,49,52,55,49,56,49,0,0,0,0,8,58,108,111,103,50,0,0,18,120,0,0,0,18,99,0,48,0,0,1,90,95,0,0,10,
-0,0,108,111,103,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,57,51,49,52,55,49,
-56,49,0,0,0,0,8,58,108,111,103,50,0,0,18,118,0,0,0,18,99,0,48,0,0,1,90,95,0,0,11,0,0,108,111,103,0,
-1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,57,51,49,52,55,49,56,49,0,0,0,0,8,
-58,108,111,103,50,0,0,18,118,0,0,0,18,99,0,48,0,0,1,90,95,0,0,12,0,0,108,111,103,0,1,1,0,0,12,0,
-118,0,0,0,1,3,2,90,95,1,0,9,0,1,99,0,2,17,48,0,54,57,51,49,52,55,49,56,49,0,0,0,0,8,58,108,111,103,
-50,0,0,18,118,0,0,0,18,99,0,48,0,0,1,90,95,0,0,9,0,0,101,120,112,50,0,1,1,0,0,9,0,97,0,0,0,1,4,102,
-108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,
-0,0,101,120,112,50,0,1,1,0,0,10,0,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,
-101,116,86,97,108,0,59,120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,
-95,114,101,116,86,97,108,0,59,121,0,0,18,97,0,59,121,0,0,0,0,1,90,95,0,0,11,0,0,101,120,112,50,0,1,
-1,0,0,11,0,97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,
-120,0,0,18,97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,
-108,0,59,121,0,0,18,97,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,
-116,86,97,108,0,59,122,0,0,18,97,0,59,122,0,0,0,0,1,90,95,0,0,12,0,0,101,120,112,50,0,1,1,0,0,12,0,
-97,0,0,0,1,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,
-97,0,59,120,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,59,121,
-0,0,18,97,0,59,121,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,97,108,0,
-59,122,0,0,18,97,0,59,122,0,0,0,4,102,108,111,97,116,95,101,120,112,50,0,18,95,95,114,101,116,86,
-97,108,0,59,119,0,0,18,97,0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,115,113,114,116,0,1,1,0,0,9,0,120,0,0,
-0,1,3,2,90,95,1,0,9,0,1,110,120,0,2,18,120,0,54,0,0,3,2,90,95,0,0,9,0,1,114,0,0,0,4,102,108,111,97,
-116,95,114,115,113,0,18,114,0,0,18,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,0,18,
-114,0,0,0,4,118,101,99,52,95,99,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,
-0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,10,0,0,115,113,114,116,0,1,1,0,0,10,0,120,0,0,0,1,3,2,90,95,1,
-0,10,0,1,110,120,0,2,18,120,0,54,0,1,1,122,101,114,111,0,2,58,118,101,99,50,0,0,17,48,0,48,0,0,0,0,
-0,0,3,2,90,95,0,0,10,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18,
-120,0,59,120,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0,
-4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0,18,114,0,59,120,0,0,0,4,102,108,111,97,
-116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0,0,4,118,101,99,52,95,99,109,112,0,18,
-95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0,0,0,0,1,90,95,0,0,
-11,0,0,115,113,114,116,0,1,1,0,0,11,0,120,0,0,0,1,3,2,90,95,1,0,11,0,1,110,120,0,2,18,120,0,54,0,1,
-1,122,101,114,111,0,2,58,118,101,99,51,0,0,17,48,0,48,0,0,0,0,0,0,3,2,90,95,0,0,11,0,1,114,0,0,0,4,
-102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18,120,0,59,120,0,0,0,4,102,108,111,97,116,
-95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0,4,102,108,111,97,116,95,114,115,113,0,
-18,114,0,59,122,0,0,18,120,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0,
-18,114,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0,
-0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,122,0,0,18,114,0,59,122,0,0,0,4,118,101,99,52,
-95,99,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0,
-0,0,0,1,90,95,0,0,12,0,0,115,113,114,116,0,1,1,0,0,12,0,120,0,0,0,1,3,2,90,95,1,0,12,0,1,110,120,0,
-2,18,120,0,54,0,1,1,122,101,114,111,0,2,58,118,101,99,52,0,0,17,48,0,48,0,0,0,0,0,0,3,2,90,95,0,0,
-12,0,1,114,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,59,120,0,0,18,120,0,59,120,0,0,0,4,
-102,108,111,97,116,95,114,115,113,0,18,114,0,59,121,0,0,18,120,0,59,121,0,0,0,4,102,108,111,97,116,
-95,114,115,113,0,18,114,0,59,122,0,0,18,120,0,59,122,0,0,0,4,102,108,111,97,116,95,114,115,113,0,
-18,114,0,59,119,0,0,18,120,0,59,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,120,0,0,
-18,114,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,121,0,0,18,114,0,59,121,0,0,
-0,4,102,108,111,97,116,95,114,99,112,0,18,114,0,59,122,0,0,18,114,0,59,122,0,0,0,4,102,108,111,97,
-116,95,114,99,112,0,18,114,0,59,119,0,0,18,114,0,59,119,0,0,0,4,118,101,99,52,95,99,109,112,0,18,
-95,95,114,101,116,86,97,108,0,0,18,110,120,0,0,18,114,0,0,18,122,101,114,111,0,0,0,0,1,90,95,0,0,9,
-0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,9,0,120,0,0,0,1,4,102,108,111,97,116,95,
-114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,105,
-110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,10,0,118,0,0,0,1,4,102,108,111,97,116,95,114,115,
-113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,116,95,
-114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,0,1,90,95,0,0,11,0,
-0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,11,0,118,0,0,0,1,4,102,108,111,97,116,95,
-114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,102,108,111,97,
-116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,0,0,4,102,108,
-111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,122,0,0,0,0,1,
-90,95,0,0,12,0,0,105,110,118,101,114,115,101,115,113,114,116,0,1,1,0,0,12,0,118,0,0,0,1,4,102,108,
-111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,118,0,59,120,0,0,0,4,
-102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,118,0,59,121,0,
-0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,118,0,59,
-122,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,118,
-0,59,119,0,0,0,0,1,90,95,0,0,9,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,9,0,120,0,0,0,1,9,
-18,95,95,114,101,116,86,97,108,0,17,49,0,48,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,114,109,97,108,
-105,122,101,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,1,0,9,0,1,115,0,2,58,105,110,118,101,114,115,101,
-115,113,114,116,0,0,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0,0,0,4,118,101,99,52,95,109,117,
-108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,115,0,0,0,
-0,1,90,95,0,0,11,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0,9,
-0,1,116,109,112,0,0,0,4,118,101,99,51,95,100,111,116,0,18,116,109,112,0,0,18,118,0,0,18,118,0,0,0,
-4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0,4,118,101,99,52,95,
-109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,
-18,116,109,112,0,0,0,0,1,90,95,0,0,12,0,0,110,111,114,109,97,108,105,122,101,0,1,1,0,0,12,0,118,0,
-0,0,1,3,2,90,95,0,0,9,0,1,116,109,112,0,0,0,4,118,101,99,52,95,100,111,116,0,18,116,109,112,0,0,18,
-118,0,0,18,118,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,116,109,112,0,0,18,116,109,112,0,0,0,
-4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,
-122,0,0,18,118,0,0,18,116,109,112,0,0,0,0,1,90,95,0,0,9,0,0,97,98,115,0,1,1,0,0,9,0,97,0,0,0,1,4,
-118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0,
-97,98,115,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,
-0,59,120,121,0,0,18,97,0,0,0,0,1,90,95,0,0,11,0,0,97,98,115,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101,99,
-52,95,97,98,115,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,90,95,0,0,12,
-0,0,97,98,115,0,1,1,0,0,12,0,97,0,0,0,1,4,118,101,99,52,95,97,98,115,0,18,95,95,114,101,116,86,97,
-108,0,0,18,97,0,0,0,0,1,90,95,0,0,9,0,0,115,105,103,110,0,1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,0,0,9,
-0,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,0,18,120,0,0,17,48,0,48,0,0,0,
-0,4,118,101,99,52,95,115,103,116,0,18,110,0,0,17,48,0,48,0,0,0,18,120,0,0,0,4,118,101,99,52,95,115,
-117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,18,110,0,0,0,0,1,90,95,0,
-0,10,0,0,115,105,103,110,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,10,0,1,112,0,0,1,1,110,0,0,0,4,
-118,101,99,52,95,115,103,116,0,18,112,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,4,118,101,99,
-52,95,115,103,116,0,18,110,0,59,120,121,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95,115,
-117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,112,0,0,18,110,0,0,0,
-0,1,90,95,0,0,11,0,0,115,105,103,110,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0,11,0,1,112,0,0,1,1,
-110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,
-0,4,118,101,99,52,95,115,103,116,0,18,110,0,59,120,121,122,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,
-101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,
-112,0,0,18,110,0,0,0,0,1,90,95,0,0,12,0,0,115,105,103,110,0,1,1,0,0,12,0,118,0,0,0,1,3,2,90,95,0,0,
-12,0,1,112,0,0,1,1,110,0,0,0,4,118,101,99,52,95,115,103,116,0,18,112,0,0,18,118,0,0,17,48,0,48,0,0,
-0,0,4,118,101,99,52,95,115,103,116,0,18,110,0,0,17,48,0,48,0,0,0,18,118,0,0,0,4,118,101,99,52,95,
-115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,18,110,0,0,0,0,1,90,
-95,0,0,9,0,0,102,108,111,111,114,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0,
-18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0,102,108,111,111,114,0,1,1,0,0,
-10,0,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120,
-121,0,0,18,97,0,0,0,0,1,90,95,0,0,11,0,0,102,108,111,111,114,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101,
-99,52,95,102,108,111,111,114,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,
-90,95,0,0,12,0,0,102,108,111,111,114,0,1,1,0,0,12,0,97,0,0,0,1,4,118,101,99,52,95,102,108,111,111,
-114,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,9,0,0,99,101,105,108,0,1,1,0,0,
-9,0,97,0,0,0,1,3,2,90,95,0,0,9,0,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,
-18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,54,20,0,0,1,90,95,0,0,10,0,0,99,
-101,105,108,0,1,1,0,0,10,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,
-95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,
-98,0,54,20,0,0,1,90,95,0,0,11,0,0,99,101,105,108,0,1,1,0,0,11,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,98,
-0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,
-101,116,86,97,108,0,59,120,121,122,0,18,98,0,54,20,0,0,1,90,95,0,0,12,0,0,99,101,105,108,0,1,1,0,0,
-12,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,98,0,2,18,97,0,54,0,0,4,118,101,99,52,95,102,108,111,111,114,
-0,18,98,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,98,0,54,20,0,0,1,90,95,0,0,9,0,0,102,
-114,97,99,116,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,
-97,108,0,0,18,97,0,0,0,0,1,90,95,0,0,10,0,0,102,114,97,99,116,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101,
-99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,0,0,1,90,95,0,0,
-11,0,0,102,114,97,99,116,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,
-101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,0,0,1,90,95,0,0,12,0,0,102,114,97,99,116,0,1,1,0,
-0,12,0,97,0,0,0,1,4,118,101,99,52,95,102,114,97,99,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,
-0,0,1,90,95,0,0,9,0,0,109,111,100,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,
-111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,
-114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58,102,108,111,111,114,0,
-0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,10,0,0,109,111,100,0,
-1,1,0,0,10,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,111,110,101,79,118,101,114,66,0,0,0,
-4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,
-114,101,116,86,97,108,0,59,120,121,0,18,97,0,18,98,0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,
-101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,11,0,0,109,111,100,0,1,1,0,0,11,0,97,0,0,1,
-1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,
-95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,
-0,59,120,121,122,0,18,97,0,18,98,0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,
-114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,12,0,0,109,111,100,0,1,1,0,0,12,0,97,0,0,1,1,0,0,9,0,98,0,
-0,0,1,3,2,90,95,0,0,9,0,1,111,110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,
-18,111,110,101,79,118,101,114,66,0,0,18,98,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,
-0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,
-95,0,0,10,0,0,109,111,100,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,3,2,90,95,0,0,10,0,1,111,
-110,101,79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,
-66,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,
-101,114,66,0,59,121,0,0,18,98,0,59,121,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58,
-102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,
-11,0,0,109,111,100,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,3,2,90,95,0,0,11,0,1,111,110,101,
-79,118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,59,
-120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,
-0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,
-114,66,0,59,122,0,0,18,98,0,59,122,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,0,58,102,
-108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,95,0,0,12,
-0,0,109,111,100,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,3,2,90,95,0,0,12,0,1,111,110,101,79,
-118,101,114,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,0,59,
-120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,114,66,
-0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,118,101,
-114,66,0,59,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,111,110,101,79,
-118,101,114,66,0,59,119,0,0,18,98,0,59,119,0,0,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,18,98,
-0,58,102,108,111,111,114,0,0,18,97,0,18,111,110,101,79,118,101,114,66,0,48,0,0,48,47,20,0,0,1,90,
-95,0,0,9,0,0,109,105,110,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,
-110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,0,109,105,110,0,
-1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,
-86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,121,0,0,0,0,1,90,95,0,0,11,0,0,
-109,105,110,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,
-95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,120,121,122,0,
-0,0,0,1,90,95,0,0,12,0,0,109,105,110,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4,118,101,99,52,
-95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,0,109,
-105,110,0,1,1,0,0,10,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,
-101,116,86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,0,109,105,110,0,1,1,0,
-0,11,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,
-108,0,0,18,97,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,0,109,105,110,0,1,1,0,0,12,0,97,
-0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,105,110,0,18,95,95,114,101,116,86,97,108,0,0,18,
-97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,0,109,97,120,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,
-118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,
-0,10,0,0,109,97,120,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,
-18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,59,120,121,0,0,18,98,0,59,120,121,0,0,0,0,
-1,90,95,0,0,11,0,0,109,97,120,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,4,118,101,99,52,95,109,
-97,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,59,120,121,122,0,0,18,98,0,59,
-120,121,122,0,0,0,0,1,90,95,0,0,12,0,0,109,97,120,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4,
-118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,
-0,10,0,0,109,97,120,0,1,1,0,0,10,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,
-18,95,95,114,101,116,86,97,108,0,0,18,97,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,0,109,97,
-120,0,1,1,0,0,11,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,
-116,86,97,108,0,0,18,97,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,0,109,97,120,0,1,1,0,0,
-12,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,97,120,0,18,95,95,114,101,116,86,97,108,
-0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,0,99,108,97,109,112,0,1,1,0,0,9,0,118,97,108,0,0,1,1,0,
-0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,99,108,
-97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,18,
-109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,10,0,0,99,108,97,109,112,0,1,1,0,0,10,0,118,97,108,0,0,1,
-1,0,0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,99,
-108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,0,0,
-18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,11,0,0,99,108,97,109,112,0,1,1,0,0,11,0,118,97,108,0,0,
-1,1,0,0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,95,
-99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,108,
-0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,12,0,0,99,108,97,109,112,0,1,1,0,0,12,0,118,97,108,
-0,0,1,1,0,0,9,0,109,105,110,86,97,108,0,0,1,1,0,0,9,0,109,97,120,86,97,108,0,0,0,1,4,118,101,99,52,
-95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,86,97,
-108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,10,0,0,99,108,97,109,112,0,1,1,0,0,10,0,118,97,
-108,0,0,1,1,0,0,10,0,109,105,110,86,97,108,0,0,1,1,0,0,10,0,109,97,120,86,97,108,0,0,0,1,4,118,101,
-99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,105,110,
-86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,11,0,0,99,108,97,109,112,0,1,1,0,0,11,0,
-118,97,108,0,0,1,1,0,0,11,0,109,105,110,86,97,108,0,0,1,1,0,0,11,0,109,97,120,86,97,108,0,0,0,1,4,
-118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,109,
-105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,12,0,0,99,108,97,109,112,0,1,1,0,
-0,12,0,118,97,108,0,0,1,1,0,0,12,0,109,105,110,86,97,108,0,0,1,1,0,0,12,0,109,97,120,86,97,108,0,0,
-0,1,4,118,101,99,52,95,99,108,97,109,112,0,18,95,95,114,101,116,86,97,108,0,0,18,118,97,108,0,0,18,
-109,105,110,86,97,108,0,0,18,109,97,120,86,97,108,0,0,0,0,1,90,95,0,0,9,0,0,109,105,120,0,1,1,0,0,
-9,0,120,0,0,1,1,0,0,9,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,95,95,
-114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,109,105,120,0,1,1,
-0,0,10,0,120,0,0,1,1,0,0,10,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,114,112,0,18,
-95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,11,0,0,109,105,120,
-0,1,1,0,0,11,0,120,0,0,1,1,0,0,11,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,114,112,
-0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,12,0,0,109,
-105,120,0,1,1,0,0,12,0,120,0,0,1,1,0,0,12,0,121,0,0,1,1,0,0,9,0,97,0,0,0,1,4,118,101,99,52,95,108,
-114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,
-0,109,105,120,0,1,1,0,0,10,0,120,0,0,1,1,0,0,10,0,121,0,0,1,1,0,0,10,0,97,0,0,0,1,4,118,101,99,52,
-95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,95,0,
-0,11,0,0,109,105,120,0,1,1,0,0,11,0,120,0,0,1,1,0,0,11,0,121,0,0,1,1,0,0,11,0,97,0,0,0,1,4,118,101,
-99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,0,0,1,90,
-95,0,0,12,0,0,109,105,120,0,1,1,0,0,12,0,120,0,0,1,1,0,0,12,0,121,0,0,1,1,0,0,12,0,97,0,0,0,1,4,
-118,101,99,52,95,108,114,112,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,121,0,0,18,120,0,0,
-0,0,1,90,95,0,0,9,0,0,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,0,0,1,1,0,0,9,0,120,0,0,0,1,4,
-118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,18,101,100,103,101,0,
-0,0,0,1,90,95,0,0,10,0,0,115,116,101,112,0,1,1,0,0,10,0,101,100,103,101,0,0,1,1,0,0,10,0,120,0,0,0,
-1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,120,0,0,18,
-101,100,103,101,0,0,0,0,1,90,95,0,0,11,0,0,115,116,101,112,0,1,1,0,0,11,0,101,100,103,101,0,0,1,1,
-0,0,11,0,120,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,
-122,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,90,95,0,0,12,0,0,115,116,101,112,0,1,1,0,0,12,0,
-101,100,103,101,0,0,1,1,0,0,12,0,120,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,
-86,97,108,0,0,18,120,0,0,18,101,100,103,101,0,0,0,0,1,90,95,0,0,10,0,0,115,116,101,112,0,1,1,0,0,9,
-0,101,100,103,101,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,
-116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,101,100,103,101,0,0,0,0,1,90,95,0,0,11,0,0,115,116,
-101,112,0,1,1,0,0,9,0,101,100,103,101,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,
-0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,101,100,103,101,0,0,0,0,1,90,
-95,0,0,12,0,0,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,
-99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,101,100,103,101,0,0,0,0,1,
-90,95,0,0,9,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,48,0,0,1,1,0,
-0,9,0,101,100,103,101,49,0,0,1,1,0,0,9,0,120,0,0,0,1,3,2,90,95,0,0,9,0,1,116,0,2,58,99,108,97,109,
-112,0,0,18,120,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,
-0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,
-116,0,48,47,48,0,0,1,90,95,0,0,10,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,10,0,101,
-100,103,101,48,0,0,1,1,0,0,10,0,101,100,103,101,49,0,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,10,0,
-1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,
-101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,
-0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,11,0,0,115,109,111,111,116,104,115,116,
-101,112,0,1,1,0,0,11,0,101,100,103,101,48,0,0,1,1,0,0,11,0,101,100,103,101,49,0,0,1,1,0,0,11,0,118,
-0,0,0,1,3,2,90,95,0,0,11,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,
-18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,
-18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,12,0,0,115,
-109,111,111,116,104,115,116,101,112,0,1,1,0,0,12,0,101,100,103,101,48,0,0,1,1,0,0,12,0,101,100,103,
-101,49,0,0,1,1,0,0,12,0,118,0,0,0,1,3,2,90,95,0,0,12,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,
-18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,
-0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,
-0,1,90,95,0,0,10,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,9,0,101,100,103,101,48,0,0,
-1,1,0,0,9,0,101,100,103,101,49,0,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,10,0,1,116,0,2,58,99,108,
-97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,
-47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,
-0,18,116,0,48,47,48,0,0,1,90,95,0,0,11,0,0,115,109,111,111,116,104,115,116,101,112,0,1,1,0,0,9,0,
-101,100,103,101,48,0,0,1,1,0,0,9,0,101,100,103,101,49,0,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,95,0,0,
-11,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,47,18,101,100,103,101,49,
-0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,8,18,116,0,18,116,0,48,
-17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,12,0,0,115,109,111,111,116,104,115,
-116,101,112,0,1,1,0,0,9,0,101,100,103,101,48,0,0,1,1,0,0,9,0,101,100,103,101,49,0,0,1,1,0,0,12,0,
-118,0,0,0,1,3,2,90,95,0,0,12,0,1,116,0,2,58,99,108,97,109,112,0,0,18,118,0,18,101,100,103,101,48,0,
-47,18,101,100,103,101,49,0,18,101,100,103,101,48,0,47,49,0,17,48,0,48,0,0,0,17,49,0,48,0,0,0,0,0,0,
-8,18,116,0,18,116,0,48,17,51,0,48,0,0,17,50,0,48,0,0,18,116,0,48,47,48,0,0,1,90,95,0,0,9,0,0,108,
-101,110,103,116,104,0,1,1,0,0,9,0,120,0,0,0,1,8,58,97,98,115,0,0,18,120,0,0,0,0,0,1,90,95,0,0,9,0,
-0,108,101,110,103,116,104,0,1,1,0,0,10,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,3,2,90,95,1,0,9,
-0,1,112,0,2,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,
-18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,59,
-120,0,0,18,114,0,0,0,0,1,90,95,0,0,9,0,0,108,101,110,103,116,104,0,1,1,0,0,11,0,118,0,0,0,1,3,2,90,
-95,0,0,9,0,1,114,0,0,0,3,2,90,95,1,0,9,0,1,112,0,2,58,100,111,116,0,0,18,118,0,0,18,118,0,0,0,0,0,
-4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,108,111,97,116,95,114,99,112,0,
-18,95,95,114,101,116,86,97,108,0,0,18,114,0,0,0,0,1,90,95,0,0,9,0,0,108,101,110,103,116,104,0,1,1,
-0,0,12,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,114,0,0,0,3,2,90,95,1,0,9,0,1,112,0,2,58,100,111,116,0,0,
-18,118,0,0,18,118,0,0,0,0,0,4,102,108,111,97,116,95,114,115,113,0,18,114,0,0,18,112,0,0,0,4,102,
-108,111,97,116,95,114,99,112,0,18,95,95,114,101,116,86,97,108,0,0,18,114,0,0,0,0,1,90,95,0,0,9,0,0,
-100,105,115,116,97,110,99,101,0,1,1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,0,1,3,2,90,95,1,0,9,0,1,
-100,0,2,18,120,0,18,121,0,47,0,0,9,18,95,95,114,101,116,86,97,108,0,58,108,101,110,103,116,104,0,0,
-18,100,0,0,0,20,0,0,1,90,95,0,0,9,0,0,100,105,115,116,97,110,99,101,0,1,1,0,0,10,0,118,0,0,1,1,0,0,
-10,0,117,0,0,0,1,3,2,90,95,1,0,10,0,1,100,50,0,2,18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116,
-86,97,108,0,58,108,101,110,103,116,104,0,0,18,100,50,0,0,0,20,0,0,1,90,95,0,0,9,0,0,100,105,115,
-116,97,110,99,101,0,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,3,2,90,95,1,0,11,0,1,100,51,0,2,
-18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116,86,97,108,0,58,108,101,110,103,116,104,0,0,18,100,
-51,0,0,0,20,0,0,1,90,95,0,0,9,0,0,100,105,115,116,97,110,99,101,0,1,1,0,0,12,0,118,0,0,1,1,0,0,12,
-0,117,0,0,0,1,3,2,90,95,1,0,12,0,1,100,52,0,2,18,118,0,18,117,0,47,0,0,9,18,95,95,114,101,116,86,
-97,108,0,58,108,101,110,103,116,104,0,0,18,100,52,0,0,0,20,0,0,1,90,95,0,0,11,0,0,99,114,111,115,
-115,0,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,51,95,99,114,111,115,115,0,18,95,
-95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,9,0,0,102,97,
-99,101,102,111,114,119,97,114,100,0,1,1,0,0,9,0,78,0,0,1,1,0,0,9,0,73,0,0,1,1,0,0,9,0,78,114,101,
-102,0,0,0,1,3,2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,
-2,90,95,0,0,9,0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,
-0,0,8,58,109,105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,10,0,0,102,97,99,101,
-102,111,114,119,97,114,100,0,1,1,0,0,10,0,78,0,0,1,1,0,0,10,0,73,0,0,1,1,0,0,10,0,78,114,101,102,0,
-0,0,1,3,2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,90,
-95,0,0,9,0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,
-58,109,105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,11,0,0,102,97,99,101,102,
-111,114,119,97,114,100,0,1,1,0,0,11,0,78,0,0,1,1,0,0,11,0,73,0,0,1,1,0,0,11,0,78,114,101,102,0,0,0,
-1,3,2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,90,95,0,
-0,9,0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,
-109,105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,12,0,0,102,97,99,101,102,111,
-114,119,97,114,100,0,1,1,0,0,12,0,78,0,0,1,1,0,0,12,0,73,0,0,1,1,0,0,12,0,78,114,101,102,0,0,0,1,3,
-2,90,95,1,0,9,0,1,100,0,2,58,100,111,116,0,0,18,78,114,101,102,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,
-0,1,115,0,0,0,4,118,101,99,52,95,115,103,116,0,18,115,0,0,17,48,0,48,0,0,0,18,100,0,0,0,8,58,109,
-105,120,0,0,18,78,0,54,0,18,78,0,0,18,115,0,0,0,0,0,1,90,95,0,0,9,0,0,114,101,102,108,101,99,116,0,
-1,1,0,0,9,0,73,0,0,1,1,0,0,9,0,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,
-73,0,0,0,48,18,78,0,48,47,0,0,1,90,95,0,0,10,0,0,114,101,102,108,101,99,116,0,1,1,0,0,10,0,73,0,0,
-1,1,0,0,10,0,78,0,0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,48,18,78,
-0,48,47,0,0,1,90,95,0,0,11,0,0,114,101,102,108,101,99,116,0,1,1,0,0,11,0,73,0,0,1,1,0,0,11,0,78,0,
-0,0,1,8,18,73,0,17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,90,
-95,0,0,12,0,0,114,101,102,108,101,99,116,0,1,1,0,0,12,0,73,0,0,1,1,0,0,12,0,78,0,0,0,1,8,18,73,0,
-17,50,0,48,0,0,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,48,18,78,0,48,47,0,0,1,90,95,0,0,9,0,0,114,
-101,102,114,97,99,116,0,1,1,0,0,9,0,73,0,0,1,1,0,0,9,0,78,0,0,1,1,0,0,9,0,101,116,97,0,0,0,1,3,2,
-90,95,0,0,9,0,1,110,95,100,111,116,95,105,0,2,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,0,0,3,2,90,
-95,0,0,9,0,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,18,110,95,
-100,111,116,95,105,0,18,110,95,100,111,116,95,105,0,48,47,48,47,0,0,3,2,90,95,0,0,9,0,1,114,101,
-116,118,97,108,0,0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,114,101,116,118,97,108,0,17,48,0,48,0,0,
-20,0,9,18,114,101,116,118,97,108,0,18,101,116,97,0,18,73,0,48,18,101,116,97,0,18,110,95,100,111,
-116,95,105,0,48,58,115,113,114,116,0,0,18,107,0,0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,118,97,
-108,0,0,0,1,90,95,0,0,10,0,0,114,101,102,114,97,99,116,0,1,1,0,0,10,0,73,0,0,1,1,0,0,10,0,78,0,0,1,
-1,0,0,9,0,101,116,97,0,0,0,1,3,2,90,95,0,0,9,0,1,110,95,100,111,116,95,105,0,2,58,100,111,116,0,0,
-18,78,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,0,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,
-0,48,17,49,0,48,0,0,18,110,95,100,111,116,95,105,0,18,110,95,100,111,116,95,105,0,48,47,48,47,0,0,
-3,2,90,95,0,0,10,0,1,114,101,116,118,97,108,0,0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,114,101,116,
-118,97,108,0,58,118,101,99,50,0,0,17,48,0,48,0,0,0,0,20,0,9,18,114,101,116,118,97,108,0,18,101,116,
-97,0,18,73,0,48,18,101,116,97,0,18,110,95,100,111,116,95,105,0,48,58,115,113,114,116,0,0,18,107,0,
-0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,118,97,108,0,0,0,1,90,95,0,0,11,0,0,114,101,102,114,97,
-99,116,0,1,1,0,0,11,0,73,0,0,1,1,0,0,11,0,78,0,0,1,1,0,0,9,0,101,116,97,0,0,0,1,3,2,90,95,0,0,9,0,
-1,110,95,100,111,116,95,105,0,2,58,100,111,116,0,0,18,78,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,0,1,
-107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,101,116,97,0,48,17,49,0,48,0,0,18,110,95,100,111,116,95,
-105,0,18,110,95,100,111,116,95,105,0,48,47,48,47,0,0,3,2,90,95,0,0,11,0,1,114,101,116,118,97,108,0,
-0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,114,101,116,118,97,108,0,58,118,101,99,51,0,0,17,48,0,48,
-0,0,0,0,20,0,9,18,114,101,116,118,97,108,0,18,101,116,97,0,18,73,0,48,18,101,116,97,0,18,110,95,
-100,111,116,95,105,0,48,58,115,113,114,116,0,0,18,107,0,0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,
-118,97,108,0,0,0,1,90,95,0,0,12,0,0,114,101,102,114,97,99,116,0,1,1,0,0,12,0,73,0,0,1,1,0,0,12,0,
-78,0,0,1,1,0,0,9,0,101,116,97,0,0,0,1,3,2,90,95,0,0,9,0,1,110,95,100,111,116,95,105,0,2,58,100,111,
-116,0,0,18,78,0,0,18,73,0,0,0,0,0,3,2,90,95,0,0,9,0,1,107,0,2,17,49,0,48,0,0,18,101,116,97,0,18,
-101,116,97,0,48,17,49,0,48,0,0,18,110,95,100,111,116,95,105,0,18,110,95,100,111,116,95,105,0,48,47,
-48,47,0,0,3,2,90,95,0,0,12,0,1,114,101,116,118,97,108,0,0,0,10,18,107,0,17,48,0,48,0,0,40,0,9,18,
-114,101,116,118,97,108,0,58,118,101,99,52,0,0,17,48,0,48,0,0,0,0,20,0,9,18,114,101,116,118,97,108,
-0,18,101,116,97,0,18,73,0,48,18,101,116,97,0,18,110,95,100,111,116,95,105,0,48,58,115,113,114,116,
-0,0,18,107,0,0,0,46,18,78,0,48,47,20,0,8,18,114,101,116,118,97,108,0,0,0,1,90,95,0,0,13,0,0,109,97,
-116,114,105,120,67,111,109,112,77,117,108,116,0,1,0,0,0,13,0,109,0,0,1,0,0,0,13,0,110,0,0,0,1,8,58,
-109,97,116,50,0,0,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,
-16,10,49,0,57,48,0,0,0,0,1,90,95,0,0,14,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,116,0,
-1,0,0,0,14,0,109,0,0,1,0,0,0,14,0,110,0,0,0,1,8,58,109,97,116,51,0,0,18,109,0,16,8,48,0,57,18,110,
-0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,57,18,
-110,0,16,10,50,0,57,48,0,0,0,0,1,90,95,0,0,15,0,0,109,97,116,114,105,120,67,111,109,112,77,117,108,
-116,0,1,0,0,0,15,0,109,0,0,1,0,0,0,15,0,110,0,0,0,1,8,58,109,97,116,52,0,0,18,109,0,16,8,48,0,57,
-18,110,0,16,8,48,0,57,48,0,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,48,0,18,109,0,16,10,50,0,
-57,18,110,0,16,10,50,0,57,48,0,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,48,0,0,0,0,1,90,95,0,
-0,2,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,
-52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,
-95,0,0,3,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,
-101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,
-0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,
-0,1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,
-1,90,95,0,0,2,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,
-118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,
-0,0,0,1,90,95,0,0,3,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,7,0,117,0,0,1,1,0,0,7,0,118,0,0,0,
-1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,
-18,118,0,0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,84,104,97,110,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,
-118,0,0,0,1,4,118,101,99,52,95,115,108,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,
-0,0,0,0,1,90,95,0,0,2,0,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,0,10,0,117,0,0,1,
-1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120,
-121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,108,101,115,115,84,104,97,110,69,113,117,97,
-108,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,
-101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,
-84,104,97,110,69,113,117,97,108,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,
-115,108,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,108,
-101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118,
-101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,
-0,1,90,95,0,0,3,0,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0,
-7,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,
-0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,108,101,115,115,84,104,97,110,69,113,117,97,108,0,1,
-1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,108,101,0,18,95,95,114,101,116,86,
-97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,103,114,101,97,116,101,114,84,104,97,110,0,
-1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,
-116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,103,114,101,97,116,101,
-114,84,104,97,110,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,
-18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,
-103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,
-99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,
-0,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118,
-101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,59,120,121,0,0,
-18,118,0,59,120,121,0,0,0,0,1,90,95,0,0,3,0,0,103,114,101,97,116,101,114,84,104,97,110,0,1,1,0,0,7,
-0,117,0,0,1,1,0,0,7,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,108,
-0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,103,114,101,97,116,101,114,84,104,
-97,110,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,
-101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,103,114,101,97,116,101,114,84,
-104,97,110,69,113,117,97,108,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,
-115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,
-0,3,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,0,11,0,117,0,0,1,1,0,0,
-11,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,
-0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,
-117,97,108,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,
-95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,103,114,101,97,116,101,
-114,84,104,97,110,69,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118,101,99,52,
-95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,
-0,0,3,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0,
-7,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,
-0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,103,114,101,97,116,101,114,84,104,97,110,69,113,117,
-97,108,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,103,101,0,18,95,95,114,
-101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,101,113,117,97,108,0,1,1,0,0,10,
-0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,
-0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,101,113,117,97,108,0,1,1,0,0,11,0,117,
-0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,
-120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,101,113,117,97,108,0,1,1,0,0,12,0,117,
-0,0,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,
-18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,101,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,
-118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,
-117,0,0,18,118,0,0,0,0,1,90,95,0,0,3,0,0,101,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0,7,0,118,
-0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,
-117,0,0,18,118,0,0,0,0,1,90,95,0,0,4,0,0,101,113,117,97,108,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,
-0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,
-0,0,1,90,95,0,0,2,0,0,101,113,117,97,108,0,1,1,0,0,2,0,117,0,0,1,1,0,0,2,0,118,0,0,0,1,4,118,101,
-99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,
-90,95,0,0,3,0,0,101,113,117,97,108,0,1,1,0,0,3,0,117,0,0,1,1,0,0,3,0,118,0,0,0,1,4,118,101,99,52,
-95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,1,
-90,95,0,0,4,0,0,101,113,117,97,108,0,1,1,0,0,4,0,117,0,0,1,1,0,0,4,0,118,0,0,0,1,4,118,101,99,52,
-95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,0,2,0,0,
-110,111,116,69,113,117,97,108,0,1,1,0,0,10,0,117,0,0,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,
-115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,90,95,0,
-0,3,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,11,0,117,0,0,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,
-52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,0,0,0,
-1,90,95,0,0,4,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,12,0,117,0,0,1,1,0,0,12,0,118,0,0,0,1,4,
-118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,90,
-95,0,0,2,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,6,0,117,0,0,1,1,0,0,6,0,118,0,0,0,1,4,118,101,
-99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,0,1,
-90,95,0,0,3,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,7,0,117,0,0,1,1,0,0,7,0,118,0,0,0,1,4,118,
-101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,118,0,
-0,0,0,1,90,95,0,0,4,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,8,0,117,0,0,1,1,0,0,8,0,118,0,0,0,
-1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,0,0,1,
-90,95,0,0,2,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,2,0,117,0,0,1,1,0,0,2,0,118,0,0,0,1,4,118,
-101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,117,0,0,18,118,0,0,0,
-0,1,90,95,0,0,3,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,3,0,117,0,0,1,1,0,0,3,0,118,0,0,0,1,4,
-118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,117,0,0,18,
-118,0,0,0,0,1,90,95,0,0,4,0,0,110,111,116,69,113,117,97,108,0,1,1,0,0,4,0,117,0,0,1,1,0,0,4,0,118,
-0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,117,0,0,18,118,0,0,
-0,0,1,90,95,0,0,1,0,0,97,110,121,0,1,1,0,0,2,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,115,117,109,0,0,0,4,
-118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,
-0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,
-120,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,110,121,0,1,1,0,0,3,0,118,0,0,0,1,3,2,90,95,0,0,
-9,0,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,118,0,59,
-120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,
-117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,
-86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,110,
-121,0,1,1,0,0,4,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,115,117,109,0,0,0,4,118,101,99,52,95,97,100,100,
-0,18,115,117,109,0,59,120,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,97,100,
-100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,122,0,0,0,4,118,101,99,
-52,95,97,100,100,0,18,115,117,109,0,59,120,0,0,18,115,117,109,0,59,120,0,0,18,118,0,59,119,0,0,0,4,
-118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,115,117,109,0,59,120,
-0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,108,108,0,1,1,0,0,2,0,118,0,0,0,1,3,2,90,95,0,0,9,0,
-1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,
-0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,
-86,97,108,0,0,18,112,114,111,100,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,108,108,0,1,1,0,0,3,
-0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,112,114,111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,
-108,121,0,18,112,114,111,100,0,0,18,118,0,59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,
-117,108,116,105,112,108,121,0,18,112,114,111,100,0,0,18,112,114,111,100,0,0,18,118,0,59,122,0,0,0,
-4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,112,114,111,100,0,0,17,48,0,
-48,0,0,0,0,0,1,90,95,0,0,1,0,0,97,108,108,0,1,1,0,0,4,0,118,0,0,0,1,3,2,90,95,0,0,9,0,1,112,114,
-111,100,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,111,100,0,0,18,118,0,
-59,120,0,0,18,118,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,112,114,
-111,100,0,0,18,112,114,111,100,0,0,18,118,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,
-112,108,121,0,18,112,114,111,100,0,0,18,112,114,111,100,0,0,18,118,0,59,119,0,0,0,4,118,101,99,52,
-95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,112,114,111,100,0,0,17,48,0,48,0,0,0,0,0,1,
-90,95,0,0,2,0,0,110,111,116,0,1,1,0,0,2,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,
-114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,0,110,111,
-116,0,1,1,0,0,3,0,118,0,0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,
-120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,0,110,111,116,0,1,1,0,0,4,0,118,0,
-0,0,1,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,17,48,0,48,0,
-0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,0,1,1,0,0,16,0,115,97,109,112,108,101,
-114,0,0,1,1,0,0,9,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,49,100,0,18,95,95,
-114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,
-0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,0,16,0,115,97,109,112,108,101,
-114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,49,100,95,112,
-114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,
-114,100,0,59,120,121,121,121,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,
-111,106,0,1,1,0,0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,
-118,101,99,52,95,116,101,120,95,49,100,95,112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,
-115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,
-117,114,101,50,68,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,
-0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,
-112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,
-50,68,80,114,111,106,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,
-0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,112,114,111,106,0,18,95,95,114,101,116,86,97,
-108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,120,121,122,122,0,0,0,0,1,90,
-95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80,114,111,106,0,1,1,0,0,17,0,115,97,109,112,108,
-101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,
-112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,
-111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,0,1,1,0,0,18,0,115,97,109,
-112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,51,
-100,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,
-0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,80,114,111,106,0,1,1,0,0,18,0,115,97,
-109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,
-51,100,95,112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,
-18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,67,117,98,101,0,1,1,0,
-0,19,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,
-116,101,120,95,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,
-0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,0,1,1,0,0,20,0,115,
-97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,
-95,49,100,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,
-114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,80,114,111,
-106,0,1,1,0,0,20,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,
-101,99,52,95,116,101,120,95,49,100,95,112,114,111,106,95,115,104,97,100,111,119,0,18,95,95,114,101,
-116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,
-0,115,104,97,100,111,119,50,68,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,
-111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,115,104,97,100,111,119,0,18,95,95,
-114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,
-0,0,12,0,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,
-0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,50,100,95,112,114,111,
-106,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,
-0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,82,101,99,116,
-0,1,1,0,0,22,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,0,1,4,118,101,99,
-52,95,116,101,120,95,114,101,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,
-114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,82,101,
-99,116,80,114,111,106,0,1,1,0,0,22,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,
-100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,114,101,99,116,95,112,114,111,106,0,18,95,95,114,101,
-116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,59,120,121,122,122,0,0,
-0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,82,101,99,116,80,114,111,106,0,1,1,0,0,22,
-0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,
-101,120,95,114,101,99,116,95,112,114,111,106,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,
-112,108,101,114,0,0,18,99,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,50,
-68,82,101,99,116,0,1,1,0,0,23,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,
-0,1,4,118,101,99,52,95,116,101,120,95,114,101,99,116,95,115,104,97,100,111,119,0,18,95,95,114,101,
-116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,
-0,115,104,97,100,111,119,50,68,82,101,99,116,80,114,111,106,0,1,1,0,0,23,0,115,97,109,112,108,101,
-114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,0,1,4,118,101,99,52,95,116,101,120,95,114,101,99,116,
-95,112,114,111,106,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,
-112,108,101,114,0,0,18,99,111,111,114,100,0,0,0,0,1,90,95,0,0,9,0,0,110,111,105,115,101,49,0,1,1,0,
-0,9,0,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,49,0,18,95,95,114,101,116,86,97,108,
-0,0,18,120,0,0,0,0,1,90,95,0,0,9,0,0,110,111,105,115,101,49,0,1,1,0,0,10,0,120,0,0,0,1,4,102,108,
-111,97,116,95,110,111,105,115,101,50,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,
-0,9,0,0,110,111,105,115,101,49,0,1,1,0,0,11,0,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,
-101,51,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,9,0,0,110,111,105,115,101,
-49,0,1,1,0,0,12,0,120,0,0,0,1,4,102,108,111,97,116,95,110,111,105,115,101,52,0,18,95,95,114,101,
-116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,9,0,120,0,0,0,
-1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,
-95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,17,49,57,0,51,52,0,0,
-46,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,10,0,120,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,49,57,0,51,
-52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,
-11,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,
-0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,
-118,101,99,51,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,0,46,0,0,20,0,0,1,
-90,95,0,0,10,0,0,110,111,105,115,101,50,0,1,1,0,0,12,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
-59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,49,57,0,51,52,0,0,0,17,55,
-0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110,111,
-105,115,101,51,0,1,1,0,0,9,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,111,
-105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,105,
-115,101,49,0,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,
-0,58,110,111,105,115,101,49,0,0,18,120,0,17,53,0,52,55,0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110,
-111,105,115,101,51,0,1,1,0,0,10,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,
-111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,
-105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,
-0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,
-101,99,50,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110,
-111,105,115,101,51,0,1,1,0,0,11,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,110,
-111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,111,
-105,115,101,49,0,0,18,120,0,58,118,101,99,51,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,
-0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,
-0,0,18,120,0,58,118,101,99,51,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,
-0,0,46,0,0,20,0,0,1,90,95,0,0,11,0,0,110,111,105,115,101,51,0,1,1,0,0,12,0,120,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,49,57,
-0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,53,
-0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,20,0,0,
-1,90,95,0,0,12,0,0,110,111,105,115,101,52,0,1,1,0,0,9,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
-59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,17,49,57,0,51,52,0,0,46,0,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,17,53,0,52,55,0,0,46,0,0,20,0,
-9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,0,17,50,51,0,53,
-52,0,0,46,0,0,20,0,0,1,90,95,0,0,12,0,0,110,111,105,115,101,52,0,1,1,0,0,10,0,120,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,49,57,
-0,51,52,0,0,0,17,55,0,54,54,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,
-111,105,115,101,49,0,0,18,120,0,58,118,101,99,50,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,0,
-46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,0,58,
-118,101,99,50,0,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,0,46,0,0,20,0,0,1,90,95,0,0,12,0,0,
-110,111,105,115,101,52,0,1,1,0,0,11,0,120,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,
-110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,110,
-111,105,115,101,49,0,0,18,120,0,58,118,101,99,51,0,0,17,49,57,0,51,52,0,0,0,17,55,0,54,54,0,0,0,17,
-51,0,50,51,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,110,111,105,115,101,
-49,0,0,18,120,0,58,118,101,99,51,0,0,17,53,0,52,55,0,0,0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,
-0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,
-0,58,118,101,99,51,0,0,17,50,51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,0,46,0,
-0,20,0,0,1,90,95,0,0,12,0,0,110,111,105,115,101,52,0,1,1,0,0,12,0,120,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,59,120,0,58,110,111,105,115,101,49,0,0,18,120,0,0,0,20,0,9,18,95,95,114,101,116,86,
-97,108,0,59,121,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,49,57,0,51,52,0,0,
-0,17,55,0,54,54,0,0,0,17,51,0,50,51,0,0,0,17,50,0,55,55,0,0,0,0,46,0,0,20,0,9,18,95,95,114,101,116,
-86,97,108,0,59,122,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,53,0,52,55,0,0,
-0,17,49,55,0,56,53,0,0,0,17,49,49,0,48,52,0,0,0,17,49,51,0,49,57,0,0,0,0,46,0,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,59,119,0,58,110,111,105,115,101,49,0,0,18,120,0,58,118,101,99,52,0,0,17,50,
-51,0,53,52,0,0,0,17,50,57,0,49,49,0,0,0,17,51,49,0,57,49,0,0,0,17,51,55,0,52,56,0,0,0,0,46,0,0,20,
-0,0,0
diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h
deleted file mode 100644
index b3d3e87cf42..00000000000
--- a/src/mesa/shader/slang/library/slang_core_gc.h
+++ /dev/null
@@ -1,869 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_core.gc */
-
-5,1,90,95,0,0,5,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,
-95,95,114,101,116,86,97,108,0,0,18,102,0,0,0,0,1,90,95,0,0,5,0,1,1,1,0,0,1,0,98,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,18,98,0,20,0,0,1,90,95,0,0,5,0,1,1,1,0,0,5,0,105,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,18,105,0,20,0,0,1,90,95,0,0,1,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,
-115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,1,
-1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,0,18,102,
-0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,1,0,1,1,1,0,0,1,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,
-0,18,98,0,20,0,0,1,90,95,0,0,9,0,1,1,1,0,0,5,0,105,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,
-101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,0,1,90,95,0,0,9,0,1,1,1,0,0,1,0,98,0,0,
-0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,98,0,0,
-0,0,1,90,95,0,0,9,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,102,0,20,0,0,1,
-90,95,0,0,10,0,1,1,1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,
-120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,0,1,90,95,0,0,10,0,1,
-1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,
-120,121,0,0,18,102,0,0,0,0,1,90,95,0,0,10,0,1,1,1,0,0,5,0,105,0,0,0,1,4,105,118,101,99,52,95,116,
-111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,0,0,0,1,90,95,0,0,
-10,0,1,1,1,0,0,1,0,98,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,
-116,86,97,108,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,1,1,1,0,0,2,0,98,0,0,0,1,4,105,118,
-101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,0,
-0,0,1,90,95,0,0,10,0,1,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,
-101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,1,1,1,0,0,12,0,118,
-0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,
-118,0,59,120,121,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,1,1,0,0,9,0,
-122,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,0,1,90,95,0,
-0,11,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,
-108,0,59,120,121,122,0,0,18,102,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,5,0,105,0,0,0,1,4,105,118,101,
-99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,0,
-0,0,1,90,95,0,0,11,0,1,1,1,0,0,1,0,98,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,
-95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,3,0,98,0,
-0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,
-121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,1,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,109,111,
-118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,0,0,1,90,95,0,0,12,0,1,1,
-1,0,0,9,0,120,0,0,1,1,0,0,9,0,121,0,0,1,1,0,0,9,0,122,0,0,1,1,0,0,9,0,119,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,
-0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,
-119,0,18,119,0,20,0,0,1,90,95,0,0,12,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,109,111,118,
-101,0,18,95,95,114,101,116,86,97,108,0,0,18,102,0,0,0,0,1,90,95,0,0,12,0,1,1,1,0,0,5,0,105,0,0,0,1,
-4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,
-0,1,90,95,0,0,12,0,1,1,1,0,0,1,0,98,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,
-95,95,114,101,116,86,97,108,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,1,1,1,0,0,4,0,98,0,0,0,1,4,105,118,
-101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,98,0,0,0,0,1,90,95,0,
-0,12,0,1,1,1,0,0,8,0,105,0,0,0,1,4,105,118,101,99,52,95,116,111,95,118,101,99,52,0,18,95,95,114,
-101,116,86,97,108,0,0,18,105,0,0,0,0,1,90,95,0,0,12,0,1,1,1,0,0,11,0,118,51,0,0,1,1,0,0,9,0,102,0,
-0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114,101,116,
-86,97,108,0,59,119,0,18,102,0,20,0,0,1,90,95,0,0,12,0,1,1,1,0,0,10,0,118,50,0,0,1,1,0,0,9,0,102,49,
-0,0,1,1,0,0,9,0,102,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,118,50,0,20,0,9,
-18,95,95,114,101,116,86,97,108,0,59,122,0,18,102,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,
-119,0,18,102,50,0,20,0,0,1,90,95,0,0,6,0,1,1,1,0,0,5,0,105,0,0,1,1,0,0,5,0,106,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,59,120,0,18,105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,
-0,20,0,0,1,90,95,0,0,6,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,109,111,118,101,0,18,95,95,
-114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,0,0,0,1,90,95,0,0,6,0,1,1,1,0,0,9,0,102,0,0,0,1,4,
-118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,
-102,0,0,0,0,1,90,95,0,0,6,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,
-52,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,7,0,1,1,1,0,0,5,0,
-105,0,0,1,1,0,0,5,0,106,0,0,1,1,0,0,5,0,107,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,
-105,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,59,122,0,18,107,0,20,0,0,1,90,95,0,0,7,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,109,
-111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,0,0,0,1,90,95,0,0,7,0,1,
-1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,95,95,114,101,116,86,
-97,108,0,59,120,121,122,0,0,18,102,0,0,0,0,1,90,95,0,0,7,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,
-52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,
-0,0,8,0,1,1,1,0,0,5,0,120,0,0,1,1,0,0,5,0,121,0,0,1,1,0,0,5,0,122,0,0,1,1,0,0,5,0,119,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,
-18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,
-97,108,0,59,119,0,18,119,0,20,0,0,1,90,95,0,0,8,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,109,
-111,118,101,0,18,95,95,114,101,116,86,97,108,0,0,18,105,0,0,0,0,1,90,95,0,0,8,0,1,1,1,0,0,9,0,102,
-0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,
-102,0,0,0,0,1,90,95,0,0,8,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,116,111,95,105,118,101,99,
-52,0,18,95,95,114,101,116,86,97,108,0,0,18,98,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,1,0,98,49,0,0,1,1,
-0,0,1,0,98,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,59,121,0,18,98,50,0,20,0,0,1,90,95,0,0,2,0,1,1,1,0,0,5,0,105,49,0,0,1,1,0,0,5,
-0,105,50,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,
-105,49,0,0,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,
-121,0,0,18,105,50,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,
-52,95,109,111,118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,
-2,0,1,1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,
-120,121,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,
-52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,0,17,48,0,48,0,0,0,0,
-0,1,90,95,0,0,2,0,1,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,
-86,97,108,0,59,120,121,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,2,0,1,1,1,0,0,6,0,118,0,0,0,
-1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,17,
-48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,1,0,98,49,0,0,1,1,0,0,1,0,98,50,0,0,1,1,0,0,1,0,98,51,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,59,121,0,18,98,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,98,51,0,20,0,0,1,90,
-95,0,0,3,0,1,1,1,0,0,9,0,102,49,0,0,1,1,0,0,9,0,102,50,0,0,1,1,0,0,9,0,102,51,0,0,0,1,4,118,101,99,
-52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,102,49,0,0,17,48,0,48,0,0,0,0,4,
-118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,102,50,0,0,17,48,0,
-48,0,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,102,51,
-0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,109,111,118,
-101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,
-9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,
-0,18,102,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,101,99,52,95,115,
-110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,0,17,48,0,48,0,0,0,0,0,1,90,
-95,0,0,3,0,1,1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,
-108,0,59,120,121,122,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,3,0,1,1,1,0,0,7,0,118,0,0,0,1,
-4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,17,
-48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,1,0,98,49,0,0,1,1,0,0,1,0,98,50,0,0,1,1,0,0,1,0,98,51,
-0,0,1,1,0,0,1,0,98,52,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,
-95,114,101,116,86,97,108,0,59,121,0,18,98,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,
-98,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,98,52,0,20,0,0,1,90,95,0,0,4,0,1,1,1,0,
-0,9,0,102,49,0,0,1,1,0,0,9,0,102,50,0,0,1,1,0,0,9,0,102,51,0,0,1,1,0,0,9,0,102,52,0,0,0,1,3,2,90,
-95,1,0,9,0,1,122,101,114,111,0,2,17,48,0,48,0,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,
-101,116,86,97,108,0,59,120,0,0,18,102,49,0,0,18,122,101,114,111,0,0,0,4,118,101,99,52,95,115,110,
-101,0,18,95,95,114,101,116,86,97,108,0,59,121,0,0,18,102,50,0,0,18,122,101,114,111,0,0,0,4,118,101,
-99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,122,0,0,18,102,51,0,0,18,122,101,114,
-111,0,0,0,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,119,0,0,18,102,52,0,
-0,18,122,101,114,111,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,1,0,98,0,0,0,1,4,118,101,99,52,95,109,111,
-118,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,98,0,0,0,0,1,90,95,0,0,4,0,1,
-1,1,0,0,9,0,102,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,
-121,122,119,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,5,0,105,0,0,0,1,4,118,
-101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,105,0,0,17,
-48,0,48,0,0,0,0,0,1,90,95,0,0,4,0,1,1,1,0,0,12,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,
-95,95,114,101,116,86,97,108,0,59,120,121,122,119,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,4,
-0,1,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,115,110,101,0,18,95,95,114,101,116,86,97,108,0,59,
-120,121,122,119,0,0,18,118,0,0,17,48,0,48,0,0,0,0,0,1,90,95,0,0,13,0,1,1,1,0,0,9,0,109,48,48,0,0,1,
-1,0,0,9,0,109,49,48,0,0,1,1,0,0,9,0,109,48,49,0,0,1,1,0,0,9,0,109,49,49,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,
-48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,
-109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,0,1,
-90,95,0,0,13,0,1,1,1,0,0,9,0,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,
-18,102,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,17,48,0,48,0,0,20,0,9,18,95,
-95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,17,48,0,48,0,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,49,0,57,59,121,0,18,102,0,20,0,0,1,90,95,0,0,13,0,1,1,1,0,0,5,0,105,0,0,0,1,8,58,109,
-97,116,50,0,0,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,0,0,1,90,95,0,0,13,0,1,1,1,0,0,1,0,98,0,0,
-0,1,8,58,109,97,116,50,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,0,0,1,90,95,0,0,13,0,1,1,1,0,
-0,10,0,99,48,0,0,1,1,0,0,10,0,99,49,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,99,
-48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,0,1,90,95,0,0,14,0,1,1,
-1,0,0,9,0,109,48,48,0,0,1,1,0,0,9,0,109,49,48,0,0,1,1,0,0,9,0,109,50,48,0,0,1,1,0,0,9,0,109,48,49,
-0,0,1,1,0,0,9,0,109,49,49,0,0,1,1,0,0,9,0,109,50,49,0,0,1,1,0,0,9,0,109,48,50,0,0,1,1,0,0,9,0,109,
-49,50,0,0,1,1,0,0,9,0,109,50,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,
-18,109,48,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,
-18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,
-86,97,108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,
-0,57,59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,122,0,18,109,
-50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48,50,0,20,0,9,18,95,
-95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,9,0,102,0,0,0,1,3,2,
-90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,0,9,18,95,95,114,101,
-116,86,97,108,0,16,8,48,0,57,18,118,0,59,120,121,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,
-10,49,0,57,18,118,0,59,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,118,
-0,59,121,121,120,0,20,0,0,1,90,95,0,0,14,0,1,1,1,0,0,5,0,105,0,0,0,1,8,58,109,97,116,51,0,0,58,102,
-108,111,97,116,0,0,18,105,0,0,0,0,0,0,0,1,90,95,0,0,14,0,1,1,1,0,0,1,0,98,0,0,0,1,8,58,109,97,116,
-51,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,0,0,1,90,95,0,0,14,0,1,1,1,0,0,11,0,99,48,0,0,1,1,
-0,0,11,0,99,49,0,0,1,1,0,0,11,0,99,50,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,99,49,0,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,9,0,109,48,48,0,0,1,1,0,
-0,9,0,109,49,48,0,0,1,1,0,0,9,0,109,50,48,0,0,1,1,0,0,9,0,109,51,48,0,0,1,1,0,0,9,0,109,48,49,0,0,
-1,1,0,0,9,0,109,49,49,0,0,1,1,0,0,9,0,109,50,49,0,0,1,1,0,0,9,0,109,51,49,0,0,1,1,0,0,9,0,109,48,
-50,0,0,1,1,0,0,9,0,109,49,50,0,0,1,1,0,0,9,0,109,50,50,0,0,1,1,0,0,9,0,109,51,50,0,0,1,1,0,0,9,0,
-109,48,51,0,0,1,1,0,0,9,0,109,49,51,0,0,1,1,0,0,9,0,109,50,51,0,0,1,1,0,0,9,0,109,51,51,0,0,0,1,9,
-18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,120,0,18,109,48,48,0,20,0,9,18,95,95,114,101,116,
-86,97,108,0,16,8,48,0,57,59,121,0,18,109,49,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,
-57,59,122,0,18,109,50,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,59,119,0,18,109,51,
-48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,59,120,0,18,109,48,49,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,49,0,57,59,121,0,18,109,49,49,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,49,0,57,59,122,0,18,109,50,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,
-59,119,0,18,109,51,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,120,0,18,109,48,
-50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,59,121,0,18,109,49,50,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,50,0,57,59,122,0,18,109,50,50,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,50,0,57,59,119,0,18,109,51,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,
-59,120,0,18,109,48,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,121,0,18,109,49,
-51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,59,122,0,18,109,50,51,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,51,0,57,59,119,0,18,109,51,51,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,9,
-0,102,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,102,0,0,17,48,0,48,0,0,0,0,0,0,
-9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,118,0,59,120,121,121,121,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,16,10,49,0,57,18,118,0,59,121,120,121,121,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,50,0,57,18,118,0,59,121,121,120,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,
-0,57,18,118,0,59,121,121,121,120,0,20,0,0,1,90,95,0,0,15,0,1,1,1,0,0,5,0,105,0,0,0,1,8,58,109,97,
-116,52,0,0,58,102,108,111,97,116,0,0,18,105,0,0,0,0,0,0,0,1,90,95,0,0,15,0,1,1,1,0,0,1,0,98,0,0,0,
-1,8,58,109,97,116,52,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,0,0,0,0,1,90,95,0,0,15,0,1,1,1,0,0,
-12,0,99,48,0,0,1,1,0,0,12,0,99,49,0,0,1,1,0,0,12,0,99,50,0,0,1,1,0,0,12,0,99,51,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,16,8,48,0,57,18,99,48,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,
-57,18,99,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,99,50,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,16,10,51,0,57,18,99,51,0,20,0,0,1,90,95,0,0,5,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0,
-0,5,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,
-98,0,0,0,0,1,90,95,0,0,5,0,2,27,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,4,118,101,99,52,95,115,
-117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,
-5,0,2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,
-121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,5,0,2,22,1,1,0,0,5,0,
-97,0,0,1,1,0,0,5,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,97,
-116,95,114,99,112,0,18,98,73,110,118,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,
-108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,105,118,101,99,
-52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,6,0,2,26,1,1,0,0,6,0,97,0,0,1,1,
-0,0,6,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,
-98,0,0,0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,6,0,97,0,0,1,1,0,0,6,0,98,0,0,0,1,4,118,101,99,52,95,115,
-117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,
-6,0,2,21,1,1,0,0,6,0,97,0,0,1,1,0,0,6,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,
-121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,6,0,2,22,1,1,0,0,6,0,
-97,0,0,1,1,0,0,6,0,98,0,0,0,1,3,2,90,95,0,0,10,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4,102,108,111,
-97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,111,97,116,95,
-114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,
-105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,105,
-118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,7,0,2,26,1,1,0,0,7,0,
-97,0,0,1,1,0,0,7,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,
-18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,7,0,2,27,1,1,0,0,7,0,97,0,0,1,1,0,0,7,0,98,0,0,0,1,4,118,101,
-99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,
-1,90,95,0,0,7,0,2,21,1,1,0,0,7,0,97,0,0,1,1,0,0,7,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,
-105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,7,0,2,22,
-1,1,0,0,7,0,97,0,0,1,1,0,0,7,0,98,0,0,0,1,3,2,90,95,0,0,11,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4,
-102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,
-111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,
-95,114,99,112,0,18,98,73,110,118,0,59,122,0,0,18,98,0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,
-116,105,112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,
-105,118,101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,8,0,2,26,1,1,0,0,
-8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,
-0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,8,0,2,27,1,1,0,0,8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,4,118,101,
-99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,
-1,90,95,0,0,8,0,2,21,1,1,0,0,8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,
-105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,8,0,2,22,
-1,1,0,0,8,0,97,0,0,1,1,0,0,8,0,98,0,0,0,1,3,2,90,95,0,0,12,0,1,98,73,110,118,0,0,1,1,120,0,0,0,4,
-102,108,111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,59,120,0,0,0,4,102,108,
-111,97,116,95,114,99,112,0,18,98,73,110,118,0,59,121,0,0,18,98,0,59,121,0,0,0,4,102,108,111,97,116,
-95,114,99,112,0,18,98,73,110,118,0,59,122,0,0,18,98,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,
-112,0,18,98,73,110,118,0,59,119,0,0,18,98,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,
-112,108,121,0,18,120,0,0,18,97,0,0,18,98,73,110,118,0,0,0,4,118,101,99,52,95,116,111,95,105,118,
-101,99,52,0,18,95,95,114,101,116,86,97,108,0,0,18,120,0,0,0,0,1,90,95,0,0,9,0,2,26,1,1,0,0,9,0,97,
-0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,
-97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,
-52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,
-90,95,0,0,9,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,
-105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,9,0,2,22,
-1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,98,73,110,118,0,0,0,4,102,108,111,97,
-116,95,114,99,112,0,18,98,73,110,118,0,59,120,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,
-105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,73,110,118,0,0,0,0,1,90,95,0,
-0,10,0,2,26,1,1,0,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,
-114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,10,
-0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,
-101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,10,0,2,21,1,1,0,0,10,0,
-118,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,
-101,116,86,97,108,0,59,120,121,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,10,0,2,22,1,1,0,0,10,0,
-118,0,0,1,1,0,0,10,0,117,0,0,0,1,3,2,90,95,0,0,10,0,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,
-0,18,119,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,
-0,18,117,0,59,121,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,
-86,97,108,0,59,120,121,0,0,18,118,0,0,18,119,0,0,0,0,1,90,95,0,0,11,0,2,26,1,1,0,0,11,0,118,0,0,1,
-1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,59,120,121,
-122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,11,0,2,27,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,
-0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,
-122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,
-0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,
-121,122,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,11,0,2,22,1,1,0,0,11,0,118,0,0,1,1,0,0,11,0,117,
-0,0,0,1,3,2,90,95,0,0,11,0,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,0,0,18,
-117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,0,0,0,
-4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,118,101,99,52,95,
-109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,0,
-18,119,0,0,0,0,1,90,95,0,0,12,0,2,26,1,1,0,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,
-95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,27,
-1,1,0,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,
-95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,12,0,118,0,
-0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,
-116,86,97,108,0,0,18,118,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,22,1,1,0,0,12,0,118,0,0,1,1,0,0,12,
-0,117,0,0,0,1,3,2,90,95,0,0,12,0,1,119,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,120,
-0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,121,0,0,18,117,0,59,121,
-0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,119,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,
-97,116,95,114,99,112,0,18,119,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,
-116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,119,0,0,0,0,1,90,95,0,0,10,
-0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,
-101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,18,117,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,26,1,1,
-0,0,10,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,
-108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,9,0,97,0,
-0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,
-86,97,108,0,59,120,121,0,0,18,97,0,0,18,117,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,10,
-0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,
-101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,0,10,0,2,21,1,1,
-0,0,9,0,97,0,0,1,1,0,0,10,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,
-95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,18,117,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,
-21,1,1,0,0,10,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,108,121,
-0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,98,0,0,0,0,1,90,95,0,
-0,10,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,10,0,117,0,0,0,1,3,2,90,95,0,0,10,0,1,105,110,118,85,0,0,0,
-4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,
-108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,118,101,99,
-52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,97,0,0,
-18,105,110,118,85,0,59,120,121,0,0,0,0,1,90,95,0,0,10,0,2,22,1,1,0,0,10,0,118,0,0,1,1,0,0,9,0,98,0,
-0,0,1,3,2,90,95,0,0,9,0,1,105,110,118,66,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,
-66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,
-108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,18,105,110,118,66,0,0,0,0,1,90,95,0,0,11,0,2,26,1,1,0,
-0,9,0,97,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,
-108,0,59,120,121,122,0,0,18,97,0,0,18,117,0,59,120,121,122,0,0,0,0,1,90,95,0,0,11,0,2,26,1,1,0,0,
-11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,
-0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,2,27,1,1,0,0,9,0,
-97,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,
-116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,18,117,0,59,120,121,122,0,0,0,0,1,90,95,0,0,11,0,2,27,
-1,1,0,0,11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,
-95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,98,0,0,0,0,1,90,95,
-0,0,11,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,11,0,117,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,
-112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,97,0,0,18,117,0,59,120,121,
-122,0,0,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,
-109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,
-120,121,122,0,0,18,98,0,0,0,0,1,90,95,0,0,11,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,11,0,117,0,0,0,1,3,
-2,90,95,0,0,11,0,1,105,110,118,85,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,
-59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,121,0,
-0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,105,110,118,85,0,59,122,0,0,18,117,
-0,59,122,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,
-0,59,120,121,122,0,0,18,97,0,0,18,105,110,118,85,0,59,120,121,122,0,0,0,0,1,90,95,0,0,11,0,2,22,1,
-1,0,0,11,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,105,110,118,66,0,0,0,4,102,108,111,
-97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,
-112,108,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,18,
-105,110,118,66,0,0,0,0,1,90,95,0,0,12,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,
-99,52,95,97,100,100,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,
-2,26,1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,97,100,100,0,18,95,95,114,101,
-116,86,97,108,0,0,18,118,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,12,0,
-117,0,0,0,1,4,118,101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,
-18,97,0,0,18,117,0,0,0,0,1,90,95,0,0,12,0,2,27,1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,
-101,99,52,95,115,117,98,116,114,97,99,116,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,
-0,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,12,0,117,0,0,0,1,4,118,101,99,52,95,109,117,
-108,116,105,112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,117,0,0,0,0,1,90,95,0,0,
-12,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,109,117,108,116,105,112,
-108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,98,0,0,0,0,1,90,95,0,0,12,0,2,22,1,1,0,
-0,9,0,97,0,0,1,1,0,0,12,0,117,0,0,0,1,3,2,90,95,0,0,12,0,1,105,110,118,85,0,0,0,4,102,108,111,97,
-116,95,114,99,112,0,18,105,110,118,85,0,59,120,0,0,18,117,0,59,120,0,0,0,4,102,108,111,97,116,95,
-114,99,112,0,18,105,110,118,85,0,59,121,0,0,18,117,0,59,121,0,0,0,4,102,108,111,97,116,95,114,99,
-112,0,18,105,110,118,85,0,59,122,0,0,18,117,0,59,122,0,0,0,4,102,108,111,97,116,95,114,99,112,0,18,
-105,110,118,85,0,59,119,0,0,18,117,0,59,119,0,0,0,4,118,101,99,52,95,109,117,108,116,105,112,108,
-121,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,105,110,118,85,0,0,0,0,1,90,95,0,0,12,0,2,22,
-1,1,0,0,12,0,118,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,9,0,1,105,110,118,66,0,0,0,4,102,108,111,
-97,116,95,114,99,112,0,18,105,110,118,66,0,0,18,98,0,0,0,4,118,101,99,52,95,109,117,108,116,105,
-112,108,121,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,18,105,110,118,66,0,0,0,0,1,90,95,0,0,
-6,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,
-101,99,50,0,0,18,97,0,0,0,18,117,0,46,20,0,0,1,90,95,0,0,6,0,2,26,1,1,0,0,6,0,118,0,0,1,1,0,0,5,0,
-98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,0,18,98,0,0,0,46,20,
-0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,58,105,118,101,99,50,0,0,18,97,0,0,0,18,117,0,47,20,0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,6,0,118,
-0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,50,0,0,18,
-98,0,0,0,47,20,0,0,1,90,95,0,0,6,0,2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,58,105,118,101,99,50,0,0,18,97,0,0,0,18,117,0,48,20,0,0,1,90,95,0,0,6,0,2,21,1,
-1,0,0,6,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,
-101,99,50,0,0,18,98,0,0,0,48,20,0,0,1,90,95,0,0,6,0,2,22,1,1,0,0,5,0,97,0,0,1,1,0,0,6,0,117,0,0,0,
-1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,50,0,0,18,97,0,0,0,18,117,0,49,20,0,0,1,90,
-95,0,0,6,0,2,22,1,1,0,0,6,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,
-118,0,58,105,118,101,99,50,0,0,18,98,0,0,0,49,20,0,0,1,90,95,0,0,7,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0,
-0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,0,18,97,0,0,0,18,117,0,
-46,20,0,0,1,90,95,0,0,7,0,2,26,1,1,0,0,7,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,
-86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,0,0,46,20,0,0,1,90,95,0,0,7,0,2,27,1,1,0,0,5,
-0,97,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,51,0,0,18,97,
-0,0,0,18,117,0,47,20,0,0,1,90,95,0,0,7,0,2,27,1,1,0,0,7,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,0,0,47,20,0,0,1,90,95,0,0,7,0,
-2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,
-99,51,0,0,18,97,0,0,0,18,117,0,48,20,0,0,1,90,95,0,0,7,0,2,21,1,1,0,0,7,0,118,0,0,1,1,0,0,5,0,98,0,
-0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,0,0,48,20,0,0,1,
-90,95,0,0,7,0,2,22,1,1,0,0,5,0,97,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-58,105,118,101,99,51,0,0,18,97,0,0,0,18,117,0,49,20,0,0,1,90,95,0,0,7,0,2,22,1,1,0,0,7,0,118,0,0,1,
-1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,51,0,0,18,98,0,
-0,0,49,20,0,0,1,90,95,0,0,8,0,2,26,1,1,0,0,5,0,97,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,0,18,117,0,46,20,0,0,1,90,95,0,0,8,0,2,26,1,1,0,
-0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,
-52,0,0,18,98,0,0,0,46,20,0,0,1,90,95,0,0,8,0,2,27,1,1,0,0,5,0,97,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,0,18,117,0,47,20,0,0,1,90,95,0,0,
-8,0,2,27,1,1,0,0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,58,
-105,118,101,99,52,0,0,18,98,0,0,0,47,20,0,0,1,90,95,0,0,8,0,2,21,1,1,0,0,5,0,97,0,0,1,1,0,0,8,0,
-117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,0,18,117,0,48,20,
-0,0,1,90,95,0,0,8,0,2,21,1,1,0,0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,18,118,0,58,105,118,101,99,52,0,0,18,98,0,0,0,48,20,0,0,1,90,95,0,0,8,0,2,22,1,1,0,0,5,0,97,
-0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,58,105,118,101,99,52,0,0,18,97,0,0,
-0,18,117,0,49,20,0,0,1,90,95,0,0,8,0,2,22,1,1,0,0,8,0,118,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,18,118,0,58,105,118,101,99,52,0,0,18,98,0,0,0,49,20,0,0,1,90,95,0,0,5,0,2,
-27,1,1,0,0,5,0,97,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,
-108,0,59,120,0,0,18,97,0,0,0,0,1,90,95,0,0,6,0,2,27,1,1,0,0,6,0,118,0,0,0,1,4,118,101,99,52,95,110,
-101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,90,95,0,0,7,0,2,27,1,1,0,
-0,7,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,
-18,118,0,0,0,0,1,90,95,0,0,8,0,2,27,1,1,0,0,8,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,
-101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,0,1,90,95,0,0,9,0,2,27,1,1,0,0,9,0,97,0,0,0,
-1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,59,120,0,0,18,97,0,
-0,0,0,1,90,95,0,0,10,0,2,27,1,1,0,0,10,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,
-18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,118,0,59,120,121,0,0,0,0,1,90,95,0,0,11,0,2,27,
-1,1,0,0,11,0,118,0,0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,
-108,0,59,120,121,122,0,0,18,118,0,59,120,121,122,0,0,0,0,1,90,95,0,0,12,0,2,27,1,1,0,0,12,0,118,0,
-0,0,1,4,118,101,99,52,95,110,101,103,97,116,101,0,18,95,95,114,101,116,86,97,108,0,0,18,118,0,0,0,
-0,1,90,95,0,0,13,0,2,27,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,
-18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,
-57,54,20,0,0,1,90,95,0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,
-8,48,0,57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,
-16,10,49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,
-20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,
-57,18,109,0,16,8,48,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,
-49,0,57,54,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,54,20,0,9,
-18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,54,20,0,0,1,90,95,0,0,9,0,0,
-100,111,116,0,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,
-18,98,0,48,20,0,0,1,90,95,0,0,9,0,0,100,111,116,0,1,1,0,0,10,0,97,0,0,1,1,0,0,10,0,98,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,18,97,0,59,120,0,18,98,0,59,120,0,48,18,97,0,59,121,0,18,98,0,59,121,
-0,48,46,20,0,0,1,90,95,0,0,9,0,0,100,111,116,0,1,1,0,0,11,0,97,0,0,1,1,0,0,11,0,98,0,0,0,1,4,118,
-101,99,51,95,100,111,116,0,18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,
-9,0,0,100,111,116,0,1,1,0,0,12,0,97,0,0,1,1,0,0,12,0,98,0,0,0,1,4,118,101,99,52,95,100,111,116,0,
-18,95,95,114,101,116,86,97,108,0,0,18,97,0,0,18,98,0,0,0,0,1,90,95,0,0,5,0,2,1,1,0,2,0,5,0,97,0,0,
-1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,46,20,0,8,18,97,0,0,0,1,90,95,0,0,5,0,2,2,1,0,2,0,
-5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,5,0,
-2,3,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90,
-95,0,0,5,0,2,4,1,0,2,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97,
-0,0,0,1,90,95,0,0,6,0,2,1,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,
-46,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,2,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,0,0,1,9,18,118,0,
-18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,6,0,117,0,
-0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,4,1,0,2,0,6,0,118,0,0,
-1,1,0,0,6,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,1,1,
-0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,
-95,0,0,7,0,2,2,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,
-18,118,0,0,0,1,90,95,0,0,7,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,18,118,0,18,118,0,
-18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0,0,7,0,117,0,0,0,1,9,
-18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0,
-8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,2,1,0,2,0,8,
-0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,
-8,0,2,3,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18,118,
-0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,8,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,
-49,20,0,8,18,118,0,0,0,1,90,95,0,0,9,0,2,1,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18,
-97,0,18,98,0,46,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,2,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,9,
-18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,3,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,
-98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,4,1,0,2,0,9,0,97,0,0,
-1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97,0,0,0,1,90,95,0,0,10,0,2,1,1,0,2,
-0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,
-95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,
-8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,
-118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,
-0,0,1,9,18,118,0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,1,1,0,2,0,11,0,118,0,
-0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,
-2,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0,
-0,1,90,95,0,0,11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,
-48,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,11,0,117,0,0,0,1,9,18,118,
-0,18,118,0,18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,
-117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,2,1,0,2,0,12,0,
-118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,
-12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,48,20,0,8,18,
-118,0,0,0,1,90,95,0,0,12,0,2,4,1,0,2,0,12,0,118,0,0,1,1,0,0,12,0,117,0,0,0,1,9,18,118,0,18,118,0,
-18,117,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,1,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,
-18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,2,
-1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,
-0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,3,1,0,2,0,6,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,
-18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,6,0,2,4,1,0,2,0,6,
-0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,18,97,0,0,0,49,20,0,
-8,18,118,0,0,0,1,90,95,0,0,7,0,2,1,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,
-58,105,118,101,99,51,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,7,0,2,2,1,0,2,0,7,0,118,0,
-0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,18,97,0,0,0,47,20,0,8,18,118,
-0,0,0,1,90,95,0,0,7,0,2,3,1,0,2,0,7,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,
-118,101,99,51,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,7,0,118,0,0,1,1,0,
-0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1,
-90,95,0,0,8,0,2,1,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,
-52,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,2,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,
-0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,
-8,0,2,3,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,18,
-97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,8,0,2,4,1,0,2,0,8,0,118,0,0,1,1,0,0,5,0,97,0,0,0,1,9,
-18,118,0,18,118,0,58,105,118,101,99,52,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,1,
-1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,18,97,0,0,0,
-46,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,
-18,118,0,58,118,101,99,50,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0,
-118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,18,97,0,0,0,48,20,0,8,18,
-118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,
-118,101,99,50,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,1,1,0,2,0,11,0,118,0,0,1,1,
-0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,
-90,95,0,0,11,0,2,2,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,
-51,0,0,18,97,0,0,0,47,20,0,8,18,118,0,0,0,1,90,95,0,0,11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,
-0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,11,
-0,2,4,1,0,2,0,11,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,18,97,0,
-0,0,49,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,1,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,
-118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,46,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,2,1,0,2,
-0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,47,20,0,
-8,18,118,0,0,0,1,90,95,0,0,12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,
-0,58,118,101,99,52,0,0,18,97,0,0,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,12,0,2,4,1,0,2,0,12,0,118,0,
-0,1,1,0,0,9,0,97,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,18,97,0,0,0,49,20,0,8,18,118,0,0,
-0,1,90,95,0,0,13,0,2,26,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,
-97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,0,1,90,95,0,0,13,0,2,
-27,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,
-18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,
-57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109,
-0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,
-18,110,0,16,8,48,0,57,59,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,0,48,
-46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,
-57,59,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,59,121,121,0,48,46,20,0,0,1,90,95,
-0,0,13,0,2,22,1,1,0,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,
-8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,0,1,90,95,0,0,14,0,2,26,1,1,0,
-0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,
-16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,
-0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,
-109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,0,1,90,95,0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,1,
-1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,
-110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,
-18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,
-0,57,18,110,0,16,10,50,0,57,47,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,
-57,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,121,121,0,48,46,18,109,
-0,16,10,50,0,57,18,110,0,16,8,48,0,57,59,122,122,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,
-0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,0,48,18,109,0,16,10,49,
-0,57,18,110,0,16,10,49,0,57,59,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,49,0,57,
-59,122,122,122,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57,
-18,110,0,16,10,50,0,57,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121,
-121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,0,48,46,20,0,0,1,90,
-95,0,0,14,0,2,22,1,1,0,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,
-0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,0,1,90,95,0,0,15,0,2,26,
-1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,
-18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,
-0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,
-10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,46,20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,
-15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,
-8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,
-16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,
-109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,
-57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,47,20,0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,15,0,109,
-0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,
-18,110,0,16,8,48,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,8,48,0,57,59,121,
-121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,8,48,0,57,59,122,122,122,122,0,48,46,18,109,
-0,16,10,51,0,57,18,110,0,16,8,48,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,49,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,49,0,57,59,120,120,120,120,0,48,18,109,0,
-16,10,49,0,57,18,110,0,16,10,49,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,
-10,49,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,49,0,57,59,119,119,119,
-119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,8,48,0,57,18,110,0,
-16,10,50,0,57,59,120,120,120,120,0,48,18,109,0,16,10,49,0,57,18,110,0,16,10,50,0,57,59,121,121,121,
-121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,59,122,122,122,122,0,48,46,18,109,0,16,
-10,51,0,57,18,110,0,16,10,50,0,57,59,119,119,119,119,0,48,46,20,0,9,18,95,95,114,101,116,86,97,108,
-0,16,10,51,0,57,18,109,0,16,8,48,0,57,18,110,0,16,10,51,0,57,59,120,120,120,120,0,48,18,109,0,16,
-10,49,0,57,18,110,0,16,10,51,0,57,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,110,0,16,10,
-51,0,57,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,59,119,119,119,
-119,0,48,46,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,95,
-95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,
-18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,
-0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,16,10,51,0,57,
-49,20,0,0,1,90,95,0,0,13,0,2,26,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,
-86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,46,20,0,0,1,90,95,0,0,13,0,2,26,1,1,0,0,13,0,109,0,0,
-1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,
-0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,
-0,1,90,95,0,0,13,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,
-49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,0,1,90,95,0,0,13,0,2,27,1,1,0,0,13,0,109,0,0,1,1,0,
-0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,
-20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,0,1,
-90,95,0,0,13,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,
-57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,0,1,90,95,0,0,13,0,2,21,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0,
-98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,
-18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,0,1,90,95,0,
-0,13,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,
-0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,
-0,18,110,0,16,10,49,0,57,49,20,0,0,1,90,95,0,0,13,0,2,22,1,1,0,0,13,0,109,0,0,1,1,0,0,9,0,98,0,0,0,
-1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,0,1,90,95,0,0,14,0,2,
-26,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-97,0,18,110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,
-0,16,10,49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,
-0,57,46,20,0,0,1,90,95,0,0,14,0,2,26,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,
-97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,46,20,0,0,1,90,95,0,0,14,0,2,27,1,1,0,0,9,0,97,0,0,1,
-1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,
-57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,
-9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,0,1,90,95,
-0,0,14,0,2,27,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,
-48,0,57,18,109,0,16,8,48,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,
-109,0,16,10,49,0,57,18,98,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,
-10,50,0,57,18,98,0,47,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,
-18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,
-101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,
-97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,48,20,0,0,1,90,95,0,0,14,0,2,21,1,1,0,0,14,0,
-109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,
-57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,
-48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,48,20,0,0,
-1,90,95,0,0,14,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,
-0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,
-57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,
-18,110,0,16,10,50,0,57,49,20,0,0,1,90,95,0,0,14,0,2,22,1,1,0,0,14,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,
-9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,49,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,0,1,90,95,0,0,15,0,2,26,1,1,0,
-0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,
-110,0,16,8,48,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,
-49,0,57,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,46,
-20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,46,20,0,0,1,
-90,95,0,0,15,0,2,26,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,
-57,18,109,0,16,10,49,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,
-0,16,10,50,0,57,18,98,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,
-0,57,18,98,0,46,20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,47,20,0,9,18,95,95,114,101,
-116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,47,20,0,9,18,95,95,114,101,116,86,97,
-108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,
-10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,47,20,0,0,1,90,95,0,0,15,0,2,27,1,1,0,0,15,0,109,0,0,1,1,
-0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,
-47,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,47,20,0,9,
-18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,47,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,47,20,0,0,1,90,95,0,0,15,0,2,
-21,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,
-97,0,18,110,0,16,8,48,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,
-0,16,10,49,0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,
-0,57,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,48,20,
-0,0,1,90,95,0,0,15,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,
-49,0,57,18,109,0,16,10,49,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,
-109,0,16,10,50,0,57,18,98,0,48,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,
-10,51,0,57,18,98,0,48,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,9,0,97,0,0,1,1,0,0,15,0,110,0,0,0,1,9,
-18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,97,0,18,110,0,16,8,48,0,57,49,20,0,9,18,95,95,114,
-101,116,86,97,108,0,16,10,49,0,57,18,97,0,18,110,0,16,10,49,0,57,49,20,0,9,18,95,95,114,101,116,86,
-97,108,0,16,10,50,0,57,18,97,0,18,110,0,16,10,50,0,57,49,20,0,9,18,95,95,114,101,116,86,97,108,0,
-16,10,51,0,57,18,97,0,18,110,0,16,10,51,0,57,49,20,0,0,1,90,95,0,0,15,0,2,22,1,1,0,0,15,0,109,0,0,
-1,1,0,0,9,0,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,98,
-0,49,20,0,9,18,95,95,114,101,116,86,97,108,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,98,0,49,20,0,
-9,18,95,95,114,101,116,86,97,108,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,98,0,49,20,0,9,18,95,95,
-114,101,116,86,97,108,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,98,0,49,20,0,0,1,90,95,0,0,10,0,2,
-21,1,1,0,0,13,0,109,0,0,1,1,0,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8,
-48,0,57,18,118,0,59,120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,0,48,46,20,0,0,1,90,95,
-0,0,10,0,2,21,1,1,0,0,10,0,118,0,0,1,1,0,0,13,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,
-120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,
-108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,0,1,90,95,0,0,11,0,2,
-21,1,1,0,0,14,0,109,0,0,1,1,0,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8,
-48,0,57,18,118,0,59,120,120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,121,0,48,46,18,109,
-0,16,10,50,0,57,18,118,0,59,122,122,122,0,48,46,20,0,0,1,90,95,0,0,11,0,2,21,1,1,0,0,11,0,118,0,0,
-1,1,0,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,
-18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,58,100,111,116,0,0,18,
-118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,58,100,111,116,
-0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,0,1,90,95,0,0,12,0,2,21,1,1,0,0,15,0,109,0,0,1,1,0,
-0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,16,8,48,0,57,18,118,0,59,120,120,
-120,120,0,48,18,109,0,16,10,49,0,57,18,118,0,59,121,121,121,121,0,48,46,18,109,0,16,10,50,0,57,18,
-118,0,59,122,122,122,122,0,48,46,18,109,0,16,10,51,0,57,18,118,0,59,119,119,119,119,0,48,46,20,0,0,
-1,90,95,0,0,12,0,2,21,1,1,0,0,12,0,118,0,0,1,1,0,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,59,120,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,8,48,0,57,0,0,20,0,9,18,95,95,114,101,116,
-86,97,108,0,59,121,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,49,0,57,0,0,20,0,9,18,95,95,114,
-101,116,86,97,108,0,59,122,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,50,0,57,0,0,20,0,9,18,95,
-95,114,101,116,86,97,108,0,59,119,0,58,100,111,116,0,0,18,118,0,0,18,109,0,16,10,51,0,57,0,0,20,0,
-0,1,90,95,0,0,13,0,2,1,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,
-109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,
-18,110,0,16,10,49,0,57,46,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,13,
-0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,109,
-0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,8,18,109,0,0,0,1,90,95,0,0,
-13,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,8,18,
-109,0,0,0,1,90,95,0,0,13,0,2,4,1,0,2,0,13,0,109,0,0,1,1,0,0,13,0,110,0,0,0,1,9,18,109,0,16,8,48,0,
-57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,
-0,57,18,110,0,16,10,49,0,57,49,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0,
-0,14,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,
-18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,109,0,16,10,50,0,
-57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,2,1,0,2,
-0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,
-8,48,0,57,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,
-18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,8,18,109,0,0,0,1,90,
-95,0,0,14,0,2,3,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,
-8,18,109,0,0,0,1,90,95,0,0,14,0,2,4,1,0,2,0,14,0,109,0,0,1,1,0,0,14,0,110,0,0,0,1,9,18,109,0,16,8,
-48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,
-10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,
-16,10,50,0,57,49,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,1,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0,
-0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,46,20,0,9,18,109,0,16,10,
-49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,
-10,50,0,57,18,110,0,16,10,50,0,57,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,
-16,10,51,0,57,46,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,2,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0,
-0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,47,20,0,9,18,109,0,16,10,
-49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,
-10,50,0,57,18,110,0,16,10,50,0,57,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,110,0,
-16,10,51,0,57,47,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,3,1,0,2,0,15,0,109,0,0,1,1,0,0,15,0,110,0,
-0,0,1,9,18,109,0,18,109,0,18,110,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,4,1,0,2,0,15,0,109,0,
-0,1,1,0,0,15,0,110,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,110,0,16,8,48,0,57,49,
-20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,110,0,16,10,49,0,57,49,20,0,9,18,109,0,16,
-10,50,0,57,18,109,0,16,10,50,0,57,18,110,0,16,10,50,0,57,49,20,0,9,18,109,0,16,10,51,0,57,18,109,0,
-16,10,51,0,57,18,110,0,16,10,51,0,57,49,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,1,1,0,2,0,13,0,109,
-0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18,
-109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,
-49,0,57,18,118,0,46,20,0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,2,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0,
-0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,
-109,0,16,8,48,0,57,18,118,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,47,20,
-0,8,18,109,0,0,0,1,90,95,0,0,13,0,2,3,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10,
-0,1,118,0,2,58,118,101,99,50,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,
-118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,
-95,0,0,13,0,2,4,1,0,2,0,13,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,10,0,1,118,0,2,58,118,
-101,99,50,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,
-118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,
-95,0,0,14,0,2,1,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,
-101,99,51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9,18,
-109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,
-10,50,0,57,18,118,0,46,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,2,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,
-97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99,51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,
-57,18,109,0,16,8,48,0,57,18,118,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,
-47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,47,20,0,8,18,109,0,0,0,1,90,95,0,
-0,14,0,2,3,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99,
-51,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0,
-16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,
-57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,14,0,2,4,1,0,2,0,14,0,109,0,0,1,1,0,0,9,0,97,0,0,0,
-1,3,2,90,95,0,0,11,0,1,118,0,2,58,118,101,99,51,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0,
-16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,
-57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,8,18,109,0,0,
-0,1,90,95,0,0,15,0,2,1,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,118,0,2,58,
-118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,46,20,0,9,
-18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,
-16,10,50,0,57,18,118,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,118,0,46,20,0,8,
-18,109,0,0,0,1,90,95,0,0,15,0,2,2,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,95,0,0,12,0,1,
-118,0,2,58,118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,
-0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,47,20,0,9,18,109,0,16,10,50,0,
-57,18,109,0,16,10,50,0,57,18,118,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,18,118,
-0,47,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,3,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,0,1,3,2,90,
-95,0,0,12,0,1,118,0,2,58,118,101,99,52,0,0,18,97,0,0,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,
-48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,18,118,0,48,20,0,9,18,109,
-0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,
-0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,15,0,2,4,1,0,2,0,15,0,109,0,0,1,1,0,0,9,0,97,0,0,
-0,1,3,2,90,95,0,0,12,0,1,118,0,2,58,118,101,99,52,0,0,17,49,0,48,0,0,18,97,0,49,0,0,0,0,9,18,109,0,
-16,8,48,0,57,18,109,0,16,8,48,0,57,18,118,0,48,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,
-57,18,118,0,48,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,18,118,0,48,20,0,9,18,109,0,16,
-10,51,0,57,18,109,0,16,10,51,0,57,18,118,0,48,20,0,8,18,109,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,
-0,118,0,0,1,1,0,0,13,0,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,
-11,0,2,3,1,0,2,0,11,0,118,0,0,1,1,0,0,14,0,109,0,0,0,1,9,18,118,0,18,118,0,18,109,0,48,20,0,8,18,
-118,0,0,0,1,90,95,0,0,12,0,2,3,1,0,2,0,12,0,118,0,0,1,1,0,0,15,0,109,0,0,0,1,9,18,118,0,18,118,0,
-18,109,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,5,0,2,25,1,0,2,0,5,0,97,0,0,0,1,9,18,97,0,18,97,0,16,
-10,49,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,90,95,0,0,6,0,2,25,1,0,2,0,6,0,
-118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,
-116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,7,0,2,25,1,0,2,0,7,0,118,0,0,0,1,9,18,118,0,18,118,0,
-58,105,118,101,99,51,0,0,16,10,49,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,
-1,90,95,0,0,8,0,2,25,1,0,2,0,8,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,16,10,49,
-0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,9,0,2,25,1,0,2,0,9,0,
-97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,
-0,0,1,90,95,0,0,10,0,2,25,1,0,2,0,10,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,
-0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,11,0,2,25,1,0,
-2,0,11,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,
-95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,12,0,2,25,1,0,2,0,12,0,118,0,0,0,1,9,18,118,
-0,18,118,0,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,
-118,0,20,0,0,1,90,95,0,0,13,0,2,25,1,0,2,0,13,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,
-48,0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,
-0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,
-20,0,0,1,90,95,0,0,14,0,2,25,1,0,2,0,14,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,
-57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,
-58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,
-118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,
-90,95,0,0,15,0,2,25,1,0,2,0,15,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,
-101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,
-101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,
-101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,
-101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,
-95,0,0,5,0,2,24,1,0,2,0,5,0,97,0,0,0,1,9,18,97,0,18,97,0,16,10,49,0,46,20,0,9,18,95,95,114,101,116,
-86,97,108,0,18,97,0,20,0,0,1,90,95,0,0,6,0,2,24,1,0,2,0,6,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,
-118,101,99,50,0,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,
-95,0,0,7,0,2,24,1,0,2,0,7,0,118,0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,16,10,49,0,0,
-0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,8,0,2,24,1,0,2,0,8,0,118,
-0,0,0,1,9,18,118,0,18,118,0,58,105,118,101,99,52,0,0,16,10,49,0,0,0,46,20,0,9,18,95,95,114,101,116,
-86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,9,0,2,24,1,0,2,0,9,0,97,0,0,0,1,9,18,97,0,18,97,0,17,49,0,
-48,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,0,1,90,95,0,0,10,0,2,24,1,0,2,0,10,
-0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,
-101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,11,0,2,24,1,0,2,0,11,0,118,0,0,0,1,9,18,118,0,18,
-118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,
-20,0,0,1,90,95,0,0,12,0,2,24,1,0,2,0,12,0,118,0,0,0,1,9,18,118,0,18,118,0,58,118,101,99,52,0,0,17,
-49,0,48,0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,0,1,90,95,0,0,13,0,2,24,1,
-0,2,0,13,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,0,17,49,0,
-48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,0,17,49,0,48,
-0,0,0,0,46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,14,0,2,24,1,0,2,0,
-14,0,109,0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,
-0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,
-0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,
-46,20,0,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,15,0,2,24,1,0,2,0,15,0,109,
-0,0,0,1,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,
-20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,
-0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,
-9,18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,
-18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,0,1,90,95,0,0,5,0,0,95,95,112,111,115,116,68,101,99,
-114,0,1,0,2,0,5,0,97,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,
-10,49,0,47,20,0,0,1,90,95,0,0,6,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,6,0,118,0,0,0,1,
-9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,50,0,0,16,
-10,49,0,0,0,47,20,0,0,1,90,95,0,0,7,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,7,0,118,0,0,
-0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,51,0,0,
-16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,8,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,8,0,118,0,
-0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,105,118,101,99,52,0,
-0,16,10,49,0,0,0,47,20,0,0,1,90,95,0,0,9,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,9,0,97,
-0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,17,49,0,48,0,0,47,20,0,0,
-1,90,95,0,0,10,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,10,0,118,0,0,0,1,9,18,95,95,114,
-101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,
-20,0,0,1,90,95,0,0,11,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,11,0,118,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,
-0,47,20,0,0,1,90,95,0,0,12,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,12,0,118,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,0,17,49,0,48,0,
-0,0,0,47,20,0,0,1,90,95,0,0,13,0,0,95,95,112,111,115,116,68,101,99,114,0,1,0,2,0,13,0,109,0,0,0,1,
-9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,
-118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,
-118,101,99,50,0,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,14,0,0,95,95,112,111,115,116,68,101,99,
-114,0,1,0,2,0,14,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,0,20,0,9,18,109,0,16,8,48,
-0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,49,0,
-57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,9,18,109,0,16,10,50,0,57,
-18,109,0,16,10,50,0,57,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,47,20,0,0,1,90,95,0,0,15,0,0,95,95,
-112,111,115,116,68,101,99,114,0,1,0,2,0,15,0,109,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,109,
-0,20,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,
-0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,
-9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,9,
-18,109,0,16,10,51,0,57,18,109,0,16,10,51,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,47,20,0,0,1,
-90,95,0,0,9,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,9,0,97,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,90,95,0,0,10,0,0,95,95,112,
-111,115,116,73,110,99,114,0,1,0,2,0,10,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,
-20,0,9,18,118,0,18,118,0,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0,11,0,0,95,
-95,112,111,115,116,73,110,99,114,0,1,0,2,0,11,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,
-118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,51,0,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0,12,0,
-0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,12,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,
-0,18,118,0,20,0,9,18,118,0,18,118,0,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,0,1,90,95,0,0,
-5,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,5,0,97,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,18,97,0,20,0,9,18,97,0,18,97,0,16,10,49,0,46,20,0,0,1,90,95,0,0,6,0,0,95,95,112,111,115,116,
-73,110,99,114,0,1,0,2,0,6,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,118,
-0,18,118,0,58,105,118,101,99,50,0,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,7,0,0,95,95,112,111,115,
-116,73,110,99,114,0,1,0,2,0,7,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,18,
-118,0,18,118,0,58,105,118,101,99,51,0,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,8,0,0,95,95,112,111,
-115,116,73,110,99,114,0,1,0,2,0,8,0,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,118,0,20,0,9,
-18,118,0,18,118,0,58,105,118,101,99,51,0,0,16,10,49,0,0,0,46,20,0,0,1,90,95,0,0,13,0,0,95,95,112,
-111,115,116,73,110,99,114,0,1,0,2,0,13,0,109,0,0,0,1,3,2,90,95,0,0,13,0,1,110,0,2,18,109,0,0,0,9,
-18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,
-109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,50,0,0,17,49,0,48,0,0,0,0,46,20,0,8,18,
-110,0,0,0,1,90,95,0,0,14,0,0,95,95,112,111,115,116,73,110,99,114,0,1,0,2,0,14,0,109,0,0,0,1,3,2,90,
-95,0,0,14,0,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,0,16,8,48,0,57,58,118,101,99,51,
-0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,16,10,49,0,57,58,118,101,99,51,0,
-0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,10,50,0,57,58,118,101,99,51,0,0,
-17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,15,0,0,95,95,112,111,115,116,73,110,99,114,0,
-1,0,2,0,15,0,109,0,0,0,1,3,2,90,95,0,0,15,0,1,110,0,2,18,109,0,0,0,9,18,109,0,16,8,48,0,57,18,109,
-0,16,8,48,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,49,0,57,18,109,0,
-16,10,49,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,50,0,57,18,109,0,16,
-10,50,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,9,18,109,0,16,10,51,0,57,18,109,0,16,10,
-51,0,57,58,118,101,99,52,0,0,17,49,0,48,0,0,0,0,46,20,0,8,18,110,0,0,0,1,90,95,0,0,1,0,2,15,1,1,0,
-0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,4,118,101,99,52,95,115,103,116,0,18,95,95,114,101,116,86,97,
-108,0,59,120,0,0,18,98,0,0,18,97,0,0,0,0,1,90,95,0,0,1,0,2,15,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,
-0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,40,0,0,1,90,95,
-0,0,1,0,2,16,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,1,99,0,0,0,4,102,108,111,
-97,116,95,108,101,115,115,0,18,99,0,0,18,98,0,0,18,97,0,0,0,8,18,99,0,0,0,1,90,95,0,0,1,0,2,16,1,1,
-0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,
-116,0,0,18,98,0,0,0,41,0,0,1,90,95,0,0,1,0,2,18,1,1,0,0,9,0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,
-95,0,0,1,0,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,108,101,115,115,0,18,103,0,0,18,98,0,0,
-18,97,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,
-0,18,101,0,32,0,0,1,90,95,0,0,1,0,2,18,1,1,0,0,5,0,97,0,0,1,1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,
-97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,43,0,0,1,90,95,0,0,1,0,2,17,1,1,0,0,9,
-0,97,0,0,1,1,0,0,9,0,98,0,0,0,1,3,2,90,95,0,0,1,0,1,103,0,0,1,1,101,0,0,0,4,102,108,111,97,116,95,
-108,101,115,115,0,18,103,0,0,18,97,0,0,18,98,0,0,0,4,102,108,111,97,116,95,101,113,117,97,108,0,18,
-101,0,0,18,97,0,0,18,98,0,0,0,8,18,103,0,18,101,0,32,0,0,1,90,95,0,0,1,0,2,17,1,1,0,0,5,0,97,0,0,1,
-1,0,0,5,0,98,0,0,0,1,8,58,102,108,111,97,116,0,0,18,97,0,0,0,58,102,108,111,97,116,0,0,18,98,0,0,0,
-42,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,9,0,102,0,0,0,1,4,102,108,111,
-97,116,95,112,114,105,110,116,0,18,102,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,
-1,1,0,0,5,0,105,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,105,0,0,0,0,1,90,95,0,0,0,0,0,
-112,114,105,110,116,77,69,83,65,0,1,1,0,0,1,0,98,0,0,0,1,4,98,111,111,108,95,112,114,105,110,116,0,
-18,98,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,10,0,118,0,0,0,1,9,58,
-112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,
-0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,11,0,118,0,
-0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,
-69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,
-0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,12,0,118,0,0,0,1,9,58,112,114,
-105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,
-118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114,
-105,110,116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,
-83,65,0,1,1,0,0,6,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,
-58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,
-116,77,69,83,65,0,1,1,0,0,7,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,
-0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,
-77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,
-0,0,8,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,
-105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,
-118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,119,0,0,0,0,0,1,90,95,0,
-0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,2,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,
-83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,
-0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,3,0,118,0,0,0,1,9,58,112,114,105,110,
-116,77,69,83,65,0,0,18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,
-121,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,0,1,90,95,0,0,0,0,0,
-112,114,105,110,116,77,69,83,65,0,1,1,0,0,4,0,118,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,
-18,118,0,59,120,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,118,0,59,121,0,0,0,0,9,58,112,
-114,105,110,116,77,69,83,65,0,0,18,118,0,59,122,0,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,
-18,118,0,59,119,0,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,13,0,109,0,0,
-0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,105,110,116,
-77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,
-1,1,0,0,14,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58,
-112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,
-65,0,0,18,109,0,16,10,50,0,57,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,
-15,0,109,0,0,0,1,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,8,48,0,57,0,0,0,9,58,112,114,
-105,110,116,77,69,83,65,0,0,18,109,0,16,10,49,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,
-18,109,0,16,10,50,0,57,0,0,0,9,58,112,114,105,110,116,77,69,83,65,0,0,18,109,0,16,10,51,0,57,0,0,0,
-0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,16,0,101,0,0,0,1,4,105,110,116,95,
-112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,
-17,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,
-105,110,116,77,69,83,65,0,1,1,0,0,18,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,
-0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,0,19,0,101,0,0,0,1,4,105,110,116,
-95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,105,110,116,77,69,83,65,0,1,1,0,
-0,20,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,0,0,0,1,90,95,0,0,0,0,0,112,114,
-105,110,116,77,69,83,65,0,1,1,0,0,21,0,101,0,0,0,1,4,105,110,116,95,112,114,105,110,116,0,18,101,0,
-0,0,0,0
diff --git a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h b/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h
deleted file mode 100644
index c5a1cce2a49..00000000000
--- a/src/mesa/shader/slang/library/slang_fragment_builtin_gc.h
+++ /dev/null
@@ -1,110 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_fragment_builtin.gc */
-
-5,2,2,90,95,6,0,12,0,1,103,108,95,70,114,97,103,67,111,111,114,100,0,0,0,2,2,90,95,6,0,1,0,1,103,
-108,95,70,114,111,110,116,70,97,99,105,110,103,0,0,0,2,2,90,95,5,0,12,0,1,103,108,95,70,114,97,103,
-67,111,108,111,114,0,0,0,2,2,90,95,5,0,12,0,1,103,108,95,70,114,97,103,68,97,116,97,0,3,18,103,108,
-95,77,97,120,68,114,97,119,66,117,102,102,101,114,115,0,0,0,2,2,90,95,5,0,9,0,1,103,108,95,70,114,
-97,103,68,101,112,116,104,0,0,0,2,2,90,95,3,0,12,0,1,103,108,95,67,111,108,111,114,0,0,0,2,2,90,95,
-3,0,12,0,1,103,108,95,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,
-1,103,108,95,84,101,120,67,111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,
-67,111,111,114,100,115,0,0,0,2,2,90,95,3,0,9,0,1,103,108,95,70,111,103,70,114,97,103,67,111,111,
-114,100,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,0,1,1,0,0,16,0,115,97,109,112,
-108,101,114,0,0,1,1,0,0,9,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,
-12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100,0,
-20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,
-95,49,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,
-18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,
-106,0,1,1,0,0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,
-98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,
-100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,121,0,49,20,0,9,18,112,
-99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,
-98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,
-111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,0,1,1,0,0,
-16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,
-0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,
-18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114,
-100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,0,
-18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,
-0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,0,1,1,0,0,17,0,115,97,109,112,108,101,114,
-0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,99,
-111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,120,
-121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,
-101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,
-114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80,
-114,111,106,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,
-0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,
-111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,122,0,
-49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,
-120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,
-0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80,114,
-111,106,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,
-9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,
-114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,119,0,49,20,
-0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,
-50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,
-112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,0,1,1,0,0,18,0,
-115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,
-1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,
-18,99,111,111,114,100,0,59,120,121,122,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,
-115,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,
-108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,
-101,120,116,117,114,101,51,68,80,114,111,106,0,1,1,0,0,18,0,115,97,109,112,108,101,114,0,0,1,1,0,0,
-12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,
-114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121,
-122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,
-115,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,
-108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,
-101,120,116,117,114,101,67,117,98,101,0,1,1,0,0,19,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,
-99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,
-52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,
-111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,99,117,98,101,
-0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,
-0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,0,1,1,0,0,20,0,115,97,109,112,108,101,114,0,
-0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,99,
-111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20,
-0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,
-49,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,
-109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,
-49,68,80,114,111,106,0,1,1,0,0,20,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,
-0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,
-99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49,
-20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,
-111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,
-97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,
-114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,50,68,0,1,1,0,
-0,21,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,
-115,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,
-121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,98,105,97,115,0,20,
-0,4,118,101,99,52,95,116,101,120,95,50,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,
-114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,
-95,0,0,12,0,0,115,104,97,100,111,119,50,68,80,114,111,106,0,1,1,0,0,21,0,115,97,109,112,108,101,
-114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,98,105,97,115,0,0,0,1,3,2,90,95,0,0,12,0,1,
-112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,
-120,121,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99,
-111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,98,105,97,115,0,20,0,4,
-118,101,99,52,95,116,101,120,95,50,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,
-101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,
-0,0,9,0,0,100,70,100,120,0,1,1,0,0,9,0,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,
-101,116,86,97,108,0,59,120,0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,10,0,0,100,70,100,
-120,0,1,1,0,0,10,0,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,
-59,120,121,0,0,18,112,0,59,120,121,121,121,0,0,0,0,1,90,95,0,0,11,0,0,100,70,100,120,0,1,1,0,0,11,
-0,112,0,0,0,1,4,118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,
-18,112,0,59,120,121,122,122,0,0,0,0,1,90,95,0,0,12,0,0,100,70,100,120,0,1,1,0,0,12,0,112,0,0,0,1,4,
-118,101,99,52,95,100,100,120,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,0,0,1,90,95,0,0,9,0,0,
-100,70,100,121,0,1,1,0,0,9,0,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,
-97,108,0,59,120,0,0,18,112,0,59,120,120,120,120,0,0,0,0,1,90,95,0,0,10,0,0,100,70,100,121,0,1,1,0,
-0,10,0,112,0,0,0,1,4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,
-0,18,112,0,59,120,121,121,121,0,0,0,0,1,90,95,0,0,11,0,0,100,70,100,121,0,1,1,0,0,11,0,112,0,0,0,1,
-4,118,101,99,52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,112,0,59,
-120,121,122,122,0,0,0,0,1,90,95,0,0,12,0,0,100,70,100,121,0,1,1,0,0,12,0,112,0,0,0,1,4,118,101,99,
-52,95,100,100,121,0,18,95,95,114,101,116,86,97,108,0,0,18,112,0,0,0,0,1,90,95,0,0,9,0,0,102,119,
-105,100,116,104,0,1,1,0,0,9,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,
-0,58,97,98,115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,1,90,95,0,0,10,0,0,102,119,105,
-100,116,104,0,1,1,0,0,10,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,0,
-58,97,98,115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,1,90,95,0,0,11,0,0,102,119,105,100,
-116,104,0,1,1,0,0,11,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,0,58,97,
-98,115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,1,90,95,0,0,12,0,0,102,119,105,100,116,
-104,0,1,1,0,0,12,0,112,0,0,0,1,8,58,97,98,115,0,0,58,100,70,100,120,0,0,18,112,0,0,0,0,0,58,97,98,
-115,0,0,58,100,70,100,121,0,0,18,112,0,0,0,0,0,46,0,0,0
diff --git a/src/mesa/shader/slang/library/slang_pp_directives.syn b/src/mesa/shader/slang/library/slang_pp_directives.syn
deleted file mode 100644
index b51d168cc03..00000000000
--- a/src/mesa/shader/slang/library/slang_pp_directives.syn
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.6
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_pp_directives.syn
- * slang preprocessor directives parser
- * \author Michal Krol
- */
-
-.syntax source;
-
-/*
- * This syntax script preprocesses a GLSL shader.
- * It is assumed, that the #version directive has been parsed. Separate pass for parsing
- * version gives better control on behavior depending on the version number given.
- *
- * The output is a source string with comments and directives removed. White spaces and comments
- * are replaced with on or more spaces. All new-lines are preserved and converted to Linux format.
- * Directives are escaped with a null character. The end of the source string is marked by
- * two consecutive null characters. The consumer is responsible for executing the escaped
- * directives, removing dead portions of code and expanding macros.
- */
-
-.emtcode ESCAPE_TOKEN 0
-
-/*
- * The TOKEN_* symbols follow the ESCAPE_TOKEN.
- *
- * NOTE:
- * There is no TOKEN_IFDEF and neither is TOKEN_IFNDEF. They are handled with TOKEN_IF and
- * operator defined.
- * The "#ifdef SYMBOL" is replaced with "#if defined SYMBOL"
- * The "#ifndef SYMBOL" is replaced with "#if !defined SYMBOL"
- */
-.emtcode TOKEN_END 0
-.emtcode TOKEN_DEFINE 1
-.emtcode TOKEN_UNDEF 2
-.emtcode TOKEN_IF 3
-.emtcode TOKEN_ELSE 4
-.emtcode TOKEN_ELIF 5
-.emtcode TOKEN_ENDIF 6
-.emtcode TOKEN_ERROR 7
-.emtcode TOKEN_PRAGMA 8
-.emtcode TOKEN_EXTENSION 9
-.emtcode TOKEN_LINE 10
-
-/*
- * The PARAM_* symbols follow the TOKEN_DEFINE.
- */
-.emtcode PARAM_END 0
-.emtcode PARAM_PARAMETER 1
-
-/*
- * The BEHAVIOR_* symbols follow the TOKEN_EXTENSION.
- */
-.emtcode BEHAVIOR_REQUIRE 1
-.emtcode BEHAVIOR_ENABLE 2
-.emtcode BEHAVIOR_WARN 3
-.emtcode BEHAVIOR_DISABLE 4
-
-/*
- * The PRAGMA_* symbols follow TOKEN_PRAGMA
- */
-.emtcode PRAGMA_NO_PARAM 0
-.emtcode PRAGMA_PARAM 1
-
-source
- optional_directive .and .loop source_element .and '\0' .emit ESCAPE_TOKEN .emit TOKEN_END;
-
-source_element
- c_style_comment_block .or cpp_style_comment_block .or new_line_directive .or source_token;
-
-c_style_comment_block
- '/' .and '*' .and c_style_comment_rest .and .true .emit ' ';
-
-c_style_comment_rest
- .loop c_style_comment_body .and c_style_comment_end;
-
-c_style_comment_body
- c_style_comment_char_nostar .or c_style_comment_char_star_noslashstar;
-
-c_style_comment_char_nostar
- new_line .or '\x2B'-'\xFF' .or '\x01'-'\x29';
-
-c_style_comment_char_star_noslashstar
- '*' .and c_style_comment_char_star_noslashstar_1;
-c_style_comment_char_star_noslashstar_1
- c_style_comment_char_noslashstar .or c_style_comment_char_star_noslashstar;
-
-c_style_comment_char_noslashstar
- new_line .or '\x30'-'\xFF' .or '\x01'-'\x29' .or '\x2B'-'\x2E';
-
-c_style_comment_end
- '*' .and .loop c_style_comment_char_star .and '/';
-
-c_style_comment_char_star
- '*';
-
-cpp_style_comment_block
- '/' .and '/' .and cpp_style_comment_block_1;
-cpp_style_comment_block_1
- cpp_style_comment_block_2 .or cpp_style_comment_block_3;
-cpp_style_comment_block_2
- .loop cpp_style_comment_char .and new_line_directive;
-cpp_style_comment_block_3
- .loop cpp_style_comment_char;
-
-cpp_style_comment_char
- '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
-
-new_line_directive
- new_line .and optional_directive;
-
-new_line
- generic_new_line .emit '\n';
-
-generic_new_line
- carriage_return_line_feed .or line_feed_carriage_return .or '\n' .or '\r';
-
-carriage_return_line_feed
- '\r' .and '\n';
-
-line_feed_carriage_return
- '\n' .and '\r';
-
-optional_directive
- directive .emit ESCAPE_TOKEN .or .true;
-
-directive
- dir_define .emit TOKEN_DEFINE .or
- dir_undef .emit TOKEN_UNDEF .or
- dir_if .emit TOKEN_IF .or
- dir_ifdef .emit TOKEN_IF .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' .emit 'd'
- .emit ' ' .or
- dir_ifndef .emit TOKEN_IF .emit '!' .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e'
- .emit 'd' .emit ' ' .or
- dir_else .emit TOKEN_ELSE .or
- dir_elif .emit TOKEN_ELIF .or
- dir_endif .emit TOKEN_ENDIF .or
- dir_ext .emit TOKEN_EXTENSION .or
- dir_pragma .emit TOKEN_PRAGMA .or
- dir_line .emit TOKEN_LINE;
-
-dir_define
- optional_space .and '#' .and optional_space .and "define" .and symbol .and opt_parameters .and
- definition;
-
-dir_undef
- optional_space .and '#' .and optional_space .and "undef" .and symbol;
-
-dir_if
- optional_space .and '#' .and optional_space .and "if" .and expression;
-
-dir_ifdef
- optional_space .and '#' .and optional_space .and "ifdef" .and symbol;
-
-dir_ifndef
- optional_space .and '#' .and optional_space .and "ifndef" .and symbol;
-
-dir_else
- optional_space .and '#' .and optional_space .and "else";
-
-dir_elif
- optional_space .and '#' .and optional_space .and "elif" .and expression;
-
-dir_endif
- optional_space .and '#' .and optional_space .and "endif";
-
-dir_ext
- optional_space .and '#' .and optional_space .and "extension" .and space .and extension_name .and
- optional_space .and ':' .and optional_space .and extension_behavior;
-
-dir_line
- optional_space .and '#' .and optional_space .and "line" .and expression;
-
-dir_pragma
- optional_space .and '#' .and optional_space .and "pragma" .and symbol .and opt_pragma_param;
-
-
-opt_pragma_param
- pragma_param .or .true .emit PRAGMA_NO_PARAM;
-
-pragma_param
- optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')';
-
-symbol_no_space
- symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0';
-
-symbol
- space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0';
-
-opt_parameters
- parameters .or .true .emit PARAM_END;
-
-parameters
- '(' .and parameters_1 .and optional_space .and ')' .emit PARAM_END;
-parameters_1
- parameters_2 .or .true;
-parameters_2
- parameter .emit PARAM_PARAMETER .and .loop parameters_3;
-parameters_3
- optional_space .and ',' .and parameter .emit PARAM_PARAMETER;
-
-parameter
- optional_space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and
- .true .emit '\0';
-
-definition
- .loop definition_character .emit * .and .true .emit '\0';
-
-definition_character
- '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
-
-expression
- expression_element .and .loop expression_element .and .true .emit '\0';
-
-expression_element
- expression_character .emit *;
-
-expression_character
- '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
-
-extension_name
- symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0';
-
-extension_behavior
- "require" .emit BEHAVIOR_REQUIRE .or
- "enable" .emit BEHAVIOR_ENABLE .or
- "warn" .emit BEHAVIOR_WARN .or
- "disable" .emit BEHAVIOR_DISABLE;
-
-optional_space
- .loop single_space;
-
-space
- single_space .and .loop single_space;
-
-single_space
- ' ' .or '\t';
-
-source_token
- space .emit ' ' .or complex_token .or source_token_1;
-source_token_1
- simple_token .emit ' ' .and .true .emit ' ';
-
-/*
- * All possible tokens.
- */
-
-complex_token
- identifier .or number;
-
-simple_token
- increment .or decrement .or lequal .or gequal .or equal .or nequal .or and .or xor .or or .or
- addto .or subtractfrom .or multiplyto .or divideto .or other;
-
-identifier
- identifier_char1 .emit * .and .loop identifier_char2 .emit *;
-identifier_char1
- 'a'-'z' .or 'A'-'Z' .or '_';
-identifier_char2
- 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';
-
-number
- float .or integer;
-
-digit_oct
- '0'-'7';
-
-digit_dec
- '0'-'9';
-
-digit_hex
- '0'-'9' .or 'A'-'F' .or 'a'-'f';
-
-float
- float_1 .or float_2;
-float_1
- float_fractional_constant .and float_optional_exponent_part;
-float_2
- float_digit_sequence .and float_exponent_part;
-
-float_fractional_constant
- float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;
-float_fractional_constant_1
- float_digit_sequence .and '.' .emit '.' .and float_digit_sequence;
-float_fractional_constant_2
- float_digit_sequence .and '.' .emit '.';
-float_fractional_constant_3
- '.' .emit '.' .and float_digit_sequence;
-
-float_optional_exponent_part
- float_exponent_part .or .true;
-
-float_digit_sequence
- digit_dec .emit * .and .loop digit_dec .emit *;
-
-float_exponent_part
- float_exponent_part_1 .or float_exponent_part_2;
-float_exponent_part_1
- 'e' .emit 'e' .and float_optional_sign .and float_digit_sequence;
-float_exponent_part_2
- 'E' .emit 'E' .and float_optional_sign .and float_digit_sequence;
-
-float_optional_sign
- '+' .emit '+' .or '-' .emit '-' .or .true;
-
-integer
- integer_hex .or integer_oct .or integer_dec;
-
-integer_hex
- '0' .emit '0' .and integer_hex_1 .emit * .and digit_hex .emit * .and
- .loop digit_hex .emit *;
-integer_hex_1
- 'x' .or 'X';
-
-integer_oct
- '0' .emit '0' .and .loop digit_oct .emit *;
-
-integer_dec
- digit_dec .emit * .and .loop digit_dec .emit *;
-
-increment
- '+' .emit * .and '+' .emit *;
-
-decrement
- '-' .emit * .and '-' .emit *;
-
-lequal
- '<' .emit * .and '=' .emit *;
-
-gequal
- '>' .emit * .and '=' .emit *;
-
-equal
- '=' .emit * .and '=' .emit *;
-
-nequal
- '!' .emit * .and '=' .emit *;
-
-and
- '&' .emit * .and '&' .emit *;
-
-xor
- '^' .emit * .and '^' .emit *;
-
-or
- '|' .emit * .and '|' .emit *;
-
-addto
- '+' .emit * .and '=' .emit *;
-
-subtractfrom
- '-' .emit * .and '=' .emit *;
-
-multiplyto
- '*' .emit * .and '=' .emit *;
-
-divideto
- '/' .emit * .and '=' .emit *;
-
-/*
- * All characters except '\0' and '#'.
- */
-other
- '\x24'-'\xFF' .emit * .or '\x01'-'\x22' .emit *;
-
-symbol_character
- 'A'-'Z' .or 'a'-'z' .or '_';
-
-symbol_character2
- 'A'-'Z' .or 'a'-'z' .or '0'-'9' .or '_';
-
-.string string_lexer;
-
-string_lexer
- lex_first_identifier_character .and .loop lex_next_identifier_character;
-
-lex_first_identifier_character
- 'a'-'z' .or 'A'-'Z' .or '_';
-
-lex_next_identifier_character
- 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';
-
diff --git a/src/mesa/shader/slang/library/slang_pp_directives_syn.h b/src/mesa/shader/slang/library/slang_pp_directives_syn.h
deleted file mode 100644
index 430f8d8217c..00000000000
--- a/src/mesa/shader/slang/library/slang_pp_directives_syn.h
+++ /dev/null
@@ -1,250 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */
-
-".syntax source;\n"
-".emtcode ESCAPE_TOKEN 0\n"
-".emtcode TOKEN_END 0\n"
-".emtcode TOKEN_DEFINE 1\n"
-".emtcode TOKEN_UNDEF 2\n"
-".emtcode TOKEN_IF 3\n"
-".emtcode TOKEN_ELSE 4\n"
-".emtcode TOKEN_ELIF 5\n"
-".emtcode TOKEN_ENDIF 6\n"
-".emtcode TOKEN_ERROR 7\n"
-".emtcode TOKEN_PRAGMA 8\n"
-".emtcode TOKEN_EXTENSION 9\n"
-".emtcode TOKEN_LINE 10\n"
-".emtcode PARAM_END 0\n"
-".emtcode PARAM_PARAMETER 1\n"
-".emtcode BEHAVIOR_REQUIRE 1\n"
-".emtcode BEHAVIOR_ENABLE 2\n"
-".emtcode BEHAVIOR_WARN 3\n"
-".emtcode BEHAVIOR_DISABLE 4\n"
-".emtcode PRAGMA_NO_PARAM 0\n"
-".emtcode PRAGMA_PARAM 1\n"
-"source\n"
-" optional_directive .and .loop source_element .and '\\0' .emit ESCAPE_TOKEN .emit TOKEN_END;\n"
-"source_element\n"
-" c_style_comment_block .or cpp_style_comment_block .or new_line_directive .or source_token;\n"
-"c_style_comment_block\n"
-" '/' .and '*' .and c_style_comment_rest .and .true .emit ' ';\n"
-"c_style_comment_rest\n"
-" .loop c_style_comment_body .and c_style_comment_end;\n"
-"c_style_comment_body\n"
-" c_style_comment_char_nostar .or c_style_comment_char_star_noslashstar;\n"
-"c_style_comment_char_nostar\n"
-" new_line .or '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"
-"c_style_comment_char_star_noslashstar\n"
-" '*' .and c_style_comment_char_star_noslashstar_1;\n"
-"c_style_comment_char_star_noslashstar_1\n"
-" c_style_comment_char_noslashstar .or c_style_comment_char_star_noslashstar;\n"
-"c_style_comment_char_noslashstar\n"
-" new_line .or '\\x30'-'\\xFF' .or '\\x01'-'\\x29' .or '\\x2B'-'\\x2E';\n"
-"c_style_comment_end\n"
-" '*' .and .loop c_style_comment_char_star .and '/';\n"
-"c_style_comment_char_star\n"
-" '*';\n"
-"cpp_style_comment_block\n"
-" '/' .and '/' .and cpp_style_comment_block_1;\n"
-"cpp_style_comment_block_1\n"
-" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n"
-"cpp_style_comment_block_2\n"
-" .loop cpp_style_comment_char .and new_line_directive;\n"
-"cpp_style_comment_block_3\n"
-" .loop cpp_style_comment_char;\n"
-"cpp_style_comment_char\n"
-" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
-"new_line_directive\n"
-" new_line .and optional_directive;\n"
-"new_line\n"
-" generic_new_line .emit '\\n';\n"
-"generic_new_line\n"
-" carriage_return_line_feed .or line_feed_carriage_return .or '\\n' .or '\\r';\n"
-"carriage_return_line_feed\n"
-" '\\r' .and '\\n';\n"
-"line_feed_carriage_return\n"
-" '\\n' .and '\\r';\n"
-"optional_directive\n"
-" directive .emit ESCAPE_TOKEN .or .true;\n"
-"directive\n"
-" dir_define .emit TOKEN_DEFINE .or\n"
-" dir_undef .emit TOKEN_UNDEF .or\n"
-" dir_if .emit TOKEN_IF .or\n"
-" dir_ifdef .emit TOKEN_IF .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e' .emit 'd'\n"
-" .emit ' ' .or\n"
-" dir_ifndef .emit TOKEN_IF .emit '!' .emit 'd' .emit 'e' .emit 'f' .emit 'i' .emit 'n' .emit 'e'\n"
-" .emit 'd' .emit ' ' .or\n"
-" dir_else .emit TOKEN_ELSE .or\n"
-" dir_elif .emit TOKEN_ELIF .or\n"
-" dir_endif .emit TOKEN_ENDIF .or\n"
-" dir_ext .emit TOKEN_EXTENSION .or\n"
-" dir_pragma .emit TOKEN_PRAGMA .or\n"
-" dir_line .emit TOKEN_LINE;\n"
-"dir_define\n"
-" optional_space .and '#' .and optional_space .and \"define\" .and symbol .and opt_parameters .and\n"
-" definition;\n"
-"dir_undef\n"
-" optional_space .and '#' .and optional_space .and \"undef\" .and symbol;\n"
-"dir_if\n"
-" optional_space .and '#' .and optional_space .and \"if\" .and expression;\n"
-"dir_ifdef\n"
-" optional_space .and '#' .and optional_space .and \"ifdef\" .and symbol;\n"
-"dir_ifndef\n"
-" optional_space .and '#' .and optional_space .and \"ifndef\" .and symbol;\n"
-"dir_else\n"
-" optional_space .and '#' .and optional_space .and \"else\";\n"
-"dir_elif\n"
-" optional_space .and '#' .and optional_space .and \"elif\" .and expression;\n"
-"dir_endif\n"
-" optional_space .and '#' .and optional_space .and \"endif\";\n"
-"dir_ext\n"
-" optional_space .and '#' .and optional_space .and \"extension\" .and space .and extension_name .and\n"
-" optional_space .and ':' .and optional_space .and extension_behavior;\n"
-"dir_line\n"
-" optional_space .and '#' .and optional_space .and \"line\" .and expression;\n"
-"dir_pragma\n"
-" optional_space .and '#' .and optional_space .and \"pragma\" .and symbol .and opt_pragma_param;\n"
-"opt_pragma_param\n"
-" pragma_param .or .true .emit PRAGMA_NO_PARAM;\n"
-"pragma_param\n"
-" optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')';\n"
-"symbol_no_space\n"
-" symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n"
-"symbol\n"
-" space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n"
-"opt_parameters\n"
-" parameters .or .true .emit PARAM_END;\n"
-"parameters\n"
-" '(' .and parameters_1 .and optional_space .and ')' .emit PARAM_END;\n"
-"parameters_1\n"
-" parameters_2 .or .true;\n"
-"parameters_2\n"
-" parameter .emit PARAM_PARAMETER .and .loop parameters_3;\n"
-"parameters_3\n"
-" optional_space .and ',' .and parameter .emit PARAM_PARAMETER;\n"
-"parameter\n"
-" optional_space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and\n"
-" .true .emit '\\0';\n"
-"definition\n"
-" .loop definition_character .emit * .and .true .emit '\\0';\n"
-"definition_character\n"
-" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
-"expression\n"
-" expression_element .and .loop expression_element .and .true .emit '\\0';\n"
-"expression_element\n"
-" expression_character .emit *;\n"
-"expression_character\n"
-" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
-"extension_name\n"
-" symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n"
-"extension_behavior\n"
-" \"require\" .emit BEHAVIOR_REQUIRE .or\n"
-" \"enable\" .emit BEHAVIOR_ENABLE .or\n"
-" \"warn\" .emit BEHAVIOR_WARN .or\n"
-" \"disable\" .emit BEHAVIOR_DISABLE;\n"
-"optional_space\n"
-" .loop single_space;\n"
-"space\n"
-" single_space .and .loop single_space;\n"
-"single_space\n"
-" ' ' .or '\\t';\n"
-"source_token\n"
-" space .emit ' ' .or complex_token .or source_token_1;\n"
-"source_token_1\n"
-" simple_token .emit ' ' .and .true .emit ' ';\n"
-"complex_token\n"
-" identifier .or number;\n"
-"simple_token\n"
-" increment .or decrement .or lequal .or gequal .or equal .or nequal .or and .or xor .or or .or\n"
-" addto .or subtractfrom .or multiplyto .or divideto .or other;\n"
-"identifier\n"
-" identifier_char1 .emit * .and .loop identifier_char2 .emit *;\n"
-"identifier_char1\n"
-" 'a'-'z' .or 'A'-'Z' .or '_';\n"
-"identifier_char2\n"
-" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n"
-"number\n"
-" float .or integer;\n"
-"digit_oct\n"
-" '0'-'7';\n"
-"digit_dec\n"
-" '0'-'9';\n"
-"digit_hex\n"
-" '0'-'9' .or 'A'-'F' .or 'a'-'f';\n"
-"float\n"
-" float_1 .or float_2;\n"
-"float_1\n"
-" float_fractional_constant .and float_optional_exponent_part;\n"
-"float_2\n"
-" float_digit_sequence .and float_exponent_part;\n"
-"float_fractional_constant\n"
-" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n"
-"float_fractional_constant_1\n"
-" float_digit_sequence .and '.' .emit '.' .and float_digit_sequence;\n"
-"float_fractional_constant_2\n"
-" float_digit_sequence .and '.' .emit '.';\n"
-"float_fractional_constant_3\n"
-" '.' .emit '.' .and float_digit_sequence;\n"
-"float_optional_exponent_part\n"
-" float_exponent_part .or .true;\n"
-"float_digit_sequence\n"
-" digit_dec .emit * .and .loop digit_dec .emit *;\n"
-"float_exponent_part\n"
-" float_exponent_part_1 .or float_exponent_part_2;\n"
-"float_exponent_part_1\n"
-" 'e' .emit 'e' .and float_optional_sign .and float_digit_sequence;\n"
-"float_exponent_part_2\n"
-" 'E' .emit 'E' .and float_optional_sign .and float_digit_sequence;\n"
-"float_optional_sign\n"
-" '+' .emit '+' .or '-' .emit '-' .or .true;\n"
-"integer\n"
-" integer_hex .or integer_oct .or integer_dec;\n"
-"integer_hex\n"
-" '0' .emit '0' .and integer_hex_1 .emit * .and digit_hex .emit * .and\n"
-" .loop digit_hex .emit *;\n"
-"integer_hex_1\n"
-" 'x' .or 'X';\n"
-"integer_oct\n"
-" '0' .emit '0' .and .loop digit_oct .emit *;\n"
-"integer_dec\n"
-" digit_dec .emit * .and .loop digit_dec .emit *;\n"
-"increment\n"
-" '+' .emit * .and '+' .emit *;\n"
-"decrement\n"
-" '-' .emit * .and '-' .emit *;\n"
-"lequal\n"
-" '<' .emit * .and '=' .emit *;\n"
-"gequal\n"
-" '>' .emit * .and '=' .emit *;\n"
-"equal\n"
-" '=' .emit * .and '=' .emit *;\n"
-"nequal\n"
-" '!' .emit * .and '=' .emit *;\n"
-"and\n"
-" '&' .emit * .and '&' .emit *;\n"
-"xor\n"
-" '^' .emit * .and '^' .emit *;\n"
-"or\n"
-" '|' .emit * .and '|' .emit *;\n"
-"addto\n"
-" '+' .emit * .and '=' .emit *;\n"
-"subtractfrom\n"
-" '-' .emit * .and '=' .emit *;\n"
-"multiplyto\n"
-" '*' .emit * .and '=' .emit *;\n"
-"divideto\n"
-" '/' .emit * .and '=' .emit *;\n"
-"other\n"
-" '\\x24'-'\\xFF' .emit * .or '\\x01'-'\\x22' .emit *;\n"
-"symbol_character\n"
-" 'A'-'Z' .or 'a'-'z' .or '_';\n"
-"symbol_character2\n"
-" 'A'-'Z' .or 'a'-'z' .or '0'-'9' .or '_';\n"
-".string string_lexer;\n"
-"string_lexer\n"
-" lex_first_identifier_character .and .loop lex_next_identifier_character;\n"
-"lex_first_identifier_character\n"
-" 'a'-'z' .or 'A'-'Z' .or '_';\n"
-"lex_next_identifier_character\n"
-" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n"
-""
diff --git a/src/mesa/shader/slang/library/slang_pp_expression.syn b/src/mesa/shader/slang/library/slang_pp_expression.syn
deleted file mode 100644
index bfdb220bf5c..00000000000
--- a/src/mesa/shader/slang/library/slang_pp_expression.syn
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.6
- *
- * Copyright (C) 2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_pp_expression.syn
- * slang preprocessor expression parser
- * \author Michal Krol
- */
-
-/*
- * Parses one or two (optional) expressions on literal integer constants. Those expressions come
- * from #if #elif and #line directives. The preprocessor already parsed those directives and
- * expanded the expression (expressions). All occurences of the operator "defined" are already
- * replaced with either "0" or "1" literals.
- */
-
-.syntax expression;
-
-/*
- * Those separate individual expressions.
- * For #if/#elif case it is: EXP_EXPRESSION ... EXP_END
- * For #line case it may be: EXP_EXPRESSION ... EXP_EXPRESSION ... EXP_END
- */
-.emtcode EXP_END 0
-.emtcode EXP_EXPRESSION 1
-
-.emtcode OP_END 0
-.emtcode OP_PUSHINT 1
-.emtcode OP_LOGICALOR 2
-.emtcode OP_LOGICALAND 3
-.emtcode OP_OR 4
-.emtcode OP_XOR 5
-.emtcode OP_AND 6
-.emtcode OP_EQUAL 7
-.emtcode OP_NOTEQUAL 8
-.emtcode OP_LESSEQUAL 9
-.emtcode OP_GREATEREQUAL 10
-.emtcode OP_LESS 11
-.emtcode OP_GREATER 12
-.emtcode OP_LEFTSHIFT 13
-.emtcode OP_RIGHTSHIFT 14
-.emtcode OP_ADD 15
-.emtcode OP_SUBTRACT 16
-.emtcode OP_MULTIPLY 17
-.emtcode OP_DIVIDE 18
-.emtcode OP_MODULUS 19
-.emtcode OP_PLUS 20
-.emtcode OP_MINUS 21
-.emtcode OP_NEGATE 22
-.emtcode OP_COMPLEMENT 23
-
-expression
- first_expression .and optional_second_expression .and optional_space .and '\0' .emit EXP_END;
-
-first_expression
- optional_space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END;
-
-optional_second_expression
- second_expression .or .true;
-
-second_expression
- space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END;
-
-logical_or_expression
- logical_and_expression .and .loop logical_or_expression_1;
-logical_or_expression_1
- barbar .and logical_and_expression .and .true .emit OP_LOGICALOR;
-
-logical_and_expression
- or_expression .and .loop logical_and_expression_1;
-logical_and_expression_1
- ampersandampersand .and or_expression .and .true .emit OP_LOGICALAND;
-
-or_expression
- xor_expression .and .loop or_expression_1;
-or_expression_1
- bar .and xor_expression .and .true .emit OP_OR;
-
-xor_expression
- and_expression .and .loop xor_expression_1;
-xor_expression_1
- caret .and and_expression .and .true .emit OP_XOR;
-
-and_expression
- equality_expression .and .loop and_expression_1;
-and_expression_1
- ampersand .and equality_expression .and .true .emit OP_AND;
-
-equality_expression
- relational_expression .and .loop equality_expression_1;
-equality_expression_1
- equality_expression_2 .or equality_expression_3;
-equality_expression_2
- equalsequals .and relational_expression .and .true .emit OP_EQUAL;
-equality_expression_3
- bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;
-
-relational_expression
- shift_expression .and .loop relational_expression_1;
-relational_expression_1
- relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or
- relational_expression_5;
-relational_expression_2
- lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;
-relational_expression_3
- greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;
-relational_expression_4
- less .and shift_expression .and .true .emit OP_LESS;
-relational_expression_5
- greater .and shift_expression .and .true .emit OP_GREATER;
-
-shift_expression
- additive_expression .and .loop shift_expression_1;
-shift_expression_1
- shift_expression_2 .or shift_expression_3;
-shift_expression_2
- lessless .and additive_expression .and .true .emit OP_LEFTSHIFT;
-shift_expression_3
- greatergreater .and additive_expression .and .true .emit OP_RIGHTSHIFT;
-
-additive_expression
- multiplicative_expression .and .loop additive_expression_1;
-additive_expression_1
- additive_expression_2 .or additive_expression_3;
-additive_expression_2
- plus .and multiplicative_expression .and .true .emit OP_ADD;
-additive_expression_3
- dash .and multiplicative_expression .and .true .emit OP_SUBTRACT;
-
-multiplicative_expression
- unary_expression .and .loop multiplicative_expression_1;
-multiplicative_expression_1
- multiplicative_expression_2 .or multiplicative_expression_3 .or multiplicative_expression_4;
-multiplicative_expression_2
- star .and unary_expression .and .true .emit OP_MULTIPLY;
-multiplicative_expression_3
- slash .and unary_expression .and .true .emit OP_DIVIDE;
-multiplicative_expression_4
- percent .and unary_expression .and .true .emit OP_MODULUS;
-
-unary_expression
- primary_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or
- unary_expression_4;
-unary_expression_1
- plus .and unary_expression .and .true .emit OP_PLUS;
-unary_expression_2
- dash .and unary_expression .and .true .emit OP_MINUS;
-unary_expression_3
- bang .and unary_expression .and .true .emit OP_NEGATE;
-unary_expression_4
- tilda .and unary_expression .and .true .emit OP_COMPLEMENT;
-
-primary_expression
- intconstant .or primary_expression_1;
-primary_expression_1
- lparen .and logical_or_expression .and rparen;
-
-intconstant
- integer .emit OP_PUSHINT;
-
-integer
- integer_dec;
-
-integer_dec
- digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\0';
-
-digit_dec
- '0'-'9';
-
-optional_space
- .loop single_space;
-
-space
- single_space .and .loop single_space;
-
-single_space
- ' ' .or '\t';
-
-ampersand
- optional_space .and '&' .and optional_space;
-
-ampersandampersand
- optional_space .and '&' .and '&' .and optional_space;
-
-bang
- optional_space .and '!' .and optional_space;
-
-bangequals
- optional_space .and '!' .and '=' .and optional_space;
-
-bar
- optional_space .and '|' .and optional_space;
-
-barbar
- optional_space .and '|' .and '|' .and optional_space;
-
-caret
- optional_space .and '^' .and optional_space;
-
-dash
- optional_space .and '-' .and optional_space;
-
-equalsequals
- optional_space .and '=' .and '=' .and optional_space;
-
-greater
- optional_space .and '>' .and optional_space;
-
-greaterequals
- optional_space .and '>' .and '=' .and optional_space;
-
-greatergreater
- optional_space .and '>' .and '>' .and optional_space;
-
-less
- optional_space .and '<' .and optional_space;
-
-lessequals
- optional_space .and '<' .and '=' .and optional_space;
-
-lessless
- optional_space .and '<' .and '<' .and optional_space;
-
-lparen
- optional_space .and '(' .and optional_space;
-
-percent
- optional_space .and '%' .and optional_space;
-
-plus
- optional_space .and '+' .and optional_space;
-
-rparen
- optional_space .and ')' .and optional_space;
-
-slash
- optional_space .and '/' .and optional_space;
-
-star
- optional_space .and '*' .and optional_space;
-
-tilda
- optional_space .and '~' .and optional_space;
-
diff --git a/src/mesa/shader/slang/library/slang_pp_expression_syn.h b/src/mesa/shader/slang/library/slang_pp_expression_syn.h
deleted file mode 100644
index f3e9ef6b229..00000000000
--- a/src/mesa/shader/slang/library/slang_pp_expression_syn.h
+++ /dev/null
@@ -1,179 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */
-
-".syntax expression;\n"
-".emtcode EXP_END 0\n"
-".emtcode EXP_EXPRESSION 1\n"
-".emtcode OP_END 0\n"
-".emtcode OP_PUSHINT 1\n"
-".emtcode OP_LOGICALOR 2\n"
-".emtcode OP_LOGICALAND 3\n"
-".emtcode OP_OR 4\n"
-".emtcode OP_XOR 5\n"
-".emtcode OP_AND 6\n"
-".emtcode OP_EQUAL 7\n"
-".emtcode OP_NOTEQUAL 8\n"
-".emtcode OP_LESSEQUAL 9\n"
-".emtcode OP_GREATEREQUAL 10\n"
-".emtcode OP_LESS 11\n"
-".emtcode OP_GREATER 12\n"
-".emtcode OP_LEFTSHIFT 13\n"
-".emtcode OP_RIGHTSHIFT 14\n"
-".emtcode OP_ADD 15\n"
-".emtcode OP_SUBTRACT 16\n"
-".emtcode OP_MULTIPLY 17\n"
-".emtcode OP_DIVIDE 18\n"
-".emtcode OP_MODULUS 19\n"
-".emtcode OP_PLUS 20\n"
-".emtcode OP_MINUS 21\n"
-".emtcode OP_NEGATE 22\n"
-".emtcode OP_COMPLEMENT 23\n"
-"expression\n"
-" first_expression .and optional_second_expression .and optional_space .and '\\0' .emit EXP_END;\n"
-"first_expression\n"
-" optional_space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END;\n"
-"optional_second_expression\n"
-" second_expression .or .true;\n"
-"second_expression\n"
-" space .and logical_or_expression .emit EXP_EXPRESSION .and .true .emit OP_END;\n"
-"logical_or_expression\n"
-" logical_and_expression .and .loop logical_or_expression_1;\n"
-"logical_or_expression_1\n"
-" barbar .and logical_and_expression .and .true .emit OP_LOGICALOR;\n"
-"logical_and_expression\n"
-" or_expression .and .loop logical_and_expression_1;\n"
-"logical_and_expression_1\n"
-" ampersandampersand .and or_expression .and .true .emit OP_LOGICALAND;\n"
-"or_expression\n"
-" xor_expression .and .loop or_expression_1;\n"
-"or_expression_1\n"
-" bar .and xor_expression .and .true .emit OP_OR;\n"
-"xor_expression\n"
-" and_expression .and .loop xor_expression_1;\n"
-"xor_expression_1\n"
-" caret .and and_expression .and .true .emit OP_XOR;\n"
-"and_expression\n"
-" equality_expression .and .loop and_expression_1;\n"
-"and_expression_1\n"
-" ampersand .and equality_expression .and .true .emit OP_AND;\n"
-"equality_expression\n"
-" relational_expression .and .loop equality_expression_1;\n"
-"equality_expression_1\n"
-" equality_expression_2 .or equality_expression_3;\n"
-"equality_expression_2\n"
-" equalsequals .and relational_expression .and .true .emit OP_EQUAL;\n"
-"equality_expression_3\n"
-" bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;\n"
-"relational_expression\n"
-" shift_expression .and .loop relational_expression_1;\n"
-"relational_expression_1\n"
-" relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or\n"
-" relational_expression_5;\n"
-"relational_expression_2\n"
-" lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;\n"
-"relational_expression_3\n"
-" greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;\n"
-"relational_expression_4\n"
-" less .and shift_expression .and .true .emit OP_LESS;\n"
-"relational_expression_5\n"
-" greater .and shift_expression .and .true .emit OP_GREATER;\n"
-"shift_expression\n"
-" additive_expression .and .loop shift_expression_1;\n"
-"shift_expression_1\n"
-" shift_expression_2 .or shift_expression_3;\n"
-"shift_expression_2\n"
-" lessless .and additive_expression .and .true .emit OP_LEFTSHIFT;\n"
-"shift_expression_3\n"
-" greatergreater .and additive_expression .and .true .emit OP_RIGHTSHIFT;\n"
-"additive_expression\n"
-" multiplicative_expression .and .loop additive_expression_1;\n"
-"additive_expression_1\n"
-" additive_expression_2 .or additive_expression_3;\n"
-"additive_expression_2\n"
-" plus .and multiplicative_expression .and .true .emit OP_ADD;\n"
-"additive_expression_3\n"
-" dash .and multiplicative_expression .and .true .emit OP_SUBTRACT;\n"
-"multiplicative_expression\n"
-" unary_expression .and .loop multiplicative_expression_1;\n"
-"multiplicative_expression_1\n"
-" multiplicative_expression_2 .or multiplicative_expression_3 .or multiplicative_expression_4;\n"
-"multiplicative_expression_2\n"
-" star .and unary_expression .and .true .emit OP_MULTIPLY;\n"
-"multiplicative_expression_3\n"
-" slash .and unary_expression .and .true .emit OP_DIVIDE;\n"
-"multiplicative_expression_4\n"
-" percent .and unary_expression .and .true .emit OP_MODULUS;\n"
-"unary_expression\n"
-" primary_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or\n"
-" unary_expression_4;\n"
-"unary_expression_1\n"
-" plus .and unary_expression .and .true .emit OP_PLUS;\n"
-"unary_expression_2\n"
-" dash .and unary_expression .and .true .emit OP_MINUS;\n"
-"unary_expression_3\n"
-" bang .and unary_expression .and .true .emit OP_NEGATE;\n"
-"unary_expression_4\n"
-" tilda .and unary_expression .and .true .emit OP_COMPLEMENT;\n"
-"primary_expression\n"
-" intconstant .or primary_expression_1;\n"
-"primary_expression_1\n"
-" lparen .and logical_or_expression .and rparen;\n"
-"intconstant\n"
-" integer .emit OP_PUSHINT;\n"
-"integer\n"
-" integer_dec;\n"
-"integer_dec\n"
-" digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
-"digit_dec\n"
-" '0'-'9';\n"
-"optional_space\n"
-" .loop single_space;\n"
-"space\n"
-" single_space .and .loop single_space;\n"
-"single_space\n"
-" ' ' .or '\\t';\n"
-"ampersand\n"
-" optional_space .and '&' .and optional_space;\n"
-"ampersandampersand\n"
-" optional_space .and '&' .and '&' .and optional_space;\n"
-"bang\n"
-" optional_space .and '!' .and optional_space;\n"
-"bangequals\n"
-" optional_space .and '!' .and '=' .and optional_space;\n"
-"bar\n"
-" optional_space .and '|' .and optional_space;\n"
-"barbar\n"
-" optional_space .and '|' .and '|' .and optional_space;\n"
-"caret\n"
-" optional_space .and '^' .and optional_space;\n"
-"dash\n"
-" optional_space .and '-' .and optional_space;\n"
-"equalsequals\n"
-" optional_space .and '=' .and '=' .and optional_space;\n"
-"greater\n"
-" optional_space .and '>' .and optional_space;\n"
-"greaterequals\n"
-" optional_space .and '>' .and '=' .and optional_space;\n"
-"greatergreater\n"
-" optional_space .and '>' .and '>' .and optional_space;\n"
-"less\n"
-" optional_space .and '<' .and optional_space;\n"
-"lessequals\n"
-" optional_space .and '<' .and '=' .and optional_space;\n"
-"lessless\n"
-" optional_space .and '<' .and '<' .and optional_space;\n"
-"lparen\n"
-" optional_space .and '(' .and optional_space;\n"
-"percent\n"
-" optional_space .and '%' .and optional_space;\n"
-"plus\n"
-" optional_space .and '+' .and optional_space;\n"
-"rparen\n"
-" optional_space .and ')' .and optional_space;\n"
-"slash\n"
-" optional_space .and '/' .and optional_space;\n"
-"star\n"
-" optional_space .and '*' .and optional_space;\n"
-"tilda\n"
-" optional_space .and '~' .and optional_space;\n"
-""
diff --git a/src/mesa/shader/slang/library/slang_pp_version.syn b/src/mesa/shader/slang/library/slang_pp_version.syn
deleted file mode 100644
index 3fe1a57ba2c..00000000000
--- a/src/mesa/shader/slang/library/slang_pp_version.syn
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.6
- *
- * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_pp_version.syn
- * slang #version directive syntax
- * \author Michal Krol
- */
-
-.syntax version_directive;
-
-version_directive
- version_directive_1;
-version_directive_1
- prior_optional_spaces .and optional_version_directive .and .true .emit $;
-
-optional_version_directive
- version_directive_body .or .true .emit 10 .emit 1;
-
-version_directive_body
- '#' .and optional_space .and "version" .and space .and version_number .and optional_space .and
- new_line;
-
-version_number
- version_number_100 .or version_number_110 .or version_number_120;
-
-version_number_100
- leading_zeroes .and "100" .emit 0 .emit 1;
-
-version_number_110
- leading_zeroes .and "110" .emit 10 .emit 1;
-
-version_number_120
- leading_zeroes .and "120" .emit 20 .emit 1;
-
-leading_zeroes
- .loop zero;
-
-zero
- '0';
-
-space
- single_space .and .loop single_space;
-
-optional_space
- .loop single_space;
-
-single_space
- ' ' .or '\t';
-
-prior_optional_spaces
- .loop prior_space;
-
-prior_space
- c_style_comment_block .or cpp_style_comment_block .or space .or new_line;
-
-c_style_comment_block
- '/' .and '*' .and c_style_comment_rest;
-
-c_style_comment_rest
- .loop c_style_comment_char_no_star .and c_style_comment_rest_1;
-c_style_comment_rest_1
- c_style_comment_end .or c_style_comment_rest_2;
-c_style_comment_rest_2
- '*' .and c_style_comment_rest;
-
-c_style_comment_char_no_star
- '\x2B'-'\xFF' .or '\x01'-'\x29';
-
-c_style_comment_end
- '*' .and '/';
-
-cpp_style_comment_block
- '/' .and '/' .and cpp_style_comment_block_1;
-cpp_style_comment_block_1
- cpp_style_comment_block_2 .or cpp_style_comment_block_3;
-cpp_style_comment_block_2
- .loop cpp_style_comment_char .and new_line;
-cpp_style_comment_block_3
- .loop cpp_style_comment_char;
-
-cpp_style_comment_char
- '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
-
-new_line
- cr_lf .or lf_cr .or '\n' .or '\r';
-
-cr_lf
- '\r' .and '\n';
-
-lf_cr
- '\n' .and '\r';
-
-.string __string_filter;
-
-__string_filter
- .loop __identifier_char;
-
-__identifier_char
- 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';
-
diff --git a/src/mesa/shader/slang/library/slang_pp_version_syn.h b/src/mesa/shader/slang/library/slang_pp_version_syn.h
deleted file mode 100644
index 54aee3ff282..00000000000
--- a/src/mesa/shader/slang/library/slang_pp_version_syn.h
+++ /dev/null
@@ -1,69 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */
-
-".syntax version_directive;\n"
-"version_directive\n"
-" version_directive_1;\n"
-"version_directive_1\n"
-" prior_optional_spaces .and optional_version_directive .and .true .emit $;\n"
-"optional_version_directive\n"
-" version_directive_body .or .true .emit 10 .emit 1;\n"
-"version_directive_body\n"
-" '#' .and optional_space .and \"version\" .and space .and version_number .and optional_space .and\n"
-" new_line;\n"
-"version_number\n"
-" version_number_100 .or version_number_110 .or version_number_120;\n"
-"version_number_100\n"
-" leading_zeroes .and \"100\" .emit 0 .emit 1;\n"
-"version_number_110\n"
-" leading_zeroes .and \"110\" .emit 10 .emit 1;\n"
-"version_number_120\n"
-" leading_zeroes .and \"120\" .emit 20 .emit 1;\n"
-"leading_zeroes\n"
-" .loop zero;\n"
-"zero\n"
-" '0';\n"
-"space\n"
-" single_space .and .loop single_space;\n"
-"optional_space\n"
-" .loop single_space;\n"
-"single_space\n"
-" ' ' .or '\\t';\n"
-"prior_optional_spaces\n"
-" .loop prior_space;\n"
-"prior_space\n"
-" c_style_comment_block .or cpp_style_comment_block .or space .or new_line;\n"
-"c_style_comment_block\n"
-" '/' .and '*' .and c_style_comment_rest;\n"
-"c_style_comment_rest\n"
-" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n"
-"c_style_comment_rest_1\n"
-" c_style_comment_end .or c_style_comment_rest_2;\n"
-"c_style_comment_rest_2\n"
-" '*' .and c_style_comment_rest;\n"
-"c_style_comment_char_no_star\n"
-" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"
-"c_style_comment_end\n"
-" '*' .and '/';\n"
-"cpp_style_comment_block\n"
-" '/' .and '/' .and cpp_style_comment_block_1;\n"
-"cpp_style_comment_block_1\n"
-" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n"
-"cpp_style_comment_block_2\n"
-" .loop cpp_style_comment_char .and new_line;\n"
-"cpp_style_comment_block_3\n"
-" .loop cpp_style_comment_char;\n"
-"cpp_style_comment_char\n"
-" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
-"new_line\n"
-" cr_lf .or lf_cr .or '\\n' .or '\\r';\n"
-"cr_lf\n"
-" '\\r' .and '\\n';\n"
-"lf_cr\n"
-" '\\n' .and '\\r';\n"
-".string __string_filter;\n"
-"__string_filter\n"
-" .loop __identifier_char;\n"
-"__identifier_char\n"
-" 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';\n"
-""
diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn
deleted file mode 100644
index cc5c70a02f8..00000000000
--- a/src/mesa/shader/slang/library/slang_shader.syn
+++ /dev/null
@@ -1,1716 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2004-2006 Brian Paul All Rights Reserved.
- * Copyright (C) 2008 VMware, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * \file slang_shader.syn
- * slang vertex/fragment shader syntax
- * \author Michal Krol
- */
-
-/*
- * usage:
- * syn2c slang_shader.syn > slang_shader_syn.h
- *
- * when modifying or extending this file, several things must be taken into
- * consideration:
- *
- * - when adding new operators that were marked as reserved in the
- * initial specification, one must only uncomment particular lines of
- * code that refer to operators being added;
- *
- * - when adding new shader targets, one must reserve a new value for
- * shader_type register and use it in .if constructs for symbols that
- * are exclusive for that shader;
- *
- * - some symbols mimic output of other symbols - the best example is
- * the "for" construct: expression "for (foo(); ; bar())" is seen as
- * "for (foo(); true; bar())" by the output processor - hence, special
- * care must be taken when rearranging output of essential symbols;
- *
- * - order of single-quoted tokens does matter in alternatives - so do not
- * parse "<" operator before "<<" and "<<" before "<<=";
- *
- * - all double-quoted tokens are internally preprocessed to eliminate
- * problems with parsing strings that are prefixes of other strings,
- * like "sampler1D" and "sampler1DShadow";
- */
-
-.syntax translation_unit;
-
-/* revision number - increment after each change affecting emitted output */
-.emtcode REVISION 5
-
-/* external declaration (or precision or invariant stmt) */
-.emtcode EXTERNAL_NULL 0
-.emtcode EXTERNAL_FUNCTION_DEFINITION 1
-.emtcode EXTERNAL_DECLARATION 2
-.emtcode DEFAULT_PRECISION 3
-.emtcode INVARIANT_STMT 4
-
-/* precision */
-.emtcode PRECISION_DEFAULT 0
-.emtcode PRECISION_LOW 1
-.emtcode PRECISION_MEDIUM 2
-.emtcode PRECISION_HIGH 3
-
-/* declaration */
-.emtcode DECLARATION_FUNCTION_PROTOTYPE 1
-.emtcode DECLARATION_INIT_DECLARATOR_LIST 2
-
-/* function type */
-.emtcode FUNCTION_ORDINARY 0
-.emtcode FUNCTION_CONSTRUCTOR 1
-.emtcode FUNCTION_OPERATOR 2
-
-/* function call type */
-.emtcode FUNCTION_CALL_NONARRAY 0
-.emtcode FUNCTION_CALL_ARRAY 1
-
-/* operator type */
-.emtcode OPERATOR_ADDASSIGN 1
-.emtcode OPERATOR_SUBASSIGN 2
-.emtcode OPERATOR_MULASSIGN 3
-.emtcode OPERATOR_DIVASSIGN 4
-/*.emtcode OPERATOR_MODASSIGN 5*/
-/*.emtcode OPERATOR_LSHASSIGN 6*/
-/*.emtcode OPERATOR_RSHASSIGN 7*/
-/*.emtcode OPERATOR_ORASSIGN 8*/
-/*.emtcode OPERATOR_XORASSIGN 9*/
-/*.emtcode OPERATOR_ANDASSIGN 10*/
-.emtcode OPERATOR_LOGICALXOR 11
-/*.emtcode OPERATOR_BITOR 12*/
-/*.emtcode OPERATOR_BITXOR 13*/
-/*.emtcode OPERATOR_BITAND 14*/
-.emtcode OPERATOR_LESS 15
-.emtcode OPERATOR_GREATER 16
-.emtcode OPERATOR_LESSEQUAL 17
-.emtcode OPERATOR_GREATEREQUAL 18
-/*.emtcode OPERATOR_LSHIFT 19*/
-/*.emtcode OPERATOR_RSHIFT 20*/
-.emtcode OPERATOR_MULTIPLY 21
-.emtcode OPERATOR_DIVIDE 22
-/*.emtcode OPERATOR_MODULUS 23*/
-.emtcode OPERATOR_INCREMENT 24
-.emtcode OPERATOR_DECREMENT 25
-.emtcode OPERATOR_PLUS 26
-.emtcode OPERATOR_MINUS 27
-/*.emtcode OPERATOR_COMPLEMENT 28*/
-.emtcode OPERATOR_NOT 29
-
-/* init declarator list */
-.emtcode DECLARATOR_NONE 0
-.emtcode DECLARATOR_NEXT 1
-
-/* variable declaration */
-.emtcode VARIABLE_NONE 0
-.emtcode VARIABLE_IDENTIFIER 1
-.emtcode VARIABLE_INITIALIZER 2
-.emtcode VARIABLE_ARRAY_EXPLICIT 3
-.emtcode VARIABLE_ARRAY_UNKNOWN 4
-
-/* type qualifier */
-.emtcode TYPE_QUALIFIER_NONE 0
-.emtcode TYPE_QUALIFIER_CONST 1
-.emtcode TYPE_QUALIFIER_ATTRIBUTE 2
-.emtcode TYPE_QUALIFIER_VARYING 3
-.emtcode TYPE_QUALIFIER_UNIFORM 4
-.emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5
-.emtcode TYPE_QUALIFIER_FIXEDINPUT 6
-
-/* invariant qualifier */
-.emtcode TYPE_VARIANT 90
-.emtcode TYPE_INVARIANT 91
-
-/* centroid qualifier */
-.emtcode TYPE_CENTER 95
-.emtcode TYPE_CENTROID 96
-
-/* type specifier */
-.emtcode TYPE_SPECIFIER_VOID 0
-.emtcode TYPE_SPECIFIER_BOOL 1
-.emtcode TYPE_SPECIFIER_BVEC2 2
-.emtcode TYPE_SPECIFIER_BVEC3 3
-.emtcode TYPE_SPECIFIER_BVEC4 4
-.emtcode TYPE_SPECIFIER_INT 5
-.emtcode TYPE_SPECIFIER_IVEC2 6
-.emtcode TYPE_SPECIFIER_IVEC3 7
-.emtcode TYPE_SPECIFIER_IVEC4 8
-.emtcode TYPE_SPECIFIER_FLOAT 9
-.emtcode TYPE_SPECIFIER_VEC2 10
-.emtcode TYPE_SPECIFIER_VEC3 11
-.emtcode TYPE_SPECIFIER_VEC4 12
-.emtcode TYPE_SPECIFIER_MAT2 13
-.emtcode TYPE_SPECIFIER_MAT3 14
-.emtcode TYPE_SPECIFIER_MAT4 15
-.emtcode TYPE_SPECIFIER_SAMPLER1D 16
-.emtcode TYPE_SPECIFIER_SAMPLER2D 17
-.emtcode TYPE_SPECIFIER_SAMPLER3D 18
-.emtcode TYPE_SPECIFIER_SAMPLERCUBE 19
-.emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20
-.emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21
-.emtcode TYPE_SPECIFIER_SAMPLER2DRECT 22
-.emtcode TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23
-.emtcode TYPE_SPECIFIER_STRUCT 24
-.emtcode TYPE_SPECIFIER_TYPENAME 25
-
-/* OpenGL 2.1 */
-.emtcode TYPE_SPECIFIER_MAT23 26
-.emtcode TYPE_SPECIFIER_MAT32 27
-.emtcode TYPE_SPECIFIER_MAT24 28
-.emtcode TYPE_SPECIFIER_MAT42 29
-.emtcode TYPE_SPECIFIER_MAT34 30
-.emtcode TYPE_SPECIFIER_MAT43 31
-
-/* type specifier array */
-.emtcode TYPE_SPECIFIER_NONARRAY 0
-.emtcode TYPE_SPECIFIER_ARRAY 1
-
-/* structure field */
-.emtcode FIELD_NONE 0
-.emtcode FIELD_NEXT 1
-.emtcode FIELD_ARRAY 2
-
-/* operation */
-.emtcode OP_END 0
-.emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1
-.emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2
-.emtcode OP_DECLARE 3
-.emtcode OP_ASM 4
-.emtcode OP_BREAK 5
-.emtcode OP_CONTINUE 6
-.emtcode OP_DISCARD 7
-.emtcode OP_RETURN 8
-.emtcode OP_EXPRESSION 9
-.emtcode OP_IF 10
-.emtcode OP_WHILE 11
-.emtcode OP_DO 12
-.emtcode OP_FOR 13
-.emtcode OP_PUSH_VOID 14
-.emtcode OP_PUSH_BOOL 15
-.emtcode OP_PUSH_INT 16
-.emtcode OP_PUSH_FLOAT 17
-.emtcode OP_PUSH_IDENTIFIER 18
-.emtcode OP_SEQUENCE 19
-.emtcode OP_ASSIGN 20
-.emtcode OP_ADDASSIGN 21
-.emtcode OP_SUBASSIGN 22
-.emtcode OP_MULASSIGN 23
-.emtcode OP_DIVASSIGN 24
-/*.emtcode OP_MODASSIGN 25*/
-/*.emtcode OP_LSHASSIGN 26*/
-/*.emtcode OP_RSHASSIGN 27*/
-/*.emtcode OP_ORASSIGN 28*/
-/*.emtcode OP_XORASSIGN 29*/
-/*.emtcode OP_ANDASSIGN 30*/
-.emtcode OP_SELECT 31
-.emtcode OP_LOGICALOR 32
-.emtcode OP_LOGICALXOR 33
-.emtcode OP_LOGICALAND 34
-/*.emtcode OP_BITOR 35*/
-/*.emtcode OP_BITXOR 36*/
-/*.emtcode OP_BITAND 37*/
-.emtcode OP_EQUAL 38
-.emtcode OP_NOTEQUAL 39
-.emtcode OP_LESS 40
-.emtcode OP_GREATER 41
-.emtcode OP_LESSEQUAL 42
-.emtcode OP_GREATEREQUAL 43
-/*.emtcode OP_LSHIFT 44*/
-/*.emtcode OP_RSHIFT 45*/
-.emtcode OP_ADD 46
-.emtcode OP_SUBTRACT 47
-.emtcode OP_MULTIPLY 48
-.emtcode OP_DIVIDE 49
-/*.emtcode OP_MODULUS 50*/
-.emtcode OP_PREINCREMENT 51
-.emtcode OP_PREDECREMENT 52
-.emtcode OP_PLUS 53
-.emtcode OP_MINUS 54
-/*.emtcode OP_COMPLEMENT 55*/
-.emtcode OP_NOT 56
-.emtcode OP_SUBSCRIPT 57
-.emtcode OP_CALL 58
-.emtcode OP_FIELD 59
-.emtcode OP_POSTINCREMENT 60
-.emtcode OP_POSTDECREMENT 61
-.emtcode OP_PRECISION 62
-.emtcode OP_METHOD 63
-
-/* parameter qualifier */
-.emtcode PARAM_QUALIFIER_IN 0
-.emtcode PARAM_QUALIFIER_OUT 1
-.emtcode PARAM_QUALIFIER_INOUT 2
-
-/* function parameter */
-.emtcode PARAMETER_NONE 0
-.emtcode PARAMETER_NEXT 1
-
-/* function parameter array presence */
-.emtcode PARAMETER_ARRAY_NOT_PRESENT 0
-.emtcode PARAMETER_ARRAY_PRESENT 1
-
-/* INVALID_EXTERNAL_DECLARATION seems to be reported when there's */
-/* any syntax errors... */
-.errtext INVALID_EXTERNAL_DECLARATION "2001: Syntax error."
-.errtext INVALID_OPERATOR_OVERRIDE "2002: Invalid operator override."
-.errtext LBRACE_EXPECTED "2003: '{' expected but '$err_token$' found."
-.errtext LPAREN_EXPECTED "2004: '(' expected but '$err_token$' found."
-.errtext RPAREN_EXPECTED "2005: ')' expected but '$err_token$' found."
-.errtext INVALID_PRECISION "2006: Invalid precision specifier '$err_token$'."
-.errtext INVALID_PRECISION_TYPE "2007: Invalid precision type '$err_token$'."
-
-
-/*
- * tells whether the shader that is being parsed is a built-in shader or not
- * 0 - normal behaviour
- * 1 - accepts constructor and operator definitions and __asm statements
- * the implementation will set it to 1 when compiling internal built-in shaders
- */
-.regbyte parsing_builtin 0
-
-/*
- * holds the type of the shader being parsed; possible values are
- * listed below.
- * FRAGMENT_SHADER 1
- * VERTEX_SHADER 2
- * shader type is set by the caller before parsing
- */
-.regbyte shader_type 0
-
-/*
- * <variable_identifier> ::= <identifier>
- */
-variable_identifier
- identifier .emit OP_PUSH_IDENTIFIER;
-
-/*
- * <primary_expression> ::= <variable_identifier>
- * | <intconstant>
- * | <floatconstant>
- * | <boolconstant>
- * | "(" <expression> ")"
- */
-primary_expression
- floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1;
-primary_expression_1
- lparen .and expression .and rparen;
-
-/*
- * <postfix_expression> ::= <primary_expression>
- * | <postfix_expression> "[" <integer_expression> "]"
- * | <function_call>
- * | <postfix_expression> "." <field_selection>
- * | <postfix_expression> "++"
- * | <postfix_expression> "--"
- */
-postfix_expression
- postfix_expression_1 .and .loop postfix_expression_2;
-postfix_expression_1
- function_call .or primary_expression;
-postfix_expression_2
- postfix_expression_3 .or postfix_expression_4 .or
- plusplus .emit OP_POSTINCREMENT .or
- minusminus .emit OP_POSTDECREMENT;
-postfix_expression_3
- lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT;
-postfix_expression_4
- dot .and field_selection .emit OP_FIELD;
-
-/*
- * <integer_expression> ::= <expression>
- */
-integer_expression
- expression;
-
-/*
- * <function_call> ::= <function_call_generic>
- */
-function_call
- function_call_or_method;
-
-/*
- * <function_call_or_method> ::= <regular_function_call>
- * | <postfix_expression> "." <function_call_generic>
- */
-function_call_or_method
- regular_function_call .or method_call;
-
-/*
- * <method_call> ::= <identifier> "." <function_call_generic>
- */
-method_call
- identifier .emit OP_METHOD .and dot .and function_call_generic .and .true .emit OP_END;
-
-/*
- * <regular_function_call> ::= <function_call_generic>
- */
-regular_function_call
- function_call_generic .emit OP_CALL .and .true .emit OP_END;
-
-/*
- * <function_call_generic> ::= <function_call_header_with_parameters> ")"
- * | <function_call_header_no_parameters> ")"
- */
-function_call_generic
- function_call_generic_1 .or function_call_generic_2;
-function_call_generic_1
- function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;
-function_call_generic_2
- function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;
-
-/*
- * <function_call_header_no_parameters>::= <function_call_header> "void"
- * | <function_call_header>
- */
-function_call_header_no_parameters
- function_call_header .and function_call_header_no_parameters_1;
-function_call_header_no_parameters_1
- "void" .or .true;
-
-/*
- * <function_call_header_with_parameters> ::= <function_call_header> <assignment_expression>
- * | <function_call_header_with_parameters> "," <assignment_expression>
- */
-function_call_header_with_parameters
- function_call_header .and assignment_expression .and .true .emit OP_END .and
- .loop function_call_header_with_parameters_1;
-function_call_header_with_parameters_1
- comma .and assignment_expression .and .true .emit OP_END;
-
-/*
- * <function_call_header> ::= <function_identifier> "("
- */
-function_call_header
- function_identifier .and lparen;
-
-/*
- * <function_identifier> ::= <constructor_identifier>
- * | <identifier>
- * | <type_specifier>
- *
- * note: <constructor_identifier> and <type_specifier> have been deleted
- */
-function_identifier
- identifier .and function_identifier_opt_array;
-function_identifier_opt_array
- function_identifier_array .emit FUNCTION_CALL_ARRAY .or
- .true .emit FUNCTION_CALL_NONARRAY;
-function_identifier_array
- lbracket .and constant_expression .and rbracket;
-
-/*
- * <unary_expression> ::= <postfix_expression>
- * | "++" <unary_expression>
- * | "--" <unary_expression>
- * | <unary_operator> <unary_expression>
- *
- * <unary_operator> ::= "+"
- * | "-"
- * | "!"
- * | "~" // reserved
- */
-unary_expression
- postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or
- unary_expression_4 .or unary_expression_5/* .or unary_expression_6*/;
-unary_expression_1
- plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;
-unary_expression_2
- minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;
-unary_expression_3
- plus .and unary_expression .and .true .emit OP_PLUS;
-unary_expression_4
- minus .and unary_expression .and .true .emit OP_MINUS;
-unary_expression_5
- bang .and unary_expression .and .true .emit OP_NOT;
-/*unary_expression_6
- tilde .and unary_expression .and .true .emit OP_COMPLEMENT;*/
-
-/*
- * <multiplicative_expression> ::= <unary_expression>
- * | <multiplicative_expression> "*" <unary_expression>
- * | <multiplicative_expression> "/" <unary_expression>
- * | <multiplicative_expression> "%" <unary_expression> // reserved
- */
-multiplicative_expression
- unary_expression .and .loop multiplicative_expression_1;
-multiplicative_expression_1
- multiplicative_expression_2 .or multiplicative_expression_3/* .or multiplicative_expression_4*/;
-multiplicative_expression_2
- star .and unary_expression .and .true .emit OP_MULTIPLY;
-multiplicative_expression_3
- slash .and unary_expression .and .true .emit OP_DIVIDE;
-/*multiplicative_expression_4
- percent .and unary_expression .and .true .emit OP_MODULUS;*/
-
-/*
- * <additive_expression> ::= <multiplicative_expression>
- * | <additive_expression> "+" <multiplicative_expression>
- * | <additive_expression> "-" <multiplicative_expression>
- */
-additive_expression
- multiplicative_expression .and .loop additive_expression_1;
-additive_expression_1
- additive_expression_2 .or additive_expression_3;
-additive_expression_2
- plus .and multiplicative_expression .and .true .emit OP_ADD;
-additive_expression_3
- minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;
-
-/*
- * <shift_expression> ::= <additive_expression>
- * | <shift_expression> "<<" <additive_expression> // reserved
- * | <shift_expression> ">>" <additive_expression> // reserved
- */
-shift_expression
- additive_expression/* .and .loop shift_expression_1*/;
-/*shift_expression_1
- shift_expression_2 .or shift_expression_3;*/
-/*shift_expression_2
- lessless .and additive_expression .and .true .emit OP_LSHIFT;*/
-/*shift_expression_3
- greatergreater .and additive_expression .and .true .emit OP_RSHIFT;*/
-
-/*
- * <relational_expression> ::= <shift_expression>
- * | <relational_expression> "<" <shift_expression>
- * | <relational_expression> ">" <shift_expression>
- * | <relational_expression> "<=" <shift_expression>
- * | <relational_expression> ">=" <shift_expression>
- */
-relational_expression
- shift_expression .and .loop relational_expression_1;
-relational_expression_1
- relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or
- relational_expression_5;
-relational_expression_2
- lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;
-relational_expression_3
- greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;
-relational_expression_4
- less .and shift_expression .and .true .emit OP_LESS;
-relational_expression_5
- greater .and shift_expression .and .true .emit OP_GREATER;
-
-/*
- * <equality_expression> ::= <relational_expression>
- * | <equality_expression> "==" <relational_expression>
- * | <equality_expression> "!=" <relational_expression>
- */
-equality_expression
- relational_expression .and .loop equality_expression_1;
-equality_expression_1
- equality_expression_2 .or equality_expression_3;
-equality_expression_2
- equalsequals .and relational_expression .and .true .emit OP_EQUAL;
-equality_expression_3
- bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;
-
-/*
- * <and_expression> ::= <equality_expression>
- * | <and_expression> "&" <equality_expression> // reserved
- */
-and_expression
- equality_expression/* .and .loop and_expression_1*/;
-/*and_expression_1
- ampersand .and equality_expression .and .true .emit OP_BITAND;*/
-
-/*
- * <exclusive_or_expression> ::= <and_expression>
- * | <exclusive_or_expression> "^" <and_expression> // reserved
- */
-exclusive_or_expression
- and_expression/* .and .loop exclusive_or_expression_1*/;
-/*exclusive_or_expression_1
- caret .and and_expression .and .true .emit OP_BITXOR;*/
-
-/*
- * <inclusive_or_expression> ::= <exclusive_or_expression>
- * | <inclusive_or_expression> "|" <exclusive_or_expression> // reserved
- */
-inclusive_or_expression
- exclusive_or_expression/* .and .loop inclusive_or_expression_1*/;
-/*inclusive_or_expression_1
- bar .and exclusive_or_expression .and .true .emit OP_BITOR;*/
-
-/*
- * <logical_and_expression> ::= <inclusive_or_expression>
- * | <logical_and_expression> "&&" <inclusive_or_expression>
- */
-logical_and_expression
- inclusive_or_expression .and .loop logical_and_expression_1;
-logical_and_expression_1
- ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;
-
-/*
- * <logical_xor_expression> ::= <logical_and_expression>
- * | <logical_xor_expression> "^^" <logical_and_expression>
- */
-logical_xor_expression
- logical_and_expression .and .loop logical_xor_expression_1;
-logical_xor_expression_1
- caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;
-
-/*
- * <logical_or_expression> ::= <logical_xor_expression>
- * | <logical_or_expression> "||" <logical_xor_expression>
- */
-logical_or_expression
- logical_xor_expression .and .loop logical_or_expression_1;
-logical_or_expression_1
- barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;
-
-/*
- * <conditional_expression> ::= <logical_or_expression>
- * | <logical_or_expression> "?" <expression> ":" <conditional_expression>
- */
-conditional_expression
- logical_or_expression .and .loop conditional_expression_1;
-conditional_expression_1
- question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;
-
-/*
- * <assignment_expression> ::= <conditional_expression>
- * | <unary_expression> <assignment_operator> <assignment_expression>
- *
- * <assignment_operator> ::= "="
- * | "*="
- * | "/="
- * | "+="
- * | "-="
- * | "%=" // reserved
- * | "<<=" // reserved
- * | ">>=" // reserved
- * | "&=" // reserved
- * | "^=" // reserved
- * | "|=" // reserved
- */
-assignment_expression
- assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or
- assignment_expression_4 .or assignment_expression_5/* .or assignment_expression_6 .or
- assignment_expression_7 .or assignment_expression_8 .or assignment_expression_9 .or
- assignment_expression_10 .or assignment_expression_11*/ .or conditional_expression;
-assignment_expression_1
- unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;
-assignment_expression_2
- unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;
-assignment_expression_3
- unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;
-assignment_expression_4
- unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;
-assignment_expression_5
- unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;
-/*assignment_expression_6
- unary_expression .and percentequals .and assignment_expression .and .true .emit OP_MODASSIGN;*/
-/*assignment_expression_7
- unary_expression .and lesslessequals .and assignment_expression .and .true .emit OP_LSHASSIGN;*/
-/*assignment_expression_8
- unary_expression .and greatergreaterequals .and assignment_expression .and
- .true .emit OP_RSHASSIGN;*/
-/*assignment_expression_9
- unary_expression .and ampersandequals .and assignment_expression .and .true .emit OP_ANDASSIGN;*/
-/*assignment_expression_10
- unary_expression .and caretequals .and assignment_expression .and .true .emit OP_XORASSIGN;*/
-/*assignment_expression_11
- unary_expression .and barequals .and assignment_expression .and .true .emit OP_ORASSIGN;*/
-
-/*
- * <expression> ::= <assignment_expression>
- * | <expression> "," <assignment_expression>
- */
-expression
- assignment_expression .and .loop expression_1;
-expression_1
- comma .and assignment_expression .and .true .emit OP_SEQUENCE;
-
-/*
- * <constant_expression> ::= <conditional_expression>
- */
-constant_expression
- conditional_expression .and .true .emit OP_END;
-
-/*
- * <declaration> ::= <function_prototype> ";"
- * | <init_declarator_list> ";"
- */
-declaration
- declaration_1 .or declaration_2;
-declaration_1
- function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;
-declaration_2
- init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;
-
-/*
- * <function_prototype> ::= <function_header> "void" ")"
- * | <function_declarator> ")"
- */
-function_prototype
- function_prototype_1 .or function_prototype_2;
-function_prototype_1
- function_header .and "void" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;
-function_prototype_2
- function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;
-
-/*
- * <function_declarator> ::= <function_header>
- * | <function_header_with_parameters>
- */
-function_declarator
- function_header_with_parameters .or function_header;
-
-/*
- * <function_header_with_parameters> ::= <function_header> <parameter_declaration>
- * | <function_header_with_parameters> ","
- * <parameter_declaration>
- */
-function_header_with_parameters
- function_header .and parameter_declaration .and .loop function_header_with_parameters_1;
-function_header_with_parameters_1
- comma .and parameter_declaration;
-
-/*
- * <function_header> ::= <fully_specified_type> <identifier> "("
- */
-function_header
- function_header_nospace .or function_header_space;
-function_header_space
- fully_specified_type_space .and space .and function_decl_identifier .and lparen;
-function_header_nospace
- fully_specified_type_nospace .and function_decl_identifier .and lparen;
-
-/*
- * <function_decl_identifier> ::= "__constructor"
- * | <__operator>
- * | <identifier>
- *
- * note: this is an extension to the standard language specification.
- * normally slang disallows operator and constructor prototypes and definitions
- */
-function_decl_identifier
- .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or
- .if (parsing_builtin != 0) "__constructor" .emit FUNCTION_CONSTRUCTOR .or
- identifier .emit FUNCTION_ORDINARY;
-
-/*
- * <__operator> ::= "__operator" <overriden_op>
- *
- * note: this is an extension to the standard language specification.
- * normally slang disallows operator prototypes and definitions
- */
-__operator
- "__operator" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE;
-
-/*
- * <overriden_op> ::= "="
- * | "+="
- * | "-="
- * | "*="
- * | "/="
- * | "%=" // reserved
- * | "<<=" // reserved
- * | ">>=" // reserved
- * | "&=" // reserved
- * | "^=" // reserved
- * | "|=" // reserved
- * | "^^"
- * | "|" // reserved
- * | "^" // reserved
- * | "&" // reserved
- * | "=="
- * | "!="
- * | "<"
- * | ">"
- * | "<="
- * | ">="
- * | "<<" // reserved
- * | ">>" // reserved
- * | "*"
- * | "/"
- * | "%" // reserved
- * | "++"
- * | "--"
- * | "+"
- * | "-"
- * | "~" // reserved
- * | "!"
- *
- * note: this is an extension to the standard language specification.
- * normally slang disallows operator prototypes and definitions
- */
-overriden_operator
- plusplus .emit OPERATOR_INCREMENT .or
- plusequals .emit OPERATOR_ADDASSIGN .or
- plus .emit OPERATOR_PLUS .or
- minusminus .emit OPERATOR_DECREMENT .or
- minusequals .emit OPERATOR_SUBASSIGN .or
- minus .emit OPERATOR_MINUS .or
- bang .emit OPERATOR_NOT .or
- starequals .emit OPERATOR_MULASSIGN .or
- star .emit OPERATOR_MULTIPLY .or
- slashequals .emit OPERATOR_DIVASSIGN .or
- slash .emit OPERATOR_DIVIDE .or
- lessequals .emit OPERATOR_LESSEQUAL .or
- /*lesslessequals .emit OPERATOR_LSHASSIGN .or*/
- /*lessless .emit OPERATOR_LSHIFT .or*/
- less .emit OPERATOR_LESS .or
- greaterequals .emit OPERATOR_GREATEREQUAL .or
- /*greatergreaterequals .emit OPERATOR_RSHASSIGN .or*/
- /*greatergreater .emit OPERATOR_RSHIFT .or*/
- greater .emit OPERATOR_GREATER .or
- /*percentequals .emit OPERATOR_MODASSIGN .or*/
- /*percent .emit OPERATOR_MODULUS .or*/
- /*ampersandequals .emit OPERATOR_ANDASSIGN */
- /*ampersand .emit OPERATOR_BITAND .or*/
- /*barequals .emit OPERATOR_ORASSIGN .or*/
- /*bar .emit OPERATOR_BITOR .or*/
- /*tilde .emit OPERATOR_COMPLEMENT .or*/
- /*caretequals .emit OPERATOR_XORASSIGN .or*/
- caretcaret .emit OPERATOR_LOGICALXOR /*.or
- caret .emit OPERATOR_BITXOR*/;
-
-/*
- * <parameter_declarator> ::= <type_specifier> <identifier>
- * | <type_specifier> <identifier> "[" <constant_expression> "]"
- */
-parameter_declarator
- parameter_declarator_nospace .or parameter_declarator_space;
-parameter_declarator_nospace
- type_specifier_nospace .and identifier .and parameter_declarator_1;
-parameter_declarator_space
- type_specifier_space .and space .and identifier .and parameter_declarator_1;
-parameter_declarator_1
- parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or
- .true .emit PARAMETER_ARRAY_NOT_PRESENT;
-parameter_declarator_2
- lbracket .and constant_expression .and rbracket;
-
-/*
- * <parameter_declaration> ::= <type_qualifier> <parameter_qualifier>
- * <precision> <parameter_declarator>
- * | <type_qualifier> <parameter_qualifier>
- * <precision> <parameter_type_specifier>
- * | <type_qualifier> <parameter_qualifier>
- * <parameter_declarator>
- * | <type_qualifier> <parameter_qualifier>
- * <parameter_type_specifier>
- * | <parameter_qualifier> <precision>
- * <parameter_declarator>
- * | <parameter_qualifier> <precision>
- * <parameter_type_specifier>
- * | <parameter_qualifier> <parameter_declarator>
- * | <parameter_qualifier> <parameter_type_specifier>
- */
-parameter_declaration
- parameter_declaration_1 .emit PARAMETER_NEXT;
-parameter_declaration_1
- parameter_declaration_2 .or parameter_declaration_3;
-parameter_declaration_2
- type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4;
-parameter_declaration_3
- parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4;
-parameter_declaration_4
- parameter_declaration_optprec .and parameter_declaration_rest;
-parameter_declaration_optprec
- parameter_declaration_prec .or .true .emit PRECISION_DEFAULT;
-parameter_declaration_prec
- precision .and space;
-parameter_declaration_rest
- parameter_declarator .or parameter_type_specifier;
-
-/*
- * <parameter_qualifier> ::= "in"
- * | "out"
- * | "inout"
- * | ""
- */
-parameter_qualifier
- parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN;
-parameter_qualifier_1
- parameter_qualifier_2 .and space;
-parameter_qualifier_2
- "in" .emit PARAM_QUALIFIER_IN .or
- "out" .emit PARAM_QUALIFIER_OUT .or
- "inout" .emit PARAM_QUALIFIER_INOUT;
-
-/*
- * <parameter_type_specifier> ::= <type_specifier>
- * | <type_specifier> "[" <constant_expression> "]"
- */
-parameter_type_specifier
- parameter_type_specifier_1 .and .true .emit '\0' .and parameter_type_specifier_2;
-parameter_type_specifier_1
- type_specifier_nospace .or type_specifier_space;
-parameter_type_specifier_2
- parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or
- .true .emit PARAMETER_ARRAY_NOT_PRESENT;
-parameter_type_specifier_3
- lbracket .and constant_expression .and rbracket;
-
-/*
- * <init_declarator_list> ::= <single_declaration>
- * | <init_declarator_list> "," <identifier>
- * | <init_declarator_list> "," <identifier> "[" "]"
- * | <init_declarator_list> "," <identifier> "[" <constant_expression> "]"
- * | <init_declarator_list> "," <identifier> "=" <initializer>
- */
-init_declarator_list
- single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and
- .true .emit DECLARATOR_NONE;
-init_declarator_list_1
- comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2;
-init_declarator_list_2
- init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE;
-init_declarator_list_3
- equals .and initializer .emit VARIABLE_INITIALIZER;
-init_declarator_list_4
- lbracket .and init_declarator_list_5 .and rbracket;
-init_declarator_list_5
- constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;
-
-/*
- * <single_declaration> ::= <fully_specified_type>
- * | <fully_specified_type> <identifier>
- * | <fully_specified_type> <identifier> "[" "]"
- * | <fully_specified_type> <identifier> "[" <constant_expression> "]"
- * | <fully_specified_type> <identifier> "=" <initializer>
- */
-single_declaration
- single_declaration_nospace .or single_declaration_space;
-single_declaration_space
- fully_specified_type_space .and single_declaration_space_1;
-single_declaration_nospace
- fully_specified_type_nospace .and single_declaration_nospace_1;
-single_declaration_space_1
- single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;
-single_declaration_nospace_1
- single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;
-single_declaration_space_2
- space .and identifier .and single_declaration_3;
-single_declaration_nospace_2
- identifier .and single_declaration_3;
-single_declaration_3
- single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE;
-single_declaration_4
- equals .and initializer .emit VARIABLE_INITIALIZER;
-single_declaration_5
- lbracket .and single_declaration_6 .and rbracket;
-single_declaration_6
- constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;
-
-/*
- * <fully_specified_type> ::= <opt_invariant> <opt_centroid> <opt_qualifer> <opt_precision> <type_specifier>
- *
- * Example: "invariant varying highp vec3"
- */
-fully_specified_type_space
- fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_space;
-fully_specified_type_nospace
- fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_nospace;
-fully_specified_type_optinvariant
- fully_specified_type_invariant .or .true .emit TYPE_VARIANT;
-fully_specified_type_invariant
- invariant_qualifier .and space;
-fully_specified_type_optcentroid
- fully_specified_type_centroid .or .true .emit TYPE_CENTER;
-fully_specified_type_centroid
- centroid_qualifier .and space;
-fully_specified_type_optqual
- fully_specified_type_qual .or .true .emit TYPE_QUALIFIER_NONE;
-fully_specified_type_qual
- type_qualifier .and space;
-fully_specified_type_optprec
- fully_specified_type_prec .or .true .emit PRECISION_DEFAULT;
-fully_specified_type_prec
- precision .and space;
-
-/*
- * <invariant_qualifier> ::= "invariant"
- */
-invariant_qualifier
- "invariant" .emit TYPE_INVARIANT;
-
-centroid_qualifier
- "centroid" .emit TYPE_CENTROID;
-
-
-/*
- * <type_qualifier> ::= "const"
- * | "attribute" // Vertex only.
- * | "varying"
- * | "uniform"
- * | "__fixed_output"
- * | "__fixed_input"
- *
- * note: this is an extension to the standard language specification,
- * normally slang disallows __fixed_output and __fixed_input type qualifiers
- */
-type_qualifier
- "const" .emit TYPE_QUALIFIER_CONST .or
- .if (shader_type == 2) "attribute" .emit TYPE_QUALIFIER_ATTRIBUTE .or
- "varying" .emit TYPE_QUALIFIER_VARYING .or
- "uniform" .emit TYPE_QUALIFIER_UNIFORM .or
- .if (parsing_builtin != 0) "__fixed_output" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or
- .if (parsing_builtin != 0) "__fixed_input" .emit TYPE_QUALIFIER_FIXEDINPUT;
-
-/*
- * <type_specifier_nonarray> ::= "void"
- * | "float"
- * | "int"
- * | "bool"
- * | "vec2"
- * | "vec3"
- * | "vec4"
- * | "bvec2"
- * | "bvec3"
- * | "bvec4"
- * | "ivec2"
- * | "ivec3"
- * | "ivec4"
- * | "mat2"
- * | "mat3"
- * | "mat4"
- * | "mat2x3"
- * | "mat3x2"
- * | "mat2x4"
- * | "mat4x2"
- * | "mat3x4"
- * | "mat4x3"
- * | "sampler1D"
- * | "sampler2D"
- * | "sampler3D"
- * | "samplerCube"
- * | "sampler1DShadow"
- * | "sampler2DShadow"
- * | "sampler2DRect"
- * | "sampler2DRectShadow"
- * | <struct_specifier>
- * | <type_name>
- */
-type_specifier_nonarray_space
- "void" .emit TYPE_SPECIFIER_VOID .or
- "float" .emit TYPE_SPECIFIER_FLOAT .or
- "int" .emit TYPE_SPECIFIER_INT .or
- "bool" .emit TYPE_SPECIFIER_BOOL .or
- "vec2" .emit TYPE_SPECIFIER_VEC2 .or
- "vec3" .emit TYPE_SPECIFIER_VEC3 .or
- "vec4" .emit TYPE_SPECIFIER_VEC4 .or
- "bvec2" .emit TYPE_SPECIFIER_BVEC2 .or
- "bvec3" .emit TYPE_SPECIFIER_BVEC3 .or
- "bvec4" .emit TYPE_SPECIFIER_BVEC4 .or
- "ivec2" .emit TYPE_SPECIFIER_IVEC2 .or
- "ivec3" .emit TYPE_SPECIFIER_IVEC3 .or
- "ivec4" .emit TYPE_SPECIFIER_IVEC4 .or
- "mat2" .emit TYPE_SPECIFIER_MAT2 .or
- "mat3" .emit TYPE_SPECIFIER_MAT3 .or
- "mat4" .emit TYPE_SPECIFIER_MAT4 .or
- "mat2x3" .emit TYPE_SPECIFIER_MAT23 .or
- "mat3x2" .emit TYPE_SPECIFIER_MAT32 .or
- "mat2x4" .emit TYPE_SPECIFIER_MAT24 .or
- "mat4x2" .emit TYPE_SPECIFIER_MAT42 .or
- "mat3x4" .emit TYPE_SPECIFIER_MAT34 .or
- "mat4x3" .emit TYPE_SPECIFIER_MAT43 .or
- "sampler1D" .emit TYPE_SPECIFIER_SAMPLER1D .or
- "sampler2D" .emit TYPE_SPECIFIER_SAMPLER2D .or
- "sampler3D" .emit TYPE_SPECIFIER_SAMPLER3D .or
- "samplerCube" .emit TYPE_SPECIFIER_SAMPLERCUBE .or
- "sampler1DShadow" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or
- "sampler2DShadow" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or
- "sampler2DRect" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or
- "sampler2DRectShadow" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW .or
- type_name .emit TYPE_SPECIFIER_TYPENAME;
-type_specifier_nonarray_nospace
- struct_specifier .emit TYPE_SPECIFIER_STRUCT;
-type_specifier_nonarray
- type_specifier_nonarray_nospace .or type_specifier_nonarray_space;
-
-/*
- * <type_specifier> ::= <type_specifier_nonarray>
- * | <type_specifier_nonarray> "[" <constant_expression> "]"
- */
-type_specifier_space
- type_specifier_nonarray_space .and .true .emit TYPE_SPECIFIER_NONARRAY;
-type_specifier_nospace
- type_specifier_nospace_array .or type_specifier_nospace_1;
-type_specifier_nospace_1
- type_specifier_nonarray_nospace .and .true .emit TYPE_SPECIFIER_NONARRAY;
-type_specifier_nospace_array
- type_specifier_nonarray .and lbracket .emit TYPE_SPECIFIER_ARRAY .and constant_expression .and rbracket;
-
-/*
- * <struct_specifier> ::= "struct" <identifier> "{" <struct_declaration_list> "}"
- * | "struct" "{" <struct_declaration_list> "}"
- */
-struct_specifier
- "struct" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and
- struct_declaration_list .and rbrace .emit FIELD_NONE;
-struct_specifier_1
- struct_specifier_2 .or .true .emit '\0';
-struct_specifier_2
- space .and identifier;
-
-/*
- * <struct_declaration_list> ::= <struct_declaration>
- * | <struct_declaration_list> <struct_declaration>
- */
-struct_declaration_list
- struct_declaration .and .loop struct_declaration .emit FIELD_NEXT;
-
-/*
- * <struct_declaration> ::= <type_specifier> <struct_declarator_list> ";"
- */
-struct_declaration
- struct_declaration_nospace .or struct_declaration_space;
-struct_declaration_space
- type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE;
-struct_declaration_nospace
- type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE;
-
-/*
- * <struct_declarator_list> ::= <struct_declarator>
- * | <struct_declarator_list> "," <struct_declarator>
- */
-struct_declarator_list
- struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT;
-struct_declarator_list_1
- comma .and struct_declarator;
-
-/*
- * <struct_declarator> ::= <identifier>
- * | <identifier> "[" <constant_expression> "]"
- */
-struct_declarator
- identifier .and struct_declarator_1;
-struct_declarator_1
- struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE;
-struct_declarator_2
- lbracket .and constant_expression .and rbracket;
-
-/*
- * <initializer> ::= <assignment_expression>
- */
-initializer
- assignment_expression .and .true .emit OP_END;
-
-/*
- * <declaration_statement> ::= <declaration>
- */
-declaration_statement
- declaration;
-
-/*
- * <statement> ::= <compound_statement>
- * | <simple_statement>
- */
-statement
- compound_statement .or simple_statement;
-statement_space
- compound_statement .or statement_space_1;
-statement_space_1
- space .and simple_statement;
-
-/*
- * <simple_statement> ::= <__asm_statement>
- * | <selection_statement>
- * | <iteration_statement>
- * | <jump_statement>
- * | <expression_statement>
- * | <declaration_statement>
- *
- * note: this is an extension to the standard language specification.
- * normally slang disallows use of __asm statements
- */
-simple_statement
- .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or
- selection_statement .or
- iteration_statement .or
- precision_stmt .emit OP_PRECISION .or
- jump_statement .or
- expression_statement .emit OP_EXPRESSION .or
- declaration_statement .emit OP_DECLARE;
-
-/*
- * <compound_statement> ::= "{" "}"
- * | "{" <statement_list> "}"
- */
-compound_statement
- compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END;
-compound_statement_1
- compound_statement_2 .or compound_statement_3;
-compound_statement_2
- lbrace .and rbrace;
-compound_statement_3
- lbrace .and statement_list .and rbrace;
-
-/*
- * <compound_statement_no_new_scope> ::= "{" "}"
- * | "{" <statement_list> "}"
- */
-compound_statement_no_new_scope
- compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;
-compound_statement_no_new_scope_1
- compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3;
-compound_statement_no_new_scope_2
- lbrace .and rbrace;
-compound_statement_no_new_scope_3
- lbrace .and statement_list .and rbrace;
-
-
-/*
- * <statement_list> ::= <statement>
- * | <statement_list> <statement>
- */
-statement_list
- statement .and .loop statement;
-
-/*
- * <expression_statement> ::= ";"
- * | <expression> ";"
- */
-expression_statement
- expression_statement_1 .or expression_statement_2;
-expression_statement_1
- semicolon .emit OP_PUSH_VOID .emit OP_END;
-expression_statement_2
- expression .and semicolon .emit OP_END;
-
-/*
- * <selection_statement> ::= "if" "(" <expression> ")" <selection_rest_statement>
- */
-selection_statement
- "if" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and
- rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement;
-
-/*
- * <selection_rest_statement> ::= <statement> "else" <statement>
- * | <statement>
- */
-selection_rest_statement
- statement .and selection_rest_statement_1;
-selection_rest_statement_1
- selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END;
-selection_rest_statement_2
- "else" .and optional_space .and statement;
-
-/*
- * <condition> ::= <expression>
- * | <fully_specified_type> <identifier> "=" <initializer>
- *
- * note: if <condition_1> is executed, the emit format must
- * match <declaration> emit format
- */
-condition
- condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or
- condition_3 .emit OP_EXPRESSION;
-condition_1
- condition_1_nospace .or condition_1_space;
-condition_1_nospace
- fully_specified_type_nospace .and condition_2;
-condition_1_space
- fully_specified_type_space .and space .and condition_2;
-condition_2
- identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and
- initializer .and .true .emit DECLARATOR_NONE;
-condition_3
- expression .and .true .emit OP_END;
-
-/*
- * <iteration_statement> ::= "while" "(" <condition> ")" <statement>
- * | "do" <statement> "while" "(" <expression> ")" ";"
- * | "for" "(" <for_init_statement> <for_rest_statement> ")" <statement>
- */
-iteration_statement
- iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;
-iteration_statement_1
- "while" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and
- rparen .error RPAREN_EXPECTED .and statement;
-iteration_statement_2
- "do" .emit OP_DO .and statement_space .and "while" .and lparen .error LPAREN_EXPECTED .and
- expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;
-iteration_statement_3
- "for" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and
- for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement;
-
-/*
- * <for_init_statement> ::= <expression_statement>
- * | <declaration_statement>
- */
-for_init_statement
- expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;
-
-/*
- * <conditionopt> ::= <condition>
- * | ""
- *
- * note: <conditionopt> is used only by "for" statement.
- * if <condition> is ommitted, parser simulates default behaviour,
- * that is simulates "true" expression
- */
-conditionopt
- condition .or
- .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\0' .emit OP_END;
-
-/*
- * <for_rest_statement> ::= <conditionopt> ";"
- * | <conditionopt> ";" <expression>
- */
-for_rest_statement
- conditionopt .and semicolon .and for_rest_statement_1;
-for_rest_statement_1
- for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END;
-for_rest_statement_2
- expression .and .true .emit OP_END;
-
-/*
- * <jump_statement> ::= "continue" ";"
- * | "break" ";"
- * | "return" ";"
- * | "return" <expression> ";"
- * | "discard" ";" // Fragment shader only.
- */
-jump_statement
- jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or
- .if (shader_type == 1) jump_statement_5;
-jump_statement_1
- "continue" .and semicolon .emit OP_CONTINUE;
-jump_statement_2
- "break" .and semicolon .emit OP_BREAK;
-jump_statement_3
- "return" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END;
-jump_statement_4
- "return" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END;
-jump_statement_5
- "discard" .and semicolon .emit OP_DISCARD;
-
-/*
- * <__asm_statement> ::= "__asm" <identifier> <asm_arguments> ";"
- *
- * note: this is an extension to the standard language specification.
- * normally slang disallows __asm statements
- */
-__asm_statement
- "__asm" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END;
-
-/*
- * <asm_arguments> ::= <asm_argument>
- * | <asm_arguments> "," <asm_argument>
- *
- * note: this is an extension to the standard language specification.
- * normally slang disallows __asm statements
- */
-asm_arguments
- asm_argument .and .true .emit OP_END .and .loop asm_arguments_1;
-asm_arguments_1
- comma .and asm_argument .and .true .emit OP_END;
-
-/*
- * <asm_argument> ::= <variable_identifier>
- * | <floatconstant>
- *
- * note: this is an extension to the standard language specification.
- * normally slang disallows __asm statements
- */
-asm_argument
- var_with_field .or
- variable_identifier .or
- floatconstant;
-
-var_with_field
- variable_identifier .and dot .and field_selection .emit OP_FIELD;
-
-
-/*
- * <translation_unit> ::= <external_declaration>
- * | <translation_unit> <external_declaration>
- */
-translation_unit
- optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and
- .loop external_declaration .and optional_space .and
- '\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;
-
-
-/*
- * <external_declaration> ::= <function_definition>
- * | <declaration>
- */
-external_declaration
- precision_stmt .emit DEFAULT_PRECISION .or
- function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or
- invariant_stmt .emit INVARIANT_STMT .or
- declaration .emit EXTERNAL_DECLARATION;
-
-
-/*
- * <precision_stmt> ::= "precision" <precision> <prectype>
- */
-precision_stmt
- "precision" .and space .and precision .error INVALID_PRECISION .and space .and prectype .error INVALID_PRECISION_TYPE .and semicolon;
-
-/*
- * <precision> ::= "lowp"
- * | "mediump"
- * | "highp"
- */
-precision
- "lowp" .emit PRECISION_LOW .or
- "mediump" .emit PRECISION_MEDIUM .or
- "highp" .emit PRECISION_HIGH;
-
-/*
- * <prectype> ::= "int"
- * | "float"
- * | "a sampler type"
- */
-prectype
- "int" .emit TYPE_SPECIFIER_INT .or
- "float" .emit TYPE_SPECIFIER_FLOAT .or
- "sampler1D" .emit TYPE_SPECIFIER_SAMPLER1D .or
- "sampler2D" .emit TYPE_SPECIFIER_SAMPLER2D .or
- "sampler3D" .emit TYPE_SPECIFIER_SAMPLER3D .or
- "samplerCube" .emit TYPE_SPECIFIER_SAMPLERCUBE .or
- "sampler1DShadow" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or
- "sampler2DShadow" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or
- "sampler2DRect" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or
- "sampler2DRectShadow" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW;
-
-
-/*
- * <invariant_stmt> ::= "invariant" identifier;
- */
-invariant_stmt
- "invariant" .and space .and identifier .and semicolon;
-
-
-/*
- * <function_definition> :: <function_prototype> <compound_statement_no_new_scope>
- */
-function_definition
- function_prototype .and compound_statement_no_new_scope;
-
-
-
-/*
- * helper rules, not part of the official language syntax
- */
-
-digit_oct
- '0'-'7';
-
-digit_dec
- '0'-'9';
-
-digit_hex
- '0'-'9' .or 'A'-'F' .or 'a'-'f';
-
-id_character_first
- 'a'-'z' .or 'A'-'Z' .or '_';
-
-id_character_next
- id_character_first .or digit_dec;
-
-identifier
- id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\0';
-
-float
- float_1 .or float_2 .or float_3;
-float_1
- float_fractional_constant .and float_optional_exponent_part .and optional_f_suffix;
-float_2
- float_digit_sequence .and .true .emit '\0' .and float_exponent_part .and optional_f_suffix;
-float_3
- float_digit_sequence .and .true .emit '\0' .and 'f' .emit '\0';
-
-float_fractional_constant
- float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;
-float_fractional_constant_1
- float_digit_sequence .and '.' .and float_digit_sequence;
-float_fractional_constant_2
- float_digit_sequence .and '.' .and .true .emit '\0';
-float_fractional_constant_3
- '.' .emit '\0' .and float_digit_sequence;
-
-float_optional_exponent_part
- float_exponent_part .or .true .emit '\0';
-
-float_digit_sequence
- digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\0';
-
-float_exponent_part
- float_exponent_part_1 .or float_exponent_part_2;
-float_exponent_part_1
- 'e' .and float_optional_sign .and float_digit_sequence;
-float_exponent_part_2
- 'E' .and float_optional_sign .and float_digit_sequence;
-
-float_optional_sign
- float_sign .or .true;
-
-float_sign
- '+' .or '-' .emit '-';
-
-optional_f_suffix
- 'f' .or .true;
-
-
-integer
- integer_hex .or integer_oct .or integer_dec;
-
-integer_hex
- '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and
- .true .emit '\0';
-integer_hex_1
- 'x' .or 'X';
-
-integer_oct
- '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\0';
-
-integer_dec
- digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\0';
-
-boolean
- "true" .emit 2 .emit '1' .emit '\0' .or
- "false" .emit 2 .emit '0' .emit '\0';
-
-type_name
- identifier;
-
-field_selection
- identifier;
-
-floatconstant
- float .emit OP_PUSH_FLOAT;
-
-intconstant
- integer .emit OP_PUSH_INT;
-
-boolconstant
- boolean .emit OP_PUSH_BOOL;
-
-optional_space
- .loop single_space;
-
-space
- single_space .and .loop single_space;
-
-single_space
- white_char .or c_style_comment_block .or cpp_style_comment_block;
-
-white_char
- ' ' .or '\t' .or new_line .or '\v' .or '\f';
-
-new_line
- cr_lf .or lf_cr .or '\n' .or '\r';
-
-cr_lf
- '\r' .and '\n';
-
-lf_cr
- '\n' .and '\r';
-
-c_style_comment_block
- '/' .and '*' .and c_style_comment_rest;
-
-c_style_comment_rest
- .loop c_style_comment_char_no_star .and c_style_comment_rest_1;
-c_style_comment_rest_1
- c_style_comment_end .or c_style_comment_rest_2;
-c_style_comment_rest_2
- '*' .and c_style_comment_rest;
-
-c_style_comment_char_no_star
- '\x2B'-'\xFF' .or '\x01'-'\x29';
-
-c_style_comment_end
- '*' .and '/';
-
-cpp_style_comment_block
- '/' .and '/' .and cpp_style_comment_block_1;
-cpp_style_comment_block_1
- cpp_style_comment_block_2 .or cpp_style_comment_block_3;
-cpp_style_comment_block_2
- .loop cpp_style_comment_char .and new_line;
-cpp_style_comment_block_3
- .loop cpp_style_comment_char;
-
-cpp_style_comment_char
- '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
-
-/* lexical rules */
-
-/*ampersand
- optional_space .and '&' .and optional_space;*/
-
-ampersandampersand
- optional_space .and '&' .and '&' .and optional_space;
-
-/*ampersandequals
- optional_space .and '&' .and '=' .and optional_space;*/
-
-/*bar
- optional_space .and '|' .and optional_space;*/
-
-barbar
- optional_space .and '|' .and '|' .and optional_space;
-
-/*barequals
- optional_space .and '|' .and '=' .and optional_space;*/
-
-bang
- optional_space .and '!' .and optional_space;
-
-bangequals
- optional_space .and '!' .and '=' .and optional_space;
-
-/*caret
- optional_space .and '^' .and optional_space;*/
-
-caretcaret
- optional_space .and '^' .and '^' .and optional_space;
-
-/*caretequals
- optional_space .and '^' .and '=' .and optional_space;*/
-
-colon
- optional_space .and ':' .and optional_space;
-
-comma
- optional_space .and ',' .and optional_space;
-
-dot
- optional_space .and '.' .and optional_space;
-
-equals
- optional_space .and '=' .and optional_space;
-
-equalsequals
- optional_space .and '=' .and '=' .and optional_space;
-
-greater
- optional_space .and '>' .and optional_space;
-
-greaterequals
- optional_space .and '>' .and '=' .and optional_space;
-
-/*greatergreater
- optional_space .and '>' .and '>' .and optional_space;*/
-
-/*greatergreaterequals
- optional_space .and '>' .and '>' .and '=' .and optional_space;*/
-
-lbrace
- optional_space .and '{' .and optional_space;
-
-lbracket
- optional_space .and '[' .and optional_space;
-
-less
- optional_space .and '<' .and optional_space;
-
-lessequals
- optional_space .and '<' .and '=' .and optional_space;
-
-/*lessless
- optional_space .and '<' .and '<' .and optional_space;*/
-
-/*lesslessequals
- optional_space .and '<' .and '<' .and '=' .and optional_space;*/
-
-lparen
- optional_space .and '(' .and optional_space;
-
-minus
- optional_space .and '-' .and optional_space;
-
-minusequals
- optional_space .and '-' .and '=' .and optional_space;
-
-minusminus
- optional_space .and '-' .and '-' .and optional_space;
-
-/*percent
- optional_space .and '%' .and optional_space;*/
-
-/*percentequals
- optional_space .and '%' .and '=' .and optional_space;*/
-
-plus
- optional_space .and '+' .and optional_space;
-
-plusequals
- optional_space .and '+' .and '=' .and optional_space;
-
-plusplus
- optional_space .and '+' .and '+' .and optional_space;
-
-question
- optional_space .and '?' .and optional_space;
-
-rbrace
- optional_space .and '}' .and optional_space;
-
-rbracket
- optional_space .and ']' .and optional_space;
-
-rparen
- optional_space .and ')' .and optional_space;
-
-semicolon
- optional_space .and ';' .and optional_space;
-
-slash
- optional_space .and '/' .and optional_space;
-
-slashequals
- optional_space .and '/' .and '=' .and optional_space;
-
-star
- optional_space .and '*' .and optional_space;
-
-starequals
- optional_space .and '*' .and '=' .and optional_space;
-
-/*tilde
- optional_space .and '~' .and optional_space;*/
-
-/* string rules - these are used internally by the parser when parsing quoted strings */
-
-.string string_lexer;
-
-string_lexer
- lex_first_identifier_character .and .loop lex_next_identifier_character;
-
-lex_first_identifier_character
- 'a'-'z' .or 'A'-'Z' .or '_';
-
-lex_next_identifier_character
- 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';
-
-/* error rules - these are used by error messages */
-
-err_token
- '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or
- '-' .or '+' .or '=' .or '|' .or '\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '"' .or
- '\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;
-
-err_identifier
- id_character_first .and .loop id_character_next;
-
diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h
deleted file mode 100644
index 6a382970e1a..00000000000
--- a/src/mesa/shader/slang/library/slang_shader_syn.h
+++ /dev/null
@@ -1,866 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */
-
-".syntax translation_unit;\n"
-".emtcode REVISION 5\n"
-".emtcode EXTERNAL_NULL 0\n"
-".emtcode EXTERNAL_FUNCTION_DEFINITION 1\n"
-".emtcode EXTERNAL_DECLARATION 2\n"
-".emtcode DEFAULT_PRECISION 3\n"
-".emtcode INVARIANT_STMT 4\n"
-".emtcode PRECISION_DEFAULT 0\n"
-".emtcode PRECISION_LOW 1\n"
-".emtcode PRECISION_MEDIUM 2\n"
-".emtcode PRECISION_HIGH 3\n"
-".emtcode DECLARATION_FUNCTION_PROTOTYPE 1\n"
-".emtcode DECLARATION_INIT_DECLARATOR_LIST 2\n"
-".emtcode FUNCTION_ORDINARY 0\n"
-".emtcode FUNCTION_CONSTRUCTOR 1\n"
-".emtcode FUNCTION_OPERATOR 2\n"
-".emtcode FUNCTION_CALL_NONARRAY 0\n"
-".emtcode FUNCTION_CALL_ARRAY 1\n"
-".emtcode OPERATOR_ADDASSIGN 1\n"
-".emtcode OPERATOR_SUBASSIGN 2\n"
-".emtcode OPERATOR_MULASSIGN 3\n"
-".emtcode OPERATOR_DIVASSIGN 4\n"
-".emtcode OPERATOR_LOGICALXOR 11\n"
-".emtcode OPERATOR_LESS 15\n"
-".emtcode OPERATOR_GREATER 16\n"
-".emtcode OPERATOR_LESSEQUAL 17\n"
-".emtcode OPERATOR_GREATEREQUAL 18\n"
-".emtcode OPERATOR_MULTIPLY 21\n"
-".emtcode OPERATOR_DIVIDE 22\n"
-".emtcode OPERATOR_INCREMENT 24\n"
-".emtcode OPERATOR_DECREMENT 25\n"
-".emtcode OPERATOR_PLUS 26\n"
-".emtcode OPERATOR_MINUS 27\n"
-".emtcode OPERATOR_NOT 29\n"
-".emtcode DECLARATOR_NONE 0\n"
-".emtcode DECLARATOR_NEXT 1\n"
-".emtcode VARIABLE_NONE 0\n"
-".emtcode VARIABLE_IDENTIFIER 1\n"
-".emtcode VARIABLE_INITIALIZER 2\n"
-".emtcode VARIABLE_ARRAY_EXPLICIT 3\n"
-".emtcode VARIABLE_ARRAY_UNKNOWN 4\n"
-".emtcode TYPE_QUALIFIER_NONE 0\n"
-".emtcode TYPE_QUALIFIER_CONST 1\n"
-".emtcode TYPE_QUALIFIER_ATTRIBUTE 2\n"
-".emtcode TYPE_QUALIFIER_VARYING 3\n"
-".emtcode TYPE_QUALIFIER_UNIFORM 4\n"
-".emtcode TYPE_QUALIFIER_FIXEDOUTPUT 5\n"
-".emtcode TYPE_QUALIFIER_FIXEDINPUT 6\n"
-".emtcode TYPE_VARIANT 90\n"
-".emtcode TYPE_INVARIANT 91\n"
-".emtcode TYPE_CENTER 95\n"
-".emtcode TYPE_CENTROID 96\n"
-".emtcode TYPE_SPECIFIER_VOID 0\n"
-".emtcode TYPE_SPECIFIER_BOOL 1\n"
-".emtcode TYPE_SPECIFIER_BVEC2 2\n"
-".emtcode TYPE_SPECIFIER_BVEC3 3\n"
-".emtcode TYPE_SPECIFIER_BVEC4 4\n"
-".emtcode TYPE_SPECIFIER_INT 5\n"
-".emtcode TYPE_SPECIFIER_IVEC2 6\n"
-".emtcode TYPE_SPECIFIER_IVEC3 7\n"
-".emtcode TYPE_SPECIFIER_IVEC4 8\n"
-".emtcode TYPE_SPECIFIER_FLOAT 9\n"
-".emtcode TYPE_SPECIFIER_VEC2 10\n"
-".emtcode TYPE_SPECIFIER_VEC3 11\n"
-".emtcode TYPE_SPECIFIER_VEC4 12\n"
-".emtcode TYPE_SPECIFIER_MAT2 13\n"
-".emtcode TYPE_SPECIFIER_MAT3 14\n"
-".emtcode TYPE_SPECIFIER_MAT4 15\n"
-".emtcode TYPE_SPECIFIER_SAMPLER1D 16\n"
-".emtcode TYPE_SPECIFIER_SAMPLER2D 17\n"
-".emtcode TYPE_SPECIFIER_SAMPLER3D 18\n"
-".emtcode TYPE_SPECIFIER_SAMPLERCUBE 19\n"
-".emtcode TYPE_SPECIFIER_SAMPLER1DSHADOW 20\n"
-".emtcode TYPE_SPECIFIER_SAMPLER2DSHADOW 21\n"
-".emtcode TYPE_SPECIFIER_SAMPLER2DRECT 22\n"
-".emtcode TYPE_SPECIFIER_SAMPLER2DRECTSHADOW 23\n"
-".emtcode TYPE_SPECIFIER_STRUCT 24\n"
-".emtcode TYPE_SPECIFIER_TYPENAME 25\n"
-".emtcode TYPE_SPECIFIER_MAT23 26\n"
-".emtcode TYPE_SPECIFIER_MAT32 27\n"
-".emtcode TYPE_SPECIFIER_MAT24 28\n"
-".emtcode TYPE_SPECIFIER_MAT42 29\n"
-".emtcode TYPE_SPECIFIER_MAT34 30\n"
-".emtcode TYPE_SPECIFIER_MAT43 31\n"
-".emtcode TYPE_SPECIFIER_NONARRAY 0\n"
-".emtcode TYPE_SPECIFIER_ARRAY 1\n"
-".emtcode FIELD_NONE 0\n"
-".emtcode FIELD_NEXT 1\n"
-".emtcode FIELD_ARRAY 2\n"
-".emtcode OP_END 0\n"
-".emtcode OP_BLOCK_BEGIN_NO_NEW_SCOPE 1\n"
-".emtcode OP_BLOCK_BEGIN_NEW_SCOPE 2\n"
-".emtcode OP_DECLARE 3\n"
-".emtcode OP_ASM 4\n"
-".emtcode OP_BREAK 5\n"
-".emtcode OP_CONTINUE 6\n"
-".emtcode OP_DISCARD 7\n"
-".emtcode OP_RETURN 8\n"
-".emtcode OP_EXPRESSION 9\n"
-".emtcode OP_IF 10\n"
-".emtcode OP_WHILE 11\n"
-".emtcode OP_DO 12\n"
-".emtcode OP_FOR 13\n"
-".emtcode OP_PUSH_VOID 14\n"
-".emtcode OP_PUSH_BOOL 15\n"
-".emtcode OP_PUSH_INT 16\n"
-".emtcode OP_PUSH_FLOAT 17\n"
-".emtcode OP_PUSH_IDENTIFIER 18\n"
-".emtcode OP_SEQUENCE 19\n"
-".emtcode OP_ASSIGN 20\n"
-".emtcode OP_ADDASSIGN 21\n"
-".emtcode OP_SUBASSIGN 22\n"
-".emtcode OP_MULASSIGN 23\n"
-".emtcode OP_DIVASSIGN 24\n"
-".emtcode OP_SELECT 31\n"
-".emtcode OP_LOGICALOR 32\n"
-".emtcode OP_LOGICALXOR 33\n"
-".emtcode OP_LOGICALAND 34\n"
-".emtcode OP_EQUAL 38\n"
-".emtcode OP_NOTEQUAL 39\n"
-".emtcode OP_LESS 40\n"
-".emtcode OP_GREATER 41\n"
-".emtcode OP_LESSEQUAL 42\n"
-".emtcode OP_GREATEREQUAL 43\n"
-".emtcode OP_ADD 46\n"
-".emtcode OP_SUBTRACT 47\n"
-".emtcode OP_MULTIPLY 48\n"
-".emtcode OP_DIVIDE 49\n"
-".emtcode OP_PREINCREMENT 51\n"
-".emtcode OP_PREDECREMENT 52\n"
-".emtcode OP_PLUS 53\n"
-".emtcode OP_MINUS 54\n"
-".emtcode OP_NOT 56\n"
-".emtcode OP_SUBSCRIPT 57\n"
-".emtcode OP_CALL 58\n"
-".emtcode OP_FIELD 59\n"
-".emtcode OP_POSTINCREMENT 60\n"
-".emtcode OP_POSTDECREMENT 61\n"
-".emtcode OP_PRECISION 62\n"
-".emtcode OP_METHOD 63\n"
-".emtcode PARAM_QUALIFIER_IN 0\n"
-".emtcode PARAM_QUALIFIER_OUT 1\n"
-".emtcode PARAM_QUALIFIER_INOUT 2\n"
-".emtcode PARAMETER_NONE 0\n"
-".emtcode PARAMETER_NEXT 1\n"
-".emtcode PARAMETER_ARRAY_NOT_PRESENT 0\n"
-".emtcode PARAMETER_ARRAY_PRESENT 1\n"
-".errtext INVALID_EXTERNAL_DECLARATION \"2001: Syntax error.\"\n"
-".errtext INVALID_OPERATOR_OVERRIDE \"2002: Invalid operator override.\"\n"
-".errtext LBRACE_EXPECTED \"2003: '{' expected but '$err_token$' found.\"\n"
-".errtext LPAREN_EXPECTED \"2004: '(' expected but '$err_token$' found.\"\n"
-".errtext RPAREN_EXPECTED \"2005: ')' expected but '$err_token$' found.\"\n"
-".errtext INVALID_PRECISION \"2006: Invalid precision specifier '$err_token$'.\"\n"
-".errtext INVALID_PRECISION_TYPE \"2007: Invalid precision type '$err_token$'.\"\n"
-".regbyte parsing_builtin 0\n"
-".regbyte shader_type 0\n"
-"variable_identifier\n"
-" identifier .emit OP_PUSH_IDENTIFIER;\n"
-"primary_expression\n"
-" floatconstant .or boolconstant .or intconstant .or variable_identifier .or primary_expression_1;\n"
-"primary_expression_1\n"
-" lparen .and expression .and rparen;\n"
-"postfix_expression\n"
-" postfix_expression_1 .and .loop postfix_expression_2;\n"
-"postfix_expression_1\n"
-" function_call .or primary_expression;\n"
-"postfix_expression_2\n"
-" postfix_expression_3 .or postfix_expression_4 .or\n"
-" plusplus .emit OP_POSTINCREMENT .or\n"
-" minusminus .emit OP_POSTDECREMENT;\n"
-"postfix_expression_3\n"
-" lbracket .and integer_expression .and rbracket .emit OP_SUBSCRIPT;\n"
-"postfix_expression_4\n"
-" dot .and field_selection .emit OP_FIELD;\n"
-"integer_expression\n"
-" expression;\n"
-"function_call\n"
-" function_call_or_method;\n"
-"function_call_or_method\n"
-" regular_function_call .or method_call;\n"
-"method_call\n"
-" identifier .emit OP_METHOD .and dot .and function_call_generic .and .true .emit OP_END;\n"
-"regular_function_call\n"
-" function_call_generic .emit OP_CALL .and .true .emit OP_END;\n"
-"function_call_generic\n"
-" function_call_generic_1 .or function_call_generic_2;\n"
-"function_call_generic_1\n"
-" function_call_header_with_parameters .and rparen .error RPAREN_EXPECTED;\n"
-"function_call_generic_2\n"
-" function_call_header_no_parameters .and rparen .error RPAREN_EXPECTED;\n"
-"function_call_header_no_parameters\n"
-" function_call_header .and function_call_header_no_parameters_1;\n"
-"function_call_header_no_parameters_1\n"
-" \"void\" .or .true;\n"
-"function_call_header_with_parameters\n"
-" function_call_header .and assignment_expression .and .true .emit OP_END .and\n"
-" .loop function_call_header_with_parameters_1;\n"
-"function_call_header_with_parameters_1\n"
-" comma .and assignment_expression .and .true .emit OP_END;\n"
-"function_call_header\n"
-" function_identifier .and lparen;\n"
-"function_identifier\n"
-" identifier .and function_identifier_opt_array;\n"
-"function_identifier_opt_array\n"
-" function_identifier_array .emit FUNCTION_CALL_ARRAY .or\n"
-" .true .emit FUNCTION_CALL_NONARRAY;\n"
-"function_identifier_array\n"
-" lbracket .and constant_expression .and rbracket;\n"
-"unary_expression\n"
-" postfix_expression .or unary_expression_1 .or unary_expression_2 .or unary_expression_3 .or\n"
-" unary_expression_4 .or unary_expression_5;\n"
-"unary_expression_1\n"
-" plusplus .and unary_expression .and .true .emit OP_PREINCREMENT;\n"
-"unary_expression_2\n"
-" minusminus .and unary_expression .and .true .emit OP_PREDECREMENT;\n"
-"unary_expression_3\n"
-" plus .and unary_expression .and .true .emit OP_PLUS;\n"
-"unary_expression_4\n"
-" minus .and unary_expression .and .true .emit OP_MINUS;\n"
-"unary_expression_5\n"
-" bang .and unary_expression .and .true .emit OP_NOT;\n"
-"multiplicative_expression\n"
-" unary_expression .and .loop multiplicative_expression_1;\n"
-"multiplicative_expression_1\n"
-" multiplicative_expression_2 .or multiplicative_expression_3;\n"
-"multiplicative_expression_2\n"
-" star .and unary_expression .and .true .emit OP_MULTIPLY;\n"
-"multiplicative_expression_3\n"
-" slash .and unary_expression .and .true .emit OP_DIVIDE;\n"
-"additive_expression\n"
-" multiplicative_expression .and .loop additive_expression_1;\n"
-"additive_expression_1\n"
-" additive_expression_2 .or additive_expression_3;\n"
-"additive_expression_2\n"
-" plus .and multiplicative_expression .and .true .emit OP_ADD;\n"
-"additive_expression_3\n"
-" minus .and multiplicative_expression .and .true .emit OP_SUBTRACT;\n"
-"shift_expression\n"
-" additive_expression;\n"
-"relational_expression\n"
-" shift_expression .and .loop relational_expression_1;\n"
-"relational_expression_1\n"
-" relational_expression_2 .or relational_expression_3 .or relational_expression_4 .or\n"
-" relational_expression_5;\n"
-"relational_expression_2\n"
-" lessequals .and shift_expression .and .true .emit OP_LESSEQUAL;\n"
-"relational_expression_3\n"
-" greaterequals .and shift_expression .and .true .emit OP_GREATEREQUAL;\n"
-"relational_expression_4\n"
-" less .and shift_expression .and .true .emit OP_LESS;\n"
-"relational_expression_5\n"
-" greater .and shift_expression .and .true .emit OP_GREATER;\n"
-"equality_expression\n"
-" relational_expression .and .loop equality_expression_1;\n"
-"equality_expression_1\n"
-" equality_expression_2 .or equality_expression_3;\n"
-"equality_expression_2\n"
-" equalsequals .and relational_expression .and .true .emit OP_EQUAL;\n"
-"equality_expression_3\n"
-" bangequals .and relational_expression .and .true .emit OP_NOTEQUAL;\n"
-"and_expression\n"
-" equality_expression;\n"
-"exclusive_or_expression\n"
-" and_expression;\n"
-"inclusive_or_expression\n"
-" exclusive_or_expression;\n"
-"logical_and_expression\n"
-" inclusive_or_expression .and .loop logical_and_expression_1;\n"
-"logical_and_expression_1\n"
-" ampersandampersand .and inclusive_or_expression .and .true .emit OP_LOGICALAND;\n"
-"logical_xor_expression\n"
-" logical_and_expression .and .loop logical_xor_expression_1;\n"
-"logical_xor_expression_1\n"
-" caretcaret .and logical_and_expression .and .true .emit OP_LOGICALXOR;\n"
-"logical_or_expression\n"
-" logical_xor_expression .and .loop logical_or_expression_1;\n"
-"logical_or_expression_1\n"
-" barbar .and logical_xor_expression .and .true .emit OP_LOGICALOR;\n"
-"conditional_expression\n"
-" logical_or_expression .and .loop conditional_expression_1;\n"
-"conditional_expression_1\n"
-" question .and expression .and colon .and conditional_expression .and .true .emit OP_SELECT;\n"
-"assignment_expression\n"
-" assignment_expression_1 .or assignment_expression_2 .or assignment_expression_3 .or\n"
-" assignment_expression_4 .or assignment_expression_5 .or conditional_expression;\n"
-"assignment_expression_1\n"
-" unary_expression .and equals .and assignment_expression .and .true .emit OP_ASSIGN;\n"
-"assignment_expression_2\n"
-" unary_expression .and starequals .and assignment_expression .and .true .emit OP_MULASSIGN;\n"
-"assignment_expression_3\n"
-" unary_expression .and slashequals .and assignment_expression .and .true .emit OP_DIVASSIGN;\n"
-"assignment_expression_4\n"
-" unary_expression .and plusequals .and assignment_expression .and .true .emit OP_ADDASSIGN;\n"
-"assignment_expression_5\n"
-" unary_expression .and minusequals .and assignment_expression .and .true .emit OP_SUBASSIGN;\n"
-"expression\n"
-" assignment_expression .and .loop expression_1;\n"
-"expression_1\n"
-" comma .and assignment_expression .and .true .emit OP_SEQUENCE;\n"
-"constant_expression\n"
-" conditional_expression .and .true .emit OP_END;\n"
-"declaration\n"
-" declaration_1 .or declaration_2;\n"
-"declaration_1\n"
-" function_prototype .emit DECLARATION_FUNCTION_PROTOTYPE .and semicolon;\n"
-"declaration_2\n"
-" init_declarator_list .emit DECLARATION_INIT_DECLARATOR_LIST .and semicolon;\n"
-"function_prototype\n"
-" function_prototype_1 .or function_prototype_2;\n"
-"function_prototype_1\n"
-" function_header .and \"void\" .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n"
-"function_prototype_2\n"
-" function_declarator .and rparen .error RPAREN_EXPECTED .emit PARAMETER_NONE;\n"
-"function_declarator\n"
-" function_header_with_parameters .or function_header;\n"
-"function_header_with_parameters\n"
-" function_header .and parameter_declaration .and .loop function_header_with_parameters_1;\n"
-"function_header_with_parameters_1\n"
-" comma .and parameter_declaration;\n"
-"function_header\n"
-" function_header_nospace .or function_header_space;\n"
-"function_header_space\n"
-" fully_specified_type_space .and space .and function_decl_identifier .and lparen;\n"
-"function_header_nospace\n"
-" fully_specified_type_nospace .and function_decl_identifier .and lparen;\n"
-"function_decl_identifier\n"
-" .if (parsing_builtin != 0) __operator .emit FUNCTION_OPERATOR .or\n"
-" .if (parsing_builtin != 0) \"__constructor\" .emit FUNCTION_CONSTRUCTOR .or\n"
-" identifier .emit FUNCTION_ORDINARY;\n"
-"__operator\n"
-" \"__operator\" .and overriden_operator .error INVALID_OPERATOR_OVERRIDE;\n"
-"overriden_operator\n"
-" plusplus .emit OPERATOR_INCREMENT .or\n"
-" plusequals .emit OPERATOR_ADDASSIGN .or\n"
-" plus .emit OPERATOR_PLUS .or\n"
-" minusminus .emit OPERATOR_DECREMENT .or\n"
-" minusequals .emit OPERATOR_SUBASSIGN .or\n"
-" minus .emit OPERATOR_MINUS .or\n"
-" bang .emit OPERATOR_NOT .or\n"
-" starequals .emit OPERATOR_MULASSIGN .or\n"
-" star .emit OPERATOR_MULTIPLY .or\n"
-" slashequals .emit OPERATOR_DIVASSIGN .or\n"
-" slash .emit OPERATOR_DIVIDE .or\n"
-" lessequals .emit OPERATOR_LESSEQUAL .or\n"
-" \n"
-" \n"
-" less .emit OPERATOR_LESS .or\n"
-" greaterequals .emit OPERATOR_GREATEREQUAL .or\n"
-" \n"
-" \n"
-" greater .emit OPERATOR_GREATER .or\n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" caretcaret .emit OPERATOR_LOGICALXOR ;\n"
-"parameter_declarator\n"
-" parameter_declarator_nospace .or parameter_declarator_space;\n"
-"parameter_declarator_nospace\n"
-" type_specifier_nospace .and identifier .and parameter_declarator_1;\n"
-"parameter_declarator_space\n"
-" type_specifier_space .and space .and identifier .and parameter_declarator_1;\n"
-"parameter_declarator_1\n"
-" parameter_declarator_2 .emit PARAMETER_ARRAY_PRESENT .or\n"
-" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n"
-"parameter_declarator_2\n"
-" lbracket .and constant_expression .and rbracket;\n"
-"parameter_declaration\n"
-" parameter_declaration_1 .emit PARAMETER_NEXT;\n"
-"parameter_declaration_1\n"
-" parameter_declaration_2 .or parameter_declaration_3;\n"
-"parameter_declaration_2\n"
-" type_qualifier .and space .and parameter_qualifier .and parameter_declaration_4;\n"
-"parameter_declaration_3\n"
-" parameter_qualifier .emit TYPE_QUALIFIER_NONE .and parameter_declaration_4;\n"
-"parameter_declaration_4\n"
-" parameter_declaration_optprec .and parameter_declaration_rest;\n"
-"parameter_declaration_optprec\n"
-" parameter_declaration_prec .or .true .emit PRECISION_DEFAULT;\n"
-"parameter_declaration_prec\n"
-" precision .and space;\n"
-"parameter_declaration_rest\n"
-" parameter_declarator .or parameter_type_specifier;\n"
-"parameter_qualifier\n"
-" parameter_qualifier_1 .or .true .emit PARAM_QUALIFIER_IN;\n"
-"parameter_qualifier_1\n"
-" parameter_qualifier_2 .and space;\n"
-"parameter_qualifier_2\n"
-" \"in\" .emit PARAM_QUALIFIER_IN .or\n"
-" \"out\" .emit PARAM_QUALIFIER_OUT .or\n"
-" \"inout\" .emit PARAM_QUALIFIER_INOUT;\n"
-"parameter_type_specifier\n"
-" parameter_type_specifier_1 .and .true .emit '\\0' .and parameter_type_specifier_2;\n"
-"parameter_type_specifier_1\n"
-" type_specifier_nospace .or type_specifier_space;\n"
-"parameter_type_specifier_2\n"
-" parameter_type_specifier_3 .emit PARAMETER_ARRAY_PRESENT .or\n"
-" .true .emit PARAMETER_ARRAY_NOT_PRESENT;\n"
-"parameter_type_specifier_3\n"
-" lbracket .and constant_expression .and rbracket;\n"
-"init_declarator_list\n"
-" single_declaration .and .loop init_declarator_list_1 .emit DECLARATOR_NEXT .and\n"
-" .true .emit DECLARATOR_NONE;\n"
-"init_declarator_list_1\n"
-" comma .and identifier .emit VARIABLE_IDENTIFIER .and init_declarator_list_2;\n"
-"init_declarator_list_2\n"
-" init_declarator_list_3 .or init_declarator_list_4 .or .true .emit VARIABLE_NONE;\n"
-"init_declarator_list_3\n"
-" equals .and initializer .emit VARIABLE_INITIALIZER;\n"
-"init_declarator_list_4\n"
-" lbracket .and init_declarator_list_5 .and rbracket;\n"
-"init_declarator_list_5\n"
-" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n"
-"single_declaration\n"
-" single_declaration_nospace .or single_declaration_space;\n"
-"single_declaration_space\n"
-" fully_specified_type_space .and single_declaration_space_1;\n"
-"single_declaration_nospace\n"
-" fully_specified_type_nospace .and single_declaration_nospace_1;\n"
-"single_declaration_space_1\n"
-" single_declaration_space_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n"
-"single_declaration_nospace_1\n"
-" single_declaration_nospace_2 .emit VARIABLE_IDENTIFIER .or .true .emit VARIABLE_NONE;\n"
-"single_declaration_space_2\n"
-" space .and identifier .and single_declaration_3;\n"
-"single_declaration_nospace_2\n"
-" identifier .and single_declaration_3;\n"
-"single_declaration_3\n"
-" single_declaration_4 .or single_declaration_5 .or .true .emit VARIABLE_NONE;\n"
-"single_declaration_4\n"
-" equals .and initializer .emit VARIABLE_INITIALIZER;\n"
-"single_declaration_5\n"
-" lbracket .and single_declaration_6 .and rbracket;\n"
-"single_declaration_6\n"
-" constant_expression .emit VARIABLE_ARRAY_EXPLICIT .or .true .emit VARIABLE_ARRAY_UNKNOWN;\n"
-"fully_specified_type_space\n"
-" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_space;\n"
-"fully_specified_type_nospace\n"
-" fully_specified_type_optinvariant .and fully_specified_type_optcentroid .and fully_specified_type_optqual .and fully_specified_type_optprec .and type_specifier_nospace;\n"
-"fully_specified_type_optinvariant\n"
-" fully_specified_type_invariant .or .true .emit TYPE_VARIANT;\n"
-"fully_specified_type_invariant\n"
-" invariant_qualifier .and space;\n"
-"fully_specified_type_optcentroid\n"
-" fully_specified_type_centroid .or .true .emit TYPE_CENTER;\n"
-"fully_specified_type_centroid\n"
-" centroid_qualifier .and space;\n"
-"fully_specified_type_optqual\n"
-" fully_specified_type_qual .or .true .emit TYPE_QUALIFIER_NONE;\n"
-"fully_specified_type_qual\n"
-" type_qualifier .and space;\n"
-"fully_specified_type_optprec\n"
-" fully_specified_type_prec .or .true .emit PRECISION_DEFAULT;\n"
-"fully_specified_type_prec\n"
-" precision .and space;\n"
-"invariant_qualifier\n"
-" \"invariant\" .emit TYPE_INVARIANT;\n"
-"centroid_qualifier\n"
-" \"centroid\" .emit TYPE_CENTROID;\n"
-"type_qualifier\n"
-" \"const\" .emit TYPE_QUALIFIER_CONST .or\n"
-" .if (shader_type == 2) \"attribute\" .emit TYPE_QUALIFIER_ATTRIBUTE .or\n"
-" \"varying\" .emit TYPE_QUALIFIER_VARYING .or\n"
-" \"uniform\" .emit TYPE_QUALIFIER_UNIFORM .or\n"
-" .if (parsing_builtin != 0) \"__fixed_output\" .emit TYPE_QUALIFIER_FIXEDOUTPUT .or\n"
-" .if (parsing_builtin != 0) \"__fixed_input\" .emit TYPE_QUALIFIER_FIXEDINPUT;\n"
-"type_specifier_nonarray_space\n"
-" \"void\" .emit TYPE_SPECIFIER_VOID .or\n"
-" \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n"
-" \"int\" .emit TYPE_SPECIFIER_INT .or\n"
-" \"bool\" .emit TYPE_SPECIFIER_BOOL .or\n"
-" \"vec2\" .emit TYPE_SPECIFIER_VEC2 .or\n"
-" \"vec3\" .emit TYPE_SPECIFIER_VEC3 .or\n"
-" \"vec4\" .emit TYPE_SPECIFIER_VEC4 .or\n"
-" \"bvec2\" .emit TYPE_SPECIFIER_BVEC2 .or\n"
-" \"bvec3\" .emit TYPE_SPECIFIER_BVEC3 .or\n"
-" \"bvec4\" .emit TYPE_SPECIFIER_BVEC4 .or\n"
-" \"ivec2\" .emit TYPE_SPECIFIER_IVEC2 .or\n"
-" \"ivec3\" .emit TYPE_SPECIFIER_IVEC3 .or\n"
-" \"ivec4\" .emit TYPE_SPECIFIER_IVEC4 .or\n"
-" \"mat2\" .emit TYPE_SPECIFIER_MAT2 .or\n"
-" \"mat3\" .emit TYPE_SPECIFIER_MAT3 .or\n"
-" \"mat4\" .emit TYPE_SPECIFIER_MAT4 .or\n"
-" \"mat2x3\" .emit TYPE_SPECIFIER_MAT23 .or\n"
-" \"mat3x2\" .emit TYPE_SPECIFIER_MAT32 .or\n"
-" \"mat2x4\" .emit TYPE_SPECIFIER_MAT24 .or\n"
-" \"mat4x2\" .emit TYPE_SPECIFIER_MAT42 .or\n"
-" \"mat3x4\" .emit TYPE_SPECIFIER_MAT34 .or\n"
-" \"mat4x3\" .emit TYPE_SPECIFIER_MAT43 .or\n"
-" \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n"
-" \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n"
-" \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n"
-" \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n"
-" \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n"
-" \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n"
-" \"sampler2DRect\" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or\n"
-" \"sampler2DRectShadow\" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW .or\n"
-" type_name .emit TYPE_SPECIFIER_TYPENAME;\n"
-"type_specifier_nonarray_nospace\n"
-" struct_specifier .emit TYPE_SPECIFIER_STRUCT;\n"
-"type_specifier_nonarray\n"
-" type_specifier_nonarray_nospace .or type_specifier_nonarray_space;\n"
-"type_specifier_space\n"
-" type_specifier_nonarray_space .and .true .emit TYPE_SPECIFIER_NONARRAY;\n"
-"type_specifier_nospace\n"
-" type_specifier_nospace_array .or type_specifier_nospace_1;\n"
-"type_specifier_nospace_1\n"
-" type_specifier_nonarray_nospace .and .true .emit TYPE_SPECIFIER_NONARRAY;\n"
-"type_specifier_nospace_array\n"
-" type_specifier_nonarray .and lbracket .emit TYPE_SPECIFIER_ARRAY .and constant_expression .and rbracket;\n"
-"struct_specifier\n"
-" \"struct\" .and struct_specifier_1 .and optional_space .and lbrace .error LBRACE_EXPECTED .and\n"
-" struct_declaration_list .and rbrace .emit FIELD_NONE;\n"
-"struct_specifier_1\n"
-" struct_specifier_2 .or .true .emit '\\0';\n"
-"struct_specifier_2\n"
-" space .and identifier;\n"
-"struct_declaration_list\n"
-" struct_declaration .and .loop struct_declaration .emit FIELD_NEXT;\n"
-"struct_declaration\n"
-" struct_declaration_nospace .or struct_declaration_space;\n"
-"struct_declaration_space\n"
-" type_specifier_space .and space .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n"
-"struct_declaration_nospace\n"
-" type_specifier_nospace .and struct_declarator_list .and semicolon .emit FIELD_NONE;\n"
-"struct_declarator_list\n"
-" struct_declarator .and .loop struct_declarator_list_1 .emit FIELD_NEXT;\n"
-"struct_declarator_list_1\n"
-" comma .and struct_declarator;\n"
-"struct_declarator\n"
-" identifier .and struct_declarator_1;\n"
-"struct_declarator_1\n"
-" struct_declarator_2 .emit FIELD_ARRAY .or .true .emit FIELD_NONE;\n"
-"struct_declarator_2\n"
-" lbracket .and constant_expression .and rbracket;\n"
-"initializer\n"
-" assignment_expression .and .true .emit OP_END;\n"
-"declaration_statement\n"
-" declaration;\n"
-"statement\n"
-" compound_statement .or simple_statement;\n"
-"statement_space\n"
-" compound_statement .or statement_space_1;\n"
-"statement_space_1\n"
-" space .and simple_statement;\n"
-"simple_statement\n"
-" .if (parsing_builtin != 0) __asm_statement .emit OP_ASM .or\n"
-" selection_statement .or\n"
-" iteration_statement .or\n"
-" precision_stmt .emit OP_PRECISION .or\n"
-" jump_statement .or\n"
-" expression_statement .emit OP_EXPRESSION .or\n"
-" declaration_statement .emit OP_DECLARE;\n"
-"compound_statement\n"
-" compound_statement_1 .emit OP_BLOCK_BEGIN_NEW_SCOPE .and .true .emit OP_END;\n"
-"compound_statement_1\n"
-" compound_statement_2 .or compound_statement_3;\n"
-"compound_statement_2\n"
-" lbrace .and rbrace;\n"
-"compound_statement_3\n"
-" lbrace .and statement_list .and rbrace;\n"
-"compound_statement_no_new_scope\n"
-" compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;\n"
-"compound_statement_no_new_scope_1\n"
-" compound_statement_no_new_scope_2 .or compound_statement_no_new_scope_3;\n"
-"compound_statement_no_new_scope_2\n"
-" lbrace .and rbrace;\n"
-"compound_statement_no_new_scope_3\n"
-" lbrace .and statement_list .and rbrace;\n"
-"statement_list\n"
-" statement .and .loop statement;\n"
-"expression_statement\n"
-" expression_statement_1 .or expression_statement_2;\n"
-"expression_statement_1\n"
-" semicolon .emit OP_PUSH_VOID .emit OP_END;\n"
-"expression_statement_2\n"
-" expression .and semicolon .emit OP_END;\n"
-"selection_statement\n"
-" \"if\" .emit OP_IF .and lparen .error LPAREN_EXPECTED .and expression .and\n"
-" rparen .error RPAREN_EXPECTED .emit OP_END .and selection_rest_statement;\n"
-"selection_rest_statement\n"
-" statement .and selection_rest_statement_1;\n"
-"selection_rest_statement_1\n"
-" selection_rest_statement_2 .or .true .emit OP_EXPRESSION .emit OP_PUSH_VOID .emit OP_END;\n"
-"selection_rest_statement_2\n"
-" \"else\" .and optional_space .and statement;\n"
-"condition\n"
-" condition_1 .emit OP_DECLARE .emit DECLARATION_INIT_DECLARATOR_LIST .or\n"
-" condition_3 .emit OP_EXPRESSION;\n"
-"condition_1\n"
-" condition_1_nospace .or condition_1_space;\n"
-"condition_1_nospace\n"
-" fully_specified_type_nospace .and condition_2;\n"
-"condition_1_space\n"
-" fully_specified_type_space .and space .and condition_2;\n"
-"condition_2\n"
-" identifier .emit VARIABLE_IDENTIFIER .and equals .emit VARIABLE_INITIALIZER .and\n"
-" initializer .and .true .emit DECLARATOR_NONE;\n"
-"condition_3\n"
-" expression .and .true .emit OP_END;\n"
-"iteration_statement\n"
-" iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;\n"
-"iteration_statement_1\n"
-" \"while\" .emit OP_WHILE .and lparen .error LPAREN_EXPECTED .and condition .and\n"
-" rparen .error RPAREN_EXPECTED .and statement;\n"
-"iteration_statement_2\n"
-" \"do\" .emit OP_DO .and statement_space .and \"while\" .and lparen .error LPAREN_EXPECTED .and\n"
-" expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n"
-"iteration_statement_3\n"
-" \"for\" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and\n"
-" for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement;\n"
-"for_init_statement\n"
-" expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;\n"
-"conditionopt\n"
-" condition .or\n"
-" .true .emit OP_EXPRESSION .emit OP_PUSH_BOOL .emit 2 .emit '1' .emit '\\0' .emit OP_END;\n"
-"for_rest_statement\n"
-" conditionopt .and semicolon .and for_rest_statement_1;\n"
-"for_rest_statement_1\n"
-" for_rest_statement_2 .or .true .emit OP_PUSH_VOID .emit OP_END;\n"
-"for_rest_statement_2\n"
-" expression .and .true .emit OP_END;\n"
-"jump_statement\n"
-" jump_statement_1 .or jump_statement_2 .or jump_statement_3 .or jump_statement_4 .or\n"
-" .if (shader_type == 1) jump_statement_5;\n"
-"jump_statement_1\n"
-" \"continue\" .and semicolon .emit OP_CONTINUE;\n"
-"jump_statement_2\n"
-" \"break\" .and semicolon .emit OP_BREAK;\n"
-"jump_statement_3\n"
-" \"return\" .emit OP_RETURN .and optional_space .and expression .and semicolon .emit OP_END;\n"
-"jump_statement_4\n"
-" \"return\" .emit OP_RETURN .and semicolon .emit OP_PUSH_VOID .emit OP_END;\n"
-"jump_statement_5\n"
-" \"discard\" .and semicolon .emit OP_DISCARD;\n"
-"__asm_statement\n"
-" \"__asm\" .and space .and identifier .and space .and asm_arguments .and semicolon .emit OP_END;\n"
-"asm_arguments\n"
-" asm_argument .and .true .emit OP_END .and .loop asm_arguments_1;\n"
-"asm_arguments_1\n"
-" comma .and asm_argument .and .true .emit OP_END;\n"
-"asm_argument\n"
-" var_with_field .or\n"
-" variable_identifier .or\n"
-" floatconstant;\n"
-"var_with_field\n"
-" variable_identifier .and dot .and field_selection .emit OP_FIELD;\n"
-"translation_unit\n"
-" optional_space .emit REVISION .and external_declaration .error INVALID_EXTERNAL_DECLARATION .and\n"
-" .loop external_declaration .and optional_space .and\n"
-" '\\0' .error INVALID_EXTERNAL_DECLARATION .emit EXTERNAL_NULL;\n"
-"external_declaration\n"
-" precision_stmt .emit DEFAULT_PRECISION .or\n"
-" function_definition .emit EXTERNAL_FUNCTION_DEFINITION .or\n"
-" invariant_stmt .emit INVARIANT_STMT .or\n"
-" declaration .emit EXTERNAL_DECLARATION;\n"
-"precision_stmt\n"
-" \"precision\" .and space .and precision .error INVALID_PRECISION .and space .and prectype .error INVALID_PRECISION_TYPE .and semicolon;\n"
-"precision\n"
-" \"lowp\" .emit PRECISION_LOW .or\n"
-" \"mediump\" .emit PRECISION_MEDIUM .or\n"
-" \"highp\" .emit PRECISION_HIGH;\n"
-"prectype\n"
-" \"int\" .emit TYPE_SPECIFIER_INT .or\n"
-" \"float\" .emit TYPE_SPECIFIER_FLOAT .or\n"
-" \"sampler1D\" .emit TYPE_SPECIFIER_SAMPLER1D .or\n"
-" \"sampler2D\" .emit TYPE_SPECIFIER_SAMPLER2D .or\n"
-" \"sampler3D\" .emit TYPE_SPECIFIER_SAMPLER3D .or\n"
-" \"samplerCube\" .emit TYPE_SPECIFIER_SAMPLERCUBE .or\n"
-" \"sampler1DShadow\" .emit TYPE_SPECIFIER_SAMPLER1DSHADOW .or\n"
-" \"sampler2DShadow\" .emit TYPE_SPECIFIER_SAMPLER2DSHADOW .or\n"
-" \"sampler2DRect\" .emit TYPE_SPECIFIER_SAMPLER2DRECT .or\n"
-" \"sampler2DRectShadow\" .emit TYPE_SPECIFIER_SAMPLER2DRECTSHADOW;\n"
-"invariant_stmt\n"
-" \"invariant\" .and space .and identifier .and semicolon;\n"
-"function_definition\n"
-" function_prototype .and compound_statement_no_new_scope;\n"
-"digit_oct\n"
-" '0'-'7';\n"
-"digit_dec\n"
-" '0'-'9';\n"
-"digit_hex\n"
-" '0'-'9' .or 'A'-'F' .or 'a'-'f';\n"
-"id_character_first\n"
-" 'a'-'z' .or 'A'-'Z' .or '_';\n"
-"id_character_next\n"
-" id_character_first .or digit_dec;\n"
-"identifier\n"
-" id_character_first .emit * .and .loop id_character_next .emit * .and .true .emit '\\0';\n"
-"float\n"
-" float_1 .or float_2 .or float_3;\n"
-"float_1\n"
-" float_fractional_constant .and float_optional_exponent_part .and optional_f_suffix;\n"
-"float_2\n"
-" float_digit_sequence .and .true .emit '\\0' .and float_exponent_part .and optional_f_suffix;\n"
-"float_3\n"
-" float_digit_sequence .and .true .emit '\\0' .and 'f' .emit '\\0';\n"
-"float_fractional_constant\n"
-" float_fractional_constant_1 .or float_fractional_constant_2 .or float_fractional_constant_3;\n"
-"float_fractional_constant_1\n"
-" float_digit_sequence .and '.' .and float_digit_sequence;\n"
-"float_fractional_constant_2\n"
-" float_digit_sequence .and '.' .and .true .emit '\\0';\n"
-"float_fractional_constant_3\n"
-" '.' .emit '\\0' .and float_digit_sequence;\n"
-"float_optional_exponent_part\n"
-" float_exponent_part .or .true .emit '\\0';\n"
-"float_digit_sequence\n"
-" digit_dec .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
-"float_exponent_part\n"
-" float_exponent_part_1 .or float_exponent_part_2;\n"
-"float_exponent_part_1\n"
-" 'e' .and float_optional_sign .and float_digit_sequence;\n"
-"float_exponent_part_2\n"
-" 'E' .and float_optional_sign .and float_digit_sequence;\n"
-"float_optional_sign\n"
-" float_sign .or .true;\n"
-"float_sign\n"
-" '+' .or '-' .emit '-';\n"
-"optional_f_suffix\n"
-" 'f' .or .true;\n"
-"integer\n"
-" integer_hex .or integer_oct .or integer_dec;\n"
-"integer_hex\n"
-" '0' .and integer_hex_1 .emit 0x10 .and digit_hex .emit * .and .loop digit_hex .emit * .and\n"
-" .true .emit '\\0';\n"
-"integer_hex_1\n"
-" 'x' .or 'X';\n"
-"integer_oct\n"
-" '0' .emit 8 .emit * .and .loop digit_oct .emit * .and .true .emit '\\0';\n"
-"integer_dec\n"
-" digit_dec .emit 10 .emit * .and .loop digit_dec .emit * .and .true .emit '\\0';\n"
-"boolean\n"
-" \"true\" .emit 2 .emit '1' .emit '\\0' .or\n"
-" \"false\" .emit 2 .emit '0' .emit '\\0';\n"
-"type_name\n"
-" identifier;\n"
-"field_selection\n"
-" identifier;\n"
-"floatconstant\n"
-" float .emit OP_PUSH_FLOAT;\n"
-"intconstant\n"
-" integer .emit OP_PUSH_INT;\n"
-"boolconstant\n"
-" boolean .emit OP_PUSH_BOOL;\n"
-"optional_space\n"
-" .loop single_space;\n"
-"space\n"
-" single_space .and .loop single_space;\n"
-"single_space\n"
-" white_char .or c_style_comment_block .or cpp_style_comment_block;\n"
-"white_char\n"
-" ' ' .or '\\t' .or new_line .or '\\v' .or '\\f';\n"
-"new_line\n"
-" cr_lf .or lf_cr .or '\\n' .or '\\r';\n"
-"cr_lf\n"
-" '\\r' .and '\\n';\n"
-"lf_cr\n"
-" '\\n' .and '\\r';\n"
-"c_style_comment_block\n"
-" '/' .and '*' .and c_style_comment_rest;\n"
-"c_style_comment_rest\n"
-" .loop c_style_comment_char_no_star .and c_style_comment_rest_1;\n"
-"c_style_comment_rest_1\n"
-" c_style_comment_end .or c_style_comment_rest_2;\n"
-"c_style_comment_rest_2\n"
-" '*' .and c_style_comment_rest;\n"
-"c_style_comment_char_no_star\n"
-" '\\x2B'-'\\xFF' .or '\\x01'-'\\x29';\n"
-"c_style_comment_end\n"
-" '*' .and '/';\n"
-"cpp_style_comment_block\n"
-" '/' .and '/' .and cpp_style_comment_block_1;\n"
-"cpp_style_comment_block_1\n"
-" cpp_style_comment_block_2 .or cpp_style_comment_block_3;\n"
-"cpp_style_comment_block_2\n"
-" .loop cpp_style_comment_char .and new_line;\n"
-"cpp_style_comment_block_3\n"
-" .loop cpp_style_comment_char;\n"
-"cpp_style_comment_char\n"
-" '\\x0E'-'\\xFF' .or '\\x01'-'\\x09' .or '\\x0B'-'\\x0C';\n"
-"ampersandampersand\n"
-" optional_space .and '&' .and '&' .and optional_space;\n"
-"barbar\n"
-" optional_space .and '|' .and '|' .and optional_space;\n"
-"bang\n"
-" optional_space .and '!' .and optional_space;\n"
-"bangequals\n"
-" optional_space .and '!' .and '=' .and optional_space;\n"
-"caretcaret\n"
-" optional_space .and '^' .and '^' .and optional_space;\n"
-"colon\n"
-" optional_space .and ':' .and optional_space;\n"
-"comma\n"
-" optional_space .and ',' .and optional_space;\n"
-"dot\n"
-" optional_space .and '.' .and optional_space;\n"
-"equals\n"
-" optional_space .and '=' .and optional_space;\n"
-"equalsequals\n"
-" optional_space .and '=' .and '=' .and optional_space;\n"
-"greater\n"
-" optional_space .and '>' .and optional_space;\n"
-"greaterequals\n"
-" optional_space .and '>' .and '=' .and optional_space;\n"
-"lbrace\n"
-" optional_space .and '{' .and optional_space;\n"
-"lbracket\n"
-" optional_space .and '[' .and optional_space;\n"
-"less\n"
-" optional_space .and '<' .and optional_space;\n"
-"lessequals\n"
-" optional_space .and '<' .and '=' .and optional_space;\n"
-"lparen\n"
-" optional_space .and '(' .and optional_space;\n"
-"minus\n"
-" optional_space .and '-' .and optional_space;\n"
-"minusequals\n"
-" optional_space .and '-' .and '=' .and optional_space;\n"
-"minusminus\n"
-" optional_space .and '-' .and '-' .and optional_space;\n"
-"plus\n"
-" optional_space .and '+' .and optional_space;\n"
-"plusequals\n"
-" optional_space .and '+' .and '=' .and optional_space;\n"
-"plusplus\n"
-" optional_space .and '+' .and '+' .and optional_space;\n"
-"question\n"
-" optional_space .and '?' .and optional_space;\n"
-"rbrace\n"
-" optional_space .and '}' .and optional_space;\n"
-"rbracket\n"
-" optional_space .and ']' .and optional_space;\n"
-"rparen\n"
-" optional_space .and ')' .and optional_space;\n"
-"semicolon\n"
-" optional_space .and ';' .and optional_space;\n"
-"slash\n"
-" optional_space .and '/' .and optional_space;\n"
-"slashequals\n"
-" optional_space .and '/' .and '=' .and optional_space;\n"
-"star\n"
-" optional_space .and '*' .and optional_space;\n"
-"starequals\n"
-" optional_space .and '*' .and '=' .and optional_space;\n"
-".string string_lexer;\n"
-"string_lexer\n"
-" lex_first_identifier_character .and .loop lex_next_identifier_character;\n"
-"lex_first_identifier_character\n"
-" 'a'-'z' .or 'A'-'Z' .or '_';\n"
-"lex_next_identifier_character\n"
-" 'a'-'z' .or 'A'-'Z' .or '0'-'9' .or '_';\n"
-"err_token\n"
-" '~' .or '`' .or '!' .or '@' .or '#' .or '$' .or '%' .or '^' .or '&' .or '*' .or '(' .or ')' .or\n"
-" '-' .or '+' .or '=' .or '|' .or '\\\\' .or '[' .or ']' .or '{' .or '}' .or ':' .or ';' .or '\"' .or\n"
-" '\\'' .or '<' .or ',' .or '>' .or '.' .or '/' .or '?' .or err_identifier;\n"
-"err_identifier\n"
-" id_character_first .and .loop id_character_next;\n"
-""
diff --git a/src/mesa/shader/slang/library/slang_version.syn b/src/mesa/shader/slang/library/slang_version.syn
deleted file mode 100644
index aaf8bef342f..00000000000
--- a/src/mesa/shader/slang/library/slang_version.syn
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 6.3
- *
- * Copyright (C) 2005 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_version.syn
- * slang #version directive syntax
- * \author Michal Krol
- */
-
-.syntax version_directive;
-
-version_directive
- version_directive_1 .and .loop version_directive_2;
-version_directive_1
- prior_optional_spaces .and optional_version_directive .and .true .emit $;
-version_directive_2
- prior_optional_spaces .and version_directive_body .and .true .emit $;
-
-optional_version_directive
- version_directive_body .or .true .emit 10 .emit 1;
-
-version_directive_body
- '#' .and optional_space .and "version" .and space .and version_number .and optional_space .and
- new_line;
-
-version_number
- version_number_110;
-
-version_number_110
- leading_zeroes .and "110" .emit 10 .emit 1;
-
-leading_zeroes
- .loop zero;
-
-zero
- '0';
-
-space
- single_space .and .loop single_space;
-
-optional_space
- .loop single_space;
-
-single_space
- ' ' .or '\t';
-
-prior_optional_spaces
- .loop prior_space;
-
-prior_space
- c_style_comment_block .or cpp_style_comment_block .or space .or new_line;
-
-c_style_comment_block
- '/' .and '*' .and c_style_comment_rest;
-
-c_style_comment_rest
- .loop c_style_comment_char_no_star .and c_style_comment_rest_1;
-c_style_comment_rest_1
- c_style_comment_end .or c_style_comment_rest_2;
-c_style_comment_rest_2
- '*' .and c_style_comment_rest;
-
-c_style_comment_char_no_star
- '\x2B'-'\xFF' .or '\x01'-'\x29';
-
-c_style_comment_end
- '*' .and '/';
-
-cpp_style_comment_block
- '/' .and '/' .and cpp_style_comment_block_1;
-cpp_style_comment_block_1
- cpp_style_comment_block_2 .or cpp_style_comment_block_3;
-cpp_style_comment_block_2
- .loop cpp_style_comment_char .and new_line;
-cpp_style_comment_block_3
- .loop cpp_style_comment_char;
-
-cpp_style_comment_char
- '\x0E'-'\xFF' .or '\x01'-'\x09' .or '\x0B'-'\x0C';
-
-new_line
- cr_lf .or lf_cr .or '\n' .or '\r';
-
-cr_lf
- '\r' .and '\n';
-
-lf_cr
- '\n' .and '\r';
-
-.string __string_filter;
-
-__string_filter
- .loop __identifier_char;
-
-__identifier_char
- 'a'-'z' .or 'A'-'Z' .or '_' .or '0'-'9';
-
diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h b/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
deleted file mode 100644
index e5a252b0196..00000000000
--- a/src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
+++ /dev/null
@@ -1,109 +0,0 @@
-
-/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE FOLLOWING FILE: */
-/* slang_vertex_builtin.gc */
-
-5,2,2,90,95,5,0,12,0,1,103,108,95,80,111,115,105,116,105,111,110,0,0,0,2,2,90,95,5,0,9,0,1,103,108,
-95,80,111,105,110,116,83,105,122,101,0,0,0,2,2,90,95,5,0,12,0,1,103,108,95,67,108,105,112,86,101,
-114,116,101,120,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,67,111,108,111,114,0,0,0,2,2,90,95,2,0,12,0,
-1,103,108,95,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,2,0,11,0,1,103,
-108,95,78,111,114,109,97,108,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,86,101,114,116,101,120,0,0,0,2,
-2,90,95,2,0,12,0,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,48,0,0,0,2,2,90,95,
-2,0,12,0,1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,49,0,0,0,2,2,90,95,2,0,12,0,
-1,103,108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,50,0,0,0,2,2,90,95,2,0,12,0,1,103,
-108,95,77,117,108,116,105,84,101,120,67,111,111,114,100,51,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,
-77,117,108,116,105,84,101,120,67,111,111,114,100,52,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,77,117,
-108,116,105,84,101,120,67,111,111,114,100,53,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,77,117,108,116,
-105,84,101,120,67,111,111,114,100,54,0,0,0,2,2,90,95,2,0,12,0,1,103,108,95,77,117,108,116,105,84,
-101,120,67,111,111,114,100,55,0,0,0,2,2,90,95,2,0,9,0,1,103,108,95,70,111,103,67,111,111,114,100,0,
-0,0,2,2,90,95,3,0,12,0,1,103,108,95,70,114,111,110,116,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,
-1,103,108,95,66,97,99,107,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,1,103,108,95,70,114,111,110,
-116,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,1,103,108,95,66,
-97,99,107,83,101,99,111,110,100,97,114,121,67,111,108,111,114,0,0,0,2,2,90,95,3,0,12,0,1,103,108,
-95,84,101,120,67,111,111,114,100,0,3,18,103,108,95,77,97,120,84,101,120,116,117,114,101,67,111,111,
-114,100,115,0,0,0,2,2,90,95,3,0,9,0,1,103,108,95,70,111,103,70,114,97,103,67,111,111,114,100,0,0,0,
-1,90,95,0,0,12,0,0,102,116,114,97,110,115,102,111,114,109,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
-18,103,108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,
-114,105,120,0,16,8,48,0,57,18,103,108,95,86,101,114,116,101,120,0,59,120,120,120,120,0,48,18,103,
-108,95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,
-120,0,16,10,49,0,57,18,103,108,95,86,101,114,116,101,120,0,59,121,121,121,121,0,48,46,18,103,108,
-95,77,111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,
-16,10,50,0,57,18,103,108,95,86,101,114,116,101,120,0,59,122,122,122,122,0,48,46,18,103,108,95,77,
-111,100,101,108,86,105,101,119,80,114,111,106,101,99,116,105,111,110,77,97,116,114,105,120,0,16,10,
-51,0,57,18,103,108,95,86,101,114,116,101,120,0,59,119,119,119,119,0,48,46,20,0,0,1,90,95,0,0,12,0,
-0,116,101,120,116,117,114,101,49,68,76,111,100,0,1,1,0,0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,
-0,9,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,
-100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,
-114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,
-115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,
-52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,0,1,1,0,
-0,16,0,115,97,109,112,108,101,114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,
-0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,
-18,99,111,111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,121,0,49,20,0,9,18,112,99,111,111,114,
-100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,0,
-18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,
-0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,49,68,80,114,111,106,76,111,100,0,1,1,0,0,16,0,
-115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,
-3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111,
-111,114,100,0,59,120,0,18,99,111,111,114,100,0,59,122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,
-119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,0,18,95,95,
-114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,
-95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,76,111,100,0,1,1,0,0,17,0,115,97,109,112,108,101,
-114,0,0,1,1,0,0,10,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,
-99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,0,18,99,111,111,114,100,0,59,
-120,121,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,
-101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,
-114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80,
-114,111,106,76,111,100,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,
-100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,
-99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,
-122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,
-101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,
-114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,50,68,80,
-114,111,106,76,111,100,0,1,1,0,0,17,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,
-100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,
-99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,
-122,0,49,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,
-101,120,95,50,100,95,98,105,97,115,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,
-114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,76,
-111,100,0,1,1,0,0,18,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,
-9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,
-52,0,59,120,121,122,0,18,99,111,111,114,100,0,59,120,121,122,0,20,0,9,18,99,111,111,114,100,52,0,
-59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,0,18,95,
-95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,
-90,95,0,0,12,0,0,116,101,120,116,117,114,101,51,68,80,114,111,106,76,111,100,0,1,1,0,0,18,0,115,97,
-109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,
-95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,121,122,0,18,99,
-111,111,114,100,0,59,120,121,122,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,
-114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,51,100,95,98,105,97,115,
-0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,
-0,0,0,1,90,95,0,0,12,0,0,116,101,120,116,117,114,101,67,117,98,101,76,111,100,0,1,1,0,0,19,0,115,
-97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,
-90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,
-111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,
-95,116,101,120,95,99,117,98,101,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,
-0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,76,111,100,0,
-1,1,0,0,20,0,115,97,109,112,108,101,114,0,0,1,1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,
-111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,
-120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,
-20,0,4,118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,
-95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,
-90,95,0,0,12,0,0,115,104,97,100,111,119,49,68,80,114,111,106,76,111,100,0,1,1,0,0,20,0,115,97,109,
-112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,
-0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,99,111,111,114,100,0,59,120,0,18,99,111,111,114,
-100,0,59,120,0,18,99,111,111,114,100,0,59,119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,
-99,111,111,114,100,0,59,122,0,20,0,9,18,112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,
-118,101,99,52,95,116,101,120,95,49,100,95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,
-101,116,86,97,108,0,0,18,115,97,109,112,108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,1,90,95,
-0,0,12,0,0,115,104,97,100,111,119,50,68,76,111,100,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,0,1,
-1,0,0,11,0,99,111,111,114,100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,99,111,111,
-114,100,52,0,0,0,9,18,99,111,111,114,100,52,0,59,120,121,122,0,18,99,111,111,114,100,0,20,0,9,18,
-99,111,111,114,100,52,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,50,100,95,
-98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,108,
-101,114,0,0,18,99,111,111,114,100,52,0,0,0,0,1,90,95,0,0,12,0,0,115,104,97,100,111,119,50,68,80,
-114,111,106,76,111,100,0,1,1,0,0,21,0,115,97,109,112,108,101,114,0,0,1,1,0,0,12,0,99,111,111,114,
-100,0,0,1,1,0,0,9,0,108,111,100,0,0,0,1,3,2,90,95,0,0,12,0,1,112,99,111,111,114,100,0,0,0,9,18,112,
-99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,120,121,0,18,99,111,111,114,100,0,59,
-119,0,49,20,0,9,18,112,99,111,111,114,100,0,59,122,0,18,99,111,111,114,100,0,59,122,0,20,0,9,18,
-112,99,111,111,114,100,0,59,119,0,18,108,111,100,0,20,0,4,118,101,99,52,95,116,101,120,95,50,100,
-95,98,105,97,115,95,115,104,97,100,111,119,0,18,95,95,114,101,116,86,97,108,0,0,18,115,97,109,112,
-108,101,114,0,0,18,112,99,111,111,114,100,0,0,0,0,0
diff --git a/src/mesa/shader/slang/library/syn_to_c.c b/src/mesa/shader/slang/library/syn_to_c.c
deleted file mode 100644
index f997edfd8b5..00000000000
--- a/src/mesa/shader/slang/library/syn_to_c.c
+++ /dev/null
@@ -1,72 +0,0 @@
-#include <stdio.h>
-
-static int was_space = 0;
-static int first_char = 1;
-
-static void put_char (int c)
-{
- if (c == '\n') {
- if (!first_char) {
- fputs ("\\n\"\n\"", stdout);
- first_char = 1;
- }
- }
- else {
- first_char = 0;
- if (c == '\\')
- fputs ("\\\\", stdout);
- else if (c == '\"')
- fputs ("\\\"", stdout);
- else if (!was_space || !(c == ' ' || c == '\t'))
- fputc (c, stdout);
- was_space = (c == ' ' || c == '\t');
- }
-}
-
-int main (int argc, char *argv[])
-{
- int c;
- FILE *f;
-
- if (argc == 1)
- return 1;
- f = fopen (argv[1], "r");
- if (f == NULL)
- return 1;
-
- fputs ("\n", stdout);
- fputs ("/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED FROM THE .syn FILE */\n", stdout);
- fputs ("\n", stdout);
- fputs ("\"", stdout);
- c = getc (f);
- while (c != EOF) {
- if (c == '/') {
- int c2 = getc (f);
- if (c2 == '*') {
- was_space = 0;
- c = getc (f);
- for (;;) {
- if (c == '*') {
- c2 = getc (f);
- if (c2 == '/')
- break;
- }
- c = getc (f);
- }
- }
- else {
- put_char (c);
- put_char (c2);
- }
- }
- else {
- put_char (c);
- }
- c = getc (f);
- }
- fputs ("\"\n", stdout);
-
- fclose (f);
- return 0;
-}
-
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 6a91d0f3f07..63d10f45978 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -35,10 +35,10 @@
#include "shader/prog_optimize.h"
#include "shader/prog_print.h"
#include "shader/prog_parameter.h"
-#include "shader/grammar/grammar_mesa.h"
+#include "../../glsl/pp/sl_pp_public.h"
+#include "../../glsl/cl/sl_cl_parse.h"
#include "slang_codegen.h"
#include "slang_compile.h"
-#include "slang_preprocess.h"
#include "slang_storage.h"
#include "slang_log.h"
#include "slang_mem.h"
@@ -125,7 +125,7 @@ _slang_code_object_dtr(slang_code_object * self)
typedef struct slang_parse_ctx_
{
- const byte *I;
+ const unsigned char *I;
slang_info_log *L;
int parsing_builtin;
GLboolean global_scope; /**< Is object being declared a global? */
@@ -181,22 +181,102 @@ parse_identifier(slang_parse_ctx * C)
}
static int
+is_hex_digit(char c)
+{
+ return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
+}
+
+static int
+parse_general_number(slang_parse_ctx *ctx, float *number)
+{
+ char *flt = NULL;
+
+ if (*ctx->I == '0') {
+ int value = 0;
+ const unsigned char *pi;
+
+ if (ctx->I[1] == 'x' || ctx->I[1] == 'X') {
+ ctx->I += 2;
+ if (!is_hex_digit(*ctx->I)) {
+ return 0;
+ }
+ do {
+ int digit;
+
+ if (*ctx->I >= '0' && *ctx->I <= '9') {
+ digit = (int)(*ctx->I - '0');
+ } else if (*ctx->I >= 'a' && *ctx->I <= 'f') {
+ digit = (int)(*ctx->I - 'a') + 10;
+ } else {
+ digit = (int)(*ctx->I - 'A') + 10;
+ }
+ value = value * 0x10 + digit;
+ ctx->I++;
+ } while (is_hex_digit(*ctx->I));
+ if (*ctx->I != '\0') {
+ return 0;
+ }
+ ctx->I++;
+ *number = (float)value;
+ return 1;
+ }
+
+ pi = ctx->I;
+ pi++;
+ while (*pi >= '0' && *pi <= '7') {
+ int digit;
+
+ digit = (int)(*pi - '0');
+ value = value * 010 + digit;
+ pi++;
+ }
+ if (*pi == '\0') {
+ pi++;
+ ctx->I = pi;
+ *number = (float)value;
+ return 1;
+ }
+ }
+
+ parse_identifier_str(ctx, &flt);
+ flt = strdup(flt);
+ if (!flt) {
+ return 0;
+ }
+ if (flt[strlen(flt) - 1] == 'f' || flt[strlen(flt) - 1] == 'F') {
+ flt[strlen(flt) - 1] = '\0';
+ }
+ *number = (float)_mesa_strtod(flt, (char **)NULL);
+ free(flt);
+
+ return 1;
+}
+
+static int
parse_number(slang_parse_ctx * C, int *number)
{
const int radix = (int) (*C->I++);
- *number = 0;
- while (*C->I != '\0') {
- int digit;
- if (*C->I >= '0' && *C->I <= '9')
- digit = (int) (*C->I - '0');
- else if (*C->I >= 'A' && *C->I <= 'Z')
- digit = (int) (*C->I - 'A') + 10;
- else
- digit = (int) (*C->I - 'a') + 10;
- *number = *number * radix + digit;
+
+ if (radix == 1) {
+ float f = 0.0f;
+
+ parse_general_number(C, &f);
+ *number = (int)f;
+ } else {
+ *number = 0;
+ while (*C->I != '\0') {
+ int digit;
+ if (*C->I >= '0' && *C->I <= '9')
+ digit = (int) (*C->I - '0');
+ else if (*C->I >= 'A' && *C->I <= 'Z')
+ digit = (int) (*C->I - 'A') + 10;
+ else
+ digit = (int) (*C->I - 'a') + 10;
+ *number = *number * radix + digit;
+ C->I++;
+ }
C->I++;
}
- C->I++;
if (*number > 65535)
slang_info_log_warning(C->L, "%d: literal integer overflow.", *number);
return 1;
@@ -205,32 +285,37 @@ parse_number(slang_parse_ctx * C, int *number)
static int
parse_float(slang_parse_ctx * C, float *number)
{
- char *integral = NULL;
- char *fractional = NULL;
- char *exponent = NULL;
- char *whole = NULL;
-
- parse_identifier_str(C, &integral);
- parse_identifier_str(C, &fractional);
- parse_identifier_str(C, &exponent);
-
- whole = (char *) _slang_alloc((_mesa_strlen(integral) +
- _mesa_strlen(fractional) +
- _mesa_strlen(exponent) + 3) * sizeof(char));
- if (whole == NULL) {
- slang_info_log_memory(C->L);
- RETURN0;
- }
+ if (*C->I == 1) {
+ C->I++;
+ parse_general_number(C, number);
+ } else {
+ char *integral = NULL;
+ char *fractional = NULL;
+ char *exponent = NULL;
+ char *whole = NULL;
+
+ parse_identifier_str(C, &integral);
+ parse_identifier_str(C, &fractional);
+ parse_identifier_str(C, &exponent);
+
+ whole = (char *) _slang_alloc((_mesa_strlen(integral) +
+ _mesa_strlen(fractional) +
+ _mesa_strlen(exponent) + 3) * sizeof(char));
+ if (whole == NULL) {
+ slang_info_log_memory(C->L);
+ RETURN0;
+ }
- slang_string_copy(whole, integral);
- slang_string_concat(whole, ".");
- slang_string_concat(whole, fractional);
- slang_string_concat(whole, "E");
- slang_string_concat(whole, exponent);
+ slang_string_copy(whole, integral);
+ slang_string_concat(whole, ".");
+ slang_string_concat(whole, fractional);
+ slang_string_concat(whole, "E");
+ slang_string_concat(whole, exponent);
- *number = (float) (_mesa_strtod(whole, (char **) NULL));
+ *number = (float) (_mesa_strtod(whole, (char **) NULL));
- _slang_free(whole);
+ _slang_free(whole);
+ }
return 1;
}
@@ -2455,7 +2540,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit,
}
static GLboolean
-compile_binary(const byte * prod, slang_code_unit * unit,
+compile_binary(const unsigned char * prod, slang_code_unit * unit,
GLuint version,
slang_unit_type type, slang_info_log * infolog,
slang_code_unit * builtin, slang_code_unit * downlink,
@@ -2488,17 +2573,56 @@ compile_binary(const byte * prod, slang_code_unit * unit,
}
static GLboolean
-compile_with_grammar(grammar id, const char *source, slang_code_unit * unit,
- slang_unit_type type, slang_info_log * infolog,
- slang_code_unit * builtin,
+compile_with_grammar(const char *source,
+ slang_code_unit *unit,
+ slang_unit_type type,
+ slang_info_log *infolog,
+ slang_code_unit *builtin,
struct gl_shader *shader,
- const struct gl_extensions *extensions,
- struct gl_sl_pragmas *pragmas)
+ struct gl_sl_pragmas *pragmas,
+ unsigned int shader_type,
+ unsigned int parsing_builtin)
{
- byte *prod;
- GLuint size, start, version;
- slang_string preprocessed;
- GLuint maxVersion;
+ struct sl_pp_purify_options options;
+ struct sl_pp_context *context;
+ unsigned char *prod;
+ GLuint size;
+ unsigned int version;
+ unsigned int maxVersion;
+ int result;
+ char errmsg[200] = "";
+
+ assert(shader_type == 1 || shader_type == 2);
+
+ memset(&options, 0, sizeof(options));
+
+ context = sl_pp_context_create(source, &options);
+ if (!context) {
+ slang_info_log_error(infolog, "out of memory");
+ return GL_FALSE;
+ }
+
+ if (sl_pp_version(context, &version)) {
+ slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context));
+ sl_pp_context_destroy(context);
+ return GL_FALSE;
+ }
+
+ if (sl_pp_context_add_extension(context, "ARB_draw_buffers", "GL_ARB_draw_buffers") ||
+ sl_pp_context_add_extension(context, "ARB_texture_rectangle", "GL_ARB_texture_rectangle")) {
+ slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context));
+ sl_pp_context_destroy(context);
+ return GL_FALSE;
+ }
+
+#if FEATURE_es2_glsl
+ if (sl_pp_context_add_predefined(context, "GL_ES", "1") ||
+ sl_pp_context_add_predefined(context, "GL_FRAGMENT_PRECISION_HIGH", "1")) {
+ slang_info_log_error(infolog, "%s", sl_pp_context_error_message(context));
+ sl_pp_context_destroy(context);
+ return GL_FALSE;
+ }
+#endif
#if FEATURE_ARB_shading_language_120
maxVersion = 120;
@@ -2508,36 +2632,30 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit,
maxVersion = 110;
#endif
- /* First retrieve the version number. */
- if (!_slang_preprocess_version(source, &version, &start, infolog))
- return GL_FALSE;
-
- if (version > maxVersion) {
+ if (version > maxVersion ||
+ (version != 100 && version != 110 && version != 120)) {
slang_info_log_error(infolog,
"language version %.2f is not supported.",
version * 0.01);
- return GL_FALSE;
- }
-
- /* Now preprocess the source string. */
- slang_string_init(&preprocessed);
- if (!_slang_preprocess_directives(&preprocessed, &source[start],
- infolog, extensions, pragmas)) {
- slang_string_free(&preprocessed);
- slang_info_log_error(infolog, "failed to preprocess the source.");
+ sl_pp_context_destroy(context);
return GL_FALSE;
}
/* Finally check the syntax and generate its binary representation. */
- if (!grammar_fast_check(id,
- (const byte *) (slang_string_cstr(&preprocessed)),
- &prod, &size, 65536)) {
- char buf[1024];
- GLint pos;
-
- slang_string_free(&preprocessed);
- grammar_get_last_error((byte *) (buf), sizeof(buf), &pos);
- slang_info_log_error(infolog, buf);
+ result = sl_cl_compile(context,
+ shader_type,
+ parsing_builtin,
+ &prod,
+ &size,
+ errmsg,
+ sizeof(errmsg));
+
+ sl_pp_context_destroy(context);
+
+ if (result) {
+ /*GLint pos;*/
+
+ slang_info_log_error(infolog, errmsg);
/* syntax error (possibly in library code) */
#if 0
{
@@ -2551,77 +2669,64 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit,
#endif
return GL_FALSE;
}
- slang_string_free(&preprocessed);
/* Syntax is okay - translate it to internal representation. */
if (!compile_binary(prod, unit, version, type, infolog, builtin,
&builtin[SLANG_BUILTIN_TOTAL - 1],
shader)) {
- grammar_alloc_free(prod);
+ free(prod);
return GL_FALSE;
}
- grammar_alloc_free(prod);
+ free(prod);
return GL_TRUE;
}
-LONGSTRING static const char *slang_shader_syn =
-#include "library/slang_shader_syn.h"
- ;
-
-static const byte slang_core_gc[] = {
+static const unsigned char slang_core_gc[] = {
#include "library/slang_core_gc.h"
};
-static const byte slang_120_core_gc[] = {
+static const unsigned char slang_120_core_gc[] = {
#include "library/slang_120_core_gc.h"
};
-static const byte slang_120_fragment_gc[] = {
+static const unsigned char slang_120_fragment_gc[] = {
#include "library/slang_builtin_120_fragment_gc.h"
};
-static const byte slang_common_builtin_gc[] = {
+static const unsigned char slang_common_builtin_gc[] = {
#include "library/slang_common_builtin_gc.h"
};
-static const byte slang_fragment_builtin_gc[] = {
+static const unsigned char slang_fragment_builtin_gc[] = {
#include "library/slang_fragment_builtin_gc.h"
};
-static const byte slang_vertex_builtin_gc[] = {
+static const unsigned char slang_vertex_builtin_gc[] = {
#include "library/slang_vertex_builtin_gc.h"
};
static GLboolean
-compile_object(grammar * id, const char *source, slang_code_object * object,
- slang_unit_type type, slang_info_log * infolog,
+compile_object(const char *source,
+ slang_code_object *object,
+ slang_unit_type type,
+ slang_info_log *infolog,
struct gl_shader *shader,
- const struct gl_extensions *extensions,
struct gl_sl_pragmas *pragmas)
{
slang_code_unit *builtins = NULL;
GLuint base_version = 110;
-
- /* load GLSL grammar */
- *id = grammar_load_from_text((const byte *) (slang_shader_syn));
- if (*id == 0) {
- byte buf[1024];
- int pos;
-
- grammar_get_last_error(buf, 1024, &pos);
- slang_info_log_error(infolog, (const char *) (buf));
- return GL_FALSE;
- }
+ unsigned int shader_type;
+ unsigned int parsing_builtin;
/* set shader type - the syntax is slightly different for different shaders */
- if (type == SLANG_UNIT_FRAGMENT_SHADER
- || type == SLANG_UNIT_FRAGMENT_BUILTIN)
- grammar_set_reg8(*id, (const byte *) "shader_type", 1);
- else
- grammar_set_reg8(*id, (const byte *) "shader_type", 2);
+ if (type == SLANG_UNIT_FRAGMENT_SHADER || type == SLANG_UNIT_FRAGMENT_BUILTIN) {
+ shader_type = 1;
+ } else {
+ shader_type = 2;
+ }
/* enable language extensions */
- grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1);
+ parsing_builtin = 1;
/* if parsing user-specified shader, load built-in library */
if (type == SLANG_UNIT_FRAGMENT_SHADER || type == SLANG_UNIT_VERTEX_SHADER) {
@@ -2686,51 +2791,24 @@ compile_object(grammar * id, const char *source, slang_code_object * object,
}
/* disable language extensions */
-#if NEW_SLANG /* allow-built-ins */
- grammar_set_reg8(*id, (const byte *) "parsing_builtin", 1);
-#else
- grammar_set_reg8(*id, (const byte *) "parsing_builtin", 0);
-#endif
+ parsing_builtin = 0;
+
builtins = object->builtin;
}
/* compile the actual shader - pass-in built-in library for external shader */
- return compile_with_grammar(*id, source, &object->unit, type, infolog,
- builtins, shader, extensions, pragmas);
+ return compile_with_grammar(source,
+ &object->unit,
+ type,
+ infolog,
+ builtins,
+ shader,
+ pragmas,
+ shader_type,
+ parsing_builtin);
}
-static GLboolean
-compile_shader(GLcontext *ctx, slang_code_object * object,
- slang_unit_type type, slang_info_log * infolog,
- struct gl_shader *shader)
-{
- GLboolean success;
- grammar id = 0;
-
-#if 0 /* for debug */
- _mesa_printf("********* COMPILE SHADER ***********\n");
- _mesa_printf("%s\n", shader->Source);
- _mesa_printf("************************************\n");
-#endif
-
- assert(shader->Program);
-
- _slang_code_object_dtr(object);
- _slang_code_object_ctr(object);
-
- success = compile_object(&id, shader->Source, object, type, infolog, shader,
- &ctx->Extensions, &shader->Pragmas);
- if (id != 0)
- grammar_destroy(id);
- if (!success)
- return GL_FALSE;
-
- return GL_TRUE;
-}
-
-
-
GLboolean
_slang_compile(GLcontext *ctx, struct gl_shader *shader)
{
@@ -2771,7 +2849,12 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader)
slang_info_log_construct(&info_log);
_slang_code_object_ctr(&obj);
- success = compile_shader(ctx, &obj, type, &info_log, shader);
+ success = compile_object(shader->Source,
+ &obj,
+ type,
+ &info_log,
+ shader,
+ &shader->Pragmas);
/* free shader's prev info log */
if (shader->InfoLog) {
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index f812a3fbc56..c9ecbd275b8 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -80,8 +80,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++;
@@ -550,6 +550,9 @@ emit_instruction(slang_emit_info *emitInfo,
&srcRelAddr,
NULL,
NULL);
+ if (!inst) {
+ return NULL;
+ }
src[i] = &newSrc[i];
}
@@ -947,6 +950,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) */
@@ -956,6 +962,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");
@@ -971,6 +980,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");
}
}
@@ -1000,6 +1012,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 {
@@ -1009,12 +1024,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;
+ }
}
}
@@ -1024,6 +1045,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) {
@@ -1035,6 +1059,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");
}
@@ -1118,6 +1145,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,
@@ -1152,7 +1182,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;
}
@@ -1355,6 +1387,9 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n)
n->Children[1]->Store,
NULL,
NULL);
+ if (!inst) {
+ return NULL;
+ }
inst->TexShadow = shadow;
@@ -1457,6 +1492,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++;
@@ -1472,6 +1510,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,
@@ -1533,6 +1574,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);
@@ -1595,6 +1639,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]);
@@ -1645,12 +1692,17 @@ 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 {
@@ -1675,6 +1727,7 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n)
if (!inst) {
return NULL;
}
+ prog->Instructions[ifInstLoc].BranchTarget = prog->NumInstructions - 1;
}
else {
/* jump to endif instruction */
@@ -1684,8 +1737,8 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n)
}
inst_comment(inst, "else");
inst->DstReg.CondMask = COND_TR; /* always branch */
+ prog->Instructions[ifInstLoc].BranchTarget = prog->NumInstructions;
}
- prog->Instructions[ifInstLoc].BranchTarget = prog->NumInstructions;
emit(emitInfo, n->Children[2]);
}
else {
@@ -1700,8 +1753,14 @@ emit_if(slang_emit_info *emitInfo, slang_ir_node *n)
}
}
- if (n->Children[2]) {
- prog->Instructions[elseInstLoc].BranchTarget = prog->NumInstructions;
+ if (elseInstLoc) {
+ /* point ELSE instruction BranchTarget at ENDIF */
+ if (emitInfo->EmitHighLevelInstructions) {
+ prog->Instructions[elseInstLoc].BranchTarget = prog->NumInstructions - 1;
+ }
+ else {
+ prog->Instructions[elseInstLoc].BranchTarget = prog->NumInstructions;
+ }
}
return NULL;
}
@@ -1761,7 +1820,7 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n)
/* Done emitting loop code. Now walk over the loop's linked list of
* BREAK and CONT nodes, filling in their BranchTarget fields (which
- * will point to the ENDLOOP+1 or BGNLOOP instructions, respectively).
+ * will point to the corresponding ENDLOOP instruction.
*/
for (ir = n->List; ir; ir = ir->List) {
struct prog_instruction *inst = prog->Instructions + ir->InstLocation;
@@ -1770,8 +1829,13 @@ emit_loop(slang_emit_info *emitInfo, slang_ir_node *n)
ir->Opcode == IR_BREAK_IF_TRUE) {
assert(inst->Opcode == OPCODE_BRK ||
inst->Opcode == OPCODE_BRA);
- /* go to instruction after end of loop */
- inst->BranchTarget = endInstLoc + 1;
+ /* go to instruction at end of loop */
+ if (emitInfo->EmitHighLevelInstructions) {
+ inst->BranchTarget = endInstLoc;
+ }
+ else {
+ inst->BranchTarget = endInstLoc + 1;
+ }
}
else {
assert(ir->Opcode == IR_CONT ||
@@ -1874,6 +1938,9 @@ 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);
@@ -1886,7 +1953,7 @@ emit_cont_break_if_true(slang_emit_info *emitInfo, slang_ir_node *n)
}
emitInfo->prog->Instructions[ifInstLoc].BranchTarget
- = emitInfo->prog->NumInstructions;
+ = emitInfo->prog->NumInstructions - 1;
return inst;
}
}
@@ -2044,6 +2111,9 @@ emit_array_element(slang_emit_info *emitInfo, slang_ir_node *n)
indexStore, /* the index */
&elemSizeStore,
NULL);
+ if (!inst) {
+ return NULL;
+ }
indexStore = indexTemp;
}
@@ -2070,6 +2140,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;
}
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index e9f1ee44ced..21497b34e25 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -589,11 +589,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];
@@ -605,12 +610,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++) {
@@ -625,9 +634,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;
diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
deleted file mode 100644
index e9a24cc009a..00000000000
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ /dev/null
@@ -1,1406 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2005-2008 Brian Paul All Rights Reserved.
- * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/**
- * \file slang_preprocess.c
- * slang preprocessor
- * \author Michal Krol
- */
-
-#include "main/imports.h"
-#include "shader/grammar/grammar_mesa.h"
-#include "slang_preprocess.h"
-
-LONGSTRING static const char *slang_pp_directives_syn =
-#include "library/slang_pp_directives_syn.h"
-;
-
-LONGSTRING static const char *slang_pp_expression_syn =
-#include "library/slang_pp_expression_syn.h"
-;
-
-LONGSTRING static const char *slang_pp_version_syn =
-#include "library/slang_pp_version_syn.h"
-;
-
-static GLvoid
-grammar_error_to_log (slang_info_log *log)
-{
- char buf[1024];
- GLint pos;
-
- grammar_get_last_error ((byte *) (buf), sizeof (buf), &pos);
- if (buf[0] == 0) {
- _mesa_snprintf(buf, sizeof(buf), "Preprocessor error");
- }
- slang_info_log_error (log, buf);
-}
-
-GLboolean
-_slang_preprocess_version (const char *text, GLuint *version, GLuint *eaten, slang_info_log *log)
-{
- grammar id;
- byte *prod, *I;
- unsigned int size;
-
- id = grammar_load_from_text ((const byte *) (slang_pp_version_syn));
- if (id == 0) {
- grammar_error_to_log (log);
- return GL_FALSE;
- }
-
- if (!grammar_fast_check (id, (const byte *) (text), &prod, &size, 8)) {
- grammar_error_to_log (log);
- grammar_destroy (id);
- return GL_FALSE;
- }
-
- /* there can be multiple #version directives - grab the last one */
- I = &prod[size - 6];
- *version = (GLuint) (I[0]) + (GLuint) (I[1]) * 100;
- *eaten = (GLuint) (I[2]) + ((GLuint) (I[3]) << 8) + ((GLuint) (I[4]) << 16) + ((GLuint) (I[5]) << 24);
-
- grammar_destroy (id);
- grammar_alloc_free (prod);
- return GL_TRUE;
-}
-
-/*
- * The preprocessor does the following work.
- * 1. Remove comments. Each comment block is replaced with a single space and if the
- * block contains new-lines, they are preserved. This ensures that line numbers
- * stay the same and if a comment block delimits two tokens, the are delitmited
- * by the space after comment removal.
- * 2. Remove preprocessor directives from the source string, checking their syntax and
- * executing them if appropriate. Again, new-lines are preserved.
- * 3. Expand macros.
- * 4. Tokenize the source string by ensuring there is at least one space between every
- * two adjacent tokens.
- */
-
-#define PP_ANNOTATE 0
-
-static GLvoid
-pp_annotate (slang_string *output, const char *fmt, ...)
-{
-#if PP_ANNOTATE
- va_list va;
- char buffer[1024];
-
- va_start (va, fmt);
- _mesa_vsprintf (buffer, fmt, va);
- va_end (va);
- slang_string_pushs (output, buffer, _mesa_strlen (buffer));
-#else
- (GLvoid) (output);
- (GLvoid) (fmt);
-#endif
-}
-
- /*
- * The expression is executed on a fixed-sized stack. The PUSH macro makes a runtime
- * check if the stack is not overflown by too complex expressions. In that situation the
- * GLSL preprocessor should report internal compiler error.
- * The BINARYDIV makes a runtime check if the divider is not 0. If it is, it reports
- * compilation error.
- */
-
-#define EXECUTION_STACK_SIZE 1024
-
-#define PUSH(x)\
- do {\
- if (sp == 0) {\
- slang_info_log_error (elog, "internal compiler error: preprocessor execution stack overflow.");\
- return GL_FALSE;\
- }\
- stack[--sp] = x;\
- } while (GL_FALSE)
-
-#define POP(x)\
- do {\
- assert (sp < EXECUTION_STACK_SIZE);\
- x = stack[sp++];\
- } while (GL_FALSE)
-
-#define BINARY(op)\
- do {\
- GLint a, b;\
- POP(b);\
- POP(a);\
- PUSH(a op b);\
- } while (GL_FALSE)
-
-#define BINARYDIV(op)\
- do {\
- GLint a, b;\
- POP(b);\
- POP(a);\
- if (b == 0) {\
- slang_info_log_error (elog, "division by zero in preprocessor expression.");\
- return GL_FALSE;\
- }\
- PUSH(a op b);\
- } while (GL_FALSE)
-
-#define UNARY(op)\
- do {\
- GLint a;\
- POP(a);\
- PUSH(op a);\
- } while (GL_FALSE)
-
-#define OP_END 0
-#define OP_PUSHINT 1
-#define OP_LOGICALOR 2
-#define OP_LOGICALAND 3
-#define OP_OR 4
-#define OP_XOR 5
-#define OP_AND 6
-#define OP_EQUAL 7
-#define OP_NOTEQUAL 8
-#define OP_LESSEQUAL 9
-#define OP_GREATEREQUAL 10
-#define OP_LESS 11
-#define OP_GREATER 12
-#define OP_LEFTSHIFT 13
-#define OP_RIGHTSHIFT 14
-#define OP_ADD 15
-#define OP_SUBTRACT 16
-#define OP_MULTIPLY 17
-#define OP_DIVIDE 18
-#define OP_MODULUS 19
-#define OP_PLUS 20
-#define OP_MINUS 21
-#define OP_NEGATE 22
-#define OP_COMPLEMENT 23
-
-static GLboolean
-execute_expression (slang_string *output, const byte *code, GLuint *pi, GLint *result,
- slang_info_log *elog)
-{
- GLuint i = *pi;
- GLint stack[EXECUTION_STACK_SIZE];
- GLuint sp = EXECUTION_STACK_SIZE;
-
- while (code[i] != OP_END) {
- switch (code[i++]) {
- case OP_PUSHINT:
- i++;
- PUSH(_mesa_atoi ((const char *) (&code[i])));
- i += _mesa_strlen ((const char *) (&code[i])) + 1;
- break;
- case OP_LOGICALOR:
- BINARY(||);
- break;
- case OP_LOGICALAND:
- BINARY(&&);
- break;
- case OP_OR:
- BINARY(|);
- break;
- case OP_XOR:
- BINARY(^);
- break;
- case OP_AND:
- BINARY(&);
- break;
- case OP_EQUAL:
- BINARY(==);
- break;
- case OP_NOTEQUAL:
- BINARY(!=);
- break;
- case OP_LESSEQUAL:
- BINARY(<=);
- break;
- case OP_GREATEREQUAL:
- BINARY(>=);
- break;
- case OP_LESS:
- BINARY(<);
- break;
- case OP_GREATER:
- BINARY(>);
- break;
- case OP_LEFTSHIFT:
- BINARY(<<);
- break;
- case OP_RIGHTSHIFT:
- BINARY(>>);
- break;
- case OP_ADD:
- BINARY(+);
- break;
- case OP_SUBTRACT:
- BINARY(-);
- break;
- case OP_MULTIPLY:
- BINARY(*);
- break;
- case OP_DIVIDE:
- BINARYDIV(/);
- break;
- case OP_MODULUS:
- BINARYDIV(%);
- break;
- case OP_PLUS:
- UNARY(+);
- break;
- case OP_MINUS:
- UNARY(-);
- break;
- case OP_NEGATE:
- UNARY(!);
- break;
- case OP_COMPLEMENT:
- UNARY(~);
- break;
- default:
- assert (0);
- }
- }
-
- /* Write-back the index skipping the OP_END. */
- *pi = i + 1;
-
- /* There should be exactly one value left on the stack. This is our result. */
- POP(*result);
- pp_annotate (output, "%d ", *result);
- assert (sp == EXECUTION_STACK_SIZE);
- return GL_TRUE;
-}
-
-/*
- * Function execute_expressions() executes up to 2 expressions. The second expression is there
- * for the #line directive which takes 1 or 2 expressions that indicate line and file numbers.
- * If it fails, it returns 0. If it succeeds, it returns the number of executed expressions.
- */
-
-#define EXP_END 0
-#define EXP_EXPRESSION 1
-
-static GLuint
-execute_expressions (slang_string *output, grammar eid, const byte *expr, GLint results[2],
- slang_info_log *elog)
-{
- GLint success;
- byte *code;
- GLuint size, count = 0;
-
- success = grammar_fast_check (eid, expr, &code, &size, 64);
- if (success) {
- GLuint i = 0;
-
- while (code[i++] == EXP_EXPRESSION) {
- assert (count < 2);
-
- if (!execute_expression (output, code, &i, &results[count], elog)) {
- count = 0;
- break;
- }
- count++;
- }
- grammar_alloc_free (code);
- }
- else {
- slang_info_log_error (elog, "syntax error in preprocessor expression.");\
- }
- return count;
-}
-
-/*
- * The pp_symbol structure is used to hold macro definitions and macro formal parameters. The
- * pp_symbols strcture is a collection of pp_symbol. It is used both for storing macro formal
- * parameters and all global macro definitions. Making this unification wastes some memory,
- * becuse macro formal parameters don't need further lists of symbols. We lose 8 bytes per
- * formal parameter here, but making this we can use the same code to substitute macro parameters
- * as well as macros in the source string.
- */
-
-typedef struct
-{
- struct pp_symbol_ *symbols;
- GLuint count;
-} pp_symbols;
-
-static GLvoid
-pp_symbols_init (pp_symbols *self)
-{
- self->symbols = NULL;
- self->count = 0;
-}
-
-static GLvoid
-pp_symbols_free (pp_symbols *);
-
-typedef struct pp_symbol_
-{
- slang_string name;
- slang_string replacement;
- pp_symbols parameters;
-} pp_symbol;
-
-static GLvoid
-pp_symbol_init (pp_symbol *self)
-{
- slang_string_init (&self->name);
- slang_string_init (&self->replacement);
- pp_symbols_init (&self->parameters);
-}
-
-static GLvoid
-pp_symbol_free (pp_symbol *self)
-{
- slang_string_free (&self->name);
- slang_string_free (&self->replacement);
- pp_symbols_free (&self->parameters);
-}
-
-static GLvoid
-pp_symbol_reset (pp_symbol *self)
-{
- /* Leave symbol name intact. */
- slang_string_reset (&self->replacement);
- pp_symbols_free (&self->parameters);
- pp_symbols_init (&self->parameters);
-}
-
-static GLvoid
-pp_symbols_free (pp_symbols *self)
-{
- GLuint i;
-
- for (i = 0; i < self->count; i++)
- pp_symbol_free (&self->symbols[i]);
- _mesa_free (self->symbols);
-}
-
-static pp_symbol *
-pp_symbols_push (pp_symbols *self)
-{
- self->symbols = (pp_symbol *) (_mesa_realloc (self->symbols, self->count * sizeof (pp_symbol),
- (self->count + 1) * sizeof (pp_symbol)));
- if (self->symbols == NULL)
- return NULL;
- pp_symbol_init (&self->symbols[self->count]);
- return &self->symbols[self->count++];
-}
-
-static GLboolean
-pp_symbols_erase (pp_symbols *self, pp_symbol *symbol)
-{
- assert (symbol >= self->symbols && symbol < self->symbols + self->count);
-
- self->count--;
- pp_symbol_free (symbol);
- if (symbol < self->symbols + self->count)
- _mesa_memcpy (symbol, symbol + 1, sizeof (pp_symbol) * (self->symbols + self->count - symbol));
- self->symbols = (pp_symbol *) (_mesa_realloc (self->symbols, (self->count + 1) * sizeof (pp_symbol),
- self->count * sizeof (pp_symbol)));
- return self->symbols != NULL;
-}
-
-static pp_symbol *
-pp_symbols_find (pp_symbols *self, const char *name)
-{
- GLuint i;
-
- for (i = 0; i < self->count; i++)
- if (_mesa_strcmp (name, slang_string_cstr (&self->symbols[i].name)) == 0)
- return &self->symbols[i];
- return NULL;
-}
-
-/*
- * The condition context of a single #if/#else/#endif level. Those can be nested, so there
- * is a stack of condition contexts.
- * There is a special global context on the bottom of the stack. It is there to simplify
- * context handling.
- */
-
-typedef struct
-{
- GLboolean current; /* The condition value of this level. */
- GLboolean effective; /* The effective product of current condition, outer level conditions
- * and position within #if-#else-#endif sections. */
- GLboolean else_allowed; /* TRUE if in #if-#else section, FALSE if in #else-#endif section
- * and for global context. */
- GLboolean endif_required; /* FALSE for global context only. */
-} pp_cond_ctx;
-
-/* Should be enuff. */
-#define CONDITION_STACK_SIZE 64
-
-typedef struct
-{
- pp_cond_ctx stack[CONDITION_STACK_SIZE];
- pp_cond_ctx *top;
-} pp_cond_stack;
-
-static GLboolean
-pp_cond_stack_push (pp_cond_stack *self, slang_info_log *elog)
-{
- if (self->top == self->stack) {
- slang_info_log_error (elog, "internal compiler error: preprocessor condition stack overflow.");
- return GL_FALSE;
- }
- self->top--;
- return GL_TRUE;
-}
-
-static GLvoid
-pp_cond_stack_reevaluate (pp_cond_stack *self)
-{
- /* There must be at least 2 conditions on the stack - one global and one being evaluated. */
- assert (self->top <= &self->stack[CONDITION_STACK_SIZE - 2]);
-
- self->top->effective = self->top->current && self->top[1].effective;
-}
-
-
-/**
- * Extension enables through #extension directive.
- * NOTE: Currently, only enable/disable state is stored.
- */
-typedef struct
-{
- GLboolean ARB_draw_buffers;
- GLboolean ARB_texture_rectangle;
-} pp_ext;
-
-
-/**
- * Disable all extensions. Called at startup and on #extension all: disable.
- */
-static GLvoid
-pp_ext_disable_all(pp_ext *self)
-{
- _mesa_memset(self, 0, sizeof(self));
-}
-
-
-/**
- * Called during preprocessor initialization to set the initial enable/disable
- * state of extensions.
- */
-static GLvoid
-pp_ext_init(pp_ext *self, const struct gl_extensions *extensions)
-{
- pp_ext_disable_all (self);
- self->ARB_draw_buffers = GL_TRUE;
- if (extensions->NV_texture_rectangle)
- self->ARB_texture_rectangle = GL_TRUE;
-}
-
-/**
- * Called in response to #extension directives to enable/disable
- * the named extension.
- */
-static GLboolean
-pp_ext_set(pp_ext *self, const char *name, GLboolean enable)
-{
- if (_mesa_strcmp (name, "GL_ARB_draw_buffers") == 0)
- self->ARB_draw_buffers = enable;
- else if (_mesa_strcmp (name, "GL_ARB_texture_rectangle") == 0)
- self->ARB_texture_rectangle = enable;
- else
- return GL_FALSE;
- return GL_TRUE;
-}
-
-
-/**
- * Called in response to #pragma. For example, "#pragma debug(on)" would
- * call this function as pp_pragma("debug", "on").
- * \return GL_TRUE if pragma is valid, GL_FALSE if invalid
- */
-static GLboolean
-pp_pragma(struct gl_sl_pragmas *pragmas, const char *pragma, const char *param)
-{
-#if 0
- printf("#pragma %s %s\n", pragma, param);
-#endif
- if (_mesa_strcmp(pragma, "optimize") == 0) {
- if (!param)
- return GL_FALSE; /* missing required param */
- if (_mesa_strcmp(param, "on") == 0) {
- if (!pragmas->IgnoreOptimize)
- pragmas->Optimize = GL_TRUE;
- }
- else if (_mesa_strcmp(param, "off") == 0) {
- if (!pragmas->IgnoreOptimize)
- pragmas->Optimize = GL_FALSE;
- }
- else {
- return GL_FALSE; /* invalid param */
- }
- }
- else if (_mesa_strcmp(pragma, "debug") == 0) {
- if (!param)
- return GL_FALSE; /* missing required param */
- if (_mesa_strcmp(param, "on") == 0) {
- if (!pragmas->IgnoreDebug)
- pragmas->Debug = GL_TRUE;
- }
- else if (_mesa_strcmp(param, "off") == 0) {
- if (!pragmas->IgnoreDebug)
- pragmas->Debug = GL_FALSE;
- }
- else {
- return GL_FALSE; /* invalid param */
- }
- }
- /* all other pragmas are silently ignored */
- return GL_TRUE;
-}
-
-
-/**
- * The state of preprocessor: current line, file and version number, list
- * of all defined macros and the #if/#endif context.
- */
-typedef struct
-{
- GLint line;
- GLint file;
- GLint version;
- pp_symbols symbols;
- pp_ext ext;
- slang_info_log *elog;
- pp_cond_stack cond;
-} pp_state;
-
-static GLvoid
-pp_state_init (pp_state *self, slang_info_log *elog,
- const struct gl_extensions *extensions)
-{
- self->line = 0;
- self->file = 1;
-#if FEATURE_es2_glsl
- self->version = 100;
-#else
- self->version = 110;
-#endif
- pp_symbols_init (&self->symbols);
- pp_ext_init (&self->ext, extensions);
- self->elog = elog;
-
- /* Initialize condition stack and create the global context. */
- self->cond.top = &self->cond.stack[CONDITION_STACK_SIZE - 1];
- self->cond.top->current = GL_TRUE;
- self->cond.top->effective = GL_TRUE;
- self->cond.top->else_allowed = GL_FALSE;
- self->cond.top->endif_required = GL_FALSE;
-}
-
-static GLvoid
-pp_state_free (pp_state *self)
-{
- pp_symbols_free (&self->symbols);
-}
-
-#define IS_FIRST_ID_CHAR(x) (((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') || (x) == '_')
-#define IS_NEXT_ID_CHAR(x) (IS_FIRST_ID_CHAR(x) || ((x) >= '0' && (x) <= '9'))
-#define IS_WHITE(x) ((x) == ' ' || (x) == '\n')
-#define IS_NULL(x) ((x) == '\0')
-
-#define SKIP_WHITE(x) do { while (IS_WHITE(*(x))) (x)++; } while (GL_FALSE)
-
-typedef struct
-{
- slang_string *output;
- const char *input;
- pp_state *state;
-} expand_state;
-
-static GLboolean
-expand_defined (expand_state *e, slang_string *buffer)
-{
- GLboolean in_paren = GL_FALSE;
- const char *id;
-
- /* Parse the optional opening parenthesis. */
- SKIP_WHITE(e->input);
- if (*e->input == '(') {
- e->input++;
- in_paren = GL_TRUE;
- SKIP_WHITE(e->input);
- }
-
- /* Parse operand. */
- if (!IS_FIRST_ID_CHAR(*e->input)) {
- slang_info_log_error (e->state->elog,
- "preprocess error: identifier expected after operator 'defined'.");
- return GL_FALSE;
- }
- slang_string_reset (buffer);
- slang_string_pushc (buffer, *e->input++);
- while (IS_NEXT_ID_CHAR(*e->input))
- slang_string_pushc (buffer, *e->input++);
- id = slang_string_cstr (buffer);
-
- /* Check if the operand is defined. Output 1 if it is defined, output 0 if not. */
- if (pp_symbols_find (&e->state->symbols, id) == NULL)
- slang_string_pushs (e->output, " 0 ", 3);
- else
- slang_string_pushs (e->output, " 1 ", 3);
-
- /* Parse the closing parentehesis if the opening one was there. */
- if (in_paren) {
- SKIP_WHITE(e->input);
- if (*e->input != ')') {
- slang_info_log_error (e->state->elog, "preprocess error: ')' expected.");
- return GL_FALSE;
- }
- e->input++;
- SKIP_WHITE(e->input);
- }
- return GL_TRUE;
-}
-
-static GLboolean
-expand (expand_state *, pp_symbols *);
-
-static GLboolean
-expand_symbol (expand_state *e, pp_symbol *symbol)
-{
- expand_state es;
-
- /* If the macro has some parameters, we need to parse them. */
- if (symbol->parameters.count != 0) {
- GLuint i;
-
- /* Parse the opening parenthesis. */
- SKIP_WHITE(e->input);
- if (*e->input != '(') {
- slang_info_log_error (e->state->elog, "preprocess error: '(' expected.");
- return GL_FALSE;
- }
- e->input++;
- SKIP_WHITE(e->input);
-
- /* Parse macro actual parameters. This can be anything, separated by a colon.
- */
- for (i = 0; i < symbol->parameters.count; i++) {
- GLuint nested_paren_count = 0; /* track number of nested parentheses */
-
- if (*e->input == ')') {
- slang_info_log_error (e->state->elog, "preprocess error: unexpected ')'.");
- return GL_FALSE;
- }
-
- /* Eat all characters up to the comma or closing parentheses. */
- pp_symbol_reset (&symbol->parameters.symbols[i]);
- while (!IS_NULL(*e->input)) {
- /* Exit loop only when all nested parens have been eaten. */
- if (nested_paren_count == 0 && (*e->input == ',' || *e->input == ')'))
- break;
-
- /* Actually count nested parens here. */
- if (*e->input == '(')
- nested_paren_count++;
- else if (*e->input == ')')
- nested_paren_count--;
-
- slang_string_pushc (&symbol->parameters.symbols[i].replacement, *e->input++);
- }
-
- /* If it was not the last paremeter, skip the comma. Otherwise, skip the
- * closing parentheses. */
- if (i + 1 == symbol->parameters.count) {
- /* This is the last paremeter - skip the closing parentheses. */
- if (*e->input != ')') {
- slang_info_log_error (e->state->elog, "preprocess error: ')' expected.");
- return GL_FALSE;
- }
- e->input++;
- SKIP_WHITE(e->input);
- }
- else {
- /* Skip the separating comma. */
- if (*e->input != ',') {
- slang_info_log_error (e->state->elog, "preprocess error: ',' expected.");
- return GL_FALSE;
- }
- e->input++;
- SKIP_WHITE(e->input);
- }
- }
- }
-
- /* Expand the macro. Use its parameters as a priority symbol list to expand
- * macro parameters correctly. */
- es.output = e->output;
- es.input = slang_string_cstr (&symbol->replacement);
- es.state = e->state;
- slang_string_pushc (e->output, ' ');
- if (!expand (&es, &symbol->parameters))
- return GL_FALSE;
- slang_string_pushc (e->output, ' ');
- return GL_TRUE;
-}
-
-/*
- * Function expand() expands source text from <input> to <output>. The expansion is made using
- * the list passed in <symbols> parameter. It allows us to expand macro formal parameters with
- * actual parameters. The global list of symbols from pp state is used when doing a recursive
- * call of expand().
- */
-
-static GLboolean
-expand (expand_state *e, pp_symbols *symbols)
-{
- while (!IS_NULL(*e->input)) {
- if (IS_FIRST_ID_CHAR(*e->input)) {
- slang_string buffer;
- const char *id;
-
- /* Parse the identifier. */
- slang_string_init (&buffer);
- slang_string_pushc (&buffer, *e->input++);
- while (IS_NEXT_ID_CHAR(*e->input))
- slang_string_pushc (&buffer, *e->input++);
- id = slang_string_cstr (&buffer);
-
- /* Now check if the identifier is special in some way. The "defined" identifier is
- * actually an operator that we must handle here and expand it either to " 0 " or " 1 ".
- * The other identifiers start with "__" and we expand it to appropriate values
- * taken from the preprocessor state. */
- if (_mesa_strcmp (id, "defined") == 0) {
- if (!expand_defined (e, &buffer))
- return GL_FALSE;
- }
- else if (_mesa_strcmp (id, "__LINE__") == 0) {
- slang_string_pushc (e->output, ' ');
- slang_string_pushi (e->output, e->state->line);
- slang_string_pushc (e->output, ' ');
- }
- else if (_mesa_strcmp (id, "__FILE__") == 0) {
- slang_string_pushc (e->output, ' ');
- slang_string_pushi (e->output, e->state->file);
- slang_string_pushc (e->output, ' ');
- }
- else if (_mesa_strcmp (id, "__VERSION__") == 0) {
- slang_string_pushc (e->output, ' ');
- slang_string_pushi (e->output, e->state->version);
- slang_string_pushc (e->output, ' ');
- }
-#if FEATURE_es2_glsl
- else if (_mesa_strcmp (id, "GL_ES") == 0 ||
- _mesa_strcmp (id, "GL_FRAGMENT_PRECISION_HIGH") == 0) {
- slang_string_pushc (e->output, ' ');
- slang_string_pushi (e->output, '1');
- slang_string_pushc (e->output, ' ');
- }
-#endif
- else {
- pp_symbol *symbol;
-
- /* The list of symbols from <symbols> take precedence over the list from <state>.
- * Note that in some cases this is the same list so avoid double look-up. */
- symbol = pp_symbols_find (symbols, id);
- if (symbol == NULL && symbols != &e->state->symbols)
- symbol = pp_symbols_find (&e->state->symbols, id);
-
- /* If the symbol was found, recursively expand its definition. */
- if (symbol != NULL) {
- if (!expand_symbol (e, symbol)) {
- slang_string_free (&buffer);
- return GL_FALSE;
- }
- }
- else {
- slang_string_push (e->output, &buffer);
- }
- }
- slang_string_free (&buffer);
- }
- else if (IS_WHITE(*e->input)) {
- slang_string_pushc (e->output, *e->input++);
- }
- else {
- while (!IS_WHITE(*e->input) && !IS_NULL(*e->input) && !IS_FIRST_ID_CHAR(*e->input))
- slang_string_pushc (e->output, *e->input++);
- }
- }
- return GL_TRUE;
-}
-
-static GLboolean
-parse_if (slang_string *output, const byte *prod, GLuint *pi, GLint *result, pp_state *state,
- grammar eid)
-{
- const char *text;
- GLuint len;
-
- text = (const char *) (&prod[*pi]);
- len = _mesa_strlen (text);
-
- if (state->cond.top->effective) {
- slang_string expr;
- GLuint count;
- GLint results[2];
- expand_state es;
-
- /* Expand the expression. */
- slang_string_init (&expr);
- es.output = &expr;
- es.input = text;
- es.state = state;
- if (!expand (&es, &state->symbols))
- return GL_FALSE;
-
- /* Execute the expression. */
- count = execute_expressions (output, eid, (const byte *) (slang_string_cstr (&expr)),
- results, state->elog);
- slang_string_free (&expr);
- if (count != 1)
- return GL_FALSE;
- *result = results[0];
- }
- else {
- /* The directive is dead. */
- *result = 0;
- }
-
- *pi += len + 1;
- return GL_TRUE;
-}
-
-#define ESCAPE_TOKEN 0
-
-#define TOKEN_END 0
-#define TOKEN_DEFINE 1
-#define TOKEN_UNDEF 2
-#define TOKEN_IF 3
-#define TOKEN_ELSE 4
-#define TOKEN_ELIF 5
-#define TOKEN_ENDIF 6
-#define TOKEN_ERROR 7
-#define TOKEN_PRAGMA 8
-#define TOKEN_EXTENSION 9
-#define TOKEN_LINE 10
-
-#define PARAM_END 0
-#define PARAM_PARAMETER 1
-
-#define BEHAVIOR_REQUIRE 1
-#define BEHAVIOR_ENABLE 2
-#define BEHAVIOR_WARN 3
-#define BEHAVIOR_DISABLE 4
-
-#define PRAGMA_NO_PARAM 0
-#define PRAGMA_PARAM 1
-
-
-static GLboolean
-preprocess_source (slang_string *output, const char *source,
- grammar pid, grammar eid,
- slang_info_log *elog,
- const struct gl_extensions *extensions,
- struct gl_sl_pragmas *pragmas)
-{
- static const char *predefined[] = {
- "__FILE__",
- "__LINE__",
- "__VERSION__",
-#if FEATURE_es2_glsl
- "GL_ES",
- "GL_FRAGMENT_PRECISION_HIGH",
-#endif
- NULL
- };
- byte *prod;
- GLuint size, i;
- pp_state state;
-
- if (!grammar_fast_check (pid, (const byte *) (source), &prod, &size, 65536)) {
- grammar_error_to_log (elog);
- return GL_FALSE;
- }
-
- pp_state_init (&state, elog, extensions);
-
- /* add the predefined symbols to the symbol table */
- for (i = 0; predefined[i]; i++) {
- pp_symbol *symbol = NULL;
- symbol = pp_symbols_push(&state.symbols);
- assert(symbol);
- slang_string_pushs(&symbol->name,
- predefined[i], _mesa_strlen(predefined[i]));
- }
-
- i = 0;
- while (i < size) {
- if (prod[i] != ESCAPE_TOKEN) {
- if (state.cond.top->effective) {
- slang_string input;
- expand_state es;
-
- /* Eat only one line of source code to expand it.
- * FIXME: This approach has one drawback. If a macro with parameters spans across
- * multiple lines, the preprocessor will raise an error. */
- slang_string_init (&input);
- while (prod[i] != '\0' && prod[i] != '\n')
- slang_string_pushc (&input, prod[i++]);
- if (prod[i] != '\0')
- slang_string_pushc (&input, prod[i++]);
-
- /* Increment line number. */
- state.line++;
-
- es.output = output;
- es.input = slang_string_cstr (&input);
- es.state = &state;
- if (!expand (&es, &state.symbols))
- goto error;
-
- slang_string_free (&input);
- }
- else {
- /* Condition stack is disabled - keep track on line numbers and output only newlines. */
- if (prod[i] == '\n') {
- state.line++;
- /*pp_annotate (output, "%c", prod[i]);*/
- }
- else {
- /*pp_annotate (output, "%c", prod[i]);*/
- }
- i++;
- }
- }
- else {
- const char *id;
- GLuint idlen;
- GLubyte token;
-
- i++;
- token = prod[i++];
- switch (token) {
-
- case TOKEN_END:
- /* End of source string.
- * Check if all #ifs have been terminated by matching #endifs.
- * On condition stack there should be only the global condition context. */
- if (state.cond.top->endif_required) {
- slang_info_log_error (elog, "end of source without matching #endif.");
- return GL_FALSE;
- }
- break;
-
- case TOKEN_DEFINE:
- {
- pp_symbol *symbol = NULL;
-
- /* Parse macro name. */
- id = (const char *) (&prod[i]);
- idlen = _mesa_strlen (id);
- if (state.cond.top->effective) {
- pp_annotate (output, "// #define %s(", id);
-
- /* If the symbol is already defined, override it. */
- symbol = pp_symbols_find (&state.symbols, id);
- if (symbol == NULL) {
- symbol = pp_symbols_push (&state.symbols);
- if (symbol == NULL)
- goto error;
- slang_string_pushs (&symbol->name, id, idlen);
- }
- else {
- pp_symbol_reset (symbol);
- }
- }
- i += idlen + 1;
-
- /* Parse optional macro parameters. */
- while (prod[i++] != PARAM_END) {
- pp_symbol *param;
-
- id = (const char *) (&prod[i]);
- idlen = _mesa_strlen (id);
- if (state.cond.top->effective) {
- pp_annotate (output, "%s, ", id);
- param = pp_symbols_push (&symbol->parameters);
- if (param == NULL)
- goto error;
- slang_string_pushs (&param->name, id, idlen);
- }
- i += idlen + 1;
- }
-
- /* Parse macro replacement. */
- id = (const char *) (&prod[i]);
- idlen = _mesa_strlen (id);
- if (state.cond.top->effective) {
- slang_string replacement;
- expand_state es;
-
- pp_annotate (output, ") %s", id);
-
- slang_string_init(&replacement);
- slang_string_pushs(&replacement, id, idlen);
-
- /* Expand macro replacement. */
- es.output = &symbol->replacement;
- es.input = slang_string_cstr(&replacement);
- es.state = &state;
- if (!expand(&es, &state.symbols)) {
- slang_string_free(&replacement);
- goto error;
- }
- slang_string_free(&replacement);
- }
- i += idlen + 1;
- }
- break;
-
- case TOKEN_UNDEF:
- id = (const char *) (&prod[i]);
- i += _mesa_strlen (id) + 1;
- if (state.cond.top->effective) {
- pp_symbol *symbol;
-
- pp_annotate (output, "// #undef %s", id);
- /* Try to find symbol with given name and remove it. */
- symbol = pp_symbols_find (&state.symbols, id);
- if (symbol != NULL)
- if (!pp_symbols_erase (&state.symbols, symbol))
- goto error;
- }
- break;
-
- case TOKEN_IF:
- {
- GLint result;
-
- /* Parse #if expression end execute it. */
- pp_annotate (output, "// #if ");
- if (!parse_if (output, prod, &i, &result, &state, eid))
- goto error;
-
- /* Push new condition on the stack. */
- if (!pp_cond_stack_push (&state.cond, state.elog))
- goto error;
- state.cond.top->current = result ? GL_TRUE : GL_FALSE;
- state.cond.top->else_allowed = GL_TRUE;
- state.cond.top->endif_required = GL_TRUE;
- pp_cond_stack_reevaluate (&state.cond);
- }
- break;
-
- case TOKEN_ELSE:
- /* Check if #else is alloved here. */
- if (!state.cond.top->else_allowed) {
- slang_info_log_error (elog, "#else without matching #if.");
- goto error;
- }
-
- /* Negate current condition and reevaluate it. */
- state.cond.top->current = !state.cond.top->current;
- state.cond.top->else_allowed = GL_FALSE;
- pp_cond_stack_reevaluate (&state.cond);
- if (state.cond.top->effective)
- pp_annotate (output, "// #else");
- break;
-
- case TOKEN_ELIF:
- /* Check if #elif is alloved here. */
- if (!state.cond.top->else_allowed) {
- slang_info_log_error (elog, "#elif without matching #if.");
- goto error;
- }
-
- /* Negate current condition and reevaluate it. */
- state.cond.top->current = !state.cond.top->current;
- pp_cond_stack_reevaluate (&state.cond);
-
- if (state.cond.top->effective)
- pp_annotate (output, "// #elif ");
-
- {
- GLint result;
-
- /* Parse #elif expression end execute it. */
- if (!parse_if (output, prod, &i, &result, &state, eid))
- goto error;
-
- /* Update current condition and reevaluate it. */
- state.cond.top->current = result ? GL_TRUE : GL_FALSE;
- pp_cond_stack_reevaluate (&state.cond);
- }
- break;
-
- case TOKEN_ENDIF:
- /* Check if #endif is alloved here. */
- if (!state.cond.top->endif_required) {
- slang_info_log_error (elog, "#endif without matching #if.");
- goto error;
- }
-
- /* Pop the condition off the stack. */
- state.cond.top++;
- if (state.cond.top->effective)
- pp_annotate (output, "// #endif");
- break;
-
- case TOKEN_EXTENSION:
- /* Parse the extension name. */
- id = (const char *) (&prod[i]);
- i += _mesa_strlen (id) + 1;
- if (state.cond.top->effective)
- pp_annotate (output, "// #extension %s: ", id);
-
- /* Parse and apply extension behavior. */
- if (state.cond.top->effective) {
- switch (prod[i++]) {
-
- case BEHAVIOR_REQUIRE:
- pp_annotate (output, "require");
- if (!pp_ext_set (&state.ext, id, GL_TRUE)) {
- if (_mesa_strcmp (id, "all") == 0) {
- slang_info_log_error (elog, "require: bad behavior for #extension all.");
- goto error;
- }
- else {
- slang_info_log_error (elog, "%s: required extension is not supported.", id);
- goto error;
- }
- }
- break;
-
- case BEHAVIOR_ENABLE:
- pp_annotate (output, "enable");
- if (!pp_ext_set (&state.ext, id, GL_TRUE)) {
- if (_mesa_strcmp (id, "all") == 0) {
- slang_info_log_error (elog, "enable: bad behavior for #extension all.");
- goto error;
- }
- else {
- slang_info_log_warning (elog, "%s: enabled extension is not supported.", id);
- }
- }
- break;
-
- case BEHAVIOR_WARN:
- pp_annotate (output, "warn");
- if (!pp_ext_set (&state.ext, id, GL_TRUE)) {
- if (_mesa_strcmp (id, "all") != 0) {
- slang_info_log_warning (elog, "%s: enabled extension is not supported.", id);
- }
- }
- break;
-
- case BEHAVIOR_DISABLE:
- pp_annotate (output, "disable");
- if (!pp_ext_set (&state.ext, id, GL_FALSE)) {
- if (_mesa_strcmp (id, "all") == 0) {
- pp_ext_disable_all (&state.ext);
- }
- else {
- slang_info_log_warning (elog, "%s: disabled extension is not supported.", id);
- }
- }
- break;
-
- default:
- assert (0);
- }
- }
- break;
-
- case TOKEN_PRAGMA:
- {
- GLint have_param;
- const char *pragma, *param;
-
- pragma = (const char *) (&prod[i]);
- i += _mesa_strlen(pragma) + 1;
- have_param = (prod[i++] == PRAGMA_PARAM);
- if (have_param) {
- param = (const char *) (&prod[i]);
- i += _mesa_strlen(param) + 1;
- }
- else {
- param = NULL;
- }
- pp_pragma(pragmas, pragma, param);
- }
- break;
-
- case TOKEN_LINE:
- id = (const char *) (&prod[i]);
- i += _mesa_strlen (id) + 1;
-
- if (state.cond.top->effective) {
- slang_string buffer;
- GLuint count;
- GLint results[2];
- expand_state es;
-
- slang_string_init (&buffer);
- state.line++;
- es.output = &buffer;
- es.input = id;
- es.state = &state;
- if (!expand (&es, &state.symbols))
- goto error;
-
- pp_annotate (output, "// #line ");
- count = execute_expressions (output, eid,
- (const byte *) (slang_string_cstr (&buffer)),
- results, state.elog);
- slang_string_free (&buffer);
- if (count == 0)
- goto error;
-
- state.line = results[0] - 1;
- if (count == 2)
- state.file = results[1];
- }
- break;
- }
- }
- }
-
- /* Check for missing #endifs. */
- if (state.cond.top->endif_required) {
- slang_info_log_error (elog, "#endif expected but end of source found.");
- goto error;
- }
-
- grammar_alloc_free(prod);
- pp_state_free (&state);
- return GL_TRUE;
-
-error:
- grammar_alloc_free(prod);
- pp_state_free (&state);
- return GL_FALSE;
-}
-
-
-/**
- * Remove the continuation characters from the input string.
- * This is the very first step in preprocessing and is effective
- * even inside comment blocks.
- * If there is a whitespace between a backslash and a newline,
- * this is not considered as a line continuation.
- * \return GL_TRUE for success, GL_FALSE otherwise.
- */
-static GLboolean
-_slang_preprocess_backslashes(slang_string *output,
- const char *input)
-{
- while (*input) {
- if (input[0] == '\\') {
- /* If a newline follows, eat the backslash and the newline. */
- if (input[1] == '\r') {
- if (input[2] == '\n') {
- input += 3;
- } else {
- input += 2;
- }
- } else if (input[1] == '\n') {
- if (input[2] == '\r') {
- input += 3;
- } else {
- input += 2;
- }
- } else {
- /* Leave the backslash alone. */
- slang_string_pushc(output, *input++);
- }
- } else {
- slang_string_pushc(output, *input++);
- }
- }
- return GL_TRUE;
-}
-
-
-/**
- * Run preprocessor on source code.
- * \param extensions indicates which GL extensions are enabled
- * \param output the post-process results
- * \param input the input text
- * \param elog log to record warnings, errors
- * \param extensions out extension settings
- * \param pragmas in/out #pragma settings
- * \return GL_TRUE for success, GL_FALSE for error
- */
-GLboolean
-_slang_preprocess_directives(slang_string *output,
- const char *input,
- slang_info_log *elog,
- const struct gl_extensions *extensions,
- struct gl_sl_pragmas *pragmas)
-{
- grammar pid, eid;
- GLboolean success;
- slang_string without_backslashes;
-
- pid = grammar_load_from_text ((const byte *) (slang_pp_directives_syn));
- if (pid == 0) {
- grammar_error_to_log (elog);
- return GL_FALSE;
- }
- eid = grammar_load_from_text ((const byte *) (slang_pp_expression_syn));
- if (eid == 0) {
- grammar_error_to_log (elog);
- grammar_destroy (pid);
- return GL_FALSE;
- }
-
- slang_string_init(&without_backslashes);
- success = _slang_preprocess_backslashes(&without_backslashes, input);
-
- if (0) {
- _mesa_printf("Pre-processed shader:\n");
- _mesa_printf("%s", slang_string_cstr(&without_backslashes));
- _mesa_printf("----------------------\n");
- }
-
- if (success) {
- success = preprocess_source(output,
- slang_string_cstr(&without_backslashes),
- pid,
- eid,
- elog,
- extensions,
- pragmas);
- }
-
- slang_string_free(&without_backslashes);
- grammar_destroy (eid);
- grammar_destroy (pid);
-
- if (0) {
- _mesa_printf("Post-processed shader:\n");
- _mesa_printf("%s", slang_string_cstr(output));
- _mesa_printf("----------------------\n");
- }
-
- return success;
-}
-
diff --git a/src/mesa/shader/slang/slang_preprocess.h b/src/mesa/shader/slang/slang_preprocess.h
deleted file mode 100644
index f344820daef..00000000000
--- a/src/mesa/shader/slang/slang_preprocess.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Mesa 3-D graphics library
- *
- * Copyright (C) 2005-2008 Brian Paul All Rights Reserved.
- * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef SLANG_PREPROCESS_H
-#define SLANG_PREPROCESS_H
-
-#include "slang_compile.h"
-#include "slang_log.h"
-
-
-extern GLboolean
-_slang_preprocess_version (const char *, GLuint *, GLuint *, slang_info_log *);
-
-extern GLboolean
-_slang_preprocess_directives(slang_string *output, const char *input,
- slang_info_log *,
- const struct gl_extensions *extensions,
- struct gl_sl_pragmas *pragmas);
-
-#endif /* SLANG_PREPROCESS_H */
diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index a0d7dbbace9..12d4c2831d8 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -15,6 +15,7 @@ MAIN_SOURCES = \
main/clear.c \
main/clip.c \
main/colortab.c \
+ main/condrender.c \
main/context.c \
main/convolve.c \
main/cpuinfo.c \
@@ -80,6 +81,7 @@ MAIN_SOURCES = \
main/texstate.c \
main/texstore.c \
main/varray.c \
+ main/version.c \
main/viewport.c \
main/vtxfmt.c
@@ -87,6 +89,7 @@ GLAPI_SOURCES = \
main/dispatch.c \
glapi/glapi.c \
glapi/glapi_getproc.c \
+ glapi/glapi_nop.c \
glapi/glthread.c
MATH_SOURCES = \
@@ -190,6 +193,7 @@ STATETRACKER_SOURCES = \
state_tracker/st_cb_blit.c \
state_tracker/st_cb_bufferobjects.c \
state_tracker/st_cb_clear.c \
+ state_tracker/st_cb_condrender.c \
state_tracker/st_cb_flush.c \
state_tracker/st_cb_drawpixels.c \
state_tracker/st_cb_fbo.c \
@@ -201,7 +205,6 @@ STATETRACKER_SOURCES = \
state_tracker/st_cb_strings.c \
state_tracker/st_cb_texture.c \
state_tracker/st_cb_viewport.c \
- state_tracker/st_api.c \
state_tracker/st_context.c \
state_tracker/st_debug.c \
state_tracker/st_draw.c \
@@ -218,7 +221,6 @@ SHADER_SOURCES = \
shader/arbprogparse.c \
shader/arbprogram.c \
shader/atifragshader.c \
- shader/grammar/grammar_mesa.c \
shader/hash_table.c \
shader/lex.yy.c \
shader/nvfragparse.c \
@@ -255,7 +257,6 @@ SLANG_SOURCES = \
shader/slang/slang_link.c \
shader/slang/slang_log.c \
shader/slang/slang_mem.c \
- shader/slang/slang_preprocess.c \
shader/slang/slang_print.c \
shader/slang/slang_simplify.c \
shader/slang/slang_storage.c \
@@ -365,6 +366,12 @@ GLAPI_OBJECTS = \
COMMON_DRIVER_OBJECTS = $(COMMON_DRIVER_SOURCES:.c=.o)
+### Other archives/libraries
+
+GLSL_LIBS = \
+ $(TOP)/src/glsl/pp/libglslpp.a \
+ $(TOP)/src/glsl/cl/libglslcl.a
+
### Include directories
diff --git a/src/mesa/sparc/glapi_sparc.S b/src/mesa/sparc/glapi_sparc.S
index 731ff2b823f..9b0f8027ebb 100644
--- a/src/mesa/sparc/glapi_sparc.S
+++ b/src/mesa/sparc/glapi_sparc.S
@@ -1014,21 +1014,29 @@ gl_dispatch_functions_start:
GL_STUB(gl_dispatch_stub_785, _gloffset_FlushMappedBufferRangeAPPLE)
HIDDEN(gl_dispatch_stub_785)
GL_STUB(glFramebufferTextureLayerEXT, _gloffset_FramebufferTextureLayerEXT)
+ GL_STUB(glColorMaskIndexedEXT, _gloffset_ColorMaskIndexedEXT)
+ GL_STUB(glDisableIndexedEXT, _gloffset_DisableIndexedEXT)
+ GL_STUB(glEnableIndexedEXT, _gloffset_EnableIndexedEXT)
+ GL_STUB(glGetBooleanIndexedvEXT, _gloffset_GetBooleanIndexedvEXT)
+ GL_STUB(glGetIntegerIndexedvEXT, _gloffset_GetIntegerIndexedvEXT)
+ GL_STUB(glIsEnabledIndexedEXT, _gloffset_IsEnabledIndexedEXT)
+ GL_STUB(glBeginConditionalRenderNV, _gloffset_BeginConditionalRenderNV)
+ GL_STUB(glEndConditionalRenderNV, _gloffset_EndConditionalRenderNV)
GL_STUB(glProvokingVertexEXT, _gloffset_ProvokingVertexEXT)
- GL_STUB(gl_dispatch_stub_788, _gloffset_GetTexParameterPointervAPPLE)
- HIDDEN(gl_dispatch_stub_788)
- GL_STUB(gl_dispatch_stub_789, _gloffset_TextureRangeAPPLE)
- HIDDEN(gl_dispatch_stub_789)
- GL_STUB(gl_dispatch_stub_790, _gloffset_StencilFuncSeparateATI)
- HIDDEN(gl_dispatch_stub_790)
- GL_STUB(gl_dispatch_stub_791, _gloffset_ProgramEnvParameters4fvEXT)
- HIDDEN(gl_dispatch_stub_791)
- GL_STUB(gl_dispatch_stub_792, _gloffset_ProgramLocalParameters4fvEXT)
- HIDDEN(gl_dispatch_stub_792)
- GL_STUB(gl_dispatch_stub_793, _gloffset_GetQueryObjecti64vEXT)
- HIDDEN(gl_dispatch_stub_793)
- GL_STUB(gl_dispatch_stub_794, _gloffset_GetQueryObjectui64vEXT)
- HIDDEN(gl_dispatch_stub_794)
+ GL_STUB(gl_dispatch_stub_796, _gloffset_GetTexParameterPointervAPPLE)
+ HIDDEN(gl_dispatch_stub_796)
+ GL_STUB(gl_dispatch_stub_797, _gloffset_TextureRangeAPPLE)
+ HIDDEN(gl_dispatch_stub_797)
+ GL_STUB(gl_dispatch_stub_798, _gloffset_StencilFuncSeparateATI)
+ HIDDEN(gl_dispatch_stub_798)
+ GL_STUB(gl_dispatch_stub_799, _gloffset_ProgramEnvParameters4fvEXT)
+ HIDDEN(gl_dispatch_stub_799)
+ GL_STUB(gl_dispatch_stub_800, _gloffset_ProgramLocalParameters4fvEXT)
+ HIDDEN(gl_dispatch_stub_800)
+ GL_STUB(gl_dispatch_stub_801, _gloffset_GetQueryObjecti64vEXT)
+ HIDDEN(gl_dispatch_stub_801)
+ GL_STUB(gl_dispatch_stub_802, _gloffset_GetQueryObjectui64vEXT)
+ HIDDEN(gl_dispatch_stub_802)
GL_STUB_ALIAS(glArrayElementEXT, glArrayElement)
GL_STUB_ALIAS(glBindTextureEXT, glBindTexture)
GL_STUB_ALIAS(glDrawArraysEXT, glDrawArrays)
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 0e89a624c4e..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,
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_blend.c b/src/mesa/state_tracker/st_atom_blend.c
index 35c09c3e08f..43e62c29f3e 100644
--- a/src/mesa/state_tracker/st_atom_blend.c
+++ b/src/mesa/state_tracker/st_atom_blend.c
@@ -200,13 +200,13 @@ update_blend( struct st_context *st )
}
/* Colormask - maybe reverse these bits? */
- if (st->ctx->Color.ColorMask[0])
+ if (st->ctx->Color.ColorMask[0][0])
blend->colormask |= PIPE_MASK_R;
- if (st->ctx->Color.ColorMask[1])
+ if (st->ctx->Color.ColorMask[0][1])
blend->colormask |= PIPE_MASK_G;
- if (st->ctx->Color.ColorMask[2])
+ if (st->ctx->Color.ColorMask[0][2])
blend->colormask |= PIPE_MASK_B;
- if (st->ctx->Color.ColorMask[3])
+ if (st->ctx->Color.ColorMask[0][3])
blend->colormask |= PIPE_MASK_A;
if (st->ctx->Color.DitherFlag)
diff --git a/src/mesa/state_tracker/st_atom_constbuf.c b/src/mesa/state_tracker/st_atom_constbuf.c
index 77153889b68..d70cf877e84 100644
--- a/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/src/mesa/state_tracker/st_atom_constbuf.c
@@ -57,7 +57,7 @@ void st_upload_constants( struct st_context *st,
unsigned shader_type)
{
struct pipe_context *pipe = st->pipe;
- struct pipe_constant_buffer *cbuf = &st->state.constants[shader_type];
+ struct pipe_buffer **cbuf = &st->state.constants[shader_type];
assert(shader_type == PIPE_SHADER_VERTEX ||
shader_type == PIPE_SHADER_FRAGMENT);
@@ -71,8 +71,8 @@ void st_upload_constants( struct st_context *st,
/* We always need to get a new buffer, to keep the drivers simple and
* avoid gratuitous rendering synchronization.
*/
- pipe_buffer_reference(&cbuf->buffer, NULL );
- cbuf->buffer = pipe_buffer_create(pipe->screen, 16,
+ pipe_buffer_reference(cbuf, NULL );
+ *cbuf = pipe_buffer_create(pipe->screen, 16,
PIPE_BUFFER_USAGE_CONSTANT,
paramBytes );
@@ -84,12 +84,12 @@ void st_upload_constants( struct st_context *st,
}
/* load Mesa constants into the constant buffer */
- if (cbuf->buffer)
- st_no_flush_pipe_buffer_write(st, cbuf->buffer,
+ if (cbuf)
+ st_no_flush_pipe_buffer_write(st, *cbuf,
0, paramBytes,
params->ParameterValues);
- st->pipe->set_constant_buffer(st->pipe, shader_type, 0, cbuf);
+ st->pipe->set_constant_buffer(st->pipe, shader_type, 0, *cbuf);
}
else {
st->constants.tracked_state[shader_type].dirty.mesa = 0x0;
diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c
index 1e18497590d..8d045f2c6c0 100644
--- a/src/mesa/state_tracker/st_atom_framebuffer.c
+++ b/src/mesa/state_tracker/st_atom_framebuffer.c
@@ -39,6 +39,7 @@
#include "pipe/p_context.h"
#include "cso_cache/cso_context.h"
#include "util/u_rect.h"
+#include "util/u_math.h"
@@ -63,8 +64,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 83003001612..0b2e3f53812 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -144,7 +144,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;
@@ -161,12 +161,14 @@ load_color_map_texture(GLcontext *ctx, struct pipe_texture *pt)
*/
for (i = 0; i < texSize; i++) {
for (j = 0; j < texSize; j++) {
+ union util_color uc;
int k = (i * texSize + j);
ubyte r = ctx->PixelMaps.RtoR.Map8[j * rSize / texSize];
ubyte g = ctx->PixelMaps.GtoG.Map8[i * gSize / texSize];
ubyte b = ctx->PixelMaps.BtoB.Map8[j * bSize / texSize];
ubyte a = ctx->PixelMaps.AtoA.Map8[i * aSize / texSize];
- util_pack_color_ub(r, g, b, a, pt->format, dest + k);
+ util_pack_color_ub(r, g, b, a, pt->format, &uc);
+ *(dest + k) = uc.ui;
}
}
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 7b1734c4f32..9d63f1c6ab6 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -207,15 +207,11 @@ update_samplers(struct st_context *st)
assert(sampler->min_lod <= sampler->max_lod);
}
- xlate_border_color(texobj->BorderColor,
+ xlate_border_color(texobj->BorderColor.f,
teximg ? teximg->_BaseFormat : GL_RGBA,
sampler->border_color);
sampler->max_anisotropy = texobj->MaxAnisotropy;
- if (sampler->max_anisotropy > 1.0) {
- sampler->min_img_filter = PIPE_TEX_FILTER_ANISO;
- sampler->mag_img_filter = PIPE_TEX_FILTER_ANISO;
- }
/* only care about ARB_shadow, not SGI shadow */
if (texobj->CompareMode == GL_COMPARE_R_TO_TEXTURE) {
@@ -228,14 +224,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 4c106eb89b0..181f88a3348 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -35,8 +35,6 @@
* Brian Paul
*/
-
-
#include "main/imports.h"
#include "main/mtypes.h"
#include "main/macros.h"
@@ -55,82 +53,16 @@
#include "st_atom_shader.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
- */
-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.
+ * Translate fragment program if 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;
@@ -140,7 +72,7 @@ find_translated_vp(struct st_context *st,
numIn++;
}
else {
- stfp->input_to_slot[inAttr] = UNUSED;
+ stfp->input_to_slot[inAttr] = -1;
}
}
@@ -150,170 +82,78 @@ 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;
-
- xvp->next = stfp->vertex_programs;
- stfp->vertex_programs = xvp;
- }
- /* See if we need to translate vertex program to TGSI form */
- if (xvp->serialNo != stvp->serialNo) {
- GLuint outAttr;
- const GLbitfield64 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.
- */
- 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
- }
+/**
+ * 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;
- /* 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);
- }
+ /* Nothing in our key yet. This will change:
+ */
+ memset(&key, 0, sizeof key);
+
+ /* When this is true, we will add an extra input to the vertex
+ * shader translation (for edgeflags), an extra output with
+ * edgeflag semantics, and extend the vertex shader to pass through
+ * the input to the output. We'll need to use similar logic to set
+ * up the extra vertex_element input for edgeflags.
+ * _NEW_POLYGON, ST_NEW_EDGEFLAGS_DATA
+ */
+ key.passthrough_edgeflags = (st->vertdata_edgeflags && (
+ st->ctx->Polygon.FrontMode != GL_FILL ||
+ st->ctx->Polygon.BackMode != GL_FILL));
- /* 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]);
- }
- }
- /* 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.
+ /* 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++) {
- 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;
- }
- }
+ st_prepare_vertex_program( st, stvp );
-#if 0 /*debug*/
- printf("vp output_to_slot[%d] = %d\n", outAttr,
- xvp->output_to_slot[outAttr]);
-#endif
+ /* We are now up-to-date:
+ */
+ 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;
}
-
- 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;
}
- return xvp;
-}
-
-
-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;
+ /* 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 vpv;
}
+/**
+ * Return pointer to a pass-through fragment shader.
+ * This shader is used when a texture is missing/incomplete.
+ */
static void *
get_passthrough_fs(struct st_context *st)
{
@@ -326,31 +166,23 @@ get_passthrough_fs(struct st_context *st)
}
+/**
+ * Update fragment program state/atom. This involves translating the
+ * Mesa fragment program into a gallium fragment program and binding it.
+ */
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);
@@ -359,16 +191,52 @@ update_linkage( struct st_context *st )
else {
cso_set_fragment_shader_handle(st->cso_context, stfp->driver_shader);
}
-
- st->vertex_result_to_slot = xvp->output_to_slot;
}
-const struct st_tracked_state st_update_shader = {
- "st_update_shader", /* name */
+const struct st_tracked_state st_update_fp = {
+ "st_update_fp", /* name */
{ /* dirty */
0, /* mesa */
- ST_NEW_VERTEX_PROGRAM | ST_NEW_FRAGMENT_PROGRAM /* st */
+ ST_NEW_FRAGMENT_PROGRAM /* st */
+ },
+ update_fp /* update */
+};
+
+
+
+/**
+ * Update vertex program state/atom. This involves translating the
+ * Mesa vertex program into a gallium fragment program and binding it.
+ */
+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 = stvp->result_to_output;
+}
+
+
+const struct st_tracked_state st_update_vp = {
+ "st_update_vp", /* name */
+ { /* dirty */
+ _NEW_POLYGON, /* mesa */
+ ST_NEW_VERTEX_PROGRAM | ST_NEW_EDGEFLAGS_DATA /* 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_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index 6625dfba330..798081ec899 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -227,7 +227,7 @@ accum_return(GLcontext *ctx, GLfloat value,
{
struct pipe_context *pipe = ctx->st->pipe;
struct pipe_screen *screen = pipe->screen;
- const GLubyte *colormask = ctx->Color.ColorMask;
+ const GLubyte *colormask = ctx->Color.ColorMask[0];
enum pipe_transfer_usage usage;
struct pipe_transfer *color_trans;
size_t stride = acc_strb->stride;
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 8602f6d32b4..d1b35f796ec 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -164,11 +164,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;
}
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 3aa4b03159a..398587ac4b1 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -50,6 +50,7 @@
#include "pipe/p_inlines.h"
#include "pipe/p_state.h"
#include "pipe/p_defines.h"
+#include "util/u_format.h"
#include "util/u_simple_shaders.h"
#include "util/u_draw_quad.h"
@@ -228,13 +229,13 @@ clear_with_quad(GLcontext *ctx,
blend.rgb_dst_factor = PIPE_BLENDFACTOR_ZERO;
blend.alpha_dst_factor = PIPE_BLENDFACTOR_ZERO;
if (color) {
- if (ctx->Color.ColorMask[0])
+ if (ctx->Color.ColorMask[0][0])
blend.colormask |= PIPE_MASK_R;
- if (ctx->Color.ColorMask[1])
+ if (ctx->Color.ColorMask[0][1])
blend.colormask |= PIPE_MASK_G;
- if (ctx->Color.ColorMask[2])
+ if (ctx->Color.ColorMask[0][2])
blend.colormask |= PIPE_MASK_B;
- if (ctx->Color.ColorMask[3])
+ if (ctx->Color.ColorMask[0][3])
blend.colormask |= PIPE_MASK_A;
if (st->ctx->Color.DitherFlag)
blend.dither = 1;
@@ -296,10 +297,10 @@ check_clear_color_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
ctx->Scissor.Height < rb->Height))
return TRUE;
- if (!ctx->Color.ColorMask[0] ||
- !ctx->Color.ColorMask[1] ||
- !ctx->Color.ColorMask[2] ||
- !ctx->Color.ColorMask[3])
+ if (!ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3])
return TRUE;
return FALSE;
@@ -338,7 +339,7 @@ static INLINE GLboolean
check_clear_depth_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
{
const struct st_renderbuffer *strb = st_renderbuffer(rb);
- const GLboolean isDS = pf_is_depth_and_stencil(strb->surface->format);
+ const GLboolean isDS = util_format_is_depth_and_stencil(strb->surface->format);
if (ctx->Scissor.Enabled &&
(ctx->Scissor.X != 0 ||
@@ -362,7 +363,7 @@ static INLINE GLboolean
check_clear_stencil_with_quad(GLcontext *ctx, struct gl_renderbuffer *rb)
{
const struct st_renderbuffer *strb = st_renderbuffer(rb);
- const GLboolean isDS = pf_is_depth_and_stencil(strb->surface->format);
+ const GLboolean isDS = util_format_is_depth_and_stencil(strb->surface->format);
const GLuint stencilMax = 0xff;
const GLboolean maskStencil
= (ctx->Stencil.WriteMask[0] & stencilMax) != stencilMax;
diff --git a/src/mesa/state_tracker/st_cb_condrender.c b/src/mesa/state_tracker/st_cb_condrender.c
new file mode 100644
index 00000000000..780b40c2065
--- /dev/null
+++ b/src/mesa/state_tracker/st_cb_condrender.c
@@ -0,0 +1,95 @@
+/**************************************************************************
+ *
+ * Copyright 2009 VMware, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+
+/**
+ * glBegin/EndCondtionalRender functions
+ *
+ * \author Brian Paul
+ */
+
+
+#include "main/imports.h"
+#include "main/context.h"
+
+#include "pipe/p_context.h"
+#include "pipe/p_defines.h"
+#include "st_context.h"
+#include "st_cb_queryobj.h"
+#include "st_cb_condrender.h"
+
+
+/**
+ * Called via ctx->Driver.BeginConditionalRender()
+ */
+static void
+st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q,
+ GLenum mode)
+{
+ struct st_query_object *stq = st_query_object(q);
+ struct pipe_context *pipe = ctx->st->pipe;
+ uint m;
+
+ switch (mode) {
+ case GL_QUERY_WAIT:
+ m = PIPE_RENDER_COND_WAIT;
+ break;
+ case GL_QUERY_NO_WAIT:
+ m = PIPE_RENDER_COND_NO_WAIT;
+ break;
+ case GL_QUERY_BY_REGION_WAIT:
+ m = PIPE_RENDER_COND_BY_REGION_WAIT;
+ break;
+ case GL_QUERY_BY_REGION_NO_WAIT:
+ m = PIPE_RENDER_COND_BY_REGION_NO_WAIT;
+ break;
+ default:
+ assert(0 && "bad mode in st_BeginConditionalRender");
+ }
+
+ pipe->render_condition(pipe, stq->pq, m);
+}
+
+
+/**
+ * Called via ctx->Driver.BeginConditionalRender()
+ */
+static void
+st_EndConditionalRender(GLcontext *ctx, struct gl_query_object *q)
+{
+ struct pipe_context *pipe = ctx->st->pipe;
+ (void) q;
+ pipe->render_condition(pipe, NULL, 0);
+}
+
+
+
+void st_init_cond_render_functions(struct dd_function_table *functions)
+{
+ functions->BeginConditionalRender = st_BeginConditionalRender;
+ functions->EndConditionalRender = st_EndConditionalRender;
+}
diff --git a/src/mesa/state_tracker/st_api.c b/src/mesa/state_tracker/st_cb_condrender.h
index fc0e9a23164..891f1cbcd8c 100644
--- a/src/mesa/state_tracker/st_api.c
+++ b/src/mesa/state_tracker/st_cb_condrender.h
@@ -1,6 +1,6 @@
/**************************************************************************
*
- * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2009 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -18,16 +18,18 @@
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
+#ifndef ST_CB_CONDRENDER_H
+#define ST_CB_CONDRENDER_H
-/**
- * Just a global symbol for EGL to look for to identify the supported
- * graphics API.
- */
-int st_api_OpenGL = 1;
+
+extern void st_init_cond_render_functions(struct dd_function_table *functions);
+
+
+#endif
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 23db3f19689..7afdc31ede9 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -54,8 +54,10 @@
#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_format.h"
#include "util/u_math.h"
#include "util/u_rect.h"
#include "shader/prog_instruction.h"
@@ -230,78 +232,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];
}
@@ -533,8 +498,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)
{
@@ -569,10 +534,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: */
@@ -615,10 +580,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.
@@ -631,8 +596,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);
@@ -677,7 +642,7 @@ draw_stencil_pixels(GLcontext *ctx, GLint x, GLint y,
}
if(format != GL_DEPTH_STENCIL &&
- pf_get_component_bits( strb->format, PIPE_FORMAT_COMP_Z ) != 0)
+ util_format_get_component_bits(strb->format, UTIL_FORMAT_COLORSPACE_ZS, 0) != 0)
usage = PIPE_TRANSFER_READ_WRITE;
else
usage = PIPE_TRANSFER_WRITE;
@@ -731,7 +696,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;
@@ -800,7 +765,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;
@@ -820,13 +785,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;
}
@@ -837,7 +802,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);
}
}
@@ -869,7 +837,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
GL_STENCIL_INDEX, GL_UNSIGNED_BYTE,
&ctx->DefaultPacking, buffer);
- if(pf_get_component_bits( rbDraw->format, PIPE_FORMAT_COMP_Z ) != 0)
+ if(util_format_get_component_bits(rbDraw->format, UTIL_FORMAT_COLORSPACE_ZS, 0) != 0)
usage = PIPE_TRANSFER_READ_WRITE;
else
usage = PIPE_TRANSFER_WRITE;
@@ -883,8 +851,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(util_format_get_blockwidth(ptDraw->texture->format) == 1);
+ assert(util_format_get_blockheight(ptDraw->texture->format) == 1);
/* map the stencil buffer */
drawMap = screen->transfer_map(screen, ptDraw);
@@ -905,7 +873,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;
@@ -954,7 +922,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;
@@ -1003,14 +971,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;
@@ -1110,7 +1078,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
if (ST_DEBUG & DEBUG_FALLBACK)
debug_printf("%s: fallback processing\n", __FUNCTION__);
- if (type == GL_DEPTH && pf_is_depth_and_stencil(pt->format))
+ if (type == GL_DEPTH && util_format_is_depth_and_stencil(pt->format))
transfer_usage = PIPE_TRANSFER_READ_WRITE;
else
transfer_usage = PIPE_TRANSFER_WRITE;
@@ -1142,7 +1110,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);
}
@@ -1161,6 +1132,8 @@ st_destroy_drawpix(struct st_context *st)
{
st_reference_fragprog(st, &st->drawpix.z_shader, NULL);
st_reference_fragprog(st, &st->pixel_xfer.combined_prog, NULL);
- st_reference_vertprog(st, &st->drawpix.vert_shaders[0], NULL);
- st_reference_vertprog(st, &st->drawpix.vert_shaders[1], NULL);
+ if (st->drawpix.vert_shaders[0])
+ free(st->drawpix.vert_shaders[0]);
+ if (st->drawpix.vert_shaders[1])
+ free(st->drawpix.vert_shaders[1]);
}
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 9cdff5354b4..f7350ef1e3c 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -48,6 +48,7 @@
#include "st_public.h"
#include "st_texture.h"
+#include "util/u_format.h"
#include "util/u_rect.h"
@@ -97,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 = util_format_get_stride(strb->format, width);
+ size = util_format_get_2d_size(strb->format, strb->stride, height);
strb->data = _mesa_malloc(size);
@@ -126,13 +125,12 @@ 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)) {
+ if (util_format_is_depth_or_stencil(format)) {
template.tex_usage = PIPE_TEXTURE_USAGE_DEPTH_STENCIL;
}
else {
@@ -375,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 22cb61c3805..5138e596a9c 100644
--- a/src/mesa/state_tracker/st_cb_program.c
+++ b/src/mesa/state_tracker/st_cb_program.c
@@ -137,24 +137,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:
@@ -176,8 +159,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:
@@ -218,8 +199,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;
}
@@ -228,25 +207,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_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
index 5ef7765017f..2281d10e999 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/src/mesa/state_tracker/st_cb_queryobj.c
@@ -43,23 +43,6 @@
#include "st_cb_queryobj.h"
-struct st_query_object
-{
- struct gl_query_object base;
- struct pipe_query *pq;
-};
-
-
-/**
- * Cast wrapper
- */
-static struct st_query_object *
-st_query_object(struct gl_query_object *q)
-{
- return (struct st_query_object *) q;
-}
-
-
static struct gl_query_object *
st_NewQueryObject(GLcontext *ctx, GLuint id)
{
diff --git a/src/mesa/state_tracker/st_cb_queryobj.h b/src/mesa/state_tracker/st_cb_queryobj.h
index 9220a212b60..fa256b71824 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.h
+++ b/src/mesa/state_tracker/st_cb_queryobj.h
@@ -29,6 +29,27 @@
#define ST_CB_QUERYOBJ_H
+/**
+ * Subclass of gl_query_object
+ */
+struct st_query_object
+{
+ struct gl_query_object base;
+ struct pipe_query *pq;
+};
+
+
+/**
+ * Cast wrapper
+ */
+static INLINE struct st_query_object *
+st_query_object(struct gl_query_object *q)
+{
+ return (struct st_query_object *) q;
+}
+
+
+
extern void
st_init_query_functions(struct dd_function_table *functions);
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index be981956626..8eb825a6a41 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -101,7 +101,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;
@@ -241,7 +241,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,
@@ -429,8 +429,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
const GLint dstStride = _mesa_image_row_stride(&clippedPacking, width,
format, type);
- if (trans->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];
@@ -461,8 +461,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];
@@ -488,7 +488,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];
@@ -503,7 +503,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 a0dc016b334..cee2452eafe 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -61,6 +61,7 @@
#include "pipe/p_shader_tokens.h"
#include "util/u_tile.h"
#include "util/u_blit.h"
+#include "util/u_format.h"
#include "util/u_surface.h"
#include "util/u_math.h"
@@ -203,7 +204,7 @@ static GLuint
default_usage(enum pipe_format fmt)
{
GLuint usage = PIPE_TEXTURE_USAGE_SAMPLER;
- if (pf_is_depth_stencil(fmt))
+ if (util_format_is_depth_or_stencil(fmt))
usage |= PIPE_TEXTURE_USAGE_DEPTH_STENCIL;
else
usage |= PIPE_TEXTURE_USAGE_RENDER_TARGET;
@@ -404,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);
@@ -633,7 +633,7 @@ st_TexImage(GLcontext * ctx,
if (stImage->pt) {
if (format == GL_DEPTH_COMPONENT &&
- pf_is_depth_and_stencil(stImage->pt->format))
+ util_format_is_depth_and_stencil(stImage->pt->format))
transfer_usage = PIPE_TRANSFER_READ_WRITE;
else
transfer_usage = PIPE_TRANSFER_WRITE;
@@ -679,7 +679,24 @@ st_TexImage(GLcontext * ctx,
* conversion and copy:
*/
if (compressed_src) {
- memcpy(texImage->Data, pixels, imageSize);
+ const GLuint srcImageStride = _mesa_format_row_stride(texImage->TexFormat, width);
+ if(dstRowStride == srcImageStride)
+ memcpy(texImage->Data, pixels, imageSize);
+ else
+ {
+ char *dst = texImage->Data;
+ const char *src = pixels;
+ GLuint i, bw, bh, lines;
+ _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh);
+ lines = (height + bh - 1) / bh;
+
+ for(i = 0; i < lines; ++i)
+ {
+ memcpy(dst, src, srcImageStride);
+ dst += dstRowStride;
+ src += srcImageStride;
+ }
+ }
}
else {
const GLuint srcImageStride =
@@ -832,7 +849,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 * util_format_get_blocksize(stImage->pt->format);
ubyte *map = screen->transfer_map(screen, tex_xfer);
GLuint row;
for (row = 0; row < height; row++) {
@@ -889,7 +906,7 @@ st_get_tex_image(GLcontext * ctx, GLenum target, GLint level,
GLubyte *dest;
if (stImage->pt &&
- pf_is_compressed(stImage->pt->format) &&
+ util_format_is_compressed(stImage->pt->format) &&
!compressed_dst) {
/* Need to decompress the texture.
* We'll do this by rendering a textured quad.
@@ -914,7 +931,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 / util_format_get_blocksize(stImage->pt->format);
}
else {
/* Otherwise, the image should actually be stored in
@@ -1040,7 +1057,7 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
unsigned face = _mesa_tex_target_to_face(target);
if (format == GL_DEPTH_COMPONENT &&
- pf_is_depth_and_stencil(stImage->pt->format))
+ util_format_is_depth_and_stencil(stImage->pt->format))
transfer_usage = PIPE_TRANSFER_READ_WRITE;
else
transfer_usage = PIPE_TRANSFER_WRITE;
@@ -1162,10 +1179,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);
@@ -1177,8 +1194,7 @@ st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
xoffset, yoffset,
width, height);
- block = stImage->pt->block;
- srcBlockStride = pf_get_stride(&block, width);
+ srcBlockStride = util_format_get_stride(pformat, width);
dstBlockStride = stImage->transfer->stride;
} else {
assert(stImage->pt);
@@ -1192,16 +1208,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 % util_format_get_blockwidth(pformat) == 0);
+ assert(yoffset % util_format_get_blockheight(pformat) == 0);
+ assert(width % util_format_get_blockwidth(pformat) == 0);
+ assert(height % util_format_get_blockheight(pformat) == 0);
- for (y = 0; y < height; y += block.height) {
+ for (y = 0; y < height; y += util_format_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 * util_format_get_nblocksy(pformat, y);
+ char *dst = (char*)texImage->Data + dstBlockStride * util_format_get_nblocksy(pformat, y);
+ memcpy(dst, src, util_format_get_stride(pformat, width));
}
if (stImage->pt) {
@@ -1265,7 +1281,7 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
if ((baseFormat == GL_DEPTH_COMPONENT ||
baseFormat == GL_DEPTH_STENCIL) &&
- pf_is_depth_and_stencil(stImage->pt->format))
+ util_format_is_depth_and_stencil(stImage->pt->format))
transfer_usage = PIPE_TRANSFER_READ_WRITE;
else
transfer_usage = PIPE_TRANSFER_WRITE;
@@ -1722,10 +1738,10 @@ copy_image_data_to_texture(struct st_context *st,
dstLevel,
stImage->base.Data,
stImage->base.RowStride *
- stObj->pt->block.size,
+ util_format_get_blocksize(stObj->pt->format),
stImage->base.RowStride *
stImage->base.Height *
- stObj->pt->block.size);
+ util_format_get_blocksize(stObj->pt->format));
_mesa_align_free(stImage->base.Data);
stImage->base.Data = NULL;
}
@@ -1791,10 +1807,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 ||
- stObj->pt->block.size != blockSize)
+ 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.c b/src/mesa/state_tracker/st_context.c
index 6c463ca9398..a62ff248ce5 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -38,11 +38,12 @@
#include "st_cb_blit.h"
#include "st_cb_bufferobjects.h"
#include "st_cb_clear.h"
+#include "st_cb_condrender.h"
#if FEATURE_drawpix
#include "st_cb_drawpixels.h"
#include "st_cb_rasterpos.h"
#endif
-#ifdef FEATURE_OES_draw_texture
+#if FEATURE_OES_draw_texture
#include "st_cb_drawtex.h"
#endif
#include "st_cb_fbo.h"
@@ -202,7 +203,7 @@ static void st_destroy_context_priv( struct st_context *st )
st_destroy_bitmap(st);
st_destroy_drawpix(st);
#endif
-#ifdef FEATURE_OES_draw_texture
+#if FEATURE_OES_draw_texture
st_destroy_drawtex(st);
#endif
@@ -211,8 +212,8 @@ static void st_destroy_context_priv( struct st_context *st )
}
for (i = 0; i < Elements(st->state.constants); i++) {
- if (st->state.constants[i].buffer) {
- pipe_buffer_reference(&st->state.constants[i].buffer, NULL);
+ if (st->state.constants[i]) {
+ pipe_buffer_reference(&st->state.constants[i], NULL);
}
}
@@ -323,6 +324,11 @@ void st_init_driver_functions(struct dd_function_table *functions)
st_init_drawpixels_functions(functions);
st_init_rasterpos_functions(functions);
#endif
+
+#if FEATURE_OES_draw_texture
+ st_init_drawtex_functions(functions);
+#endif
+
st_init_fbo_functions(functions);
#if FEATURE_feedback
st_init_feedback_functions(functions);
@@ -331,6 +337,7 @@ void st_init_driver_functions(struct dd_function_table *functions)
#if FEATURE_queryobj
st_init_query_functions(functions);
#endif
+ st_init_cond_render_functions(functions);
st_init_readpixels_functions(functions);
st_init_texture_functions(functions);
st_init_flush_functions(functions);
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 18adb35e872..50e98d7146a 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -55,6 +55,7 @@ struct bitmap_cache;
#define ST_NEW_FRAGMENT_PROGRAM 0x2
#define ST_NEW_VERTEX_PROGRAM 0x4
#define ST_NEW_FRAMEBUFFER 0x8
+#define ST_NEW_EDGEFLAGS_DATA 0x10
struct st_state_flags {
@@ -91,7 +92,7 @@ struct st_context
struct pipe_sampler_state samplers[PIPE_MAX_SAMPLERS];
struct pipe_sampler_state *sampler_list[PIPE_MAX_SAMPLERS];
struct pipe_clip_state clip;
- struct pipe_constant_buffer constants[2];
+ struct pipe_buffer *constants[2];
struct pipe_framebuffer_state framebuffer;
struct pipe_texture *sampler_texture[PIPE_MAX_SAMPLERS];
struct pipe_scissor_state scissor;
@@ -120,6 +121,7 @@ struct st_context
struct st_state_flags dirty;
GLboolean missing_textures;
+ GLboolean vertdata_edgeflags;
/** Mapping from VERT_RESULT_x to post-transformed vertex slot */
const GLuint *vertex_result_to_slot;
@@ -127,6 +129,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 {
@@ -155,7 +159,7 @@ struct st_context
/** for glDraw/CopyPixels */
struct {
struct st_fragment_program *z_shader;
- struct st_vertex_program *vert_shaders[2];
+ void *vert_shaders[2]; /**< ureg shaders */
} drawpix;
/** for glClear */
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 5c6af1125a3..b0d5b993a77 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -217,59 +217,7 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
}
-/*
- * If edge flags are needed, setup an bitvector of flags and call
- * pipe->set_edgeflags().
- * XXX memleak: need to free the returned pointer at some point
- */
-static void *
-setup_edgeflags(GLcontext *ctx, GLenum primMode, GLint start, GLint count,
- const struct gl_client_array *array)
-{
- struct pipe_context *pipe = ctx->st->pipe;
-
- if ((primMode == GL_TRIANGLES ||
- primMode == GL_QUADS ||
- primMode == GL_POLYGON) &&
- (ctx->Polygon.FrontMode != GL_FILL ||
- ctx->Polygon.BackMode != GL_FILL)) {
- /* need edge flags */
- GLint i;
- unsigned *vec;
- struct st_buffer_object *stobj = st_buffer_object(array->BufferObj);
- ubyte *map;
-
- if (!stobj || stobj->Base.Name == 0) {
- /* edge flags are not in a VBO */
- return NULL;
- }
-
- vec = (unsigned *) _mesa_calloc(sizeof(unsigned) * ((count + 31) / 32));
- if (!vec)
- return NULL;
- map = pipe_buffer_map(pipe->screen, stobj->buffer, PIPE_BUFFER_USAGE_CPU_READ);
- map = ADD_POINTERS(map, array->Ptr);
-
- for (i = 0; i < count; i++) {
- if (*((float *) map))
- vec[i/32] |= 1 << (i % 32);
-
- map += array->StrideB;
- }
-
- pipe_buffer_unmap(pipe->screen, stobj->buffer);
-
- pipe->set_edgeflags(pipe, vec);
-
- return vec;
- }
- else {
- /* edge flags not needed */
- pipe->set_edgeflags(pipe, NULL);
- return NULL;
- }
-}
/**
@@ -279,6 +227,7 @@ setup_edgeflags(GLcontext *ctx, GLenum primMode, GLint start, GLint count,
*/
static GLboolean
is_interleaved_arrays(const struct st_vertex_program *vp,
+ const struct st_vp_varient *vpv,
const struct gl_client_array **arrays,
GLboolean *userSpace)
{
@@ -288,7 +237,7 @@ is_interleaved_arrays(const struct st_vertex_program *vp,
GLuint num_client_arrays = 0;
const GLubyte *client_addr = NULL;
- for (attr = 0; attr < vp->num_inputs; attr++) {
+ for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
const struct gl_buffer_object *bufObj = arrays[mesaAttr]->BufferObj;
const GLsizei stride = arrays[mesaAttr]->StrideB; /* in bytes */
@@ -321,7 +270,7 @@ is_interleaved_arrays(const struct st_vertex_program *vp,
}
}
- *userSpace = (num_client_arrays == vp->num_inputs);
+ *userSpace = (num_client_arrays == vpv->num_inputs);
/* printf("user space: %d (%d %d)\n", (int) *userSpace,num_client_arrays,vp->num_inputs); */
return GL_TRUE;
@@ -333,15 +282,16 @@ is_interleaved_arrays(const struct st_vertex_program *vp,
*/
static void
get_arrays_bounds(const struct st_vertex_program *vp,
- const struct gl_client_array **arrays,
- GLuint max_index,
- const GLubyte **low, const GLubyte **high)
+ const struct st_vp_varient *vpv,
+ const struct gl_client_array **arrays,
+ GLuint max_index,
+ const GLubyte **low, const GLubyte **high)
{
const GLubyte *low_addr = NULL;
const GLubyte *high_addr = NULL;
GLuint attr;
- for (attr = 0; attr < vp->num_inputs; attr++) {
+ for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
const GLint stride = arrays[mesaAttr]->StrideB;
const GLubyte *start = arrays[mesaAttr]->Ptr;
@@ -373,6 +323,7 @@ get_arrays_bounds(const struct st_vertex_program *vp,
static void
setup_interleaved_attribs(GLcontext *ctx,
const struct st_vertex_program *vp,
+ const struct st_vp_varient *vpv,
const struct gl_client_array **arrays,
GLuint max_index,
GLboolean userSpace,
@@ -383,7 +334,7 @@ setup_interleaved_attribs(GLcontext *ctx,
GLuint attr;
const GLubyte *offset0 = NULL;
- for (attr = 0; attr < vp->num_inputs; attr++) {
+ for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
struct gl_buffer_object *bufobj = arrays[mesaAttr]->BufferObj;
struct st_buffer_object *stobj = st_buffer_object(bufobj);
@@ -394,7 +345,7 @@ setup_interleaved_attribs(GLcontext *ctx,
if (attr == 0) {
const GLubyte *low, *high;
- get_arrays_bounds(vp, arrays, max_index, &low, &high);
+ get_arrays_bounds(vp, vpv, arrays, max_index, &low, &high);
/*printf("buffer range: %p %p %d\n", low, high, high-low);*/
offset0 = low;
@@ -414,6 +365,7 @@ setup_interleaved_attribs(GLcontext *ctx,
velements[attr].src_offset =
(unsigned) (arrays[mesaAttr]->Ptr - offset0);
+ velements[attr].instance_divisor = 0;
velements[attr].vertex_buffer_index = 0;
velements[attr].nr_components = arrays[mesaAttr]->Size;
velements[attr].src_format =
@@ -435,6 +387,7 @@ setup_interleaved_attribs(GLcontext *ctx,
static void
setup_non_interleaved_attribs(GLcontext *ctx,
const struct st_vertex_program *vp,
+ const struct st_vp_varient *vpv,
const struct gl_client_array **arrays,
GLuint max_index,
GLboolean *userSpace,
@@ -444,7 +397,7 @@ setup_non_interleaved_attribs(GLcontext *ctx,
struct pipe_context *pipe = ctx->st->pipe;
GLuint attr;
- for (attr = 0; attr < vp->num_inputs; attr++) {
+ for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
struct gl_buffer_object *bufobj = arrays[mesaAttr]->BufferObj;
GLsizei stride = arrays[mesaAttr]->StrideB;
@@ -502,6 +455,7 @@ setup_non_interleaved_attribs(GLcontext *ctx,
/* common-case setup */
vbuffer[attr].stride = stride; /* in bytes */
vbuffer[attr].max_index = max_index;
+ velements[attr].instance_divisor = 0;
velements[attr].vertex_buffer_index = attr;
velements[attr].nr_components = arrays[mesaAttr]->Size;
velements[attr].src_format
@@ -538,6 +492,20 @@ check_uniforms(GLcontext *ctx)
}
+static unsigned translate_prim( GLcontext *ctx,
+ unsigned prim )
+{
+ /* Avoid quadstrips if it's easy to do so:
+ */
+ if (prim == GL_QUAD_STRIP &&
+ ctx->Light.ShadeModel != GL_FLAT &&
+ ctx->Polygon.FrontMode == GL_FILL &&
+ ctx->Polygon.BackMode == GL_FILL)
+ prim = GL_TRIANGLE_STRIP;
+
+ return prim;
+}
+
/**
* This function gets plugged into the VBO module and is called when
* we have something to render.
@@ -555,25 +523,34 @@ st_draw_vbo(GLcontext *ctx,
{
struct pipe_context *pipe = ctx->st->pipe;
const struct st_vertex_program *vp;
- const struct pipe_shader_state *vs;
+ const struct st_vp_varient *vpv;
struct pipe_vertex_buffer vbuffer[PIPE_MAX_SHADER_INPUTS];
GLuint attr;
struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS];
unsigned num_vbuffers, num_velements;
GLboolean userSpace = GL_FALSE;
+ GLboolean vertDataEdgeFlags;
/* Gallium probably doesn't want this in some cases. */
if (!index_bounds_valid)
- vbo_get_minmax_index(ctx, prims, ib, &min_index, &max_index);
+ if (!vbo_all_varyings_in_vbos(arrays))
+ vbo_get_minmax_index(ctx, prims, ib, &min_index, &max_index);
/* sanity check for pointer arithmetic below */
assert(sizeof(arrays[0]->Ptr[0]) == 1);
+ vertDataEdgeFlags = arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj &&
+ arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj->Name;
+ if (vertDataEdgeFlags != ctx->st->vertdata_edgeflags) {
+ ctx->st->vertdata_edgeflags = vertDataEdgeFlags;
+ ctx->st->dirty.st |= ST_NEW_EDGEFLAGS_DATA;
+ }
+
st_validate_state(ctx->st);
/* must get these after state validation! */
vp = ctx->st->vp;
- vs = &ctx->st->vp->state;
+ vpv = ctx->st->vp_varient;
#if 0
if (MESA_VERBOSE & VERBOSE_GLSL) {
@@ -586,21 +563,21 @@ st_draw_vbo(GLcontext *ctx,
/*
* Setup the vbuffer[] and velements[] arrays.
*/
- if (is_interleaved_arrays(vp, arrays, &userSpace)) {
+ if (is_interleaved_arrays(vp, vpv, arrays, &userSpace)) {
/*printf("Draw interleaved\n");*/
- setup_interleaved_attribs(ctx, vp, arrays, max_index, userSpace,
+ setup_interleaved_attribs(ctx, vp, vpv, arrays, max_index, userSpace,
vbuffer, velements);
num_vbuffers = 1;
- num_velements = vp->num_inputs;
+ num_velements = vpv->num_inputs;
if (num_velements == 0)
num_vbuffers = 0;
}
else {
/*printf("Draw non-interleaved\n");*/
- setup_non_interleaved_attribs(ctx, vp, arrays, max_index,
+ setup_non_interleaved_attribs(ctx, vp, vpv, arrays, max_index,
&userSpace, vbuffer, velements);
- num_vbuffers = vp->num_inputs;
- num_velements = vp->num_inputs;
+ num_vbuffers = vpv->num_inputs;
+ num_velements = vpv->num_inputs;
}
#if 0
@@ -633,6 +610,7 @@ st_draw_vbo(GLcontext *ctx,
struct gl_buffer_object *bufobj = ib->obj;
struct pipe_buffer *indexBuf = NULL;
unsigned indexSize, indexOffset, i;
+ unsigned prim;
switch (ib->type) {
case GL_UNSIGNED_INT:
@@ -671,24 +649,20 @@ st_draw_vbo(GLcontext *ctx,
* through to driver & draw module. These interfaces still
* need a bit of work...
*/
- setup_edgeflags(ctx, prims[i].mode,
- prims[i].start + indexOffset, prims[i].count,
- arrays[VERT_ATTRIB_EDGEFLAG]);
+ prim = translate_prim( ctx, prims[i].mode );
pipe->draw_range_elements(pipe, indexBuf, indexSize,
min_index,
max_index,
- prims[i].mode,
+ prim,
prims[i].start + indexOffset, prims[i].count);
}
else {
for (i = 0; i < nr_prims; i++) {
- setup_edgeflags(ctx, prims[i].mode,
- prims[i].start + indexOffset, prims[i].count,
- arrays[VERT_ATTRIB_EDGEFLAG]);
+ prim = translate_prim( ctx, prims[i].mode );
pipe->draw_elements(pipe, indexBuf, indexSize,
- prims[i].mode,
+ prim,
prims[i].start + indexOffset, prims[i].count);
}
}
@@ -698,12 +672,12 @@ st_draw_vbo(GLcontext *ctx,
else {
/* non-indexed */
GLuint i;
+ GLuint prim;
+
for (i = 0; i < nr_prims; i++) {
- setup_edgeflags(ctx, prims[i].mode,
- prims[i].start, prims[i].count,
- arrays[VERT_ATTRIB_EDGEFLAG]);
+ prim = translate_prim( ctx, prims[i].mode );
- pipe->draw_arrays(pipe, prims[i].mode, prims[i].start, prims[i].count);
+ pipe->draw_arrays(pipe, prim, prims[i].start, prims[i].count);
}
}
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index 0660a2c4825..dd27a1e3a88 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
@@ -119,10 +119,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);
}
/*
@@ -135,7 +135,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
@@ -176,6 +176,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
/* common-case setup */
vbuffers[attr].stride = arrays[mesaAttr]->StrideB; /* in bytes */
vbuffers[attr].max_index = max_index;
+ velements[attr].instance_divisor = 0;
velements[attr].vertex_buffer_index = attr;
velements[attr].nr_components = arrays[mesaAttr]->Size;
velements[attr].src_format =
@@ -238,10 +239,11 @@ st_feedback_draw_vbo(GLcontext *ctx,
/* map constant buffers */
mapped_constants = pipe_buffer_map(pipe->screen,
- st->state.constants[PIPE_SHADER_VERTEX].buffer,
+ st->state.constants[PIPE_SHADER_VERTEX],
PIPE_BUFFER_USAGE_CPU_READ);
- draw_set_mapped_constant_buffer(st->draw, mapped_constants,
- st->state.constants[PIPE_SHADER_VERTEX].buffer->size);
+ draw_set_mapped_constant_buffer(st->draw, PIPE_SHADER_VERTEX,
+ mapped_constants,
+ st->state.constants[PIPE_SHADER_VERTEX]->size);
/* draw here */
@@ -251,7 +253,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
/* unmap constant buffers */
- pipe_buffer_unmap(pipe->screen, st->state.constants[PIPE_SHADER_VERTEX].buffer);
+ pipe_buffer_unmap(pipe->screen, st->state.constants[PIPE_SHADER_VERTEX]);
/*
* unmap vertex/index buffers
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 54d7c61ae08..89a16c1cbcc 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -91,6 +91,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);
@@ -163,6 +167,7 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.EXT_blend_subtract = GL_TRUE;
ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
+ ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE;
ctx->Extensions.EXT_fog_coord = GL_TRUE;
ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;
ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
@@ -182,6 +187,10 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.NV_texgen_reflection = GL_TRUE;
ctx->Extensions.NV_texture_env_combine4 = GL_TRUE;
+#if FEATURE_OES_draw_texture
+ ctx->Extensions.OES_draw_texture = GL_TRUE;
+#endif
+
ctx->Extensions.SGI_color_matrix = GL_TRUE;
ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;
@@ -301,4 +310,8 @@ void st_init_extensions(struct st_context *st)
/* we support always support GL_EXT_framebuffer_blit */
ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
}
+
+ if (st->pipe->render_condition) {
+ ctx->Extensions.NV_conditional_render = GL_TRUE;
+ }
}
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index d2bc0dc8ba6..3ffc2aee2a2 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -41,42 +41,34 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
+#include "util/u_format.h"
#include "st_context.h"
#include "st_format.h"
-static GLuint
-format_bits(
- pipe_format_rgbazs_t info,
- GLuint comp )
-{
- return pf_get_component_bits( (enum pipe_format) info, comp );
-}
static GLuint
-format_max_bits(
- pipe_format_rgbazs_t info )
+format_max_bits(enum pipe_format format)
{
- GLuint size = format_bits( info, PIPE_FORMAT_COMP_R );
+ GLuint size = util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 0);
- size = MAX2( size, format_bits( info, PIPE_FORMAT_COMP_G ) );
- size = MAX2( size, format_bits( info, PIPE_FORMAT_COMP_B ) );
- size = MAX2( size, format_bits( info, PIPE_FORMAT_COMP_A ) );
- size = MAX2( size, format_bits( info, PIPE_FORMAT_COMP_Z ) );
- size = MAX2( size, format_bits( info, PIPE_FORMAT_COMP_S ) );
+ size = MAX2(size, util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 1));
+ size = MAX2(size, util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 2));
+ size = MAX2(size, util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 3));
+ size = MAX2(size, util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 0));
+ size = MAX2(size, util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 1));
return size;
}
static GLuint
-format_size(
- pipe_format_rgbazs_t info )
+format_size(enum pipe_format format)
{
return
- format_bits( info, PIPE_FORMAT_COMP_R ) +
- format_bits( info, PIPE_FORMAT_COMP_G ) +
- format_bits( info, PIPE_FORMAT_COMP_B ) +
- format_bits( info, PIPE_FORMAT_COMP_A ) +
- format_bits( info, PIPE_FORMAT_COMP_Z ) +
- format_bits( info, PIPE_FORMAT_COMP_S );
+ util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 0) +
+ util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 1) +
+ util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 2) +
+ util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 3) +
+ util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 0) +
+ util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 1);
}
/*
@@ -85,11 +77,13 @@ format_size(
GLboolean
st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo)
{
- if (pf_layout(format) == PIPE_FORMAT_LAYOUT_RGBAZS) {
- pipe_format_rgbazs_t info;
+ const struct util_format_description *desc;
- info = format;
+ desc = util_format_description(format);
+ assert(desc);
+ if (desc->layout == UTIL_FORMAT_LAYOUT_ARITH ||
+ desc->layout == UTIL_FORMAT_LAYOUT_ARRAY) {
#if 0
printf("%s\n", pf_name( format ) );
#endif
@@ -103,22 +97,22 @@ st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo)
pinfo->datatype = GL_UNSIGNED_INT_24_8;
}
else {
- const GLuint size = format_max_bits( info );
+ const GLuint size = format_max_bits(format);
if (size == 8) {
- if (pf_type(info) == PIPE_FORMAT_TYPE_UNORM)
+ if (desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED)
pinfo->datatype = GL_UNSIGNED_BYTE;
else
pinfo->datatype = GL_BYTE;
}
else if (size == 16) {
- if (pf_type(info) == PIPE_FORMAT_TYPE_UNORM)
+ if (desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED)
pinfo->datatype = GL_UNSIGNED_SHORT;
else
pinfo->datatype = GL_SHORT;
}
else {
assert( size <= 32 );
- if (pf_type(info) == PIPE_FORMAT_TYPE_UNORM)
+ if (desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED)
pinfo->datatype = GL_UNSIGNED_INT;
else
pinfo->datatype = GL_INT;
@@ -126,23 +120,23 @@ st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo)
}
/* Component bits */
- pinfo->red_bits = format_bits( info, PIPE_FORMAT_COMP_R );
- pinfo->green_bits = format_bits( info, PIPE_FORMAT_COMP_G );
- pinfo->blue_bits = format_bits( info, PIPE_FORMAT_COMP_B );
- pinfo->alpha_bits = format_bits( info, PIPE_FORMAT_COMP_A );
- pinfo->depth_bits = format_bits( info, PIPE_FORMAT_COMP_Z );
- pinfo->stencil_bits = format_bits( info, PIPE_FORMAT_COMP_S );
+ pinfo->red_bits = util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 0);
+ pinfo->green_bits = util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 1);
+ pinfo->blue_bits = util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 2);
+ pinfo->alpha_bits = util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 3);
+ pinfo->depth_bits = util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 0);
+ pinfo->stencil_bits = util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_ZS, 1);
pinfo->luminance_bits = 0;
pinfo->intensity_bits = 0;
/* Format size */
- pinfo->size = format_size( info ) / 8;
+ pinfo->size = format_size(format) / 8;
/* Luminance & Intensity bits */
- if( pf_swizzle_x(info) == PIPE_FORMAT_COMP_R &&
- pf_swizzle_y(info) == PIPE_FORMAT_COMP_R &&
- pf_swizzle_z(info) == PIPE_FORMAT_COMP_R ) {
- if( pf_swizzle_w(info) == PIPE_FORMAT_COMP_R ) {
+ if (desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_X &&
+ desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_X) {
+ if (desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_X) {
pinfo->intensity_bits = pinfo->red_bits;
}
else {
@@ -153,7 +147,7 @@ st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo)
pinfo->mesa_format = st_pipe_format_to_mesa_format(format);
}
- else if (pf_layout(format) == PIPE_FORMAT_LAYOUT_YCBCR) {
+ else if (desc->layout == UTIL_FORMAT_LAYOUT_YUV) {
pinfo->mesa_format = MESA_FORMAT_YCBCR;
pinfo->datatype = GL_UNSIGNED_SHORT;
pinfo->size = 2; /* two bytes per "texel" */
@@ -393,6 +387,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
@@ -476,13 +497,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 );
@@ -504,7 +526,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 cffb880a741..3823a59d37a 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -37,7 +37,9 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_gen_mipmap.h"
+#include "util/u_math.h"
#include "cso_cache/cso_cache.h"
#include "cso_cache/cso_context.h"
@@ -131,29 +133,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 / util_format_get_blocksize(srcTrans->texture->format);
+ dstStride = dstTrans->stride / util_format_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);
@@ -233,9 +239,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
@@ -270,9 +276,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 0b7786c217d..05b56c9b584 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -48,6 +48,10 @@ struct label {
unsigned token;
};
+
+/**
+ * Intermediate state used during shader translation.
+ */
struct st_translate {
struct ureg_program *ureg;
@@ -408,6 +412,23 @@ static void emit_swz( struct st_translate *t,
}
+/**
+ * Negate the value of DDY to match GL semantics where (0,0) is the
+ * lower-left corner of the window.
+ * Note that the GL_ARB_fragment_coord_conventions extension will
+ * effect this someday.
+ */
+static void emit_ddy( struct st_translate *t,
+ struct ureg_dst dst,
+ const struct prog_src_register *SrcReg )
+{
+ struct ureg_program *ureg = t->ureg;
+ struct ureg_src src = translate_src( t, SrcReg );
+ src = ureg_negate( src );
+ ureg_DDY( ureg, dst, src );
+}
+
+
static unsigned
translate_opcode( unsigned op )
@@ -631,7 +652,9 @@ compile_instruction(
ureg_MOV( ureg, dst[0], ureg_imm1f(ureg, 0.5) );
break;
-
+ case OPCODE_DDY:
+ emit_ddy( t, dst[0], &inst->SrcReg[0] );
+ break;
default:
ureg_insn( ureg,
@@ -688,6 +711,43 @@ 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);
+}
+
+
+static void
+emit_edgeflags( struct st_translate *t,
+ const struct gl_program *program )
+{
+ struct ureg_program *ureg = t->ureg;
+ struct ureg_dst edge_dst = t->outputs[t->outputMapping[VERT_RESULT_EDGE]];
+ struct ureg_src edge_src = t->inputs[t->inputMapping[VERT_ATTRIB_EDGEFLAG]];
+
+ ureg_MOV( ureg, edge_dst, edge_src );
+}
+
+
+/**
* Translate Mesa program to TGSI format.
* \param program the program to translate
* \param numInputs number of input registers used
@@ -704,29 +764,28 @@ emit_inverted_wpos( struct st_translate *t,
* \param outputSemanticIndex the semantic index (ex: which texcoord) for
* each output
*
- * \return array of translated tokens, caller's responsibility to free
+ * \return PIPE_OK or PIPE_ERROR_OUT_OF_MEMORY
*/
-const struct tgsi_token *
+enum pipe_error
st_translate_mesa_program(
GLcontext *ctx,
uint procType,
+ struct ureg_program *ureg,
const struct gl_program *program,
GLuint numInputs,
const GLuint inputMapping[],
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[] )
+ boolean passthrough_edgeflags )
{
struct st_translate translate, *t;
- struct ureg_program *ureg;
- const struct tgsi_token *tokens = NULL;
unsigned i;
+ enum pipe_error ret = PIPE_OK;
t = &translate;
memset(t, 0, sizeof *t);
@@ -734,11 +793,7 @@ st_translate_mesa_program(
t->procType = procType;
t->inputMapping = inputMapping;
t->outputMapping = outputMapping;
- t->ureg = ureg_create( procType );
- if (t->ureg == NULL)
- return NULL;
-
- ureg = t->ureg;
+ t->ureg = ureg;
/*_mesa_print_program(program);*/
@@ -760,6 +815,10 @@ st_translate_mesa_program(
emit_inverted_wpos( t, program );
}
+ if (program->InputsRead & FRAG_BIT_FACE) {
+ emit_face_var( t, program );
+ }
+
/*
* Declare output attributes.
*/
@@ -794,6 +853,8 @@ st_translate_mesa_program(
outputSemanticName[i],
outputSemanticIndex[i] );
}
+ if (passthrough_edgeflags)
+ emit_edgeflags( t, program );
}
/* Declare address register.
@@ -811,8 +872,10 @@ st_translate_mesa_program(
t->constants = CALLOC( program->Parameters->NumParameters,
sizeof t->constants[0] );
- if (t->constants == NULL)
+ if (t->constants == NULL) {
+ ret = PIPE_ERROR_OUT_OF_MEMORY;
goto out;
+ }
for (i = 0; i < program->Parameters->NumParameters; i++) {
switch (program->Parameters->Parameters[i].Type) {
@@ -866,9 +929,6 @@ st_translate_mesa_program(
t->insn[t->labels[i].branch_target] );
}
- tokens = ureg_get_tokens( ureg, NULL );
- ureg_destroy( ureg );
-
out:
FREE(t->insn);
FREE(t->labels);
@@ -876,17 +936,9 @@ out:
if (t->error) {
debug_printf("%s: translate error flag set\n", __FUNCTION__);
- FREE((void *)tokens);
- tokens = NULL;
- }
-
- if (!tokens) {
- debug_printf("%s: failed to translate Mesa program:\n", __FUNCTION__);
- _mesa_print_program(program);
- debug_assert(0);
}
- return tokens;
+ return ret;
}
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.h b/src/mesa/state_tracker/st_mesa_to_tgsi.h
index c0d1ff59e1f..e3c5bd1d94d 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.h
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.h
@@ -30,6 +30,7 @@
#define ST_MESA_TO_TGSI_H
#include "main/mtypes.h"
+#include "tgsi/tgsi_ureg.h"
#if defined __cplusplus
@@ -39,22 +40,22 @@ extern "C" {
struct tgsi_token;
struct gl_program;
-const struct tgsi_token *
+enum pipe_error
st_translate_mesa_program(
GLcontext *ctx,
uint procType,
+ struct ureg_program *ureg,
const struct gl_program *program,
GLuint numInputs,
const GLuint inputMapping[],
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[] );
+ boolean passthrough_edgeflags );
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 07a06b98f7c..5c87e47ca3d 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -49,6 +49,39 @@
#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.
* \param outputMapping to map vertex program output registers (VERT_RESULT_x)
@@ -57,31 +90,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);
@@ -94,162 +109,59 @@ 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++;
}
}
+ /* bit of a hack, presetup potentially unused edgeflag input */
+ stvp->input_to_index[VERT_ATTRIB_EDGEFLAG] = stvp->num_inputs;
+ stvp->index_to_input[stvp->num_inputs] = VERT_ATTRIB_EDGEFLAG;
-#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:
@@ -258,92 +170,79 @@ 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];
}
}
+ /* similar hack to above, presetup potentially unused edgeflag output */
+ stvp->result_to_output[VERT_RESULT_EDGE] = stvp->num_outputs;
+ stvp->output_semantic_name[stvp->num_outputs] = TGSI_SEMANTIC_EDGEFLAG;
+ stvp->output_semantic_index[stvp->num_outputs] = 0;
+}
- 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;
+ struct ureg_program *ureg;
+ enum pipe_error error;
+ unsigned num_outputs;
+
+ ureg = ureg_create( TGSI_PROCESSOR_VERTEX );
+ if (ureg == NULL)
+ return NULL;
+
+ vpv->num_inputs = stvp->num_inputs;
+ num_outputs = stvp->num_outputs;
+ if (key->passthrough_edgeflags) {
+ vpv->num_inputs++;
+ num_outputs++;
}
- stvp->state.tokens =
+ error =
st_translate_mesa_program(st->ctx,
TGSI_PROCESSOR_VERTEX,
+ ureg,
&stvp->Base.Base,
/* inputs */
- vs_num_inputs,
+ vpv->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 );
+ num_outputs,
+ stvp->result_to_output,
+ stvp->output_semantic_name,
+ stvp->output_semantic_index,
+ key->passthrough_edgeflags );
+
+ if (error)
+ goto fail;
- stvp->num_inputs = vs_num_inputs;
- stvp->driver_shader = pipe->create_vs_state(pipe, &stvp->state);
+ vpv->state.tokens = ureg_get_tokens( ureg, NULL );
+ if (!vpv->state.tokens)
+ goto fail;
+
+ ureg_destroy( ureg );
+
+ 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);
@@ -351,9 +250,19 @@ 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;
+
+fail:
+ debug_printf("%s: failed to translate Mesa program:\n", __FUNCTION__);
+ _mesa_print_program(&stvp->Base.Base);
+ debug_assert(0);
+
+ ureg_destroy( ureg );
+ return NULL;
}
@@ -374,9 +283,10 @@ st_translate_fragment_program(struct st_context *st,
GLuint defaultInputMapping[FRAG_ATTRIB_MAX];
GLuint interpMode[16]; /* XXX size? */
GLuint attr;
+ enum pipe_error error;
const GLbitfield inputsRead = stfp->Base.Base.InputsRead;
+ struct ureg_program *ureg;
GLuint vslot = 0;
- GLuint num_generic = 0;
uint fs_num_inputs = 0;
@@ -384,13 +294,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;
@@ -433,14 +336,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:
@@ -449,19 +363,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];
}
}
@@ -499,8 +412,6 @@ st_translate_fragment_program(struct st_context *st,
break;
}
- output_flags[fs_num_outputs] = stfp->Base.Base.OutputFlags[attr];
-
fs_num_outputs++;
}
}
@@ -509,9 +420,15 @@ st_translate_fragment_program(struct st_context *st,
if (!inputMapping)
inputMapping = defaultInputMapping;
- stfp->state.tokens =
+ ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
+ if (ureg == NULL)
+ return;
+
+
+ error =
st_translate_mesa_program(st->ctx,
TGSI_PROCESSOR_FRAGMENT,
+ ureg,
&stfp->Base.Base,
/* inputs */
fs_num_inputs,
@@ -519,14 +436,14 @@ 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, FALSE );
+ stfp->state.tokens = ureg_get_tokens( ureg, NULL );
+ ureg_destroy( ureg );
stfp->driver_shader = pipe->create_fs_state(pipe, &stfp->state);
if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) {
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index e2e5eddef22..6b9a9226df5 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -64,41 +64,73 @@ 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
+{
+ boolean passthrough_edgeflags;
+};
+
+
+/**
+ * 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;
+
+ /** similar to that in st_vertex_program, but with information about edgeflags too */
+ GLuint num_inputs;
+};
+
+
+
+
/**
* 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 +175,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_public.h b/src/mesa/state_tracker/st_public.h
index a5fdac32d1f..98c19817c87 100644
--- a/src/mesa/state_tracker/st_public.h
+++ b/src/mesa/state_tracker/st_public.h
@@ -56,15 +56,19 @@ struct pipe_surface;
struct pipe_texture;
+PUBLIC
struct st_context *st_create_context(struct pipe_context *pipe,
const __GLcontextModes *visual,
struct st_context *share);
+PUBLIC
void st_destroy_context( struct st_context *st );
+PUBLIC
void st_copy_context_state(struct st_context *dst, struct st_context *src,
uint mask);
+PUBLIC
struct st_framebuffer *st_create_framebuffer( const __GLcontextModes *visual,
enum pipe_format colorFormat,
enum pipe_format depthFormat,
@@ -72,50 +76,67 @@ struct st_framebuffer *st_create_framebuffer( const __GLcontextModes *visual,
uint width, uint height,
void *privateData);
+PUBLIC
void st_resize_framebuffer( struct st_framebuffer *stfb,
uint width, uint height );
+PUBLIC
void st_set_framebuffer_surface(struct st_framebuffer *stfb,
uint surfIndex, struct pipe_surface *surf);
+PUBLIC
void st_get_framebuffer_dimensions( struct st_framebuffer *stfb,
uint *width, uint *height);
+PUBLIC
int st_get_framebuffer_surface(struct st_framebuffer *stfb,
uint surfIndex, struct pipe_surface **surface);
+PUBLIC
int st_get_framebuffer_texture(struct st_framebuffer *stfb,
uint surfIndex, struct pipe_texture **texture);
+PUBLIC
void *st_framebuffer_private( struct st_framebuffer *stfb );
+PUBLIC
void st_unreference_framebuffer( struct st_framebuffer *stfb );
+PUBLIC
GLboolean st_make_current(struct st_context *st,
struct st_framebuffer *draw,
struct st_framebuffer *read);
+PUBLIC
struct st_context *st_get_current(void);
+PUBLIC
void st_flush( struct st_context *st, uint pipeFlushFlags,
struct pipe_fence_handle **fence );
+PUBLIC
void st_finish( struct st_context *st );
+PUBLIC
void st_notify_swapbuffers(struct st_framebuffer *stfb);
+PUBLIC
void st_swapbuffers(struct st_framebuffer *stfb,
struct pipe_surface **front_left,
struct pipe_surface **front_right);
+PUBLIC
int st_bind_texture_surface(struct pipe_surface *ps, int target, int level,
enum pipe_format format);
+PUBLIC
int st_unbind_texture_surface(struct pipe_surface *ps, int target, int level);
/** Redirect rendering into stfb's surface to a texture image */
+PUBLIC
int st_bind_teximage(struct st_framebuffer *stfb, uint surfIndex,
int target, int format, int level);
/** Undo surface-to-texture binding */
+PUBLIC
int st_release_teximage(struct st_framebuffer *stfb, uint surfIndex,
int target, int format, int level);
@@ -123,6 +144,7 @@ int st_release_teximage(struct st_framebuffer *stfb, uint surfIndex,
/** Generic function type */
typedef void (*st_proc)();
+PUBLIC
st_proc st_get_proc_address(const char *procname);
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index cda3791c0fe..b210ac91873 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -42,7 +42,9 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_inlines.h"
+#include "util/u_format.h"
#include "util/u_rect.h"
+#include "util/u_math.h"
#define DBG if(0) printf
@@ -99,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);
@@ -134,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;
@@ -240,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,
@@ -264,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;
@@ -274,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);
@@ -300,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;
@@ -312,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
{
@@ -402,7 +405,7 @@ st_bind_texture_surface(struct pipe_surface *ps, int target, int level,
}
/* map pipe format to base format for now */
- if (pf_get_component_bits(format, PIPE_FORMAT_COMP_A) > 0)
+ if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 3) > 0)
internalFormat = GL_RGBA;
else
internalFormat = GL_RGB;
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index 6accdc53afc..cf53f01b7c1 100644
--- a/src/mesa/swrast/s_accum.c
+++ b/src/mesa/swrast/s_accum.c
@@ -435,10 +435,6 @@ accum_return(GLcontext *ctx, GLfloat value,
struct gl_renderbuffer *accumRb = fb->Attachment[BUFFER_ACCUM].Renderbuffer;
const GLboolean directAccess
= (accumRb->GetPointer(ctx, accumRb, 0, 0) != NULL);
- const GLboolean masking = (!ctx->Color.ColorMask[RCOMP] ||
- !ctx->Color.ColorMask[GCOMP] ||
- !ctx->Color.ColorMask[BCOMP] ||
- !ctx->Color.ColorMask[ACOMP]);
static GLchan multTable[32768];
static GLfloat prevMult = 0.0;
@@ -526,8 +522,12 @@ accum_return(GLcontext *ctx, GLfloat value,
/* store colors */
for (buffer = 0; buffer < fb->_NumColorDrawBuffers; buffer++) {
struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[buffer];
+ const GLboolean masking = (!ctx->Color.ColorMask[buffer][RCOMP] ||
+ !ctx->Color.ColorMask[buffer][GCOMP] ||
+ !ctx->Color.ColorMask[buffer][BCOMP] ||
+ !ctx->Color.ColorMask[buffer][ACOMP]);
if (masking) {
- _swrast_mask_rgba_span(ctx, rb, &span);
+ _swrast_mask_rgba_span(ctx, rb, &span, buffer);
}
rb->PutRow(ctx, rb, width, xpos, ypos + i, span.array->rgba, NULL);
}
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index 57a42b3f5db..59e26e9ea31 100644
--- a/src/mesa/swrast/s_bitmap.c
+++ b/src/mesa/swrast/s_bitmap.c
@@ -30,6 +30,7 @@
#include "main/glheader.h"
#include "main/bufferobj.h"
+#include "main/condrender.h"
#include "main/image.h"
#include "main/macros.h"
@@ -55,6 +56,9 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
ASSERT(ctx->RenderMode == GL_RENDER);
+ if (!_mesa_check_conditional_render(ctx))
+ return; /* don't draw */
+
bitmap = (const GLubyte *) _mesa_map_pbo_source(ctx, unpack, bitmap);
if (!bitmap)
return;
diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c
index 8303e4debc7..f73ac78ae26 100644
--- a/src/mesa/swrast/s_blit.c
+++ b/src/mesa/swrast/s_blit.c
@@ -24,6 +24,7 @@
#include "main/glheader.h"
+#include "main/condrender.h"
#include "main/image.h"
#include "main/macros.h"
#include "s_context.h"
@@ -567,6 +568,9 @@ _swrast_BlitFramebuffer(GLcontext *ctx,
};
GLint i;
+ if (!_mesa_check_conditional_render(ctx))
+ return; /* don't clear */
+
if (!ctx->DrawBuffer->_NumColorDrawBuffers)
return;
diff --git a/src/mesa/swrast/s_clear.c b/src/mesa/swrast/s_clear.c
index 002718ded85..21167a64b3d 100644
--- a/src/mesa/swrast/s_clear.c
+++ b/src/mesa/swrast/s_clear.c
@@ -24,6 +24,7 @@
#include "main/glheader.h"
#include "main/colormac.h"
+#include "main/condrender.h"
#include "main/formats.h"
#include "main/macros.h"
#include "main/imports.h"
@@ -40,7 +41,8 @@
* Clear the color buffer when glColorMask is in effect.
*/
static void
-clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb)
+clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLuint buf)
{
const GLint x = ctx->DrawBuffer->_Xmin;
const GLint y = ctx->DrawBuffer->_Ymin;
@@ -95,7 +97,7 @@ clear_rgba_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb)
for (i = 0; i < height; i++) {
span.x = x;
span.y = y + i;
- _swrast_mask_rgba_span(ctx, rb, &span);
+ _swrast_mask_rgba_span(ctx, rb, &span, buf);
/* write masked row */
rb->PutRow(ctx, rb, width, x, y + i, span.array->rgba, NULL);
}
@@ -145,7 +147,7 @@ clear_ci_buffer_with_masking(GLcontext *ctx, struct gl_renderbuffer *rb)
* Clear an rgba color buffer without channel masking.
*/
static void
-clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
+clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint buf)
{
const GLint x = ctx->DrawBuffer->_Xmin;
const GLint y = ctx->DrawBuffer->_Ymin;
@@ -158,10 +160,10 @@ clear_rgba_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
ASSERT(ctx->Visual.rgbMode);
- ASSERT(ctx->Color.ColorMask[0] &&
- ctx->Color.ColorMask[1] &&
- ctx->Color.ColorMask[2] &&
- ctx->Color.ColorMask[3]);
+ ASSERT(ctx->Color.ColorMask[buf][0] &&
+ ctx->Color.ColorMask[buf][1] &&
+ ctx->Color.ColorMask[buf][2] &&
+ ctx->Color.ColorMask[buf][3]);
ASSERT(rb->PutMonoRow);
@@ -246,43 +248,24 @@ clear_ci_buffer(GLcontext *ctx, struct gl_renderbuffer *rb)
static void
clear_color_buffers(GLcontext *ctx)
{
- GLboolean masking;
GLuint buf;
- if (ctx->Visual.rgbMode) {
- if (ctx->Color.ColorMask[0] &&
- ctx->Color.ColorMask[1] &&
- ctx->Color.ColorMask[2] &&
- ctx->Color.ColorMask[3]) {
- masking = GL_FALSE;
- }
- else {
- masking = GL_TRUE;
- }
- }
- else {
- struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0];
- const GLuint indexMask = (1 << _mesa_get_format_bits(rb->Format, GL_INDEX_BITS)) - 1;
- if ((ctx->Color.IndexMask & indexMask) == indexMask) {
- masking = GL_FALSE;
- }
- else {
- masking = GL_TRUE;
- }
- }
-
for (buf = 0; buf < ctx->DrawBuffer->_NumColorDrawBuffers; buf++) {
struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[buf];
if (ctx->Visual.rgbMode) {
- if (masking) {
- clear_rgba_buffer_with_masking(ctx, rb);
+ if (ctx->Color.ColorMask[buf][0] == 0 ||
+ ctx->Color.ColorMask[buf][1] == 0 ||
+ ctx->Color.ColorMask[buf][2] == 0 ||
+ ctx->Color.ColorMask[buf][3] == 0) {
+ clear_rgba_buffer_with_masking(ctx, rb, buf);
}
else {
- clear_rgba_buffer(ctx, rb);
+ clear_rgba_buffer(ctx, rb, buf);
}
}
else {
- if (masking) {
+ const GLuint indexMask = (1 << _mesa_get_format_bits(rb->Format, GL_INDEX_BITS)) - 1;
+ if ((ctx->Color.IndexMask & indexMask) != indexMask) {
clear_ci_buffer_with_masking(ctx, rb);
}
else {
@@ -318,6 +301,9 @@ _swrast_Clear(GLcontext *ctx, GLbitfield buffers)
}
#endif
+ if (!_mesa_check_conditional_render(ctx))
+ return; /* don't clear */
+
swrast_render_start(ctx);
/* do software clearing here */
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index abf00085651..f9092c215a7 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -55,6 +55,7 @@ _swrast_update_rasterflags( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLbitfield rasterMask = 0;
+ GLuint i;
if (ctx->Color.AlphaEnabled) rasterMask |= ALPHATEST_BIT;
if (ctx->Color.BlendEnabled) rasterMask |= BLEND_BIT;
@@ -63,8 +64,15 @@ _swrast_update_rasterflags( GLcontext *ctx )
if (ctx->Scissor.Enabled) rasterMask |= CLIP_BIT;
if (ctx->Stencil._Enabled) rasterMask |= STENCIL_BIT;
if (ctx->Visual.rgbMode) {
- const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask);
- if (colorMask != 0xffffffff) rasterMask |= MASKING_BIT;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ if (!ctx->Color.ColorMask[i][0] ||
+ !ctx->Color.ColorMask[i][1] ||
+ !ctx->Color.ColorMask[i][2] ||
+ !ctx->Color.ColorMask[i][3]) {
+ rasterMask |= MASKING_BIT;
+ break;
+ }
+ }
if (ctx->Color._LogicOpEnabled) rasterMask |= LOGIC_OP_BIT;
if (ctx->Texture._EnabledUnits) rasterMask |= TEXTURE_BIT;
}
@@ -92,13 +100,23 @@ _swrast_update_rasterflags( GLcontext *ctx )
/* more than one color buffer designated for writing (or zero buffers) */
rasterMask |= MULTI_DRAW_BIT;
}
- else if (ctx->Visual.rgbMode && *((GLuint *) ctx->Color.ColorMask) == 0) {
- rasterMask |= MULTI_DRAW_BIT; /* all RGBA channels disabled */
- }
else if (!ctx->Visual.rgbMode && ctx->Color.IndexMask==0) {
rasterMask |= MULTI_DRAW_BIT; /* all color index bits disabled */
}
+ if (ctx->Visual.rgbMode) {
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ if (ctx->Color.ColorMask[i][0] +
+ ctx->Color.ColorMask[i][1] +
+ ctx->Color.ColorMask[i][2] +
+ ctx->Color.ColorMask[i][3] == 0) {
+ rasterMask |= MULTI_DRAW_BIT; /* all RGBA channels disabled */
+ break;
+ }
+ }
+ }
+
+
if (ctx->FragmentProgram._Current) {
rasterMask |= FRAGPROG_BIT;
}
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index da98730c38b..e881d1be30c 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -26,6 +26,7 @@
#include "main/glheader.h"
#include "main/context.h"
#include "main/colormac.h"
+#include "main/condrender.h"
#include "main/convolve.h"
#include "main/image.h"
#include "main/macros.h"
@@ -899,6 +900,9 @@ _swrast_CopyPixels( GLcontext *ctx,
SWcontext *swrast = SWRAST_CONTEXT(ctx);
swrast_render_start(ctx);
+ if (!_mesa_check_conditional_render(ctx))
+ return; /* don't copy */
+
if (swrast->NewState)
_swrast_validate_derived( ctx );
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 59dfd654889..248d6cc1c04 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -25,6 +25,7 @@
#include "main/glheader.h"
#include "main/bufferobj.h"
+#include "main/condrender.h"
#include "main/context.h"
#include "main/convolve.h"
#include "main/image.h"
@@ -830,6 +831,9 @@ _swrast_DrawPixels( GLcontext *ctx,
SWcontext *swrast = SWRAST_CONTEXT(ctx);
GLboolean save_vp_override = ctx->VertexProgram._Overriden;
+ if (!_mesa_check_conditional_render(ctx))
+ return; /* don't draw */
+
/* We are creating fragments directly, without going through vertex
* programs.
*
diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c
index df779b07392..69c2feb6da8 100644
--- a/src/mesa/swrast/s_masking.c
+++ b/src/mesa/swrast/s_masking.c
@@ -41,7 +41,7 @@
*/
void
_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- SWspan *span)
+ SWspan *span, GLuint buf)
{
const GLuint n = span->end;
void *rbPixels;
@@ -58,7 +58,7 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
*/
if (span->array->ChanType == GL_UNSIGNED_BYTE) {
/* treat 4xGLubyte as 1xGLuint */
- const GLuint srcMask = *((GLuint *) ctx->Color.ColorMask);
+ const GLuint srcMask = *((GLuint *) ctx->Color.ColorMask[buf]);
const GLuint dstMask = ~srcMask;
const GLuint *dst = (const GLuint *) rbPixels;
GLuint *src = (GLuint *) span->array->rgba8;
@@ -70,10 +70,10 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
else if (span->array->ChanType == GL_UNSIGNED_SHORT) {
/* 2-byte components */
/* XXX try to use 64-bit arithmetic someday */
- const GLushort rMask = ctx->Color.ColorMask[RCOMP] ? 0xffff : 0x0;
- const GLushort gMask = ctx->Color.ColorMask[GCOMP] ? 0xffff : 0x0;
- const GLushort bMask = ctx->Color.ColorMask[BCOMP] ? 0xffff : 0x0;
- const GLushort aMask = ctx->Color.ColorMask[ACOMP] ? 0xffff : 0x0;
+ const GLushort rMask = ctx->Color.ColorMask[buf][RCOMP] ? 0xffff : 0x0;
+ const GLushort gMask = ctx->Color.ColorMask[buf][GCOMP] ? 0xffff : 0x0;
+ const GLushort bMask = ctx->Color.ColorMask[buf][BCOMP] ? 0xffff : 0x0;
+ const GLushort aMask = ctx->Color.ColorMask[buf][ACOMP] ? 0xffff : 0x0;
const GLushort (*dst)[4] = (const GLushort (*)[4]) rbPixels;
GLushort (*src)[4] = span->array->rgba16;
GLuint i;
@@ -86,10 +86,10 @@ _swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
}
else {
/* 4-byte components */
- const GLuint rMask = ctx->Color.ColorMask[RCOMP] ? ~0x0 : 0x0;
- const GLuint gMask = ctx->Color.ColorMask[GCOMP] ? ~0x0 : 0x0;
- const GLuint bMask = ctx->Color.ColorMask[BCOMP] ? ~0x0 : 0x0;
- const GLuint aMask = ctx->Color.ColorMask[ACOMP] ? ~0x0 : 0x0;
+ const GLuint rMask = ctx->Color.ColorMask[buf][RCOMP] ? ~0x0 : 0x0;
+ const GLuint gMask = ctx->Color.ColorMask[buf][GCOMP] ? ~0x0 : 0x0;
+ const GLuint bMask = ctx->Color.ColorMask[buf][BCOMP] ? ~0x0 : 0x0;
+ const GLuint aMask = ctx->Color.ColorMask[buf][ACOMP] ? ~0x0 : 0x0;
const GLuint (*dst)[4] = (const GLuint (*)[4]) rbPixels;
GLuint (*src)[4] = (GLuint (*)[4]) span->array->attribs[FRAG_ATTRIB_COL0];
GLuint i;
diff --git a/src/mesa/swrast/s_masking.h b/src/mesa/swrast/s_masking.h
index 3260ca34e32..fed47f8cfbe 100644
--- a/src/mesa/swrast/s_masking.h
+++ b/src/mesa/swrast/s_masking.h
@@ -32,7 +32,7 @@
extern void
_swrast_mask_rgba_span(GLcontext *ctx, struct gl_renderbuffer *rb,
- SWspan *span);
+ SWspan *span, GLuint buf);
extern void
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 07248c71af0..874a37b2241 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1278,7 +1278,7 @@ void
_swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
{
const SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLuint colorMask = *((GLuint *) ctx->Color.ColorMask);
+ const GLuint *colorMask = (GLuint *) ctx->Color.ColorMask;
const GLbitfield origInterpMask = span->interpMask;
const GLbitfield origArrayMask = span->arrayMask;
const GLbitfield origArrayAttribs = span->arrayAttribs;
@@ -1396,7 +1396,7 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
/* We had to wait until now to check for glColorMask(0,0,0,0) because of
* the occlusion test.
*/
- if (colorMask == 0x0) {
+ if (fb->_NumColorDrawBuffers == 1 && colorMask[0] == 0x0) {
/* no colors to write */
goto end;
}
@@ -1486,12 +1486,12 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
if (ctx->Color._LogicOpEnabled) {
_swrast_logicop_rgba_span(ctx, rb, span);
}
- else if (ctx->Color.BlendEnabled) {
+ else if ((ctx->Color.BlendEnabled >> buf) & 1) {
_swrast_blend_span(ctx, rb, span);
}
- if (colorMask != 0xffffffff) {
- _swrast_mask_rgba_span(ctx, rb, span);
+ if (colorMask[buf] != 0xffffffff) {
+ _swrast_mask_rgba_span(ctx, rb, span, buf);
}
if (span->arrayMask & SPAN_XY) {
diff --git a/src/mesa/swrast/s_texfilter.c b/src/mesa/swrast/s_texfilter.c
index 0bb988e3ef9..76b65cc755e 100644
--- a/src/mesa/swrast/s_texfilter.c
+++ b/src/mesa/swrast/s_texfilter.c
@@ -747,28 +747,28 @@ get_border_color(const struct gl_texture_object *tObj,
{
switch (img->_BaseFormat) {
case GL_RGB:
- rgba[0] = tObj->BorderColor[0];
- rgba[1] = tObj->BorderColor[1];
- rgba[2] = tObj->BorderColor[2];
+ rgba[0] = tObj->BorderColor.f[0];
+ rgba[1] = tObj->BorderColor.f[1];
+ rgba[2] = tObj->BorderColor.f[2];
rgba[3] = 1.0F;
break;
case GL_ALPHA:
rgba[0] = rgba[1] = rgba[2] = 0.0;
- rgba[3] = tObj->BorderColor[3];
+ rgba[3] = tObj->BorderColor.f[3];
break;
case GL_LUMINANCE:
- rgba[0] = rgba[1] = rgba[2] = tObj->BorderColor[0];
+ rgba[0] = rgba[1] = rgba[2] = tObj->BorderColor.f[0];
rgba[3] = 1.0;
break;
case GL_LUMINANCE_ALPHA:
- rgba[0] = rgba[1] = rgba[2] = tObj->BorderColor[0];
- rgba[3] = tObj->BorderColor[3];
+ rgba[0] = rgba[1] = rgba[2] = tObj->BorderColor.f[0];
+ rgba[3] = tObj->BorderColor.f[3];
break;
case GL_INTENSITY:
- rgba[0] = rgba[1] = rgba[2] = rgba[3] = tObj->BorderColor[0];
+ rgba[0] = rgba[1] = rgba[2] = rgba[3] = tObj->BorderColor.f[0];
break;
default:
- COPY_4V(rgba, tObj->BorderColor);
+ COPY_4V(rgba, tObj->BorderColor.f);
}
}
@@ -2331,7 +2331,7 @@ sample_2d_array_linear(GLcontext *ctx,
array = clamp_rect_coord_nearest(tObj->WrapR, texcoord[2], depth);
if (array < 0 || array >= depth) {
- COPY_4V(rgba, tObj->BorderColor);
+ COPY_4V(rgba, tObj->BorderColor.f);
}
else {
if (img->Border) {
@@ -3002,7 +3002,7 @@ sample_depth_texture( GLcontext *ctx,
img->FetchTexelf(img, col, row, slice, &depthSample);
}
else {
- depthSample = tObj->BorderColor[0];
+ depthSample = tObj->BorderColor.f[0];
}
result = shadow_compare(function, texcoords[i][compare_coord],
@@ -3053,21 +3053,21 @@ sample_depth_texture( GLcontext *ctx,
}
if (slice < 0 || slice >= (GLint) depth) {
- depth00 = tObj->BorderColor[0];
- depth01 = tObj->BorderColor[0];
- depth10 = tObj->BorderColor[0];
- depth11 = tObj->BorderColor[0];
+ depth00 = tObj->BorderColor.f[0];
+ depth01 = tObj->BorderColor.f[0];
+ depth10 = tObj->BorderColor.f[0];
+ depth11 = tObj->BorderColor.f[0];
}
else {
/* get four depth samples from the texture */
if (useBorderTexel & (I0BIT | J0BIT)) {
- depth00 = tObj->BorderColor[0];
+ depth00 = tObj->BorderColor.f[0];
}
else {
img->FetchTexelf(img, i0, j0, slice, &depth00);
}
if (useBorderTexel & (I1BIT | J0BIT)) {
- depth10 = tObj->BorderColor[0];
+ depth10 = tObj->BorderColor.f[0];
}
else {
img->FetchTexelf(img, i1, j0, slice, &depth10);
@@ -3075,13 +3075,13 @@ sample_depth_texture( GLcontext *ctx,
if (tObj->Target != GL_TEXTURE_1D_ARRAY_EXT) {
if (useBorderTexel & (I0BIT | J1BIT)) {
- depth01 = tObj->BorderColor[0];
+ depth01 = tObj->BorderColor.f[0];
}
else {
img->FetchTexelf(img, i0, j1, slice, &depth01);
}
if (useBorderTexel & (I1BIT | J1BIT)) {
- depth11 = tObj->BorderColor[0];
+ depth11 = tObj->BorderColor.f[0];
}
else {
img->FetchTexelf(img, i1, j1, slice, &depth11);
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 5bec6066967..11184b72ce3 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -1030,10 +1030,10 @@ _swrast_choose_triangle( GLcontext *ctx )
ctx->Depth.Func == GL_LESS &&
!ctx->Stencil._Enabled) {
if ((rgbmode &&
- ctx->Color.ColorMask[0] == 0 &&
- ctx->Color.ColorMask[1] == 0 &&
- ctx->Color.ColorMask[2] == 0 &&
- ctx->Color.ColorMask[3] == 0)
+ ctx->Color.ColorMask[0][0] == 0 &&
+ ctx->Color.ColorMask[0][1] == 0 &&
+ ctx->Color.ColorMask[0][2] == 0 &&
+ ctx->Color.ColorMask[0][3] == 0)
||
(!rgbmode && ctx->Color.IndexMask == 0)) {
USE(occlusion_zless_triangle);
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index c183b315b67..c01cf7d1f0b 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -75,12 +75,6 @@ typedef struct {
} SWvertex;
-/**
- * Fixed point data type.
- */
-typedef int GLfixed;
-
-
#define FRAG_ATTRIB_CI FRAG_ATTRIB_COL0
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index bd20a8d972f..8484aab5a93 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.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 9a888ce19f4..d8c611031d2 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -26,6 +26,7 @@
*/
#include "main/glheader.h"
+#include "main/condrender.h"
#include "main/context.h"
#include "main/imports.h"
#include "main/mtypes.h"
@@ -107,6 +108,22 @@ convert_bgra_to_float(const struct gl_client_array *input,
}
}
+static void
+convert_half_to_float(const struct gl_client_array *input,
+ const GLubyte *ptr, GLfloat *fptr,
+ GLuint count, GLuint sz)
+{
+ GLuint i, j;
+
+ for (i = 0; i < count; i++) {
+ GLhalfARB *in = (GLhalfARB *)ptr;
+
+ for (j = 0; j < sz; j++) {
+ *fptr++ = _mesa_half_to_float(in[j]);
+ }
+ ptr += input->StrideB;
+ }
+}
/* Adjust pointer to point at first requested element, convert to
* floating point, populate VB->AttribPtr[].
@@ -154,6 +171,9 @@ static void _tnl_import_array( GLcontext *ctx,
case GL_DOUBLE:
CONVERT(GLdouble, (GLfloat));
break;
+ case GL_HALF_FLOAT:
+ convert_half_to_float(input, ptr, fptr, count, sz);
+ break;
default:
assert(0);
break;
@@ -247,22 +267,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
@@ -394,6 +402,9 @@ void _tnl_draw_prims( GLcontext *ctx,
GLuint max_basevertex = prim->basevertex;
GLuint i;
+ if (!_mesa_check_conditional_render(ctx))
+ return; /* don't draw */
+
for (i = 1; i < nr_prims; i++)
max_basevertex = MAX2(max_basevertex, prim[i].basevertex);
diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c
index 2cc677e5bf7..946b29e250f 100644
--- a/src/mesa/tnl/t_pipeline.c
+++ b/src/mesa/tnl/t_pipeline.c
@@ -85,10 +85,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 f3de6b6caaf..5396548666f 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -460,19 +460,14 @@ 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];
}
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..99ddace73d1 100644
--- a/src/mesa/tnl/t_vertex_generic.c
+++ b/src/mesa/tnl/t_vertex_generic.c
@@ -210,7 +210,7 @@ static INLINE void insert_3f_xyw_err( const struct tnl_clipspace_attr *a, GLubyt
{
(void) a; (void) v; (void) in;
DEBUG_INSERT;
- _mesa_exit(1);
+ exit(1);
}
static INLINE void insert_3f_3( const struct tnl_clipspace_attr *a, GLubyte *v, const GLfloat *in )
@@ -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 d568bfdb584..2424204b886 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -447,7 +447,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();
@@ -1230,7 +1230,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 c3ba8514c8a..6acd837317f 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/vf/vf_generic.c b/src/mesa/vf/vf_generic.c
index baa00af29a6..0af8893c302 100644
--- a/src/mesa/vf/vf_generic.c
+++ b/src/mesa/vf/vf_generic.c
@@ -211,7 +211,7 @@ static INLINE void insert_3f_xyw_4( const struct vf_attr *a, GLubyte *v, const G
static INLINE void insert_3f_xyw_err( const struct vf_attr *a, GLubyte *v, const GLfloat *in )
{
(void) a; (void) v; (void) in;
- _mesa_exit(1);
+ exit(1);
}
static INLINE void insert_3f_3( const struct vf_attr *a, GLubyte *v, const GLfloat *in )
diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S
index 134cff7ca46..8edb69bf848 100644
--- a/src/mesa/x86-64/glapi_x86-64.S
+++ b/src/mesa/x86-64/glapi_x86-64.S
@@ -29,7 +29,7 @@
* the symbol visibility mode to 'default'.
*/
-#include "../x86/assyntax.h"
+#include "x86/assyntax.h"
#if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
# pragma GCC visibility push(default)
@@ -29800,16 +29800,24 @@ GL_PREFIX(FramebufferTextureLayerEXT):
.size GL_PREFIX(FramebufferTextureLayerEXT), .-GL_PREFIX(FramebufferTextureLayerEXT)
.p2align 4,,15
- .globl GL_PREFIX(ProvokingVertexEXT)
- .type GL_PREFIX(ProvokingVertexEXT), @function
-GL_PREFIX(ProvokingVertexEXT):
+ .globl GL_PREFIX(ColorMaskIndexedEXT)
+ .type GL_PREFIX(ColorMaskIndexedEXT), @function
+GL_PREFIX(ColorMaskIndexedEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 6296(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ pushq %rcx
+ pushq %r8
call _x86_64_get_dispatch@PLT
+ popq %r8
+ popq %rcx
+ popq %rdx
+ popq %rsi
popq %rdi
movq 6296(%rax), %r11
jmp *%r11
@@ -29821,18 +29829,25 @@ GL_PREFIX(ProvokingVertexEXT):
jmp *%r11
1:
pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ pushq %rcx
+ pushq %r8
call _glapi_get_dispatch
+ popq %r8
+ popq %rcx
+ popq %rdx
+ popq %rsi
popq %rdi
movq 6296(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(ProvokingVertexEXT), .-GL_PREFIX(ProvokingVertexEXT)
+ .size GL_PREFIX(ColorMaskIndexedEXT), .-GL_PREFIX(ColorMaskIndexedEXT)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_788)
- .type GL_PREFIX(_dispatch_stub_788), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_788))
-GL_PREFIX(_dispatch_stub_788):
+ .globl GL_PREFIX(DisableIndexedEXT)
+ .type GL_PREFIX(DisableIndexedEXT), @function
+GL_PREFIX(DisableIndexedEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 6304(%rax), %r11
@@ -29840,9 +29855,9 @@ GL_PREFIX(_dispatch_stub_788):
#elif defined(PTHREADS)
pushq %rdi
pushq %rsi
- pushq %rdx
+ pushq %rbp
call _x86_64_get_dispatch@PLT
- popq %rdx
+ popq %rbp
popq %rsi
popq %rdi
movq 6304(%rax), %r11
@@ -29856,21 +29871,20 @@ GL_PREFIX(_dispatch_stub_788):
1:
pushq %rdi
pushq %rsi
- pushq %rdx
+ pushq %rbp
call _glapi_get_dispatch
- popq %rdx
+ popq %rbp
popq %rsi
popq %rdi
movq 6304(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_788), .-GL_PREFIX(_dispatch_stub_788)
+ .size GL_PREFIX(DisableIndexedEXT), .-GL_PREFIX(DisableIndexedEXT)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_789)
- .type GL_PREFIX(_dispatch_stub_789), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_789))
-GL_PREFIX(_dispatch_stub_789):
+ .globl GL_PREFIX(EnableIndexedEXT)
+ .type GL_PREFIX(EnableIndexedEXT), @function
+GL_PREFIX(EnableIndexedEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 6312(%rax), %r11
@@ -29878,9 +29892,9 @@ GL_PREFIX(_dispatch_stub_789):
#elif defined(PTHREADS)
pushq %rdi
pushq %rsi
- pushq %rdx
+ pushq %rbp
call _x86_64_get_dispatch@PLT
- popq %rdx
+ popq %rbp
popq %rsi
popq %rdi
movq 6312(%rax), %r11
@@ -29894,21 +29908,20 @@ GL_PREFIX(_dispatch_stub_789):
1:
pushq %rdi
pushq %rsi
- pushq %rdx
+ pushq %rbp
call _glapi_get_dispatch
- popq %rdx
+ popq %rbp
popq %rsi
popq %rdi
movq 6312(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_789), .-GL_PREFIX(_dispatch_stub_789)
+ .size GL_PREFIX(EnableIndexedEXT), .-GL_PREFIX(EnableIndexedEXT)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_790)
- .type GL_PREFIX(_dispatch_stub_790), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_790))
-GL_PREFIX(_dispatch_stub_790):
+ .globl GL_PREFIX(GetBooleanIndexedvEXT)
+ .type GL_PREFIX(GetBooleanIndexedvEXT), @function
+GL_PREFIX(GetBooleanIndexedvEXT):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
movq 6320(%rax), %r11
@@ -29917,6 +29930,289 @@ GL_PREFIX(_dispatch_stub_790):
pushq %rdi
pushq %rsi
pushq %rdx
+ call _x86_64_get_dispatch@PLT
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6320(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6320(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _glapi_get_dispatch
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6320(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(GetBooleanIndexedvEXT), .-GL_PREFIX(GetBooleanIndexedvEXT)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(GetIntegerIndexedvEXT)
+ .type GL_PREFIX(GetIntegerIndexedvEXT), @function
+GL_PREFIX(GetIntegerIndexedvEXT):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6328(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _x86_64_get_dispatch@PLT
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6328(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6328(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _glapi_get_dispatch
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6328(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(GetIntegerIndexedvEXT), .-GL_PREFIX(GetIntegerIndexedvEXT)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(IsEnabledIndexedEXT)
+ .type GL_PREFIX(IsEnabledIndexedEXT), @function
+GL_PREFIX(IsEnabledIndexedEXT):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6336(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _x86_64_get_dispatch@PLT
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6336(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6336(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6336(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(IsEnabledIndexedEXT), .-GL_PREFIX(IsEnabledIndexedEXT)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(BeginConditionalRenderNV)
+ .type GL_PREFIX(BeginConditionalRenderNV), @function
+GL_PREFIX(BeginConditionalRenderNV):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6344(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _x86_64_get_dispatch@PLT
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6344(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6344(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ popq %rsi
+ popq %rdi
+ movq 6344(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(BeginConditionalRenderNV), .-GL_PREFIX(BeginConditionalRenderNV)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(EndConditionalRenderNV)
+ .type GL_PREFIX(EndConditionalRenderNV), @function
+GL_PREFIX(EndConditionalRenderNV):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6352(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rbp
+ call _x86_64_get_dispatch@PLT
+ popq %rbp
+ movq 6352(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6352(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rbp
+ call _glapi_get_dispatch
+ popq %rbp
+ movq 6352(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(EndConditionalRenderNV), .-GL_PREFIX(EndConditionalRenderNV)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(ProvokingVertexEXT)
+ .type GL_PREFIX(ProvokingVertexEXT), @function
+GL_PREFIX(ProvokingVertexEXT):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6360(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ call _x86_64_get_dispatch@PLT
+ popq %rdi
+ movq 6360(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6360(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ call _glapi_get_dispatch
+ popq %rdi
+ movq 6360(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(ProvokingVertexEXT), .-GL_PREFIX(ProvokingVertexEXT)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(_dispatch_stub_796)
+ .type GL_PREFIX(_dispatch_stub_796), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_796))
+GL_PREFIX(_dispatch_stub_796):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6368(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _x86_64_get_dispatch@PLT
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6368(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6368(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _glapi_get_dispatch
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6368(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(_dispatch_stub_796), .-GL_PREFIX(_dispatch_stub_796)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(_dispatch_stub_797)
+ .type GL_PREFIX(_dispatch_stub_797), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_797))
+GL_PREFIX(_dispatch_stub_797):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6376(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _x86_64_get_dispatch@PLT
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6376(%rax), %r11
+ jmp *%r11
+#else
+ movq _glapi_Dispatch(%rip), %rax
+ testq %rax, %rax
+ je 1f
+ movq 6376(%rax), %r11
+ jmp *%r11
+1:
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
+ call _glapi_get_dispatch
+ popq %rdx
+ popq %rsi
+ popq %rdi
+ movq 6376(%rax), %r11
+ jmp *%r11
+#endif /* defined(GLX_USE_TLS) */
+ .size GL_PREFIX(_dispatch_stub_797), .-GL_PREFIX(_dispatch_stub_797)
+
+ .p2align 4,,15
+ .globl GL_PREFIX(_dispatch_stub_798)
+ .type GL_PREFIX(_dispatch_stub_798), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_798))
+GL_PREFIX(_dispatch_stub_798):
+#if defined(GLX_USE_TLS)
+ call _x86_64_get_dispatch@PLT
+ movq 6384(%rax), %r11
+ jmp *%r11
+#elif defined(PTHREADS)
+ pushq %rdi
+ pushq %rsi
+ pushq %rdx
pushq %rcx
pushq %rbp
call _x86_64_get_dispatch@PLT
@@ -29925,13 +30221,13 @@ GL_PREFIX(_dispatch_stub_790):
popq %rdx
popq %rsi
popq %rdi
- movq 6320(%rax), %r11
+ movq 6384(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6320(%rax), %r11
+ movq 6384(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29945,19 +30241,19 @@ GL_PREFIX(_dispatch_stub_790):
popq %rdx
popq %rsi
popq %rdi
- movq 6320(%rax), %r11
+ movq 6384(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_790), .-GL_PREFIX(_dispatch_stub_790)
+ .size GL_PREFIX(_dispatch_stub_798), .-GL_PREFIX(_dispatch_stub_798)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_791)
- .type GL_PREFIX(_dispatch_stub_791), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_791))
-GL_PREFIX(_dispatch_stub_791):
+ .globl GL_PREFIX(_dispatch_stub_799)
+ .type GL_PREFIX(_dispatch_stub_799), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_799))
+GL_PREFIX(_dispatch_stub_799):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6328(%rax), %r11
+ movq 6392(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -29971,13 +30267,13 @@ GL_PREFIX(_dispatch_stub_791):
popq %rdx
popq %rsi
popq %rdi
- movq 6328(%rax), %r11
+ movq 6392(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6328(%rax), %r11
+ movq 6392(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -29991,19 +30287,19 @@ GL_PREFIX(_dispatch_stub_791):
popq %rdx
popq %rsi
popq %rdi
- movq 6328(%rax), %r11
+ movq 6392(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_791), .-GL_PREFIX(_dispatch_stub_791)
+ .size GL_PREFIX(_dispatch_stub_799), .-GL_PREFIX(_dispatch_stub_799)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_792)
- .type GL_PREFIX(_dispatch_stub_792), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_792))
-GL_PREFIX(_dispatch_stub_792):
+ .globl GL_PREFIX(_dispatch_stub_800)
+ .type GL_PREFIX(_dispatch_stub_800), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_800))
+GL_PREFIX(_dispatch_stub_800):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6336(%rax), %r11
+ movq 6400(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30017,13 +30313,13 @@ GL_PREFIX(_dispatch_stub_792):
popq %rdx
popq %rsi
popq %rdi
- movq 6336(%rax), %r11
+ movq 6400(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6336(%rax), %r11
+ movq 6400(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30037,19 +30333,19 @@ GL_PREFIX(_dispatch_stub_792):
popq %rdx
popq %rsi
popq %rdi
- movq 6336(%rax), %r11
+ movq 6400(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_792), .-GL_PREFIX(_dispatch_stub_792)
+ .size GL_PREFIX(_dispatch_stub_800), .-GL_PREFIX(_dispatch_stub_800)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_793)
- .type GL_PREFIX(_dispatch_stub_793), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_793))
-GL_PREFIX(_dispatch_stub_793):
+ .globl GL_PREFIX(_dispatch_stub_801)
+ .type GL_PREFIX(_dispatch_stub_801), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_801))
+GL_PREFIX(_dispatch_stub_801):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6344(%rax), %r11
+ movq 6408(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30059,13 +30355,13 @@ GL_PREFIX(_dispatch_stub_793):
popq %rdx
popq %rsi
popq %rdi
- movq 6344(%rax), %r11
+ movq 6408(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6344(%rax), %r11
+ movq 6408(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30075,19 +30371,19 @@ GL_PREFIX(_dispatch_stub_793):
popq %rdx
popq %rsi
popq %rdi
- movq 6344(%rax), %r11
+ movq 6408(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_793), .-GL_PREFIX(_dispatch_stub_793)
+ .size GL_PREFIX(_dispatch_stub_801), .-GL_PREFIX(_dispatch_stub_801)
.p2align 4,,15
- .globl GL_PREFIX(_dispatch_stub_794)
- .type GL_PREFIX(_dispatch_stub_794), @function
- HIDDEN(GL_PREFIX(_dispatch_stub_794))
-GL_PREFIX(_dispatch_stub_794):
+ .globl GL_PREFIX(_dispatch_stub_802)
+ .type GL_PREFIX(_dispatch_stub_802), @function
+ HIDDEN(GL_PREFIX(_dispatch_stub_802))
+GL_PREFIX(_dispatch_stub_802):
#if defined(GLX_USE_TLS)
call _x86_64_get_dispatch@PLT
- movq 6352(%rax), %r11
+ movq 6416(%rax), %r11
jmp *%r11
#elif defined(PTHREADS)
pushq %rdi
@@ -30097,13 +30393,13 @@ GL_PREFIX(_dispatch_stub_794):
popq %rdx
popq %rsi
popq %rdi
- movq 6352(%rax), %r11
+ movq 6416(%rax), %r11
jmp *%r11
#else
movq _glapi_Dispatch(%rip), %rax
testq %rax, %rax
je 1f
- movq 6352(%rax), %r11
+ movq 6416(%rax), %r11
jmp *%r11
1:
pushq %rdi
@@ -30113,10 +30409,10 @@ GL_PREFIX(_dispatch_stub_794):
popq %rdx
popq %rsi
popq %rdi
- movq 6352(%rax), %r11
+ movq 6416(%rax), %r11
jmp *%r11
#endif /* defined(GLX_USE_TLS) */
- .size GL_PREFIX(_dispatch_stub_794), .-GL_PREFIX(_dispatch_stub_794)
+ .size GL_PREFIX(_dispatch_stub_802), .-GL_PREFIX(_dispatch_stub_802)
.globl GL_PREFIX(ArrayElementEXT) ; .set GL_PREFIX(ArrayElementEXT), GL_PREFIX(ArrayElement)
.globl GL_PREFIX(BindTextureEXT) ; .set GL_PREFIX(BindTextureEXT), GL_PREFIX(BindTexture)
diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c
index 771d9df0821..14cfa910aaf 100644
--- a/src/mesa/x86/gen_matypes.c
+++ b/src/mesa/x86/gen_matypes.c
@@ -110,22 +110,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 849fbce3b8a..8030fdf90bd 100644
--- a/src/mesa/x86/glapi_x86.S
+++ b/src/mesa/x86/glapi_x86.S
@@ -26,7 +26,7 @@
* SOFTWARE.
*/
-#include "assyntax.h"
+#include "x86/assyntax.h"
#include "glapi/glapioffsets.h"
#if defined(STDCALL_API)
@@ -968,21 +968,29 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB(_dispatch_stub_785, _gloffset_FlushMappedBufferRangeAPPLE, _dispatch_stub_785@12)
HIDDEN(GL_PREFIX(_dispatch_stub_785, _dispatch_stub_785@12))
GL_STUB(FramebufferTextureLayerEXT, _gloffset_FramebufferTextureLayerEXT, FramebufferTextureLayerEXT@20)
+ GL_STUB(ColorMaskIndexedEXT, _gloffset_ColorMaskIndexedEXT, ColorMaskIndexedEXT@20)
+ GL_STUB(DisableIndexedEXT, _gloffset_DisableIndexedEXT, DisableIndexedEXT@8)
+ GL_STUB(EnableIndexedEXT, _gloffset_EnableIndexedEXT, EnableIndexedEXT@8)
+ GL_STUB(GetBooleanIndexedvEXT, _gloffset_GetBooleanIndexedvEXT, GetBooleanIndexedvEXT@12)
+ GL_STUB(GetIntegerIndexedvEXT, _gloffset_GetIntegerIndexedvEXT, GetIntegerIndexedvEXT@12)
+ GL_STUB(IsEnabledIndexedEXT, _gloffset_IsEnabledIndexedEXT, IsEnabledIndexedEXT@8)
+ GL_STUB(BeginConditionalRenderNV, _gloffset_BeginConditionalRenderNV, BeginConditionalRenderNV@8)
+ GL_STUB(EndConditionalRenderNV, _gloffset_EndConditionalRenderNV, EndConditionalRenderNV@0)
GL_STUB(ProvokingVertexEXT, _gloffset_ProvokingVertexEXT, ProvokingVertexEXT@4)
- GL_STUB(_dispatch_stub_788, _gloffset_GetTexParameterPointervAPPLE, _dispatch_stub_788@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_788, _dispatch_stub_788@12))
- GL_STUB(_dispatch_stub_789, _gloffset_TextureRangeAPPLE, _dispatch_stub_789@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_789, _dispatch_stub_789@12))
- GL_STUB(_dispatch_stub_790, _gloffset_StencilFuncSeparateATI, _dispatch_stub_790@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_790, _dispatch_stub_790@16))
- GL_STUB(_dispatch_stub_791, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_791@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_791, _dispatch_stub_791@16))
- GL_STUB(_dispatch_stub_792, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_792@16)
- HIDDEN(GL_PREFIX(_dispatch_stub_792, _dispatch_stub_792@16))
- GL_STUB(_dispatch_stub_793, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_793@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_793, _dispatch_stub_793@12))
- GL_STUB(_dispatch_stub_794, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_794@12)
- HIDDEN(GL_PREFIX(_dispatch_stub_794, _dispatch_stub_794@12))
+ GL_STUB(_dispatch_stub_796, _gloffset_GetTexParameterPointervAPPLE, _dispatch_stub_796@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_796, _dispatch_stub_796@12))
+ GL_STUB(_dispatch_stub_797, _gloffset_TextureRangeAPPLE, _dispatch_stub_797@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_797, _dispatch_stub_797@12))
+ GL_STUB(_dispatch_stub_798, _gloffset_StencilFuncSeparateATI, _dispatch_stub_798@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_798, _dispatch_stub_798@16))
+ GL_STUB(_dispatch_stub_799, _gloffset_ProgramEnvParameters4fvEXT, _dispatch_stub_799@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_799, _dispatch_stub_799@16))
+ GL_STUB(_dispatch_stub_800, _gloffset_ProgramLocalParameters4fvEXT, _dispatch_stub_800@16)
+ HIDDEN(GL_PREFIX(_dispatch_stub_800, _dispatch_stub_800@16))
+ GL_STUB(_dispatch_stub_801, _gloffset_GetQueryObjecti64vEXT, _dispatch_stub_801@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_801, _dispatch_stub_801@12))
+ GL_STUB(_dispatch_stub_802, _gloffset_GetQueryObjectui64vEXT, _dispatch_stub_802@12)
+ HIDDEN(GL_PREFIX(_dispatch_stub_802, _dispatch_stub_802@12))
GL_STUB_ALIAS(ArrayElementEXT, _gloffset_ArrayElement, ArrayElementEXT@4, ArrayElement, ArrayElement@4)
GL_STUB_ALIAS(BindTextureEXT, _gloffset_BindTexture, BindTextureEXT@8, BindTexture, BindTexture@8)
GL_STUB_ALIAS(DrawArraysEXT, _gloffset_DrawArrays, DrawArraysEXT@12, DrawArrays, DrawArrays@12)